mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2025-09-27 21:32:16 -04:00
Global optimization! The program uses only 161 KB of memory instead of 603 kb is now.
git-svn-id: svn://kolibrios.org@2475 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
97ca8b9031
commit
1f33ac700c
@ -5,12 +5,36 @@
|
|||||||
;* Compile with flat assembler *
|
;* Compile with flat assembler *
|
||||||
;* *
|
;* *
|
||||||
;********************************
|
;********************************
|
||||||
; 22.02.05 was modified for work with new multi-thread ICON.
|
;---------------------------------------------------------------------
|
||||||
; 8.03.07 ïåðåõîä íà 70 ôóíêöèþ by SPraid
|
; version: 2.1
|
||||||
|
; last update: 17/03/2012
|
||||||
|
; changed by: Marat Zakiyanov aka Mario79, aka Mario
|
||||||
|
; changes: Global optimization! The program uses
|
||||||
|
; only 161 KB of memory instead of 603 kb is now.
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
; version: 2.02
|
||||||
|
; last update: 15/03/2012
|
||||||
|
; changed by: Marat Zakiyanov aka Mario79, aka Mario
|
||||||
|
; changes: some optimisations and code refactoring
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
; version: 2.01
|
||||||
|
; last update: 27/09/2011
|
||||||
|
; changed by: Marat Zakiyanov aka Mario79, aka Mario
|
||||||
|
; changes: deactivate the window after click
|
||||||
|
; (working to kernel r.2244 and above)
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
; Many fix's and changes created by:
|
||||||
|
; Halyavin, Diamond, Heavyiron,
|
||||||
|
; SPraid, Dunkaist
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
; version: 2.00
|
||||||
|
; last update: 22|02|2005
|
||||||
|
; changed by: Willow and Mario79
|
||||||
|
; changes: modified for work with new multi-thread ICON.
|
||||||
;******************************************************************************
|
;******************************************************************************
|
||||||
RAW_SIZE equ 350000
|
|
||||||
ICON_SIZE equ 32*32*3
|
ICON_SIZE equ 32*32*3
|
||||||
GIF_SIZE equ 45000
|
RAW_SIZE equ ICON_SIZE*32 ;350000
|
||||||
|
GIF_SIZE equ 12*1024 ;45000
|
||||||
REC_SIZE equ 80
|
REC_SIZE equ 80
|
||||||
ICONS_DAT equ '/sys/ICONS.DAT'
|
ICONS_DAT equ '/sys/ICONS.DAT'
|
||||||
ICON_APP equ '/sys/ICON'
|
ICON_APP equ '/sys/ICON'
|
||||||
@ -21,10 +45,11 @@ ICON_STRIP equ '/sys/ICONSTRP.GIF'
|
|||||||
db 'MENUET01' ; 8 byte id
|
db 'MENUET01' ; 8 byte id
|
||||||
dd 0x01 ; header version
|
dd 0x01 ; header version
|
||||||
dd START ; start of code
|
dd START ; start of code
|
||||||
dd I_END ; size of image
|
dd IM_END ; size of image
|
||||||
dd icon_data+0x30000 ; memory for app
|
dd I_END ; memory for app
|
||||||
dd stack_area ; esp
|
dd stack_area ; esp
|
||||||
dd I_Param , 0x0 ; I_Param , I_Icon
|
dd I_Param ; boot parameters
|
||||||
|
dd 0x0 ; path
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
include '../../../macros.inc'
|
include '../../../macros.inc'
|
||||||
include 'lang.inc'
|
include 'lang.inc'
|
||||||
@ -64,7 +89,7 @@ still:
|
|||||||
jz key
|
jz key
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
button: ; button
|
button:
|
||||||
mcall 17 ; get id
|
mcall 17 ; get id
|
||||||
shr eax,8
|
shr eax,8
|
||||||
|
|
||||||
@ -162,7 +187,7 @@ no_str:
|
|||||||
mcall 70
|
mcall 70
|
||||||
; (2) terminate all icons
|
; (2) terminate all icons
|
||||||
or ecx,-1
|
or ecx,-1
|
||||||
mcall 9,I_END
|
mcall 9,process_table
|
||||||
mov edi,[ebx+30]
|
mov edi,[ebx+30]
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@ -173,14 +198,14 @@ align 4
|
|||||||
newread:
|
newread:
|
||||||
inc esi
|
inc esi
|
||||||
mov ecx,esi
|
mov ecx,esi
|
||||||
mcall 9,I_END
|
mcall 9,process_table
|
||||||
cmp edi,[ebx+30]
|
cmp edi,[ebx+30]
|
||||||
je newread
|
je newread
|
||||||
|
|
||||||
cmp esi,eax
|
cmp esi,eax
|
||||||
jg all_terminated
|
jg apply_changes
|
||||||
|
|
||||||
mov eax,[ebx+10] ;[I_END+10]
|
mov eax,[ebx+10]
|
||||||
and eax,not 20202020h
|
and eax,not 20202020h
|
||||||
cmp eax,'@ICO'
|
cmp eax,'@ICO'
|
||||||
jz @f
|
jz @f
|
||||||
@ -190,10 +215,10 @@ newread:
|
|||||||
align 4
|
align 4
|
||||||
@@:
|
@@:
|
||||||
mov eax,51
|
mov eax,51
|
||||||
cmp eax,[ebx+42] ;[I_END+42]
|
cmp eax,[ebx+42]
|
||||||
jne newread
|
jne newread
|
||||||
|
|
||||||
cmp eax,[ebx+46] ;[I_END+46]
|
cmp eax,[ebx+46]
|
||||||
jne newread
|
jne newread
|
||||||
|
|
||||||
mov ecx,esi
|
mov ecx,esi
|
||||||
@ -222,8 +247,7 @@ finfo:
|
|||||||
rb 31-($-.path)
|
rb 31-($-.path)
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
all_terminated:
|
apply_changes:
|
||||||
;apply_changes:
|
|
||||||
mov ebx, finfo_start
|
mov ebx, finfo_start
|
||||||
mov dword [ebx+8], boot_str+6
|
mov dword [ebx+8], boot_str+6
|
||||||
mov esi, iconname
|
mov esi, iconname
|
||||||
@ -253,7 +277,6 @@ no_apply:
|
|||||||
xor edx,edx ; bcd -> 10
|
xor edx,edx ; bcd -> 10
|
||||||
mov ebx,16
|
mov ebx,16
|
||||||
div ebx
|
div ebx
|
||||||
; imul eax,10
|
|
||||||
; multiply x10
|
; multiply x10
|
||||||
shl eax,1 ; multiply x2
|
shl eax,1 ; multiply x2
|
||||||
lea eax,[eax+eax*4] ; multiply x5
|
lea eax,[eax+eax*4] ; multiply x5
|
||||||
@ -309,13 +332,12 @@ no_add_icon:
|
|||||||
mcall 17
|
mcall 17
|
||||||
shr eax,8
|
shr eax,8
|
||||||
cmp eax,40
|
cmp eax,40
|
||||||
jb red;no_f;ound
|
jb red
|
||||||
sub eax,40
|
sub eax,40
|
||||||
|
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
mov ebx,16
|
mov ebx,16
|
||||||
div ebx
|
div ebx
|
||||||
; imul eax,10
|
|
||||||
; multiply x10
|
; multiply x10
|
||||||
shl eax,1 ; multiply x2
|
shl eax,1 ; multiply x2
|
||||||
lea eax,[eax+eax*4] ; multiply x5
|
lea eax,[eax+eax*4] ; multiply x5
|
||||||
@ -569,7 +591,7 @@ rs_done:
|
|||||||
ret
|
ret
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
key: ; key
|
key:
|
||||||
mcall 2 ; just read it and ignore
|
mcall 2 ; just read it and ignore
|
||||||
jmp still
|
jmp still
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
@ -910,7 +932,7 @@ align 4
|
|||||||
apply_changes2:
|
apply_changes2:
|
||||||
mov edi,[icons]
|
mov edi,[icons]
|
||||||
mov esi,icon_data
|
mov esi,icon_data
|
||||||
mov ebp,0x5000 ; threads stack starting point
|
mov ebp,thread_stack+0x100 ;0x5000 ; threads stack starting point
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
start_new:
|
start_new:
|
||||||
@ -923,12 +945,13 @@ start_new:
|
|||||||
mcall 51,1,thread
|
mcall 51,1,thread
|
||||||
add ebp,0x100
|
add ebp,0x100
|
||||||
|
|
||||||
mov eax,5
|
; change to next thread if mutex is blocked
|
||||||
|
mov eax,68
|
||||||
mov ebx,1
|
mov ebx,1
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
wait_thread_start: ;wait until thread draw itself first time
|
wait_thread_start: ;wait until thread draw itself first time
|
||||||
cmp [create_thread_event],bl
|
cmp [create_thread_event],bl ;mutex
|
||||||
jz wait_thread_end
|
jz wait_thread_end
|
||||||
mcall
|
mcall
|
||||||
jmp wait_thread_start
|
jmp wait_thread_start
|
||||||
@ -945,12 +968,20 @@ close:
|
|||||||
or eax,-1
|
or eax,-1
|
||||||
mcall
|
mcall
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
; esp-28 = start of thread stack
|
||||||
|
; esp-24 = ???
|
||||||
|
; esp-20 = 'AA-F' or...
|
||||||
|
; esp-16 = ??? SHL greedy maniac mode on!
|
||||||
|
; esp-12 = ebp+0 = X
|
||||||
|
; esp-8 = ebp+4 = Y
|
||||||
|
; esp-4 = ebp+8 = adress of icon_data
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
thread:
|
thread:
|
||||||
; pop ebp ;ebp - address of our icon
|
|
||||||
sub esp,12
|
sub esp,12
|
||||||
mov ebp,esp
|
mov ebp,esp
|
||||||
sub esp,16
|
sub esp,16
|
||||||
|
call shape_window
|
||||||
call draw_window2
|
call draw_window2
|
||||||
mov [create_thread_event],1
|
mov [create_thread_event],1
|
||||||
mcall 40,010101b
|
mcall 40,010101b
|
||||||
@ -965,9 +996,7 @@ still2:
|
|||||||
je button2
|
je button2
|
||||||
|
|
||||||
call get_bg_info
|
call get_bg_info
|
||||||
mov eax,5
|
call draw_icon2_1
|
||||||
mov ebx,1
|
|
||||||
call draw_icon2
|
|
||||||
|
|
||||||
jmp still2
|
jmp still2
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
@ -982,11 +1011,11 @@ red2:
|
|||||||
add ebp,+12
|
add ebp,+12
|
||||||
call calc_icon_pos
|
call calc_icon_pos
|
||||||
add ebp,-12
|
add ebp,-12
|
||||||
mcall 9,I_END,-1
|
mcall 9,process_table,-1
|
||||||
mov eax,[I_END+process_information.box.left]
|
mov eax,[process_table+process_information.box.left]
|
||||||
cmp eax,[ebp+0]
|
cmp eax,[ebp+0]
|
||||||
jne @f
|
jne @f
|
||||||
mov eax,[I_END+process_information.box.top]
|
mov eax,[process_table+process_information.box.top]
|
||||||
cmp eax,[ebp+4]
|
cmp eax,[ebp+4]
|
||||||
je .lp1
|
je .lp1
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -1006,7 +1035,7 @@ button2:
|
|||||||
cmp ah, 2
|
cmp ah, 2
|
||||||
jnz still2
|
jnz still2
|
||||||
|
|
||||||
mcall 9,I_END,-1
|
mcall 9,process_table,-1
|
||||||
mov ecx,[ebx+30] ; PID
|
mov ecx,[ebx+30] ; PID
|
||||||
mcall 18,21
|
mcall 18,21
|
||||||
mov edx,eax ; SLOT
|
mov edx,eax ; SLOT
|
||||||
@ -1114,7 +1143,8 @@ align 4
|
|||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
draw_picture:
|
draw_picture:
|
||||||
mov [image],0x3000
|
mov [image],image_area
|
||||||
|
|
||||||
mov edi,[ebp+8]
|
mov edi,[ebp+8]
|
||||||
lea esi,[edi+12]
|
lea esi,[edi+12]
|
||||||
call atoi
|
call atoi
|
||||||
@ -1127,7 +1157,7 @@ draw_picture:
|
|||||||
lea edi,[eax+strip_file+8]
|
lea edi,[eax+strip_file+8]
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
mov esi,edi;strip_file+8+(32*3*32)*2
|
mov esi,edi
|
||||||
|
|
||||||
mov [pixpos],0
|
mov [pixpos],0
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -1148,8 +1178,6 @@ newb:
|
|||||||
mov esi,edi
|
mov esi,edi
|
||||||
add esi,[pixpos]
|
add esi,[pixpos]
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
|
||||||
no_correction_pixpos:
|
|
||||||
add [pixpos],3
|
add [pixpos],3
|
||||||
mov eax,[esi]
|
mov eax,[esi]
|
||||||
and eax,0xffffff
|
and eax,0xffffff
|
||||||
@ -1218,21 +1246,26 @@ nobpix:
|
|||||||
|
|
||||||
mov edx,eax
|
mov edx,eax
|
||||||
mov eax,[image]
|
mov eax,[image]
|
||||||
mov [eax],edx
|
|
||||||
mov [eax],dl
|
mov [eax],dl
|
||||||
inc eax
|
inc eax
|
||||||
ror edx,8
|
ror edx,8
|
||||||
|
|
||||||
mov [eax],dl
|
mov [eax],dl
|
||||||
inc eax
|
inc eax
|
||||||
ror edx,8
|
ror edx,8
|
||||||
|
|
||||||
mov [eax],dl
|
mov [eax],dl
|
||||||
|
|
||||||
inc eax
|
inc eax
|
||||||
mov [image],eax
|
mov [image],eax
|
||||||
inc ebx
|
inc ebx
|
||||||
|
|
||||||
mov eax,[yw]
|
mov eax,[yw]
|
||||||
inc eax
|
inc eax
|
||||||
cmp ebx,eax
|
cmp ebx,eax
|
||||||
jnz newb
|
jb newb
|
||||||
|
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
|
|
||||||
inc ecx
|
inc ecx
|
||||||
@ -1253,7 +1286,7 @@ notop:
|
|||||||
align 4
|
align 4
|
||||||
toponly:
|
toponly:
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
mcall 7,0x3000,<52,52>
|
mcall 7,image_area,<52,52>
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.ex:
|
.ex:
|
||||||
@ -1266,9 +1299,6 @@ draw_text:
|
|||||||
add esi,3
|
add esi,3
|
||||||
push edi
|
push edi
|
||||||
mov edi,title
|
mov edi,title
|
||||||
; mov ecx,8
|
|
||||||
; cld
|
|
||||||
; rep movsb
|
|
||||||
mov ecx,8/4
|
mov ecx,8/4
|
||||||
cld
|
cld
|
||||||
rep movsd
|
rep movsd
|
||||||
@ -1339,19 +1369,22 @@ draw_window2:
|
|||||||
xor eax,eax ; function 0 : define and draw window
|
xor eax,eax ; function 0 : define and draw window
|
||||||
mov ebx,[ebp+0-2]
|
mov ebx,[ebp+0-2]
|
||||||
mov ecx,[ebp+4-2]
|
mov ecx,[ebp+4-2]
|
||||||
add ebx,[yw] ; [x start] *65536 + [x size]
|
mov bx,[yw] ; [x start] *65536 + [x size]
|
||||||
add ecx,51 ; [y start] *65536 + [y size]
|
mov cx,51 ; [y start] *65536 + [y size]
|
||||||
mov edx,0x41000000 ; color of work area RRGGBB,8->color gl
|
mov edx,0x41000000 ; color of work area RRGGBB,8->color gl
|
||||||
mcall
|
mcall
|
||||||
|
|
||||||
mcall 8,51,50,0x40000002 ; button
|
mcall 8,51,50,0x40000002 ; button
|
||||||
|
;--------------------------------------
|
||||||
mov eax,5
|
align 4
|
||||||
|
draw_icon2_1:
|
||||||
|
; change to next thread if mutex is blocked
|
||||||
|
mov eax,68
|
||||||
mov ebx,1
|
mov ebx,1
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
draw_icon2:
|
draw_icon2:
|
||||||
xchg [load_pic],bl
|
xchg [load_pic],bl ;mutex
|
||||||
test bl,bl
|
test bl,bl
|
||||||
je draw_icon_end
|
je draw_icon_end
|
||||||
mcall
|
mcall
|
||||||
@ -1359,12 +1392,13 @@ draw_icon2:
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
draw_icon_end:
|
draw_icon_end:
|
||||||
mov eax,5
|
; change to next thread if mutex is blocked
|
||||||
|
mov eax,68
|
||||||
mov ebx,1
|
mov ebx,1
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
draw_icon_2:
|
draw_icon_2:
|
||||||
xchg [draw_pic],bl
|
xchg [draw_pic],bl ;mutex
|
||||||
test bl,bl
|
test bl,bl
|
||||||
je draw_icon_end_2
|
je draw_icon_end_2
|
||||||
mcall
|
mcall
|
||||||
@ -1372,14 +1406,81 @@ draw_icon_2:
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
draw_icon_end_2:
|
draw_icon_end_2:
|
||||||
mcall 9,process_table,-1
|
|
||||||
call draw_picture
|
call draw_picture
|
||||||
call draw_text
|
call draw_text
|
||||||
mcall 12,2
|
mcall 12,2
|
||||||
ret
|
ret
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
shape_window:
|
||||||
|
; give the shape reference area
|
||||||
|
mcall 50,0,shape_reference
|
||||||
|
; give the shape scale 32 x 32 -> 128 x 128 ecx = 2
|
||||||
|
; you dont have to give this, scale is 1:1 by default
|
||||||
|
; mcall 50,1,2
|
||||||
|
ret
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
shape_reference: ; 32 x 32 ( window_size_X + 1 ) * ( window_size_Y + 1 )
|
||||||
|
|
||||||
|
db 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0
|
||||||
|
db 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0
|
||||||
|
db 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0
|
||||||
|
db 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0
|
||||||
|
db 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0
|
||||||
|
db 0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||||
|
|
||||||
|
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||||
|
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
tl dd 8
|
tl dd 8
|
||||||
yw dd 51
|
yw: dd 51
|
||||||
ya dd 0
|
ya dd 0
|
||||||
cur_btn dd 40
|
cur_btn dd 40
|
||||||
|
|
||||||
@ -1387,18 +1488,15 @@ draw_pic db 0
|
|||||||
load_pic db 0
|
load_pic db 0
|
||||||
create_thread_event db 0
|
create_thread_event db 0
|
||||||
|
|
||||||
image dd 0x3000
|
image dd image_area
|
||||||
|
|
||||||
I_Param:
|
|
||||||
icon_data = I_END+0x1400
|
|
||||||
stack_area = I_END+0x3400-4
|
|
||||||
process_table = I_END+0x3400
|
|
||||||
|
|
||||||
|
IncludeUGlobals
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
IM_END:
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
align 4
|
||||||
bgrx dd ?
|
bgrx dd ?
|
||||||
bgry dd ?
|
bgry dd ?
|
||||||
param_str rb 31
|
|
||||||
|
|
||||||
;//////////////////////////
|
|
||||||
|
|
||||||
bgrxy dd ?
|
bgrxy dd ?
|
||||||
warea:
|
warea:
|
||||||
@ -1419,10 +1517,42 @@ cur_str dd ?
|
|||||||
cur_band dd ?
|
cur_band dd ?
|
||||||
sel_icon1 rd 1
|
sel_icon1 rd 1
|
||||||
icon_count rd 1
|
icon_count rd 1
|
||||||
gif_file rb GIF_SIZE
|
|
||||||
strip_file rb RAW_SIZE
|
|
||||||
|
|
||||||
IncludeUGlobals
|
|
||||||
|
|
||||||
I_END:
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
align 4
|
||||||
|
param_str rb 31
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
align 4
|
||||||
|
gif_file rb GIF_SIZE
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
align 4
|
||||||
|
strip_file rb RAW_SIZE
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
align 4
|
||||||
|
process_table:
|
||||||
|
rb 0x400
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
align 4
|
||||||
|
icon_data:
|
||||||
|
rb 0x1000
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
align 4
|
||||||
|
rb 0x1000
|
||||||
|
stack_area:
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
align 4
|
||||||
|
I_Param:
|
||||||
|
rb 0x100 ; max 256
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
align 4
|
||||||
|
thread_stack:
|
||||||
|
rb 0x100*48 ; max 48 icons
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
align 4
|
||||||
|
image_area:
|
||||||
|
rb 52*52*3
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
;align 4
|
||||||
|
;shape_reference_0:
|
||||||
|
; rb 52*52 ; ( window_size_X + 1 ) * ( window_size_Y + 1 )
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
I_END:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user