Subversion Repositories Kolibri OS

Rev

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

Rev 5154 Rev 5350
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: 5154 $
20
$Revision: 5350 $
21
 
21
 
22
uglobal
22
uglobal
23
align 4
23
align 4
Line 234... Line 234...
234
;     lea     eax, [eax + eax * 2]
234
;     lea     eax, [eax + eax * 2]
235
        call    esi
235
        call    esi
236
        add     eax, [putimg.arg_0]
236
        add     eax, [putimg.arg_0]
237
        mov     [putimg.line_increment], eax
237
        mov     [putimg.line_increment], eax
238
; winmap new line increment
238
; winmap new line increment
239
        mov     eax, [Screen_Max_X]
239
        mov     eax, [_display.width]
240
        inc     eax
-
 
241
        sub     eax, [putimg.real_sx]
240
        sub     eax, [putimg.real_sx]
242
        mov     [putimg.winmap_newline], eax
241
        mov     [putimg.winmap_newline], eax
243
; screen new line increment
242
; screen new line increment
244
        mov     eax, [_display.pitch]
243
        mov     eax, [_display.pitch]
245
        mov     ebx, [_display.bytes_per_pixel]
244
        mov     ebx, [_display.bytes_per_pixel]
Line 874... Line 873...
874
 
873
 
875
align 4
874
align 4
Line 876... Line 875...
876
__sys_putpixel:
875
__sys_putpixel:
877
 
876
 
878
        pushad
877
        pushad
879
        cmp     [Screen_Max_X], eax
878
        cmp     eax, [_display.width]
880
        jb      .exit
879
        jge     .exit
881
        cmp     [Screen_Max_Y], ebx
880
        cmp     ebx, [_display.height]
882
        jb      .exit
881
        jge     .exit
Line 883... Line 882...
883
        test    edi, 1          ; force ?
882
        test    edi, 1          ; force ?
884
        jnz     .forced
883
        jnz     .forced
Line 1439... Line 1438...
1439
        jbe     .end_y
1438
        jbe     .end_y
1440
        mov     ebx, [drbar.bar_sy]
1439
        mov     ebx, [drbar.bar_sy]
1441
  .end_y:
1440
  .end_y:
1442
        mov     [drbar.real_sy], ebx
1441
        mov     [drbar.real_sy], ebx
1443
; line_inc_map
1442
; line_inc_map
1444
        mov     eax, [Screen_Max_X]
1443
        mov     eax, [_display.width]
1445
        sub     eax, [drbar.real_sx]
1444
        sub     eax, [drbar.real_sx]
1446
        inc     eax
-
 
1447
        mov     [drbar.line_inc_map], eax
1445
        mov     [drbar.line_inc_map], eax
1448
; line_inc_scr
1446
; line_inc_scr
1449
        mov     eax, [drbar.real_sx]
1447
        mov     eax, [drbar.real_sx]
1450
        mov     ebx, [_display.bytes_per_pixel]
1448
        mov     ebx, [_display.bytes_per_pixel]
1451
        imul    eax, ebx
1449
        imul    eax, ebx
Line 2147... Line 2145...
2147
; Helper variables
2145
; Helper variables
2148
; calculate 2^32*(BgrDataWidth-1) mod (ScreenWidth-1)
2146
; calculate 2^32*(BgrDataWidth-1) mod (ScreenWidth-1)
2149
        mov     eax, [BgrDataWidth]
2147
        mov     eax, [BgrDataWidth]
2150
        dec     eax
2148
        dec     eax
2151
        xor     edx, edx
2149
        xor     edx, edx
2152
        div     dword [Screen_Max_X]
2150
        div     dword [screen_workarea.right]
2153
        push    eax     ; high
2151
        push    eax     ; high
2154
        xor     eax, eax
2152
        xor     eax, eax
2155
        div     dword [Screen_Max_X]
2153
        div     dword [screen_workarea.right]
2156
        push    eax     ; low
2154
        push    eax     ; low
Line 2157... Line 2155...
2157
 
2155
 
2158
; the same for height
2156
; the same for height
2159
        mov     eax, [BgrDataHeight]
2157
        mov     eax, [BgrDataHeight]
2160
        dec     eax
2158
        dec     eax
2161
        xor     edx, edx
2159
        xor     edx, edx
2162
        div     dword [Screen_Max_Y]
2160
        div     dword [screen_workarea.bottom]
2163
        push    eax     ; high
2161
        push    eax     ; high
2164
        xor     eax, eax
2162
        xor     eax, eax
2165
        div     dword [Screen_Max_Y]
2163
        div     dword [screen_workarea.bottom]
Line 2166... Line 2164...
2166
        push    eax     ; low
2164
        push    eax     ; low
2167
 
2165
 
2168
; External loop for all y from start to end
2166
; External loop for all y from start to end
Line 2321... Line 2319...
2321
        ja      sdpdone
2319
        ja      sdpdone
Line 2322... Line 2320...
2322
 
2320
 
2323
; advance edi, ebp to next scan line
2321
; advance edi, ebp to next scan line
2324
        sub     eax, [draw_data+32+RECT.left]
2322
        sub     eax, [draw_data+32+RECT.left]
2325
        sub     ebp, eax
2323
        sub     ebp, eax
2326
        add     ebp, [Screen_Max_X]
-
 
2327
        add     ebp, 1
2324
        add     ebp, [_display.width]
2328
        sub     edi, eax
2325
        sub     edi, eax
2329
        sub     edi, eax
2326
        sub     edi, eax
2330
        cmp     byte [_display.bytes_per_pixel], 2
2327
        cmp     byte [_display.bytes_per_pixel], 2
2331
        jz      @f
2328
        jz      @f
Line 2354... Line 2351...
2354
        cmp     ebx, -1
2351
        cmp     ebx, -1
2355
        jnz     bgr_resmooth0
2352
        jnz     bgr_resmooth0
2356
        push    edi
2353
        push    edi
2357
        mov     esi, bgr_next_line
2354
        mov     esi, bgr_next_line
2358
        mov     edi, bgr_cur_line
2355
        mov     edi, bgr_cur_line
2359
        mov     ecx, [Screen_Max_X]
2356
        mov     ecx, [_display.width]
2360
        inc     ecx
-
 
2361
        rep movsd
2357
        rep movsd
2362
        jmp     bgr_resmooth1
2358
        jmp     bgr_resmooth1
Line 2363... Line 2359...
2363
 
2359
 
2364
  sdpdone:
2360
  sdpdone: