Subversion Repositories Kolibri OS

Rev

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

Rev 2446 Rev 2448
Line 15... Line 15...
15
;;                                                              ;;
15
;;                                                              ;;
16
;;  See file COPYING for details                                ;;
16
;;  See file COPYING for details                                ;;
17
;;                                                              ;;
17
;;                                                              ;;
18
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
18
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 19... Line 19...
19
 
19
 
Line 20... Line 20...
20
$Revision: 2446 $
20
$Revision: 2448 $
21
 
21
 
Line 51... Line 51...
51
align 4
51
align 4
52
Vesa20_getpixel24:
52
Vesa20_getpixel24:
53
; eax = x
53
; eax = x
54
; ebx = y
54
; ebx = y
55
;--------------------------------------
55
;--------------------------------------
-
 
56
; check for hardware cursor
-
 
57
        cmp     [_display.select_cursor], 0
-
 
58
        je      @f
-
 
59
        cmp     [_display.select_cursor], select_cursor
-
 
60
        jne     .no_mouseunder
-
 
61
;--------------------------------------
-
 
62
align 4
-
 
63
@@:
56
; check mouse area for putpixel
64
; check mouse area for putpixel
57
        test    ecx, 0x04000000  ; don't load to mouseunder area
65
        test    ecx, 0x04000000  ; don't load to mouseunder area
58
        jnz     .no_mouseunder
66
        jnz     .no_mouseunder
59
        call    [_display.check_m_pixel]
67
        call    [_display.check_m_pixel]
60
        test    ecx, ecx        ;0xff000000
68
        test    ecx, ecx        ;0xff000000
61
        jnz     @f
69
        jnz     @f
-
 
70
;--------------------------------------
-
 
71
align 4
62
.no_mouseunder:
72
.no_mouseunder:
63
;--------------------------------------
73
;--------------------------------------
64
;        imul    ebx, [BytesPerScanLine] ; ebx = y * y multiplier
74
;        imul    ebx, [BytesPerScanLine] ; ebx = y * y multiplier
65
        mov     ebx, [d_width_calc_area + ebx*4]
75
        mov     ebx, [d_width_calc_area + ebx*4]
66
        lea     ebx, [ebx + ebx*2]
76
        lea     ebx, [ebx + ebx*2]
Line 74... Line 84...
74
        ret
84
        ret
75
;-----------------------------------------------------------------------------
85
;-----------------------------------------------------------------------------
76
align 4
86
align 4
77
Vesa20_getpixel32:
87
Vesa20_getpixel32:
78
;--------------------------------------
88
;--------------------------------------
-
 
89
; check for hardware cursor
-
 
90
        cmp     [_display.select_cursor], 0
-
 
91
        je      @f
-
 
92
        cmp     [_display.select_cursor], select_cursor
-
 
93
        jne     .no_mouseunder
-
 
94
;--------------------------------------
-
 
95
align 4
-
 
96
@@:
79
; check mouse area for putpixel
97
; check mouse area for putpixel
80
        test    ecx, 0x04000000  ; don't load to mouseunder area
98
        test    ecx, 0x04000000  ; don't load to mouseunder area
81
        jnz     .no_mouseunder
99
        jnz     .no_mouseunder
82
        call    [_display.check_m_pixel]
100
        call    [_display.check_m_pixel]
83
        test    ecx, ecx        ;0xff000000
101
        test    ecx, ecx        ;0xff000000
84
        jnz     @f
102
        jnz     @f
-
 
103
;--------------------------------------
-
 
104
align 4
85
.no_mouseunder:
105
.no_mouseunder:
86
;--------------------------------------
106
;--------------------------------------
87
;        imul    ebx, [BytesPerScanLine] ; ebx = y * y multiplier
107
;        imul    ebx, [BytesPerScanLine] ; ebx = y * y multiplier
88
        mov     ebx, [d_width_calc_area + ebx*4]
108
        mov     ebx, [d_width_calc_area + ebx*4]
89
        shl     ebx, 2
109
        shl     ebx, 2
Line 278... Line 298...
278
        mov     eax, [putimg.ebp+4]
298
        mov     eax, [putimg.ebp+4]
279
        call    eax
299
        call    eax
280
        cmp     [ebp], bl
300
        cmp     [ebp], bl
281
        jne     .skip
301
        jne     .skip
282
;--------------------------------------
302
;--------------------------------------
-
 
303
; check for hardware cursor
-
 
304
        cmp     [_display.select_cursor], 0
-
 
305
        jne     .no_mouseunder
283
        push    ecx
306
        push    ecx
Line 284... Line 307...
284
 
307
 
285
        neg     ecx
308
        neg     ecx
286
        add     ecx, [putimg.real_sx_and_abs_cx + 4]
309
        add     ecx, [putimg.real_sx_and_abs_cx + 4]
Line 289... Line 312...
289
        sub     ecx, edi
312
        sub     ecx, edi
Line 290... Line 313...
290
 
313
 
291
; check mouse area for putpixel
314
; check mouse area for putpixel
292
        call    check_mouse_area_for_putpixel
315
        call    check_mouse_area_for_putpixel
-
 
316
        pop     ecx
-
 
317
;--------------------------------------
-
 
318
align 4
293
        pop     ecx
319
.no_mouseunder:
294
; store to real LFB
320
; store to real LFB
295
        mov     [LFB_BASE+edx], ax
321
        mov     [LFB_BASE+edx], ax
296
        shr     eax, 16
322
        shr     eax, 16
297
        mov     [LFB_BASE+edx+2], al
323
        mov     [LFB_BASE+edx+2], al
Line 343... Line 369...
343
        mov     eax, [putimg.ebp+4]
369
        mov     eax, [putimg.ebp+4]
344
        call    eax
370
        call    eax
345
        cmp     [ebp], bl
371
        cmp     [ebp], bl
346
        jne     .skip
372
        jne     .skip
347
;--------------------------------------
373
;--------------------------------------
-
 
374
; check for hardware cursor
-
 
375
        cmp     [_display.select_cursor], select_cursor
-
 
376
        jne     .no_mouseunder
-
 
377
 
348
        push    ecx
378
        push    ecx
349
        mov     ecx, [putimg.real_sy_and_abs_cy + 4]
379
        mov     ecx, [putimg.real_sy_and_abs_cy + 4]
350
        sub     ecx, edi
380
        sub     ecx, edi
351
;--------------------------------------
381
;--------------------------------------
352
; check for Y
382
; check for Y
Line 371... Line 401...
371
        call    check_mouse_area_for_putpixel_new.1
401
        call    check_mouse_area_for_putpixel_new.1
372
;--------------------------------------
402
;--------------------------------------
373
align 4
403
align 4
374
.no_mouse_area:
404
.no_mouse_area:
375
        pop     ecx
405
        pop     ecx
-
 
406
;--------------------------------------
-
 
407
align 4
-
 
408
.no_mouseunder:
376
; store to real LFB
409
; store to real LFB
377
        mov     [LFB_BASE+edx], ax
410
        mov     [LFB_BASE+edx], ax
378
        shr     eax, 16
411
        shr     eax, 16
379
        mov     [LFB_BASE+edx+2], al
412
        mov     [LFB_BASE+edx+2], al
380
;--------------------------------------
413
;--------------------------------------
Line 423... Line 456...
423
        mov     eax, [putimg.ebp+4]
456
        mov     eax, [putimg.ebp+4]
424
        call    eax
457
        call    eax
425
        cmp     [ebp], bl
458
        cmp     [ebp], bl
426
        jne     .skip
459
        jne     .skip
427
;--------------------------------------
460
;--------------------------------------
-
 
461
; check for hardware cursor
-
 
462
        cmp     [_display.select_cursor], 0
-
 
463
        jne     .no_mouseunder
-
 
464
 
428
        push    ecx
465
        push    ecx
Line 429... Line 466...
429
 
466
 
430
        neg     ecx
467
        neg     ecx
431
        add     ecx, [putimg.real_sx_and_abs_cx + 4]
468
        add     ecx, [putimg.real_sx_and_abs_cx + 4]
Line 434... Line 471...
434
        sub     ecx, edi
471
        sub     ecx, edi
Line 435... Line 472...
435
 
472
 
436
; check mouse area for putpixel
473
; check mouse area for putpixel
437
        call    check_mouse_area_for_putpixel
474
        call    check_mouse_area_for_putpixel
-
 
475
        pop     ecx
-
 
476
;--------------------------------------
-
 
477
align 4
438
        pop     ecx
478
.no_mouseunder:
439
; store to real LFB
479
; store to real LFB
440
        mov     [LFB_BASE+edx], eax
480
        mov     [LFB_BASE+edx], eax
441
;--------------------------------------
481
;--------------------------------------
442
align 4
482
align 4
Line 493... Line 533...
493
        mov     eax, [putimg.ebp+4]
533
        mov     eax, [putimg.ebp+4]
494
        call    eax
534
        call    eax
495
        cmp     [ebp], bl
535
        cmp     [ebp], bl
496
        jne     .skip
536
        jne     .skip
497
;--------------------------------------
537
;--------------------------------------
-
 
538
; check for hardware cursor
-
 
539
        cmp     [_display.select_cursor], select_cursor
-
 
540
        jne     .no_mouseunder
498
        push    ecx
541
        push    ecx
499
        mov     ecx, [putimg.real_sy_and_abs_cy + 4]
542
        mov     ecx, [putimg.real_sy_and_abs_cy + 4]
500
        sub     ecx, edi
543
        sub     ecx, edi
501
;--------------------------------------
544
;--------------------------------------
502
; check for Y
545
; check for Y
Line 521... Line 564...
521
        call    check_mouse_area_for_putpixel_new.1
564
        call    check_mouse_area_for_putpixel_new.1
522
;--------------------------------------
565
;--------------------------------------
523
align 4
566
align 4
524
.no_mouse_area:
567
.no_mouse_area:
525
        pop     ecx
568
        pop     ecx
-
 
569
;--------------------------------------
-
 
570
align 4
-
 
571
.no_mouseunder:
526
; store to real LFB
572
; store to real LFB
527
        mov     [LFB_BASE+edx], eax
573
        mov     [LFB_BASE+edx], eax
528
;--------------------------------------
574
;--------------------------------------
529
align 4
575
align 4
530
.skip:
576
.skip:
Line 618... Line 664...
618
        lea     ebx, [ebx + ebx*2]
664
        lea     ebx, [ebx + ebx*2]
Line 619... Line 665...
619
 
665
 
620
        lea     edi, [eax+eax*2]; edi = x*3
666
        lea     edi, [eax+eax*2]; edi = x*3
621
        mov     eax, [esp+32-8+4]
667
        mov     eax, [esp+32-8+4]
-
 
668
;--------------------------------------
-
 
669
; check for hardware cursor
-
 
670
        cmp     [_display.select_cursor], 0
622
;--------------------------------------
671
        jne     @f
623
; check mouse area for putpixel
672
; check mouse area for putpixel
624
        test    eax, 0x04000000
673
        test    eax, 0x04000000
625
        jnz     @f
674
        jnz     @f
626
        call    check_mouse_area_for_putpixel
675
        call    check_mouse_area_for_putpixel
Line 646... Line 695...
646
        lea     ebx, [ebx + ebx*2]
695
        lea     ebx, [ebx + ebx*2]
Line 647... Line 696...
647
 
696
 
648
        lea     edi, [eax+eax*2]; edi = x*3
697
        lea     edi, [eax+eax*2]; edi = x*3
649
        mov     eax, [esp+32-8+4]
698
        mov     eax, [esp+32-8+4]
-
 
699
;--------------------------------------
-
 
700
; check for hardware cursor
-
 
701
        cmp     [_display.select_cursor], select_cursor
650
;--------------------------------------
702
        jne     @f
651
; check mouse area for putpixel
703
; check mouse area for putpixel
652
        test    eax, 0x04000000
704
        test    eax, 0x04000000
653
        jnz     @f
705
        jnz     @f
654
;--------------------------------------
706
;--------------------------------------
Line 691... Line 743...
691
        shl     ebx, 2
743
        shl     ebx, 2
Line 692... Line 744...
692
 
744
 
693
        lea     edi, [ebx+eax*4]; edi = x*4+(y*y multiplier)
745
        lea     edi, [ebx+eax*4]; edi = x*4+(y*y multiplier)
694
        mov     eax, [esp+32-8+4]; eax = color
746
        mov     eax, [esp+32-8+4]; eax = color
-
 
747
;--------------------------------------
-
 
748
; check for hardware cursor
-
 
749
        cmp     [_display.select_cursor], 0
695
;--------------------------------------
750
        jne     @f
696
; check mouse area for putpixel
751
; check mouse area for putpixel
697
        test    eax, 0x04000000
752
        test    eax, 0x04000000
698
        jnz     @f
753
        jnz     @f
699
        call    check_mouse_area_for_putpixel
754
        call    check_mouse_area_for_putpixel
Line 718... Line 773...
718
        shl     ebx, 2
773
        shl     ebx, 2
Line 719... Line 774...
719
 
774
 
720
        lea     edi, [ebx+eax*4]; edi = x*4+(y*y multiplier)
775
        lea     edi, [ebx+eax*4]; edi = x*4+(y*y multiplier)
721
        mov     eax, [esp+32-8+4]; eax = color
776
        mov     eax, [esp+32-8+4]; eax = color
-
 
777
;--------------------------------------
-
 
778
; check for hardware cursor
-
 
779
        cmp     [_display.select_cursor], select_cursor
722
;--------------------------------------
780
        jne     @f
723
; check mouse area for putpixel
781
; check mouse area for putpixel
724
        test    eax, 0x04000000
782
        test    eax, 0x04000000
725
        jnz     @f
783
        jnz     @f
726
;--------------------------------------
784
;--------------------------------------
Line 1151... Line 1209...
1151
align 4
1209
align 4
1152
.new_x:
1210
.new_x:
1153
        cmp     byte [ebp], bl
1211
        cmp     byte [ebp], bl
1154
        jne     .skip
1212
        jne     .skip
1155
;--------------------------------------
1213
;--------------------------------------
-
 
1214
; check for hardware cursor
-
 
1215
        cmp     [_display.select_cursor], 0
-
 
1216
        jne     .no_mouseunder
-
 
1217
 
1156
        mov     ecx, [drbar.real_sx_and_abs_cx]
1218
        mov     ecx, [drbar.real_sx_and_abs_cx]
1157
        sub     ecx, edi
1219
        sub     ecx, edi
1158
        shl     ecx, 16
1220
        shl     ecx, 16
1159
        add     ecx, [drbar.real_sy_and_abs_cy]
1221
        add     ecx, [drbar.real_sy_and_abs_cy]
1160
        sub     ecx, esi
1222
        sub     ecx, esi
Line 1161... Line 1223...
1161
 
1223
 
1162
; check mouse area for putpixel
1224
; check mouse area for putpixel
-
 
1225
        call    check_mouse_area_for_putpixel
-
 
1226
;--------------------------------------
-
 
1227
align 4
1163
        call    check_mouse_area_for_putpixel
1228
.no_mouseunder:
1164
; store to real LFB
1229
; store to real LFB
1165
        mov     [edx], ax
1230
        mov     [edx], ax
1166
        shr     eax, 16
1231
        shr     eax, 16
1167
        mov     [edx + 2], al
1232
        mov     [edx + 2], al
Line 1206... Line 1271...
1206
align 4
1271
align 4
1207
.new_x:
1272
.new_x:
1208
        cmp     byte [ebp], bl
1273
        cmp     byte [ebp], bl
1209
        jne     .skip
1274
        jne     .skip
1210
;--------------------------------------
1275
;--------------------------------------
-
 
1276
; check for hardware cursor
-
 
1277
        cmp     [_display.select_cursor], select_cursor
-
 
1278
        jne     .no_mouse_area
-
 
1279
 
1211
        mov     ecx, [drbar.real_sy_and_abs_cy]
1280
        mov     ecx, [drbar.real_sy_and_abs_cy]
1212
        sub     ecx, esi
1281
        sub     ecx, esi
1213
;--------------------------------------
1282
;--------------------------------------
1214
; check for Y
1283
; check for Y
1215
        cmp     cx, [Y_UNDER_subtraction_CUR_hot_y]
1284
        cmp     cx, [Y_UNDER_subtraction_CUR_hot_y]
Line 1286... Line 1355...
1286
align 4
1355
align 4
1287
.new_x:
1356
.new_x:
1288
        cmp     byte [ebp], bl
1357
        cmp     byte [ebp], bl
1289
        jne     .skip
1358
        jne     .skip
1290
;--------------------------------------
1359
;--------------------------------------
-
 
1360
; check for hardware cursor
-
 
1361
        cmp     [_display.select_cursor], 0
-
 
1362
        jne     .no_mouseunder
-
 
1363
 
1291
        mov     ecx, [drbar.real_sx_and_abs_cx]
1364
        mov     ecx, [drbar.real_sx_and_abs_cx]
1292
        sub     ecx, edi
1365
        sub     ecx, edi
1293
        shl     ecx, 16
1366
        shl     ecx, 16
1294
        add     ecx, [drbar.real_sy_and_abs_cy]
1367
        add     ecx, [drbar.real_sy_and_abs_cy]
1295
        sub     ecx, esi
1368
        sub     ecx, esi
Line 1296... Line 1369...
1296
 
1369
 
1297
; check mouse area for putpixel
1370
; check mouse area for putpixel
-
 
1371
        call    check_mouse_area_for_putpixel
-
 
1372
;--------------------------------------
-
 
1373
align 4
1298
        call    check_mouse_area_for_putpixel
1374
.no_mouseunder:
1299
; store to real LFB
1375
; store to real LFB
1300
        mov     [edx], eax
1376
        mov     [edx], eax
1301
        mov     eax, [drbar.color]
1377
        mov     eax, [drbar.color]
1302
;--------------------------------------
1378
;--------------------------------------
Line 1346... Line 1422...
1346
align 4
1422
align 4
1347
.new_x:
1423
.new_x:
1348
        cmp     byte [ebp], bl
1424
        cmp     byte [ebp], bl
1349
        jne     .skip
1425
        jne     .skip
1350
;--------------------------------------
1426
;--------------------------------------
-
 
1427
; check for hardware cursor
-
 
1428
        cmp     [_display.select_cursor], select_cursor
-
 
1429
        jne     .no_mouse_area
-
 
1430
 
1351
        mov     ecx, [drbar.real_sy_and_abs_cy]
1431
        mov     ecx, [drbar.real_sy_and_abs_cy]
1352
        sub     ecx, esi
1432
        sub     ecx, esi
1353
;--------------------------------------
1433
;--------------------------------------
1354
; check for Y
1434
; check for Y
1355
        cmp     cx, [Y_UNDER_subtraction_CUR_hot_y]
1435
        cmp     cx, [Y_UNDER_subtraction_CUR_hot_y]
Line 1481... Line 1561...
1481
        mov     ecx, eax
1561
        mov     ecx, eax
1482
        shl     ecx, 16
1562
        shl     ecx, 16
1483
        add     ecx, ebx
1563
        add     ecx, ebx
Line 1484... Line 1564...
1484
 
1564
 
-
 
1565
        mov     eax, [esi]
-
 
1566
 
-
 
1567
; check for hardware cursor
-
 
1568
        cmp     [_display.select_cursor], 0
-
 
1569
        je      @f
-
 
1570
        cmp     [_display.select_cursor], select_cursor
-
 
1571
        jne     .no_mouseunder
-
 
1572
;--------------------------------------
-
 
1573
align 4
1485
        mov     eax, [esi]
1574
@@:
1486
        and     eax, 0xffffff
1575
        and     eax, 0xffffff
1487
; check mouse area for putpixel
1576
; check mouse area for putpixel
-
 
1577
        call    [_display.check_mouse]
-
 
1578
;--------------------------------------
-
 
1579
align 4
1488
        call    [_display.check_mouse]
1580
.no_mouseunder:
1489
; store to real LFB
1581
; store to real LFB
1490
        mov     [edi], ax
1582
        mov     [edi], ax
1491
        shr     eax, 16
1583
        shr     eax, 16
Line 1671... Line 1763...
1671
        call    [overlapping_of_points_ptr]
1763
        call    [overlapping_of_points_ptr]
1672
;--------------------------------------
1764
;--------------------------------------
1673
align 4
1765
align 4
1674
.novert:
1766
.novert:
1675
        push    ecx
1767
        push    ecx
-
 
1768
; check for hardware cursor
-
 
1769
        cmp     [_display.select_cursor], 0
-
 
1770
        jne     @f
-
 
1771
        cmp     [_display.select_cursor], select_cursor
-
 
1772
        jne     .no_mouseunder
-
 
1773
;--------------------------------------
-
 
1774
align 4
-
 
1775
@@:
1676
        mov     ecx, [esp+20+4]        ;x
1776
        mov     ecx, [esp+20+4]        ;x
1677
        shl     ecx, 16
1777
        shl     ecx, 16
1678
        add     ecx, [esp+24+4]        ;y
1778
        add     ecx, [esp+24+4]        ;y
1679
; check mouse area for putpixel
1779
; check mouse area for putpixel
1680
        call    [_display.check_mouse]
1780
        call    [_display.check_mouse]
-
 
1781
;--------------------------------------
-
 
1782
align 4
-
 
1783
.no_mouseunder:
1681
; store to real LFB
1784
; store to real LFB
1682
        mov     [LFB_BASE+edi], ax
1785
        mov     [LFB_BASE+edi], ax
1683
        shr     eax, 16
1786
        shr     eax, 16
1684
        mov     [LFB_BASE+edi+2], al
1787
        mov     [LFB_BASE+edi+2], al
1685
        pop     ecx
1788
        pop     ecx