Rev 2477 | Rev 2575 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2477 | Rev 2480 | ||
---|---|---|---|
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: 2477 $ |
20 | $Revision: 2480 $ |
21 | 21 | ||
Line 70... | Line 70... | ||
70 | ;-------------------------------------- |
70 | ;-------------------------------------- |
71 | align 4 |
71 | align 4 |
72 | .no_mouseunder: |
72 | .no_mouseunder: |
73 | ;-------------------------------------- |
73 | ;-------------------------------------- |
74 | ; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier |
74 | ; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier |
75 | mov ebx, [d_width_calc_area + ebx*4] |
75 | mov ebx, [BPSLine_calc_area+ebx*4] |
76 | lea ebx, [ebx + ebx*2] |
- | |
77 | lea edi, [eax+eax*2]; edi = x*3 |
76 | lea edi, [eax+eax*2]; edi = x*3 |
78 | add edi, ebx ; edi = x*3+(y*y multiplier) |
77 | add edi, ebx ; edi = x*3+(y*y multiplier) |
79 | mov ecx, [LFB_BASE+edi] |
78 | mov ecx, [LFB_BASE+edi] |
80 | ;-------------------------------------- |
79 | ;-------------------------------------- |
81 | align 4 |
80 | align 4 |
Line 103... | Line 102... | ||
103 | ;-------------------------------------- |
102 | ;-------------------------------------- |
104 | align 4 |
103 | align 4 |
105 | .no_mouseunder: |
104 | .no_mouseunder: |
106 | ;-------------------------------------- |
105 | ;-------------------------------------- |
107 | ; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier |
106 | ; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier |
108 | mov ebx, [d_width_calc_area + ebx*4] |
107 | mov ebx, [BPSLine_calc_area+ebx*4] |
109 | shl ebx, 2 |
- | |
110 | lea edi, [ebx+eax*4]; edi = x*4+(y*y multiplier) |
108 | lea edi, [ebx+eax*4]; edi = x*4+(y*y multiplier) |
111 | mov ecx, [LFB_BASE+edi] |
109 | mov ecx, [LFB_BASE+edi] |
112 | ;-------------------------------------- |
110 | ;-------------------------------------- |
113 | align 4 |
111 | align 4 |
114 | @@: |
112 | @@: |
Line 241... | Line 239... | ||
241 | ; pointer to image |
239 | ; pointer to image |
242 | mov esi, [putimg.pti] |
240 | mov esi, [putimg.pti] |
243 | ; pointer to screen |
241 | ; pointer to screen |
244 | mov edx, [putimg.abs_cy] |
242 | mov edx, [putimg.abs_cy] |
245 | ; imul edx, [BytesPerScanLine] |
243 | ; imul edx, [BytesPerScanLine] |
246 | - | ||
247 | mov edx, [d_width_calc_area + edx*4] |
244 | mov edx, [BPSLine_calc_area+edx*4] |
248 | cmp bl, 4 |
- | |
249 | je .32 |
- | |
250 | lea edx, [edx+edx*2] |
- | |
251 | jmp @f |
- | |
252 | ;------------------------------------- |
- | |
253 | align 4 |
- | |
254 | .32: |
- | |
255 | shl edx, 2 |
- | |
256 | ;------------------------------------- |
- | |
257 | align 4 |
- | |
258 | @@: |
- | |
259 | mov eax, [putimg.abs_cx] |
245 | mov eax, [putimg.abs_cx] |
260 | ; movzx ebx, byte [ScreenBPP] |
246 | ; movzx ebx, byte [ScreenBPP] |
261 | ; shr ebx, 3 |
247 | ; shr ebx, 3 |
262 | imul eax, ebx |
248 | imul eax, ebx |
263 | add edx, eax |
249 | add edx, eax |
Line 738... | Line 724... | ||
738 | mov ecx, eax |
724 | mov ecx, eax |
739 | shl ecx, 16 |
725 | shl ecx, 16 |
740 | mov cx, bx |
726 | mov cx, bx |
Line 741... | Line 727... | ||
741 | 727 | ||
742 | ; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier |
728 | ; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier |
743 | mov ebx, [d_width_calc_area + ebx*4] |
- | |
744 | lea ebx, [ebx + ebx*2] |
- | |
745 | 729 | mov ebx, [BPSLine_calc_area+ebx*4] |
|
746 | lea edi, [eax+eax*2]; edi = x*3 |
730 | lea edi, [eax+eax*2]; edi = x*3 |
747 | mov eax, [esp+32-8+4] |
731 | mov eax, [esp+32-8+4] |
748 | ;-------------------------------------- |
732 | ;-------------------------------------- |
749 | ; check for hardware cursor |
733 | ; check for hardware cursor |
Line 769... | Line 753... | ||
769 | mov ecx, eax |
753 | mov ecx, eax |
770 | shl ecx, 16 |
754 | shl ecx, 16 |
771 | mov cx, bx |
755 | mov cx, bx |
Line 772... | Line 756... | ||
772 | 756 | ||
773 | ; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier |
757 | ; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier |
774 | mov ebx, [d_width_calc_area + ebx*4] |
- | |
775 | lea ebx, [ebx + ebx*2] |
- | |
776 | 758 | mov ebx, [BPSLine_calc_area+ebx*4] |
|
777 | lea edi, [eax+eax*2]; edi = x*3 |
759 | lea edi, [eax+eax*2]; edi = x*3 |
778 | mov eax, [esp+32-8+4] |
760 | mov eax, [esp+32-8+4] |
779 | ;-------------------------------------- |
761 | ;-------------------------------------- |
780 | ; check for hardware cursor |
762 | ; check for hardware cursor |
Line 817... | Line 799... | ||
817 | mov ecx, eax |
799 | mov ecx, eax |
818 | shl ecx, 16 |
800 | shl ecx, 16 |
819 | mov cx, bx |
801 | mov cx, bx |
Line 820... | Line 802... | ||
820 | 802 | ||
821 | ; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier |
803 | ; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier |
822 | mov ebx, [d_width_calc_area + ebx*4] |
- | |
823 | shl ebx, 2 |
- | |
824 | 804 | mov ebx, [BPSLine_calc_area+ebx*4] |
|
825 | lea edi, [ebx+eax*4]; edi = x*4+(y*y multiplier) |
805 | lea edi, [ebx+eax*4]; edi = x*4+(y*y multiplier) |
826 | mov eax, [esp+32-8+4]; eax = color |
806 | mov eax, [esp+32-8+4]; eax = color |
827 | ;-------------------------------------- |
807 | ;-------------------------------------- |
828 | ; check for hardware cursor |
808 | ; check for hardware cursor |
Line 847... | Line 827... | ||
847 | mov ecx, eax |
827 | mov ecx, eax |
848 | shl ecx, 16 |
828 | shl ecx, 16 |
849 | mov cx, bx |
829 | mov cx, bx |
Line 850... | Line 830... | ||
850 | 830 | ||
851 | ; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier |
831 | ; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier |
852 | mov ebx, [d_width_calc_area + ebx*4] |
- | |
853 | shl ebx, 2 |
- | |
854 | 832 | mov ebx, [BPSLine_calc_area+ebx*4] |
|
855 | lea edi, [ebx+eax*4]; edi = x*4+(y*y multiplier) |
833 | lea edi, [ebx+eax*4]; edi = x*4+(y*y multiplier) |
856 | mov eax, [esp+32-8+4]; eax = color |
834 | mov eax, [esp+32-8+4]; eax = color |
857 | ;-------------------------------------- |
835 | ;-------------------------------------- |
858 | ; check for hardware cursor |
836 | ; check for hardware cursor |
Line 1236... | Line 1214... | ||
1236 | add eax, [BytesPerScanLine] |
1214 | add eax, [BytesPerScanLine] |
1237 | mov [drbar.line_inc_scr], eax |
1215 | mov [drbar.line_inc_scr], eax |
1238 | ; pointer to screen |
1216 | ; pointer to screen |
1239 | mov edx, [drbar.abs_cy] |
1217 | mov edx, [drbar.abs_cy] |
1240 | ; imul edx, [BytesPerScanLine] |
1218 | ; imul edx, [BytesPerScanLine] |
1241 | - | ||
1242 | mov edx, [d_width_calc_area + edx*4] |
1219 | mov edx, [BPSLine_calc_area+edx*4] |
1243 | cmp bl, 4 |
- | |
1244 | je .32 |
- | |
1245 | lea edx, [edx+edx*2] |
- | |
1246 | jmp @f |
- | |
1247 | ;------------------------------------- |
- | |
1248 | align 4 |
- | |
1249 | .32: |
- | |
1250 | shl edx, 2 |
- | |
1251 | ;------------------------------------- |
- | |
1252 | align 4 |
- | |
1253 | @@: |
- | |
1254 | mov eax, [drbar.abs_cx] |
1220 | mov eax, [drbar.abs_cx] |
1255 | imul eax, ebx |
1221 | imul eax, ebx |
1256 | add edx, eax |
1222 | add edx, eax |
1257 | ; pointer to pixel map |
1223 | ; pointer to pixel map |
1258 | mov eax, [drbar.abs_cy] |
1224 | mov eax, [drbar.abs_cy] |
Line 1654... | Line 1620... | ||
1654 | mov ebp, [draw_data+32+RECT.left] ; x start |
1620 | mov ebp, [draw_data+32+RECT.left] ; x start |
1655 | ; 1) Calculate pointers in WinMapAddress (does pixel belong to OS thread?) [ebp] |
1621 | ; 1) Calculate pointers in WinMapAddress (does pixel belong to OS thread?) [ebp] |
1656 | ; and LFB data (output for our function) [edi] |
1622 | ; and LFB data (output for our function) [edi] |
1657 | ; mov eax, [BytesPerScanLine] |
1623 | ; mov eax, [BytesPerScanLine] |
1658 | ; mul ebx |
1624 | ; mul ebx |
1659 | mov eax, [d_width_calc_area + ebx*4] |
1625 | mov eax, [BPSLine_calc_area+ebx*4] |
1660 | cmp [ScreenBPP], byte 32 |
- | |
1661 | je .32 |
- | |
1662 | lea eax, [eax+eax*2] |
- | |
1663 | jmp @f |
- | |
1664 | ;------------------------------------- |
- | |
1665 | align 4 |
- | |
1666 | .32: |
- | |
1667 | shl eax, 2 |
- | |
1668 | ;------------------------------------- |
- | |
1669 | align 4 |
- | |
1670 | @@: |
- | |
1671 | xchg ebp, eax |
1626 | xchg ebp, eax |
1672 | add ebp, eax |
1627 | add ebp, eax |
1673 | add ebp, eax |
1628 | add ebp, eax |
1674 | add ebp, eax |
1629 | add ebp, eax |
1675 | cmp [ScreenBPP], byte 24 ; 24 or 32 bpp ? - x size |
1630 | cmp [ScreenBPP], byte 24 ; 24 or 32 bpp ? - x size |
Line 1811... | Line 1766... | ||
1811 | mov ebp, [draw_data+32+RECT.left] ; x start |
1766 | mov ebp, [draw_data+32+RECT.left] ; x start |
1812 | ; 1) Calculate pointers in WinMapAddress (does pixel belong to OS thread?) [ebp] |
1767 | ; 1) Calculate pointers in WinMapAddress (does pixel belong to OS thread?) [ebp] |
1813 | ; and LFB data (output for our function) [edi] |
1768 | ; and LFB data (output for our function) [edi] |
1814 | ; mov eax, [BytesPerScanLine] |
1769 | ; mov eax, [BytesPerScanLine] |
1815 | ; mul ebx |
1770 | ; mul ebx |
1816 | mov eax, [d_width_calc_area + ebx*4] |
1771 | mov eax, [BPSLine_calc_area+ebx*4] |
1817 | cmp [ScreenBPP], byte 32 |
- | |
1818 | je .32 |
- | |
1819 | lea eax, [eax+eax*2] |
- | |
1820 | jmp @f |
- | |
1821 | ;------------------------------------- |
- | |
1822 | align 4 |
- | |
1823 | .32: |
- | |
1824 | shl eax, 2 |
- | |
1825 | ;------------------------------------- |
- | |
1826 | align 4 |
- | |
1827 | @@: |
- | |
1828 | - | ||
1829 | xchg ebp, eax |
1772 | xchg ebp, eax |
1830 | add ebp, eax |
1773 | add ebp, eax |
1831 | add ebp, eax |
1774 | add ebp, eax |
1832 | add ebp, eax |
1775 | add ebp, eax |
1833 | cmp [ScreenBPP], byte 24 ; 24 or 32 bpp ? - x size |
1776 | cmp [ScreenBPP], byte 24 ; 24 or 32 bpp ? - x size |