From aa7b231824b3d9c7d9bd15255222089d360a6ed9 Mon Sep 17 00:00:00 2001 From: "Marat Zakiyanov (Mario79)" Date: Tue, 24 Aug 2010 10:05:54 +0000 Subject: [PATCH] MidAmp 1) Use OpenDialog calls of Proc_Lib now 2) Build with pack git-svn-id: svn://kolibrios.org@1583 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/media/midamp/trunk/build.bat | 3 +- programs/media/midamp/trunk/build.sh | 2 +- .../midamp/trunk/{MIDAMP.ASM => midamp.asm} | 55 +++++++++++++++++-- 3 files changed, 53 insertions(+), 7 deletions(-) rename programs/media/midamp/trunk/{MIDAMP.ASM => midamp.asm} (81%) diff --git a/programs/media/midamp/trunk/build.bat b/programs/media/midamp/trunk/build.bat index 5b76a81bb6..6de95dcad0 100644 --- a/programs/media/midamp/trunk/build.bat +++ b/programs/media/midamp/trunk/build.bat @@ -1,2 +1,3 @@ -@fasm MIDAMP.ASM MIDAMP +@fasm midamp.asm midamp +@kpack midamp @pause \ No newline at end of file diff --git a/programs/media/midamp/trunk/build.sh b/programs/media/midamp/trunk/build.sh index f9e951a398..251e42d02d 100755 --- a/programs/media/midamp/trunk/build.sh +++ b/programs/media/midamp/trunk/build.sh @@ -5,6 +5,6 @@ echo "lang fix en" echo "lang fix en" > lang.inc mkdir bin - fasm -m 65536 MIDAMP.ASM ./bin/midamp + fasm -m 65536 midamp.asm ./bin/midamp rm -f lang.inc exit 0 diff --git a/programs/media/midamp/trunk/MIDAMP.ASM b/programs/media/midamp/trunk/midamp.asm similarity index 81% rename from programs/media/midamp/trunk/MIDAMP.ASM rename to programs/media/midamp/trunk/midamp.asm index 6f4749e869..f660b43fe6 100644 --- a/programs/media/midamp/trunk/MIDAMP.ASM +++ b/programs/media/midamp/trunk/midamp.asm @@ -60,12 +60,16 @@ use32 dd I_END ;APP_MEM dd stacktop ;APP_MEM - 1024 dd I_PARAM + dd cur_dir_path + listsel dd 0 channel dd 0 COLOR_ORDER equ MENUETOS -include '..\..\..\macros.inc' ; decrease code size (optional) -include '..\..\..\develop\libraries\box_lib\asm\trunk\opendial.mac' - use_OpenDialog +include '../../../macros.inc' ; decrease code size (optional) +include '../../../develop/libraries/box_lib/load_lib.mac' + +@use_library + lang fix en ;purge mov include 'debug.inc' @@ -80,8 +84,12 @@ btns: file 'buttons.gif' START: mcall 68, 11 + +load_libraries l_libs_start,end_l_libs + ;OpenDialog initialisation -init_OpenDialog OpenDialog_data + push dword OpenDialog_data + call [OpenDialog_Init] or [flag],FL_BOTTRED;+FL_MUTE mov ecx,ipcarea @@ -130,7 +138,8 @@ clearpath: ;OpenDialog_start: ; copy_path open_dialog_name,path,library_path,0 - start_OpenDialog OpenDialog_data + push dword OpenDialog_data + call [OpenDialog_Start] cmp [OpenDialog_data.status],2 ; OpenDialog does not start je .fopen ; some kind of alternative, instead OpenDialog @@ -375,6 +384,12 @@ OpenDialog_data: .openfile_pach dd filename ;+36 .filename_area dd 0 ;+40 .filter_area dd Filter +.x: +.x_size dw 420 ;+48 ; Window X size +.x_start dw 10 ;+50 ; Window X position +.y: +.y_size dw 320 ;+52 ; Window y size +.y_start dw 10 ;+54 ; Window Y position communication_area_name: db 'FFFFFFFF_open_dialog',0 @@ -390,6 +405,33 @@ db 'MID',0 .end: db 0 ;--------------------------------------------------------------------- +system_dir_ProcLib db '/sys/lib/proc_lib.obj',0 + +head_f_i: +head_f_l db 'error',0 +err_message_found_lib2 db 'proc_lib.obj - Not found!',0 + +err_message_import2 db 'proc_lib.obj - Wrong import!',0 + +;--------------------------------------------------------------------- +align 4 +ProcLib_import: +OpenDialog_Init dd aOpenDialog_Init +OpenDialog_Start dd aOpenDialog_Start +;OpenDialog__Version dd aOpenDialog_Version + dd 0 + dd 0 +aOpenDialog_Init db 'OpenDialog_init',0 +aOpenDialog_Start db 'OpenDialog_start',0 +;aOpenDialog_Version db 'Version_OpenDialog',0 +;--------------------------------------------------------------------- +l_libs_start: + +library01 l_libs system_dir_ProcLib+9, cur_dir_path, temp_dir_pach, system_dir_ProcLib, \ +err_message_found_lib2, head_f_l, ProcLib_import, err_message_import2, head_f_i + +end_l_libs: +;--------------------------------------------------------------------- dir_info: dd 1 dd 0 @@ -440,6 +482,9 @@ IncludeUGlobals ;---------------------------------------------------------------- temp_dir_pach: rb 4096 +;---------------------------------------------------------------- +cur_dir_path: + rb 4096 ;---------------------------------------------------------------- rb 4096 thread_stack: