Subversion Repositories Kolibri OS

Rev

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

Rev 1016 Rev 1040
Line 231... Line 231...
231
	ret
231
	ret
Line 232... Line 232...
232
 
232
 
233
update_image_sizes:
233
update_image_sizes:
234
	pushf
234
	pushf
-
 
235
	mov	edx, [eax + Image.Width]
235
	mov	edx, [eax + Image.Width]
236
	mov	[draw_width], edx
236
	add	edx, 19
237
	add	edx, 19
237
	cmp	edx, 40 + 25*9
238
	cmp	edx, 40 + 25*9
238
	jae	@f
239
	jae	@f
239
	mov	edx, 40 + 25*9
240
	mov	edx, 40 + 25*9
240
@@:
241
@@:
241
	mov	[wnd_width], edx
242
	mov	[wnd_width], edx
-
 
243
	mov	esi, [eax + Image.Height]
242
	mov	esi, [eax + Image.Height]
244
	mov	[draw_height], esi
243
	add	esi, 44
245
	add	esi, 44
244
	mov	[wnd_height], esi
246
	mov	[wnd_height], esi
245
	popf
247
	popf
246
	jz	.no_resize
248
	jz	.no_resize
Line 288... Line 290...
288
	cmp	[cur_file_idx], -1
290
	cmp	[cur_file_idx], -1
289
	jz	.notfound
291
	jz	.notfound
290
@@:
292
@@:
291
	cmp	eax, [cur_file_idx]
293
	cmp	eax, [cur_file_idx]
292
	jz	.notfound
294
	jz	.notfound
293
	push	eax
295
	push	eax ebx
294
	imul	esi, eax, 304
296
	imul	esi, eax, 304
295
	add	esi, [directory_ptr]
297
	add	esi, [directory_ptr]
296
	add	esi, 32 + 40
298
	add	esi, 32 + 40
297
	mov	edi, curdir
299
	mov	edi, curdir
298
@@:
300
@@:
Line 305... Line 307...
305
	stosb
307
	stosb
306
	test	al, al
308
	test	al, al
307
	jnz	@b
309
	jnz	@b
308
	mov	eax, curdir
310
	mov	eax, curdir
309
	call	load_image
311
	call	load_image
310
	pop	eax
312
	pushf
311
	jc	.scanloop
-
 
312
	mov	[cur_file_idx], eax
-
 
313
	invoke	img.destroy
-
 
314
	mov	esi, curdir
313
	mov	esi, curdir
-
 
314
	push	esi
315
	mov	edi, @PARAMS
315
	mov	edi, @PARAMS
316
	mov	ecx, 512/4
316
	mov	ecx, 512/4
317
	rep	movsd
317
	rep	movsd
318
	mov	byte [edi-1], 0
318
	mov	byte [edi-1], 0
-
 
319
	pop	esi
-
 
320
@@:
-
 
321
	lodsb
-
 
322
	test	al, al
-
 
323
	jnz	@b
-
 
324
@@:
-
 
325
	dec	esi
-
 
326
	cmp	byte [esi], '/'
-
 
327
	jnz	@b
-
 
328
	mov	byte [esi], 0
-
 
329
	popf
-
 
330
	pop	ebx eax
-
 
331
	jc	.scanloop
-
 
332
	mov	[cur_file_idx], eax
-
 
333
	invoke	img.destroy
319
.ret:
334
.ret:
320
	ret
335
	ret
321
.notfound:
336
.notfound:
322
	pop	[image]
337
	pop	[image]
323
	ret
338
	ret
Line 354... Line 369...
354
	stosb
369
	stosb
355
	test	al, al
370
	test	al, al
356
	jnz	@b
371
	jnz	@b
357
	mov	eax, curdir
372
	mov	eax, curdir
358
	call	load_image
373
	call	load_image
359
	pop	ebx eax
374
	pushf
360
	jc	.scanloop
-
 
361
	mov	[cur_file_idx], eax
-
 
362
	invoke	img.destroy
-
 
363
	mov	esi, curdir
375
	mov	esi, curdir
364
	push	esi
376
	push	esi
365
	mov	edi, @PARAMS
377
	mov	edi, @PARAMS
366
	mov	ecx, 512/4
378
	mov	ecx, 512/4
367
	rep	movsd
379
	rep	movsd
Line 374... Line 386...
374
@@:
386
@@:
375
	dec	esi
387
	dec	esi
376
	cmp	byte [esi], '/'
388
	cmp	byte [esi], '/'
377
	jnz	@b
389
	jnz	@b
378
	mov	byte [esi], 0
390
	mov	byte [esi], 0
-
 
391
	popf
-
 
392
	pop	ebx eax
-
 
393
	jc	.scanloop
-
 
394
	mov	[cur_file_idx], eax
-
 
395
	invoke	img.destroy
379
.ret:
396
.ret:
380
	ret
397
	ret
381
.notfound:
398
.notfound:
382
	pop	[image]
399
	pop	[image]
383
	ret
400
	ret
Line 510... Line 527...
510
	mcall	68, 13, [directory_ptr]
527
	mcall	68, 13, [directory_ptr]
511
	and	[directory_ptr], 0
528
	and	[directory_ptr], 0
512
	ret
529
	ret
Line 513... Line 530...
513
 
530
 
-
 
531
draw_window:
-
 
532
	cmp	[bFirstDraw], 0
-
 
533
	jz	.posok
-
 
534
	or	ecx, -1
-
 
535
	mcall	9, procinfo
-
 
536
 
-
 
537
	cmp	dword [ebx + 66], 0
-
 
538
	jle	.noredraw
-
 
539
 
-
 
540
	mov	edx, ecx
-
 
541
	mov	esi, ecx
-
 
542
	cmp	dword [ebx + 42], 40 + 25 * 9
-
 
543
	jae	@f
-
 
544
	mov	edx, 40 + 25 * 9
-
 
545
@@:
-
 
546
	cmp	dword [ebx + 46], 70
-
 
547
	jae	@f
-
 
548
	mov	esi, 70
-
 
549
@@:
-
 
550
	mov	eax, edx
-
 
551
	and	eax, esi
-
 
552
	cmp	eax, -1
-
 
553
	jz	@f
-
 
554
	mov	ebx, ecx
-
 
555
	mcall	67
-
 
556
@@:
-
 
557
 
-
 
558
.posok:
514
draw_window:
559
	mcall	12, 1
515
	mcall	48, 4
560
	mcall	48, 4
516
	mov	ebp, eax	; save skin height
561
	mov	ebp, eax	; save skin height
517
	add	eax, [wnd_height]
562
	add	eax, [wnd_height]
518
	__mov	ebx, 100, 0
563
	__mov	ebx, 100, 0
519
	add	ebx, [wnd_width]
564
	add	ebx, [wnd_width]
520
	lea	ecx, [100*65536 + eax]
565
	lea	ecx, [100*65536 + eax]
Line 521... Line 566...
521
	mcall	0, , , 0x73FFFFFF, , s_header
566
	mcall	0, , , 0x73FFFFFF, , s_header
522
 
-
 
-
 
567
 
523
	mcall	9, procinfo, -1
568
	mcall	9, procinfo, -1
524
 
569
	mov	[bFirstDraw], 1
525
	mov	ebx, [procinfo + 62]
570
	mov	ebx, [procinfo + 62]
526
	inc	ebx
571
	inc	ebx
-
 
572
	mcall	13, , <0, 35>, 0xFFFFFF
-
 
573
	mov	ecx, [procinfo + 66]
-
 
574
	inc	ecx
527
	mcall	13, , <0, 35>, 0xFFFFFF
575
	mov	esi, [draw_height]
-
 
576
	add	esi, 35
-
 
577
	sub	ecx, esi
528
	mov	ecx, [procinfo + 66]
578
	jbe	@f
529
	sub	ecx, 4
579
	push	esi
-
 
580
	shl	esi, 16
530
	shl	ecx, 16
581
	add	ecx, esi
531
	mov	cl, 5
582
	pop	esi
-
 
583
	mcall
532
	mcall
584
	xor	ecx, ecx
533
	mov	cl, 35
585
@@:
534
	ror	ecx, 16
586
	add	ecx, esi
535
	sub	cx, 35
587
	add	ecx, 35*10000h - 35
536
	mov	ebx, 5
-
 
537
	mcall
-
 
538
; 5 pixels for indentation, [image.Width] pixels for image
-
 
539
; client_width - 5 - [image.Width] pixels must be white
588
	__mov	ebx, 0, 5
540
	mov	ebx, [image]
589
	mcall
541
	mov	esi, [procinfo + 62]
-
 
542
	inc	esi
590
	mov	esi, [draw_width]
543
	push	esi
-
 
544
	mov	ebx, [ebx + Image.Width]
-
 
545
	sub	esi, 5
591
	add	esi, ebx
546
	sub	esi, ebx
592
	mov	ebx, [procinfo+62]
-
 
593
	inc	ebx
547
	pop	ebx
594
	sub	ebx, esi
548
	sub	ebx, esi
595
	jbe	@f
549
	shl	ebx, 16
596
	shl	esi, 16
-
 
597
	add	ebx, esi
Line 550... Line 598...
550
	add	ebx, esi
598
	mcall
551
	mcall
599
@@:
552
 
600
 
553
	mov	ebx, [procinfo + 62]
601
	mov	ebx, [procinfo + 62]
Line 599... Line 647...
599
	mcall	, buttons+rotccwbtn*20
647
	mcall	, buttons+rotccwbtn*20
600
	add	edx, 25 * 65536
648
	add	edx, 25 * 65536
601
	mcall	, buttons+rot180btn*20
649
	mcall	, buttons+rot180btn*20
Line 602... Line 650...
602
 
650
 
-
 
651
	mov	ebx, [image]
-
 
652
	mov	ecx, [procinfo+62]
603
	mov	ebx, [image]
653
	sub	ecx, 4
-
 
654
	mov	ebp, [ebx + Image.Width]
-
 
655
	cmp	ecx, ebp
-
 
656
	jb	@f
-
 
657
	mov	ecx, ebp
-
 
658
@@:
-
 
659
	sub	ebp, ecx
-
 
660
	mov	edx, [procinfo+66]
-
 
661
	sub	edx, 34
-
 
662
	cmp	edx, [ebx + Image.Height]
-
 
663
	jb	@f
-
 
664
	mov	edx, [ebx + Image.Height]
604
	mov	ecx, [ebx + Image.Width]
665
@@:
605
	shl	ecx, 16
666
	shl	ecx, 16
606
	add	ecx, [ebx + Image.Height]
667
	add	ecx, edx
607
	__mov	edx, 5, 35
668
	__mov	edx, 5, 35
608
	mov	esi, 8
669
	mov	esi, 8
609
	cmp	[ebx + Image.Type], Image.bpp8
670
	cmp	[ebx + Image.Type], Image.bpp8
610
	jz	@f
-
 
611
	mov	esi, 24
671
	jz	.bpp8
612
	cmp	[ebx + Image.Type], Image.bpp24
672
	cmp	[ebx + Image.Type], Image.bpp24
613
	jz	@f
673
	jz	.bpp24
-
 
674
	mov	esi, 32
-
 
675
	shl	ebp, 2
-
 
676
	jmp	@f
-
 
677
.bpp24:
-
 
678
	mov	esi, 24
-
 
679
	lea	ebp, [ebp*3]
614
	mov	esi, 32
680
.bpp8:
615
@@:
681
@@:
616
	mov	edi, [ebx + Image.Palette]
682
	mov	edi, [ebx + Image.Palette]
617
	mov	ebx, [ebx + Image.Data]
-
 
618
	xor	ebp, ebp
683
	mov	ebx, [ebx + Image.Data]
Line -... Line 684...
-
 
684
	mcall	65
-
 
685
 
-
 
686
	mcall	12, 2
619
	mcall	65
687
 
Line 620... Line 688...
620
 
688
.noredraw:
621
	ret
689
	ret
622
 
690
 
Line 878... Line 946...
878
	img.rotate  , 'img.rotate' , \
946
	img.rotate  , 'img.rotate' , \
879
	img.destroy , 'img.destroy'
947
	img.destroy , 'img.destroy'
Line 880... Line 948...
880
 
948
 
Line -... Line 949...
-
 
949
import  sort, sort.START, 'START', SortDir, 'SortDir', strcmpi, 'strcmpi'
881
import  sort, sort.START, 'START', SortDir, 'SortDir', strcmpi, 'strcmpi'
950
 
Line 882... Line 951...
882
 
951
bFirstDraw	db	0
883
;-----------------------------------------------------------------------------
952
;-----------------------------------------------------------------------------
884
 
953
 
Line 948... Line 1017...
948
img_data_len dd ?
1017
img_data_len dd ?
949
fh	     dd ?
1018
fh	     dd ?
950
image	     dd ?
1019
image	     dd ?
951
wnd_width	dd	?
1020
wnd_width	dd	?
952
wnd_height	dd	?
1021
wnd_height	dd	?
-
 
1022
draw_width	dd	?
-
 
1023
draw_height	dd	?
953
last_name_component	dd	?
1024
last_name_component	dd	?
954
cur_file_idx	dd	?
1025
cur_file_idx	dd	?
Line 955... Line 1026...
955
 
1026