Subversion Repositories Kolibri OS

Rev

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

Rev 1087 Rev 1102
Line 229... Line 229...
229
 
229
 
230
; img.decode checks for img.is_img
230
; img.decode checks for img.is_img
231
;	invoke	img.is_img, [img_data], [img_data_len]
231
;	invoke	img.is_img, [img_data], [img_data_len]
232
;	or	eax, eax
232
;	or	eax, eax
233
;	jz	exit
233
;	jz	exit
234
	invoke	img.decode, [img_data], [img_data_len]
234
	invoke	img.decode, [img_data], [img_data_len], 0
235
	or	eax, eax
235
	or	eax, eax
236
	jz	.error
236
	jz	.error
237
	cmp	[image], 0
237
	cmp	[image], 0
238
	pushf
238
	pushf
Line 511... Line 511...
511
	jz	.copy
511
	jz	.copy
512
	cmp	ecx, 'png'
512
	cmp	ecx, 'png'
513
	jz	.copy
513
	jz	.copy
514
	cmp	ecx, 'jpe'
514
	cmp	ecx, 'jpe'
515
	jz	.copy
515
	jz	.copy
-
 
516
	cmp	ecx, 'ico'
-
 
517
	jz	.copy
-
 
518
	cmp	ecx, 'cur'
-
 
519
	jz	.copy
516
	cmp	ecx, 'jpeg'
520
	cmp	ecx, 'jpeg'
517
	jz	@f
521
	jz	@f
518
	cmp	ecx, 'jpeG'
522
	cmp	ecx, 'jpeG'
519
	jnz	.nocopy
523
	jnz	.nocopy
520
@@:
524
@@:
Line 720... Line 724...
720
	push	eax	; max width
724
	push	eax	; max width
721
	push	35	; y
725
	push	35	; y
722
	push	5	; x
726
	push	5	; x
723
	push	[cur_frame]
727
	push	[cur_frame]
724
	call	[img.draw]
728
	call	[img.draw]
-
 
729
	mov	eax, [image]
-
 
730
	test	[eax + Image.Flags], Image.IsAnimated
-
 
731
	jnz	.done
-
 
732
	cmp	[eax + Image.Next], 0
-
 
733
	jnz	.additional_frames
-
 
734
.done:
-
 
735
	ret
-
 
736
.additional_frames:
-
 
737
	mov	ebx, [procinfo+62]
-
 
738
	sub	ebx, 4
-
 
739
	jbe	.done
-
 
740
	push	5
-
 
741
	pop	esi
-
 
742
.afloop:
-
 
743
	sub	ebx, [eax + Image.Width]
-
 
744
	jbe	.done
-
 
745
	dec	ebx
-
 
746
	jz	.done
-
 
747
	add	esi, [eax + Image.Width]
-
 
748
	mov	eax, [eax + Image.Next]
-
 
749
	push	eax
-
 
750
	inc	esi
-
 
751
	push	0	; ypos
-
 
752
	push	0	; xpos
-
 
753
	mov	ecx, [procinfo+66]
-
 
754
	sub	ecx, 34
-
 
755
	push	ecx	; max height
-
 
756
	push	ebx	; max width
-
 
757
	push	35	; y
-
 
758
	push	esi	; x
-
 
759
	push	eax	; image
-
 
760
	call	[img.draw]
-
 
761
	pop	eax
-
 
762
	cmp	[eax + Image.Next], 0
-
 
763
	jnz	.afloop
725
	ret
764
	ret
Line 726... Line 765...
726
 
765
 
727
; void* __stdcall mem.Alloc(unsigned size);
766
; void* __stdcall mem.Alloc(unsigned size);
728
mem.Alloc:
767
mem.Alloc:
Line 959... Line 998...
959
	libimg , 'libimg.obj' , \
998
	libimg , 'libimg.obj' , \
960
	sort   , 'sort.obj'
999
	sort   , 'sort.obj'
Line 961... Line 1000...
961
 
1000
 
962
import	libio			  , \
1001
import	libio			  , \
963
	libio.init , 'lib_init'   , \
1002
	libio.init , 'lib_init'   , \
964
	file.size  , 'file.size'  , \
1003
	file.size  , 'file_size'  , \
965
	file.open  , 'file.open'  , \
1004
	file.open  , 'file_open'  , \
966
	file.read  , 'file.read'  , \
1005
	file.read  , 'file_read'  , \
Line 967... Line 1006...
967
	file.close , 'file.close'
1006
	file.close , 'file_close'
968
 
1007
 
969
import	libgfx				, \
1008
import	libgfx				, \
970
	libgfx.init   , 'lib_init'	, \
1009
	libgfx.init   , 'lib_init'	, \
971
	gfx.open      , 'gfx.open'	, \
1010
	gfx.open      , 'gfx_open'	, \
972
	gfx.close     , 'gfx.close'	, \
1011
	gfx.close     , 'gfx_close'	, \
Line 973... Line 1012...
973
	gfx.pen.color , 'gfx.pen.color' , \
1012
	gfx.pen.color , 'gfx_pen_color' , \
974
	gfx.line      , 'gfx.line'
1013
	gfx.line      , 'gfx_line'
975
 
1014
 
976
import	libimg			   , \
1015
import	libimg			   , \
977
	libimg.init , 'lib_init'   , \
1016
	libimg.init , 'lib_init'   , \
978
	img.is_img  , 'img.is_img' , \
1017
	img.is_img  , 'img_is_img' , \
979
	img.to_rgb2 , 'img.to_rgb2', \
1018
	img.to_rgb2 , 'img_to_rgb2', \
980
	img.decode  , 'img.decode' , \
1019
	img.decode  , 'img_decode' , \
981
	img.flip    , 'img.flip'   , \
1020
	img.flip    , 'img_flip'   , \
Line 982... Line 1021...
982
	img.rotate  , 'img.rotate' , \
1021
	img.rotate  , 'img_rotate' , \
Line 983... Line 1022...
983
	img.destroy , 'img.destroy', \
1022
	img.destroy , 'img_destroy', \
984
	img.draw    , 'img.draw'
1023
	img.draw    , 'img_draw'