Rev 2987 | Rev 5201 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2987 | Rev 3232 | ||
---|---|---|---|
Line 200... | Line 200... | ||
200 | 200 | ||
Line 201... | Line 201... | ||
201 | ret |
201 | ret |
202 | 202 | ||
- | 203 | align 4 |
|
203 | align 4 |
204 | blit_32: |
- | 205 | ||
- | 206 | .x_y equ 72 |
|
- | 207 | .tmp_x_y equ 76 |
|
204 | blit_32: |
208 | |
205 | xchg bx, bx |
209 | |
206 | push ebp |
210 | push ebp |
207 | push edi |
211 | push edi |
208 | push esi |
212 | push esi |
Line 209... | Line 213... | ||
209 | push ebx |
213 | push ebx |
210 | sub esp, 72 |
214 | sub esp, 80 |
211 | 215 | ||
212 | mov eax, [TASK_BASE] |
216 | mov eax, [TASK_BASE] |
Line 252... | Line 256... | ||
252 | mov [esp+60], eax |
256 | mov [esp+60], eax |
Line 253... | Line 257... | ||
253 | 257 | ||
254 | mov ecx, esp |
258 | mov ecx, esp |
255 | call blit_clip |
259 | call blit_clip |
256 | test eax, eax |
260 | test eax, eax |
Line 257... | Line 261... | ||
257 | jne .L57 |
261 | jne .done |
Line 258... | Line 262... | ||
258 | 262 | ||
259 | mov eax, [TASK_BASE] |
263 | mov eax, [TASK_BASE] |
260 | 264 | ||
261 | mov ebx, [esp+BLITTER.dst_x] |
265 | mov ebx, [esp+BLITTER.dst_x] |
Line 262... | Line 266... | ||
262 | mov ebp, [esp+BLITTER.dst_y] |
266 | mov ebp, [esp+BLITTER.dst_y] |
263 | add ebx, [eax-twdw + WDATA.box.left] |
- | |
264 | add ebp, [eax-twdw + WDATA.box.top] |
267 | add ebx, [eax-twdw + WDATA.box.left] |
265 | 268 | add ebp, [eax-twdw + WDATA.box.top] |
|
266 | mov ecx, ebx |
269 | |
Line 267... | Line 270... | ||
267 | add ecx, [esp+BLITTER.w] |
270 | mov ecx, ebx |
Line 268... | Line -... | ||
268 | shl ecx, 16 |
- | |
269 | mov cx, bp |
271 | shl ecx, 16 |
270 | add ecx, [esp+BLITTER.h] |
- | |
271 | 272 | mov cx, bp |
|
Line 272... | Line 273... | ||
272 | mov edi, ebp |
273 | mov [esp+.x_y], ecx |
273 | 274 | ||
Line 283... | Line 284... | ||
283 | imul eax, [esp+BLITTER.stride] |
284 | imul eax, [esp+BLITTER.stride] |
284 | mov esi, [esp+BLITTER.src_x] |
285 | mov esi, [esp+BLITTER.src_x] |
285 | lea esi, [eax+esi*4] |
286 | lea esi, [eax+esi*4] |
286 | add esi, [esp+BLITTER.bitmap] |
287 | add esi, [esp+BLITTER.bitmap] |
Line 287... | Line -... | ||
287 | - | ||
288 | mov eax, ecx |
288 | |
289 | mov ecx, [esp+BLITTER.h] |
289 | mov ecx, [esp+BLITTER.h] |
Line 290... | Line 290... | ||
290 | mov edx, [esp+BLITTER.w] |
290 | mov edx, [esp+BLITTER.w] |
291 | 291 | ||
Line 292... | Line 292... | ||
292 | test ecx, ecx ;FIXME check clipping |
292 | test ecx, ecx ;FIXME check clipping |
293 | jz .L57 |
293 | jz .done |
294 | - | ||
295 | test edx, edx |
- | |
296 | jz .L57 |
- | |
Line 297... | Line 294... | ||
297 | 294 | ||
Line 298... | Line -... | ||
298 | cmp [_display.bpp], 32 |
- | |
299 | jne .core_24 |
- | |
300 | 295 | test edx, edx |
|
Line 301... | Line 296... | ||
301 | lea edi, [edi+ebx*4] |
296 | jz .done |
- | 297 | ||
- | 298 | lea edi, [edi+ebx*4] |
|
- | 299 | ||
- | 300 | ; xchg bx, bx |
|
- | 301 | ||
- | 302 | mov ebx, [CURRENT_TASK] |
|
- | 303 | mov ecx, [esp+80] |
|
- | 304 | shr ecx, 4 |
|
- | 305 | and ecx, 3 |
|
- | 306 | ||
- | 307 | jmp dword [.tbl_32+ecx*4] |
|
- | 308 | ||
302 | 309 | align 4 |
|
- | 310 | .tbl_32 dd blit_copy_32 |
|
- | 311 | dd blit_copy_32_bgr |
|
- | 312 | dd blit_trans_32 |
|
- | 313 | dd blit_trans_32_bgr |
|
- | 314 | ||
- | 315 | .done: |
|
- | 316 | add esp, 80 |
|
- | 317 | pop ebx |
|
- | 318 | pop esi |
|
- | 319 | pop edi |
|
Line 303... | Line 320... | ||
303 | mov ebx, 1 |
320 | pop ebp |
- | 321 | ret |
|
- | 322 | ||
304 | test [esp+72], dword 0x10 |
323 | align 4 |
- | 324 | blit_copy_32_bgr: |
|
- | 325 | mov ebx, 1 |
|
305 | jnz @F |
326 | |
306 | - | ||
307 | mov ebx, [CURRENT_TASK] |
327 | align 4 |
308 | @@: |
328 | blit_copy_32: |
309 | 329 | ||
310 | align 4 |
330 | .outer32: |
311 | .outer32: |
331 | mov eax, [esp+.x_y] |
312 | xor ecx, ecx |
- | |
313 | 332 | mov [esp+.tmp_x_y], eax |
|
Line 314... | Line 333... | ||
314 | align 4 |
333 | xor ecx, ecx |
315 | .inner32: |
334 | align 4 |
316 | cmp [ebp+ecx], bl |
335 | .inner32: |
Line 326... | Line 345... | ||
326 | jne .no_mouseunder |
345 | jne .no_mouseunder |
327 | ;-------------------------------------- |
346 | ;-------------------------------------- |
328 | align 4 |
347 | align 4 |
329 | @@: |
348 | @@: |
330 | push ecx |
349 | push ecx |
331 | - | ||
332 | mov ecx, [esp+4] |
350 | mov ecx, [esp+4+.tmp_x_y] |
333 | ror ecx, 16 |
- | |
334 | sub ecx, edx |
- | |
335 | rol ecx, 16 |
- | |
336 | sub ecx, [esp+BLITTER.h + 8] |
- | |
Line 337... | Line 351... | ||
337 | 351 | ||
338 | ; check mouse area for putpixel |
352 | ; check mouse area for putpixel |
339 | call [_display.check_mouse] |
353 | call [_display.check_mouse] |
- | 354 | pop ecx |
|
340 | pop ecx |
355 | |
341 | ;-------------------------------------- |
356 | ;-------------------------------------- |
342 | align 4 |
357 | align 4 |
343 | .no_mouseunder: |
358 | .no_mouseunder: |
344 | ; store to real LFB |
359 | ; store to real LFB |
345 | mov [LFB_BASE+edi+ecx*4], eax |
- | |
346 | pop eax |
360 | mov [LFB_BASE+edi+ecx*4], eax |
347 | ;-------------------------------------- |
361 | ;-------------------------------------- |
348 | align 4 |
362 | align 4 |
- | 363 | .skip: |
|
349 | .skip: |
364 | add [esp+.tmp_x_y], dword 0x10000 |
350 | inc ecx |
365 | inc ecx |
351 | dec edx |
366 | dec edx |
Line 352... | Line 367... | ||
352 | jnz .inner32 |
367 | jnz .inner32 |
353 | 368 | ||
354 | add esi, [esp+BLITTER.stride] |
369 | add esi, [esp+BLITTER.stride] |
- | 370 | add edi, [_display.pitch] |
|
Line 355... | Line 371... | ||
355 | add edi, [_display.pitch] |
371 | add ebp, [_display.width] |
356 | add ebp, [_display.width] |
372 | inc dword [esp+.x_y] |
357 | 373 | ||
Line 358... | Line -... | ||
358 | mov edx, [esp+BLITTER.w] |
- | |
359 | dec [esp+BLITTER.h] |
- | |
360 | jnz .outer32 |
- | |
361 | - | ||
362 | .done: |
374 | mov edx, [esp+BLITTER.w] |
363 | ; call [draw_pointer] |
- | |
364 | ; call __sys_draw_pointer |
- | |
365 | .L57: |
- | |
366 | add esp, 72 |
- | |
367 | pop ebx |
- | |
Line 368... | Line -... | ||
368 | pop esi |
- | |
369 | pop edi |
- | |
370 | pop ebp |
- | |
371 | ret |
- | |
372 | - | ||
373 | .core_24: |
- | |
Line -... | Line 375... | ||
- | 375 | dec [esp+BLITTER.h] |
|
- | 376 | jnz .outer32 |
|
374 | lea ebx, [ebx+ebx*2] |
377 | |
375 | lea edi, [LFB_BASE+edi+ebx] |
- | |
Line 376... | Line 378... | ||
376 | mov ebx, 1 |
378 | jmp blit_32.done |
- | 379 | ||
- | 380 | ||
377 | test [esp+72], dword 0x10 |
381 | align 4 |
- | 382 | blit_trans_32_bgr: |
|
378 | jnz @F |
383 | mov ebx, 1 |
379 | 384 | ||
Line 380... | Line 385... | ||
380 | mov ebx, [CURRENT_TASK] |
385 | align 4 |
381 | @@: |
386 | blit_trans_32: |
- | 387 | ||
382 | 388 | .outer32: |
|
383 | align 4 |
389 | mov eax, [esp+.x_y] |
384 | .outer24: |
390 | mov [esp+.tmp_x_y], eax |
385 | mov [esp+64], edi |
- | |
386 | xor ecx, ecx |
391 | xor ecx, ecx |
387 | - | ||
388 | align 4 |
392 | |
- | 393 | align 4 |
|
Line 389... | Line 394... | ||
389 | .inner24: |
394 | .inner32: |
390 | cmp [ebp+ecx], bl |
395 | |
391 | jne .skip_1 |
396 | cmp [ebp+ecx], bl |
392 | ;-------------------------------------- |
397 | jne .skip |
393 | push eax |
398 | ;-------------------------------------- |
394 | mov eax, [esi+ecx*4] |
399 | mov eax, [esi+ecx*4] |
395 | 400 | test eax, 0xFF000000 |
|
396 | lea edi, [edi+ecx*2] |
401 | jz .skip |
397 | 402 | ||
Line 398... | Line 403... | ||
398 | ; check for hardware cursor |
403 | ; check for hardware cursor |
399 | cmp [_display.select_cursor], select_cursor |
- | |
400 | je @f |
- | |
401 | cmp [_display.select_cursor], 0 |
- | |
402 | jne .no_mouseunder_1 |
- | |
Line 403... | Line 404... | ||
403 | ;-------------------------------------- |
404 | cmp [_display.select_cursor], select_cursor |
404 | align 4 |
405 | je @f |
405 | @@: |
406 | cmp [_display.select_cursor], 0 |
406 | push ecx |
407 | jne .no_mouseunder |
407 | 408 | ;-------------------------------------- |
|
408 | mov ecx, [esp+4] |
409 | align 4 |
409 | ror ecx, 16 |
- | |
410 | sub ecx, edx |
410 | @@: |
411 | rol ecx, 16 |
411 | push ecx |
412 | sub ecx, [esp+BLITTER.h + 8] |
- | |
413 | - | ||
414 | ; check mouse area for putpixel |
412 | |
415 | call [_display.check_mouse] |
413 | mov ecx, [esp+4+.tmp_x_y] |
416 | pop ecx |
414 | |
417 | ;-------------------------------------- |
415 | ; check mouse area for putpixel |
418 | align 4 |
416 | call [_display.check_mouse] |
419 | .no_mouseunder_1: |
417 | pop ecx |
420 | mov [edi+ecx], ax |
418 | ;-------------------------------------- |
Line 421... | Line 419... | ||
421 | shr eax, 16 |
419 | align 4 |
422 | mov [edi+ecx+2], al |
420 | .no_mouseunder: |
423 | 421 | ; store to real LFB |
|
- | 422 | mov [LFB_BASE+edi+ecx*4], eax |
|
Line 424... | Line 423... | ||
424 | pop eax |
423 | ;-------------------------------------- |
425 | ;-------------------------------------- |
424 | align 4 |
426 | align 4 |
425 | .skip: |
Line 427... | Line 426... | ||
427 | .skip_1: |
426 | add [esp+.tmp_x_y], dword 0x10000 |