Subversion Repositories Kolibri OS

Rev

Rev 485 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 485 Rev 1588
Line 10... Line 10...
10
   dw  bList.stop, kLoad, Xpress, Rewind.space, auto_load,Rewind, Rewind.space
10
   dw  bList.stop, kLoad, Xpress, Rewind.space, auto_load,Rewind, Rewind.space
11
   dw  bReverse, bShade, bList, bBar, bOctU, bOctD, bSelTrack, bSelChannel
11
   dw  bReverse, bShade, bList, bBar, bOctU, bOctD, bSelTrack, bSelChannel
12
; bottom actions
12
; bottom actions
13
   dw kDel,bLsave,bLload,bRemAll,bAdd,bAddDir,bSelZero,bInvSel,bSelAll,bRemCrop
13
   dw kDel,bLsave,bLload,bRemAll,bAdd,bAddDir,bSelZero,bInvSel,bSelAll,bRemCrop
14
   dw  bMinimize,bAbout,bResetTrk
14
   dw  bMinimize,bAbout,bResetTrk
15
 
-
 
-
 
15
;------------------------------------------------------------------------
16
jmps_end:
16
jmps_end:
Line 17... Line 17...
17
 
17
 
18
key:
18
key:
19
    mov  eax,2
19
    mov  eax,2
Line 106... Line 106...
106
    cmp  [tick_count],0
106
    cmp  [tick_count],0
107
    jz   still
107
    jz   still
108
    mov  eax,IPC_TRIG
108
    mov  eax,IPC_TRIG
109
    call ipc_send
109
    call ipc_send
110
    jmp  red
110
    jmp  red
111
 
-
 
-
 
111
;------------------------------------------------------------------------
112
  button:
112
  button:
113
    mov  eax,17
113
    mov  eax,17
114
    mcall
114
    mcall
115
    cmp  ah,20
115
    cmp  ah,20
116
    jb   .nobott
116
    jb   .nobott
Line 169... Line 169...
169
    mov  ecx,ebx
169
    mov  ecx,ebx
170
    mov  edx,ebx
170
    mov  edx,ebx
171
    mov  eax,67
171
    mov  eax,67
172
    mcall
172
    mcall
173
    ret
173
    ret
-
 
174
;------------------------------------------------------------------------
174
  bMinimize:
175
  bMinimize:
175
;    mcall 18,10
176
;    mcall 18,10
176
    jmp  still
177
    jmp  still
-
 
178
;------------------------------------------------------------------------
177
  bList:
179
  bList:
178
    mov  [popup],-1
180
    mov  [popup],-1
179
    mov  edx,[listsel]
181
    mov  edx,[listsel]
180
    call PL_getitemclick
182
    call PL_getitemclick
181
    mov  [listsel],eax
183
    mov  [listsel],eax
Line 251... Line 253...
251
    mov  eax,[play_num]
253
    mov  eax,[play_num]
252
    inc  eax
254
    inc  eax
253
    cmp  al,[list_count]
255
    cmp  al,[list_count]
254
    jae  still
256
    jae  still
255
    jmp  play_
257
    jmp  play_
-
 
258
;------------------------------------------------------------------------
256
  bBar:
259
  bBar:
257
    cmp  [tick_count],0
260
    cmp  [tick_count],0
258
    jz   still
261
    jz   still
259
    mov  eax,37
262
    mov  eax,37
260
    mov  ebx,1
263
    mov  ebx,1
Line 279... Line 282...
279
    mov  [cur_tick],ecx
282
    mov  [cur_tick],ecx
280
    sub  esi,2
283
    sub  esi,2
281
    mov  [cur_ptr],esi
284
    mov  [cur_ptr],esi
282
  drw:
285
  drw:
283
    jmp  red
286
    jmp  red
284
 
-
 
-
 
287
;------------------------------------------------------------------------
285
OCT_CH equ 3
288
OCT_CH equ 3
-
 
289
;------------------------------------------------------------------------
286
  bOctU:
290
  bOctU:
287
    add  [octave],OCT_CH
291
    add  [octave],OCT_CH
288
    jmp  midi_kill
292
    jmp  midi_kill
289
  bOctD:
293
  bOctD:
290
    sub  [octave],OCT_CH
294
    sub  [octave],OCT_CH
Line 318... Line 322...
318
    jmp  red
322
    jmp  red
319
  bRemAll:
323
  bRemAll:
320
    and  [list_count],0
324
    and  [list_count],0
321
    mov  [play_limit],playlist-2
325
    mov  [play_limit],playlist-2
322
    jmp  red
326
    jmp  red
-
 
327
;------------------------------------------------------------------------
323
  bAdd:
328
bAdd:
324
    movzx eax,[list_count]
329
	movzx eax,[list_count]
325
    dpd  eax
330
	dpd  eax
-
 
331
	mov	[OpenDialog_data.type],0	; Open
-
 
332
	or	[flag],FL_LOCK	
-
 
333
	push    dword OpenDialog_data
326
    call fopen
334
	call    [OpenDialog_Start]
-
 
335
	and	[flag],not FL_LOCK
-
 
336
	cmp	[OpenDialog_data.status],1
-
 
337
	jne	still
-
 
338
 
327
    mov  edi,filename
339
	mov  edi,filename
328
    cmp  byte[edi],0
340
	cmp  byte[edi],0
329
    jz   still
341
	jz   still
330
    call str_len
342
	call str_len
331
    xchg eax,ecx
343
	xchg eax,ecx
332
    mov  esi,edi
344
	mov  esi,edi
333
    jmp  add_song
345
	jmp  add_song
-
 
346
;------------------------------------------------------------------------
334
  bAddDir:
347
bAddDir:
335
    call fopen
348
	mov	[OpenDialog_data.type],2	; Dir
336
    mov  edi,filename
349
	or	[flag],FL_LOCK	
337
    cmp  byte[edi],0
350
	push    dword OpenDialog_data
338
    jz   still
351
	call    [OpenDialog_Start]
339
    call find_slash
352
	and	[flag],not FL_LOCK
340
    lea  edx,[edi-filename+fnbuf] ; edx -> '/'
353
	cmp	[OpenDialog_data.status],1
341
    and  byte[edi],0
354
	jne	still
-
 
355
 
342
    mov  esi,filename
356
	mov  esi,filename
343
    mov  edi,fnbuf
357
	mov  edi,fnbuf
-
 
358
	xor	eax,eax
-
 
359
@@:
-
 
360
	cld
-
 
361
	lodsb
-
 
362
	stosb
-
 
363
	test	eax,eax
-
 
364
	jnz	@r
344
    mov  ecx,1024/4
365
	mov	[edi-1],byte '/'
345
    rep  movsd
366
	mov	edx,edi
-
 
367
 
346
        and     dword [dir_info+4], 0
368
	and     dword [dir_info+4], 0
347
  .nxt2:
369
.nxt2:
348
        mcall   70, dir_info
370
        mcall   70, dir_info
349
        cmp     ebx, 1
371
	test	eax,eax
350
        jnz     red ;still
372
	jnz	red
-
 
373
 
351
        test    byte [dir_table+32], 11000b     ; exclude directories & vol label
374
        test    byte [dir_table+32], 11000b     ; exclude directories & vol label
352
        jnz     .no
375
        jnz     .no
353
        mov     edi, dir_table+32+40
376
        mov     edi, dir_table+32+40
354
        mov     esi, edi
377
        mov     esi, edi
355
        xor     eax, eax
378
        xor     eax, eax
Line 368... Line 391...
368
        mov     ecx, edi
391
        mov     ecx, edi
369
        mov     esi, fnbuf
392
        mov     esi, fnbuf
370
        sub     ecx, esi
393
        sub     ecx, esi
371
        call    PL_add
394
        call    PL_add
372
.no:
395
.no:
-
 
396
	mov	eax,[dir_info+4]
-
 
397
	cmp	eax,[dir_table+8]
-
 
398
	je	red
373
        inc     dword [dir_info+4]
399
	inc     dword [dir_info+4]
374
        jmp     .nxt2
400
	jmp     .nxt2
-
 
401
;------------------------------------------------------------------------
375
  bSelZero:
402
  bSelZero:
376
    call PL_clearsel
403
    call PL_clearsel
377
    jmp  red
404
    jmp  red
378
  bInvSel:
405
  bInvSel:
379
    call PL_invsel
406
    call PL_invsel
Line 388... Line 415...
388
    jmp  bSelAll
415
    jmp  bSelAll
389
  bAbout:
416
  bAbout:
390
    mov  edx,about1
417
    mov  edx,about1
391
    call debug_outstr
418
    call debug_outstr
392
    jmp  still
419
    jmp  still
393
 
-
 
-
 
420
;------------------------------------------------------------------------
394
get_num:  ; out: eax-number entered
421
get_num:  ; out: eax-number entered
395
    or   [flag],FL_LOCK
422
    or   [flag],FL_LOCK
396
    mcall 10
423
    mcall 10
397
    dpd  eax
424
    dpd  eax
398
    cmp  eax,1
425
    cmp  eax,1
Line 416... Line 443...
416
  .nokey:
443
  .nokey:
417
    cmp  eax,3
444
    cmp  eax,3
418
    jne  get_num
445
    jne  get_num
419
    mcall 17
446
    mcall 17
420
    jmp  get_num
447
    jmp  get_num
421
 
-
 
-
 
448
;------------------------------------------------------------------------
422
find_slash:
449
find_slash:
423
; in: edi-filename, out: edi-slash ptr-1
450
; in: edi-filename, out: edi-slash ptr-1
424
    push eax ecx
451
    push eax ecx
425
    call str_len
452
    call str_len
426
    mov  ecx,eax
453
    mov  ecx,eax
Line 430... Line 457...
430
    repne scasb
457
    repne scasb
431
    cld
458
    cld
432
    add  edi,2
459
    add  edi,2
433
    pop  ecx eax
460
    pop  ecx eax
434
    ret
461
    ret
435
-
 
-
 
462
;------------------------------------------------------------------------
436
463