Subversion Repositories Kolibri OS

Rev

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

Rev 205 Rev 283
Line 74... Line 74...
74
   .image_cy       dd ?
74
   .image_cy       dd ?
75
   .pti            dd ?
75
   .pti            dd ?
76
   .abs_cx         dd ?
76
   .abs_cx         dd ?
77
   .abs_cy         dd ?
77
   .abs_cy         dd ?
78
   .line_increment dd ?
78
   .line_increment dd ?
79
   .source_bpp     dd ?
-
 
80
   .winmap_newline dd ?
79
   .winmap_newline dd ?
81
   .screen_newline dd ?
80
   .screen_newline dd ?
82
   .stack_data = 4*13
81
   .stack_data = 4*12
-
 
82
   .edi         dd      ?
-
 
83
   .esi         dd      ?
-
 
84
   .ebp         dd      ?
83
end virtual
85
end virtual
Line 84... Line 86...
84
 
86
 
85
align 4
87
align 16
86
; ebx = pointer
88
; ebx = pointer
87
; ecx = size [x|y]
89
; ecx = size [x|y]
-
 
90
; edx = coordinates [x|y]
-
 
91
; ebp = pointer to 'get' function
-
 
92
; esi = pointer to 'init' function
88
; edx = coordinates [x|y]
93
; edi = parameter for 'get' function
89
vesa20_putimage:
94
vesa20_putimage:
90
        pushad
95
        pushad
Line 91... Line 96...
91
        call    [disable_mouse]
96
        call    [disable_mouse]
Line 92... Line -...
92
 
-
 
93
        sub     esp, putimg.stack_data
-
 
94
 
-
 
95
        mov     [putimg.source_bpp], 3
-
 
96
;        test    ebx, 0x80000000
-
 
97
;        jz      @f
-
 
98
;        inc     [putimg.source_bpp]
-
 
99
;      @@:
97
 
100
;        and     ebx, 0x7FFFFFFF
98
        sub     esp, putimg.stack_data
Line 101... Line 99...
101
 
99
 
102
        ; save pointer to image
100
        ; save pointer to image
Line 162... Line 160...
162
 
160
 
163
        ; line increment
161
        ; line increment
164
        mov     eax, [putimg.image_sx]
162
        mov     eax, [putimg.image_sx]
165
        sub     eax, [putimg.real_sx]
163
        sub     eax, [putimg.real_sx]
166
;;        imul    eax, [putimg.source_bpp]
164
;;        imul    eax, [putimg.source_bpp]
-
 
165
;        lea     eax, [eax + eax * 2]
167
        lea     eax, [eax + eax * 2]
166
        call    esi
Line 168... Line 167...
168
        mov     [putimg.line_increment], eax
167
        mov     [putimg.line_increment], eax
169
 
168
 
170
        ; winmap new line increment
169
        ; winmap new line increment
Line 181... Line 180...
181
        imul    ecx, ebx
180
        imul    ecx, ebx
182
        sub     eax, ecx
181
        sub     eax, ecx
183
        mov     [putimg.screen_newline], eax
182
        mov     [putimg.screen_newline], eax
Line 184... Line 183...
184
 
183
 
185
        ; pointer to image
184
        ; pointer to image
Line 186... Line 185...
186
        mov     ecx, [putimg.pti]
185
        mov     esi, [putimg.pti]
187
 
186
 
188
        ; pointer to screen
187
        ; pointer to screen
189
        mov     edx, [putimg.abs_cy]
188
        mov     edx, [putimg.abs_cy]
Line 211... Line 210...
211
 
210
 
212
;put_image_end_24:
211
;put_image_end_24:
213
        mov     edi, [putimg.real_sy]
212
        mov     edi, [putimg.real_sy]
214
        align   4
213
        align   4
215
      .new_line:
214
      .new_line:
Line 216... Line 215...
216
        mov     esi, [putimg.real_sx]
215
        mov     ecx, [putimg.real_sx]
217
 
216
 
218
;        push    ebp edx
217
;        push    ebp edx
Line -... Line 218...
-
 
218
        align   4
-
 
219
          .new_x:
-
 
220
 
219
        align   4
221
                push    [putimg.edi]
220
          .new_x:
222
                mov     eax, [putimg.ebp+4]
221
 
223
                call    eax
222
                cmp     [ebp], bl
224
                cmp     [ebp], bl
223
                jne     .skip
225
                jne     .skip
224
                mov     eax, [ecx]        ; ecx = RRBBGGRR
226
;                mov     eax, [esi]        ; eax = RRBBGGRR
225
                mov     [edx], ax
227
                mov     [edx], ax
Line 226... Line 228...
226
                shr     eax, 16
228
                shr     eax, 16
227
                mov     [edx+2], al
229
                mov     [edx+2], al
228
              .skip:
230
              .skip:
Line 229... Line 231...
229
 
231
 
230
            add     ecx, 3 ;[putimg.source_bpp]
232
;            add     esi, 3 ;[putimg.source_bpp]
231
            add     edx, 3
233
            add     edx, 3
Line 232... Line 234...
232
            inc     ebp
234
            inc     ebp
233
 
235
 
234
            dec     esi
236
            dec     ecx
235
            jnz     .new_x
237
            jnz     .new_x
Line 236... Line 238...
236
;        pop     edx ebp
238
;        pop     edx ebp
Line 249... Line 251...
249
 
251
 
250
put_image_end_32:
252
put_image_end_32:
251
        mov     edi, [putimg.real_sy]
253
        mov     edi, [putimg.real_sy]
252
        align   4
254
        align   4
253
      .new_line:
255
      .new_line:
Line 254... Line 256...
254
        mov     esi, [putimg.real_sx]
256
        mov     ecx, [putimg.real_sx]
255
 
257
 
256
;        push    ebp edx
258
;        push    ebp edx
Line -... Line 259...
-
 
259
        align   4
-
 
260
          .new_x:
-
 
261
 
257
        align   4
262
                push    [putimg.edi]
258
          .new_x:
263
                mov     eax, [putimg.ebp+4]
259
 
264
                call    eax
260
                cmp     [ebp], bl
265
                cmp     [ebp], bl
261
                jne     .skip
266
                jne     .skip
Line 262... Line 267...
262
                mov     eax, [ecx]        ; ecx = RRBBGGRR
267
;                mov     eax, [esi]        ; ecx = RRBBGGRR
263
                mov     [edx], eax
268
                mov     [edx], eax
264
              .skip:
269
              .skip:
Line 265... Line 270...
265
 
270
 
266
            add     ecx, [putimg.source_bpp]
271
;            add     esi, [putimg.source_bpp]
267
            add     edx, 4
272
            add     edx, 4
Line 268... Line 273...
268
            inc     ebp
273
            inc     ebp
269
 
274
 
270
            dec     esi
275
            dec     ecx
271
            jnz     .new_x
276
            jnz     .new_x
Line 272... Line 277...
272
;        pop     edx ebp
277
;        pop     edx ebp