8,7 → 8,7 |
; Heavyiron 01.12.2013 - new logic |
;--------------------------------------------------------------------- |
appname equ 'RDsave ' |
version equ '1.41' |
version equ '1.42' |
debug equ no |
|
use32 ; ¢ª«îç¨âì 32-¡¨âë© à¥¦¨¬ áᥬ¡«¥à |
56,7 → 56,6 |
mov [autoclose],eax |
invoke ini_get_str,ini_file,apath,apath,fname_buf,4096,path |
stdcall _lstrcpy,ini_path,fname_buf |
|
stdcall _lstrcpy,filename_area,start_temp_file_name |
|
mov eax,PARAMS |
72,7 → 71,6 |
.no_h: |
mov [param],1 |
stdcall _lstrcpy,fname_buf,eax |
xor eax,eax |
mov ah,2 |
jmp noclose |
|
90,9 → 88,8 |
newline |
end if |
;--------------------------------------------------------------------- |
|
default_path: |
stdcall _lstrcpy,fname_buf,communication_area_default_path |
|
mov [hidden],0 |
|
;OpenDialog initialisation |
102,9 → 99,11 |
; prepare for PathShow |
push dword PathShow_data_1 |
call [PathShow_prepare] |
|
mcall 40,0x00000027 |
|
call draw_window |
mov ah,3 |
mov ecx,fname_buf |
jmp noclose |
;--------------------------------------------------------------------- |
path_ok: |
138,13 → 137,11 |
;--------------------------------------------------------------------- |
button: |
mcall 17 ; ¯®«ãç¨âì ¨¤¥â¨ä¨ª â®à ¦ ⮩ ª®¯ª¨ |
dec ah |
jz close |
cmp ah,1 ; ª®¯ª á id=1("§ ªàëâì")? |
jne noclose |
close: |
or eax,-1 ; äãªæ¨ï -1: § ¢¥àè¨âì ¯à®£à ¬¬ã |
mcall |
mcall -1 ; äãªæ¨ï -1: § ¢¥àè¨âì ¯à®£à ¬¬ã |
|
;--------------------------------------------------------------------- |
key: |
mcall 2 |
191,7 → 188,6 |
push dword PathShow_data_1 |
call [PathShow_prepare] |
call draw_window |
mov ecx,fname_buf |
mov ah,2 |
jmp noclose |
|
207,28 → 203,23 |
@@: |
mov edx,rdError |
call print_err |
cmp [param],1 |
je @f |
jmp still |
not_rd: |
cmp [hidden],0 |
jne @f |
pusha |
mov ecx,[sc.work_text] |
or ecx,0xc0000088 |
mcall 4,<132,96>, ,label2, ,[sc.work] |
popa |
@@: |
mov [param],0 |
jmp no_params |
not_rd: |
pop eax |
mcall |
call check_for_error |
cmp [param],1 |
je @f |
jmp still |
@@: |
mov [param],0 |
jmp no_params |
|
;--------------------------------------------------------------------- |
check_for_error: ;¡à ¡®â稪 ®è¨¡®ª |
stdcall _lstrcpy,check_dir,ok |
stdcall _lstrcat,check_dir,fname_buf |
mov edx,check_dir |
test eax,eax |
jz print_ok |
cmp ebx,6 |
239,17 → 230,18 |
cmp eax, 11 |
ja .unknown |
mov edx, [errors+eax*4] |
stdcall _lstrcpy,error_msg,error |
stdcall _lstrcat,error_msg,edx |
mov edx, error_msg |
jmp print_err |
.unknown: |
mov edx, aUnknownError |
|
print_err: |
pushad |
stdcall _lstrlen,ini_path |
pusha |
invoke ini_set_str,ini_file,apath,apath,ini_path,eax |
stdcall _lstrcpy,fname_buf,ini_path |
popad |
popa |
cmp [hidden],1 |
je @f |
cmp [param],1 |
258,8 → 250,7 |
imul eax,6 |
mov ebx,390 |
sub ebx,eax |
sar ebx,1 |
shl ebx,16 |
shl ebx,15 |
add ebx,96 |
mov ecx,[sc.work_text] |
or ecx,0xc0880000 |
268,64 → 259,64 |
@@: |
mov dword [is_notify + 8], edx |
mcall 70, is_notify |
ret |
mov [param],0 |
mov [hidden],0 |
stdcall _lstrcpy,fname_buf,ini_path |
jmp no_params |
|
print_ok: |
cmp [hidden],1 |
je @f |
cmp [param],1 |
je @f |
mov edx,ok |
stdcall _lstrlen,edx |
imul eax,6 |
mov ebx,390 |
sub ebx,eax |
sar ebx,1 |
shl ebx,16 |
shl ebx,15 |
add ebx,96 |
mov ecx,[sc.work_text] |
or ecx,0xc0008800 |
mcall 4, , , , ,[sc.work] |
mcall 5,100 |
mcall 5,200 |
cmp [autoclose],1 |
je close |
ret |
@@: |
stdcall _lstrcpy,check_dir,ok |
stdcall _lstrcat,check_dir,fname_buf |
mov edx,check_dir |
mov dword [is_notify + 8], edx |
mcall 70, is_notify |
mcall 5,100 |
jmp close |
|
;--------------------------------------------------------------------- |
draw_PathShow: |
pushad |
pusha |
mcall 13,<15,280>,<32,16>,0xffffff |
push dword PathShow_data_1 |
call [PathShow_draw] |
popad |
popa |
ret |
;--------------------------------------------------------------------- |
save_ini: |
pushad |
pusha |
stdcall _lstrlen,fname_buf |
invoke ini_set_str,ini_file,apath,apath,fname_buf,eax |
invoke ini_set_int,ini_file,asettings,aautoclose,[autoclose] |
popad |
popa |
ret |
;--------------------------------------------------------------------- |
check_path: |
stdcall _lstrlen,check_dir |
mov edi,check_dir |
add edi,eax |
add eax,check_dir |
@@: |
mov byte [edi],0 |
dec edi |
cmp byte [edi],'/' |
dec eax |
cmp byte [eax],'/' |
jne @b |
mov byte [eax+1],0 |
|
if debug eq yes |
dps 'read_folder_name: ' |
mov edx,check_dir |
call debug_outstr |
newline |
end if |
mcall 70,read_folder |
ret |
;--------------------------------------------------------------------- |
339,7 → 330,7 |
mcall 0,<200,400>,<200,130>, , ,title |
|
;buttons |
mcall 8,<198,70>,<68,20>,2,[sc.work_button] |
mcall 8,<198,70>,<68,20>,1,[sc.work_button] |
inc edx |
mcall ,<125,70>, |
inc edx |
349,7 → 340,7 |
mov ecx,[sc.work_button_text] |
or ecx,0x80000000 |
mcall 4,<134,75>, ,save |
mcall ,<215,75>, ,cansel |
mcall ,<215,75>, ,cancel |
mcall ,<315,36>, ,select |
|
mov ecx,[sc.work] |
367,87 → 358,91 |
;--------------------------------------------------------------------- |
if lang eq ru |
save db '®åà ¨âì',0 |
cansel db '⬥ ',0 |
cancel db '⬥ ',0 |
select db '§¬¥¨âì',0 |
label1 db ' ¡à § ¡ã¤¥â á®åà ¥ ¢: ',0 |
ok db 'RAM-¤¨áª á®åà ¥ ãá¯¥è® ¢ ',0 |
error1 db '¥ ®¯à¥¤¥«¥ ¡ § ¨/¨«¨ à §¤¥« ¦ñá⪮£® ¤¨áª ',0 |
error2 db 'ãªæ¨ï ¥ ¯®¤¤¥à¦¨¢ ¥âáï ¤«ï ¤ ®© ä ©«®¢®© á¨á⥬ë',0 |
error3 db '¥¨§¢¥áâ ï ä ©«®¢ ï á¨á⥬ ',0 |
error4 db 'âà ®... 訡ª 4',0 |
error5 db '¥áãé¥áâ¢ãî騩 ¯ãâì',0 |
error6 db ' ©« § ª®ç¨«áï',0 |
error7 db 'ª § â¥«ì ¢¥ ¯ ¬ï⨠¯à¨«®¦¥¨ï',0 |
error8 db '¨áª § ¯®«¥',0 |
error9 db ' ©«®¢ ï áâàãªâãà à §àãè¥ ',0 |
error10 db '®áâ㯠§ ¯à¥éñ',0 |
label2 db '®åà ¥¨¥ ®¡à § ...',0 |
ok db 'RAM-¤¨áª á®åà ¥ ãá¯¥è® ',0 |
error1 db '¥ ®¯à¥¤¥«¥ ¡ § ¨/¨«¨ à §¤¥« ¦ñá⪮£® ¤¨áª ',0 |
error2 db 'äãªæ¨ï ¥ ¯®¤¤¥à¦¨¢ ¥âáï ¤«ï ¤ ®© ä ©«®¢®© á¨á⥬ë',0 |
error3 db '¥¨§¢¥áâ ï ä ©«®¢ ï á¨á⥬ ',0 |
error4 db 'áâà ®... 訡ª 4',0 |
error5 db '¥áãé¥áâ¢ãî騩 ¯ãâì',0 |
error6 db 'ä ©« § ª®ç¨«áï',0 |
error7 db '㪠§ â¥«ì ¢¥ ¯ ¬ï⨠¯à¨«®¦¥¨ï',0 |
error8 db '¤¨áª § ¯®«¥',0 |
error9 db 'ä ©«®¢ ï áâàãªâãà à §àãè¥ ',0 |
error10 db '¤®áâ㯠§ ¯à¥éñ',0 |
error11 db '訡ª ãáâனá⢠',0 |
aUnknownError db '¥¨§¢¥áâ ï ®è¨¡ª ',0 |
rdError db '¥«ì§ï á®åà ïâì ®¡à § ¢ á ¬®£® ᥡï',0 |
error_msg db '訡ª : ',0 |
error db '訡ª : ',0 |
;--------------------------------------------------------------------- |
else if lang eq et |
save db 'Salvesta',0 |
cansel db 'Cansel',0 |
cancel db 'Cancel',0 |
select db ' Valige',0 |
label1 db ' RAM-drive will be saved as: ',0 |
label2 db 'Saving in progress...',0 |
ok db 'RAM-ketas salvestatud edukalt ',0 |
error1 db 'Hard disk base and/or partition not defined',0 |
error2 db 'The file system does not support this function',0 |
error3 db 'Tundmatu failisüsteem',0 |
error4 db 'Strange... Error 4',0 |
error5 db 'Vigane teekond',0 |
error6 db 'End of file',0 |
error7 db 'Pointer is outside of application memory',0 |
error8 db 'Ketas täis',0 |
error1 db 'hard disk base and/or partition not defined',0 |
error2 db 'the file system does not support this function',0 |
error3 db 'tundmatu failisüsteem',0 |
error4 db 'strange... Error 4',0 |
error5 db 'vigane teekond',0 |
error6 db 'end of file',0 |
error7 db 'pointer is outside of application memory',0 |
error8 db 'ketas täis',0 |
error9 db 'FAT tabel vigane',0 |
error10 db 'Juurdepääs keelatud',0 |
error10 db 'juurdepääs keelatud',0 |
error11 db 'Seadme viga',0 |
aUnknownError db 'Tundmatu viga',0 |
rdError db "You can't save image on itself",0 |
error_msg db 'Viga: ',0 |
error db 'Viga: ',0 |
;--------------------------------------------------------------------- |
else if lang eq it |
save db ' Salva',0 |
cansel db 'Cansel',0 |
cancel db 'Cancel',0 |
select db 'Seleziona',0 |
label1 db ' RAM-drive will be saved as: ',0 |
label2 db 'Saving in progress...',0 |
ok db 'Il RAM-drivet e stato salvato ',0 |
error1 db 'Hard disk base and/or partition not defined',0 |
error2 db 'The file system does not support this function',0 |
error3 db 'Filesystem sconosciuto',0 |
error4 db 'Strange... Error 4',0 |
error5 db 'Percorso non valido',0 |
error6 db 'End of file',0 |
error7 db 'Pointer is outside of application memory',0 |
error8 db 'Disco pieno',0 |
error9 db 'Tabella FAT corrotta',0 |
error10 db 'Accesso negato',0 |
error1 db 'hard disk base and/or partition not defined',0 |
error2 db 'the file system does not support this function',0 |
error3 db 'filesystem sconosciuto',0 |
error4 db 'strange... Error 4',0 |
error5 db 'percorso non valido',0 |
error6 db 'end of file',0 |
error7 db 'pointer is outside of application memory',0 |
error8 db 'disco pieno',0 |
error9 db 'tabella FAT corrotta',0 |
error10 db 'accesso negato',0 |
error11 db 'Errore di device',0 |
aUnknownError db 'Errore sconosciuto',0 |
rdError db "You can't save image on itself",0 |
error_msg db 'Errore: ',0 |
error db 'Errore: ',0 |
;--------------------------------------------------------------------- |
else |
save db ' Save',0 |
cansel db 'Cansel',0 |
cancel db 'Cancel',0 |
select db ' Select',0 |
label1 db ' RAM-drive will be saved as: ',0 |
ok db 'RAM-drive was saved successfully in ',0 |
error1 db 'Hard disk base and/or partition not defined',0 |
error2 db 'The file system does not support this function',0 |
error3 db 'Unknown file system',0 |
error4 db 'Strange... Error 4',0 |
error5 db 'Incorrect path',0 |
error6 db 'End of file',0 |
error7 db 'Pointer is outside of application memory',0 |
error8 db 'Disk is full',0 |
error9 db 'File structure is destroyed',0 |
error10 db 'Access denied',0 |
label2 db 'Saving in progress...',0 |
ok db 'RAM-drive was saved successfully ',0 |
error1 db 'hard disk base and/or partition not defined',0 |
error2 db 'the file system does not support this function',0 |
error3 db 'unknown file system',0 |
error4 db 'strange... Error 4',0 |
error5 db 'incorrect path',0 |
error6 db 'end of file',0 |
error7 db 'pointer is outside of application memory',0 |
error8 db 'disk is full',0 |
error9 db 'file structure is destroyed',0 |
error10 db 'access denied',0 |
error11 db 'Device error',0 |
aUnknownError db 'Unknown error',0 |
rdError db "You can't save image on itself",0 |
error_msg db 'Error: ',0 |
error db 'Error: ',0 |
end if |
;--------------------------------------------------------------------- |
errors: |
657,6 → 652,9 |
|
autoclose rd 1 |
|
error_msg: |
rb 1024 |
|
folder_data: |
rb 304*32+32 ; 9 Kb |
;--------------------------------------------------------------------- |