2010-10-24 14:19:44 +02:00
|
|
|
|
; kpack = Kolibri Packer
|
|
|
|
|
; Kolibri version
|
|
|
|
|
; Written by diamond in 2006, 2007 specially for KolibriOS
|
|
|
|
|
;
|
|
|
|
|
; Disassemled and corrected in 2010 specially for FASM
|
|
|
|
|
; by Marat Zakiyanov aka Mario79, aka Mario
|
|
|
|
|
;
|
|
|
|
|
; Uses LZMA compression library by Igor Pavlov
|
|
|
|
|
; (for more information on LZMA and 7-Zip visit http://www.7-zip.org)
|
|
|
|
|
; (plain-C packer and ASM unpacker are ported by diamond)
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
use32
|
|
|
|
|
org 0
|
|
|
|
|
|
|
|
|
|
db 'MENUET01'
|
|
|
|
|
dd 1
|
2010-10-31 12:06:54 +01:00
|
|
|
|
dd START
|
|
|
|
|
dd IM_END
|
2010-11-03 14:24:14 +01:00
|
|
|
|
dd I_END ;memf
|
2010-10-31 12:06:54 +01:00
|
|
|
|
dd stacktop
|
|
|
|
|
dd params
|
2010-11-03 14:24:14 +01:00
|
|
|
|
dd cur_dir_path
|
2010-10-24 14:19:44 +02:00
|
|
|
|
;---------------------------------------------------------------------
|
2010-10-31 12:06:54 +01:00
|
|
|
|
include '..\..\..\macros.inc'
|
2010-11-03 14:24:14 +01:00
|
|
|
|
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
|
|
|
|
|
include '../../../develop/libraries/box_lib/load_lib.mac'
|
|
|
|
|
@use_library
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-10-24 14:19:44 +02:00
|
|
|
|
START:
|
2010-11-03 14:24:14 +01:00
|
|
|
|
mcall 68,11
|
|
|
|
|
mcall 40,100111b
|
|
|
|
|
|
2010-10-24 14:19:44 +02:00
|
|
|
|
call clear_messages
|
|
|
|
|
; set default path = /RD/1/
|
|
|
|
|
mov esi,defpath
|
|
|
|
|
mov edi,path
|
|
|
|
|
mov [edi-4],dword 6
|
|
|
|
|
movsw
|
|
|
|
|
movsd
|
|
|
|
|
; get system window info
|
2010-10-31 12:06:54 +01:00
|
|
|
|
mcall 48,3,color_table,40
|
2010-10-24 14:19:44 +02:00
|
|
|
|
inc ebx
|
2010-10-31 12:06:54 +01:00
|
|
|
|
mcall
|
2010-10-24 14:19:44 +02:00
|
|
|
|
mov [skinheight],eax
|
2010-11-03 14:24:14 +01:00
|
|
|
|
jmp default
|
2010-10-24 14:19:44 +02:00
|
|
|
|
; check command line
|
|
|
|
|
mov esi,params
|
|
|
|
|
mov [esi+100h],byte 0
|
2010-10-31 12:06:54 +01:00
|
|
|
|
;--------------------------------------
|
2010-10-24 14:19:44 +02:00
|
|
|
|
parse_opt:
|
|
|
|
|
call skip_spaces
|
|
|
|
|
test al,al
|
|
|
|
|
jz default
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-10-24 14:19:44 +02:00
|
|
|
|
mov edi,inname
|
|
|
|
|
call copy_name
|
|
|
|
|
test al,al
|
|
|
|
|
jz outeqin
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-10-24 14:19:44 +02:00
|
|
|
|
mov edi,outname
|
|
|
|
|
call copy_name
|
|
|
|
|
test al,al
|
|
|
|
|
jnz default
|
2010-10-31 12:06:54 +01:00
|
|
|
|
;--------------------------------------
|
2010-10-24 14:19:44 +02:00
|
|
|
|
doit:
|
|
|
|
|
call draw_window
|
|
|
|
|
call pack
|
2010-11-03 14:24:14 +01:00
|
|
|
|
jmp still
|
2010-10-24 14:19:44 +02:00
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
clear_messages:
|
|
|
|
|
xor eax,eax
|
|
|
|
|
mov ecx,80*20/4+1
|
|
|
|
|
mov edi,message_mem
|
|
|
|
|
rep stosd
|
|
|
|
|
ret
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
exit:
|
|
|
|
|
xor eax,eax
|
|
|
|
|
dec eax
|
2010-10-31 12:06:54 +01:00
|
|
|
|
mcall
|
|
|
|
|
;--------------------------------------
|
2010-10-24 14:19:44 +02:00
|
|
|
|
outeqin:
|
2010-11-03 14:24:14 +01:00
|
|
|
|
mov ecx,256/4+1
|
2010-10-24 14:19:44 +02:00
|
|
|
|
mov esi,inname-4
|
|
|
|
|
mov edi,outname-4
|
|
|
|
|
rep movsd
|
|
|
|
|
jmp doit
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
default:
|
2010-11-03 14:24:14 +01:00
|
|
|
|
|
|
|
|
|
load_libraries l_libs_start,load_lib_end
|
|
|
|
|
cmp eax,-1
|
|
|
|
|
je exit
|
|
|
|
|
|
2010-10-24 14:19:44 +02:00
|
|
|
|
mov esi,definoutname
|
|
|
|
|
mov edi,esi
|
|
|
|
|
xor ecx,ecx
|
|
|
|
|
xor eax,eax
|
|
|
|
|
dec ecx
|
|
|
|
|
repnz scasb
|
|
|
|
|
not ecx
|
|
|
|
|
dec ecx
|
|
|
|
|
mov [innamelen],ecx
|
|
|
|
|
push ecx
|
|
|
|
|
push esi
|
|
|
|
|
mov edi,inname
|
|
|
|
|
rep movsb
|
|
|
|
|
pop esi
|
|
|
|
|
pop ecx
|
|
|
|
|
mov [outnamelen],ecx
|
|
|
|
|
mov edi,outname
|
|
|
|
|
rep movsb
|
|
|
|
|
;---------------------------------------------------------------------
|
2010-11-03 14:24:14 +01:00
|
|
|
|
; mov edi,fname_buf
|
|
|
|
|
; mov esi,path4
|
|
|
|
|
; call copy_1
|
|
|
|
|
|
|
|
|
|
;OpenDialog initialisation
|
|
|
|
|
push dword OpenDialog_data
|
|
|
|
|
call [OpenDialog_Init]
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
call set_editbox_position_all
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
red:
|
2010-10-24 14:19:44 +02:00
|
|
|
|
call draw_window
|
2010-10-31 12:06:54 +01:00
|
|
|
|
;--------------------------------------
|
2010-11-03 14:24:14 +01:00
|
|
|
|
still:
|
2010-10-31 12:06:54 +01:00
|
|
|
|
mcall 10
|
2010-10-24 14:19:44 +02:00
|
|
|
|
dec eax
|
2010-11-03 14:24:14 +01:00
|
|
|
|
jz red
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-10-24 14:19:44 +02:00
|
|
|
|
dec eax
|
2010-11-03 14:24:14 +01:00
|
|
|
|
jz key
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-10-24 14:19:44 +02:00
|
|
|
|
dec eax
|
2010-11-03 14:24:14 +01:00
|
|
|
|
jz button
|
|
|
|
|
|
|
|
|
|
push dword edit1
|
|
|
|
|
call [edit_box_mouse]
|
|
|
|
|
|
|
|
|
|
push dword edit2
|
|
|
|
|
call [edit_box_mouse]
|
|
|
|
|
|
|
|
|
|
push dword edit3
|
|
|
|
|
call [edit_box_mouse]
|
|
|
|
|
|
|
|
|
|
jmp still
|
|
|
|
|
;*********************************************************************
|
|
|
|
|
button:
|
2010-10-24 14:19:44 +02:00
|
|
|
|
; button pressed
|
2010-10-31 12:06:54 +01:00
|
|
|
|
mcall 17
|
2010-10-24 14:19:44 +02:00
|
|
|
|
xchg al,ah
|
|
|
|
|
cmp al,7
|
|
|
|
|
jz but7
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-10-24 14:19:44 +02:00
|
|
|
|
dec eax
|
|
|
|
|
jz exit
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-10-24 14:19:44 +02:00
|
|
|
|
dec eax
|
|
|
|
|
jnz nopack
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-10-24 14:19:44 +02:00
|
|
|
|
call pack
|
2010-11-03 14:24:14 +01:00
|
|
|
|
jmp still
|
2010-10-24 14:19:44 +02:00
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
nopack:
|
|
|
|
|
dec eax
|
|
|
|
|
jnz nounpack
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-10-24 14:19:44 +02:00
|
|
|
|
call unpack
|
2010-11-03 14:24:14 +01:00
|
|
|
|
jmp still
|
2010-10-24 14:19:44 +02:00
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
but7:
|
|
|
|
|
call clear_messages
|
|
|
|
|
; display logo
|
|
|
|
|
mov esi,info_str
|
|
|
|
|
push info_len
|
|
|
|
|
pop ecx
|
|
|
|
|
call write_string
|
|
|
|
|
; display info
|
|
|
|
|
mov esi,usage_str
|
|
|
|
|
mov ecx,usage_len
|
|
|
|
|
call write_string
|
2010-11-03 14:24:14 +01:00
|
|
|
|
jmp still
|
2010-10-24 14:19:44 +02:00
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
nounpack:
|
|
|
|
|
dec eax
|
2010-11-03 14:24:14 +01:00
|
|
|
|
jnz still
|
|
|
|
|
|
|
|
|
|
call OpenDialog_start
|
|
|
|
|
jmp still
|
|
|
|
|
;*********************************************************************
|
|
|
|
|
OpenDialog_start:
|
|
|
|
|
push dword OpenDialog_data
|
|
|
|
|
call [OpenDialog_Start]
|
|
|
|
|
cmp [OpenDialog_data.status],1
|
|
|
|
|
jne @f
|
|
|
|
|
|
|
|
|
|
mov esi,filename_area
|
|
|
|
|
mov edi,inname
|
|
|
|
|
call copy_1
|
|
|
|
|
sub edi,inname
|
|
|
|
|
mov [innamelen],edi
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-11-03 14:24:14 +01:00
|
|
|
|
mov esi,filename_area
|
|
|
|
|
mov edi,outname
|
|
|
|
|
call copy_1
|
|
|
|
|
sub edi,outname
|
|
|
|
|
mov [outnamelen],edi
|
|
|
|
|
|
|
|
|
|
mov esi,temp_dir_pach
|
|
|
|
|
mov edi,path
|
|
|
|
|
call copy_1
|
|
|
|
|
sub edi,path
|
|
|
|
|
dec edi
|
|
|
|
|
mov [pathlen],edi
|
|
|
|
|
|
|
|
|
|
call set_editbox_position_all
|
|
|
|
|
|
|
|
|
|
call draw_editbox
|
2010-10-24 14:19:44 +02:00
|
|
|
|
@@:
|
|
|
|
|
ret
|
2010-11-03 14:24:14 +01:00
|
|
|
|
;*********************************************************************
|
|
|
|
|
copy_1:
|
2010-10-24 14:19:44 +02:00
|
|
|
|
xor eax,eax
|
2010-11-03 14:24:14 +01:00
|
|
|
|
cld
|
2010-10-24 14:19:44 +02:00
|
|
|
|
@@:
|
|
|
|
|
lodsb
|
2010-11-03 14:24:14 +01:00
|
|
|
|
stosb
|
2010-10-24 14:19:44 +02:00
|
|
|
|
test eax,eax
|
2010-11-03 14:24:14 +01:00
|
|
|
|
jnz @r
|
|
|
|
|
ret
|
|
|
|
|
;*********************************************************************
|
|
|
|
|
set_editbox_position_all:
|
|
|
|
|
mov ebx,inname
|
|
|
|
|
mov edi,edit1
|
|
|
|
|
call set_editbox_position
|
|
|
|
|
|
|
|
|
|
mov ebx,outname
|
|
|
|
|
mov edi,edit2
|
|
|
|
|
call set_editbox_position
|
|
|
|
|
|
|
|
|
|
mov ebx,path
|
|
|
|
|
mov edi,edit3
|
|
|
|
|
call set_editbox_position
|
|
|
|
|
ret
|
|
|
|
|
;*********************************************************************
|
|
|
|
|
key:
|
|
|
|
|
mcall 2
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-11-03 14:24:14 +01:00
|
|
|
|
push dword edit1
|
|
|
|
|
call [edit_box_key]
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-11-03 14:24:14 +01:00
|
|
|
|
push dword edit2
|
|
|
|
|
call [edit_box_key]
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-11-03 14:24:14 +01:00
|
|
|
|
push dword edit3
|
|
|
|
|
call [edit_box_key]
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-11-03 14:24:14 +01:00
|
|
|
|
jmp still
|
|
|
|
|
;*********************************************************************
|
|
|
|
|
onenter:
|
|
|
|
|
; cmp [curedit],inname
|
|
|
|
|
; jnz @f
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-11-03 14:24:14 +01:00
|
|
|
|
push 2
|
2010-10-24 14:19:44 +02:00
|
|
|
|
pop eax
|
2010-11-03 14:24:14 +01:00
|
|
|
|
jmp nounpack
|
|
|
|
|
;*********************************************************************
|
2010-10-24 14:19:44 +02:00
|
|
|
|
get_full_name:
|
|
|
|
|
push esi
|
|
|
|
|
mov esi,path
|
|
|
|
|
mov ecx,[esi-4]
|
|
|
|
|
mov edi,fullname
|
|
|
|
|
rep movsb
|
|
|
|
|
mov al,'/'
|
|
|
|
|
cmp [edi-1],al
|
|
|
|
|
jz @f
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-10-24 14:19:44 +02:00
|
|
|
|
stosb
|
2010-10-31 12:06:54 +01:00
|
|
|
|
;--------------------------------------
|
2010-10-24 14:19:44 +02:00
|
|
|
|
@@:
|
|
|
|
|
pop esi
|
|
|
|
|
cmp [esi],al
|
|
|
|
|
jnz @f
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-10-24 14:19:44 +02:00
|
|
|
|
mov edi,fullname
|
2010-10-31 12:06:54 +01:00
|
|
|
|
;--------------------------------------
|
2010-10-24 14:19:44 +02:00
|
|
|
|
@@:
|
|
|
|
|
mov ecx,[esi-4]
|
|
|
|
|
rep movsb
|
|
|
|
|
xor eax,eax
|
|
|
|
|
stosb
|
|
|
|
|
ret
|
2010-11-03 14:24:14 +01:00
|
|
|
|
;*********************************************************************
|
2010-10-24 14:19:44 +02:00
|
|
|
|
write_string:
|
|
|
|
|
; in: esi=pointer, ecx=length
|
|
|
|
|
mov edx,[message_cur_pos]
|
2010-10-31 12:06:54 +01:00
|
|
|
|
;--------------------------------------
|
2010-10-24 14:19:44 +02:00
|
|
|
|
x1:
|
|
|
|
|
lea edi,[message_mem+edx]
|
2010-10-31 12:06:54 +01:00
|
|
|
|
;--------------------------------------
|
2010-10-24 14:19:44 +02:00
|
|
|
|
do_write_char:
|
|
|
|
|
lodsb
|
|
|
|
|
cmp al,10
|
|
|
|
|
jz newline
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-10-24 14:19:44 +02:00
|
|
|
|
stosb
|
|
|
|
|
inc edx
|
|
|
|
|
loop do_write_char
|
|
|
|
|
jmp x2
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
newline:
|
|
|
|
|
xor eax,eax
|
|
|
|
|
stosb
|
|
|
|
|
xchg eax,edx
|
|
|
|
|
push ecx
|
|
|
|
|
push eax
|
|
|
|
|
mov ecx,80
|
|
|
|
|
div ecx
|
|
|
|
|
pop eax
|
|
|
|
|
xchg eax,edx
|
|
|
|
|
sub edx,eax
|
|
|
|
|
add edx,ecx
|
|
|
|
|
pop ecx
|
|
|
|
|
loop x1
|
2010-10-31 12:06:54 +01:00
|
|
|
|
;--------------------------------------
|
2010-10-24 14:19:44 +02:00
|
|
|
|
x2:
|
|
|
|
|
mov [message_cur_pos],edx
|
|
|
|
|
; update window
|
|
|
|
|
mov ecx,[skinheight]
|
|
|
|
|
shl ecx,16
|
|
|
|
|
add ecx,3700DEh
|
2010-10-31 12:06:54 +01:00
|
|
|
|
mcall 13,<9,417>,,[color_table+20]
|
|
|
|
|
;--------------------------------------
|
2010-10-24 14:19:44 +02:00
|
|
|
|
draw_messages:
|
|
|
|
|
mov ebx,[skinheight]
|
|
|
|
|
add ebx,3Ch+12*10000h
|
|
|
|
|
mov edi,message_mem
|
2010-10-31 12:06:54 +01:00
|
|
|
|
;--------------------------------------
|
2010-10-24 14:19:44 +02:00
|
|
|
|
@@:
|
|
|
|
|
push edi
|
|
|
|
|
xor eax,eax
|
|
|
|
|
push 80
|
|
|
|
|
pop ecx
|
|
|
|
|
repnz scasb
|
|
|
|
|
sub ecx,79
|
|
|
|
|
neg ecx
|
|
|
|
|
mov esi,ecx
|
|
|
|
|
pop edi
|
2010-10-31 12:06:54 +01:00
|
|
|
|
mcall 4,,[color_table+32],edi
|
2010-10-24 14:19:44 +02:00
|
|
|
|
add ebx,10
|
|
|
|
|
add edi,80
|
|
|
|
|
cmp edi,message_cur_pos
|
|
|
|
|
jb @b
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-10-24 14:19:44 +02:00
|
|
|
|
ret
|
2010-11-03 14:24:14 +01:00
|
|
|
|
;*********************************************************************
|
2010-10-24 14:19:44 +02:00
|
|
|
|
draw_window:
|
|
|
|
|
; start redraw
|
2010-10-31 12:06:54 +01:00
|
|
|
|
mcall 12,1
|
2010-10-24 14:19:44 +02:00
|
|
|
|
mov edi,[skinheight]
|
2010-11-03 14:24:14 +01:00
|
|
|
|
;--------------------------------------
|
2010-10-24 14:19:44 +02:00
|
|
|
|
; define window
|
|
|
|
|
xor eax,eax
|
2010-10-31 12:06:54 +01:00
|
|
|
|
mov ecx,100 shl 16+286
|
2010-10-24 14:19:44 +02:00
|
|
|
|
add ecx,edi
|
|
|
|
|
mov edx,[color_table+20]
|
|
|
|
|
add edx,13000000h
|
2010-11-03 14:24:14 +01:00
|
|
|
|
; push edi
|
2010-10-31 12:06:54 +01:00
|
|
|
|
xor esi,esi
|
2010-11-03 14:24:14 +01:00
|
|
|
|
mcall ,<100,435>,,,,fullname ;temp_dir_pach ;caption_str
|
|
|
|
|
; pop edi
|
|
|
|
|
mcall 9,procinfo,-1
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
; draw lines and frame
|
|
|
|
|
call draw_lines
|
|
|
|
|
; draw buttons
|
|
|
|
|
call draw_bittons
|
|
|
|
|
; infile, outfile, path strings
|
|
|
|
|
; call draw_strings
|
|
|
|
|
; draw messages
|
|
|
|
|
call draw_messages
|
|
|
|
|
; draw editbox's
|
|
|
|
|
mov eax,[procinfo+42]
|
|
|
|
|
sub eax,65+72+10
|
|
|
|
|
mov [edit1.width],eax ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov [edit2.width],eax
|
|
|
|
|
mov [edit3.width],eax
|
|
|
|
|
|
|
|
|
|
call draw_editbox
|
|
|
|
|
; end redraw
|
|
|
|
|
mcall 12,2
|
|
|
|
|
ret
|
|
|
|
|
;*********************************************************************
|
|
|
|
|
draw_editbox:
|
|
|
|
|
push dword edit1
|
|
|
|
|
call [edit_box_draw]
|
|
|
|
|
push dword edit2
|
|
|
|
|
call [edit_box_draw]
|
|
|
|
|
push dword edit3
|
|
|
|
|
call [edit_box_draw]
|
|
|
|
|
ret
|
|
|
|
|
;*********************************************************************
|
|
|
|
|
set_editbox_position:
|
|
|
|
|
mov esi,ebx
|
|
|
|
|
cld
|
|
|
|
|
@@:
|
|
|
|
|
lodsb
|
|
|
|
|
test al,al
|
|
|
|
|
jne @r
|
|
|
|
|
sub esi,ebx
|
|
|
|
|
mov eax,esi
|
|
|
|
|
dec eax
|
|
|
|
|
mov [edi+48], eax ;ed_size
|
|
|
|
|
mov [edi+52], eax ;ed_pos
|
|
|
|
|
ret
|
|
|
|
|
;*********************************************************************
|
|
|
|
|
draw_lines:
|
|
|
|
|
; mov edi,[skinheight]
|
2010-10-24 14:19:44 +02:00
|
|
|
|
; lines - horizontal
|
2010-11-03 14:24:14 +01:00
|
|
|
|
; mov ebx,8 shl 16+352
|
|
|
|
|
; mov ecx,edi
|
|
|
|
|
; shl ecx,16
|
|
|
|
|
; or ecx,edi
|
|
|
|
|
; add ecx,2 shl 16+2
|
|
|
|
|
; mcall 38,,,[color_table+36]
|
|
|
|
|
; mov esi,3
|
|
|
|
|
;@@:
|
|
|
|
|
; add ecx,12 shl 16+12
|
|
|
|
|
; mcall
|
|
|
|
|
; dec esi
|
|
|
|
|
; jnz @r
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
; lines - vertical
|
|
|
|
|
; sub ecx,36 shl 16
|
|
|
|
|
; mcall ,<8,8>
|
|
|
|
|
; add ebx,52 shl 16+52
|
|
|
|
|
; mcall
|
|
|
|
|
; add ebx,292 shl 16+292
|
|
|
|
|
; mcall
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
mov edi,[skinheight]
|
2010-10-24 14:19:44 +02:00
|
|
|
|
mov ecx,edi
|
|
|
|
|
shl ecx,16
|
|
|
|
|
or ecx,edi
|
2010-11-03 14:24:14 +01:00
|
|
|
|
add ecx,2 shl 16+2+12*3
|
|
|
|
|
; add ecx,12*3
|
2010-10-24 14:19:44 +02:00
|
|
|
|
; draw frame for messages data
|
|
|
|
|
push ecx
|
2010-10-31 12:06:54 +01:00
|
|
|
|
add ecx,52 shl 16+16
|
2010-11-03 14:24:14 +01:00
|
|
|
|
mcall 38,<8,425>,,[color_table+36]
|
2010-10-31 12:06:54 +01:00
|
|
|
|
add ecx,224*(1 shl 16+1)
|
|
|
|
|
mcall
|
|
|
|
|
sub cx,224
|
|
|
|
|
mcall ,<8,8>
|
|
|
|
|
mcall ,<426,426>
|
2010-10-24 14:19:44 +02:00
|
|
|
|
pop ecx
|
2010-11-03 14:24:14 +01:00
|
|
|
|
ret
|
|
|
|
|
;*********************************************************************
|
|
|
|
|
draw_bittons:
|
2010-10-24 14:19:44 +02:00
|
|
|
|
; define compress button
|
2010-10-31 12:06:54 +01:00
|
|
|
|
mov cx,18
|
|
|
|
|
mcall 8,<354,72>,,2,[color_table+36]
|
2010-10-24 14:19:44 +02:00
|
|
|
|
; uncompress button
|
2010-10-31 12:06:54 +01:00
|
|
|
|
add ecx,18 shl 16
|
2010-10-24 14:19:44 +02:00
|
|
|
|
inc edx
|
2010-10-31 12:06:54 +01:00
|
|
|
|
mcall
|
2010-10-24 14:19:44 +02:00
|
|
|
|
add ecx,-12h+0Ah+140000h
|
|
|
|
|
; question button
|
|
|
|
|
push esi
|
|
|
|
|
mov dl,7
|
2010-10-31 12:06:54 +01:00
|
|
|
|
mcall ,<417,9>
|
2010-10-24 14:19:44 +02:00
|
|
|
|
shr ecx,16
|
|
|
|
|
lea ebx,[ecx+1A40002h]
|
2010-10-31 12:06:54 +01:00
|
|
|
|
mcall 4,,[color_table+28],aQuestion,1
|
2010-11-03 14:24:14 +01:00
|
|
|
|
; mov al,8
|
2010-10-24 14:19:44 +02:00
|
|
|
|
pop esi
|
|
|
|
|
; define settings buttons
|
2010-11-03 14:24:14 +01:00
|
|
|
|
; mov ebx,9 shl 16+50
|
2010-10-24 14:19:44 +02:00
|
|
|
|
lea ecx,[edi+2]
|
2010-11-03 14:24:14 +01:00
|
|
|
|
add ecx,16*2
|
2010-10-24 14:19:44 +02:00
|
|
|
|
shl ecx,16
|
2010-11-03 14:24:14 +01:00
|
|
|
|
mov cx,13
|
|
|
|
|
; push 4
|
|
|
|
|
; pop edx
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
;@@:
|
|
|
|
|
; mcall
|
|
|
|
|
; add ecx,12 shl 16
|
|
|
|
|
; inc edx
|
|
|
|
|
; cmp edx,6
|
|
|
|
|
; jbe @b
|
|
|
|
|
mcall 8,<9,50>,,4
|
2010-10-24 14:19:44 +02:00
|
|
|
|
; text on settings buttons
|
|
|
|
|
lea ebx,[edi+5+0C0000h]
|
|
|
|
|
mov al,4
|
|
|
|
|
mov ecx,[color_table+28]
|
|
|
|
|
push buttons1names
|
|
|
|
|
pop edx
|
|
|
|
|
push 8
|
|
|
|
|
pop esi
|
2010-10-31 12:06:54 +01:00
|
|
|
|
;--------------------------------------
|
2010-10-24 14:19:44 +02:00
|
|
|
|
@@:
|
2010-10-31 12:06:54 +01:00
|
|
|
|
mcall
|
2010-10-24 14:19:44 +02:00
|
|
|
|
add edx,esi
|
2010-11-03 14:24:14 +01:00
|
|
|
|
add ebx,16
|
2010-10-24 14:19:44 +02:00
|
|
|
|
cmp [edx-6],byte ' '
|
|
|
|
|
jnz @b
|
|
|
|
|
; text on compress and decompress buttons
|
|
|
|
|
lea ebx,[edi+8+1720000h]
|
|
|
|
|
or ecx,80000000h
|
2010-10-31 12:06:54 +01:00
|
|
|
|
mcall ,,,aCompress
|
2010-10-24 14:19:44 +02:00
|
|
|
|
lea ebx,[edi+1Ah+16A0000h]
|
2010-10-31 12:06:54 +01:00
|
|
|
|
mcall ,,,aDecompress
|
2010-10-24 14:19:44 +02:00
|
|
|
|
ret
|
2010-11-03 14:24:14 +01:00
|
|
|
|
;*********************************************************************
|
2010-10-24 14:19:44 +02:00
|
|
|
|
copy_name:
|
2010-11-03 14:24:14 +01:00
|
|
|
|
lea edx,[edi+256]
|
2010-10-31 12:06:54 +01:00
|
|
|
|
;--------------------------------------
|
2010-10-24 14:19:44 +02:00
|
|
|
|
@@:
|
|
|
|
|
lodsb
|
|
|
|
|
cmp al,' '
|
|
|
|
|
jbe copy_name_done
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-10-24 14:19:44 +02:00
|
|
|
|
stosb
|
|
|
|
|
cmp edi,edx
|
|
|
|
|
jb @b
|
2010-10-31 12:06:54 +01:00
|
|
|
|
;--------------------------------------
|
2010-10-24 14:19:44 +02:00
|
|
|
|
@@:
|
|
|
|
|
lodsb
|
|
|
|
|
cmp al,' '
|
|
|
|
|
ja @b
|
2010-10-31 12:06:54 +01:00
|
|
|
|
;--------------------------------------
|
2010-10-24 14:19:44 +02:00
|
|
|
|
copy_name_done:
|
|
|
|
|
dec esi
|
2010-11-03 14:24:14 +01:00
|
|
|
|
sub edx,256
|
2010-10-24 14:19:44 +02:00
|
|
|
|
sub edi,edx
|
|
|
|
|
mov [edx-4],edi
|
2010-10-31 12:06:54 +01:00
|
|
|
|
;--------------------------------------
|
2010-10-24 14:19:44 +02:00
|
|
|
|
skip_spaces:
|
|
|
|
|
lodsb
|
|
|
|
|
cmp al,0
|
|
|
|
|
jz @f
|
2010-10-31 12:06:54 +01:00
|
|
|
|
|
2010-10-24 14:19:44 +02:00
|
|
|
|
cmp al,' '
|
|
|
|
|
jbe skip_spaces
|
2010-10-31 12:06:54 +01:00
|
|
|
|
;--------------------------------------
|
2010-10-24 14:19:44 +02:00
|
|
|
|
@@:
|
|
|
|
|
dec esi
|
|
|
|
|
ret
|
2010-11-03 14:24:14 +01:00
|
|
|
|
;*********************************************************************
|
|
|
|
|
;Pack procedures
|
|
|
|
|
include 'packpoc.inc'
|
2010-10-24 14:19:44 +02:00
|
|
|
|
;---------------------------------------------------------------------
|
2010-11-03 14:24:14 +01:00
|
|
|
|
;UnPack procedures
|
|
|
|
|
include 'upacproc.inc'
|
2010-10-24 14:19:44 +02:00
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
;lzma_compress:
|
|
|
|
|
include 'lzma_compress.inc'
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
;lzma_set_dict_size:
|
|
|
|
|
include 'lzma_set_dict_size.inc'
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
;lzma_decompress:
|
|
|
|
|
include 'lzma_decompress.inc'
|
|
|
|
|
;---------------------------------------------------------------------
|
2010-10-31 12:06:54 +01:00
|
|
|
|
;initialized variables and constants
|
|
|
|
|
include 'const_var.inc'
|
2010-10-24 14:19:44 +02:00
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
IM_END:
|
|
|
|
|
;---------------------------------------------------------------------
|
2010-10-31 12:06:54 +01:00
|
|
|
|
;uninitialized data
|
|
|
|
|
include 'data.inc'
|
2010-10-24 14:19:44 +02:00
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
I_END:
|
|
|
|
|
;---------------------------------------------------------------------
|