Rev 9926 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2455 | mario79 | 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
||
9715 | Doczom | 3 | ;; Copyright (C) KolibriOS team 2011-2022. All rights reserved. ;; |
2455 | mario79 | 4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
||
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
1894 | serge | 7 | |
4850 | mario79 | 8 | $Revision: 9941 $ |
9 | |||
10 | |||
2384 | hidnplayr | 11 | struct BLITTER_BLOCK |
12 | xmin dd ? |
||
13 | ymin dd ? |
||
14 | xmax dd ? |
||
15 | ymax dd ? |
||
16 | ends |
||
1894 | serge | 17 | |
18 | |||
2384 | hidnplayr | 19 | struct BLITTER |
2988 | Serge | 20 | dc RECT |
21 | sc RECT |
||
2384 | hidnplayr | 22 | dst_x dd ? ; 32 |
23 | dst_y dd ? ; 36 |
||
24 | src_x dd ? ; 40 |
||
25 | src_y dd ? ; 44 |
||
26 | w dd ? ; 48 |
||
27 | h dd ? ; 52 |
||
1894 | serge | 28 | |
2384 | hidnplayr | 29 | bitmap dd ? ; 56 |
30 | stride dd ? ; 60 |
||
31 | ends |
||
1894 | serge | 32 | |
33 | |||
2988 | Serge | 34 | |
1894 | serge | 35 | align 4 |
2988 | Serge | 36 | block_clip: |
37 | ;esi= clip RECT ptr |
||
38 | ;edi= RECT ptr |
||
39 | ;return code: |
||
5349 | serge | 40 | ;CF= 0 - draw, 1 - don't draw |
1894 | serge | 41 | |
2288 | clevermous | 42 | push ebx |
1894 | serge | 43 | |
9715 | Doczom | 44 | mov eax, [edi + RECT.left] |
45 | mov ebx, [edi + RECT.right] |
||
46 | mov ecx, [esi + RECT.left] ;clip.left |
||
47 | mov edx, [esi + RECT.right] ;clip.right |
||
1894 | serge | 48 | |
2988 | Serge | 49 | cmp eax, edx ;left >= clip.right |
50 | jge .fail |
||
1894 | serge | 51 | |
2988 | Serge | 52 | cmp ebx, ecx ;right < clip.left |
53 | jl .fail |
||
1894 | serge | 54 | |
2988 | Serge | 55 | cmp eax, ecx ;left >= clip.left |
5349 | serge | 56 | jge @F |
1894 | serge | 57 | |
9715 | Doczom | 58 | mov [edi + RECT.left], ecx |
2988 | Serge | 59 | @@: |
60 | cmp ebx, edx ;right <= clip.right |
||
61 | jle @f |
||
5349 | serge | 62 | |
9715 | Doczom | 63 | mov [edi + RECT.right], edx |
2988 | Serge | 64 | @@: |
9715 | Doczom | 65 | mov eax, [edi + RECT.top] |
66 | mov ebx, [edi + RECT.bottom] |
||
67 | mov ecx, [esi + RECT.top] ;clip.top |
||
68 | mov edx, [esi + RECT.bottom] ;clip.bottom |
||
2988 | Serge | 69 | |
70 | cmp eax, edx ;top >= clip.bottom |
||
71 | jge .fail |
||
72 | |||
73 | cmp ebx, ecx ;bottom < clip.top |
||
74 | jl .fail |
||
75 | |||
76 | cmp eax, ecx ;top >= clip.top |
||
5349 | serge | 77 | jge @F |
2988 | Serge | 78 | |
9715 | Doczom | 79 | mov [edi + RECT.top], ecx |
2988 | Serge | 80 | @@: |
81 | cmp ebx, edx ;bottom <= clip.bottom |
||
82 | jle @f |
||
5349 | serge | 83 | |
9715 | Doczom | 84 | mov [edi + RECT.bottom], edx |
2988 | Serge | 85 | @@: |
2288 | clevermous | 86 | pop ebx |
5349 | serge | 87 | clc |
1894 | serge | 88 | ret |
2988 | Serge | 89 | .fail: |
90 | pop ebx |
||
5349 | serge | 91 | stc |
2988 | Serge | 92 | ret |
1894 | serge | 93 | |
2988 | Serge | 94 | |
1894 | serge | 95 | align 4 |
96 | blit_clip: |
||
97 | |||
5349 | serge | 98 | ;return code: |
99 | ;CF= 0 - draw, 1 - don't draw |
||
100 | |||
7136 | dunkaist | 101 | .sx0 = 8 |
102 | .sy0 = 12 |
||
103 | .sx1 = 16 |
||
104 | .sy1 = 20 |
||
1894 | serge | 105 | |
7136 | dunkaist | 106 | .dx0 = 24 |
107 | .dy0 = 28 |
||
108 | .dx1 = 32 |
||
109 | .dy1 = 36 |
||
1894 | serge | 110 | |
111 | |||
2288 | clevermous | 112 | push edi |
113 | push esi |
||
114 | push ebx |
||
115 | sub esp, 40 |
||
1894 | serge | 116 | |
2288 | clevermous | 117 | mov ebx, ecx |
9715 | Doczom | 118 | mov edx, [ecx + BLITTER.src_x] |
2288 | clevermous | 119 | mov [esp+.sx0], edx |
9715 | Doczom | 120 | mov eax, [ecx + BLITTER.src_y] |
2288 | clevermous | 121 | mov [esp+.sy0], eax |
9715 | Doczom | 122 | add edx, [ecx + BLITTER.w] |
123 | add eax, [ecx + BLITTER.h] |
||
124 | mov [esp + .sx1], edx |
||
125 | mov [esp + .sy1], eax |
||
1894 | serge | 126 | |
9715 | Doczom | 127 | lea edi, [esp + .sx0] |
128 | lea esi, [ebx + BLITTER.sc] |
||
1894 | serge | 129 | |
2288 | clevermous | 130 | call block_clip |
5349 | serge | 131 | jc .done |
1894 | serge | 132 | |
9715 | Doczom | 133 | mov edi, [esp + .sx0] |
134 | mov edx, [ebx + BLITTER.dst_x] |
||
2288 | clevermous | 135 | add edx, edi |
9715 | Doczom | 136 | sub edx, [ebx + BLITTER.src_x] |
137 | mov [esp + .dx0], edx |
||
1894 | serge | 138 | |
2288 | clevermous | 139 | mov ecx, [esp+.sy0] |
9715 | Doczom | 140 | mov eax, [ebx + BLITTER.dst_y] |
2288 | clevermous | 141 | add eax, ecx |
9715 | Doczom | 142 | sub eax, [ebx + BLITTER.src_y] |
143 | mov [esp + .dy0], eax |
||
2988 | Serge | 144 | |
2288 | clevermous | 145 | sub edx, edi |
9715 | Doczom | 146 | add edx, [esp + .sx1] |
147 | mov [esp + .dx1], edx |
||
1894 | serge | 148 | |
2288 | clevermous | 149 | sub eax, ecx |
9715 | Doczom | 150 | add eax, [esp + .sy1] |
151 | mov [esp + .dy1], eax |
||
1894 | serge | 152 | |
9715 | Doczom | 153 | lea edi, [esp + .dx0] |
154 | lea esi, [ebx + BLITTER.dc] |
||
2288 | clevermous | 155 | call block_clip |
5349 | serge | 156 | jc .done |
1894 | serge | 157 | |
9715 | Doczom | 158 | mov edx, [esp + .dx0] |
159 | mov eax, [esp + .dx1] |
||
2288 | clevermous | 160 | sub eax, edx |
9715 | Doczom | 161 | mov [ebx + BLITTER.w], eax |
1894 | serge | 162 | |
9715 | Doczom | 163 | mov eax, [esp + .dy0] |
164 | mov ecx, [esp + .dy1] |
||
2288 | clevermous | 165 | sub ecx, eax |
9715 | Doczom | 166 | mov [ebx + BLITTER.h], ecx |
1894 | serge | 167 | |
9715 | Doczom | 168 | mov ecx, [ebx + BLITTER.src_x] |
2288 | clevermous | 169 | add ecx, edx |
9715 | Doczom | 170 | sub ecx, [ebx + BLITTER.dst_x] |
171 | mov [ebx + BLITTER.src_x], ecx |
||
1894 | serge | 172 | |
9715 | Doczom | 173 | mov ecx, [ebx + BLITTER.src_y] |
2288 | clevermous | 174 | add ecx, eax |
9715 | Doczom | 175 | sub ecx, [ebx + BLITTER.dst_y] |
176 | mov [ebx + BLITTER.src_y], ecx |
||
177 | mov [ebx + BLITTER.dst_x], edx |
||
178 | mov [ebx + BLITTER.dst_y], eax |
||
5349 | serge | 179 | clc |
2988 | Serge | 180 | .done: |
2288 | clevermous | 181 | add esp, 40 |
182 | pop ebx |
||
183 | pop esi |
||
184 | pop edi |
||
1894 | serge | 185 | |
186 | |||
187 | purge .sx0 |
||
188 | purge .sy0 |
||
189 | purge .sx1 |
||
190 | purge .sy1 |
||
191 | |||
192 | purge .dx0 |
||
193 | purge .dy0 |
||
194 | purge .dx1 |
||
195 | purge .dy1 |
||
196 | |||
197 | ret |
||
198 | |||
199 | align 4 |
||
200 | blit_32: |
||
2288 | clevermous | 201 | push ebp |
202 | push edi |
||
203 | push esi |
||
204 | push ebx |
||
4444 | clevermous | 205 | virtual at sizeof.BLITTER |
206 | .position dd ? ; (x shl 16) + y |
||
207 | ; ??? |
||
208 | .extra_var1 dd ? |
||
6790 | 0CodErr | 209 | .flags dd ? |
4444 | clevermous | 210 | .local_vars_size = $ |
211 | end virtual |
||
212 | sub esp, .local_vars_size |
||
6790 | 0CodErr | 213 | |
9715 | Doczom | 214 | mov [esp + .flags], ebx |
9679 | Doczom | 215 | |
9941 | Doczom | 216 | mov eax, [current_slot] |
217 | mov eax, [eax + APPDATA.window] |
||
218 | mov ebx, [eax + WDATA.box.width] |
||
219 | mov edx, [eax + WDATA.box.height] |
||
2988 | Serge | 220 | inc ebx |
221 | inc edx |
||
1894 | serge | 222 | |
2288 | clevermous | 223 | xor eax, eax |
1894 | serge | 224 | |
9715 | Doczom | 225 | mov [esp + BLITTER.dc.left], eax |
226 | mov [esp + BLITTER.dc.top], eax |
||
227 | mov [esp + BLITTER.dc.right], ebx |
||
228 | mov [esp + BLITTER.dc.bottom], edx |
||
1894 | serge | 229 | |
9715 | Doczom | 230 | mov [esp + BLITTER.sc.left], eax |
231 | mov [esp + BLITTER.sc.top], eax |
||
2288 | clevermous | 232 | mov eax, [ecx+24] |
2988 | Serge | 233 | |
9715 | Doczom | 234 | mov [esp + BLITTER.sc.right], eax |
2288 | clevermous | 235 | mov eax, [ecx+28] |
1894 | serge | 236 | |
9715 | Doczom | 237 | mov [esp + BLITTER.sc.bottom], eax |
2988 | Serge | 238 | |
2288 | clevermous | 239 | mov eax, [ecx] |
9715 | Doczom | 240 | mov [esp + BLITTER.dst_x], eax |
2288 | clevermous | 241 | mov eax, [ecx+4] |
9715 | Doczom | 242 | mov [esp + BLITTER.dst_y], eax |
1894 | serge | 243 | |
2288 | clevermous | 244 | mov eax, [ecx+16] |
9715 | Doczom | 245 | mov [esp + BLITTER.src_x], eax |
2288 | clevermous | 246 | mov eax, [ecx+20] |
9715 | Doczom | 247 | mov [esp + BLITTER.src_y], eax |
2288 | clevermous | 248 | mov eax, [ecx+8] |
9715 | Doczom | 249 | mov [esp + BLITTER.w], eax |
2288 | clevermous | 250 | mov eax, [ecx+12] |
9715 | Doczom | 251 | mov [esp + BLITTER.h], eax |
1894 | serge | 252 | |
253 | |||
2288 | clevermous | 254 | mov eax, [ecx+32] |
9715 | Doczom | 255 | mov [esp + BLITTER.bitmap], eax |
2288 | clevermous | 256 | mov eax, [ecx+36] |
9715 | Doczom | 257 | mov [esp + BLITTER.stride], eax |
1894 | serge | 258 | |
2288 | clevermous | 259 | mov ecx, esp |
260 | call blit_clip |
||
5349 | serge | 261 | jc .L57 |
1894 | serge | 262 | |
9941 | Doczom | 263 | mov eax, [current_slot] |
264 | mov eax, [eax + APPDATA.window] |
||
1894 | serge | 265 | |
9715 | Doczom | 266 | mov ebx, [esp + BLITTER.dst_x] |
267 | mov ebp, [esp + BLITTER.dst_y] |
||
9941 | Doczom | 268 | add ebx, [eax + WDATA.box.left] |
269 | add ebp, [eax + WDATA.box.top] |
||
6790 | 0CodErr | 270 | |
9715 | Doczom | 271 | test [esp + .flags], BLIT_CLIENT_RELATIVE |
6790 | 0CodErr | 272 | jz .no_client_relative |
2430 | mario79 | 273 | |
9941 | Doczom | 274 | add ebx, [eax + WDATA.clientbox.left] |
275 | add ebp, [eax + WDATA.clientbox.top] |
||
6790 | 0CodErr | 276 | .no_client_relative: |
277 | |||
2430 | mario79 | 278 | mov ecx, ebx |
9715 | Doczom | 279 | add ecx, [esp + BLITTER.w] |
2430 | mario79 | 280 | shl ecx, 16 |
281 | mov cx, bp |
||
9715 | Doczom | 282 | add ecx, [esp + BLITTER.h] |
2430 | mario79 | 283 | |
4444 | clevermous | 284 | mov eax, ebx |
285 | shl eax, 16 |
||
286 | mov ax, bp |
||
9715 | Doczom | 287 | mov [esp + .position], eax |
4444 | clevermous | 288 | |
2288 | clevermous | 289 | mov edi, ebp |
1894 | serge | 290 | |
2480 | mario79 | 291 | ; imul edi, [_display.pitch] |
292 | mov edi, [BPSLine_calc_area+edi*4] |
||
2446 | mario79 | 293 | ; imul ebp, [_display.width] |
2480 | mario79 | 294 | mov ebp, [d_width_calc_area+ebp*4] |
2446 | mario79 | 295 | |
2288 | clevermous | 296 | add ebp, ebx |
5351 | serge | 297 | add ebp, [_display.win_map] |
1894 | serge | 298 | |
9715 | Doczom | 299 | mov eax, [esp + BLITTER.src_y] |
300 | imul eax, [esp + BLITTER.stride] |
||
301 | mov esi, [esp + BLITTER.src_x] |
||
302 | lea esi, [eax + esi*4] |
||
303 | add esi, [esp + BLITTER.bitmap] |
||
1894 | serge | 304 | |
2430 | mario79 | 305 | mov eax, ecx |
9715 | Doczom | 306 | mov ecx, [esp + BLITTER.h] |
307 | mov edx, [esp + BLITTER.w] |
||
1894 | serge | 308 | |
2288 | clevermous | 309 | test ecx, ecx ;FIXME check clipping |
310 | jz .L57 |
||
1894 | serge | 311 | |
2288 | clevermous | 312 | test edx, edx |
313 | jz .L57 |
||
1894 | serge | 314 | |
5154 | hidnplayr | 315 | cmp [_display.bits_per_pixel], 32 |
2288 | clevermous | 316 | jne .core_24 |
1894 | serge | 317 | |
9715 | Doczom | 318 | lea edi, [edi + ebx*4] |
1894 | serge | 319 | |
8869 | rgimad | 320 | mov ebx, [current_slot_idx] |
4444 | clevermous | 321 | ; check for hardware cursor |
322 | cmp [_display.select_cursor], select_cursor |
||
323 | jne .core_32.hardware_cursor |
||
324 | ;-------------------------------------- |
||
325 | .core_32.software_cursor: |
||
1894 | serge | 326 | align 4 |
327 | .outer32: |
||
328 | |||
329 | align 4 |
||
330 | .inner32: |
||
4444 | clevermous | 331 | cmp [ebp], bl |
2449 | mario79 | 332 | jne .skip |
2430 | mario79 | 333 | ;-------------------------------------- |
4444 | clevermous | 334 | mov eax, [esi] |
1894 | serge | 335 | |
9715 | Doczom | 336 | mov ecx, [esp + .position] |
2430 | mario79 | 337 | |
338 | ; check mouse area for putpixel |
||
339 | call [_display.check_mouse] |
||
2448 | mario79 | 340 | ;-------------------------------------- |
2430 | mario79 | 341 | ; store to real LFB |
9715 | Doczom | 342 | mov [LFB_BASE + edi], eax |
2430 | mario79 | 343 | ;-------------------------------------- |
344 | align 4 |
||
2449 | mario79 | 345 | .skip: |
4444 | clevermous | 346 | add esi, 4 |
347 | add edi, 4 |
||
348 | inc ebp |
||
9715 | Doczom | 349 | add [esp + .position], 1 shl 16 |
2288 | clevermous | 350 | dec edx |
351 | jnz .inner32 |
||
1894 | serge | 352 | |
9715 | Doczom | 353 | add esi, [esp + BLITTER.stride] |
5351 | serge | 354 | add edi, [_display.lfb_pitch] |
2288 | clevermous | 355 | add ebp, [_display.width] |
1894 | serge | 356 | |
9715 | Doczom | 357 | mov edx, [esp + BLITTER.w] |
4444 | clevermous | 358 | mov eax, edx |
359 | inc [esp+.position] |
||
360 | sub ebp, edx |
||
361 | shl eax, 2 |
||
362 | sub esi, eax |
||
363 | sub edi, eax |
||
364 | shl eax, 16-2 |
||
9715 | Doczom | 365 | sub [esp + .position], eax |
366 | dec [esp + BLITTER.h] |
||
2288 | clevermous | 367 | jnz .outer32 |
4444 | clevermous | 368 | jmp .done |
369 | .core_32.hardware_cursor: |
||
370 | align 4 |
||
371 | .hw.outer32: |
||
372 | xor ecx, ecx |
||
1894 | serge | 373 | |
4444 | clevermous | 374 | align 4 |
375 | .hw.inner32: |
||
9715 | Doczom | 376 | cmp [ebp + ecx], bl |
4444 | clevermous | 377 | jne .hw.skip |
9715 | Doczom | 378 | mov eax, [esi + ecx*4] |
379 | mov [LFB_BASE + edi + ecx*4], eax |
||
4444 | clevermous | 380 | |
381 | align 4 |
||
382 | .hw.skip: |
||
383 | inc ecx |
||
384 | dec edx |
||
385 | jnz .hw.inner32 |
||
386 | |||
9715 | Doczom | 387 | add esi, [esp + BLITTER.stride] |
5351 | serge | 388 | add edi, [_display.lfb_pitch] |
4444 | clevermous | 389 | add ebp, [_display.width] |
390 | |||
9715 | Doczom | 391 | mov edx, [esp + BLITTER.w] |
392 | dec [esp + BLITTER.h] |
||
4444 | clevermous | 393 | jnz .hw.outer32 |
394 | |||
1894 | serge | 395 | .done: |
2453 | mario79 | 396 | ; call [draw_pointer] |
2988 | Serge | 397 | ; call __sys_draw_pointer |
1894 | serge | 398 | .L57: |
4444 | clevermous | 399 | add esp, .local_vars_size |
2288 | clevermous | 400 | pop ebx |
401 | pop esi |
||
402 | pop edi |
||
403 | pop ebp |
||
1894 | serge | 404 | ret |
405 | |||
406 | .core_24: |
||
5161 | hidnplayr | 407 | cmp [_display.bits_per_pixel], 24 |
408 | jne .core_16 |
||
409 | |||
9715 | Doczom | 410 | lea ebx, [ebx + ebx*2] |
411 | lea edi, [LFB_BASE + edi + ebx] |
||
8869 | rgimad | 412 | mov ebx, [current_slot_idx] |
1894 | serge | 413 | |
414 | align 4 |
||
415 | .outer24: |
||
9715 | Doczom | 416 | mov [esp + .extra_var1], edi |
2288 | clevermous | 417 | xor ecx, ecx |
1894 | serge | 418 | |
419 | align 4 |
||
420 | .inner24: |
||
9715 | Doczom | 421 | cmp [ebp + ecx], bl ; Does the process own this pixel? |
2449 | mario79 | 422 | jne .skip_1 |
2430 | mario79 | 423 | ;-------------------------------------- |
424 | push eax |
||
9715 | Doczom | 425 | mov eax, [esi + ecx*4] |
1894 | serge | 426 | |
9715 | Doczom | 427 | lea edi, [edi + ecx*2] |
2430 | mario79 | 428 | |
2448 | mario79 | 429 | ; check for hardware cursor |
2451 | mario79 | 430 | cmp [_display.select_cursor], select_cursor |
2448 | mario79 | 431 | jne .no_mouseunder_1 |
432 | ;-------------------------------------- |
||
433 | align 4 |
||
2430 | mario79 | 434 | push ecx |
435 | |||
436 | mov ecx, [esp+4] |
||
437 | ror ecx, 16 |
||
438 | sub ecx, edx |
||
439 | rol ecx, 16 |
||
9715 | Doczom | 440 | sub ecx, [esp + BLITTER.h + 8] |
2430 | mario79 | 441 | |
442 | ; check mouse area for putpixel |
||
443 | call [_display.check_mouse] |
||
444 | pop ecx |
||
2448 | mario79 | 445 | ;-------------------------------------- |
446 | align 4 |
||
447 | .no_mouseunder_1: |
||
9715 | Doczom | 448 | mov [edi + ecx], ax |
2288 | clevermous | 449 | shr eax, 16 |
9715 | Doczom | 450 | mov [edi + ecx+2], al |
2430 | mario79 | 451 | |
452 | pop eax |
||
453 | ;-------------------------------------- |
||
454 | align 4 |
||
2449 | mario79 | 455 | .skip_1: |
9715 | Doczom | 456 | mov edi, [esp + .extra_var1] |
2288 | clevermous | 457 | inc ecx |
458 | dec edx |
||
459 | jnz .inner24 |
||
1894 | serge | 460 | |
9715 | Doczom | 461 | add esi, [esp + BLITTER.stride] |
5351 | serge | 462 | add edi, [_display.lfb_pitch] |
2288 | clevermous | 463 | add ebp, [_display.width] |
1894 | serge | 464 | |
9715 | Doczom | 465 | mov edx, [esp + BLITTER.w] |
466 | dec [esp + BLITTER.h] |
||
2288 | clevermous | 467 | jnz .outer24 |
1894 | serge | 468 | |
2288 | clevermous | 469 | jmp .done |
5161 | hidnplayr | 470 | |
471 | |||
472 | .core_16: |
||
9715 | Doczom | 473 | lea edi, [LFB_BASE + edi + ebx*2] |
8869 | rgimad | 474 | mov ebx, [current_slot_idx] |
5161 | hidnplayr | 475 | |
5164 | hidnplayr | 476 | .outer16: |
9715 | Doczom | 477 | mov [esp + .extra_var1], edi |
5161 | hidnplayr | 478 | xor ecx, ecx |
479 | |||
5164 | hidnplayr | 480 | .inner16: |
9715 | Doczom | 481 | cmp [ebp + ecx], bl ; Does the process own this pixel? |
5161 | hidnplayr | 482 | jne .skip_2 |
483 | ;-------------------------------------- |
||
484 | push eax |
||
9715 | Doczom | 485 | mov eax, [esi + ecx*4] |
5161 | hidnplayr | 486 | |
487 | ; check for hardware cursor |
||
488 | cmp [_display.select_cursor], select_cursor |
||
489 | jne .no_mouseunder_2 |
||
490 | ;-------------------------------------- |
||
491 | push ecx |
||
492 | |||
493 | mov ecx, [esp+4] |
||
494 | ror ecx, 16 |
||
495 | sub ecx, edx |
||
496 | rol ecx, 16 |
||
9715 | Doczom | 497 | sub ecx, [esp + BLITTER.h + 8] |
5161 | hidnplayr | 498 | |
499 | ; check mouse area for putpixel |
||
500 | call [_display.check_mouse] |
||
501 | pop ecx |
||
502 | ;-------------------------------------- |
||
5164 | hidnplayr | 503 | .no_mouseunder_2: |
5161 | hidnplayr | 504 | ; convert to 16 bpp and store to LFB |
505 | and eax, 00000000111110001111110011111000b |
||
506 | shr ah, 2 |
||
507 | shr ax, 3 |
||
508 | ror eax, 8 |
||
509 | add al, ah |
||
510 | rol eax, 8 |
||
9715 | Doczom | 511 | mov [edi + ecx*2], ax |
5161 | hidnplayr | 512 | pop eax |
513 | ;-------------------------------------- |
||
5164 | hidnplayr | 514 | .skip_2: |
9715 | Doczom | 515 | mov edi, [esp + .extra_var1] |
5161 | hidnplayr | 516 | inc ecx |
517 | dec edx |
||
518 | jnz .inner16 |
||
519 | |||
9715 | Doczom | 520 | add esi, [esp + BLITTER.stride] |
5351 | serge | 521 | add edi, [_display.lfb_pitch] |
5161 | hidnplayr | 522 | add ebp, [_display.width] |
523 | |||
9715 | Doczom | 524 | mov edx, [esp + BLITTER.w] |
525 | dec [esp + BLITTER.h] |
||
5161 | hidnplayr | 526 | jnz .outer16 |
527 | |||
528 | jmp .done=>>=>> |
||
529 |