Subversion Repositories Kolibri OS

Rev

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

Rev 7 Rev 33
Line 168... Line 168...
168
    mov   [_refoper], eax
168
    mov   [_refoper], eax
169
    mov   edi, eax
169
    mov   edi, eax
170
    mov   esi, 0x90000
170
    mov   esi, 0x90000
171
    call  bmp2raw
171
    call  bmp2raw
172
 
172
    mov   eax, [0x90000+bmp_header.height]
-
 
173
    mov   [_skinh], eax
-
 
174
    popad
-
 
175
 
Line -... Line 176...
-
 
176
    ret
Line -... Line 177...
-
 
177
 
-
 
178
load_default_skin_1:          
173
 
179
    pushad
-
 
180
    mov   eax, _fileleft_1
174
;    mov   eax, [0x90000+bmp_header.height]
181
    call  load_bmp_file
-
 
182
    mov   eax, [0x90000+bmp_header.width]
-
 
183
    mov   [_skinleftw], eax
-
 
184
    mov   [_skinleft_1], 0
-
 
185
    mov   edi, raw_data+1000h
-
 
186
    mov   [_refleft_1], edi
175
;    imul  eax, [0x90000+bmp_header.width]
187
    mov   esi, 0x90000
-
 
188
    call  bmp2raw
176
;    imul  eax, 3
189
    mov   eax, [_bmp_bpl]
-
 
190
    imul  eax, [0x90000+bmp_header.height]
177
;    add   eax, raw_data  ; now eax points to the last line of image
191
    push  eax
178
 
192
 
-
 
193
    mov   eax, _filebase_1
-
 
194
    call  load_bmp_file
179
;    mov   ecx, [eax]
195
    mov   eax, [0x90000+bmp_header.width]
-
 
196
    mov   [_skinbasew], eax
180
;    mov   [_coloroutborder], ecx
197
    mov   eax, [_skinleftw]
-
 
198
    mov   [_skinbase], eax
-
 
199
    pop   eax
-
 
200
    add   eax, [_refleft_1]
-
 
201
    ; align to 32-byte boundary
-
 
202
    test  eax, 11111b
-
 
203
    jz    @f
-
 
204
    shr   eax, 5
181
;    mov   [_colorborder], ecx
205
    inc   eax
-
 
206
    shl   eax, 5
-
 
207
  @@:
-
 
208
    ; save base address
-
 
209
    mov   [_refbase_1], eax
182
;    sub   eax, 2*3
210
    ; convert
-
 
211
    mov   edi, eax
-
 
212
    mov   esi, 0x90000
183
;    mov   ecx, [eax]
213
    call  bmp2raw
-
 
214
    mov   eax, [_bmp_bpl]
-
 
215
    imul  eax, [0x90000+bmp_header.height]
184
;    mov   [_colorframe], ecx
216
    push  eax
-
 
217
 
-
 
218
    mov   eax, _fileoper_1
-
 
219
    call  load_bmp_file
-
 
220
    mov   eax, [0x90000+bmp_header.width]
-
 
221
    mov   [_skinoperw], eax
-
 
222
    neg   eax
-
 
223
    mov   [_skinoper], eax
-
 
224
    pop   eax
-
 
225
    add   eax, [_refbase_1]
-
 
226
    ; align to 32-byte boundary
-
 
227
    test  eax, 11111b
-
 
228
    jz    @f
-
 
229
    shr   eax, 5
-
 
230
    inc   eax
185
 
231
    shl   eax, 5
-
 
232
  @@:
-
 
233
    mov   [_refoper_1], eax
-
 
234
    mov   edi, eax
-
 
235
    mov   esi, 0x90000
186
 
236
    call  bmp2raw
187
    mov   eax, [0x90000+bmp_header.height]
237
    mov   eax, [0x90000+bmp_header.height]
188
    mov   [_skinh], eax
238
    mov   [_skinh], eax
189
    popad
239
    popad
Line 190... Line -...
190
    ret
-
 
191
 
-
 
192
 
240
    ret
Line 193... Line 241...
193
 
241
 
Line 194... Line 242...
194
drawwindow_IV:
242
drawwindow_IV:
Line 239... Line 287...
239
        shl   edx,16
287
        shl   edx,16
240
        mov   ecx,[_skinleftw]
288
        mov   ecx,[_skinleftw]
241
        shl   ecx,16
289
        shl   ecx,16
242
        add   ecx,[_skinh]
290
        add   ecx,[_skinh]
243
        mov   ebx,[_refleft]
291
 
-
 
292
        cmp   [aw_yes],1
-
 
293
;        cmp   [esp+32+4+2], word 1
-
 
294
        jne   @f
-
 
295
        mov   ebx,[_refleft]
244
        call  sys_putimage
296
        jmp   no_aw_3
-
 
297
     @@:
-
 
298
        mov   ebx,[_refleft_1]
-
 
299
      no_aw_3:
-
 
300
        call  sys_putimage
245
 
301
 
Line 246... Line 302...
246
        mov   esi,[esp]
302
        mov   esi,[esp]
247
        mov   eax,[esi+8]
303
        mov   eax,[esi+8]
248
        sub   eax,[_skinleftw]
304
        sub   eax,[_skinleftw]
Line 254... Line 310...
254
        div   ebx
310
        div   ebx
255
 
311
 
Line 256... Line 312...
256
        inc   eax
312
        inc   eax
Line -... Line 313...
-
 
313
 
-
 
314
        cmp   [aw_yes],1
-
 
315
;        cmp   [esp+32+4+2], word 1
257
 
316
        jne   @f
-
 
317
        mov   ebx,[_refbase]
-
 
318
        jmp   no_aw_2
-
 
319
     @@:
-
 
320
        mov   ebx,[_refbase_1]
258
        mov   ebx,[_refbase]
321
      no_aw_2:
259
        mov   ecx,[_skinbasew]
322
        mov   ecx,[_skinbasew]
260
        shl   ecx,16
323
        shl   ecx,16
261
        add   ecx,[_skinh]
324
        add   ecx,[_skinh]
262
        mov   edx,[_skinbase]
325
        mov   edx,[_skinbase]
Line 279... Line 342...
279
        mov   edx,[esi+8]
342
        mov   edx,[esi+8]
280
        sub   edx,[_skinoperw]
343
        sub   edx,[_skinoperw]
281
        inc   edx
344
        inc   edx
282
        shl   edx,16
345
        shl   edx,16
283
        mov   ebx,[_refoper]
346
        cmp   [aw_yes],1
-
 
347
;        cmp   [esp+32+4+2], word 1
-
 
348
        jne   @f
-
 
349
        mov   ebx,[_refoper]
284
        mov   ecx,[_skinoperw]
350
        jmp   no_aw_1
-
 
351
     @@:
-
 
352
        mov   ebx,[_refoper_1]
-
 
353
      no_aw_1:
-
 
354
        mov   ecx,[_skinoperw]
285
        shl   ecx,16
355
        shl   ecx,16
286
        add   ecx,[_skinh]
356
        add   ecx,[_skinh]
287
        call  sys_putimage
357
        call  sys_putimage
288
 
358
 
Line 381... Line 451...
381
      no_skin_add_button:
451
      no_skin_add_button:
Line 382... Line 452...
382
 
452
 
383
        add   esp,4
453
        add   esp,4
-
 
454
        popa
384
        popa
455