2010-10-24 14:19:44 +02:00
|
|
|
; kpack = Kolibri Packer
|
2010-11-06 19:12:33 +01:00
|
|
|
;---------------------------------------------------------------------
|
2010-12-07 15:51:06 +01:00
|
|
|
; version: 0.20
|
2011-08-18 16:19:27 +02:00
|
|
|
; last update: 08/18/2011
|
|
|
|
; changed by: Marat Zakiyanov aka Mario79, aka Mario
|
|
|
|
; changes: Checking for "rolled up" window
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; version: 0.20
|
2010-12-07 15:51:06 +01:00
|
|
|
; last update: 07/12/2010
|
|
|
|
; changed by: Marat Zakiyanov aka Mario79, aka Mario
|
|
|
|
; changes: Added code for packing the kernel.mnt
|
|
|
|
;---------------------------------------------------------------------
|
2010-11-06 19:12:33 +01:00
|
|
|
; version: 0.15
|
|
|
|
; last update: 06/11/2010
|
|
|
|
; changed by: Marat Zakiyanov aka Mario79, aka Mario
|
|
|
|
; changes: 1) Window Y=4, B=1
|
|
|
|
; 2) Refresh lenght of data after Editbox editing
|
|
|
|
; 3) Changed format of start parameter -
|
|
|
|
; longer path (total length 255 + zero).
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; version: 0.14
|
|
|
|
; last update: 03/11/2010
|
|
|
|
; changed by: Marat Zakiyanov aka Mario79, aka Mario
|
|
|
|
; changes: select path with OpenDialog,
|
|
|
|
; using Box_Lib and Proc_Lib
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Kpack - Kolibri Packer
|
2010-10-24 14:19:44 +02:00
|
|
|
; 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-06 19:12:33 +01:00
|
|
|
dd I_END
|
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-11-15 19:47:23 +01:00
|
|
|
include '../../../config.inc' ;for nightbuild
|
2010-11-06 19:12:33 +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-11-06 19:12:33 +01:00
|
|
|
load_libraries l_libs_start,load_lib_end
|
|
|
|
cmp eax,-1
|
|
|
|
je exit
|
|
|
|
|
2013-01-17 14:38:55 +01:00
|
|
|
push check1
|
|
|
|
call [init_checkbox]
|
|
|
|
|
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-11-06 19:12:33 +01:00
|
|
|
xor eax,eax
|
|
|
|
cmp [params],al
|
|
|
|
je default
|
|
|
|
|
|
|
|
mov edi,path
|
|
|
|
mov esi,params
|
|
|
|
call copy_1
|
2010-10-31 12:06:54 +01:00
|
|
|
|
2010-11-06 19:12:33 +01:00
|
|
|
sub esi,2
|
|
|
|
std
|
|
|
|
@@:
|
|
|
|
lodsb
|
|
|
|
dec edi
|
|
|
|
cmp al,byte '/'
|
|
|
|
jnz @r
|
|
|
|
|
|
|
|
mov [edi-1],byte 0
|
2010-10-24 14:19:44 +02:00
|
|
|
mov edi,inname
|
2010-11-06 19:12:33 +01:00
|
|
|
add esi,2
|
|
|
|
push esi
|
|
|
|
call copy_1
|
|
|
|
pop esi
|
2010-10-24 14:19:44 +02:00
|
|
|
mov edi,outname
|
2010-11-06 19:12:33 +01:00
|
|
|
call copy_1
|
2010-10-24 14:19:44 +02:00
|
|
|
;---------------------------------------------------------------------
|
2010-11-06 19:12:33 +01:00
|
|
|
call set_editbox_position_all
|
2010-10-24 14:19:44 +02:00
|
|
|
;---------------------------------------------------------------------
|
2010-11-06 19:12:33 +01:00
|
|
|
call draw_window
|
|
|
|
call pack
|
|
|
|
jmp OD_initialization
|
|
|
|
;*********************************************************************
|
2010-10-24 14:19:44 +02:00
|
|
|
default:
|
|
|
|
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-06 19:12:33 +01:00
|
|
|
call set_editbox_position_all
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
OD_initialization:
|
2010-11-03 14:24:14 +01:00
|
|
|
;OpenDialog initialisation
|
|
|
|
push dword OpenDialog_data
|
|
|
|
call [OpenDialog_Init]
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
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]
|
|
|
|
|
2010-12-07 15:51:06 +01:00
|
|
|
push dword check1
|
|
|
|
call [check_box_mouse]
|
|
|
|
|
2010-11-03 14:24:14 +01:00
|
|
|
jmp still
|
|
|
|
;*********************************************************************
|
2010-12-07 15:51:06 +01:00
|
|
|
tell_compress_mess:
|
|
|
|
push compressing_len
|
|
|
|
pop ecx
|
|
|
|
mov esi,compressing_str
|
|
|
|
call write_string
|
|
|
|
ret
|
|
|
|
;*********************************************************************
|
|
|
|
clear_mess_and_displogo:
|
|
|
|
call refresh_editbox_data
|
|
|
|
; clear messages
|
|
|
|
call clear_messages
|
|
|
|
; display logo
|
|
|
|
mov esi,info_str
|
|
|
|
push info_len
|
|
|
|
pop ecx
|
|
|
|
call write_string
|
|
|
|
ret
|
|
|
|
;*********************************************************************
|
2010-11-06 19:12:33 +01: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
|
|
|
|
mcall
|
|
|
|
;*********************************************************************
|
2010-11-03 14:24:14 +01:00
|
|
|
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-12-07 15:51:06 +01:00
|
|
|
mov eax,[check1+32]
|
|
|
|
test eax,10b
|
|
|
|
jnz @f
|
|
|
|
|
2010-10-24 14:19:44 +02:00
|
|
|
call pack
|
2010-11-03 14:24:14 +01:00
|
|
|
jmp still
|
2010-12-07 15:51:06 +01:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
@@:
|
|
|
|
call kerpack
|
|
|
|
jmp still
|
2010-10-24 14:19:44 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
nopack:
|
|
|
|
dec eax
|
|
|
|
jnz nounpack
|
2010-12-07 15:51:06 +01:00
|
|
|
|
2010-10-24 14:19:44 +02:00
|
|
|
call unpack
|
2010-11-03 14:24:14 +01:00
|
|
|
jmp still
|
2010-12-07 15:51:06 +01:00
|
|
|
;---------------------------------------------------------------------
|
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:
|
2010-11-06 19:12:33 +01:00
|
|
|
mov esi,path
|
|
|
|
mov edi,temp_dir_pach
|
|
|
|
call copy_1
|
|
|
|
|
2010-11-03 14:24:14 +01:00
|
|
|
push dword OpenDialog_data
|
|
|
|
call [OpenDialog_Start]
|
|
|
|
cmp [OpenDialog_data.status],1
|
|
|
|
jne @f
|
|
|
|
|
|
|
|
mov esi,filename_area
|
|
|
|
mov edi,inname
|
|
|
|
call copy_1
|
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
|
|
|
|
|
|
|
|
mov esi,temp_dir_pach
|
|
|
|
mov edi,path
|
|
|
|
call copy_1
|
|
|
|
|
2010-11-06 19:12:33 +01:00
|
|
|
call refresh_editbox_data
|
|
|
|
|
2010-11-03 14:24:14 +01:00
|
|
|
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
|
|
|
|
;*********************************************************************
|
2010-11-06 19:12:33 +01:00
|
|
|
refresh_editbox_data:
|
|
|
|
mov esi,inname
|
|
|
|
mov edi,innamelen
|
|
|
|
call refresh_data
|
|
|
|
|
|
|
|
mov esi,outname
|
|
|
|
mov edi,outnamelen
|
|
|
|
call refresh_data
|
|
|
|
|
|
|
|
mov esi,path
|
|
|
|
mov edi,pathlen
|
|
|
|
call refresh_data
|
|
|
|
|
|
|
|
ret
|
|
|
|
;*********************************************************************
|
|
|
|
refresh_data:
|
|
|
|
push esi
|
|
|
|
xor eax,eax
|
|
|
|
cld
|
|
|
|
@@:
|
|
|
|
lodsb
|
|
|
|
test eax,eax
|
|
|
|
jnz @r
|
|
|
|
pop eax
|
|
|
|
sub esi,eax
|
|
|
|
dec esi
|
|
|
|
mov [edi],esi
|
|
|
|
ret
|
|
|
|
;*********************************************************************
|
2010-11-03 14:24:14 +01:00
|
|
|
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
|
|
|
|
;*********************************************************************
|
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
|
2010-11-06 19:12:33 +01:00
|
|
|
mcall 13,<6,414>,<54,222>,[color_table+20]
|
2010-10-31 12:06:54 +01:00
|
|
|
;--------------------------------------
|
2010-10-24 14:19:44 +02:00
|
|
|
draw_messages:
|
2010-11-06 19:12:33 +01:00
|
|
|
mov ebx,12 shl 16+60
|
2010-10-24 14:19:44 +02:00
|
|
|
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
|
2012-05-25 00:03:49 +02:00
|
|
|
|
|
|
|
mcall 48,3,color_table,40
|
|
|
|
;--------------------------------------
|
|
|
|
edit_boxes_set_sys_color edit1,editboxes_end,color_table
|
2013-01-17 14:38:55 +01:00
|
|
|
check_boxes_set_sys_color2 check1,check1_end,color_table
|
2010-11-03 14:24:14 +01:00
|
|
|
;--------------------------------------
|
2010-10-24 14:19:44 +02:00
|
|
|
; define window
|
|
|
|
xor eax,eax
|
2010-11-06 19:12:33 +01:00
|
|
|
mov ecx,100 shl 16+306
|
2010-10-24 14:19:44 +02:00
|
|
|
mov edx,[color_table+20]
|
2010-11-06 19:12:33 +01:00
|
|
|
add edx,34000000h
|
2010-10-31 12:06:54 +01:00
|
|
|
xor esi,esi
|
2010-11-06 19:12:33 +01:00
|
|
|
xor edi,edi
|
|
|
|
mcall ,<100,436>,,,,caption_str
|
2010-11-03 14:24:14 +01:00
|
|
|
mcall 9,procinfo,-1
|
2011-08-18 16:19:27 +02:00
|
|
|
|
|
|
|
mov eax,[procinfo+70] ;status of window
|
|
|
|
test eax,100b
|
|
|
|
jne .end
|
2010-11-03 14:24:14 +01:00
|
|
|
;--------------------------------------
|
|
|
|
; draw lines and frame
|
|
|
|
call draw_lines
|
|
|
|
; draw buttons
|
2011-10-05 00:58:20 +02:00
|
|
|
call draw_buttons
|
2010-11-03 14:24:14 +01:00
|
|
|
; draw messages
|
|
|
|
call draw_messages
|
|
|
|
; draw editbox's
|
|
|
|
mov eax,[procinfo+42]
|
|
|
|
sub eax,65+72+10
|
2010-11-06 19:12:33 +01:00
|
|
|
mov [edit1.width],eax
|
2010-11-03 14:24:14 +01:00
|
|
|
mov [edit2.width],eax
|
|
|
|
mov [edit3.width],eax
|
|
|
|
|
|
|
|
call draw_editbox
|
|
|
|
; end redraw
|
2011-08-18 16:19:27 +02:00
|
|
|
.end:
|
2010-11-03 14:24:14 +01:00
|
|
|
mcall 12,2
|
|
|
|
ret
|
|
|
|
;*********************************************************************
|
|
|
|
draw_editbox:
|
|
|
|
push dword edit1
|
|
|
|
call [edit_box_draw]
|
2010-12-07 15:51:06 +01:00
|
|
|
|
2010-11-03 14:24:14 +01:00
|
|
|
push dword edit2
|
|
|
|
call [edit_box_draw]
|
2010-12-07 15:51:06 +01:00
|
|
|
|
2010-11-03 14:24:14 +01:00
|
|
|
push dword edit3
|
|
|
|
call [edit_box_draw]
|
2010-12-07 15:51:06 +01:00
|
|
|
|
|
|
|
push dword check1
|
|
|
|
call [check_box_draw]
|
2010-11-03 14:24:14 +01:00
|
|
|
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:
|
2010-11-06 19:12:33 +01:00
|
|
|
mov ecx,2 shl 16+12*3
|
2010-10-24 14:19:44 +02:00
|
|
|
; draw frame for messages data
|
|
|
|
push ecx
|
2010-11-06 19:12:33 +01:00
|
|
|
add ecx,50 shl 16+16
|
|
|
|
mcall 38,<3,423>,,[color_table+36]
|
2010-10-31 12:06:54 +01:00
|
|
|
add ecx,224*(1 shl 16+1)
|
|
|
|
mcall
|
|
|
|
sub cx,224
|
2010-11-06 19:12:33 +01:00
|
|
|
mcall ,<3,3>
|
|
|
|
mcall ,<423,423>
|
2010-10-24 14:19:44 +02:00
|
|
|
pop ecx
|
2010-11-03 14:24:14 +01:00
|
|
|
ret
|
|
|
|
;*********************************************************************
|
2011-10-05 00:58:20 +02:00
|
|
|
draw_buttons:
|
2010-10-24 14:19:44 +02:00
|
|
|
; define compress button
|
2010-10-31 12:06:54 +01:00
|
|
|
mov cx,18
|
2012-05-25 00:03:49 +02:00
|
|
|
mcall 8,<351,72>,<1, 17>,2,[color_table+24]
|
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-11-06 19:12:33 +01:00
|
|
|
mcall ,<414,9>
|
2010-10-24 14:19:44 +02:00
|
|
|
shr ecx,16
|
2010-11-06 19:12:33 +01:00
|
|
|
lea ebx,[ecx+1A10002h]
|
2010-10-31 12:06:54 +01:00
|
|
|
mcall 4,,[color_table+28],aQuestion,1
|
2010-10-24 14:19:44 +02:00
|
|
|
pop esi
|
|
|
|
; define settings buttons
|
2010-11-06 19:12:33 +01:00
|
|
|
mov ecx,16*2+2
|
2010-10-24 14:19:44 +02:00
|
|
|
shl ecx,16
|
2010-11-03 14:24:14 +01:00
|
|
|
mov cx,13
|
2010-11-06 19:12:33 +01:00
|
|
|
mcall 8,<6,50>,,4
|
2010-10-24 14:19:44 +02:00
|
|
|
; text on settings buttons
|
2010-11-06 19:12:33 +01:00
|
|
|
mov ebx,9 shl 16+5
|
2010-10-24 14:19:44 +02:00
|
|
|
mov al,4
|
2011-10-06 12:53:56 +02:00
|
|
|
mov ecx,[color_table+32]
|
2010-10-24 14:19:44 +02:00
|
|
|
push buttons1names
|
|
|
|
pop edx
|
|
|
|
push 8
|
|
|
|
pop esi
|
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
|
2011-10-06 12:53:56 +02:00
|
|
|
mcall
|
|
|
|
add edx,esi
|
|
|
|
add ebx,16
|
|
|
|
mov ecx,[color_table+28]
|
|
|
|
mcall
|
2010-10-24 14:19:44 +02:00
|
|
|
; text on compress and decompress buttons
|
|
|
|
or ecx,80000000h
|
2012-05-25 00:03:49 +02:00
|
|
|
mcall ,<364,6>,,aCompress
|
|
|
|
mcall ,<359,24>,,aDecompress
|
2010-10-24 14:19:44 +02:00
|
|
|
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-12-07 15:51:06 +01:00
|
|
|
;kerpack code:
|
|
|
|
include 'kerpack.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:
|
|
|
|
;---------------------------------------------------------------------
|