41,10 → 41,10 |
dd path |
|
include 'MACROS.INC' |
include 'load_lib.mac' |
;--------------------------------------------------------------------- |
;--- Start of program ---------------------------------------------- |
;--------------------------------------------------------------------- |
|
START: |
mcall 68, 11 |
mcall 66, 1, 1 |
56,31 → 56,37 |
mov [menu_data_2.procinfo],eax |
;--------------------------------------------------------------------- |
; loading Box_Lib library |
mov ebx,boxlib_name |
mov esi,path |
mov edi,file_name |
call copy_path |
load_libraries l_libs_start,end_l_libs |
;sys_load_library boxlib_name, path, file_name, system_dir, \ |
;er_message_found_lib, ihead_f_l, myimport, er_message_import, ihead_f_i |
; test eax,eax |
; jnz button.exit |
|
mcall 68,19,file_name ; load of alternative |
test eax,eax |
jnz @f |
|
mcall 68,19,system_dir ; load of sys directory |
test eax,eax |
jz button.exit |
@@: |
call import_boxlib |
;----------------------------------old |
; mov ebx,boxlib_name |
; mov esi,path |
; mov edi,file_name |
; call copy_path |
; |
; mcall 68,19,file_name ; load of alternative |
; test eax,eax |
; jnz @f |
; |
; mcall 68,19,system_dir ; load of sys directory |
; test eax,eax |
; jz button.exit |
;@@: |
; call import_boxlib |
;--------------------------------------------------------------------- |
; Load and convert BMP file for DinamicButton |
; This procedures use cnv_bmp.obj and this module used only for |
; demonstration of use DinamicButton |
|
; mov ebx,plugin_BMP_name |
; mov esi,path |
; mov edi,file_name |
copy_path plugin_BMP_name,path,file_name |
; |
|
mov ebx,plugin_BMP_name |
mov esi,path |
mov edi,file_name |
call copy_path |
|
mcall 68,19,file_name |
test eax,eax |
jz button.exit |
88,11 → 94,26 |
mov eax,[eax+4] |
mov [plugin],eax |
|
mov ebx,icons_file_name |
mov esi,path |
mov edi,file_name |
call copy_path |
|
;ïðîâåðêà íà ñêîëüêî óäà÷íî çàãóçèëàñü íàøà ëèáà |
mov ebp,library01 |
cmp dword [ebp+ll_struc_size-4],0 |
jnz button.exit |
; |
; mov ebp,library02 |
; cmp dword [ebp+ll_struc_size-4],0x2 |
; jnz button.exit |
; mov eax,dword [ebp+36] |
; mov eax,[eax+4] |
; mov [plugin],eax |
|
|
|
; mov ebx,icons_file_name |
; mov esi,path |
; mov edi,file_name |
copy_path icons_file_name,path,file_name |
|
mcall 70, fileinfo |
|
mov [fileinfo+0],dword 0 |
344,76 → 365,7 |
mov bx,30 |
mcall 13, , , 0x0 |
ret |
;--------------------------------------------------------------------- |
copy_path: |
xor eax,eax |
@@: |
cld |
lodsb |
stosb |
test eax,eax |
jnz @b |
mov esi,edi |
@@: |
std |
lodsb |
cmp al,'/' |
jnz @b |
mov edi,esi |
add edi,2 |
mov esi,ebx |
@@: |
cld |
lodsb |
stosb |
test eax,eax |
jnz @b |
ret |
;--------------------------------------------------------------------- |
; Import procedure written by <Lrz> |
; Copyright (c) 2008, 2009, <Lrz> |
; All rights reserved. |
; importing Box_lib entry |
|
import_boxlib: |
; initialize import |
mov edx, eax |
mov esi,myimport |
.import_loop: |
lodsd |
test eax, eax |
jz .import_done |
push edx |
.import_find: |
mov ebx, [edx] |
test ebx, ebx |
jz .exit ;import_not_found |
push eax |
@@: |
mov cl, [eax] |
cmp cl, [ebx] |
jnz .import_find_next |
test cl, cl |
jz .import_found |
inc eax |
inc ebx |
jmp @b |
.import_find_next: |
pop eax |
add edx, 8 |
jmp .import_find |
.import_found: |
pop eax |
mov eax, [edx+4] |
mov [esi-4], eax |
pop edx |
jmp .import_loop |
.import_done: |
ret |
.exit: |
add esp,4 |
jmp button.exit |
;--------------------------------------------------------------------- |
include 'data.inc' |
include 'w_about.inc' |
IM_END: |