Subversion Repositories Kolibri OS

Rev

Rev 2988 | Rev 4850 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2988 Rev 4444
Line 204... Line 204...
204
blit_32:
204
blit_32:
205
        push    ebp
205
        push    ebp
206
        push    edi
206
        push    edi
207
        push    esi
207
        push    esi
208
        push    ebx
208
        push    ebx
-
 
209
virtual at sizeof.BLITTER
-
 
210
.position       dd      ? ; (x shl 16) + y
-
 
211
; ???
-
 
212
.extra_var1     dd      ?
-
 
213
.local_vars_size = $
-
 
214
end virtual
209
        sub     esp, 72
215
        sub     esp, .local_vars_size
Line 210... Line 216...
210
 
216
 
211
        mov     eax, [TASK_BASE]
217
        mov     eax, [TASK_BASE]
212
        mov     ebx, [eax-twdw + WDATA.box.width]
218
        mov     ebx, [eax-twdw + WDATA.box.width]
213
        mov     edx, [eax-twdw + WDATA.box.height]
219
        mov     edx, [eax-twdw + WDATA.box.height]
Line 244... Line 250...
244
        mov     eax, [ecx+12]
250
        mov     eax, [ecx+12]
245
        mov     [esp+BLITTER.h], eax
251
        mov     [esp+BLITTER.h], eax
Line 246... Line 252...
246
 
252
 
247
 
253
 
248
        mov     eax, [ecx+32]
254
        mov     eax, [ecx+32]
249
        mov     [esp+56], eax
255
        mov     [esp+BLITTER.bitmap], eax
Line 250... Line 256...
250
        mov     eax, [ecx+36]
256
        mov     eax, [ecx+36]
251
        mov     [esp+60], eax
257
        mov     [esp+BLITTER.stride], eax
252
 
258
 
253
        mov     ecx, esp
259
        mov     ecx, esp
Line 266... Line 272...
266
        add     ecx, [esp+BLITTER.w]
272
        add     ecx, [esp+BLITTER.w]
267
        shl     ecx, 16
273
        shl     ecx, 16
268
        mov     cx, bp
274
        mov     cx, bp
269
        add     ecx, [esp+BLITTER.h]
275
        add     ecx, [esp+BLITTER.h]
Line -... Line 276...
-
 
276
 
-
 
277
        mov     eax, ebx
-
 
278
        shl     eax, 16
-
 
279
        mov     ax, bp
-
 
280
        mov     [esp+.position], eax
270
 
281
 
Line 271... Line 282...
271
        mov     edi, ebp
282
        mov     edi, ebp
272
 
283
 
273
;        imul    edi, [_display.pitch]
284
;        imul    edi, [_display.pitch]
Line 298... Line 309...
298
        jne     .core_24
309
        jne     .core_24
Line 299... Line 310...
299
 
310
 
Line 300... Line 311...
300
        lea     edi, [edi+ebx*4]
311
        lea     edi, [edi+ebx*4]
-
 
312
 
-
 
313
        mov     ebx, [CURRENT_TASK]
-
 
314
; check for hardware cursor
-
 
315
        cmp     [_display.select_cursor], select_cursor
-
 
316
        je      .core_32.software_cursor
-
 
317
        cmp     [_display.select_cursor], 0
-
 
318
        jne     .core_32.hardware_cursor
301
 
319
;--------------------------------------
302
        mov     ebx, [CURRENT_TASK]
320
.core_32.software_cursor:
303
align 4
-
 
Line 304... Line 321...
304
.outer32:
321
align 4
305
        xor     ecx, ecx
322
.outer32:
306
 
323
 
307
align 4
324
align 4
308
.inner32:
325
.inner32:
309
        cmp     [ebp+ecx], bl
-
 
310
        jne     .skip
326
        cmp     [ebp], bl
Line 311... Line -...
311
;--------------------------------------
-
 
312
        push    eax
-
 
313
        mov     eax, [esi+ecx*4]
-
 
314
 
-
 
315
; check for hardware cursor
-
 
316
        cmp     [_display.select_cursor], select_cursor
-
 
317
        je      @f
-
 
318
        cmp     [_display.select_cursor], 0
-
 
319
        jne     .no_mouseunder
-
 
320
;--------------------------------------
-
 
321
align 4
327
        jne     .skip
322
@@:
-
 
323
        push    ecx
-
 
324
 
-
 
325
        mov     ecx, [esp+4]
-
 
Line 326... Line 328...
326
        ror     ecx, 16
328
;--------------------------------------
327
        sub     ecx, edx
329
        mov     eax, [esi]
328
        rol     ecx, 16
-
 
329
        sub     ecx, [esp+BLITTER.h + 8]
330
 
330
 
-
 
331
; check mouse area for putpixel
-
 
332
        call    [_display.check_mouse]
331
        mov     ecx, [esp+.position]
333
        pop     ecx
332
 
334
;--------------------------------------
-
 
335
align 4
333
; check mouse area for putpixel
336
.no_mouseunder:
334
        call    [_display.check_mouse]
337
; store to real LFB
335
;--------------------------------------
-
 
336
; store to real LFB
-
 
337
        mov     [LFB_BASE+edi], eax
338
        mov     [LFB_BASE+edi+ecx*4], eax
338
;--------------------------------------
-
 
339
align 4
339
        pop     eax
340
.skip:
340
;--------------------------------------
341
        add     esi, 4
Line 341... Line 342...
341
align 4
342
        add     edi, 4
342
.skip:
343
        inc     ebp
343
        inc     ecx
344
        add     [esp+.position], 1 shl 16
Line 344... Line 345...
344
        dec     edx
345
        dec     edx
-
 
346
        jnz     .inner32
-
 
347
 
-
 
348
        add     esi, [esp+BLITTER.stride]
-
 
349
        add     edi, [_display.pitch]
-
 
350
        add     ebp, [_display.width]
-
 
351
 
-
 
352
        mov     edx, [esp+BLITTER.w]
-
 
353
        mov     eax, edx
345
        jnz     .inner32
354
        inc     [esp+.position]
346
 
355
        sub     ebp, edx
-
 
356
        shl     eax, 2
-
 
357
        sub     esi, eax
-
 
358
        sub     edi, eax
-
 
359
        shl     eax, 16-2
-
 
360
        sub     [esp+.position], eax
-
 
361
        dec     [esp+BLITTER.h]
-
 
362
        jnz     .outer32
-
 
363
        jmp     .done
-
 
364
.core_32.hardware_cursor:
-
 
365
align 4
-
 
366
.hw.outer32:
-
 
367
        xor     ecx, ecx
-
 
368
 
-
 
369
align 4
-
 
370
.hw.inner32:
-
 
371
        cmp     [ebp+ecx], bl
-
 
372
        jne     .hw.skip
-
 
373
        mov     eax, [esi+ecx*4]
-
 
374
        mov     [LFB_BASE+edi+ecx*4], eax
-
 
375
 
-
 
376
align 4
-
 
377
.hw.skip:
-
 
378
        inc     ecx
-
 
379
        dec     edx
-
 
380
        jnz     .hw.inner32
-
 
381
 
Line 347... Line 382...
347
        add     esi, [esp+BLITTER.stride]
382
        add     esi, [esp+BLITTER.stride]
348
        add     edi, [_display.pitch]
383
        add     edi, [_display.pitch]
349
        add     ebp, [_display.width]
384
        add     ebp, [_display.width]
350
 
385
 
351
        mov     edx, [esp+BLITTER.w]
386
        mov     edx, [esp+BLITTER.w]
352
        dec     [esp+BLITTER.h]
387
        dec     [esp+BLITTER.h]
353
        jnz     .outer32
388
        jnz     .hw.outer32
354
 
389
 
355
.done:
390
.done:
356
;        call    [draw_pointer]
391
;        call    [draw_pointer]
Line 368... Line 403...
368
        lea     edi, [LFB_BASE+edi+ebx]
403
        lea     edi, [LFB_BASE+edi+ebx]
369
        mov     ebx, [CURRENT_TASK]
404
        mov     ebx, [CURRENT_TASK]
Line 370... Line 405...
370
 
405
 
371
align 4
406
align 4
372
.outer24:
407
.outer24:
373
        mov     [esp+64], edi
408
        mov     [esp+.extra_var1], edi
Line 374... Line 409...
374
        xor     ecx, ecx
409
        xor     ecx, ecx
375
 
410
 
376
align 4
411
align 4
Line 411... Line 446...
411
 
446
 
412
        pop     eax
447
        pop     eax
413
;--------------------------------------
448
;--------------------------------------
414
align 4
449
align 4
415
.skip_1:
450
.skip_1:
416
        mov     edi, [esp+64]
451
        mov     edi, [esp+.extra_var1]
417
        inc     ecx
452
        inc     ecx
418
        dec     edx
453
        dec     edx
Line 419... Line 454...
419
        jnz     .inner24
454
        jnz     .inner24