Subversion Repositories Kolibri OS

Rev

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

Rev 9926 Rev 9930
Line 4... Line 4...
4
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa      ;;
4
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa      ;;
5
;; Distributed under terms of the GNU General Public License    ;;
5
;; Distributed under terms of the GNU General Public License    ;;
6
;;                                                              ;;
6
;;                                                              ;;
7
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 8... Line 8...
8
 
8
 
Line 9... Line 9...
9
$Revision: 9926 $
9
$Revision: 9930 $
Line 10... Line 10...
10
 
10
 
11
; Background graphics implementation
11
; Background graphics implementation
Line 287... Line 287...
287
nosb7:
287
nosb7:
288
        cmp     ebx, 8
288
        cmp     ebx, 8
289
        jnz     nosb8
289
        jnz     nosb8
Line 290... Line 290...
290
 
290
 
-
 
291
        mov     ecx, [current_slot]
291
        mov     ecx, [current_slot]
292
        mov     ecx, [ecx + APPDATA.window]
292
        xor     eax, eax
293
        xor     eax, eax
293
        xchg    eax, [ecx + APPDATA.draw_bgr_x]
294
        xchg    eax, [ecx + WDATA.draw_bgr_x]
294
        mov     [esp + SYSCALL_STACK.eax], eax ; eax = [left]*65536 + [right]
295
        mov     [esp + SYSCALL_STACK.eax], eax ; eax = [left]*65536 + [right]
295
        xor     eax, eax
296
        xor     eax, eax
296
        xchg    eax, [ecx + APPDATA.draw_bgr_y]
297
        xchg    eax, [ecx + WDATA.draw_bgr_y]
297
        mov     [esp + SYSCALL_STACK.ebx], eax ; ebx = [top]*65536 + [bottom]
298
        mov     [esp + SYSCALL_STACK.ebx], eax ; ebx = [top]*65536 + [bottom]
298
        ret
299
        ret
299
;---------------------------------------
300
;---------------------------------------
300
align 4
301
align 4
Line 326... Line 327...
326
        shr     ecx, 16 ; [right]
327
        shr     ecx, 16 ; [right]
327
        shr     edx, 16 ; [bottom]
328
        shr     edx, 16 ; [bottom]
Line 328... Line 329...
328
 
329
 
Line 329... Line 330...
329
        mov     [background_defined], 1
330
        mov     [background_defined], 1
330
 
331
 
Line 331... Line 332...
331
        mov     [draw_data + sizeof.WDATA + RECT.left], eax
332
        mov     [background_window + WDATA.draw_data.left], eax
332
        mov     [draw_data + sizeof.WDATA + RECT.top], ebx
333
        mov     [background_window + WDATA.draw_data.top], ebx
Line 333... Line 334...
333
 
334
 
334
        mov     [draw_data + sizeof.WDATA + RECT.right], ecx
335
        mov     [background_window + WDATA.draw_data.right], ecx
335
        mov     [draw_data + sizeof.WDATA + RECT.bottom], edx
336
        mov     [background_window + WDATA.draw_data.bottom], edx
336
 
337
 
Line 351... Line 352...
351
;------------------------------------------------------------------------------
352
;------------------------------------------------------------------------------
Line 352... Line 353...
352
 
353
 
353
 
354
 
354
align 4
355
align 4
355
force_redraw_background:
356
force_redraw_background:
356
        and     [draw_data + sizeof.WDATA + RECT.left], 0
357
        and     [background_window + WDATA.draw_data.left], 0
357
        and     [draw_data + sizeof.WDATA + RECT.top], 0
358
        and     [background_window + WDATA.draw_data.top], 0
358
        push    eax ebx
359
        push    eax ebx
359
        mov     eax, [_display.width]
360
        mov     eax, [_display.width]
360
        mov     ebx, [_display.height]
361
        mov     ebx, [_display.height]
361
        dec     eax
362
        dec     eax
362
        dec     ebx
363
        dec     ebx
363
        mov     [draw_data + sizeof.WDATA + RECT.right], eax
364
        mov     [background_window + WDATA.draw_data.right], eax
364
        mov     [draw_data + sizeof.WDATA + RECT.bottom], ebx
365
        mov     [background_window + WDATA.draw_data.bottom], ebx
365
        pop     ebx eax
366
        pop     ebx eax
366
        inc     [REDRAW_BACKGROUND]
367
        inc     [REDRAW_BACKGROUND]
367
        call    wakeup_osloop
368
        call    wakeup_osloop
Line 422... Line 423...
422
        ; ecx - 
423
        ; ecx - 
423
        ; edx - 
424
        ; edx - 
424
        ; esi - buffer of 0x00RRGGBB
425
        ; esi - buffer of 0x00RRGGBB
425
        mov     eax, [img_background]
426
        mov     eax, [img_background]
426
        cmp     eax, static_background_data
427
        cmp     eax, static_background_data
427
        jz      .ret_39_3
428
        jz      .fail_39_3
428
align 4
429
align 4
429
@@:
430
@@:
430
        movzx   eax, cx ; store y in eax
431
        movzx   eax, cx ; store y in eax
431
        mov     [.y], eax
432
        mov     [.y], eax
Line 487... Line 488...
487
        inc     ecx
488
        inc     ecx
488
        jmp     .copy_rect
489
        jmp     .copy_rect
489
.end_copy_rect:
490
.end_copy_rect:
490
        xor     eax, eax
491
        xor     eax, eax
491
        mov     [esp + SYSCALL_STACK.eax], eax
492
        mov     [esp + SYSCALL_STACK.eax], eax
-
 
493
align 4
-
 
494
.ret_39_3:
-
 
495
        ret
492
;--------------------------------------
496
;--------------------------------------
493
align 4
497
align 4
494
.fail_39_3:
498
.fail_39_3:
495
        mov     eax, -1
499
        mov     [esp + SYSCALL_STACK.eax], -1
496
align 4
-
 
497
.ret_39_3:
-
 
498
        ret
500
        ret
499
;--------------------------------------
501
;--------------------------------------
500
align 4
502
align 4
501
.nogb3:
503
.nogb3:
502
        dec     ebx
504
        dec     ebx