Rev 9930 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9930 | Rev 9941 | ||
---|---|---|---|
Line 15... | Line 15... | ||
15 | ;; ;; |
15 | ;; ;; |
16 | ;; See file COPYING for details ;; |
16 | ;; See file COPYING for details ;; |
17 | ;; ;; |
17 | ;; ;; |
18 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
18 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 19... | Line 19... | ||
19 | 19 | ||
Line 20... | Line 20... | ||
20 | $Revision: 9930 $ |
20 | $Revision: 9941 $ |
21 | 21 | ||
22 | uglobal |
22 | uglobal |
23 | align 4 |
23 | align 4 |
Line 38... | Line 38... | ||
38 | align 4 |
38 | align 4 |
39 | Vesa20_getpixel16: |
39 | Vesa20_getpixel16: |
Line 40... | Line 40... | ||
40 | 40 | ||
41 | ; check for hardware cursor |
41 | ; check for hardware cursor |
42 | cmp [_display.select_cursor], select_cursor |
- | |
43 | je @f |
- | |
44 | cmp [_display.select_cursor], 0 |
42 | cmp [_display.select_cursor], select_cursor |
45 | jne .no_mouseunder |
- | |
Line 46... | Line 43... | ||
46 | @@: |
43 | jne .no_mouseunder |
47 | 44 | ||
48 | ; check mouse area for putpixel |
45 | ; check mouse area for putpixel |
49 | test ecx, 0x04000000 ; don't load to mouseunder area |
46 | test ecx, 0x04000000 ; don't load to mouseunder area |
Line 76... | Line 73... | ||
76 | align 4 |
73 | align 4 |
77 | Vesa20_getpixel24: |
74 | Vesa20_getpixel24: |
Line 78... | Line 75... | ||
78 | 75 | ||
79 | ; check for hardware cursor |
76 | ; check for hardware cursor |
80 | cmp [_display.select_cursor], select_cursor |
- | |
81 | je @f |
- | |
82 | cmp [_display.select_cursor], 0 |
77 | cmp [_display.select_cursor], select_cursor |
83 | jne .no_mouseunder |
- | |
Line 84... | Line 78... | ||
84 | @@: |
78 | jne .no_mouseunder |
85 | 79 | ||
86 | ; check mouse area for putpixel |
80 | ; check mouse area for putpixel |
87 | test ecx, 0x04000000 ; don't load to mouseunder area |
81 | test ecx, 0x04000000 ; don't load to mouseunder area |
Line 108... | Line 102... | ||
108 | align 4 |
102 | align 4 |
109 | Vesa20_getpixel32: |
103 | Vesa20_getpixel32: |
Line 110... | Line 104... | ||
110 | 104 | ||
111 | ; check for hardware cursor |
105 | ; check for hardware cursor |
112 | cmp [_display.select_cursor], select_cursor |
- | |
113 | je @f |
- | |
114 | cmp [_display.select_cursor], 0 |
106 | cmp [_display.select_cursor], select_cursor |
115 | jne .no_mouseunder |
- | |
Line 116... | Line 107... | ||
116 | @@: |
107 | jne .no_mouseunder |
117 | 108 | ||
118 | ; check mouse area for putpixel |
109 | ; check mouse area for putpixel |
119 | test ecx, 0x04000000 ; don't load to mouseunder area |
110 | test ecx, 0x04000000 ; don't load to mouseunder area |
Line 187... | Line 178... | ||
187 | and edx, 0xFFFF |
178 | and edx, 0xFFFF |
188 | shr eax, 16 |
179 | shr eax, 16 |
189 | mov [putimg.image_cx], eax |
180 | mov [putimg.image_cx], eax |
190 | mov [putimg.image_cy], edx |
181 | mov [putimg.image_cy], edx |
191 | ; calculate absolute (i.e. screen) coordinates |
182 | ; calculate absolute (i.e. screen) coordinates |
192 | mov eax, [current_slot_idx] |
183 | mov eax, [current_slot] |
193 | shl eax, BSF sizeof.WDATA |
184 | mov eax, [eax + APPDATA.window] |
194 | mov ebx, [eax + window_data + WDATA.box.left] |
185 | mov ebx, [eax + WDATA.box.left] |
195 | add ebx, [putimg.image_cx] |
186 | add ebx, [putimg.image_cx] |
196 | mov [putimg.abs_cx], ebx |
187 | mov [putimg.abs_cx], ebx |
197 | mov ebx, [eax +window_data + WDATA.box.top] |
188 | mov ebx, [eax + WDATA.box.top] |
198 | add ebx, [putimg.image_cy] |
189 | add ebx, [putimg.image_cy] |
199 | mov [putimg.abs_cy], ebx |
190 | mov [putimg.abs_cy], ebx |
200 | ; real_sx = MIN(wnd_sx-image_cx, image_sx); |
191 | ; real_sx = MIN(wnd_sx-image_cx, image_sx); |
201 | mov ebx, [eax + window_data + WDATA.box.width] ; ebx = wnd_sx |
192 | mov ebx, [eax + WDATA.box.width] ; ebx = wnd_sx |
202 | inc ebx ; WDATA.box.width is one pixel less than real window x-size |
193 | inc ebx ; WDATA.box.width is one pixel less than real window x-size |
203 | sub ebx, [putimg.image_cx] |
194 | sub ebx, [putimg.image_cx] |
204 | ja @f |
195 | ja @f |
205 | add esp, putimg.stack_data |
196 | add esp, putimg.stack_data |
206 | popad |
197 | popad |
Line 211... | Line 202... | ||
211 | jbe .end_x |
202 | jbe .end_x |
212 | mov ebx, [putimg.image_sx] |
203 | mov ebx, [putimg.image_sx] |
213 | .end_x: |
204 | .end_x: |
214 | mov [putimg.real_sx], ebx |
205 | mov [putimg.real_sx], ebx |
215 | ; init real_sy |
206 | ; init real_sy |
216 | mov ebx, [eax + window_data + WDATA.box.height] ; ebx = wnd_sy |
207 | mov ebx, [eax + WDATA.box.height] ; ebx = wnd_sy |
217 | inc ebx |
208 | inc ebx |
218 | sub ebx, [putimg.image_cy] |
209 | sub ebx, [putimg.image_cy] |
219 | ja @f |
210 | ja @f |
220 | add esp, putimg.stack_data |
211 | add esp, putimg.stack_data |
221 | popad |
212 | popad |
Line 290... | Line 281... | ||
290 | 281 | ||
291 | ; check for hardware cursor |
282 | ; check for hardware cursor |
292 | mov ecx, [_display.select_cursor] |
283 | mov ecx, [_display.select_cursor] |
293 | cmp ecx, select_cursor |
284 | cmp ecx, select_cursor |
294 | je put_image_end_16_new |
- | |
295 | cmp ecx, 0 |
- | |
- | 285 | je put_image_end_16_new |
|
296 | je put_image_end_16_old |
286 | |
297 | .new_line: |
287 | .new_line: |
298 | mov ecx, [putimg.real_sx] |
288 | mov ecx, [putimg.real_sx] |
299 | .new_x: |
289 | .new_x: |
300 | push [putimg.edi] |
290 | push [putimg.edi] |
Line 338... | Line 328... | ||
338 | ret |
328 | ret |
Line 339... | Line 329... | ||
339 | 329 | ||
Line 340... | Line 330... | ||
340 | ;------------------------------------------------------------------------------ |
330 | ;------------------------------------------------------------------------------ |
341 | - | ||
342 | align 4 |
- | |
343 | put_image_end_16_old: |
- | |
344 | - | ||
345 | .new_line: |
- | |
346 | mov ecx, [putimg.real_sx] |
- | |
347 | .new_x: |
- | |
348 | push [putimg.edi] |
- | |
349 | mov eax, [putimg.ebp + 4] |
- | |
350 | call eax |
- | |
351 | cmp [ebp], bl |
- | |
352 | jne .skip |
- | |
353 | - | ||
354 | push ecx |
- | |
355 | neg ecx |
- | |
356 | add ecx, [putimg.real_sx_and_abs_cx + 4] |
- | |
357 | shl ecx, 16 |
- | |
358 | add ecx, [putimg.real_sy_and_abs_cy + 4] |
- | |
359 | sub ecx, edi |
- | |
360 | - | ||
361 | ; check mouse area for putpixel |
- | |
362 | call check_mouse_area_for_putpixel |
- | |
363 | pop ecx |
- | |
364 | - | ||
365 | ; convert to 16 bpp and store to LFB |
- | |
366 | ;; and eax, 00000000111110001111110011111000b |
- | |
367 | ;; shr ah, 2 |
- | |
368 | ;; shr ax, 3 |
- | |
369 | ;; ror eax, 8 |
- | |
370 | ;; add al, ah |
- | |
371 | ;; rol eax, 8 |
- | |
372 | mov [LFB_BASE + edx], ax |
- | |
373 | .skip: |
- | |
374 | inc edx |
- | |
375 | inc edx |
- | |
376 | inc ebp |
- | |
377 | dec ecx |
- | |
378 | jnz .new_x |
- | |
379 | - | ||
380 | add esi, [putimg.line_increment] |
- | |
381 | add edx, [putimg.screen_newline] |
- | |
382 | add ebp, [putimg.winmap_newline] |
- | |
383 | - | ||
384 | cmp [putimg.ebp], putimage_get1bpp |
- | |
385 | jz .correct |
- | |
386 | cmp [putimg.ebp], putimage_get2bpp |
- | |
387 | jz .correct |
- | |
388 | cmp [putimg.ebp], putimage_get4bpp |
- | |
389 | jnz @f |
- | |
390 | .correct: |
- | |
391 | mov eax, [putimg.edi] |
- | |
392 | mov byte [eax], 80h |
- | |
393 | @@: |
- | |
394 | dec edi |
- | |
395 | jnz .new_line |
- | |
396 | jmp put_image_end_16.finish |
- | |
397 | - | ||
398 | ;------------------------------------------------------------------------------ |
- | |
399 | 331 | ||
Line 400... | Line 332... | ||
400 | align 4 |
332 | align 4 |
401 | put_image_end_16_new: |
333 | put_image_end_16_new: |
Line 488... | Line 420... | ||
488 | 420 | ||
489 | ; check for hardware cursor |
421 | ; check for hardware cursor |
490 | mov ecx, [_display.select_cursor] |
422 | mov ecx, [_display.select_cursor] |
491 | cmp ecx, select_cursor |
423 | cmp ecx, select_cursor |
492 | je put_image_end_24_new |
- | |
493 | cmp ecx, 0 |
- | |
- | 424 | je put_image_end_24_new |
|
494 | je put_image_end_24_old |
425 | |
495 | .new_line: |
426 | .new_line: |
496 | mov ecx, [putimg.real_sx] |
427 | mov ecx, [putimg.real_sx] |
497 | .new_x: |
428 | .new_x: |
498 | push [putimg.edi] |
429 | push [putimg.edi] |
Line 534... | Line 465... | ||
534 | ret |
465 | ret |
Line 535... | Line 466... | ||
535 | 466 | ||
Line 536... | Line 467... | ||
536 | ;------------------------------------------------------------------------------ |
467 | ;------------------------------------------------------------------------------ |
537 | - | ||
538 | align 4 |
- | |
539 | put_image_end_24_old: |
- | |
540 | - | ||
541 | .new_line: |
- | |
542 | mov ecx, [putimg.real_sx] |
- | |
543 | ;-------------------------------------- |
- | |
544 | align 4 |
- | |
545 | .new_x: |
- | |
546 | push [putimg.edi] |
- | |
547 | mov eax, [putimg.ebp + 4] |
- | |
548 | call eax |
- | |
549 | cmp [ebp], bl |
- | |
550 | jne .skip |
- | |
551 | - | ||
552 | push ecx |
- | |
553 | neg ecx |
- | |
554 | add ecx, [putimg.real_sx_and_abs_cx + 4] |
- | |
555 | shl ecx, 16 |
- | |
556 | add ecx, [putimg.real_sy_and_abs_cy + 4] |
- | |
557 | sub ecx, edi |
- | |
558 | - | ||
559 | ; check mouse area for putpixel |
- | |
560 | call check_mouse_area_for_putpixel |
- | |
561 | pop ecx |
- | |
562 | ; store to LFB |
- | |
563 | mov [LFB_BASE + edx], ax |
- | |
564 | shr eax, 16 |
- | |
565 | mov [LFB_BASE + edx + 2], al |
- | |
566 | - | ||
567 | .skip: |
- | |
568 | add edx, 3 |
- | |
569 | inc ebp |
- | |
570 | dec ecx |
- | |
571 | jnz .new_x |
- | |
572 | - | ||
573 | add esi, [putimg.line_increment] |
- | |
574 | add edx, [putimg.screen_newline] |
- | |
575 | add ebp, [putimg.winmap_newline] |
- | |
576 | - | ||
577 | cmp [putimg.ebp], putimage_get1bpp |
- | |
578 | jz .correct |
- | |
579 | cmp [putimg.ebp], putimage_get2bpp |
- | |
580 | jz .correct |
- | |
581 | cmp [putimg.ebp], putimage_get4bpp |
- | |
582 | jnz @f |
- | |
583 | - | ||
584 | .correct: |
- | |
585 | mov eax, [putimg.edi] |
- | |
586 | mov byte [eax], 80h |
- | |
587 | - | ||
588 | @@: |
- | |
589 | dec edi |
- | |
590 | jnz .new_line |
- | |
591 | jmp put_image_end_24.finish |
- | |
592 | - | ||
593 | ;------------------------------------------------------------------------------ |
- | |
594 | 468 | ||
Line 595... | Line 469... | ||
595 | align 4 |
469 | align 4 |
596 | put_image_end_24_new: |
470 | put_image_end_24_new: |
Line 680... | Line 554... | ||
680 | 554 | ||
681 | ; check for hardware cursor |
555 | ; check for hardware cursor |
682 | mov ecx, [_display.select_cursor] |
556 | mov ecx, [_display.select_cursor] |
683 | cmp ecx, select_cursor |
557 | cmp ecx, select_cursor |
684 | je put_image_end_32_new |
- | |
685 | cmp ecx, 0 |
- | |
Line 686... | Line 558... | ||
686 | je put_image_end_32_old |
558 | je put_image_end_32_new |
687 | 559 | ||
Line 688... | Line 560... | ||
688 | .new_line: |
560 | .new_line: |
Line 734... | Line 606... | ||
734 | ret |
606 | ret |
Line 735... | Line 607... | ||
735 | 607 | ||
Line 736... | Line 608... | ||
736 | ;------------------------------------------------------------------------------ |
608 | ;------------------------------------------------------------------------------ |
737 | - | ||
738 | align 4 |
- | |
739 | put_image_end_32_old: |
- | |
740 | - | ||
741 | .new_line: |
- | |
742 | mov ecx, [putimg.real_sx] |
- | |
743 | .new_x: |
- | |
744 | push [putimg.edi] |
- | |
745 | mov eax, [putimg.ebp + 4] |
- | |
746 | call eax |
- | |
747 | cmp [ebp], bl |
- | |
748 | jne .skip |
- | |
749 | - | ||
750 | push ecx |
- | |
751 | neg ecx |
- | |
752 | add ecx, [putimg.real_sx_and_abs_cx + 4] |
- | |
753 | shl ecx, 16 |
- | |
754 | add ecx, [putimg.real_sy_and_abs_cy + 4] |
- | |
755 | sub ecx, edi |
- | |
756 | - | ||
757 | ; check mouse area for putpixel |
- | |
758 | call check_mouse_area_for_putpixel |
- | |
759 | pop ecx |
- | |
760 | ; store to LFB |
- | |
761 | mov [LFB_BASE+edx], eax |
- | |
762 | - | ||
763 | .skip: |
- | |
764 | add edx, 4 |
- | |
765 | inc ebp |
- | |
766 | dec ecx |
- | |
767 | jnz .new_x |
- | |
768 | - | ||
769 | add esi, [putimg.line_increment] |
- | |
770 | add edx, [putimg.screen_newline] |
- | |
771 | add ebp, [putimg.winmap_newline] |
- | |
772 | - | ||
773 | cmp [putimg.ebp], putimage_get1bpp |
- | |
774 | jz .correct |
- | |
775 | cmp [putimg.ebp], putimage_get2bpp |
- | |
776 | jz .correct |
- | |
777 | cmp [putimg.ebp], putimage_get4bpp |
- | |
778 | jnz @f |
- | |
779 | - | ||
780 | .correct: |
- | |
781 | mov eax, [putimg.edi] |
- | |
782 | mov byte [eax], 80h |
- | |
783 | - | ||
784 | @@: |
- | |
785 | dec edi |
- | |
786 | jnz .new_line |
- | |
787 | jmp put_image_end_32.finish |
- | |
788 | - | ||
789 | ;------------------------------------------------------------------------------ |
- | |
790 | 609 | ||
Line 791... | Line 610... | ||
791 | align 4 |
610 | align 4 |
792 | put_image_end_32_new: |
611 | put_image_end_32_new: |
Line 875... | Line 694... | ||
875 | align 4 |
694 | align 4 |
876 | __sys_putpixel: |
695 | __sys_putpixel: |
Line 877... | Line 696... | ||
877 | 696 | ||
878 | pushad |
697 | pushad |
879 | cmp eax, [_display.width] |
698 | cmp eax, [_display.width] |
880 | jge .exit |
699 | jae .exit |
881 | cmp ebx, [_display.height] |
700 | cmp ebx, [_display.height] |
882 | jge .exit |
701 | jae .exit |
883 | test edi, 1 ; force ? |
702 | test edi, 1 ; force ? |
Line 884... | Line 703... | ||
884 | jnz .forced |
703 | jnz .forced |
885 | 704 | ||
Line 913... | Line 732... | ||
913 | ;----------------------------------------------------------------------------- |
732 | ;----------------------------------------------------------------------------- |
914 | ; eax = x |
733 | ; eax = x |
915 | ; ebx = y |
734 | ; ebx = y |
Line 916... | Line 735... | ||
916 | 735 | ||
917 | align 4 |
- | |
918 | Vesa20_putpixel16: |
- | |
919 | - | ||
920 | mov ecx, eax |
- | |
921 | shl ecx, 16 |
- | |
922 | mov cx, bx |
- | |
923 | - | ||
924 | ; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier |
- | |
925 | mov ebx, [BPSLine_calc_area + ebx*4] |
- | |
926 | lea edi, [eax*2]; edi = x*2 |
- | |
927 | mov eax, [esp + 32-8+4] |
- | |
928 | - | ||
929 | ; check for hardware cursor |
- | |
930 | cmp [_display.select_cursor], 0 |
- | |
931 | jne @f |
- | |
932 | ; check mouse area for putpixel |
- | |
933 | test eax, 0x04000000 |
- | |
934 | jnz @f |
- | |
935 | call check_mouse_area_for_putpixel |
- | |
936 | @@: |
- | |
937 | ; store to LFB |
- | |
938 | and eax, 00000000111110001111110011111000b |
- | |
939 | shr ah, 2 |
- | |
940 | shr ax, 3 |
- | |
941 | ror eax, 8 |
- | |
942 | add al, ah |
- | |
943 | rol eax, 8 |
- | |
944 | - | ||
945 | mov [LFB_BASE + ebx + edi], ax |
- | |
946 | ret |
- | |
947 | - | ||
948 | ;----------------------------------------------------------------------------- |
- | |
949 | ; eax = x |
- | |
950 | ; ebx = y |
- | |
951 | - | ||
952 | align 4 |
736 | align 4 |
Line 953... | Line 737... | ||
953 | Vesa20_putpixel16_new: |
737 | Vesa20_putpixel16_new: |
954 | 738 | ||
955 | mov ecx, eax |
739 | mov ecx, eax |
Line 998... | Line 782... | ||
998 | ;----------------------------------------------------------------------------- |
782 | ;----------------------------------------------------------------------------- |
999 | ; eax = x |
783 | ; eax = x |
1000 | ; ebx = y |
784 | ; ebx = y |
Line 1001... | Line 785... | ||
1001 | 785 | ||
1002 | align 4 |
- | |
1003 | Vesa20_putpixel24: |
- | |
1004 | - | ||
1005 | mov ecx, eax |
- | |
1006 | shl ecx, 16 |
- | |
1007 | mov cx, bx |
- | |
1008 | - | ||
1009 | ; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier |
- | |
1010 | mov ebx, [BPSLine_calc_area + ebx*4] |
- | |
1011 | lea edi, [eax + eax*2]; edi = x*3 |
- | |
1012 | mov eax, [esp + 32-8+4] |
- | |
1013 | - | ||
1014 | ; check for hardware cursor |
- | |
1015 | cmp [_display.select_cursor], 0 |
- | |
1016 | jne @f |
- | |
1017 | ; check mouse area for putpixel |
- | |
1018 | test eax, 0x04000000 |
- | |
1019 | jnz @f |
- | |
1020 | call check_mouse_area_for_putpixel |
- | |
1021 | @@: |
- | |
1022 | - | ||
1023 | ; store to LFB |
- | |
1024 | mov [LFB_BASE + ebx + edi], ax |
- | |
1025 | shr eax, 16 |
- | |
1026 | mov [LFB_BASE + ebx + edi + 2], al |
- | |
1027 | ret |
- | |
1028 | - | ||
1029 | ;----------------------------------------------------------------------------- |
- | |
1030 | ; eax = x |
- | |
1031 | ; ebx = y |
- | |
1032 | - | ||
1033 | align 4 |
786 | align 4 |
Line 1034... | Line 787... | ||
1034 | Vesa20_putpixel24_new: |
787 | Vesa20_putpixel24_new: |
1035 | 788 | ||
1036 | mov ecx, eax |
789 | mov ecx, eax |
Line 1074... | Line 827... | ||
1074 | ;----------------------------------------------------------------------------- |
827 | ;----------------------------------------------------------------------------- |
1075 | ; eax = x |
828 | ; eax = x |
1076 | ; ebx = y |
829 | ; ebx = y |
Line 1077... | Line 830... | ||
1077 | 830 | ||
1078 | align 4 |
- | |
1079 | Vesa20_putpixel32: |
- | |
1080 | - | ||
1081 | mov ecx, eax |
- | |
1082 | shl ecx, 16 |
- | |
1083 | mov cx, bx |
- | |
1084 | - | ||
1085 | ; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier |
- | |
1086 | mov ebx, [BPSLine_calc_area+ebx*4] |
- | |
1087 | lea edi, [ebx + eax*4] ; edi = x*4+(y*y multiplier) |
- | |
1088 | mov eax, [esp + 32-8+4] ; eax = color |
- | |
1089 | - | ||
1090 | ; check for hardware cursor |
- | |
1091 | cmp [_display.select_cursor], 0 |
- | |
1092 | jne @f |
- | |
1093 | ; check mouse area for putpixel |
- | |
1094 | test eax, 0x04000000 |
- | |
1095 | jnz @f |
- | |
1096 | call check_mouse_area_for_putpixel |
- | |
1097 | @@: |
- | |
1098 | and eax, 0xffffff |
- | |
1099 | ; store to LFB |
- | |
1100 | mov [LFB_BASE + edi], eax |
- | |
1101 | ret |
- | |
1102 | - | ||
1103 | ;----------------------------------------------------------------------------- |
- | |
1104 | ; eax = x |
- | |
1105 | ; ebx = y |
- | |
1106 | - | ||
1107 | align 4 |
831 | align 4 |
Line 1108... | Line 832... | ||
1108 | Vesa20_putpixel32_new: |
832 | Vesa20_putpixel32_new: |
1109 | 833 | ||
1110 | mov ecx, eax |
834 | mov ecx, eax |
Line 1400... | Line 1124... | ||
1400 | jle .exit |
1124 | jle .exit |
1401 | mov [drbar.bar_sy], edx |
1125 | mov [drbar.bar_sy], edx |
1402 | mov [drbar.bar_sx], ecx |
1126 | mov [drbar.bar_sx], ecx |
1403 | mov [drbar.bar_cx], eax |
1127 | mov [drbar.bar_cx], eax |
1404 | mov [drbar.bar_cy], ebx |
1128 | mov [drbar.bar_cy], ebx |
1405 | mov edi, [current_slot_idx] |
1129 | mov edi, [current_slot] |
1406 | shl edi, BSF sizeof.WDATA |
1130 | mov edi, [edi + APPDATA.window] |
1407 | add eax, [edi + window_data + WDATA.box.left] ; win_cx |
1131 | add eax, [edi + WDATA.box.left] ; win_cx |
1408 | add ebx, [edi + window_data + WDATA.box.top] ; win_cy |
1132 | add ebx, [edi + WDATA.box.top] ; win_cy |
1409 | mov [drbar.abs_cx], eax |
1133 | mov [drbar.abs_cx], eax |
1410 | mov [drbar.abs_cy], ebx |
1134 | mov [drbar.abs_cy], ebx |
1411 | ; real_sx = MIN(wnd_sx-bar_cx, bar_sx); |
1135 | ; real_sx = MIN(wnd_sx-bar_cx, bar_sx); |
1412 | mov ebx, [edi + window_data + WDATA.box.width] ; ebx = wnd_sx |
1136 | mov ebx, [edi + WDATA.box.width] ; ebx = wnd_sx |
1413 | inc ebx ; WDATA.box.width is one pixel less than real window x-size |
1137 | inc ebx ; WDATA.box.width is one pixel less than real window x-size |
1414 | sub ebx, [drbar.bar_cx] |
1138 | sub ebx, [drbar.bar_cx] |
1415 | ja @f |
1139 | ja @f |
1416 | .exit: |
1140 | .exit: |
1417 | add esp, drbar.stack_data |
1141 | add esp, drbar.stack_data |
Line 1424... | Line 1148... | ||
1424 | jbe .end_x |
1148 | jbe .end_x |
1425 | mov ebx, [drbar.bar_sx] |
1149 | mov ebx, [drbar.bar_sx] |
1426 | .end_x: |
1150 | .end_x: |
1427 | mov [drbar.real_sx], ebx |
1151 | mov [drbar.real_sx], ebx |
1428 | ; real_sy = MIN(wnd_sy-bar_cy, bar_sy); |
1152 | ; real_sy = MIN(wnd_sy-bar_cy, bar_sy); |
1429 | mov ebx, [edi + window_data + WDATA.box.height] ; ebx = wnd_sy |
1153 | mov ebx, [edi + WDATA.box.height] ; ebx = wnd_sy |
1430 | inc ebx |
1154 | inc ebx |
1431 | sub ebx, [drbar.bar_cy] |
1155 | sub ebx, [drbar.bar_cy] |
1432 | ja @f |
1156 | ja @f |
1433 | add esp, drbar.stack_data |
1157 | add esp, drbar.stack_data |
1434 | popad |
1158 | popad |
Line 1506... | Line 1230... | ||
1506 | 1230 | ||
1507 | ; check for hardware cursor |
1231 | ; check for hardware cursor |
1508 | mov ecx, [_display.select_cursor] |
1232 | mov ecx, [_display.select_cursor] |
1509 | cmp ecx, select_cursor |
1233 | cmp ecx, select_cursor |
1510 | je draw_bar_end_24_new |
- | |
1511 | cmp ecx, 0 |
- | |
- | 1234 | je draw_bar_end_24_new |
|
1512 | je draw_bar_end_24_old |
1235 | |
1513 | .new_y: |
1236 | .new_y: |
1514 | mov edi, [drbar.real_sx] |
1237 | mov edi, [drbar.real_sx] |
1515 | .new_x: |
1238 | .new_x: |
1516 | cmp byte [ebp], bl |
1239 | cmp byte [ebp], bl |
Line 1545... | Line 1268... | ||
1545 | ret |
1268 | ret |
Line 1546... | Line 1269... | ||
1546 | 1269 | ||
Line 1547... | Line 1270... | ||
1547 | ;------------------------------------------------------------------------------ |
1270 | ;------------------------------------------------------------------------------ |
1548 | - | ||
1549 | align 4 |
- | |
1550 | draw_bar_end_24_old: |
- | |
1551 | - | ||
1552 | .new_y: |
- | |
1553 | mov edi, [drbar.real_sx] |
- | |
1554 | .new_x: |
- | |
1555 | cmp byte [ebp], bl |
- | |
1556 | jne .skip |
- | |
1557 | - | ||
1558 | mov ecx, [drbar.real_sx_and_abs_cx] |
- | |
1559 | sub ecx, edi |
- | |
1560 | shl ecx, 16 |
- | |
1561 | add ecx, [drbar.real_sy_and_abs_cy] |
- | |
1562 | sub ecx, esi |
- | |
1563 | ; check mouse area for putpixel |
- | |
1564 | call check_mouse_area_for_putpixel |
- | |
1565 | ; store to LFB |
- | |
1566 | mov [edx], ax |
- | |
1567 | shr eax, 16 |
- | |
1568 | mov [edx + 2], al |
- | |
1569 | mov eax, [drbar.color] |
- | |
1570 | .skip: |
- | |
1571 | ; add pixel |
- | |
1572 | add edx, 3 |
- | |
1573 | inc ebp |
- | |
1574 | dec edi |
- | |
1575 | jnz .new_x |
- | |
1576 | ; add line |
- | |
1577 | add edx, [drbar.line_inc_scr] |
- | |
1578 | add ebp, [drbar.line_inc_map] |
- | |
1579 | ; drawing gradient bars |
- | |
1580 | test bh, 0x80 |
- | |
1581 | jz @f |
- | |
1582 | test al, al |
- | |
1583 | jz @f |
- | |
1584 | dec al |
- | |
1585 | @@: |
- | |
1586 | dec esi |
- | |
1587 | jnz .new_y |
- | |
1588 | jmp draw_bar_end_24.end |
- | |
1589 | - | ||
1590 | ;------------------------------------------------------------------------------ |
- | |
1591 | 1271 | ||
Line 1592... | Line 1272... | ||
1592 | align 4 |
1272 | align 4 |
1593 | draw_bar_end_24_new: |
1273 | draw_bar_end_24_new: |
1594 | 1274 | ||
Line 1667... | Line 1347... | ||
1667 | 1347 | ||
1668 | ; check for hardware cursor |
1348 | ; check for hardware cursor |
1669 | mov ecx, [_display.select_cursor] |
1349 | mov ecx, [_display.select_cursor] |
1670 | cmp ecx, select_cursor |
1350 | cmp ecx, select_cursor |
1671 | je draw_bar_end_32_new |
- | |
1672 | cmp ecx, 0 |
- | |
Line 1673... | Line 1351... | ||
1673 | je draw_bar_end_32_old |
1351 | je draw_bar_end_32_new |
1674 | 1352 | ||
1675 | .new_y: |
1353 | .new_y: |
1676 | mov edi, [drbar.real_sx] |
1354 | mov edi, [drbar.real_sx] |
Line 1711... | Line 1389... | ||
1711 | @@: |
1389 | @@: |
1712 | xor eax, eax |
1390 | xor eax, eax |
1713 | mov [EGA_counter], 1 |
1391 | mov [EGA_counter], 1 |
1714 | ret |
1392 | ret |
Line 1715... | Line -... | ||
1715 | - | ||
1716 | draw_bar_end_32_old: |
- | |
1717 | - | ||
1718 | .new_y: |
- | |
1719 | mov edi, [drbar.real_sx] |
- | |
1720 | .new_x: |
- | |
1721 | cmp byte [ebp], bl |
- | |
1722 | jne .skip |
- | |
1723 | - | ||
1724 | mov ecx, [drbar.real_sx_and_abs_cx] |
- | |
1725 | sub ecx, edi |
- | |
1726 | shl ecx, 16 |
- | |
1727 | add ecx, [drbar.real_sy_and_abs_cy] |
- | |
1728 | sub ecx, esi |
- | |
1729 | - | ||
1730 | ; check mouse area for putpixel |
- | |
1731 | call check_mouse_area_for_putpixel |
- | |
1732 | ; store to LFB |
- | |
1733 | mov [edx], eax |
- | |
1734 | mov eax, [drbar.color] |
- | |
1735 | .skip: |
- | |
1736 | ; add pixel |
- | |
1737 | add edx, 4 |
- | |
1738 | inc ebp |
- | |
1739 | dec edi |
- | |
1740 | jnz .new_x |
- | |
1741 | ; add line |
- | |
1742 | add edx, [drbar.line_inc_scr] |
- | |
1743 | add ebp, [drbar.line_inc_map] |
- | |
1744 | ; drawing gradient bars |
- | |
1745 | test bh, 0x80 |
- | |
1746 | jz @f |
- | |
1747 | test al, al |
- | |
1748 | jz @f |
- | |
1749 | dec al |
- | |
1750 | @@: |
- | |
1751 | dec esi |
- | |
1752 | jnz .new_y |
- | |
1753 | jmp draw_bar_end_32.end |
- | |
1754 | 1393 | ||
Line 1755... | Line 1394... | ||
1755 | ;------------------------------------------------------------------------------ |
1394 | ;------------------------------------------------------------------------------ |
1756 | 1395 | ||
Line 1828... | Line 1467... | ||
1828 | 1467 | ||
1829 | ; check for hardware cursor |
1468 | ; check for hardware cursor |
1830 | mov ecx, [_display.select_cursor] |
1469 | mov ecx, [_display.select_cursor] |
1831 | cmp ecx, select_cursor |
1470 | cmp ecx, select_cursor |
1832 | je draw_bar_end_16_new |
- | |
1833 | cmp ecx, 0 |
- | |
- | 1471 | je draw_bar_end_16_new |
|
1834 | je draw_bar_end_16_old |
1472 | |
1835 | .new_y: |
1473 | .new_y: |
1836 | mov edi, [drbar.real_sx] |
1474 | mov edi, [drbar.real_sx] |
1837 | .new_x: |
1475 | .new_x: |
1838 | cmp byte [ebp], bl |
1476 | cmp byte [ebp], bl |
Line 1877... | Line 1515... | ||
1877 | ret |
1515 | ret |
Line 1878... | Line 1516... | ||
1878 | 1516 | ||
Line 1879... | Line 1517... | ||
1879 | ;------------------------------------------------------------------------------ |
1517 | ;------------------------------------------------------------------------------ |
1880 | - | ||
1881 | align 4 |
- | |
1882 | draw_bar_end_16_old: |
- | |
1883 | - | ||
1884 | .new_y: |
- | |
1885 | mov edi, [drbar.real_sx] |
- | |
1886 | .new_x: |
- | |
1887 | cmp byte [ebp], bl |
- | |
1888 | jne .skip |
- | |
1889 | - | ||
1890 | mov ecx, [drbar.real_sx_and_abs_cx] |
- | |
1891 | sub ecx, edi |
- | |
1892 | shl ecx, 16 |
- | |
1893 | add ecx, [drbar.real_sy_and_abs_cy] |
- | |
1894 | sub ecx, esi |
- | |
1895 | - | ||
1896 | ; check mouse area for putpixel |
- | |
1897 | call check_mouse_area_for_putpixel |
- | |
1898 | ; convert to 16 bpp and store to LFB |
- | |
1899 | and eax, 00000000111110001111110011111000b |
- | |
1900 | shr ah, 2 |
- | |
1901 | shr ax, 3 |
- | |
1902 | ror eax, 8 |
- | |
1903 | add al, ah |
- | |
1904 | rol eax, 8 |
- | |
1905 | mov [edx], ax |
- | |
1906 | mov eax, [drbar.color] |
- | |
1907 | .skip: |
- | |
1908 | - | ||
1909 | ; add pixel |
- | |
1910 | add edx, 2 |
- | |
1911 | inc ebp |
- | |
1912 | dec edi |
- | |
1913 | jnz .new_x |
- | |
1914 | - | ||
1915 | ; add line |
- | |
1916 | add edx, [drbar.line_inc_scr] |
- | |
1917 | add ebp, [drbar.line_inc_map] |
- | |
1918 | - | ||
1919 | ; drawing gradient bars |
- | |
1920 | test bh, 0x80 |
- | |
1921 | jz @f |
- | |
1922 | test al, al |
- | |
1923 | jz @f |
- | |
1924 | dec al |
- | |
1925 | @@: |
- | |
1926 | dec esi |
- | |
1927 | jnz .new_y |
- | |
1928 | jmp draw_bar_end_16.end |
- | |
1929 | - | ||
1930 | ;------------------------------------------------------------------------------ |
- | |
1931 | 1518 | ||
Line 1932... | Line 1519... | ||
1932 | align 4 |
1519 | align 4 |
1933 | draw_bar_end_16_new: |
1520 | draw_bar_end_16_new: |
1934 | 1521 | ||
Line 2075... | Line 1662... | ||
2075 | 1662 | ||
Line 2076... | Line 1663... | ||
2076 | mov eax, [esi] |
1663 | mov eax, [esi] |
2077 | 1664 | ||
2078 | ; check for hardware cursor |
- | |
2079 | cmp [_display.select_cursor], select_cursor |
- | |
2080 | je @f |
1665 | ; check for hardware cursor |
2081 | cmp [_display.select_cursor], 0 |
1666 | cmp [_display.select_cursor], select_cursor |
2082 | jne .no_mouseunder |
1667 | jne .no_mouseunder |
2083 | @@: |
1668 | |
2084 | and eax, 0xffffff |
1669 | and eax, 0xffffff |
2085 | ; check mouse area for putpixel |
1670 | ; check mouse area for putpixel |
Line 2269... | Line 1854... | ||
2269 | 1854 | ||
2270 | .novert: |
1855 | .novert: |
2271 | push ecx |
1856 | push ecx |
2272 | ; check for hardware cursor |
1857 | ; check for hardware cursor |
2273 | cmp [_display.select_cursor], select_cursor |
- | |
2274 | je @f |
- | |
2275 | cmp [_display.select_cursor], 0 |
1858 | cmp [_display.select_cursor], select_cursor |
2276 | jne .no_mouseunder |
1859 | jne .no_mouseunder |
2277 | @@: |
1860 | |
2278 | mov ecx, [esp+20+4] ;x |
1861 | mov ecx, [esp+20+4] ;x |
2279 | shl ecx, 16 |
1862 | shl ecx, 16 |
2280 | add ecx, [esp+24+4] ;y |
1863 | add ecx, [esp+24+4] ;y |
2281 | ; check mouse area for putpixel |
1864 | ; check mouse area for putpixel |