Subversion Repositories Kolibri OS

Rev

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

Rev 2987 Rev 3555
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: 2987 $
20
$Revision: 3555 $
21
 
21
 
Line 229... Line 229...
229
        inc     eax
229
        inc     eax
230
        sub     eax, [putimg.real_sx]
230
        sub     eax, [putimg.real_sx]
231
        mov     [putimg.winmap_newline], eax
231
        mov     [putimg.winmap_newline], eax
232
; screen new line increment
232
; screen new line increment
233
        mov     eax, [BytesPerScanLine]
233
        mov     eax, [BytesPerScanLine]
234
        movzx   ebx, byte [ScreenBPP]
234
        mov     ebx, [_display.bpp]
235
        shr     ebx, 3
235
        shr     ebx, 3
236
        imul    ecx, ebx
236
        imul    ecx, ebx
237
        sub     eax, ecx
237
        sub     eax, ecx
238
        mov     [putimg.screen_newline], eax
238
        mov     [putimg.screen_newline], eax
239
; pointer to image
239
; pointer to image
Line 264... Line 264...
264
        add     ecx, [putimg.abs_cy]
264
        add     ecx, [putimg.abs_cy]
265
        mov     [putimg.real_sy_and_abs_cy], ecx
265
        mov     [putimg.real_sy_and_abs_cy], ecx
266
;--------------------------------------
266
;--------------------------------------
267
; get process number
267
; get process number
268
        mov     ebx, [CURRENT_TASK]
268
        mov     ebx, [CURRENT_TASK]
269
        cmp     byte [ScreenBPP], 32
269
        cmp     byte [_display.bpp], 32
270
        je      put_image_end_32
270
        je      put_image_end_32
271
;--------------------------------------
271
;--------------------------------------
272
put_image_end_24:
272
put_image_end_24:
273
        mov     edi, [putimg.real_sy]
273
        mov     edi, [putimg.real_sy]
274
;--------------------------------------
274
;--------------------------------------
Line 532... Line 532...
532
;--------------------------------------
532
;--------------------------------------
533
align 4
533
align 4
534
.finish:
534
.finish:
535
        add     esp, putimg.stack_data
535
        add     esp, putimg.stack_data
536
        popad
536
        popad
537
        cmp     [SCR_MODE], dword 0x12
537
        cmp     [SCR_MODE], 0x12
538
        jne     @f
538
        jne     @f
539
        call    VGA__putimage
539
        call    VGA__putimage
540
;--------------------------------------
540
;--------------------------------------
541
align 4
541
align 4
542
@@:
542
@@:
Line 1227... Line 1227...
1227
        sub     eax, [drbar.real_sx]
1227
        sub     eax, [drbar.real_sx]
1228
        inc     eax
1228
        inc     eax
1229
        mov     [drbar.line_inc_map], eax
1229
        mov     [drbar.line_inc_map], eax
1230
; line_inc_scr
1230
; line_inc_scr
1231
        mov     eax, [drbar.real_sx]
1231
        mov     eax, [drbar.real_sx]
1232
        movzx   ebx, byte [ScreenBPP]
1232
        mov     ebx, [_display.bpp]
1233
        shr     ebx, 3
1233
        shr     ebx, 3
1234
        imul    eax, ebx
1234
        imul    eax, ebx
1235
        neg     eax
1235
        neg     eax
1236
        add     eax, [BytesPerScanLine]
1236
        add     eax, [BytesPerScanLine]
1237
        mov     [drbar.line_inc_scr], eax
1237
        mov     [drbar.line_inc_scr], eax
Line 1266... Line 1266...
1266
        mov     esi, [drbar.real_sy]
1266
        mov     esi, [drbar.real_sy]
1267
        mov     eax, [drbar.color] ; BBGGRR00
1267
        mov     eax, [drbar.color] ; BBGGRR00
1268
        rol     eax, 8
1268
        rol     eax, 8
1269
        mov     bh, al  ; 0x80 drawing gradient bars
1269
        mov     bh, al  ; 0x80 drawing gradient bars
1270
        ror     eax, 8
1270
        ror     eax, 8
1271
        cmp     byte [ScreenBPP], 24
1271
        cmp     byte [_display.bpp], 24
1272
        jne     draw_bar_end_32
1272
        jne     draw_bar_end_32
1273
;--------------------------------------
1273
;--------------------------------------
1274
align 4
1274
align 4
1275
draw_bar_end_24:
1275
draw_bar_end_24:
1276
; eax - color high   RRGGBB
1276
; eax - color high   RRGGBB
Line 1506... Line 1506...
1506
;--------------------------------------
1506
;--------------------------------------
1507
align 4
1507
align 4
1508
.end:
1508
.end:
1509
        add     esp, drbar.stack_data
1509
        add     esp, drbar.stack_data
1510
        popad
1510
        popad
1511
        cmp     [SCR_MODE], dword 0x12
1511
        cmp     [SCR_MODE], 0x12
1512
        jne     @f
1512
        jne     @f
1513
        call    VGA_draw_bar
1513
        call    VGA_draw_bar
1514
;--------------------------------------
1514
;--------------------------------------
1515
align 4
1515
align 4
1516
@@:
1516
@@:
Line 1651... Line 1651...
1651
        mov     eax, [BPSLine_calc_area+ebx*4]
1651
        mov     eax, [BPSLine_calc_area+ebx*4]
1652
        xchg    ebp, eax
1652
        xchg    ebp, eax
1653
        add     ebp, eax
1653
        add     ebp, eax
1654
        add     ebp, eax
1654
        add     ebp, eax
1655
        add     ebp, eax
1655
        add     ebp, eax
1656
        cmp     [ScreenBPP], byte 24    ; 24 or 32 bpp ? - x size
1656
        cmp     byte [_display.bpp], 24    ; 24 or 32 bpp ? - x size
1657
        jz      @f
1657
        jz      @f
1658
        add     ebp, eax
1658
        add     ebp, eax
1659
;--------------------------------------
1659
;--------------------------------------
1660
align 4
1660
align 4
1661
@@:
1661
@@:
Line 1731... Line 1731...
1731
        add     esi, 3
1731
        add     esi, 3
1732
        add     edi, 3
1732
        add     edi, 3
1733
;--------------------------------------
1733
;--------------------------------------
1734
align 4
1734
align 4
1735
@@:
1735
@@:
1736
        cmp     [ScreenBPP], byte 25    ; 24 or 32 bpp?
1736
        cmp     byte [_display.bpp], 25    ; 24 or 32 bpp?
1737
        sbb     edi, -1         ; +1 for 32 bpp
1737
        sbb     edi, -1         ; +1 for 32 bpp
1738
; I do not use 'inc eax' because this is slightly slower then 'add eax,1'
1738
; I do not use 'inc eax' because this is slightly slower then 'add eax,1'
1739
        add     ebp, edx
1739
        add     ebp, edx
1740
        add     eax, edx
1740
        add     eax, edx
1741
        cmp     eax, [draw_data+32+RECT.right]
1741
        cmp     eax, [draw_data+32+RECT.right]
Line 1755... Line 1755...
1755
        inc     ebx
1755
        inc     ebx
1756
        cmp     ebx, [draw_data+32+RECT.bottom]
1756
        cmp     ebx, [draw_data+32+RECT.bottom]
1757
        jbe     dp2
1757
        jbe     dp2
1758
        popad
1758
        popad
1759
        mov     [EGA_counter], 1
1759
        mov     [EGA_counter], 1
1760
        cmp     [SCR_MODE], dword 0x12
1760
        cmp     [SCR_MODE], 0x12
1761
        jne     @f
1761
        jne     @f
1762
        call    VGA_drawbackground
1762
        call    VGA_drawbackground
1763
;--------------------------------------
1763
;--------------------------------------
1764
align 4
1764
align 4
1765
@@:
1765
@@:
Line 1797... Line 1797...
1797
        mov     eax, [BPSLine_calc_area+ebx*4]
1797
        mov     eax, [BPSLine_calc_area+ebx*4]
1798
        xchg    ebp, eax
1798
        xchg    ebp, eax
1799
        add     ebp, eax
1799
        add     ebp, eax
1800
        add     ebp, eax
1800
        add     ebp, eax
1801
        add     ebp, eax
1801
        add     ebp, eax
1802
        cmp     [ScreenBPP], byte 24    ; 24 or 32 bpp ? - x size
1802
        cmp     byte [_display.bpp], 24    ; 24 or 32 bpp ? - x size
1803
        jz      @f
1803
        jz      @f
1804
        add     ebp, eax
1804
        add     ebp, eax
1805
;--------------------------------------
1805
;--------------------------------------
1806
align 4
1806
align 4
1807
@@:
1807
@@:
Line 1916... Line 1916...
1916
        mov     [LFB_BASE+edi+2], al
1916
        mov     [LFB_BASE+edi+2], al
1917
        pop     ecx
1917
        pop     ecx
1918
;--------------------------------------
1918
;--------------------------------------
1919
align 4
1919
align 4
1920
snbgp:
1920
snbgp:
1921
        cmp     [ScreenBPP], byte 25
1921
        cmp     byte [_display.bpp], 25
1922
        sbb     edi, -4
1922
        sbb     edi, -4
1923
        add     ebp, 1
1923
        add     ebp, 1
1924
        mov     eax, [esp+20]
1924
        mov     eax, [esp+20]
1925
        add     eax, 1
1925
        add     eax, 1
1926
        mov     [esp+20], eax
1926
        mov     [esp+20], eax
Line 1942... Line 1942...
1942
        add     ebp, [Screen_Max_X]
1942
        add     ebp, [Screen_Max_X]
1943
        add     ebp, 1
1943
        add     ebp, 1
1944
        sub     edi, eax
1944
        sub     edi, eax
1945
        sub     edi, eax
1945
        sub     edi, eax
1946
        sub     edi, eax
1946
        sub     edi, eax
1947
        cmp     [ScreenBPP], byte 24
1947
        cmp     byte [_display.bpp], 24
1948
        jz      @f
1948
        jz      @f
1949
        sub     edi, eax
1949
        sub     edi, eax
1950
;--------------------------------------
1950
;--------------------------------------
1951
align 4
1951
align 4
1952
@@:
1952
@@:
Line 1979... Line 1979...
1979
align 4
1979
align 4
1980
sdpdone:
1980
sdpdone:
1981
        add     esp, 44
1981
        add     esp, 44
1982
        popad
1982
        popad
1983
        mov     [EGA_counter], 1
1983
        mov     [EGA_counter], 1
1984
        cmp     [SCR_MODE], dword 0x12
1984
        cmp     [SCR_MODE], 0x12
1985
        jne     @f
1985
        jne     @f
1986
        call    VGA_drawbackground
1986
        call    VGA_drawbackground
1987
;--------------------------------------
1987
;--------------------------------------
1988
align 4
1988
align 4
1989
@@:
1989
@@: