Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 1588 → Rev 1587

/programs/media/midamp/trunk/midamp.asm
73,7 → 73,7
lang fix en
;purge mov
include 'debug.inc'
;include 'dlg.inc'
include 'dlg.inc'
include 'playlist.inc'
include 'gif_lite.inc'
bottom:
137,24 → 137,22
;---------------------------------------------------------------------
;OpenDialog_start:
; copy_path open_dialog_name,path,library_path,0
mov [OpenDialog_data.type],0 ; Open
or [flag],FL_LOCK
push dword OpenDialog_data
call [OpenDialog_Start]
and [flag],not FL_LOCK
; cmp [OpenDialog_data.status],2 ; OpenDialog does not start
; je .fopen ; some kind of alternative, instead OpenDialog
 
cmp [OpenDialog_data.status],2 ; OpenDialog does not start
je .fopen ; some kind of alternative, instead OpenDialog
cmp [OpenDialog_data.status],1
; je open_file
; jmp still
jne still
je open_file
jmp still
;---------------------------------------------------------------------
 
;.fopen:
; call fopen
; get_path:
; cmp byte[filename],0
; jz still
.fopen:
call fopen
get_path:
cmp byte[filename],0
jz still
open_file:
cmp [param],'W'
je .noplay
325,12 → 323,12
pop edi ecx
ret
 
;fopen:
; or [flag],FL_LOCK
;; opendialog draw_window, ret_path, ret_path, filename
;ret_path:
; and [flag],not FL_LOCK
; ret
fopen:
or [flag],FL_LOCK
opendialog draw_window, ret_path, ret_path, filename
ret_path:
and [flag],not FL_LOCK
ret
 
include 'event.inc'
include "thread.inc"
493,8 → 491,7
rb 4096
stacktop:
;----------------------------------------------------------------
dir_table:
rb 32+304
dir_table rb 32+304
workarea:
rb 120*1024
I_END:
/programs/media/midamp/trunk/event.inc
12,7 → 12,7
; bottom actions
dw kDel,bLsave,bLload,bRemAll,bAdd,bAddDir,bSelZero,bInvSel,bSelAll,bRemCrop
dw bMinimize,bAbout,bResetTrk
;------------------------------------------------------------------------
 
jmps_end:
 
key:
108,7 → 108,7
mov eax,IPC_TRIG
call ipc_send
jmp red
;------------------------------------------------------------------------
 
button:
mov eax,17
mcall
171,11 → 171,9
mov eax,67
mcall
ret
;------------------------------------------------------------------------
bMinimize:
; mcall 18,10
jmp still
;------------------------------------------------------------------------
bList:
mov [popup],-1
mov edx,[listsel]
255,7 → 253,6
cmp al,[list_count]
jae still
jmp play_
;------------------------------------------------------------------------
bBar:
cmp [tick_count],0
jz still
284,9 → 281,8
mov [cur_ptr],esi
drw:
jmp red
;------------------------------------------------------------------------
 
OCT_CH equ 3
;------------------------------------------------------------------------
bOctU:
add [octave],OCT_CH
jmp midi_kill
324,18 → 320,10
and [list_count],0
mov [play_limit],playlist-2
jmp red
;------------------------------------------------------------------------
bAdd:
movzx eax,[list_count]
dpd eax
mov [OpenDialog_data.type],0 ; Open
or [flag],FL_LOCK
push dword OpenDialog_data
call [OpenDialog_Start]
and [flag],not FL_LOCK
cmp [OpenDialog_data.status],1
jne still
 
call fopen
mov edi,filename
cmp byte[edi],0
jz still
343,34 → 331,23
xchg eax,ecx
mov esi,edi
jmp add_song
;------------------------------------------------------------------------
bAddDir:
mov [OpenDialog_data.type],2 ; Dir
or [flag],FL_LOCK
push dword OpenDialog_data
call [OpenDialog_Start]
and [flag],not FL_LOCK
cmp [OpenDialog_data.status],1
jne still
 
call fopen
mov edi,filename
cmp byte[edi],0
jz still
call find_slash
lea edx,[edi-filename+fnbuf] ; edx -> '/'
and byte[edi],0
mov esi,filename
mov edi,fnbuf
xor eax,eax
@@:
cld
lodsb
stosb
test eax,eax
jnz @r
mov [edi-1],byte '/'
mov edx,edi
 
mov ecx,1024/4
rep movsd
and dword [dir_info+4], 0
.nxt2:
mcall 70, dir_info
test eax,eax
jnz red
 
cmp ebx, 1
jnz red ;still
test byte [dir_table+32], 11000b ; exclude directories & vol label
jnz .no
mov edi, dir_table+32+40
393,12 → 370,8
sub ecx, esi
call PL_add
.no:
mov eax,[dir_info+4]
cmp eax,[dir_table+8]
je red
inc dword [dir_info+4]
jmp .nxt2
;------------------------------------------------------------------------
bSelZero:
call PL_clearsel
jmp red
417,7 → 390,7
mov edx,about1
call debug_outstr
jmp still
;------------------------------------------------------------------------
 
get_num: ; out: eax-number entered
or [flag],FL_LOCK
mcall 10
445,7 → 418,7
jne get_num
mcall 17
jmp get_num
;------------------------------------------------------------------------
 
find_slash:
; in: edi-filename, out: edi-slash ptr-1
push eax ecx
459,4 → 432,4
add edi,2
pop ecx eax
ret
;------------------------------------------------------------------------