From 405c94f794e88b83ad36b2da68c09b706cc60651 Mon Sep 17 00:00:00 2001 From: "Marat Zakiyanov (Mario79)" Date: Mon, 2 Apr 2012 16:30:55 +0000 Subject: [PATCH] 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 --- programs/system/icon/trunk/dat_area.inc | 7 ---- programs/system/icon/trunk/icon.asm | 48 +++++++++++++------------ 2 files changed, 26 insertions(+), 29 deletions(-) diff --git a/programs/system/icon/trunk/dat_area.inc b/programs/system/icon/trunk/dat_area.inc index 634f38e5d7..bec80a508d 100644 --- a/programs/system/icon/trunk/dat_area.inc +++ b/programs/system/icon/trunk/dat_area.inc @@ -1,10 +1,5 @@ ;------------------------------------------------------------------------------ align 4 -bgrx rd 1 -bgry rd 1 - -bgrxy rd 1 - warea: .by_x: .right rw 1 @@ -13,8 +8,6 @@ warea: .bottom rw 1 .top rw 1 -scrxy rd 1 - icons rd 1 addr rd 1 diff --git a/programs/system/icon/trunk/icon.asm b/programs/system/icon/trunk/icon.asm index 7b1318a31a..af4b0ea783 100644 --- a/programs/system/icon/trunk/icon.asm +++ b/programs/system/icon/trunk/icon.asm @@ -5,6 +5,12 @@ ;* 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 ; last update: 02/04/2012 ; changed by: Marat Zakiyanov aka Mario79, aka Mario @@ -815,7 +821,23 @@ align 4 START2: 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 + + 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 still2: @@ -835,8 +857,10 @@ still2: and ebx,0xffff 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 ebx,icon_data ;-------------------------------------- @@ -1045,26 +1069,6 @@ align 4 ret ;------------------------------------------------------------------------------ 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: ; in: ; eax - dword [icon_position]