Rev 5717 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5717 | Rev 5722 | ||
---|---|---|---|
Line 10... | Line 10... | ||
10 | ;; GNU GENERAL PUBLIC LICENSE ;; |
10 | ;; GNU GENERAL PUBLIC LICENSE ;; |
11 | ;; Version 2, June 1991 ;; |
11 | ;; Version 2, June 1991 ;; |
12 | ;; ;; |
12 | ;; ;; |
13 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
13 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 14... | Line 14... | ||
14 | 14 | ||
Line 15... | Line 15... | ||
15 | pixel_to_24bpp: ; returns in ecx |
15 | load_pixel_rre: ; returns in ecx |
16 | 16 | ||
17 | push eax |
17 | push eax |
18 | ; @@: |
18 | @@: |
19 | ; lea eax, [esi+BYTES_PER_PIXEL] |
19 | lea eax, [esi+BYTES_PER_PIXEL] |
20 | ; cmp [datapointer], eax |
20 | cmp [datapointer], eax |
21 | ; jae @f |
21 | jae @f |
22 | ; call read_data.more |
22 | call read_data.more |
Line 23... | Line 23... | ||
23 | ; jmp @b |
23 | jmp @b |
Line 24... | Line 24... | ||
24 | ; @@: |
24 | @@: |
Line 63... | Line 63... | ||
63 | 63 | ||
64 | mov cl, al |
64 | mov cl, al |
65 | shl cl, 3 |
65 | shl cl, 3 |
Line 66... | Line 66... | ||
66 | and cx, 0x00f8 ; blue |
66 | and cx, 0x00f8 ; blue |
Line 67... | Line -... | ||
67 | - | ||
68 | else |
67 | |
69 | 68 | else if BITS_PER_PIXEL = 24 |
|
70 | xor ecx, ecx |
- | |
71 | mov cx, [esi] |
69 | |
Line -... | Line 70... | ||
- | 70 | mov ecx, [esi] |
|
- | 71 | and ecx, 0x00ffffff |
|
- | 72 | add esi, 3 |
|
- | 73 | ||
- | 74 | else if BITS_PER_PIXEL = 32 |
|
- | 75 | ||
72 | shl ecx, 8 |
76 | mov ecx, [esi] |
73 | mov cl, [esi+2] |
77 | and ecx, 0x00ffffff |
Line 74... | Line 78... | ||
74 | add esi, 3 |
78 | add esi, 4 |
Line 95... | Line 99... | ||
95 | mov [subrectangles], eax |
99 | mov [subrectangles], eax |
Line 96... | Line 100... | ||
96 | 100 | ||
Line 97... | Line 101... | ||
97 | DEBUGF 1, "%u subrectangles\n", eax |
101 | DEBUGF 1, "%u subrectangles\n", eax |
98 | 102 | ||
Line 99... | Line 103... | ||
99 | ; Get background color |
103 | ; Get background color |
100 | call pixel_to_24bpp |
104 | call load_pixel_rre |
101 | 105 | ||
102 | ; Calculate first pixel pos |
106 | ; Calculate first pixel pos |
103 | movzx eax, [screen.width] |
107 | movzx eax, [screen.width] |
Line 104... | Line 108... | ||
104 | mul [rectangle.y] ; [screen.width]*[rectangle.y] |
108 | mul [rectangle.y] ; [screen.width]*[rectangle.y] |
105 | add eax, [rectangle.x] ; [screen.width]*[rectangle.y]+[rectangle.x] |
109 | add eax, [rectangle.x] ; [screen.width]*[rectangle.y]+[rectangle.x] |
106 | lea edi, [framebuffer_data+eax*3] ; edi = framebuffer_data+([screen.width]*[rectangle.y]+[rectangle.x])*3 |
110 | lea edi, [framebuffer+eax*3] ; edi = framebuffer_data+([screen.width]*[rectangle.y]+[rectangle.x])*3 |
107 | 111 | ||
Line 140... | Line 144... | ||
140 | call read_data.more |
144 | call read_data.more |
141 | jmp @b |
145 | jmp @b |
142 | @@: |
146 | @@: |
Line 143... | Line 147... | ||
143 | 147 | ||
144 | ; Get subrectangle color |
148 | ; Get subrectangle color |
Line 145... | Line 149... | ||
145 | call pixel_to_24bpp |
149 | call load_pixel_rre |
146 | 150 | ||
147 | ; Get coordinates |
151 | ; Get coordinates |
148 | xor eax, eax |
152 | xor eax, eax |