Subversion Repositories Kolibri OS

Rev

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

Rev 753 Rev 755
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: 753 $
20
$Revision: 755 $
21
 
21
 
Line 862... Line 862...
862
 
862
 
863
vesa20_drawbackground_stretch:
863
vesa20_drawbackground_stretch:
864
        call    [disable_mouse]
864
        call    [disable_mouse]
865
        pushad
865
        pushad
866
; Helper variables
866
; Helper variables
867
; calculate 2^32*(BgrDataWidth-1) mod (Screen_Max_X-1)
867
; calculate 2^32*(BgrDataWidth-1) mod (ScreenWidth-1)
868
        mov     eax, [BgrDataWidth]
868
        mov     eax, [BgrDataWidth]
869
        dec     eax
869
        dec     eax
870
        xor     edx, edx
870
        xor     edx, edx
871
        div     dword [Screen_Max_X]
871
        div     dword [Screen_Max_X]
Line 906... Line 906...
906
        push    eax
906
        push    eax
907
; 2) Calculate offset in background memory block
907
; 2) Calculate offset in background memory block
908
        mov     eax, ebx
908
        mov     eax, ebx
909
        imul    ebx, dword [esp+12]
909
        imul    ebx, dword [esp+12]
910
        mul     dword [esp+8]
910
        mul     dword [esp+8]
911
        add     edx, ebx        ; edx:eax = y * 2^32*(BgrDataHeight-1)/(Screen_Max_Y-1)
911
        add     edx, ebx        ; edx:eax = y * 2^32*(BgrDataHeight-1)/(ScreenHeight-1)
912
        mov     esi, edx
912
        mov     esi, edx
913
        imul    esi, [BgrDataWidth]
913
        imul    esi, [BgrDataWidth]
914
        push    edx
914
        push    edx
915
        push    eax
915
        push    eax
916
        mov     eax, [esp+8]
916
        mov     eax, [esp+8]
917
        mul     dword [esp+28]
917
        mul     dword [esp+28]
918
        push    eax
918
        push    eax
919
        mov     eax, [esp+12]
919
        mov     eax, [esp+12]
920
        mul     dword [esp+28]
920
        mul     dword [esp+28]
921
        add     [esp], edx
921
        add     [esp], edx
922
        pop     edx             ; edx:eax = x * 2^32*(BgrDataWidth-1)/(Screen_Max_X-1)
922
        pop     edx             ; edx:eax = x * 2^32*(BgrDataWidth-1)/(ScreenWidth-1)
923
        add     esi, edx
923
        add     esi, edx
924
        lea     esi, [esi*3]
924
        lea     esi, [esi*3]
925
        add     esi, [img_background]
925
        add     esi, [img_background]
926
        push    eax
926
        push    eax
927
        push    edx
927
        push    edx
Line 955... Line 955...
955
; 4) Loop through redraw rectangle and copy background data
955
; 4) Loop through redraw rectangle and copy background data
956
; Registers meaning:
956
; Registers meaning:
957
; esi = offset in current line, edi -> output
957
; esi = offset in current line, edi -> output
958
; ebp = offset in WinMapAddress
958
; ebp = offset in WinMapAddress
959
; dword [esp] = offset in bgr data
959
; dword [esp] = offset in bgr data
960
; qword [esp+4] = x * 2^32 * (BgrDataWidth-1) / (Screen_Max_X-1)
960
; qword [esp+4] = x * 2^32 * (BgrDataWidth-1) / (ScreenWidth-1)
961
; qword [esp+12] = y * 2^32 * (BgrDataHeight-1) / (Screen_Max_Y-1)
961
; qword [esp+12] = y * 2^32 * (BgrDataHeight-1) / (ScreenHeight-1)
962
; dword [esp+20] = x
962
; dword [esp+20] = x
963
; dword [esp+24] = y
963
; dword [esp+24] = y
964
; precalculated constants:
964
; precalculated constants:
965
; qword [esp+28] = 2^32*(BgrDataHeight-1)/(Screen_Max_Y-1)
965
; qword [esp+28] = 2^32*(BgrDataHeight-1)/(ScreenHeight-1)
966
; qword [esp+36] = 2^32*(BgrDataWidth-1)/(Screen_Max_X-1)
966
; qword [esp+36] = 2^32*(BgrDataWidth-1)/(ScreenWidth-1)
967
sdp3a:
967
sdp3a:
968
        cmp     [ebp+WinMapAddress], byte 1
968
        cmp     [ebp+WinMapAddress], byte 1
969
        jnz     snbgp
969
        jnz     snbgp
970
        mov     eax, [bgr_cur_line+esi]
970
        mov     eax, [bgr_cur_line+esi]
971
        test    ecx, ecx
971
        test    ecx, ecx