Subversion Repositories Kolibri OS

Rev

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

Rev 5350 Rev 5351
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: 5350 $
20
$Revision: 5351 $
21
 
21
 
22
uglobal
22
uglobal
23
align 4
23
align 4
Line 238... Line 238...
238
; winmap new line increment
238
; winmap new line increment
239
        mov     eax, [_display.width]
239
        mov     eax, [_display.width]
240
        sub     eax, [putimg.real_sx]
240
        sub     eax, [putimg.real_sx]
241
        mov     [putimg.winmap_newline], eax
241
        mov     [putimg.winmap_newline], eax
242
; screen new line increment
242
; screen new line increment
243
        mov     eax, [_display.pitch]
243
        mov     eax, [_display.lfb_pitch]
244
        mov     ebx, [_display.bytes_per_pixel]
244
        mov     ebx, [_display.bytes_per_pixel]
245
        imul    ecx, ebx
245
        imul    ecx, ebx
246
        sub     eax, ecx
246
        sub     eax, ecx
247
        mov     [putimg.screen_newline], eax
247
        mov     [putimg.screen_newline], eax
248
; pointer to image
248
; pointer to image
Line 259... Line 259...
259
;        imul    eax, [Screen_Max_X]
259
;        imul    eax, [Screen_Max_X]
260
;        add     eax, [putimg.abs_cy]
260
;        add     eax, [putimg.abs_cy]
261
        mov     eax, [d_width_calc_area + eax*4]
261
        mov     eax, [d_width_calc_area + eax*4]
Line 262... Line 262...
262
 
262
 
263
        add     eax, [putimg.abs_cx]
263
        add     eax, [putimg.abs_cx]
264
        add     eax, [_WinMapAddress]
264
        add     eax, [_display.win_map]
Line 265... Line 265...
265
        xchg    eax, ebp
265
        xchg    eax, ebp
266
 
266
 
267
        mov     ecx, [putimg.real_sx]
267
        mov     ecx, [putimg.real_sx]
Line 882... Line 882...
882
        test    edi, 1          ; force ?
882
        test    edi, 1          ; force ?
883
        jnz     .forced
883
        jnz     .forced
Line 884... Line 884...
884
 
884
 
885
; not forced
885
; not forced
886
        mov     edx, [d_width_calc_area + ebx*4]
886
        mov     edx, [d_width_calc_area + ebx*4]
887
        add     edx, [_WinMapAddress]
887
        add     edx, [_display.win_map]
888
        movzx   edx, byte [eax+edx]
888
        movzx   edx, byte [eax+edx]
889
        cmp     edx, [CURRENT_TASK]
889
        cmp     edx, [CURRENT_TASK]
Line 890... Line 890...
890
        jne     .exit
890
        jne     .exit
Line 1446... Line 1446...
1446
; line_inc_scr
1446
; line_inc_scr
1447
        mov     eax, [drbar.real_sx]
1447
        mov     eax, [drbar.real_sx]
1448
        mov     ebx, [_display.bytes_per_pixel]
1448
        mov     ebx, [_display.bytes_per_pixel]
1449
        imul    eax, ebx
1449
        imul    eax, ebx
1450
        neg     eax
1450
        neg     eax
1451
        add     eax, [_display.pitch]
1451
        add     eax, [_display.lfb_pitch]
1452
        mov     [drbar.line_inc_scr], eax
1452
        mov     [drbar.line_inc_scr], eax
1453
; pointer to screen
1453
; pointer to screen
1454
        mov     edx, [drbar.abs_cy]
1454
        mov     edx, [drbar.abs_cy]
1455
;        imul    edx, [BytesPerScanLine]
1455
;        imul    edx, [BytesPerScanLine]
1456
        mov     edx, [BPSLine_calc_area+edx*4]
1456
        mov     edx, [BPSLine_calc_area+edx*4]
Line 1462... Line 1462...
1462
;        imul    eax, [Screen_Max_X]
1462
;        imul    eax, [Screen_Max_X]
1463
;        add     eax, [drbar.abs_cy]
1463
;        add     eax, [drbar.abs_cy]
1464
        mov     eax, [d_width_calc_area + eax*4]
1464
        mov     eax, [d_width_calc_area + eax*4]
Line 1465... Line 1465...
1465
 
1465
 
1466
        add     eax, [drbar.abs_cx]
1466
        add     eax, [drbar.abs_cx]
1467
        add     eax, [_WinMapAddress]
1467
        add     eax, [_display.win_map]
Line 1468... Line 1468...
1468
        xchg    eax, ebp
1468
        xchg    eax, ebp
1469
 
1469
 
1470
        mov     ebx, [drbar.real_sx]
1470
        mov     ebx, [drbar.real_sx]
Line 2032... Line 2032...
2032
  @@:
2032
  @@:
2033
        add     ebp, LFB_BASE
2033
        add     ebp, LFB_BASE
2034
; ebp:=Y*BytesPerScanLine+X*BytesPerPixel+AddrLFB
2034
; ebp:=Y*BytesPerScanLine+X*BytesPerPixel+AddrLFB
2035
        call    calculate_edi
2035
        call    calculate_edi
2036
        xchg    edi, ebp
2036
        xchg    edi, ebp
2037
        add     ebp, [_WinMapAddress]
2037
        add     ebp, [_display.win_map]
2038
; Now eax=x, ebx=y, edi->output, ebp=offset in WinMapAddress
2038
; Now eax=x, ebx=y, edi->output, ebp=offset in WinMapAddress
2039
; 2) Calculate offset in background memory block
2039
; 2) Calculate offset in background memory block
2040
        push    eax
2040
        push    eax
2041
        xor     edx, edx
2041
        xor     edx, edx
2042
        mov     eax, ebx
2042
        mov     eax, ebx
Line 2254... Line 2254...
2254
; precalculated constants:
2254
; precalculated constants:
2255
; qword [esp+28] = 2^32*(BgrDataHeight-1)/(ScreenHeight-1)
2255
; qword [esp+28] = 2^32*(BgrDataHeight-1)/(ScreenHeight-1)
2256
; qword [esp+36] = 2^32*(BgrDataWidth-1)/(ScreenWidth-1)
2256
; qword [esp+36] = 2^32*(BgrDataWidth-1)/(ScreenWidth-1)
Line 2257... Line 2257...
2257
 
2257
 
2258
  sdp3a:
2258
  sdp3a:
2259
        mov     eax, [_WinMapAddress]
2259
        mov     eax, [_display.win_map]
2260
        cmp     [ebp+eax], byte 1
2260
        cmp     [ebp+eax], byte 1
2261
        jnz     snbgp
2261
        jnz     snbgp
2262
        mov     eax, [bgr_cur_line+esi]
2262
        mov     eax, [bgr_cur_line+esi]
2263
        test    ecx, ecx
2263
        test    ecx, ecx
Line 2330... Line 2330...
2330
        cmp     byte [_display.bytes_per_pixel], 3
2330
        cmp     byte [_display.bytes_per_pixel], 3
2331
        jz      @f
2331
        jz      @f
2332
        sub     edi, eax
2332
        sub     edi, eax
Line 2333... Line 2333...
2333
 
2333
 
2334
  @@:
2334
  @@:
2335
        add     edi, [_display.pitch]
2335
        add     edi, [_display.lfb_pitch]
2336
; restore ecx,edx; advance esi to next background line
2336
; restore ecx,edx; advance esi to next background line
2337
        mov     eax, [esp+28]
2337
        mov     eax, [esp+28]
2338
        mov     ebx, [esp+32]
2338
        mov     ebx, [esp+32]
2339
        add     [esp+12], eax
2339
        add     [esp+12], eax