Subversion Repositories Kolibri OS

Rev

Rev 9679 | Rev 9926 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9679 Rev 9715
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
2
;;                                                              ;;
3
;; Copyright (C) KolibriOS team 2011-2015. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2011-2022. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 9679 $
8
$Revision: 9715 $
9
 
9
 
10
 
10
 
Line 39... Line 39...
39
;return code:
39
;return code:
40
;CF= 0 - draw, 1 - don't draw
40
;CF= 0 - draw, 1 - don't draw
Line 41... Line 41...
41
 
41
 
Line 42... Line 42...
42
        push    ebx
42
        push    ebx
43
 
43
 
44
        mov     eax, [edi+RECT.left]
44
        mov     eax, [edi + RECT.left]
45
        mov     ebx, [edi+RECT.right]
45
        mov     ebx, [edi + RECT.right]
Line 46... Line 46...
46
        mov     ecx, [esi+RECT.left]    ;clip.left
46
        mov     ecx, [esi + RECT.left]    ;clip.left
47
        mov     edx, [esi+RECT.right]   ;clip.right
47
        mov     edx, [esi + RECT.right]   ;clip.right
Line 48... Line 48...
48
 
48
 
49
        cmp     eax, edx                ;left >= clip.right
49
        cmp     eax, edx                ;left >= clip.right
Line 50... Line 50...
50
        jge     .fail
50
        jge     .fail
51
 
51
 
Line 52... Line 52...
52
        cmp     ebx, ecx                ;right < clip.left
52
        cmp     ebx, ecx                ;right < clip.left
53
        jl      .fail
53
        jl      .fail
54
 
54
 
55
        cmp     eax, ecx                ;left >= clip.left
55
        cmp     eax, ecx                ;left >= clip.left
Line 56... Line 56...
56
        jge     @F
56
        jge     @F
57
 
57
 
58
        mov     [edi+RECT.left], ecx
58
        mov     [edi + RECT.left], ecx
59
@@:
59
@@:
60
        cmp     ebx, edx                ;right <= clip.right
60
        cmp     ebx, edx                ;right <= clip.right
61
        jle     @f
61
        jle     @f
Line 62... Line 62...
62
 
62
 
63
        mov     [edi+RECT.right], edx
63
        mov     [edi + RECT.right], edx
Line 64... Line 64...
64
@@:
64
@@:
65
        mov     eax, [edi+RECT.top]
65
        mov     eax, [edi + RECT.top]
Line 66... Line 66...
66
        mov     ebx, [edi+RECT.bottom]
66
        mov     ebx, [edi + RECT.bottom]
67
        mov     ecx, [esi+RECT.top]     ;clip.top
67
        mov     ecx, [esi + RECT.top]     ;clip.top
Line 68... Line 68...
68
        mov     edx, [esi+RECT.bottom]  ;clip.bottom
68
        mov     edx, [esi + RECT.bottom]  ;clip.bottom
69
 
69
 
70
        cmp     eax, edx                ;top >= clip.bottom
70
        cmp     eax, edx                ;top >= clip.bottom
71
        jge     .fail
71
        jge     .fail
Line 72... Line 72...
72
 
72
 
73
        cmp     ebx, ecx                ;bottom < clip.top
73
        cmp     ebx, ecx                ;bottom < clip.top
74
        jl      .fail
74
        jl      .fail
75
 
75
 
76
        cmp     eax, ecx                ;top >= clip.top
76
        cmp     eax, ecx                ;top >= clip.top
77
        jge     @F
77
        jge     @F
Line 113... Line 113...
113
        push    esi
113
        push    esi
114
        push    ebx
114
        push    ebx
115
        sub     esp, 40
115
        sub     esp, 40
Line 116... Line 116...
116
 
116
 
117
        mov     ebx, ecx
117
        mov     ebx, ecx
118
        mov     edx, [ecx+BLITTER.src_x]
118
        mov     edx, [ecx + BLITTER.src_x]
119
        mov     [esp+.sx0], edx
119
        mov     [esp+.sx0], edx
120
        mov     eax, [ecx+BLITTER.src_y]
120
        mov     eax, [ecx + BLITTER.src_y]
121
        mov     [esp+.sy0], eax
121
        mov     [esp+.sy0], eax
122
        add     edx, [ecx+BLITTER.w]
122
        add     edx, [ecx + BLITTER.w]
123
        add     eax, [ecx+BLITTER.h]
123
        add     eax, [ecx + BLITTER.h]
124
        mov     [esp+.sx1], edx
124
        mov     [esp + .sx1], edx
Line 125... Line 125...
125
        mov     [esp+.sy1], eax
125
        mov     [esp + .sy1], eax
126
 
126
 
Line 127... Line 127...
127
        lea     edi, [esp+.sx0]
127
        lea     edi, [esp + .sx0]
128
        lea     esi, [ebx+BLITTER.sc]
128
        lea     esi, [ebx + BLITTER.sc]
Line 129... Line 129...
129
 
129
 
130
        call    block_clip
130
        call    block_clip
131
        jc      .done
131
        jc      .done
132
 
132
 
133
        mov     edi, [esp+.sx0]
133
        mov     edi, [esp + .sx0]
Line 134... Line 134...
134
        mov     edx, [ebx+BLITTER.dst_x]
134
        mov     edx, [ebx + BLITTER.dst_x]
135
        add     edx, edi
135
        add     edx, edi
136
        sub     edx, [ebx+BLITTER.src_x]
136
        sub     edx, [ebx + BLITTER.src_x]
137
        mov     [esp+.dx0], edx
137
        mov     [esp + .dx0], edx
138
 
138
 
Line 139... Line 139...
139
        mov     ecx, [esp+.sy0]
139
        mov     ecx, [esp+.sy0]
140
        mov     eax, [ebx+BLITTER.dst_y]
140
        mov     eax, [ebx + BLITTER.dst_y]
141
        add     eax, ecx
141
        add     eax, ecx
Line 142... Line 142...
142
        sub     eax, [ebx+BLITTER.src_y]
142
        sub     eax, [ebx + BLITTER.src_y]
143
        mov     [esp+.dy0], eax
143
        mov     [esp + .dy0], eax
144
 
144
 
Line 145... Line 145...
145
        sub     edx, edi
145
        sub     edx, edi
146
        add     edx, [esp+.sx1]
146
        add     edx, [esp + .sx1]
147
        mov     [esp+.dx1], edx
147
        mov     [esp + .dx1], edx
148
 
148
 
Line 149... Line 149...
149
        sub     eax, ecx
149
        sub     eax, ecx
150
        add     eax, [esp+.sy1]
150
        add     eax, [esp + .sy1]
151
        mov     [esp+.dy1], eax
151
        mov     [esp + .dy1], eax
152
 
152
 
Line 153... Line 153...
153
        lea     edi, [esp+.dx0]
153
        lea     edi, [esp + .dx0]
154
        lea     esi, [ebx+BLITTER.dc]
154
        lea     esi, [ebx + BLITTER.dc]
155
        call    block_clip
155
        call    block_clip
156
        jc      .done
156
        jc      .done
Line 157... Line 157...
157
 
157
 
158
        mov     edx, [esp+.dx0]
158
        mov     edx, [esp + .dx0]
159
        mov     eax, [esp+.dx1]
159
        mov     eax, [esp + .dx1]
160
        sub     eax, edx
160
        sub     eax, edx
Line 161... Line 161...
161
        mov     [ebx+BLITTER.w], eax
161
        mov     [ebx + BLITTER.w], eax
162
 
162
 
163
        mov     eax, [esp+.dy0]
163
        mov     eax, [esp + .dy0]
164
        mov     ecx, [esp+.dy1]
164
        mov     ecx, [esp + .dy1]
165
        sub     ecx, eax
165
        sub     ecx, eax
166
        mov     [ebx+BLITTER.h], ecx
166
        mov     [ebx + BLITTER.h], ecx
167
 
167
 
168
        mov     ecx, [ebx+BLITTER.src_x]
168
        mov     ecx, [ebx + BLITTER.src_x]
169
        add     ecx, edx
169
        add     ecx, edx
170
        sub     ecx, [ebx+BLITTER.dst_x]
170
        sub     ecx, [ebx + BLITTER.dst_x]
171
        mov     [ebx+BLITTER.src_x], ecx
171
        mov     [ebx + BLITTER.src_x], ecx
Line 209... Line 209...
209
.flags          dd      ?
209
.flags          dd      ?
210
.local_vars_size = $
210
.local_vars_size = $
211
end virtual
211
end virtual
212
        sub     esp, .local_vars_size
212
        sub     esp, .local_vars_size
Line 213... Line 213...
213
        
213
        
Line 214... Line 214...
214
        mov     [esp+.flags], ebx
214
        mov     [esp + .flags], ebx
215
 
215
 
216
        mov     eax, [current_slot_idx]
216
        mov     eax, [current_slot_idx]
217
        shl     eax, 5 ; sizeof.WDATA
217
        shl     eax, BSF sizeof.WDATA
218
        mov     ebx, [eax + window_data + WDATA.box.width]
218
        mov     ebx, [window_data + eax + WDATA.box.width]
219
        mov     edx, [eax + window_data + WDATA.box.height]
219
        mov     edx, [window_data + eax + WDATA.box.height]
Line 220... Line 220...
220
        inc     ebx
220
        inc     ebx
Line 221... Line 221...
221
        inc     edx
221
        inc     edx
222
 
222
 
223
        xor     eax, eax
223
        xor     eax, eax
224
 
224
 
Line 225... Line 225...
225
        mov     [esp+BLITTER.dc.left], eax
225
        mov     [esp + BLITTER.dc.left], eax
226
        mov     [esp+BLITTER.dc.top], eax
226
        mov     [esp + BLITTER.dc.top], eax
227
        mov     [esp+BLITTER.dc.right], ebx
227
        mov     [esp + BLITTER.dc.right], ebx
Line 228... Line 228...
228
        mov     [esp+BLITTER.dc.bottom], edx
228
        mov     [esp + BLITTER.dc.bottom], edx
229
 
229
 
Line 230... Line 230...
230
        mov     [esp+BLITTER.sc.left], eax
230
        mov     [esp + BLITTER.sc.left], eax
Line 231... Line 231...
231
        mov     [esp+BLITTER.sc.top], eax
231
        mov     [esp + BLITTER.sc.top], eax
232
        mov     eax, [ecx+24]
232
        mov     eax, [ecx+24]
233
 
233
 
234
        mov     [esp+BLITTER.sc.right], eax
234
        mov     [esp + BLITTER.sc.right], eax
Line 235... Line 235...
235
        mov     eax, [ecx+28]
235
        mov     eax, [ecx+28]
236
 
236
 
237
        mov     [esp+BLITTER.sc.bottom], eax
237
        mov     [esp + BLITTER.sc.bottom], eax
238
 
238
 
239
        mov     eax, [ecx]
239
        mov     eax, [ecx]
240
        mov     [esp+BLITTER.dst_x], eax
240
        mov     [esp + BLITTER.dst_x], eax
241
        mov     eax, [ecx+4]
241
        mov     eax, [ecx+4]
242
        mov     [esp+BLITTER.dst_y], eax
242
        mov     [esp + BLITTER.dst_y], eax
Line 243... Line 243...
243
 
243
 
244
        mov     eax, [ecx+16]
244
        mov     eax, [ecx+16]
245
        mov     [esp+BLITTER.src_x], eax
245
        mov     [esp + BLITTER.src_x], eax
246
        mov     eax, [ecx+20]
246
        mov     eax, [ecx+20]
Line 247... Line 247...
247
        mov     [esp+BLITTER.src_y], eax
247
        mov     [esp + BLITTER.src_y], eax
248
        mov     eax, [ecx+8]
248
        mov     eax, [ecx+8]
249
        mov     [esp+BLITTER.w], eax
249
        mov     [esp + BLITTER.w], eax
Line 250... Line 250...
250
        mov     eax, [ecx+12]
250
        mov     eax, [ecx+12]
251
        mov     [esp+BLITTER.h], eax
251
        mov     [esp + BLITTER.h], eax
Line 252... Line 252...
252
 
252
 
253
 
253
 
254
        mov     eax, [ecx+32]
254
        mov     eax, [ecx+32]
255
        mov     [esp+BLITTER.bitmap], eax
255
        mov     [esp + BLITTER.bitmap], eax
Line 256... Line 256...
256
        mov     eax, [ecx+36]
256
        mov     eax, [ecx+36]
257
        mov     [esp+BLITTER.stride], eax
257
        mov     [esp + BLITTER.stride], eax
Line 258... Line 258...
258
 
258
 
259
        mov     ecx, esp
259
        mov     ecx, esp
260
        call    blit_clip
260
        call    blit_clip
261
        jc      .L57
261
        jc      .L57
Line 262... Line 262...
262
 
262
 
263
        mov     eax, [current_slot_idx]
263
        mov     eax, [current_slot_idx]
264
        shl     eax, 5 ; sizeof.WDATA
264
        shl     eax, BSF sizeof.WDATA
265
 
265
 
266
        mov     ebx, [esp+BLITTER.dst_x]
266
        mov     ebx, [esp + BLITTER.dst_x]
Line 267... Line 267...
267
        mov     ebp, [esp+BLITTER.dst_y]
267
        mov     ebp, [esp + BLITTER.dst_y]
268
        add     ebx, [eax + window_data + WDATA.box.left]
268
        add     ebx, [window_data + eax + WDATA.box.left]
269
        add     ebp, [eax + window_data + WDATA.box.top]
269
        add     ebp, [window_data + eax + WDATA.box.top]
270
        
270
        
Line 271... Line 271...
271
        test    [esp+.flags], BLIT_CLIENT_RELATIVE
271
        test    [esp + .flags], BLIT_CLIENT_RELATIVE
Line 272... Line 272...
272
        jz      .no_client_relative        
272
        jz      .no_client_relative        
273
 
273
 
Line 295... Line 295...
295
        mov     ebp, [d_width_calc_area+ebp*4]
295
        mov     ebp, [d_width_calc_area+ebp*4]
Line 296... Line 296...
296
 
296
 
297
        add     ebp, ebx
297
        add     ebp, ebx
Line 298... Line 298...
298
        add     ebp, [_display.win_map]
298
        add     ebp, [_display.win_map]
299
 
299
 
300
        mov     eax, [esp+BLITTER.src_y]
300
        mov     eax, [esp + BLITTER.src_y]
301
        imul    eax, [esp+BLITTER.stride]
301
        imul    eax, [esp + BLITTER.stride]
302
        mov     esi, [esp+BLITTER.src_x]
302
        mov     esi, [esp + BLITTER.src_x]
Line 303... Line 303...
303
        lea     esi, [eax+esi*4]
303
        lea     esi, [eax + esi*4]
304
        add     esi, [esp+BLITTER.bitmap]
304
        add     esi, [esp + BLITTER.bitmap]
305
 
305
 
Line 306... Line 306...
306
        mov     eax, ecx
306
        mov     eax, ecx
307
        mov     ecx, [esp+BLITTER.h]
307
        mov     ecx, [esp + BLITTER.h]
Line 308... Line 308...
308
        mov     edx, [esp+BLITTER.w]
308
        mov     edx, [esp + BLITTER.w]
309
 
309
 
Line 310... Line 310...
310
        test    ecx, ecx    ;FIXME check clipping
310
        test    ecx, ecx    ;FIXME check clipping
311
        jz      .L57
311
        jz      .L57
Line 312... Line 312...
312
 
312
 
Line 313... Line 313...
313
        test    edx, edx
313
        test    edx, edx
314
        jz      .L57
314
        jz      .L57
315
 
315
 
316
        cmp     [_display.bits_per_pixel], 32
316
        cmp     [_display.bits_per_pixel], 32
Line 334... Line 334...
334
        cmp     [ebp], bl
334
        cmp     [ebp], bl
335
        jne     .skip
335
        jne     .skip
336
;--------------------------------------
336
;--------------------------------------
337
        mov     eax, [esi]
337
        mov     eax, [esi]
Line 338... Line 338...
338
 
338
 
Line 339... Line 339...
339
        mov     ecx, [esp+.position]
339
        mov     ecx, [esp + .position]
340
 
340
 
341
; check mouse area for putpixel
341
; check mouse area for putpixel
342
        call    [_display.check_mouse]
342
        call    [_display.check_mouse]
343
;--------------------------------------
343
;--------------------------------------
344
; store to real LFB
344
; store to real LFB
345
        mov     [LFB_BASE+edi], eax
345
        mov     [LFB_BASE + edi], eax
346
;--------------------------------------
346
;--------------------------------------
347
align 4
347
align 4
348
.skip:
348
.skip:
349
        add     esi, 4
349
        add     esi, 4
350
        add     edi, 4
350
        add     edi, 4
351
        inc     ebp
351
        inc     ebp
352
        add     [esp+.position], 1 shl 16
352
        add     [esp + .position], 1 shl 16
Line 353... Line 353...
353
        dec     edx
353
        dec     edx
354
        jnz     .inner32
354
        jnz     .inner32
355
 
355
 
Line 356... Line 356...
356
        add     esi, [esp+BLITTER.stride]
356
        add     esi, [esp + BLITTER.stride]
357
        add     edi, [_display.lfb_pitch]
357
        add     edi, [_display.lfb_pitch]
358
        add     ebp, [_display.width]
358
        add     ebp, [_display.width]
359
 
359
 
360
        mov     edx, [esp+BLITTER.w]
360
        mov     edx, [esp + BLITTER.w]
361
        mov     eax, edx
361
        mov     eax, edx
362
        inc     [esp+.position]
362
        inc     [esp+.position]
363
        sub     ebp, edx
363
        sub     ebp, edx
364
        shl     eax, 2
364
        shl     eax, 2
365
        sub     esi, eax
365
        sub     esi, eax
366
        sub     edi, eax
366
        sub     edi, eax
367
        shl     eax, 16-2
367
        shl     eax, 16-2
368
        sub     [esp+.position], eax
368
        sub     [esp + .position], eax
369
        dec     [esp+BLITTER.h]
369
        dec     [esp + BLITTER.h]
370
        jnz     .outer32
370
        jnz     .outer32
371
        jmp     .done
371
        jmp     .done
Line 372... Line 372...
372
.core_32.hardware_cursor:
372
.core_32.hardware_cursor:
373
align 4
373
align 4
374
.hw.outer32:
374
.hw.outer32:
375
        xor     ecx, ecx
375
        xor     ecx, ecx
376
 
376
 
377
align 4
377
align 4
Line 378... Line 378...
378
.hw.inner32:
378
.hw.inner32:
379
        cmp     [ebp+ecx], bl
379
        cmp     [ebp + ecx], bl
380
        jne     .hw.skip
380
        jne     .hw.skip
381
        mov     eax, [esi+ecx*4]
381
        mov     eax, [esi + ecx*4]
382
        mov     [LFB_BASE+edi+ecx*4], eax
382
        mov     [LFB_BASE + edi + ecx*4], eax
Line 383... Line 383...
383
 
383
 
384
align 4
384
align 4
385
.hw.skip:
385
.hw.skip:
Line 386... Line 386...
386
        inc     ecx
386
        inc     ecx
387
        dec     edx
387
        dec     edx
388
        jnz     .hw.inner32
388
        jnz     .hw.inner32
Line 389... Line 389...
389
 
389
 
390
        add     esi, [esp+BLITTER.stride]
390
        add     esi, [esp + BLITTER.stride]
391
        add     edi, [_display.lfb_pitch]
391
        add     edi, [_display.lfb_pitch]
Line 408... Line 408...
408
 
408
 
409
.core_24:
409
.core_24:
410
        cmp     [_display.bits_per_pixel], 24
410
        cmp     [_display.bits_per_pixel], 24
Line 411... Line 411...
411
        jne     .core_16
411
        jne     .core_16
412
 
412
 
413
        lea     ebx, [ebx+ebx*2]
413
        lea     ebx, [ebx + ebx*2]
Line 414... Line 414...
414
        lea     edi, [LFB_BASE+edi+ebx]
414
        lea     edi, [LFB_BASE + edi + ebx]
415
        mov     ebx, [current_slot_idx]
415
        mov     ebx, [current_slot_idx]
416
 
416
 
417
align 4
417
align 4
Line 418... Line 418...
418
.outer24:
418
.outer24:
419
        mov     [esp+.extra_var1], edi
419
        mov     [esp + .extra_var1], edi
420
        xor     ecx, ecx
420
        xor     ecx, ecx
421
 
421
 
422
align 4
422
align 4
423
.inner24:
423
.inner24:
424
        cmp     [ebp+ecx], bl           ; Does the process own this pixel?
424
        cmp     [ebp + ecx], bl           ; Does the process own this pixel?
Line 425... Line 425...
425
        jne     .skip_1
425
        jne     .skip_1
Line 426... Line 426...
426
;--------------------------------------
426
;--------------------------------------
427
        push    eax
427
        push    eax
428
        mov     eax, [esi+ecx*4]
428
        mov     eax, [esi + ecx*4]
429
 
429
 
Line 441... Line 441...
441
 
441
 
442
        mov     ecx, [esp+4]
442
        mov     ecx, [esp+4]
443
        ror     ecx, 16
443
        ror     ecx, 16
444
        sub     ecx, edx
444
        sub     ecx, edx
445
        rol     ecx, 16
445
        rol     ecx, 16
Line 446... Line 446...
446
        sub     ecx, [esp+BLITTER.h + 8]
446
        sub     ecx, [esp + BLITTER.h + 8]
447
 
447
 
448
; check mouse area for putpixel
448
; check mouse area for putpixel
449
        call    [_display.check_mouse]
449
        call    [_display.check_mouse]
450
        pop     ecx
450
        pop     ecx
451
;--------------------------------------
451
;--------------------------------------
452
align 4
452
align 4
453
.no_mouseunder_1:
453
.no_mouseunder_1:
454
        mov     [edi+ecx], ax
454
        mov     [edi + ecx], ax
Line 455... Line 455...
455
        shr     eax, 16
455
        shr     eax, 16
456
        mov     [edi+ecx+2], al
456
        mov     [edi + ecx+2], al
457
 
457
 
458
        pop     eax
458
        pop     eax
459
;--------------------------------------
459
;--------------------------------------
460
align 4
460
align 4
461
.skip_1:
461
.skip_1:
462
        mov     edi, [esp+.extra_var1]
462
        mov     edi, [esp + .extra_var1]
Line 463... Line 463...
463
        inc     ecx
463
        inc     ecx
464
        dec     edx
464
        dec     edx
465
        jnz     .inner24
465
        jnz     .inner24
Line 466... Line 466...
466
 
466
 
467
        add     esi, [esp+BLITTER.stride]
467
        add     esi, [esp + BLITTER.stride]
468
        add     edi, [_display.lfb_pitch]
468
        add     edi, [_display.lfb_pitch]
Line 469... Line 469...
469
        add     ebp, [_display.width]
469
        add     ebp, [_display.width]
Line 470... Line 470...
470
 
470
 
471
        mov     edx, [esp+BLITTER.w]
471
        mov     edx, [esp + BLITTER.w]
472
        dec     [esp+BLITTER.h]
472
        dec     [esp + BLITTER.h]
Line 473... Line 473...
473
        jnz     .outer24
473
        jnz     .outer24
474
 
474
 
475
        jmp     .done
475
        jmp     .done
Line 476... Line 476...
476
 
476
 
477
 
477
 
478
.core_16:
478
.core_16:
479
        lea     edi, [LFB_BASE+edi+ebx*2]
479
        lea     edi, [LFB_BASE + edi + ebx*2]
480
        mov     ebx, [current_slot_idx]
480
        mov     ebx, [current_slot_idx]
481
 
481
 
Line 482... Line 482...
482
  .outer16:
482
  .outer16:
483
        mov     [esp+.extra_var1], edi
483
        mov     [esp + .extra_var1], edi
484
        xor     ecx, ecx
484
        xor     ecx, ecx
485
 
485
 
Line 501... Line 501...
501
 
501
 
502
        mov     ecx, [esp+4]
502
        mov     ecx, [esp+4]
503
        ror     ecx, 16
503
        ror     ecx, 16
504
        sub     ecx, edx
504
        sub     ecx, edx
505
        rol     ecx, 16
505
        rol     ecx, 16
Line 506... Line 506...
506
        sub     ecx, [esp+BLITTER.h + 8]
506
        sub     ecx, [esp + BLITTER.h + 8]
507
 
507
 
508
; check mouse area for putpixel
508
; check mouse area for putpixel
509
        call    [_display.check_mouse]
509
        call    [_display.check_mouse]
Line 515... Line 515...
515
        shr     ah, 2
515
        shr     ah, 2
516
        shr     ax, 3
516
        shr     ax, 3
517
        ror     eax, 8
517
        ror     eax, 8
518
        add     al, ah
518
        add     al, ah
519
        rol     eax, 8
519
        rol     eax, 8
520
        mov     [edi+ecx*2], ax
520
        mov     [edi + ecx*2], ax
521
        pop     eax
521
        pop     eax
522
;--------------------------------------
522
;--------------------------------------
523
  .skip_2:
523
  .skip_2:
524
        mov     edi, [esp+.extra_var1]
524
        mov     edi, [esp + .extra_var1]
525
        inc     ecx
525
        inc     ecx
526
        dec     edx
526
        dec     edx
527
        jnz     .inner16
527
        jnz     .inner16
Line 528... Line 528...
528
 
528
 
529
        add     esi, [esp+BLITTER.stride]
529
        add     esi, [esp + BLITTER.stride]
530
        add     edi, [_display.lfb_pitch]
530
        add     edi, [_display.lfb_pitch]
Line 531... Line 531...
531
        add     ebp, [_display.width]
531
        add     ebp, [_display.width]
532
 
532
 
533
        mov     edx, [esp+BLITTER.w]
533
        mov     edx, [esp + BLITTER.w]
Line 534... Line 534...
534
        dec     [esp+BLITTER.h]
534
        dec     [esp + BLITTER.h]