Subversion Repositories Kolibri OS

Rev

Rev 8262 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8262 Rev 9587
1
use32
1
use32
2
	org 0
2
	org 0
3
	db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
3
	db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
4
	dd 1, start, i_end, mem, stacktop, 0, sys_path
4
	dd 1, start, i_end, mem, stacktop, 0, sys_path
5
 
5
 
6
include '../../../../macros.inc'
6
include '../../../../macros.inc'
7
include '../../../../proc32.inc'
7
include '../../../../proc32.inc'
8
include '../../../../KOSfuncs.inc'
8
include '../../../../KOSfuncs.inc'
9
include '../../../../load_img.inc'
9
include '../../../../load_img.inc'
10
include '../../../../load_lib.mac'
10
include '../../../../load_lib.mac'
11
include '../../../../develop/libraries/box_lib/trunk/box_lib.mac'
11
include '../../../../develop/libraries/box_lib/trunk/box_lib.mac'
12
 
12
 
13
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
13
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
14
caption db 'à®á¬®âà ¨­ä®à¬ æ¨¨ Exif 11.03.16',0 ;¯®¤¯¨áì ®ª­ 
14
caption db 'à®á¬®âà ¨­ä®à¬ æ¨¨ Exif 11.03.16',0 ;¯®¤¯¨áì ®ª­ 
15
 
15
 
16
run_file_70 FileInfoBlock
16
run_file_70 FileInfoBlock
17
 
17
 
18
fn_toolbar db 'toolbar.png',0
18
fn_toolbar db 'toolbar.png',0
19
IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
19
IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
20
image_data_toolbar dd 0
20
image_data_toolbar dd 0
21
 
21
 
22
memory_file_size dd 512*1024 ;à §¬¥à ¯ ¬ï⨠¤«ï ®âªàëâ¨ï ä ©«®¢ (¢ ­ ç «¥ 512 Kb, ­® ¬®¦¥â 㢥«¨ç¨¢ âáï ¯à¨ ­¥®¡å®¤¨¬®áâ¨)
22
memory_file_size dd 512*1024 ;à §¬¥à ¯ ¬ï⨠¤«ï ®âªàëâ¨ï ä ©«®¢ (¢ ­ ç «¥ 512 Kb, ­® ¬®¦¥â 㢥«¨ç¨¢ âáï ¯à¨ ­¥®¡å®¤¨¬®áâ¨)
23
 
23
 
24
align 4
24
align 4
25
start:
25
start:
26
	load_libraries l_libs_start,l_libs_end
26
	load_libraries l_libs_start,l_libs_end
27
	;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ¡¨¡«¨®â¥ª 
27
	;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ¡¨¡«¨®â¥ª 
28
	mov	ebp,lib_0
28
	mov	ebp,lib_0
29
	cmp	dword [ebp+ll_struc_size-4],0
29
	cmp	dword [ebp+ll_struc_size-4],0
30
	jz	@f
30
	jz	@f
31
		mcall SF_TERMINATE_PROCESS
31
		mcall SF_TERMINATE_PROCESS
32
	@@:
32
	@@:
33
	mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
33
	mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
34
	mcall SF_SET_EVENTS_MASK,0xC0000027
34
	mcall SF_SET_EVENTS_MASK,0xC0000027
35
	stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª  ¤¨ «®£ 
35
	stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª  ¤¨ «®£ 
36
 
36
 
37
	stdcall [buf2d_create], buf_0 ;ᮧ¤ ­¨¥ ¡ãä¥à 
37
	stdcall [buf2d_create], buf_0 ;ᮧ¤ ­¨¥ ¡ãä¥à 
38
	stdcall [buf2d_create], buf_thumb
38
	stdcall [buf2d_create], buf_thumb
39
 
39
 
40
	load_image_file 'font8x9.bmp', image_data_toolbar
40
	load_image_file 'font8x9.bmp', image_data_toolbar
41
	stdcall [buf2d_create_f_img], buf_1,[image_data_toolbar] ;ᮧ¤ ¥¬ ¡ãä¥à
41
	stdcall [buf2d_create_f_img], buf_1,[image_data_toolbar] ;ᮧ¤ ¥¬ ¡ãä¥à
42
	stdcall mem.Free,[image_data_toolbar] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì
42
	stdcall mem.Free,[image_data_toolbar] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì
43
	stdcall [buf2d_conv_24_to_8], buf_1,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç­®á⨠8 ¡¨â
43
	stdcall [buf2d_conv_24_to_8], buf_1,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç­®á⨠8 ¡¨â
44
	stdcall [buf2d_convert_text_matrix], buf_1
44
	stdcall [buf2d_convert_text_matrix], buf_1
45
 
45
 
46
	load_image_file fn_toolbar, image_data_toolbar
46
	load_image_file fn_toolbar, image_data_toolbar
47
 
47
 
48
	stdcall mem.Alloc,[memory_file_size]
48
	stdcall mem.Alloc,[memory_file_size]
49
	mov dword[open_file],eax
49
	mov dword[open_file],eax
50
	
50
	
51
	call but_new_file
51
	call but_new_file
52
 
52
 
53
align 4
53
align 4
54
red_win:
54
red_win:
55
	call draw_window
55
	call draw_window
56
 
56
 
57
align 4
57
align 4
58
still:
58
still:
59
	mcall SF_WAIT_EVENT
59
	mcall SF_WAIT_EVENT
60
 
60
 
61
	cmp al,1
61
	cmp al,1
62
	jz red_win
62
	jz red_win
63
	cmp al,2
63
	cmp al,2
64
	jz key
64
	jz key
65
	cmp al,3
65
	cmp al,3
66
	jz button
66
	jz button
67
	cmp al,6 ;¬ëèì
67
	cmp al,6 ;¬ëèì
68
	jne @f
68
	jne @f
69
		jmp mouse
69
		jmp mouse
70
	@@:
70
	@@:
71
	jmp still
71
	jmp still
72
 
72
 
73
align 4
73
align 4
74
draw_window:
74
draw_window:
75
pushad
75
pushad
76
	mcall SF_REDRAW,SSF_BEGIN_DRAW
76
	mcall SF_REDRAW,SSF_BEGIN_DRAW
77
 
77
 
78
	; *** à¨á®¢ ­¨¥ £« ¢­®£® ®ª­  (¢ë¯®«­ï¥âáï 1 à § ¯à¨ § ¯ã᪥) ***
78
	; *** à¨á®¢ ­¨¥ £« ¢­®£® ®ª­  (¢ë¯®«­ï¥âáï 1 à § ¯à¨ § ¯ã᪥) ***
79
	mov edx,[sc.work]
79
	mov edx,[sc.work]
80
	or  edx,(3 shl 24)+0x30000000
80
	or  edx,(3 shl 24)+0x30000000
81
	mov edi,caption
81
	mov edi,caption
82
	mcall SF_CREATE_WINDOW, (20 shl 16)+590, (20 shl 16)+540
82
	mcall SF_CREATE_WINDOW, (20 shl 16)+590, (20 shl 16)+540
83
 
83
 
84
	; *** ᮧ¤ ­¨¥ ª­®¯®ª ­  ¯ ­¥«ì ***
84
	; *** ᮧ¤ ­¨¥ ª­®¯®ª ­  ¯ ­¥«ì ***
85
	mov esi,[sc.work_button]
85
	mov esi,[sc.work_button]
86
	mcall SF_DEFINE_BUTTON, (5 shl 16)+20, (5 shl 16)+20, 3
86
	mcall SF_DEFINE_BUTTON, (5 shl 16)+20, (5 shl 16)+20, 3
87
 
87
 
88
	mov ebx,(30 shl 16)+20
88
	mov ebx,(30 shl 16)+20
89
	mov edx,4
89
	mov edx,4
90
	int 0x40
90
	int 0x40
91
 
91
 
92
	mov ebx,(55 shl 16)+20
92
	mov ebx,(55 shl 16)+20
93
	mov edx,5
93
	mov edx,5
94
	int 0x40
94
	int 0x40
95
 
95
 
96
	mov ebx,(85 shl 16)+20
96
	mov ebx,(85 shl 16)+20
97
	mov edx,6
97
	mov edx,6
98
	int 0x40
98
	int 0x40
99
 
99
 
100
	mov ebx,(110 shl 16)+20
100
	mov ebx,(110 shl 16)+20
101
	mov edx,7
101
	mov edx,7
102
	int 0x40
102
	int 0x40
103
 
103
 
104
	mov ebx,(135 shl 16)+20
104
	mov ebx,(135 shl 16)+20
105
	mov edx,8
105
	mov edx,8
106
	int 0x40
106
	int 0x40
107
 
107
 
108
	mov ebx,(160 shl 16)+20
108
	mov ebx,(160 shl 16)+20
109
	mov edx,9
109
	mov edx,9
110
	int 0x40
110
	int 0x40
111
 
111
 
112
	; *** à¨á®¢ ­¨¥ ¨ª®­®ª ­  ª­®¯ª å ***
112
	; *** à¨á®¢ ­¨¥ ¨ª®­®ª ­  ª­®¯ª å ***
113
	mcall SF_PUT_IMAGE, [image_data_toolbar], (16 shl 16)+16, (7 shl 16)+7 ;icon new
113
	mcall SF_PUT_IMAGE, [image_data_toolbar], (16 shl 16)+16, (7 shl 16)+7 ;icon new
114
 
114
 
115
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
115
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
116
	add edx,(25 shl 16) ;icon open
116
	add edx,(25 shl 16) ;icon open
117
	int 0x40
117
	int 0x40
118
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
118
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
119
	add edx,(25 shl 16) ;icon save
119
	add edx,(25 shl 16) ;icon save
120
	int 0x40
120
	int 0x40
121
 
121
 
122
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
122
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
123
	add edx,(30 shl 16) ;app1 text
123
	add edx,(30 shl 16) ;app1 text
124
	int 0x40
124
	int 0x40
125
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
125
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
126
	add edx,(25 shl 16) ;app1 gps
126
	add edx,(25 shl 16) ;app1 gps
127
	int 0x40
127
	int 0x40
128
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
128
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
129
	add edx,(25 shl 16) ;app2 text
129
	add edx,(25 shl 16) ;app2 text
130
	int 0x40
130
	int 0x40
131
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
131
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
132
	add edx,(25 shl 16) ;app2 thumbnail
132
	add edx,(25 shl 16) ;app2 thumbnail
133
	int 0x40
133
	int 0x40
134
 
134
 
135
	; *** à¨á®¢ ­¨¥ ¡ãä¥à  ***
135
	; *** à¨á®¢ ­¨¥ ¡ãä¥à  ***
136
	stdcall [buf2d_draw], buf_0
136
	stdcall [buf2d_draw], buf_0
137
 
137
 
138
	mcall SF_REDRAW,SSF_END_DRAW
138
	mcall SF_REDRAW,SSF_END_DRAW
139
popad
139
popad
140
	ret
140
	ret
141
 
141
 
142
align 4
142
align 4
143
key:
143
key:
144
	mcall SF_GET_KEY
144
	mcall SF_GET_KEY
145
	jmp still
145
	jmp still
146
 
146
 
147
align 4
147
align 4
148
mouse:
148
mouse:
149
 
149
 
150
	jmp still
150
	jmp still
151
 
151
 
152
align 4
152
align 4
153
button:
153
button:
154
	mcall SF_GET_BUTTON
154
	mcall SF_GET_BUTTON
155
	cmp ah,3
155
	cmp ah,3
156
	jne @f
156
	jne @f
157
		call but_new_file
157
		call but_new_file
158
	@@:
158
	@@:
159
	cmp ah,4
159
	cmp ah,4
160
	jne @f
160
	jne @f
161
		call but_open_file
161
		call but_open_file
162
	@@:
162
	@@:
163
	cmp ah,5
163
	cmp ah,5
164
	jne @f
164
	jne @f
165
		call but_save_file
165
		call but_save_file
166
	@@:
166
	@@:
167
	cmp ah,6
167
	cmp ah,6
168
	jne @f
168
	jne @f
169
		call draw_file_1 ;®á­®¢­ ï ¨­ä®à¬ æ¨ï
169
		call draw_file_1 ;®á­®¢­ ï ¨­ä®à¬ æ¨ï
170
	@@:
170
	@@:
171
	cmp ah,7
171
	cmp ah,7
172
	jne @f
172
	jne @f
173
		call draw_file_2 ;¨­ä®à¬ æ¨ï ¯® GPS
173
		call draw_file_2 ;¨­ä®à¬ æ¨ï ¯® GPS
174
	@@:
174
	@@:
175
	cmp ah,8
175
	cmp ah,8
176
	jne @f
176
	jne @f
177
		call draw_file_3 ;¨­ä®à¬ æ¨ï app2
177
		call draw_file_3 ;¨­ä®à¬ æ¨ï app2
178
	@@:
178
	@@:
179
	cmp ah,9
179
	cmp ah,9
180
	jne @f
180
	jne @f
181
		call draw_file_4
181
		call draw_file_4
182
	@@:
182
	@@:
183
	cmp ah,1
183
	cmp ah,1
184
	jne still
184
	jne still
185
.exit:
185
.exit:
186
	stdcall [buf2d_delete],buf_0
186
	stdcall [buf2d_delete],buf_0
187
	stdcall [buf2d_delete],buf_1 ;㤠«ï¥¬ ¡ãä¥à
187
	stdcall [buf2d_delete],buf_1 ;㤠«ï¥¬ ¡ãä¥à
188
	stdcall [buf2d_delete],buf_thumb
188
	stdcall [buf2d_delete],buf_thumb
189
	stdcall mem.Free,[image_data_toolbar]
189
	stdcall mem.Free,[image_data_toolbar]
190
	stdcall mem.Free,[open_file]
190
	stdcall mem.Free,[open_file]
191
	mcall SF_TERMINATE_PROCESS
191
	mcall SF_TERMINATE_PROCESS
192
 
192
 
193
 
193
 
194
align 4
194
align 4
195
but_new_file:
195
but_new_file:
196
	mov dword[open_file_size],0
196
	mov dword[open_file_size],0
197
	call draw_file_1
197
	call draw_file_1
198
	ret
198
	ret
199
 
199
 
200
align 4
200
align 4
201
open_file dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï ®âªàëâ¨ï ä ©«®¢
201
open_file dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï ®âªàëâ¨ï ä ©«®¢
202
open_file_size dd 0 ;à §¬¥à ®âªàë⮣® ä ©«  (¤®«¦¥­ ¡ëâì ­¥ ¡®«ìè¥ memory_file_size)
202
open_file_size dd 0 ;à §¬¥à ®âªàë⮣® ä ©«  (¤®«¦¥­ ¡ëâì ­¥ ¡®«ìè¥ memory_file_size)
203
 
203
 
204
align 4
204
align 4
205
but_open_file:
205
but_open_file:
206
	pushad
206
	pushad
207
	copy_path open_dialog_name,communication_area_default_path,file_name,0
207
	copy_path open_dialog_name,communication_area_default_path,file_name,0
208
	mov [OpenDialog_data.type],0
208
	mov [OpenDialog_data.type],0
209
	stdcall [OpenDialog_Start],OpenDialog_data
209
	stdcall [OpenDialog_Start],OpenDialog_data
210
	cmp [OpenDialog_data.status],2
210
	cmp [OpenDialog_data.status],2
211
	je .end_open_file
211
	je .end_open_file
212
	;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
212
	;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
213
 
213
 
214
	mov [run_file_70.Function], SSF_GET_INFO
214
	mov [run_file_70.Function], SSF_GET_INFO
215
	mov [run_file_70.Position], 0
215
	mov [run_file_70.Position], 0
216
	mov [run_file_70.Flags], 0
216
	mov [run_file_70.Flags], 0
217
	mov dword[run_file_70.Count], 0
217
	mov dword[run_file_70.Count], 0
218
	m2m [run_file_70.Buffer], [open_file]
218
	m2m [run_file_70.Buffer], [open_file]
219
	mov byte[run_file_70+20], 0
219
	mov byte[run_file_70+20], 0
220
	mov dword[run_file_70.FileName], openfile_path
220
	mov dword[run_file_70.FileName], openfile_path
221
	mcall SF_FILE,run_file_70
221
	mcall SF_FILE,run_file_70
222
	cmp eax,0
222
	cmp eax,0
223
	jne .end_open_file
223
	jne .end_open_file
224
 
224
 
225
	mov eax,[open_file]
225
	mov eax,[open_file]
226
	mov ebx,[eax+32] ;dword[eax+32] - à §¬¥à ®âªà뢠¥¬®£® ä ©« 
226
	mov ebx,[eax+32] ;dword[eax+32] - à §¬¥à ®âªà뢠¥¬®£® ä ©« 
227
	mov [open_file_size],ebx ;ebx - à §¬¥à ®âªà뢠¥¬®£® ä ©« 
227
	mov [open_file_size],ebx ;ebx - à §¬¥à ®âªà뢠¥¬®£® ä ©« 
228
	;memory_file_size - à §¬¥à ¢ë¤¥«¥­­®© ¯ ¬ï⨠¤«ï ä ©« 
228
	;memory_file_size - à §¬¥à ¢ë¤¥«¥­­®© ¯ ¬ï⨠¤«ï ä ©« 
229
	cmp [memory_file_size],ebx
229
	cmp [memory_file_size],ebx
230
	jge @f
230
	jge @f
231
		;㢥«¨ç¨¢ ¥¬ ¯ ¬ïâì ¥á«¨ ­¥ 墠⨫®
231
		;㢥«¨ç¨¢ ¥¬ ¯ ¬ïâì ¥á«¨ ­¥ 墠⨫®
232
		mov [memory_file_size],ebx
232
		mov [memory_file_size],ebx
233
		stdcall mem.ReAlloc, [open_file],ebx
233
		stdcall mem.ReAlloc, [open_file],ebx
234
		mov [open_file],eax
234
		mov [open_file],eax
235
	@@:
235
	@@:
236
 
236
 
237
	mov [run_file_70.Function], SSF_READ_FILE
237
	mov [run_file_70.Function], SSF_READ_FILE
238
	mov [run_file_70.Position], 0
238
	mov [run_file_70.Position], 0
239
	mov [run_file_70.Flags], 0
239
	mov [run_file_70.Flags], 0
240
	m2m dword[run_file_70.Count], dword[open_file_size]
240
	m2m dword[run_file_70.Count], dword[open_file_size]
241
	m2m dword[run_file_70.Buffer],dword[open_file]
241
	m2m dword[run_file_70.Buffer],dword[open_file]
242
	mov byte[run_file_70+20], 0
242
	mov byte[run_file_70+20], 0
243
	mov dword[run_file_70.FileName], openfile_path
243
	mov dword[run_file_70.FileName], openfile_path
244
	mcall SF_FILE,run_file_70 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
244
	mcall SF_FILE,run_file_70 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
245
	cmp ebx,0xffffffff
245
	cmp ebx,0xffffffff
246
	je .end_open_file
246
	je .end_open_file
247
 
247
 
248
	mov [open_file_size],ebx
248
	mov [open_file_size],ebx
249
	;add ebx,dword[open_file]
249
	;add ebx,dword[open_file]
250
	;mov byte[ebx],0 ;­  á«ãç © ¥á«¨ à ­¥¥ ¡ë« ®âªàëâ ä ©« ¡®«ì襣® à §¬¥à  ç¨á⨬ ª®­¥æ ¡ãä¥à  á ä ©«®¬
250
	;mov byte[ebx],0 ;­  á«ãç © ¥á«¨ à ­¥¥ ¡ë« ®âªàëâ ä ©« ¡®«ì襣® à §¬¥à  ç¨á⨬ ª®­¥æ ¡ãä¥à  á ä ©«®¬
251
	stdcall [exif_get_app1], [open_file],h_app1
251
	stdcall [exif_get_app1], [open_file],h_app1
252
	mcall SF_SET_CAPTION,1,openfile_path
252
	mcall SF_SET_CAPTION,1,openfile_path
253
 
253
 
254
	call draw_file_1
254
	call draw_file_1
255
	.end_open_file:
255
	.end_open_file:
256
	popad
256
	popad
257
	ret
257
	ret
258
 
258
 
259
;description:
259
;description:
260
; ¨­ä®à¬ æ¨ï exif ¨§ app1
260
; ¨­ä®à¬ æ¨ï exif ¨§ app1
261
; ⥪áâ®¢ë¥ ¨ ç¨á«®¢ë¥ ¤ ­­ë¥
261
; ⥪áâ®¢ë¥ ¨ ç¨á«®¢ë¥ ¤ ­­ë¥
262
align 4
262
align 4
263
draw_file_1:
263
draw_file_1:
264
pushad
264
pushad
265
	stdcall [buf2d_clear], buf_0, [buf_0.color]
265
	stdcall [buf2d_clear], buf_0, [buf_0.color]
266
	cmp dword[open_file_size],0
266
	cmp dword[open_file_size],0
267
	je .open_file
267
	je .open_file
268
 
268
 
269
	mov eax,1
269
	mov eax,1
270
	mov ebx,1
270
	mov ebx,1
271
	.cycle_0:
271
	.cycle_0:
272
		stdcall [exif_get_tag], h_app1,eax,txt_buf,80
272
		stdcall [exif_get_tag], h_app1,eax,txt_buf,80
273
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
273
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
274
		inc eax
274
		inc eax
275
		add ebx,10
275
		add ebx,10
276
		cmp byte[txt_buf],0
276
		cmp byte[txt_buf],0
277
		jne .cycle_0
277
		jne .cycle_0
278
 
278
 
279
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0x8769
279
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0x8769
280
	stdcall [exif_get_child], h_app1,h_child,0x8769
280
	stdcall [exif_get_child], h_app1,h_child,0x8769
281
	cmp dword[h_child],0
281
	cmp dword[h_child],0
282
	je .no_found_child
282
	je .no_found_child
283
 
283
 
284
	mov eax,1
284
	mov eax,1
285
	sub ebx,5
285
	sub ebx,5
286
	.cycle_1:
286
	.cycle_1:
287
		stdcall [exif_get_tag], h_child,eax,txt_buf,80
287
		stdcall [exif_get_tag], h_child,eax,txt_buf,80
288
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
288
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
289
		inc eax
289
		inc eax
290
		add ebx,10
290
		add ebx,10
291
		cmp byte[txt_buf],0
291
		cmp byte[txt_buf],0
292
		jne .cycle_1
292
		jne .cycle_1
293
 
293
 
294
	jmp @f
294
	jmp @f
295
	.no_found_child:
295
	.no_found_child:
296
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
296
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
297
		jmp @f
297
		jmp @f
298
	.open_file:
298
	.open_file:
299
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
299
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
300
	@@:
300
	@@:
301
	stdcall [buf2d_draw], buf_0
301
	stdcall [buf2d_draw], buf_0
302
popad
302
popad
303
	ret
303
	ret
304
 
304
 
305
;description:
305
;description:
306
; ¨­ä®à¬ æ¨ï exif ¨§ app1
306
; ¨­ä®à¬ æ¨ï exif ¨§ app1
307
; ¤ ­­ë¥ ® gps
307
; ¤ ­­ë¥ ® gps
308
align 4
308
align 4
309
draw_file_2:
309
draw_file_2:
310
pushad
310
pushad
311
	stdcall [buf2d_clear], buf_0, [buf_0.color]
311
	stdcall [buf2d_clear], buf_0, [buf_0.color]
312
	cmp dword[open_file_size],0
312
	cmp dword[open_file_size],0
313
	je .open_file
313
	je .open_file
314
 
314
 
315
	mov eax,1
315
	mov eax,1
316
	mov ebx,1
316
	mov ebx,1
317
	.cycle_0:
317
	.cycle_0:
318
		stdcall [exif_get_tag], h_app1,eax,txt_buf,80
318
		stdcall [exif_get_tag], h_app1,eax,txt_buf,80
319
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
319
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
320
		inc eax
320
		inc eax
321
		add ebx,10
321
		add ebx,10
322
		cmp byte[txt_buf],0
322
		cmp byte[txt_buf],0
323
		jne .cycle_0
323
		jne .cycle_0
324
 
324
 
325
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0x8825
325
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0x8825
326
	stdcall [exif_get_child], h_app1,h_child,0x8825
326
	stdcall [exif_get_child], h_app1,h_child,0x8825
327
	cmp dword[h_child],0
327
	cmp dword[h_child],0
328
	je .no_found_child
328
	je .no_found_child
329
 
329
 
330
	mov eax,1
330
	mov eax,1
331
	sub ebx,5
331
	sub ebx,5
332
	.cycle_1:
332
	.cycle_1:
333
		stdcall [exif_get_tag], h_child,eax,txt_buf,80
333
		stdcall [exif_get_tag], h_child,eax,txt_buf,80
334
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
334
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
335
		inc eax
335
		inc eax
336
		add ebx,10
336
		add ebx,10
337
		cmp byte[txt_buf],0
337
		cmp byte[txt_buf],0
338
		jne .cycle_1
338
		jne .cycle_1
339
 
339
 
340
	jmp @f
340
	jmp @f
341
	.no_found_child:
341
	.no_found_child:
342
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
342
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
343
		jmp @f
343
		jmp @f
344
	.open_file:
344
	.open_file:
345
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
345
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
346
	@@:
346
	@@:
347
	stdcall [buf2d_draw], buf_0
347
	stdcall [buf2d_draw], buf_0
348
popad
348
popad
349
	ret
349
	ret
350
 
350
 
351
;description:
351
;description:
352
; ¨­ä®à¬ æ¨ï exif ¨§ app2
352
; ¨­ä®à¬ æ¨ï exif ¨§ app2
353
; ⥪áâ®¢ë¥ ¨ ç¨á«®¢ë¥ ¤ ­­ë¥
353
; ⥪áâ®¢ë¥ ¨ ç¨á«®¢ë¥ ¤ ­­ë¥
354
align 4
354
align 4
355
draw_file_3:
355
draw_file_3:
356
pushad
356
pushad
357
	stdcall [buf2d_clear], buf_0, [buf_0.color]
357
	stdcall [buf2d_clear], buf_0, [buf_0.color]
358
	cmp dword[open_file_size],0
358
	cmp dword[open_file_size],0
359
	je .open_file
359
	je .open_file
360
 
360
 
361
	mov eax,1
361
	mov eax,1
362
	mov ebx,1
362
	mov ebx,1
363
	.cycle_0:
363
	.cycle_0:
364
		stdcall [exif_get_tag], h_app1,eax,txt_buf,80
364
		stdcall [exif_get_tag], h_app1,eax,txt_buf,80
365
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
365
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
366
		inc eax
366
		inc eax
367
		add ebx,10
367
		add ebx,10
368
		cmp byte[txt_buf],0
368
		cmp byte[txt_buf],0
369
		jne .cycle_0
369
		jne .cycle_0
370
 
370
 
371
	;­ å®¤¨¬ app2
371
	;­ å®¤¨¬ app2
372
	stdcall [exif_get_app2], h_app1,h_child
372
	stdcall [exif_get_app2], h_app1,h_child
373
	cmp dword[h_child],0
373
	cmp dword[h_child],0
374
	je .no_found_child
374
	je .no_found_child
375
 
375
 
376
	mov eax,1 ;25
376
	mov eax,1 ;25
377
	sub ebx,5
377
	sub ebx,5
378
	.cycle_1:
378
	.cycle_1:
379
		stdcall [exif_get_tag], h_child,eax,txt_buf,80
379
		stdcall [exif_get_tag], h_child,eax,txt_buf,80
380
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
380
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
381
		inc eax
381
		inc eax
382
		add ebx,10
382
		add ebx,10
383
		cmp byte[txt_buf],0
383
		cmp byte[txt_buf],0
384
		jne .cycle_1
384
		jne .cycle_1
385
 
385
 
386
	jmp @f
386
	jmp @f
387
	.no_found_child:
387
	.no_found_child:
388
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
388
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
389
		jmp @f
389
		jmp @f
390
	.open_file:
390
	.open_file:
391
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
391
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
392
	@@:
392
	@@:
393
	stdcall [buf2d_draw], buf_0
393
	stdcall [buf2d_draw], buf_0
394
popad
394
popad
395
	ret
395
	ret
396
 
396
 
397
;description:
397
;description:
398
; ¨­ä®à¬ æ¨ï exif ¨§ app2
398
; ¨­ä®à¬ æ¨ï exif ¨§ app2
399
; ª à⨭ª  ¤«ï ª ¬¥à Nikon
399
; ª à⨭ª  ¤«ï ª ¬¥à Nikon
400
align 4
400
align 4
401
draw_file_4:
401
draw_file_4:
402
pushad
402
pushad
403
	stdcall [buf2d_clear], buf_0, [buf_0.color]
403
	stdcall [buf2d_clear], buf_0, [buf_0.color]
404
	cmp dword[open_file_size],0
404
	cmp dword[open_file_size],0
405
	je .open_file
405
	je .open_file
406
 
406
 
407
	;¢ë¢®¤¨¬ ®¡éãî ¨­ä®à¬ æ¨î ¯® á­¨¬ªã:
407
	;¢ë¢®¤¨¬ ®¡éãî ¨­ä®à¬ æ¨î ¯® á­¨¬ªã:
408
	;0x010f - Manufacturer of digicam
408
	;0x010f - Manufacturer of digicam
409
	;0x0110 - Model
409
	;0x0110 - Model
410
	;0x0132 - Modify date
410
	;0x0132 - Modify date
411
	mov ebx,3
411
	mov ebx,3
412
	stdcall [exif_get_tag_id], h_app1,0x010f,txt_buf,80
412
	stdcall [exif_get_tag_id], h_app1,0x010f,txt_buf,80
413
	stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
413
	stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
414
	add ebx,10
414
	add ebx,10
415
	stdcall [exif_get_tag_id], h_app1,0x0110,txt_buf,80
415
	stdcall [exif_get_tag_id], h_app1,0x0110,txt_buf,80
416
	stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
416
	stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
417
	add ebx,10
417
	add ebx,10
418
	stdcall [exif_get_tag_id], h_app1,0x0132,txt_buf,80
418
	stdcall [exif_get_tag_id], h_app1,0x0132,txt_buf,80
419
	stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
419
	stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
420
	add ebx,20
420
	add ebx,20
421
 
421
 
422
	;­ å®¤¨¬ app2
422
	;­ å®¤¨¬ app2
423
	stdcall [exif_get_app2], h_app1,h_child
423
	stdcall [exif_get_app2], h_app1,h_child
424
	cmp dword[h_child],0
424
	cmp dword[h_child],0
425
	je .no_found_child
425
	je .no_found_child
426
 
426
 
427
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨
427
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨
428
	;0x0011 - Preview IFD
428
	;0x0011 - Preview IFD
429
	stdcall [exif_get_child], h_child,h_child,0x0011
429
	stdcall [exif_get_child], h_child,h_child,0x0011
430
	cmp dword[h_child],0
430
	cmp dword[h_child],0
431
	je .no_found_child
431
	je .no_found_child
432
 
432
 
433
	;0x0202 - Preview Image Length
433
	;0x0202 - Preview Image Length
434
	stdcall [exif_get_child], h_child,h_child_siz,0x0202
434
	stdcall [exif_get_child], h_child,h_child_siz,0x0202
435
	cmp dword[h_child_siz],0
435
	cmp dword[h_child_siz],0
436
	je .no_found_child
436
	je .no_found_child
437
	
437
	
438
	;0x0201 - Preview Image Start
438
	;0x0201 - Preview Image Start
439
	stdcall [exif_get_child], h_child,h_child,0x0201
439
	stdcall [exif_get_child], h_child,h_child,0x0201
440
	cmp dword[h_child],0
440
	cmp dword[h_child],0
441
	je .no_found_child
441
	je .no_found_child
442
 
442
 
443
	stdcall [img_decode],dword[h_child],dword[h_child_siz],0
443
	stdcall [img_decode],dword[h_child],dword[h_child_siz],0
444
	cmp dword[eax+4],1
444
	cmp dword[eax+4],1
445
	jl .no_found_child
445
	jl .no_found_child
446
	cmp dword[eax+8],1
446
	cmp dword[eax+8],1
447
	jl .no_found_child
447
	jl .no_found_child
448
	mov ebx,eax
448
	mov ebx,eax
449
	stdcall [buf2d_resize],buf_thumb,[eax+4],[eax+8],1
449
	stdcall [buf2d_resize],buf_thumb,[eax+4],[eax+8],1
450
	;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥­¨¥ ª ä®à¬ âã rgb
450
	;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥­¨¥ ª ä®à¬ âã rgb
451
	stdcall [img_to_rgb2],ebx,[buf_thumb]
451
	stdcall [img_to_rgb2],ebx,[buf_thumb]
452
	stdcall [img_destroy],ebx ;㤠«ï¥¬ ¢à¥¬¥­­ë© ¡ãä¥à ebx
452
	stdcall [img_destroy],ebx ;㤠«ï¥¬ ¢à¥¬¥­­ë© ¡ãä¥à ebx
453
 
453
 
454
	mov ebx,43
454
	mov ebx,43
455
	stdcall [buf2d_draw_text], buf_0, buf_1,txt_thumb,3,ebx,0xb000
455
	stdcall [buf2d_draw_text], buf_0, buf_1,txt_thumb,3,ebx,0xb000
456
	add ebx,10
456
	add ebx,10
457
	stdcall [buf2d_bit_blt], buf_0, 0,ebx, buf_thumb ;à¨á㥬 ¨§®¡à ¦¥­¨¥
457
	stdcall [buf2d_bit_blt], buf_0, 0,ebx, buf_thumb ;à¨á㥬 ¨§®¡à ¦¥­¨¥
458
	jmp @f
458
	jmp @f
459
 
459
 
460
	.no_found_child:
460
	.no_found_child:
461
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
461
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
462
		jmp @f
462
		jmp @f
463
	.open_file:
463
	.open_file:
464
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
464
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
465
	@@:
465
	@@:
466
	stdcall [buf2d_draw], buf_0
466
	stdcall [buf2d_draw], buf_0
467
popad
467
popad
468
	ret
468
	ret
469
 
469
 
470
align 4
470
align 4
471
but_save_file:
471
but_save_file:
472
	pushad
472
	pushad
473
	copy_path open_dialog_name,communication_area_default_path,file_name,0
473
	copy_path open_dialog_name,communication_area_default_path,file_name,0
474
	mov [OpenDialog_data.type],1
474
	mov [OpenDialog_data.type],1
475
	stdcall [OpenDialog_Start],OpenDialog_data
475
	stdcall [OpenDialog_Start],OpenDialog_data
476
	cmp [OpenDialog_data.status],2
476
	cmp [OpenDialog_data.status],2
477
	je .end_save_file
477
	je .end_save_file
478
	;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
478
	;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
479
 
479
 
480
	mov [run_file_70.Function], SSF_CREATE_FILE
480
	mov [run_file_70.Function], SSF_CREATE_FILE
481
	mov [run_file_70.Position], 0
481
	mov [run_file_70.Position], 0
482
	mov [run_file_70.Flags], 0
482
	mov [run_file_70.Flags], 0
483
 
483
 
484
if 1 ;áâ ¢¨¬ 1 ¥á«¨ á®åà ­ï¥âáï ¢á¥ ¨§®¡à ¦¥­¨¥
484
if 1 ;áâ ¢¨¬ 1 ¥á«¨ á®åà ­ï¥âáï ¢á¥ ¨§®¡à ¦¥­¨¥
485
	mov ebx, dword[open_file]
485
	mov ebx, dword[open_file]
486
	mov [run_file_70.Buffer], ebx
486
	mov [run_file_70.Buffer], ebx
487
	mov ebx,[open_file_size]
487
	mov ebx,[open_file_size]
488
end if
488
end if
489
if 0 ;áâ ¢¨¬ 1 ¥á«¨ á®åà ­ï¥âáï í᪨§ ¨§®¡à ¦¥­¨ï
489
if 0 ;áâ ¢¨¬ 1 ¥á«¨ á®åà ­ï¥âáï í᪨§ ¨§®¡à ¦¥­¨ï
490
	;­ å®¤¨¬ app2
490
	;­ å®¤¨¬ app2
491
	stdcall [exif_get_app2], h_app1,h_child
491
	stdcall [exif_get_app2], h_app1,h_child
492
	cmp dword[h_child],0
492
	cmp dword[h_child],0
493
	je .end_save_file
493
	je .end_save_file
494
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨
494
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨
495
	stdcall [exif_get_child], h_child,h_child,0x0011
495
	stdcall [exif_get_child], h_child,h_child,0x0011
496
	cmp dword[h_child],0
496
	cmp dword[h_child],0
497
	je .end_save_file
497
	je .end_save_file
498
	stdcall [exif_get_child], h_child,h_child,0x0201
498
	stdcall [exif_get_child], h_child,h_child,0x0201
499
	cmp dword[h_child],0
499
	cmp dword[h_child],0
500
	je .end_save_file
500
	je .end_save_file
501
 
501
 
502
	mov ebx,dword[h_child] ;dword[open_file]
502
	mov ebx,dword[h_child] ;dword[open_file]
503
	mov [run_file_70.Buffer], ebx
503
	mov [run_file_70.Buffer], ebx
504
	mov ebx,dword[h_child_siz] ;à §¬¥à í᪨§  ¨§®¡à ¦¥­¨ï
504
	mov ebx,dword[h_child_siz] ;à §¬¥à í᪨§  ¨§®¡à ¦¥­¨ï
505
end if
505
end if
506
	mov dword[run_file_70.Count], ebx ;à §¬¥à ä ©« 
506
	mov dword[run_file_70.Count], ebx ;à §¬¥à ä ©« 
507
	mov byte[run_file_70+20], 0
507
	mov byte[run_file_70+20], 0
508
	mov dword[run_file_70.FileName], openfile_path
508
	mov dword[run_file_70.FileName], openfile_path
509
	mcall SF_FILE,run_file_70 ;á®å࠭塞 ä ©«
509
	mcall SF_FILE,run_file_70 ;á®å࠭塞 ä ©«
510
	;cmp ebx,0xffffffff
510
	;cmp ebx,0xffffffff
511
	;je .end_save_file
511
	;je .end_save_file
512
	; ... á®®¡é¥­¨¥ ® ­¥ã¤ ç­®¬ á®åà ­¥­¨¨ ...
512
	; ... á®®¡é¥­¨¥ ® ­¥ã¤ ç­®¬ á®åà ­¥­¨¨ ...
513
 
513
 
514
	.end_save_file:
514
	.end_save_file:
515
	popad
515
	popad
516
	ret
516
	ret
517
 
517
 
518
;¤ ­­ë¥ ¤«ï ¤¨ «®£  ®âªàëâ¨ï ä ©«®¢
518
;¤ ­­ë¥ ¤«ï ¤¨ «®£  ®âªàëâ¨ï ä ©«®¢
519
align 4
519
align 4
520
OpenDialog_data:
520
OpenDialog_data:
521
.type			dd 0 ;0 - ®âªàëâì, 1 - á®åà ­¨âì, 2 - ¢ë¡à âì ¤â४â®à¨î
521
.type			dd 0 ;0 - ®âªàëâì, 1 - á®åà ­¨âì, 2 - ¢ë¡à âì ¤â४â®à¨î
522
.procinfo		dd procinfo	;+4
522
.procinfo		dd procinfo	;+4
523
.com_area_name		dd communication_area_name	;+8
523
.com_area_name		dd communication_area_name	;+8
524
.com_area		dd 0	;+12
524
.com_area		dd 0	;+12
525
.opendir_path		dd plugin_path	;+16
525
.opendir_path		dd plugin_path	;+16
526
.dir_default_path	dd default_dir ;+20
526
.dir_default_path	dd default_dir ;+20
527
.start_path		dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢
527
.start_path		dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢
528
.draw_window		dd draw_window	;+28
528
.draw_window		dd draw_window	;+28
529
.status 		dd 0	;+32
529
.status 		dd 0	;+32
530
.openfile_path		dd openfile_path	;+36 ¯ãâì ª ®âªà뢠¥¬®¬ã ä ©«ã
530
.openfile_path		dd openfile_path	;+36 ¯ãâì ª ®âªà뢠¥¬®¬ã ä ©«ã
531
.filename_area		dd filename_area	;+40
531
.filename_area		dd filename_area	;+40
532
.filter_area		dd Filter
532
.filter_area		dd Filter
533
.x:
533
.x:
534
.x_size 		dw 420 ;+48 ; Window X size
534
.x_size 		dw 420 ;+48 ; Window X size
535
.x_start		dw 10 ;+50 ; Window X position
535
.x_start		dw 10 ;+50 ; Window X position
536
.y:
536
.y:
537
.y_size 		dw 320 ;+52 ; Window y size
537
.y_size 		dw 320 ;+52 ; Window y size
538
.y_start		dw 10 ;+54 ; Window Y position
538
.y_start		dw 10 ;+54 ; Window Y position
539
 
539
 
540
default_dir db '/rd/1',0
540
default_dir db '/sys',0
541
 
541
 
542
communication_area_name:
542
communication_area_name:
543
	db 'FFFFFFFF_open_dialog',0
543
	db 'FFFFFFFF_open_dialog',0
544
open_dialog_name:
544
open_dialog_name:
545
	db 'opendial',0
545
	db 'opendial',0
546
communication_area_default_path:
546
communication_area_default_path:
547
	db '/rd/1/File managers/',0
547
	db '/sys/File managers/',0
548
 
548
 
549
Filter:
549
Filter:
550
dd Filter.end - Filter ;.1
550
dd Filter.end - Filter ;.1
551
.1:
551
.1:
552
db 'JPG',0
552
db 'JPG',0
553
db 'JPEG',0
553
db 'JPEG',0
554
.end:
554
.end:
555
db 0
555
db 0
556
 
556
 
557
 
557
 
558
 
558
 
559
system_dir_0 db '/sys/lib/'
559
system_dir_0 db '/sys/lib/'
560
lib_name_0 db 'proc_lib.obj',0
560
lib_name_0 db 'proc_lib.obj',0
561
system_dir_1 db '/sys/lib/'
561
system_dir_1 db '/sys/lib/'
562
lib_name_1 db 'libimg.obj',0
562
lib_name_1 db 'libimg.obj',0
563
system_dir_2 db '/sys/lib/'
563
system_dir_2 db '/sys/lib/'
564
lib_name_2 db 'buf2d.obj',0
564
lib_name_2 db 'buf2d.obj',0
565
system_dir_3 db '/sys/lib/'
565
system_dir_3 db '/sys/lib/'
566
lib_name_3 db 'exif.obj',0
566
lib_name_3 db 'exif.obj',0
567
 
567
 
568
l_libs_start:
568
l_libs_start:
569
	lib_0 l_libs lib_name_0, file_name, system_dir_0, import_proclib
569
	lib_0 l_libs lib_name_0, file_name, system_dir_0, import_proclib
570
	lib_1 l_libs lib_name_1, file_name, system_dir_1, import_libimg
570
	lib_1 l_libs lib_name_1, file_name, system_dir_1, import_libimg
571
	lib_2 l_libs lib_name_2, file_name, system_dir_2, import_buf2d
571
	lib_2 l_libs lib_name_2, file_name, system_dir_2, import_buf2d
572
	lib_3 l_libs lib_name_3, file_name, system_dir_3, import_exif
572
	lib_3 l_libs lib_name_3, file_name, system_dir_3, import_exif
573
l_libs_end:
573
l_libs_end:
574
 
574
 
575
align 4
575
align 4
576
import_libimg:
576
import_libimg:
577
	dd alib_init1
577
	dd alib_init1
578
	img_is_img  dd aimg_is_img
578
	img_is_img  dd aimg_is_img
579
	img_info    dd aimg_info
579
	img_info    dd aimg_info
580
	img_from_file dd aimg_from_file
580
	img_from_file dd aimg_from_file
581
	img_to_file dd aimg_to_file
581
	img_to_file dd aimg_to_file
582
	img_from_rgb dd aimg_from_rgb
582
	img_from_rgb dd aimg_from_rgb
583
	img_to_rgb  dd aimg_to_rgb
583
	img_to_rgb  dd aimg_to_rgb
584
	img_to_rgb2 dd aimg_to_rgb2
584
	img_to_rgb2 dd aimg_to_rgb2
585
	img_decode  dd aimg_decode
585
	img_decode  dd aimg_decode
586
	img_encode  dd aimg_encode
586
	img_encode  dd aimg_encode
587
	img_create  dd aimg_create
587
	img_create  dd aimg_create
588
	img_destroy dd aimg_destroy
588
	img_destroy dd aimg_destroy
589
	img_destroy_layer dd aimg_destroy_layer
589
	img_destroy_layer dd aimg_destroy_layer
590
	img_count   dd aimg_count
590
	img_count   dd aimg_count
591
	img_lock_bits dd aimg_lock_bits
591
	img_lock_bits dd aimg_lock_bits
592
	img_unlock_bits dd aimg_unlock_bits
592
	img_unlock_bits dd aimg_unlock_bits
593
	img_flip    dd aimg_flip
593
	img_flip    dd aimg_flip
594
	img_flip_layer dd aimg_flip_layer
594
	img_flip_layer dd aimg_flip_layer
595
	img_rotate  dd aimg_rotate
595
	img_rotate  dd aimg_rotate
596
	img_rotate_layer dd aimg_rotate_layer
596
	img_rotate_layer dd aimg_rotate_layer
597
	img_draw    dd aimg_draw
597
	img_draw    dd aimg_draw
598
 
598
 
599
	dd 0,0
599
	dd 0,0
600
	alib_init1   db 'lib_init',0
600
	alib_init1   db 'lib_init',0
601
	aimg_is_img  db 'img_is_img',0 ;®¯à¥¤¥«ï¥â ¯® ¤ ­­ë¬, ¬®¦¥â «¨ ¡¨¡«¨®â¥ª  ᤥ« âì ¨§ ­¨å ¨§®¡à ¦¥­¨¥
601
	aimg_is_img  db 'img_is_img',0 ;®¯à¥¤¥«ï¥â ¯® ¤ ­­ë¬, ¬®¦¥â «¨ ¡¨¡«¨®â¥ª  ᤥ« âì ¨§ ­¨å ¨§®¡à ¦¥­¨¥
602
	aimg_info    db 'img_info',0
602
	aimg_info    db 'img_info',0
603
	aimg_from_file db 'img_from_file',0
603
	aimg_from_file db 'img_from_file',0
604
	aimg_to_file db 'img_to_file',0
604
	aimg_to_file db 'img_to_file',0
605
	aimg_from_rgb db 'img_from_rgb',0
605
	aimg_from_rgb db 'img_from_rgb',0
606
	aimg_to_rgb  db 'img_to_rgb',0 ;¯à¥®¡à §®¢ ­¨¥ ¨§®¡à ¦¥­¨ï ¢ ¤ ­­ë¥ RGB
606
	aimg_to_rgb  db 'img_to_rgb',0 ;¯à¥®¡à §®¢ ­¨¥ ¨§®¡à ¦¥­¨ï ¢ ¤ ­­ë¥ RGB
607
	aimg_to_rgb2 db 'img_to_rgb2',0
607
	aimg_to_rgb2 db 'img_to_rgb2',0
608
	aimg_decode  db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ­­ëå
608
	aimg_decode  db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ­­ëå
609
	aimg_encode  db 'img_encode',0
609
	aimg_encode  db 'img_encode',0
610
	aimg_create  db 'img_create',0
610
	aimg_create  db 'img_create',0
611
	aimg_destroy db 'img_destroy',0
611
	aimg_destroy db 'img_destroy',0
612
	aimg_destroy_layer db 'img_destroy_layer',0
612
	aimg_destroy_layer db 'img_destroy_layer',0
613
	aimg_count   db 'img_count',0
613
	aimg_count   db 'img_count',0
614
	aimg_lock_bits db 'img_lock_bits',0
614
	aimg_lock_bits db 'img_lock_bits',0
615
	aimg_unlock_bits db 'img_unlock_bits',0
615
	aimg_unlock_bits db 'img_unlock_bits',0
616
	aimg_flip    db 'img_flip',0
616
	aimg_flip    db 'img_flip',0
617
	aimg_flip_layer db 'img_flip_layer',0
617
	aimg_flip_layer db 'img_flip_layer',0
618
	aimg_rotate  db 'img_rotate',0
618
	aimg_rotate  db 'img_rotate',0
619
	aimg_rotate_layer db 'img_rotate_layer',0
619
	aimg_rotate_layer db 'img_rotate_layer',0
620
	aimg_draw    db 'img_draw',0
620
	aimg_draw    db 'img_draw',0
621
 
621
 
622
align 4
622
align 4
623
import_proclib: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
623
import_proclib: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
624
	OpenDialog_Init dd aOpenDialog_Init
624
	OpenDialog_Init dd aOpenDialog_Init
625
	OpenDialog_Start dd aOpenDialog_Start
625
	OpenDialog_Start dd aOpenDialog_Start
626
dd 0,0
626
dd 0,0
627
	aOpenDialog_Init db 'OpenDialog_init',0
627
	aOpenDialog_Init db 'OpenDialog_init',0
628
	aOpenDialog_Start db 'OpenDialog_start',0
628
	aOpenDialog_Start db 'OpenDialog_start',0
629
 
629
 
630
align 4
630
align 4
631
import_buf2d:
631
import_buf2d:
632
	init dd sz_init
632
	init dd sz_init
633
	buf2d_create dd sz_buf2d_create
633
	buf2d_create dd sz_buf2d_create
634
	buf2d_create_f_img dd sz_buf2d_create_f_img
634
	buf2d_create_f_img dd sz_buf2d_create_f_img
635
	buf2d_clear dd sz_buf2d_clear
635
	buf2d_clear dd sz_buf2d_clear
636
	buf2d_draw dd sz_buf2d_draw
636
	buf2d_draw dd sz_buf2d_draw
637
	buf2d_delete dd sz_buf2d_delete
637
	buf2d_delete dd sz_buf2d_delete
638
	buf2d_resize dd sz_buf2d_resize
638
	buf2d_resize dd sz_buf2d_resize
639
	buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
639
	buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
640
	buf2d_bit_blt dd sz_buf2d_bit_blt
640
	buf2d_bit_blt dd sz_buf2d_bit_blt
641
	buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
641
	buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
642
	buf2d_draw_text dd sz_buf2d_draw_text
642
	buf2d_draw_text dd sz_buf2d_draw_text
643
	dd 0,0
643
	dd 0,0
644
	sz_init db 'lib_init',0
644
	sz_init db 'lib_init',0
645
	sz_buf2d_create db 'buf2d_create',0
645
	sz_buf2d_create db 'buf2d_create',0
646
	sz_buf2d_create_f_img db 'buf2d_create_f_img',0
646
	sz_buf2d_create_f_img db 'buf2d_create_f_img',0
647
	sz_buf2d_clear db 'buf2d_clear',0
647
	sz_buf2d_clear db 'buf2d_clear',0
648
	sz_buf2d_draw db 'buf2d_draw',0
648
	sz_buf2d_draw db 'buf2d_draw',0
649
	sz_buf2d_delete db 'buf2d_delete',0
649
	sz_buf2d_delete db 'buf2d_delete',0
650
	sz_buf2d_resize db 'buf2d_resize',0
650
	sz_buf2d_resize db 'buf2d_resize',0
651
	sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
651
	sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
652
	sz_buf2d_bit_blt db 'buf2d_bit_blt',0
652
	sz_buf2d_bit_blt db 'buf2d_bit_blt',0
653
	sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
653
	sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
654
	sz_buf2d_draw_text db 'buf2d_draw_text',0
654
	sz_buf2d_draw_text db 'buf2d_draw_text',0
655
 
655
 
656
align 4
656
align 4
657
import_exif: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
657
import_exif: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
658
	exif_get_app1 dd sz_exif_get_app1
658
	exif_get_app1 dd sz_exif_get_app1
659
	exif_get_app2 dd sz_exif_get_app2
659
	exif_get_app2 dd sz_exif_get_app2
660
	exif_get_tag dd sz_exif_get_tag
660
	exif_get_tag dd sz_exif_get_tag
661
	exif_get_tag_id dd sz_exif_get_tag_id
661
	exif_get_tag_id dd sz_exif_get_tag_id
662
	exif_get_child dd sz_exif_get_child
662
	exif_get_child dd sz_exif_get_child
663
 
663
 
664
dd 0,0
664
dd 0,0
665
	sz_exif_get_app1 db 'exif_get_app1',0
665
	sz_exif_get_app1 db 'exif_get_app1',0
666
	sz_exif_get_app2 db 'exif_get_app2',0
666
	sz_exif_get_app2 db 'exif_get_app2',0
667
	sz_exif_get_tag db 'exif_get_tag',0
667
	sz_exif_get_tag db 'exif_get_tag',0
668
	sz_exif_get_tag_id db 'exif_get_tag_id',0
668
	sz_exif_get_tag_id db 'exif_get_tag_id',0
669
	sz_exif_get_child db 'exif_get_child',0
669
	sz_exif_get_child db 'exif_get_child',0
670
 
670
 
671
 
671
 
672
sc system_colors 
672
sc system_colors 
673
 
673
 
674
align 16
674
align 16
675
procinfo process_information 
675
procinfo process_information 
676
 
676
 
677
align 4
677
align 4
678
buf_0: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
678
buf_0: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
679
	dw 5 ;+4 left
679
	dw 5 ;+4 left
680
	dw 31 ;+6 top
680
	dw 31 ;+6 top
681
.w: dd 570 ;+8 w
681
.w: dd 570 ;+8 w
682
.h: dd 480 ;+12 h
682
.h: dd 480 ;+12 h
683
.color: dd 0xffffd0 ;+16 color
683
.color: dd 0xffffd0 ;+16 color
684
	db 24 ;+20 bit in pixel
684
	db 24 ;+20 bit in pixel
685
 
685
 
686
align 4
686
align 4
687
buf_1:
687
buf_1:
688
	dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
688
	dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
689
	dw 25 ;+4 left
689
	dw 25 ;+4 left
690
	dw 25 ;+6 top
690
	dw 25 ;+6 top
691
	dd 128 ;+8 w
691
	dd 128 ;+8 w
692
	dd 144 ;+12 h
692
	dd 144 ;+12 h
693
	dd 0 ;+16 color
693
	dd 0 ;+16 color
694
	db 24 ;+20 bit in pixel
694
	db 24 ;+20 bit in pixel
695
 
695
 
696
align 4
696
align 4
697
buf_thumb:
697
buf_thumb:
698
	dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
698
	dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
699
	dw 0 ;+4 left
699
	dw 0 ;+4 left
700
	dw 0 ;+6 top
700
	dw 0 ;+6 top
701
	dd 120 ;+8 w
701
	dd 120 ;+8 w
702
	dd 100 ;+12 h
702
	dd 100 ;+12 h
703
	dd 0 ;+16 color
703
	dd 0 ;+16 color
704
	db 24 ;+20 bit in pixel
704
	db 24 ;+20 bit in pixel
705
 
705
 
706
h_app1	rb 14 ;áâàãªâãà  ¤«ï § £®«®¢ª  £« ¢­ëå ⥣®¢
706
h_app1	rb 14 ;áâàãªâãà  ¤«ï § £®«®¢ª  £« ¢­ëå ⥣®¢
707
h_child rb 14 ;áâàãªâãà  ¤«ï § £®«®¢ª  ¤®ç¥à­¨å ⥣®¢
707
h_child rb 14 ;áâàãªâãà  ¤«ï § £®«®¢ª  ¤®ç¥à­¨å ⥣®¢
708
h_child_siz rb 14
708
h_child_siz rb 14
709
 
709
 
710
txt_openfile db 'Žâªà®©â¥ ä ©« ¨§®¡à ¦¥­¨ï ¢ ä®à¬ â¥ *.jpg.',0
710
txt_openfile db 'Žâªà®©â¥ ä ©« ¨§®¡à ¦¥­¨ï ¢ ä®à¬ â¥ *.jpg.',0
711
txt_thumb db 'â® í᪨§ ¨§®¡à ¦¥­¨ï ¨§ ¤ ­­ëå app2.',0
711
txt_thumb db 'â® í᪨§ ¨§®¡à ¦¥­¨ï ¨§ ¤ ­­ëå app2.',0
712
txt_nochild  db 'ˆ­ä®à¬ æ¨ï ¯® í⮩ ª­®¯ª¥ ­¥ ­ ©¤¥­ .',0
712
txt_nochild  db 'ˆ­ä®à¬ æ¨ï ¯® í⮩ ª­®¯ª¥ ­¥ ­ ©¤¥­ .',0
713
txt_buf rb 80
713
txt_buf rb 80
714
 
714
 
715
align 16
715
align 16
716
i_end:
716
i_end:
717
	rb 2048
717
	rb 2048
718
stacktop:
718
stacktop:
719
	sys_path rb 1024
719
	sys_path rb 1024
720
	file_name rb 4096 
720
	file_name rb 4096 
721
	plugin_path rb 4096
721
	plugin_path rb 4096
722
	openfile_path rb 4096
722
	openfile_path rb 4096
723
	filename_area rb 256
723
	filename_area rb 256
724
mem:
724
mem: