Subversion Repositories Kolibri OS

Rev

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

Rev 2451 Rev 2453
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: 2451 $
20
$Revision: 2453 $
21
 
21
 
Line 283... Line 283...
283
        cmp     byte [ScreenBPP], 32
283
        cmp     byte [ScreenBPP], 32
284
        je      put_image_end_32
284
        je      put_image_end_32
285
;--------------------------------------
285
;--------------------------------------
286
put_image_end_24:
286
put_image_end_24:
287
        mov     edi, [putimg.real_sy]
287
        mov     edi, [putimg.real_sy]
-
 
288
;--------------------------------------
-
 
289
; check for hardware cursor
288
        cmp     [_display.select_cursor], 0
290
        cmp     [_display.select_cursor], 0
-
 
291
        je      put_image_end_24_old
-
 
292
        cmp     [_display.select_cursor], select_cursor
289
        jne     put_image_end_24_new
293
        je      put_image_end_24_new
-
 
294
;--------------------------------------
-
 
295
align 4
-
 
296
.new_line:
-
 
297
        mov     ecx, [putimg.real_sx]
-
 
298
;--------------------------------------
-
 
299
align 4
-
 
300
.new_x:
-
 
301
        push    [putimg.edi]
-
 
302
        mov     eax, [putimg.ebp+4]
-
 
303
        call    eax
-
 
304
        cmp     [ebp], bl
-
 
305
        jne     .skip
-
 
306
;--------------------------------------
-
 
307
; store to real LFB
-
 
308
        mov     [LFB_BASE+edx], ax
-
 
309
        shr     eax, 16
-
 
310
        mov     [LFB_BASE+edx+2], al
-
 
311
;--------------------------------------
-
 
312
align 4
-
 
313
.skip:
-
 
314
        add     edx, 3
-
 
315
        inc     ebp
-
 
316
        dec     ecx
-
 
317
        jnz     .new_x
-
 
318
 
-
 
319
        add     esi, [putimg.line_increment]
-
 
320
        add     edx, [putimg.screen_newline];[BytesPerScanLine]
-
 
321
        add     ebp, [putimg.winmap_newline];[Screen_Max_X]
-
 
322
 
-
 
323
        cmp     [putimg.ebp], putimage_get1bpp
-
 
324
        jz      .correct
-
 
325
        cmp     [putimg.ebp], putimage_get2bpp
-
 
326
        jz      .correct
-
 
327
        cmp     [putimg.ebp], putimage_get4bpp
-
 
328
        jnz     @f
-
 
329
;--------------------------------------
-
 
330
align 4
-
 
331
.correct:
-
 
332
        mov     eax, [putimg.edi]
-
 
333
        mov     byte [eax], 80h
-
 
334
;--------------------------------------
-
 
335
align 4
-
 
336
@@:
-
 
337
        dec     edi
-
 
338
        jnz     .new_line
-
 
339
;--------------------------------------
-
 
340
align 4
-
 
341
.finish:
-
 
342
        add     esp, putimg.stack_data
-
 
343
        popad
-
 
344
        ret
-
 
345
;------------------------------------------------------------------------------
-
 
346
align 4
-
 
347
put_image_end_24_old:
290
;--------------------------------------
348
;--------------------------------------
291
align 4
349
align 4
292
.new_line:
350
.new_line:
293
        mov     ecx, [putimg.real_sx]
351
        mov     ecx, [putimg.real_sx]
294
;--------------------------------------
352
;--------------------------------------
Line 298... Line 356...
298
        mov     eax, [putimg.ebp+4]
356
        mov     eax, [putimg.ebp+4]
299
        call    eax
357
        call    eax
300
        cmp     [ebp], bl
358
        cmp     [ebp], bl
301
        jne     .skip
359
        jne     .skip
302
;--------------------------------------
360
;--------------------------------------
303
; check for hardware cursor
-
 
304
        cmp     [_display.select_cursor], 0
-
 
305
        jne     .no_mouseunder
-
 
306
        push    ecx
361
        push    ecx
Line 307... Line 362...
307
 
362
 
308
        neg     ecx
363
        neg     ecx
309
        add     ecx, [putimg.real_sx_and_abs_cx + 4]
364
        add     ecx, [putimg.real_sx_and_abs_cx + 4]
Line 312... Line 367...
312
        sub     ecx, edi
367
        sub     ecx, edi
Line 313... Line 368...
313
 
368
 
314
; check mouse area for putpixel
369
; check mouse area for putpixel
315
        call    check_mouse_area_for_putpixel
370
        call    check_mouse_area_for_putpixel
316
        pop     ecx
-
 
317
;--------------------------------------
-
 
318
align 4
-
 
319
.no_mouseunder:
371
        pop     ecx
320
; store to real LFB
372
; store to real LFB
321
        mov     [LFB_BASE+edx], ax
373
        mov     [LFB_BASE+edx], ax
322
        shr     eax, 16
374
        shr     eax, 16
323
        mov     [LFB_BASE+edx+2], al
375
        mov     [LFB_BASE+edx+2], al
Line 347... Line 399...
347
;--------------------------------------
399
;--------------------------------------
348
align 4
400
align 4
349
@@:
401
@@:
350
        dec     edi
402
        dec     edi
351
        jnz     .new_line
403
        jnz     .new_line
352
;--------------------------------------
-
 
353
align 4
-
 
354
.finish:
-
 
355
        add     esp, putimg.stack_data
404
        jmp     put_image_end_24.finish
356
        popad
-
 
357
        ret
-
 
358
;--------------------------------------
405
;------------------------------------------------------------------------------
359
align 4
406
align 4
360
put_image_end_24_new:
407
put_image_end_24_new:
361
;--------------------------------------
408
;--------------------------------------
362
align 4
409
align 4
363
.new_line:
410
.new_line:
Line 369... Line 416...
369
        mov     eax, [putimg.ebp+4]
416
        mov     eax, [putimg.ebp+4]
370
        call    eax
417
        call    eax
371
        cmp     [ebp], bl
418
        cmp     [ebp], bl
372
        jne     .skip
419
        jne     .skip
373
;--------------------------------------
420
;--------------------------------------
374
; check for hardware cursor
-
 
375
        cmp     [_display.select_cursor], select_cursor
-
 
376
        jne     .no_mouseunder
-
 
377
 
-
 
378
        push    ecx
421
        push    ecx
379
        mov     ecx, [putimg.real_sy_and_abs_cy + 4]
422
        mov     ecx, [putimg.real_sy_and_abs_cy + 4]
380
        sub     ecx, edi
423
        sub     ecx, edi
381
;--------------------------------------
424
;--------------------------------------
382
; check for Y
425
; check for Y
Line 401... Line 444...
401
        call    check_mouse_area_for_putpixel_new.1
444
        call    check_mouse_area_for_putpixel_new.1
402
;--------------------------------------
445
;--------------------------------------
403
align 4
446
align 4
404
.no_mouse_area:
447
.no_mouse_area:
405
        pop     ecx
448
        pop     ecx
406
;--------------------------------------
-
 
407
align 4
-
 
408
.no_mouseunder:
-
 
409
; store to real LFB
449
; store to real LFB
410
        mov     [LFB_BASE+edx], ax
450
        mov     [LFB_BASE+edx], ax
411
        shr     eax, 16
451
        shr     eax, 16
412
        mov     [LFB_BASE+edx+2], al
452
        mov     [LFB_BASE+edx+2], al
413
;--------------------------------------
453
;--------------------------------------
Line 441... Line 481...
441
        jmp     put_image_end_24.finish
481
        jmp     put_image_end_24.finish
442
;------------------------------------------------------------------------------
482
;------------------------------------------------------------------------------
443
align 4
483
align 4
444
put_image_end_32:
484
put_image_end_32:
445
        mov     edi, [putimg.real_sy]
485
        mov     edi, [putimg.real_sy]
-
 
486
;--------------------------------------
-
 
487
; check for hardware cursor
446
        cmp     [_display.select_cursor], 0
488
        cmp     [_display.select_cursor], 0
-
 
489
        je      put_image_end_32_old
-
 
490
        cmp     [_display.select_cursor], select_cursor
447
        jne     put_image_end_32_new
491
        je      put_image_end_32_new
448
;--------------------------------------
492
;--------------------------------------
449
align 4
493
align 4
450
.new_line:
494
.new_line:
451
        mov     ecx, [putimg.real_sx]
495
        mov     ecx, [putimg.real_sx]
452
;--------------------------------------
496
;--------------------------------------
Line 456... Line 500...
456
        mov     eax, [putimg.ebp+4]
500
        mov     eax, [putimg.ebp+4]
457
        call    eax
501
        call    eax
458
        cmp     [ebp], bl
502
        cmp     [ebp], bl
459
        jne     .skip
503
        jne     .skip
460
;--------------------------------------
504
;--------------------------------------
461
; check for hardware cursor
-
 
462
        cmp     [_display.select_cursor], 0
-
 
463
        jne     .no_mouseunder
-
 
464
 
-
 
465
        push    ecx
-
 
466
 
-
 
467
        neg     ecx
-
 
468
        add     ecx, [putimg.real_sx_and_abs_cx + 4]
-
 
469
        shl     ecx, 16
-
 
470
        add     ecx, [putimg.real_sy_and_abs_cy + 4]
-
 
471
        sub     ecx, edi
-
 
472
 
-
 
473
; check mouse area for putpixel
-
 
474
        call    check_mouse_area_for_putpixel
-
 
475
        pop     ecx
-
 
476
;--------------------------------------
-
 
477
align 4
-
 
478
.no_mouseunder:
-
 
479
; store to real LFB
505
; store to real LFB
480
        mov     [LFB_BASE+edx], eax
506
        mov     [LFB_BASE+edx], eax
481
;--------------------------------------
507
;--------------------------------------
482
align 4
508
align 4
483
.skip:
509
.skip:
Line 517... Line 543...
517
;--------------------------------------
543
;--------------------------------------
518
align 4
544
align 4
519
@@:
545
@@:
520
        mov     [EGA_counter], 1
546
        mov     [EGA_counter], 1
521
        ret
547
        ret
-
 
548
;------------------------------------------------------------------------------
-
 
549
align 4
-
 
550
put_image_end_32_old:
-
 
551
;--------------------------------------
-
 
552
align 4
-
 
553
.new_line:
-
 
554
        mov     ecx, [putimg.real_sx]
-
 
555
;--------------------------------------
-
 
556
align 4
-
 
557
.new_x:
-
 
558
        push    [putimg.edi]
-
 
559
        mov     eax, [putimg.ebp+4]
-
 
560
        call    eax
-
 
561
        cmp     [ebp], bl
-
 
562
        jne     .skip
-
 
563
;--------------------------------------
-
 
564
        push    ecx
-
 
565
 
-
 
566
        neg     ecx
-
 
567
        add     ecx, [putimg.real_sx_and_abs_cx + 4]
-
 
568
        shl     ecx, 16
-
 
569
        add     ecx, [putimg.real_sy_and_abs_cy + 4]
-
 
570
        sub     ecx, edi
-
 
571
 
-
 
572
; check mouse area for putpixel
-
 
573
        call    check_mouse_area_for_putpixel
-
 
574
        pop     ecx
-
 
575
; store to real LFB
-
 
576
        mov     [LFB_BASE+edx], eax
-
 
577
;--------------------------------------
-
 
578
align 4
-
 
579
.skip:
-
 
580
        add     edx, 4
-
 
581
        inc     ebp
-
 
582
        dec     ecx
-
 
583
        jnz     .new_x
-
 
584
 
-
 
585
        add     esi, [putimg.line_increment]
-
 
586
        add     edx, [putimg.screen_newline];[BytesPerScanLine]
-
 
587
        add     ebp, [putimg.winmap_newline];[Screen_Max_X]
-
 
588
 
-
 
589
        cmp     [putimg.ebp], putimage_get1bpp
-
 
590
        jz      .correct
-
 
591
        cmp     [putimg.ebp], putimage_get2bpp
-
 
592
        jz      .correct
-
 
593
        cmp     [putimg.ebp], putimage_get4bpp
-
 
594
        jnz     @f
-
 
595
;--------------------------------------
-
 
596
align 4
-
 
597
.correct:
-
 
598
        mov     eax, [putimg.edi]
-
 
599
        mov     byte [eax], 80h
522
;--------------------------------------
600
;--------------------------------------
523
align 4
601
align 4
-
 
602
@@:
-
 
603
        dec     edi
-
 
604
        jnz     .new_line
-
 
605
        jmp     put_image_end_32.finish
-
 
606
;------------------------------------------------------------------------------
-
 
607
align 4
524
put_image_end_32_new:
608
put_image_end_32_new:
525
;--------------------------------------
609
;--------------------------------------
526
align 4
610
align 4
527
.new_line:
611
.new_line:
528
        mov     ecx, [putimg.real_sx]
612
        mov     ecx, [putimg.real_sx]
Line 533... Line 617...
533
        mov     eax, [putimg.ebp+4]
617
        mov     eax, [putimg.ebp+4]
534
        call    eax
618
        call    eax
535
        cmp     [ebp], bl
619
        cmp     [ebp], bl
536
        jne     .skip
620
        jne     .skip
537
;--------------------------------------
621
;--------------------------------------
538
; check for hardware cursor
-
 
539
        cmp     [_display.select_cursor], select_cursor
-
 
540
        jne     .no_mouseunder
-
 
541
        push    ecx
622
        push    ecx
542
        mov     ecx, [putimg.real_sy_and_abs_cy + 4]
623
        mov     ecx, [putimg.real_sy_and_abs_cy + 4]
543
        sub     ecx, edi
624
        sub     ecx, edi
544
;--------------------------------------
625
;--------------------------------------
545
; check for Y
626
; check for Y
Line 564... Line 645...
564
        call    check_mouse_area_for_putpixel_new.1
645
        call    check_mouse_area_for_putpixel_new.1
565
;--------------------------------------
646
;--------------------------------------
566
align 4
647
align 4
567
.no_mouse_area:
648
.no_mouse_area:
568
        pop     ecx
649
        pop     ecx
569
;--------------------------------------
-
 
570
align 4
-
 
571
.no_mouseunder:
-
 
572
; store to real LFB
650
; store to real LFB
573
        mov     [LFB_BASE+edx], eax
651
        mov     [LFB_BASE+edx], eax
574
;--------------------------------------
652
;--------------------------------------
575
align 4
653
align 4
576
.skip:
654
.skip:
Line 973... Line 1051...
973
align 4
1051
align 4
974
@@:
1052
@@:
975
;--------------------------------------
1053
;--------------------------------------
976
        shr     ebx, 16
1054
        shr     ebx, 16
977
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
1055
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
978
        call    [putpixel]
1056
;        call    [putpixel]
-
 
1057
        call    __sys_putpixel
979
        pop     ebx eax
1058
        pop     ebx eax
980
        add     ebx, ebp     ; y = y+dy
1059
        add     ebx, ebp     ; y = y+dy
981
        add     eax, esi     ; x = x+dx
1060
        add     eax, esi     ; x = x+dx
982
        dec     edx
1061
        dec     edx
983
        jnz     .draw
1062
        jnz     .draw
984
; force last drawn pixel to be at (x2,y2)
1063
; force last drawn pixel to be at (x2,y2)
985
        mov     eax, [dl_x2]
1064
        mov     eax, [dl_x2]
986
        mov     ebx, [dl_y2]
1065
        mov     ebx, [dl_y2]
987
        and     ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
1066
        and     ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
988
        call    [putpixel]
1067
;        call    [putpixel]
-
 
1068
        call    __sys_putpixel
989
;--------------------------------------
1069
;--------------------------------------
990
align 4
1070
align 4
991
.exit:
1071
.exit:
992
        add     esp, 6*4
1072
        add     esp, 6*4
993
        popa
1073
        popa
Line 1008... Line 1088...
1008
        xchg    eax, edx
1088
        xchg    eax, edx
1009
;--------------------------------------
1089
;--------------------------------------
1010
align 4
1090
align 4
1011
@@:
1091
@@:
1012
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
1092
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
1013
        call    [putpixel]
1093
;        call    [putpixel]
-
 
1094
        call    __sys_putpixel
1014
        inc     eax
1095
        inc     eax
1015
        cmp     eax, edx
1096
        cmp     eax, edx
1016
        jle     @b
1097
        jle     @b
1017
        pop     edx eax
1098
        pop     edx eax
1018
        ret
1099
        ret
Line 1031... Line 1112...
1031
        xchg    ebx, edx
1112
        xchg    ebx, edx
1032
;--------------------------------------
1113
;--------------------------------------
1033
align 4
1114
align 4
1034
@@:
1115
@@:
1035
        and     ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
1116
        and     ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
1036
        call    [putpixel]
1117
;        call    [putpixel]
-
 
1118
        call    __sys_putpixel
1037
        inc     ebx
1119
        inc     ebx
1038
        cmp     ebx, edx
1120
        cmp     ebx, edx
1039
        jle     @b
1121
        jle     @b
1040
        pop     edx ebx
1122
        pop     edx ebx
1041
        ret
1123
        ret
Line 1197... Line 1279...
1197
; bl - process num
1279
; bl - process num
1198
; ecx - temp
1280
; ecx - temp
1199
; edx - pointer to screen
1281
; edx - pointer to screen
1200
; esi - counter
1282
; esi - counter
1201
; edi - counter
1283
; edi - counter
-
 
1284
;--------------------------------------
-
 
1285
; check for hardware cursor
1202
        cmp     [_display.select_cursor], 0
1286
        cmp     [_display.select_cursor], 0
-
 
1287
        je      draw_bar_end_24_old
-
 
1288
        cmp     [_display.select_cursor], select_cursor
1203
        jne     draw_bar_end_24_new
1289
        je      draw_bar_end_24_new
1204
;--------------------------------------
1290
;--------------------------------------
1205
align 4
1291
align 4
1206
.new_y:
1292
.new_y:
1207
        mov     edi, [drbar.real_sx]
1293
        mov     edi, [drbar.real_sx]
1208
;--------------------------------------
1294
;--------------------------------------
1209
align 4
1295
align 4
1210
.new_x:
1296
.new_x:
1211
        cmp     byte [ebp], bl
1297
        cmp     byte [ebp], bl
1212
        jne     .skip
1298
        jne     .skip
1213
;--------------------------------------
1299
;--------------------------------------
1214
; check for hardware cursor
-
 
1215
        cmp     [_display.select_cursor], 0
-
 
1216
        jne     .no_mouseunder
-
 
1217
 
-
 
1218
        mov     ecx, [drbar.real_sx_and_abs_cx]
-
 
1219
        sub     ecx, edi
-
 
1220
        shl     ecx, 16
-
 
1221
        add     ecx, [drbar.real_sy_and_abs_cy]
-
 
1222
        sub     ecx, esi
-
 
1223
 
-
 
1224
; check mouse area for putpixel
-
 
1225
        call    check_mouse_area_for_putpixel
-
 
1226
;--------------------------------------
-
 
1227
align 4
-
 
1228
.no_mouseunder:
-
 
1229
; store to real LFB
1300
; store to real LFB
1230
        mov     [edx], ax
1301
        mov     [edx], ax
1231
        shr     eax, 16
1302
        shr     eax, 16
1232
        mov     [edx + 2], al
1303
        mov     [edx + 2], al
1233
        mov     eax, [drbar.color]
-
 
1234
;--------------------------------------
1304
;--------------------------------------
1235
align 4
1305
align 4
1236
.skip:
1306
.skip:
1237
; add pixel
1307
; add pixel
1238
        add     edx, 3
1308
        add     edx, 3
Line 1258... Line 1328...
1258
.end:
1328
.end:
1259
        add     esp, drbar.stack_data
1329
        add     esp, drbar.stack_data
1260
        popad
1330
        popad
1261
        xor     eax, eax
1331
        xor     eax, eax
1262
        ret
1332
        ret
-
 
1333
;------------------------------------------------------------------------------
-
 
1334
align 4
-
 
1335
draw_bar_end_24_old:
1263
;--------------------------------------
1336
;--------------------------------------
1264
align 4
1337
align 4
-
 
1338
.new_y:
-
 
1339
        mov     edi, [drbar.real_sx]
-
 
1340
;--------------------------------------
-
 
1341
align 4
-
 
1342
.new_x:
-
 
1343
        cmp     byte [ebp], bl
-
 
1344
        jne     .skip
-
 
1345
;--------------------------------------
-
 
1346
        mov     ecx, [drbar.real_sx_and_abs_cx]
-
 
1347
        sub     ecx, edi
-
 
1348
        shl     ecx, 16
-
 
1349
        add     ecx, [drbar.real_sy_and_abs_cy]
-
 
1350
        sub     ecx, esi
-
 
1351
; check mouse area for putpixel
-
 
1352
        call    check_mouse_area_for_putpixel
-
 
1353
; store to real LFB
-
 
1354
        mov     [edx], ax
-
 
1355
        shr     eax, 16
-
 
1356
        mov     [edx + 2], al
-
 
1357
        mov     eax, [drbar.color]
-
 
1358
;--------------------------------------
-
 
1359
align 4
-
 
1360
.skip:
-
 
1361
; add pixel
-
 
1362
        add     edx, 3
-
 
1363
        inc     ebp
-
 
1364
        dec     edi
-
 
1365
        jnz     .new_x
-
 
1366
; add line
-
 
1367
        add     edx, [drbar.line_inc_scr]
-
 
1368
        add     ebp, [drbar.line_inc_map]
-
 
1369
; drawing gradient bars
-
 
1370
        test    bh, 0x80
-
 
1371
        jz      @f
-
 
1372
        test    al, al
-
 
1373
        jz      @f
-
 
1374
        dec     al
-
 
1375
;--------------------------------------
-
 
1376
align 4
-
 
1377
@@:
-
 
1378
        dec     esi
-
 
1379
        jnz     .new_y
-
 
1380
        jmp     draw_bar_end_24.end
-
 
1381
;------------------------------------------------------------------------------
-
 
1382
align 4
1265
draw_bar_end_24_new:
1383
draw_bar_end_24_new:
1266
;--------------------------------------
1384
;--------------------------------------
1267
align 4
1385
align 4
1268
.new_y:
1386
.new_y:
1269
        mov     edi, [drbar.real_sx]
1387
        mov     edi, [drbar.real_sx]
Line 1271... Line 1389...
1271
align 4
1389
align 4
1272
.new_x:
1390
.new_x:
1273
        cmp     byte [ebp], bl
1391
        cmp     byte [ebp], bl
1274
        jne     .skip
1392
        jne     .skip
1275
;--------------------------------------
1393
;--------------------------------------
1276
; check for hardware cursor
-
 
1277
        cmp     [_display.select_cursor], select_cursor
-
 
1278
        jne     .no_mouse_area
-
 
1279
 
-
 
1280
        mov     ecx, [drbar.real_sy_and_abs_cy]
1394
        mov     ecx, [drbar.real_sy_and_abs_cy]
1281
        sub     ecx, esi
1395
        sub     ecx, esi
1282
;--------------------------------------
1396
;--------------------------------------
1283
; check for Y
1397
; check for Y
1284
        cmp     cx, [Y_UNDER_subtraction_CUR_hot_y]
1398
        cmp     cx, [Y_UNDER_subtraction_CUR_hot_y]
Line 1334... Line 1448...
1334
align 4
1448
align 4
1335
@@:
1449
@@:
1336
        dec     esi
1450
        dec     esi
1337
        jnz     .new_y
1451
        jnz     .new_y
1338
        jmp     draw_bar_end_24.end
1452
        jmp     draw_bar_end_24.end
1339
;--------------------------------------
1453
;------------------------------------------------------------------------------
1340
align 4
1454
align 4
1341
draw_bar_end_32:
1455
draw_bar_end_32:
1342
; eax - color high   RRGGBB
1456
; eax - color high   RRGGBB
1343
; bl - process num
1457
; bl - process num
1344
; ecx - temp
1458
; ecx - temp
1345
; edx - pointer to screen
1459
; edx - pointer to screen
1346
; esi - counter
1460
; esi - counter
1347
; edi - counter
1461
; edi - counter
-
 
1462
;--------------------------------------
-
 
1463
; check for hardware cursor
1348
        cmp     [_display.select_cursor], 0
1464
        cmp     [_display.select_cursor], 0
-
 
1465
        je      draw_bar_end_32_old
-
 
1466
        cmp     [_display.select_cursor], select_cursor
1349
        jne     draw_bar_end_32_new
1467
        je      draw_bar_end_32_new
1350
;--------------------------------------
1468
;--------------------------------------
1351
align 4
1469
align 4
1352
.new_y:
1470
.new_y:
1353
        mov     edi, [drbar.real_sx]
1471
        mov     edi, [drbar.real_sx]
1354
;--------------------------------------
1472
;--------------------------------------
1355
align 4
1473
align 4
1356
.new_x:
1474
.new_x:
1357
        cmp     byte [ebp], bl
1475
        cmp     byte [ebp], bl
1358
        jne     .skip
1476
        jne     .skip
1359
;--------------------------------------
1477
;--------------------------------------
1360
; check for hardware cursor
-
 
1361
        cmp     [_display.select_cursor], 0
-
 
1362
        jne     .no_mouseunder
-
 
1363
 
-
 
1364
        mov     ecx, [drbar.real_sx_and_abs_cx]
-
 
1365
        sub     ecx, edi
-
 
1366
        shl     ecx, 16
-
 
1367
        add     ecx, [drbar.real_sy_and_abs_cy]
-
 
1368
        sub     ecx, esi
-
 
1369
 
-
 
1370
; check mouse area for putpixel
-
 
1371
        call    check_mouse_area_for_putpixel
-
 
1372
;--------------------------------------
-
 
1373
align 4
-
 
1374
.no_mouseunder:
-
 
1375
; store to real LFB
1478
; store to real LFB
1376
        mov     [edx], eax
1479
        mov     [edx], eax
1377
        mov     eax, [drbar.color]
1480
        mov     eax, [drbar.color]
1378
;--------------------------------------
1481
;--------------------------------------
1379
align 4
1482
align 4
Line 1409... Line 1512...
1409
align 4
1512
align 4
1410
@@:
1513
@@:
1411
        xor     eax, eax
1514
        xor     eax, eax
1412
        mov     [EGA_counter], 1
1515
        mov     [EGA_counter], 1
1413
        ret
1516
        ret
-
 
1517
;------------------------------------------------------------------------------
-
 
1518
align 4
-
 
1519
draw_bar_end_32_old:
-
 
1520
;--------------------------------------
-
 
1521
align 4
-
 
1522
.new_y:
-
 
1523
        mov     edi, [drbar.real_sx]
-
 
1524
;--------------------------------------
-
 
1525
align 4
-
 
1526
.new_x:
-
 
1527
        cmp     byte [ebp], bl
-
 
1528
        jne     .skip
-
 
1529
;--------------------------------------
-
 
1530
        mov     ecx, [drbar.real_sx_and_abs_cx]
-
 
1531
        sub     ecx, edi
-
 
1532
        shl     ecx, 16
-
 
1533
        add     ecx, [drbar.real_sy_and_abs_cy]
-
 
1534
        sub     ecx, esi
-
 
1535
 
-
 
1536
; check mouse area for putpixel
-
 
1537
        call    check_mouse_area_for_putpixel
-
 
1538
; store to real LFB
-
 
1539
        mov     [edx], eax
-
 
1540
        mov     eax, [drbar.color]
1414
;--------------------------------------
1541
;--------------------------------------
1415
align 4
1542
align 4
-
 
1543
.skip:
-
 
1544
; add pixel
-
 
1545
        add     edx, 4
-
 
1546
        inc     ebp
-
 
1547
        dec     edi
-
 
1548
        jnz     .new_x
-
 
1549
; add line
-
 
1550
        add     edx, [drbar.line_inc_scr]
-
 
1551
        add     ebp, [drbar.line_inc_map]
-
 
1552
; drawing gradient bars
-
 
1553
        test    bh, 0x80
-
 
1554
        jz      @f
-
 
1555
        test    al, al
-
 
1556
        jz      @f
-
 
1557
        dec     al
-
 
1558
;--------------------------------------
-
 
1559
align 4
-
 
1560
@@:
-
 
1561
        dec     esi
-
 
1562
        jnz     .new_y
-
 
1563
        jmp     draw_bar_end_32.end
-
 
1564
;------------------------------------------------------------------------------
-
 
1565
align 4
1416
draw_bar_end_32_new:
1566
draw_bar_end_32_new:
1417
;--------------------------------------
1567
;--------------------------------------
1418
align 4
1568
align 4
1419
.new_y:
1569
.new_y:
1420
        mov     edi, [drbar.real_sx]
1570
        mov     edi, [drbar.real_sx]
Line 1422... Line 1572...
1422
align 4
1572
align 4
1423
.new_x:
1573
.new_x:
1424
        cmp     byte [ebp], bl
1574
        cmp     byte [ebp], bl
1425
        jne     .skip
1575
        jne     .skip
1426
;--------------------------------------
1576
;--------------------------------------
1427
; check for hardware cursor
-
 
1428
        cmp     [_display.select_cursor], select_cursor
-
 
1429
        jne     .no_mouse_area
-
 
1430
 
-
 
1431
        mov     ecx, [drbar.real_sy_and_abs_cy]
1577
        mov     ecx, [drbar.real_sy_and_abs_cy]
1432
        sub     ecx, esi
1578
        sub     ecx, esi
1433
;--------------------------------------
1579
;--------------------------------------
1434
; check for Y
1580
; check for Y
1435
        cmp     cx, [Y_UNDER_subtraction_CUR_hot_y]
1581
        cmp     cx, [Y_UNDER_subtraction_CUR_hot_y]