Rev 2010 | Rev 2465 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2010 | Rev 2434 | ||
---|---|---|---|
Line 1... | Line -... | ||
1 | struc BLITTER |
- | |
2 | { |
- | |
3 | .dc.xmin rd 1 ; 0 |
1 | struct BLITTER_BLOCK |
4 | .dc.ymin rd 1 ; 4 |
- | |
5 | .dc.xmax rd 1 ; 8 |
2 | xmin dd ? |
6 | .dc.ymax rd 1 ; 12 |
3 | ymin dd ? |
7 | 4 | xmax dd ? |
|
8 | .sc: |
5 | ymax dd ? |
- | 6 | ends |
|
9 | .sc.xmin rd 1 ; 16 |
7 | |
10 | .sc.ymin rd 1 ; 20 |
8 | |
11 | .sc.xmax rd 1 ; 24 |
- | |
12 | .sc.ymax rd 1 ; 28 |
9 | struct BLITTER |
13 | 10 | dc BLITTER_BLOCK |
|
14 | .dst_x rd 1 ; 32 |
11 | sc BLITTER_BLOCK |
15 | .dst_y rd 1 ; 36 |
- | |
16 | .src_x rd 1 ; 40 |
12 | dst_x dd ? ; 32 |
17 | .src_y rd 1 ; 44 |
13 | dst_y dd ? ; 36 |
18 | .w rd 1 ; 48 |
14 | src_x dd ? ; 40 |
19 | .h rd 1 ; 52 |
15 | src_y dd ? ; 44 |
20 | 16 | w dd ? ; 48 |
|
21 | .bitmap rd 1 ; 56 |
17 | h dd ? ; 52 |
22 | .stride rd 1 ; 60 |
18 | |
23 | 19 | bitmap dd ? ; 56 |
|
24 | } |
20 | stride dd ? ; 60 |
25 | - | ||
26 | virtual at 0 |
- | |
27 | BLITTER BLITTER |
- | |
28 | end virtual |
- | |
29 | - | ||
30 | 21 | ends |
|
Line 31... | Line 22... | ||
31 | align 4 |
22 | |
Line 32... | Line 23... | ||
32 | 23 | ||
Line 331... | Line 322... | ||
331 | jne .L57 |
322 | call blit_clip |
332 | 323 | test eax, eax |
|
333 | inc [mouse_pause] |
324 | jne .L57 |
334 | call [_display.disable_mouse] |
325 | |
Line 335... | Line -... | ||
335 | - | ||
336 | mov eax, [TASK_BASE] |
- | |
337 | - | ||
338 | mov ebx, [esp+BLITTER.dst_x] |
326 | mov eax, [TASK_BASE] |
Line 339... | Line 327... | ||
339 | mov ebp, [esp+BLITTER.dst_y] |
327 | |
340 | add ebx, [eax-twdw + WDATA.box.left] |
328 | mov ebx, [esp+BLITTER.dst_x] |
341 | add ebp, [eax-twdw + WDATA.box.top] |
329 | mov ebp, [esp+BLITTER.dst_y] |
342 | mov edi, ebp |
330 | add ebx, [eax-twdw + WDATA.box.left] |
- | 331 | add ebp, [eax-twdw + WDATA.box.top] |
|
- | 332 | ||
- | 333 | mov ecx, ebx |
|
- | 334 | add ecx, [esp+BLITTER.w] |
|
- | 335 | shl ecx, 16 |
|
- | 336 | mov cx, bp |
|
- | 337 | add ecx, [esp+BLITTER.h] |
|
343 | 338 | ||
Line 344... | Line 339... | ||
344 | imul edi, [_display.pitch] |
339 | mov edi, ebp |
345 | imul ebp, [_display.width] |
340 | |
346 | add ebp, ebx |
341 | imul edi, [_display.pitch] |
Line 353... | Line 348... | ||
353 | add esi, [esp+BLITTER.bitmap] |
348 | mov esi, [esp+BLITTER.src_x] |
354 | 349 | lea esi, [eax+esi*4] |
|
355 | mov ecx, [esp+BLITTER.h] |
350 | add esi, [esp+BLITTER.bitmap] |
356 | mov edx, [esp+BLITTER.w] |
351 | |
Line -... | Line 352... | ||
- | 352 | mov eax, ecx |
|
357 | 353 | mov ecx, [esp+BLITTER.h] |
|
358 | test ecx, ecx ;FIXME check clipping |
354 | mov edx, [esp+BLITTER.w] |
Line 359... | Line 355... | ||
359 | jz .L57 |
355 | |
360 | 356 | test ecx, ecx ;FIXME check clipping |
|
Line 368... | Line 364... | ||
368 | 364 | ||
Line 369... | Line 365... | ||
369 | mov ebx, [CURRENT_TASK] |
365 | lea edi, [edi+ebx*4] |
Line 370... | Line 366... | ||
370 | 366 | ||
371 | align 4 |
- | |
372 | .outer32: |
367 | mov ebx, [CURRENT_TASK] |
373 | xor ecx, ecx |
368 | align 4 |
374 | 369 | .outer32: |
|
Line 375... | Line 370... | ||
375 | align 4 |
370 | xor ecx, ecx |
376 | .inner32: |
371 | |
377 | cmp [ebp+ecx], bl |
372 | align 4 |
378 | jne @F |
373 | .inner32: |
379 | - | ||
- | 374 | cmp [ebp+ecx], bl |
|
- | 375 | jne @F |
|
380 | mov eax, [esi+ecx*4] |
376 | ;-------------------------------------- |
- | 377 | push eax |
|
- | 378 | mov eax, [esi+ecx*4] |
|
- | 379 | ||
- | 380 | push ecx |
|
- | 381 | ||
- | 382 | mov ecx, [esp+4] |
|
- | 383 | ror ecx, 16 |
|
- | 384 | sub ecx, edx |
|
- | 385 | rol ecx, 16 |
|
- | 386 | sub ecx, [esp+BLITTER.h + 8] |
|
- | 387 | ||
- | 388 | ; check mouse area for putpixel |
|
- | 389 | call [_display.check_mouse] |
|
381 | mov [LFB_BASE+edi+ecx*4], eax |
390 | pop ecx |
- | 391 | ; store to real LFB |
|
- | 392 | mov [LFB_BASE+edi+ecx*4], eax |
|
- | 393 | pop eax |
|
382 | @@: |
394 | ;-------------------------------------- |
383 | inc ecx |
395 | align 4 |
384 | dec edx |
396 | @@: |
385 | jnz .inner32 |
397 | inc ecx |
Line 394... | Line 406... | ||
394 | 406 | dec [esp+BLITTER.h] |
|
395 | .done: |
407 | jnz .outer32 |
396 | dec [mouse_pause] |
408 | |
Line 397... | Line 409... | ||
397 | call [draw_pointer] |
409 | .done: |
398 | .L57: |
- | |
399 | add esp, 72 |
410 | call [draw_pointer] |
400 | pop ebx |
411 | .L57: |
401 | pop esi |
412 | add esp, 72 |
402 | pop edi |
413 | pop ebx |
403 | pop ebp |
414 | pop esi |
Line 418... | Line 429... | ||
418 | cmp [ebp+ecx], bl |
429 | align 4 |
419 | jne @F |
430 | .inner24: |
420 | 431 | cmp [ebp+ecx], bl |
|
421 | mov eax, [esi+ecx*4] |
432 | jne @F |
422 | - | ||
- | 433 | ;-------------------------------------- |
|
- | 434 | push eax |
|
423 | lea edi, [edi+ecx*2] |
435 | mov eax, [esi+ecx*4] |
Line 424... | Line 436... | ||
424 | mov [edi+ecx], ax |
436 | |
- | 437 | lea edi, [edi+ecx*2] |
|
- | 438 | ||
- | 439 | push ecx |
|
- | 440 | ||
- | 441 | mov ecx, [esp+4] |
|
- | 442 | ror ecx, 16 |
|
- | 443 | sub ecx, edx |
|
- | 444 | rol ecx, 16 |
|
- | 445 | sub ecx, [esp+BLITTER.h + 8] |
|
- | 446 | ||
- | 447 | ; check mouse area for putpixel |
|
- | 448 | call [_display.check_mouse] |
|
- | 449 | pop ecx |
|
425 | shr eax, 16 |
450 | |
426 | mov [edi+ecx+2], al |
451 | mov [edi+ecx], ax |
427 | @@: |
452 | shr eax, 16 |
- | 453 | mov [edi+ecx+2], al |
|
- | 454 | ||
- | 455 | pop eax |
|
- | 456 | ;-------------------------------------- |
|
428 | mov edi, [esp+64] |
457 | align 4 |
429 | inc ecx |
458 | @@: |
430 | dec edx |
459 | mov edi, [esp+64] |
431 | jnz .inner24 |
460 | inc ecx |
432 | 461 | dec edx |