ICON - Fix for previous revision, not drawed icons after startup in certain cases.

git-svn-id: svn://kolibrios.org@2542 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2012-04-02 16:30:55 +00:00
parent a4e79969dd
commit 405c94f794
2 changed files with 26 additions and 29 deletions

View File

@ -1,10 +1,5 @@
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
bgrx rd 1
bgry rd 1
bgrxy rd 1
warea: warea:
.by_x: .by_x:
.right rw 1 .right rw 1
@ -13,8 +8,6 @@ warea:
.bottom rw 1 .bottom rw 1
.top rw 1 .top rw 1
scrxy rd 1
icons rd 1 icons rd 1
addr rd 1 addr rd 1

View File

@ -5,6 +5,12 @@
;* Compile with flat assembler * ;* Compile with flat assembler *
;* * ;* *
;******************************** ;********************************
; version: 3.01
; last update: 02/04/2012
; changed by: Marat Zakiyanov aka Mario79, aka Mario
; changes: Fix for previous revision - not drawed icons after
; startup in certain cases.
;---------------------------------------------------------------------
; version: 3.00 ; version: 3.00
; last update: 02/04/2012 ; last update: 02/04/2012
; changed by: Marat Zakiyanov aka Mario79, aka Mario ; changed by: Marat Zakiyanov aka Mario79, aka Mario
@ -815,7 +821,23 @@ align 4
START2: START2:
mcall 40,10000b ; only Event 5 - draw background mcall 40,10000b ; only Event 5 - draw background
mcall 48,5
mov [warea.by_x],eax
mov [warea.by_y],ebx
mcall 51,1,START_mouse_thread,stack_mouse_thread mcall 51,1,START_mouse_thread,stack_mouse_thread
xor eax,eax
mov [x_left],eax
mov [y_top],eax
mcall 14
mov ebx,eax
shr eax,16
and ebx,0xffff
mov [x_right],eax
mov [y_bottom],ebx
jmp still2.1
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
still2: still2:
@ -835,8 +857,10 @@ still2:
and ebx,0xffff and ebx,0xffff
mov [y_bottom],ebx mov [y_bottom],ebx
call get_bg_info mcall 48,5
mov [warea.by_x],eax
mov [warea.by_y],ebx
.1:
mov ecx,[icons] mov ecx,[icons]
mov ebx,icon_data mov ebx,icon_data
;-------------------------------------- ;--------------------------------------
@ -1045,26 +1069,6 @@ align 4
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
get_bg_info:
mcall 39,1 ; get background size
mov [bgrxy],eax
mov ebx,eax
shr eax,16
and ebx,0xffff
mov [bgrx],eax
mov [bgry],ebx
mcall 48,5
mov [warea.by_x],eax
mov [warea.by_y],ebx
mcall 14
add eax,0x00010001
mov [scrxy],eax
ret
;------------------------------------------------------------------------------
align 4
calc_icon_pos: calc_icon_pos:
; in: ; in:
; eax - dword [icon_position] ; eax - dword [icon_position]