Subversion Repositories Kolibri OS

Rev

Rev 3330 | Rev 9568 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3330 Rev 8288
1
use32
1
use32
2
	org 0x0
2
	org 0
3
	db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
3
	db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
4
	dd 0x1
-
 
5
	dd start
-
 
6
	dd i_end ;à §¬¥à ¯à¨«®¦¥­¨ï
4
	dd 1, start, i_end, mem, stacktop, 0, sys_path
7
	dd mem
-
 
8
	dd stacktop
-
 
9
	dd 0
-
 
10
	dd sys_path
-
 
11
 
5
 
12
include '../../../../macros.inc'
6
include '../../../../macros.inc'
13
include '../../../../proc32.inc'
7
include '../../../../proc32.inc'
-
 
8
include '../../../../KOSfuncs.inc'
14
include '../../../../develop/libraries/box_lib/load_lib.mac'
9
include '../../../../load_lib.mac'
15
include '../../../../develop/libraries/box_lib/trunk/box_lib.mac'
10
include '../../../../develop/libraries/box_lib/trunk/box_lib.mac'
16
include '../../../../dll.inc'
11
include '../../../../dll.inc'
17
 
12
 
18
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
13
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
19
caption db '˜¨ä஢ ­¨¥  «£®à¨â¬®¬ DES 05.03.13',0 ;¯®¤¯¨áì ®ª­ 
14
caption db '˜¨ä஢ ­¨¥  «£®à¨â¬®¬ DES 05.03.13',0 ;¯®¤¯¨áì ®ª­ 
20
 
15
 
21
struct FileInfoBlock
16
struct FileInfoBlock
22
	Function dd ?
17
	Function dd ?
23
	Position dd ?
18
	Position dd ?
24
	Flags	 dd ?
19
	Flags	 dd ?
25
	Count	 dd ?
20
	Count	 dd ?
26
	Buffer	 dd ?
21
	Buffer	 dd ?
27
		db ?
22
		db ?
28
	FileName dd ?
23
	FileName dd ?
29
ends
24
ends
30
 
25
 
31
run_file_70 FileInfoBlock
26
run_file_70 FileInfoBlock
32
image_data dd 0 ;㪠§ â¥«ì ­  ¢à¥¬¥­­ãî ¯ ¬ïâì. ¤«ï ­ã¦¥­ ¯à¥®¡à §®¢ ­¨ï ¨§®¡à ¦¥­¨ï
27
image_data dd 0 ;㪠§ â¥«ì ­  ¢à¥¬¥­­ãî ¯ ¬ïâì. ¤«ï ­ã¦¥­ ¯à¥®¡à §®¢ ­¨ï ¨§®¡à ¦¥­¨ï
33
 
28
 
34
fn_toolbar db 'toolbar.png',0
29
fn_toolbar db 'toolbar.png',0
35
IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
30
IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
36
IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*5
31
IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*5
37
image_data_toolbar dd 0
32
image_data_toolbar dd 0
38
 
33
 
39
IMAGE_FILE1_SIZE equ 128*144*3+54 ;à §¬¥à ä ©«  á ¨§®¡à ¦¥­¨¥¬
34
IMAGE_FILE1_SIZE equ 128*144*3+54 ;à §¬¥à ä ©«  á ¨§®¡à ¦¥­¨¥¬
40
 
35
 
41
max_open_file_size equ 64*1024 ;64 Kb
36
max_open_file_size equ 64*1024 ;64 Kb
42
 
37
 
43
macro load_image_file path,buf,size { ;¬ ªà®á ¤«ï § £à㧪¨ ¨§®¡à ¦¥­¨©
38
macro load_image_file path,buf,size { ;¬ ªà®á ¤«ï § £à㧪¨ ¨§®¡à ¦¥­¨©
44
	;path - ¬®¦¥â ¡ëâì ¯¥à¥¬¥­­®© ¨«¨ áâப®¢ë¬ ¯ à ¬¥â஬
39
	;path - ¬®¦¥â ¡ëâì ¯¥à¥¬¥­­®© ¨«¨ áâப®¢ë¬ ¯ à ¬¥â஬
45
	if path eqtype '' ;¯à®¢¥à塞 § ¤ ­ «¨ áâப®© ¯ à ¬¥âà path
40
	if path eqtype '' ;¯à®¢¥à塞 § ¤ ­ «¨ áâப®© ¯ à ¬¥âà path
46
		jmp @f
41
		jmp @f
47
			local .path_str
42
			local .path_str
48
			.path_str db path ;ä®à¬¨à㥬 «®ª «ì­ãî ¯¥à¥¬¥­­ãî
43
			.path_str db path ;ä®à¬¨à㥬 «®ª «ì­ãî ¯¥à¥¬¥­­ãî
49
			db 0
44
			db 0
50
		@@:
45
		@@:
51
		;32 - áâ ­¤ àâ­ë©  ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥­ ¡ëâì ¡ãä¥à á á¨á⥬­ë¬ ¯ã⥬
46
		;32 - áâ ­¤ àâ­ë©  ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥­ ¡ëâì ¡ãä¥à á á¨á⥬­ë¬ ¯ã⥬
52
		copy_path .path_str,[32],file_name,0x0
47
		copy_path .path_str,[32],file_name,0x0
53
	else
48
	else
54
		copy_path path,[32],file_name,0x0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
49
		copy_path path,[32],file_name,0x0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
55
	end if
50
	end if
56
 
51
 
57
	stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥­¨ï
52
	stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥­¨ï
58
	mov [buf],eax
53
	mov [buf],eax
59
 
54
 
60
	mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
55
	mov eax,SF_FILE
61
	mov [run_file_70.Function], 0
56
	mov [run_file_70.Function], SSF_READ_FILE
62
	mov [run_file_70.Position], 0
57
	mov [run_file_70.Position], 0
63
	mov [run_file_70.Flags], 0
58
	mov [run_file_70.Flags], 0
64
	mov [run_file_70.Count], dword size
59
	mov [run_file_70.Count], dword size
65
	m2m [run_file_70.Buffer], [buf]
60
	m2m [run_file_70.Buffer], [buf]
66
	mov byte[run_file_70+20], 0
61
	mov byte[run_file_70+20], 0
67
	mov [run_file_70.FileName], file_name
62
	mov [run_file_70.FileName], file_name
68
	mov ebx,run_file_70
63
	mov ebx,run_file_70
69
	int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
64
	int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
70
	cmp ebx,0xffffffff
65
	cmp ebx,0xffffffff
71
	je @f
66
	je @f
72
		;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥­­ë© ¡ãä¥à image_data
67
		;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥­­ë© ¡ãä¥à image_data
73
		stdcall dword[img_decode], dword[buf],ebx,0
68
		stdcall [img_decode], [buf],ebx,0
74
		mov dword[image_data],eax
69
		mov [image_data],eax
75
		;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥­¨¥ ª ä®à¬ âã rgb
70
		;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥­¨¥ ª ä®à¬ âã rgb
76
		stdcall dword[img_to_rgb2], dword[image_data],dword[buf]
71
		stdcall [img_to_rgb2], [image_data],[buf]
77
		;㤠«ï¥¬ ¢à¥¬¥­­ë© ¡ãä¥à image_data
72
		;㤠«ï¥¬ ¢à¥¬¥­­ë© ¡ãä¥à image_data
78
		stdcall dword[img_destroy], dword[image_data]
73
		stdcall [img_destroy], [image_data]
79
	@@:
74
	@@:
80
}
75
}
81
 
76
 
82
 
77
 
83
 
78
 
84
align 4
79
align 4
85
start:
80
start:
86
	load_libraries l_libs_start,l_libs_end
81
	load_libraries l_libs_start,l_libs_end
87
	;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ¡¨¡«¨®â¥ª 
82
	;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ¡¨¡«¨®â¥ª 
88
	mov	ebp,lib_0
83
	mov	ebp,lib_0
89
	cmp	dword [ebp+ll_struc_size-4],0
84
	cmp	dword [ebp+ll_struc_size-4],0
90
	jz	@f
85
	jz	@f
91
		mcall -1 ;exit not correct
86
		mcall SF_TERMINATE_PROCESS
92
	@@:
87
	@@:
93
	mcall 48,3,sc,sizeof.system_colors
88
	mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
94
	mcall 40,0xC0000027
89
	mcall SF_SET_EVENTS_MASK,0xC0000027
95
	stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª  ¤¨ «®£ 
90
	stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª  ¤¨ «®£ 
96
 
91
 
97
	stdcall [buf2d_create], buf_0 ;ᮧ¤ ­¨¥ ¡ãä¥à 
92
	stdcall [buf2d_create], buf_0 ;ᮧ¤ ­¨¥ ¡ãä¥à 
98
 
93
 
99
	load_image_file 'font8x9.bmp', image_data_toolbar,IMAGE_FILE1_SIZE
94
	load_image_file 'font8x9.bmp', image_data_toolbar,IMAGE_FILE1_SIZE
100
	stdcall [buf2d_create_f_img], buf_1,[image_data_toolbar] ;ᮧ¤ ¥¬ ¡ãä¥à
95
	stdcall [buf2d_create_f_img], buf_1,[image_data_toolbar] ;ᮧ¤ ¥¬ ¡ãä¥à
101
	stdcall mem.Free,[image_data_toolbar] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì
96
	stdcall mem.Free,[image_data_toolbar] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì
102
	stdcall [buf2d_conv_24_to_8], buf_1,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç­®á⨠8 ¡¨â
97
	stdcall [buf2d_conv_24_to_8], buf_1,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç­®á⨠8 ¡¨â
103
	stdcall [buf2d_convert_text_matrix], buf_1
98
	stdcall [buf2d_convert_text_matrix], buf_1
104
 
99
 
105
	load_image_file fn_toolbar, image_data_toolbar,IMAGE_TOOLBAR_SIZE
100
	load_image_file fn_toolbar, image_data_toolbar,IMAGE_TOOLBAR_SIZE
106
 
101
 
107
	stdcall mem.Alloc,max_open_file_size
102
	stdcall mem.Alloc,max_open_file_size
108
	mov dword[open_file],eax
103
	mov dword[open_file],eax
109
 
104
 
110
	call but_new_file
105
	call but_new_file
111
 
106
 
112
align 4
107
align 4
113
red_win:
108
red_win:
114
	call draw_window
109
	call draw_window
115
 
110
 
116
align 4
111
align 4
117
still:
112
still:
118
	mcall 10
113
	mcall SF_WAIT_EVENT
119
 
114
 
120
	cmp al,1
115
	cmp al,1
121
	jz red_win
116
	jz red_win
122
	cmp al,2
117
	cmp al,2
123
	jz key
118
	jz key
124
	cmp al,3
119
	cmp al,3
125
	jz button
120
	jz button
126
	cmp al,6 ;¬ëèì
121
	cmp al,6 ;¬ëèì
127
	jne @f
122
	jne @f
128
		jmp mouse
123
		jmp mouse
129
	@@:
124
	@@:
130
	jmp still
125
	jmp still
131
 
126
 
132
align 4
127
align 4
133
draw_window:
128
draw_window:
134
pushad
129
pushad
135
	mcall 12,1
130
	mcall SF_REDRAW,SSF_BEGIN_DRAW
136
 
131
 
137
	; *** à¨á®¢ ­¨¥ £« ¢­®£® ®ª­  (¢ë¯®«­ï¥âáï 1 à § ¯à¨ § ¯ã᪥) ***
-
 
138
	xor eax,eax
-
 
139
	mov ebx,(20 shl 16)+480
-
 
140
	mov ecx,(20 shl 16)+410
132
	; *** à¨á®¢ ­¨¥ £« ¢­®£® ®ª­  (¢ë¯®«­ï¥âáï 1 à § ¯à¨ § ¯ã᪥) ***
141
	mov edx,[sc.work]
133
	mov edx,[sc.work]
142
	or  edx,(3 shl 24)+0x10000000+0x20000000
134
	or  edx,(3 shl 24)+0x10000000+0x20000000
143
	mov edi,caption
135
	mov edi,caption
144
	int 0x40
136
	mcall SF_CREATE_WINDOW, (20 shl 16)+480, (20 shl 16)+410
145
 
137
 
146
	; *** ᮧ¤ ­¨¥ ª­®¯®ª ­  ¯ ­¥«ì ***
-
 
147
	mov eax,8
-
 
148
	mov ebx,(5 shl 16)+20
-
 
149
	mov ecx,(5 shl 16)+20
-
 
150
	mov edx,3
138
	; *** ᮧ¤ ­¨¥ ª­®¯®ª ­  ¯ ­¥«ì ***
151
	mov esi,[sc.work_button]
139
	mov esi,[sc.work_button]
152
	int 0x40
-
 
153
 
140
	mcall SF_DEFINE_BUTTON, (5 shl 16)+20, (5 shl 16)+20, 3
154
	mov ebx,(30 shl 16)+20
-
 
155
	mov edx,4
-
 
156
	int 0x40
-
 
157
 
141
	mcall ,(30 shl 16)+20,,4
158
	mov ebx,(55 shl 16)+20
-
 
159
	mov edx,5
-
 
160
	int 0x40
-
 
161
 
142
	mcall ,(55 shl 16)+20,,5
162
	mov ebx,(85 shl 16)+20
-
 
163
	mov edx,6
-
 
164
	int 0x40
-
 
165
 
143
	mcall ,(85 shl 16)+20,,6
166
	mov ebx,(110 shl 16)+20
-
 
167
	mov edx,7
-
 
168
	int 0x40
144
	mcall ,(110 shl 16)+20,,7
169
 
-
 
170
	; *** à¨á®¢ ­¨¥ ¨ª®­®ª ­  ª­®¯ª å ***
-
 
171
	mov eax,7
-
 
172
	mov ebx,[image_data_toolbar]
145
 
173
	mov ecx,(16 shl 16)+16
-
 
174
	mov edx,(7 shl 16)+7 ;icon new
146
	; *** à¨á®¢ ­¨¥ ¨ª®­®ª ­  ª­®¯ª å ***
175
	int 0x40
147
	mcall SF_PUT_IMAGE, [image_data_toolbar], (16 shl 16)+16, (7 shl 16)+7 ;icon new
176
 
148
 
177
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
149
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
178
	add edx,(25 shl 16) ;icon open
150
	add edx,(25 shl 16) ;icon open
179
	int 0x40
151
	int 0x40
180
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
152
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
181
	add edx,(25 shl 16) ;icon save
153
	add edx,(25 shl 16) ;icon save
182
	int 0x40
154
	int 0x40
183
 
155
 
184
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
156
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
185
	add edx,(30 shl 16) ;
157
	add edx,(30 shl 16) ;
186
	int 0x40
158
	int 0x40
187
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
159
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
188
	add edx,(25 shl 16) ;
160
	add edx,(25 shl 16) ;
189
	int 0x40
161
	int 0x40
190
 
162
 
191
	stdcall [edit_box_draw], edit1
163
	stdcall [edit_box_draw], edit1
192
 
164
 
193
	; *** à¨á®¢ ­¨¥ ¡ãä¥à  ***
165
	; *** à¨á®¢ ­¨¥ ¡ãä¥à  ***
194
	stdcall [buf2d_draw], buf_0
166
	stdcall [buf2d_draw], buf_0
195
 
167
 
196
	mcall 12,2
168
	mcall SF_REDRAW,SSF_END_DRAW
197
popad
169
popad
198
	ret
170
	ret
199
 
171
 
200
align 4
172
align 4
201
key:
173
key:
202
	mcall 2
174
	mcall SF_GET_KEY
203
	stdcall [edit_box_key], dword edit1
175
	stdcall [edit_box_key], dword edit1
204
	jmp still
176
	jmp still
205
 
177
 
206
align 4
178
align 4
207
mouse:
179
mouse:
208
	stdcall [edit_box_mouse], edit1
180
	stdcall [edit_box_mouse], edit1
209
	jmp still
181
	jmp still
210
 
182
 
211
align 4
183
align 4
212
button:
184
button:
213
	mcall 17
185
	mcall SF_GET_BUTTON
214
	cmp ah,3
186
	cmp ah,3
215
	jne @f
187
	jne @f
216
		call but_new_file
188
		call but_new_file
217
	@@:
189
	@@:
218
	cmp ah,4
190
	cmp ah,4
219
	jne @f
191
	jne @f
220
		call but_open_file
192
		call but_open_file
221
	@@:
193
	@@:
222
	cmp ah,5
194
	cmp ah,5
223
	jne @f
195
	jne @f
224
		call but_save_file
196
		call but_save_file
225
	@@:
197
	@@:
226
	cmp ah,6
198
	cmp ah,6
227
	jne @f
199
	jne @f
228
		call but_1
200
		call but_1
229
	@@:
201
	@@:
230
	cmp ah,7
202
	cmp ah,7
231
	jne @f
203
	jne @f
232
		call but_2
204
		call but_2
233
	@@:
205
	@@:
234
	cmp ah,1
206
	cmp ah,1
235
	jne still
207
	jne still
236
.exit:
208
.exit:
237
	stdcall [buf2d_delete],buf_0
209
	stdcall [buf2d_delete],buf_0
238
	stdcall [buf2d_delete],buf_1 ;㤠«ï¥¬ ¡ãä¥à
210
	stdcall [buf2d_delete],buf_1 ;㤠«ï¥¬ ¡ãä¥à
239
	stdcall mem.Free,[image_data_toolbar]
211
	stdcall mem.Free,[image_data_toolbar]
240
	stdcall mem.Free,[open_file]
212
	stdcall mem.Free,[open_file]
241
	mcall -1
213
	mcall SF_TERMINATE_PROCESS
242
 
214
 
243
 
215
 
244
align 4
216
align 4
245
but_new_file:
217
but_new_file:
246
	mov dword[open_file_size],0
218
	mov dword[open_file_size],0
247
	call draw_file
219
	call draw_file
248
	ret
220
	ret
249
 
221
 
250
align 4
222
align 4
251
open_file dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï ®âªàëâ¨ï ä ©«®¢
223
open_file dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï ®âªàëâ¨ï ä ©«®¢
252
open_file_size dd 0 ;à §¬¥à ®âªàë⮣® ä ©«  (¤®«¦¥­ ¡ëâì ­¥ ¡®«ìè¥ max_open_file_size)
224
open_file_size dd 0 ;à §¬¥à ®âªàë⮣® ä ©«  (¤®«¦¥­ ¡ëâì ­¥ ¡®«ìè¥ max_open_file_size)
253
 
225
 
254
align 4
226
align 4
255
but_open_file:
227
but_open_file:
256
	pushad
228
	pushad
257
	copy_path open_dialog_name,communication_area_default_path,file_name,0
229
	copy_path open_dialog_name,communication_area_default_path,file_name,0
258
	mov [OpenDialog_data.type],0
230
	mov [OpenDialog_data.type],0
259
	stdcall [OpenDialog_Start],OpenDialog_data
231
	stdcall [OpenDialog_Start],OpenDialog_data
260
	cmp [OpenDialog_data.status],2
232
	cmp [OpenDialog_data.status],2
261
	je .end_open_file
233
	je .end_open_file
262
	;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
234
	;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
263
 
235
 
264
	mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
236
	mov eax,SF_FILE
265
	mov [run_file_70.Function], 0
237
	mov [run_file_70.Function], SSF_READ_FILE
266
	mov [run_file_70.Position], 0
238
	mov [run_file_70.Position], 0
267
	mov [run_file_70.Flags], 0
239
	mov [run_file_70.Flags], 0
268
	mov dword[run_file_70.Count], max_open_file_size
240
	mov dword[run_file_70.Count], max_open_file_size
269
	m2m [run_file_70.Buffer], [open_file]
241
	m2m [run_file_70.Buffer], [open_file]
270
	mov byte[run_file_70+20], 0
242
	mov byte[run_file_70+20], 0
271
	mov dword[run_file_70.FileName], openfile_path
243
	mov dword[run_file_70.FileName], openfile_path
272
	mov ebx,run_file_70
244
	mov ebx,run_file_70
273
	int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
245
	int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
274
	cmp ebx,0xffffffff
246
	cmp ebx,0xffffffff
275
	je .end_open_file
247
	je .end_open_file
276
 
248
 
277
	mov [open_file_size],ebx
249
	mov [open_file_size],ebx
278
	add ebx,dword[open_file]
250
	add ebx,[open_file]
279
	mov byte[ebx],0 ;­  á«ãç © ¥á«¨ à ­¥¥ ¡ë« ®âªàëâ ä ©« ¡®«ì襣® à §¬¥à  ç¨á⨬ ª®­¥æ ¡ãä¥à  á ä ©«®¬
251
	mov byte[ebx],0 ;­  á«ãç © ¥á«¨ à ­¥¥ ¡ë« ®âªàëâ ä ©« ¡®«ì襣® à §¬¥à  ç¨á⨬ ª®­¥æ ¡ãä¥à  á ä ©«®¬
280
	mcall 71,1,openfile_path
252
	mcall SF_SET_CAPTION,1,openfile_path
281
 
253
 
282
	call draw_file
254
	call draw_file
283
	.end_open_file:
255
	.end_open_file:
284
	popad
256
	popad
285
	ret
257
	ret
286
 
258
 
287
align 4
259
align 4
288
draw_file:
260
draw_file:
289
pushad
261
pushad
290
	stdcall [buf2d_clear], buf_0, [buf_0.color]
262
	stdcall [buf2d_clear], buf_0, [buf_0.color]
291
	cmp dword[open_file_size],0
263
	cmp dword[open_file_size],0
292
	je .open_file
264
	je .open_file
293
	mov eax,[open_file]
265
	mov eax,[open_file]
294
	mov ebx,3
266
	mov ebx,3
295
	mov edx,dword[open_file_size]
267
	mov edx,[open_file_size]
296
	.cycle_0:
268
	.cycle_0:
297
		mov edi,txt_buf
269
		mov edi,txt_buf
298
		mov esi,eax
270
		mov esi,eax
299
		mov ecx,56
271
		mov ecx,56
300
		;cld
272
		;cld
301
		rep movsb
273
		rep movsb
302
		mov byte[edi],0
274
		mov byte[edi],0
303
		mov edi,txt_buf
275
		mov edi,txt_buf
304
		mov ecx,56
276
		mov ecx,56
305
		.cycle_1:
277
		.cycle_1:
306
			cmp byte[edi],0
278
			cmp byte[edi],0
307
			je @f
279
			je @f
308
			cmp byte[edi],13
280
			cmp byte[edi],13
309
			je @f
281
			je @f
310
			jmp .ok
282
			jmp .ok
311
			@@:
283
			@@:
312
				mov byte[edi],' ' ;­¥¯¥ç â­ë¥ ᨬ¢®«ë § ¬¥­ï¥¬ ­  ¯à®¡¥«
284
				mov byte[edi],' ' ;­¥¯¥ç â­ë¥ ᨬ¢®«ë § ¬¥­ï¥¬ ­  ¯à®¡¥«
313
			.ok:
285
			.ok:
314
			inc edi
286
			inc edi
315
			loop .cycle_1
287
			loop .cycle_1
316
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,4,ebx,0xb0
288
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,4,ebx,0xb0
317
		sub edx,56
289
		sub edx,56
318
		cmp edx,1
290
		cmp edx,1
319
		jl @f
291
		jl @f
320
		add eax,56
292
		add eax,56
321
		add ebx,10
293
		add ebx,10
322
		cmp ebx,dword[buf_0.h]
294
		cmp ebx,[buf_0.h]
323
		jl .cycle_0
295
		jl .cycle_0
324
	jmp @f
296
	jmp @f
325
	.open_file:
297
	.open_file:
326
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
298
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
327
	@@:
299
	@@:
328
	stdcall [buf2d_draw], buf_0
300
	stdcall [buf2d_draw], buf_0
329
popad
301
popad
330
	ret
302
	ret
331
 
303
 
332
align 4
304
align 4
333
but_save_file:
305
but_save_file:
334
	pushad
306
	pushad
335
	copy_path open_dialog_name,communication_area_default_path,file_name,0
307
	copy_path open_dialog_name,communication_area_default_path,file_name,0
336
	mov [OpenDialog_data.type],1
308
	mov [OpenDialog_data.type],1
337
	stdcall [OpenDialog_Start],OpenDialog_data
309
	stdcall [OpenDialog_Start],OpenDialog_data
338
	cmp [OpenDialog_data.status],2
310
	cmp [OpenDialog_data.status],2
339
	je .end_save_file
311
	je .end_save_file
340
	;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
312
	;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
341
 
313
 
342
	mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
314
	mov eax,SF_FILE
343
	mov [run_file_70.Function], 2
315
	mov [run_file_70.Function], SSF_CREATE_FILE
344
	mov [run_file_70.Position], 0
316
	mov [run_file_70.Position], 0
345
	mov [run_file_70.Flags], 0
317
	mov [run_file_70.Flags], 0
346
	mov ebx, dword[open_file]
318
	mov ebx, dword[open_file]
347
	mov [run_file_70.Buffer], ebx
319
	mov [run_file_70.Buffer], ebx
348
	mov ebx,[open_file_size]
320
	mov ebx,[open_file_size]
349
	mov dword[run_file_70.Count], ebx ;à §¬¥à ä ©« 
321
	mov dword[run_file_70.Count], ebx ;à §¬¥à ä ©« 
350
	mov byte[run_file_70+20], 0
322
	mov byte[run_file_70+20], 0
351
	mov dword[run_file_70.FileName], openfile_path
323
	mov dword[run_file_70.FileName], openfile_path
352
	mov ebx,run_file_70
324
	mov ebx,run_file_70
353
	int 0x40 ;á®å࠭塞 ä ©« ¨§®¡à ¦¥­¨ï
325
	int 0x40 ;á®å࠭塞 ä ©« ¨§®¡à ¦¥­¨ï
354
	;cmp ebx,0xffffffff
326
	;cmp ebx,0xffffffff
355
	;je .end_save_file
327
	;je .end_save_file
356
	; ... á®®¡é¥­¨¥ ® ­¥ã¤ ç­®¬ á®åà ­¥­¨¨ ...
328
	; ... á®®¡é¥­¨¥ ® ­¥ã¤ ç­®¬ á®åà ­¥­¨¨ ...
357
 
329
 
358
	.end_save_file:
330
	.end_save_file:
359
	popad
331
	popad
360
	ret
332
	ret
361
 
333
 
362
align 4
334
align 4
363
but_1:
335
but_1:
364
push eax
336
push eax
365
	mov eax,[open_file_size]
337
	mov eax,[open_file_size]
366
	shr eax,3
338
	shr eax,3
367
	stdcall [des_encryption], txt_key,mem_key,[open_file],eax
339
	stdcall [des_encryption], txt_key,mem_key,[open_file],eax
368
pop eax
340
pop eax
369
	call draw_file
341
	call draw_file
370
	ret
342
	ret
371
 
343
 
372
align 4
344
align 4
373
but_2:
345
but_2:
374
push eax
346
push eax
375
	mov eax,[open_file_size]
347
	mov eax,[open_file_size]
376
	shr eax,3
348
	shr eax,3
377
	stdcall [des_decryption], txt_key,mem_key,[open_file],eax
349
	stdcall [des_decryption], txt_key,mem_key,[open_file],eax
378
pop eax
350
pop eax
379
	call draw_file
351
	call draw_file
380
	ret
352
	ret
381
 
353
 
382
;¤ ­­ë¥ ¤«ï ¤¨ «®£  ®âªàëâ¨ï ä ©«®¢
354
;¤ ­­ë¥ ¤«ï ¤¨ «®£  ®âªàëâ¨ï ä ©«®¢
383
align 4
355
align 4
384
OpenDialog_data:
356
OpenDialog_data:
385
.type			dd 0 ;0 - ®âªàëâì, 1 - á®åà ­¨âì, 2 - ¢ë¡à âì ¤â४â®à¨î
357
.type			dd 0 ;0 - ®âªàëâì, 1 - á®åà ­¨âì, 2 - ¢ë¡à âì ¤â४â®à¨î
386
.procinfo		dd procinfo	;+4
358
.procinfo		dd procinfo	;+4
387
.com_area_name		dd communication_area_name	;+8
359
.com_area_name		dd communication_area_name	;+8
388
.com_area		dd 0	;+12
360
.com_area		dd 0	;+12
389
.opendir_path		dd plugin_path	;+16
361
.opendir_path		dd plugin_path	;+16
390
.dir_default_path	dd default_dir ;+20
362
.dir_default_path	dd default_dir ;+20
391
.start_path		dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢
363
.start_path		dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢
392
.draw_window		dd draw_window	;+28
364
.draw_window		dd draw_window	;+28
393
.status 		dd 0	;+32
365
.status 		dd 0	;+32
394
.openfile_path		dd openfile_path	;+36 ¯ãâì ª ®âªà뢠¥¬®¬ã ä ©«ã
366
.openfile_path		dd openfile_path	;+36 ¯ãâì ª ®âªà뢠¥¬®¬ã ä ©«ã
395
.filename_area		dd filename_area	;+40
367
.filename_area		dd filename_area	;+40
396
.filter_area		dd Filter
368
.filter_area		dd Filter
397
.x:
369
.x:
398
.x_size 		dw 420 ;+48 ; Window X size
370
.x_size 		dw 420 ;+48 ; Window X size
399
.x_start		dw 10 ;+50 ; Window X position
371
.x_start		dw 10 ;+50 ; Window X position
400
.y:
372
.y:
401
.y_size 		dw 320 ;+52 ; Window y size
373
.y_size 		dw 320 ;+52 ; Window y size
402
.y_start		dw 10 ;+54 ; Window Y position
374
.y_start		dw 10 ;+54 ; Window Y position
403
 
375
 
404
default_dir db '/rd/1',0
376
default_dir db '/rd/1',0
405
 
377
 
406
communication_area_name:
378
communication_area_name:
407
	db 'FFFFFFFF_open_dialog',0
379
	db 'FFFFFFFF_open_dialog',0
408
open_dialog_name:
380
open_dialog_name:
409
	db 'opendial',0
381
	db 'opendial',0
410
communication_area_default_path:
382
communication_area_default_path:
411
	db '/rd/1/File managers/',0
383
	db '/rd/1/File managers/',0
412
 
384
 
413
Filter:
385
Filter:
414
dd Filter.end - Filter ;.1
386
dd Filter.end - Filter ;.1
415
.1:
387
.1:
416
db 'TXT',0
388
db 'TXT',0
417
db 'ASM',0
389
db 'ASM',0
418
.end:
390
.end:
419
db 0
391
db 0
420
 
392
 
421
 
-
 
422
 
-
 
423
head_f_i:
-
 
424
head_f_l db '‘¨á⥬­ ï ®è¨¡ª ',0
-
 
425
 
393
 
426
system_dir_0 db '/sys/lib/'
394
system_dir_0 db '/sys/lib/'
427
lib_name_0 db 'proc_lib.obj',0
-
 
428
err_message_found_lib_0 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'proc_lib.obj',39,0
-
 
429
err_message_import_0 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,0
-
 
430
 
395
lib_name_0 db 'proc_lib.obj',0
431
system_dir_1 db '/sys/lib/'
396
system_dir_1 db '/sys/lib/'
432
lib_name_1 db 'libimg.obj',0
-
 
433
err_message_found_lib_1 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libimg.obj',39,0
-
 
434
err_message_import_1 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,0
-
 
435
 
397
lib_name_1 db 'libimg.obj',0
436
system_dir_2 db '/sys/lib/'
398
system_dir_2 db '/sys/lib/'
437
lib_name_2 db 'buf2d.obj',0
-
 
438
err_msg_found_lib_2 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'buf2d.obj',39,0
-
 
439
err_msg_import_2 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,0
-
 
440
 
399
lib_name_2 db 'buf2d.obj',0
441
system_dir_3 db '/sys/lib/'
400
system_dir_3 db '/sys/lib/'
442
lib_name_3 db 'crypt_des.obj',0
-
 
443
err_msg_found_lib_3 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'crypt_des.obj',39,0
-
 
444
err_msg_import_3 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'crypt_des',39,0
-
 
445
 
401
lib_name_3 db 'crypt_des.obj',0
446
system_dir_4 db '/sys/lib/'
402
system_dir_4 db '/sys/lib/'
447
lib_name_4 db 'box_lib.obj',0
-
 
448
err_msg_found_lib_4 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'box_lib.obj',39,0
-
 
449
err_msg_import_4 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'box_lib',39,0
403
lib_name_4 db 'box_lib.obj',0
450
 
404
 
451
l_libs_start:
-
 
452
	lib_0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\
405
l_libs_start:
453
		err_message_found_lib_0, head_f_l, proclib_import,err_message_import_0, head_f_i
-
 
454
	lib_1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\
406
	lib_0 l_libs lib_name_0, file_name, system_dir_0, import_proclib
455
		err_message_found_lib_1, head_f_l, import_libimg, err_message_import_1, head_f_i
-
 
456
	lib_2 l_libs lib_name_2, sys_path, library_path, system_dir_2,\
407
	lib_1 l_libs lib_name_1, file_name, system_dir_1, import_libimg
457
		err_msg_found_lib_2,head_f_l,import_buf2d,err_msg_import_2,head_f_i
-
 
458
	lib_3 l_libs lib_name_3, sys_path, library_path, system_dir_3,\
408
	lib_2 l_libs lib_name_2, library_path, system_dir_2, import_buf2d
459
		err_msg_found_lib_3,head_f_l,import_des,err_msg_import_3,head_f_i
-
 
460
	lib_4 l_libs lib_name_4, sys_path, library_path, system_dir_4,\
409
	lib_3 l_libs lib_name_3, library_path, system_dir_3, import_des
461
		err_msg_found_lib_4,head_f_l,import_box_lib,err_msg_import_4,head_f_i
410
	lib_4 l_libs lib_name_4, library_path, system_dir_4, import_box_lib
462
l_libs_end:
411
l_libs_end:
463
 
412
 
464
align 4
413
align 4
465
import_libimg:
414
import_libimg:
466
	dd alib_init1
415
	dd alib_init1
467
	img_is_img  dd aimg_is_img
416
	img_is_img  dd aimg_is_img
468
	img_info    dd aimg_info
417
	img_info    dd aimg_info
469
	img_from_file dd aimg_from_file
418
	img_from_file dd aimg_from_file
470
	img_to_file dd aimg_to_file
419
	img_to_file dd aimg_to_file
471
	img_from_rgb dd aimg_from_rgb
420
	img_from_rgb dd aimg_from_rgb
472
	img_to_rgb  dd aimg_to_rgb
421
	img_to_rgb  dd aimg_to_rgb
473
	img_to_rgb2 dd aimg_to_rgb2
422
	img_to_rgb2 dd aimg_to_rgb2
474
	img_decode  dd aimg_decode
423
	img_decode  dd aimg_decode
475
	img_encode  dd aimg_encode
424
	img_encode  dd aimg_encode
476
	img_create  dd aimg_create
425
	img_create  dd aimg_create
477
	img_destroy dd aimg_destroy
426
	img_destroy dd aimg_destroy
478
	img_destroy_layer dd aimg_destroy_layer
427
	img_destroy_layer dd aimg_destroy_layer
479
	img_count   dd aimg_count
428
	img_count   dd aimg_count
480
	img_lock_bits dd aimg_lock_bits
429
	img_lock_bits dd aimg_lock_bits
481
	img_unlock_bits dd aimg_unlock_bits
430
	img_unlock_bits dd aimg_unlock_bits
482
	img_flip    dd aimg_flip
431
	img_flip    dd aimg_flip
483
	img_flip_layer dd aimg_flip_layer
432
	img_flip_layer dd aimg_flip_layer
484
	img_rotate  dd aimg_rotate
433
	img_rotate  dd aimg_rotate
485
	img_rotate_layer dd aimg_rotate_layer
434
	img_rotate_layer dd aimg_rotate_layer
486
	img_draw    dd aimg_draw
435
	img_draw    dd aimg_draw
487
 
436
 
488
	dd 0,0
437
	dd 0,0
489
	alib_init1   db 'lib_init',0
438
	alib_init1   db 'lib_init',0
490
	aimg_is_img  db 'img_is_img',0 ;®¯à¥¤¥«ï¥â ¯® ¤ ­­ë¬, ¬®¦¥â «¨ ¡¨¡«¨®â¥ª  ᤥ« âì ¨§ ­¨å ¨§®¡à ¦¥­¨¥
439
	aimg_is_img  db 'img_is_img',0 ;®¯à¥¤¥«ï¥â ¯® ¤ ­­ë¬, ¬®¦¥â «¨ ¡¨¡«¨®â¥ª  ᤥ« âì ¨§ ­¨å ¨§®¡à ¦¥­¨¥
491
	aimg_info    db 'img_info',0
440
	aimg_info    db 'img_info',0
492
	aimg_from_file db 'img_from_file',0
441
	aimg_from_file db 'img_from_file',0
493
	aimg_to_file db 'img_to_file',0
442
	aimg_to_file db 'img_to_file',0
494
	aimg_from_rgb db 'img_from_rgb',0
443
	aimg_from_rgb db 'img_from_rgb',0
495
	aimg_to_rgb  db 'img_to_rgb',0 ;¯à¥®¡à §®¢ ­¨¥ ¨§®¡à ¦¥­¨ï ¢ ¤ ­­ë¥ RGB
444
	aimg_to_rgb  db 'img_to_rgb',0 ;¯à¥®¡à §®¢ ­¨¥ ¨§®¡à ¦¥­¨ï ¢ ¤ ­­ë¥ RGB
496
	aimg_to_rgb2 db 'img_to_rgb2',0
445
	aimg_to_rgb2 db 'img_to_rgb2',0
497
	aimg_decode  db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ­­ëå
446
	aimg_decode  db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ­­ëå
498
	aimg_encode  db 'img_encode',0
447
	aimg_encode  db 'img_encode',0
499
	aimg_create  db 'img_create',0
448
	aimg_create  db 'img_create',0
500
	aimg_destroy db 'img_destroy',0
449
	aimg_destroy db 'img_destroy',0
501
	aimg_destroy_layer db 'img_destroy_layer',0
450
	aimg_destroy_layer db 'img_destroy_layer',0
502
	aimg_count   db 'img_count',0
451
	aimg_count   db 'img_count',0
503
	aimg_lock_bits db 'img_lock_bits',0
452
	aimg_lock_bits db 'img_lock_bits',0
504
	aimg_unlock_bits db 'img_unlock_bits',0
453
	aimg_unlock_bits db 'img_unlock_bits',0
505
	aimg_flip    db 'img_flip',0
454
	aimg_flip    db 'img_flip',0
506
	aimg_flip_layer db 'img_flip_layer',0
455
	aimg_flip_layer db 'img_flip_layer',0
507
	aimg_rotate  db 'img_rotate',0
456
	aimg_rotate  db 'img_rotate',0
508
	aimg_rotate_layer db 'img_rotate_layer',0
457
	aimg_rotate_layer db 'img_rotate_layer',0
509
	aimg_draw    db 'img_draw',0
458
	aimg_draw    db 'img_draw',0
510
 
459
 
511
align 4
460
align 4
512
proclib_import: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
461
import_proclib: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
513
	OpenDialog_Init dd aOpenDialog_Init
462
	OpenDialog_Init dd aOpenDialog_Init
514
	OpenDialog_Start dd aOpenDialog_Start
463
	OpenDialog_Start dd aOpenDialog_Start
515
dd 0,0
464
dd 0,0
516
	aOpenDialog_Init db 'OpenDialog_init',0
465
	aOpenDialog_Init db 'OpenDialog_init',0
517
	aOpenDialog_Start db 'OpenDialog_start',0
466
	aOpenDialog_Start db 'OpenDialog_start',0
518
 
467
 
519
align 4
468
align 4
520
import_buf2d:
469
import_buf2d:
521
	init dd sz_init
470
	init dd sz_init
522
	buf2d_create dd sz_buf2d_create
471
	buf2d_create dd sz_buf2d_create
523
	buf2d_create_f_img dd sz_buf2d_create_f_img
472
	buf2d_create_f_img dd sz_buf2d_create_f_img
524
	buf2d_clear dd sz_buf2d_clear
473
	buf2d_clear dd sz_buf2d_clear
525
	buf2d_draw dd sz_buf2d_draw
474
	buf2d_draw dd sz_buf2d_draw
526
	buf2d_delete dd sz_buf2d_delete
475
	buf2d_delete dd sz_buf2d_delete
527
	;buf2d_line dd sz_buf2d_line
476
	;buf2d_line dd sz_buf2d_line
528
	;buf2d_rect_by_size dd sz_buf2d_rect_by_size
477
	;buf2d_rect_by_size dd sz_buf2d_rect_by_size
529
	;buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
478
	;buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
530
	;buf2d_circle dd sz_buf2d_circle
479
	;buf2d_circle dd sz_buf2d_circle
531
	;buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
480
	;buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
532
	;buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
481
	;buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
533
	buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
482
	buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
534
	;buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
483
	;buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
535
	;buf2d_bit_blt dd sz_buf2d_bit_blt
484
	;buf2d_bit_blt dd sz_buf2d_bit_blt
536
	;buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
485
	;buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
537
	;buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
486
	;buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
538
	;buf2d_curve_bezier dd sz_buf2d_curve_bezier
487
	;buf2d_curve_bezier dd sz_buf2d_curve_bezier
539
	buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
488
	buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
540
	buf2d_draw_text dd sz_buf2d_draw_text
489
	buf2d_draw_text dd sz_buf2d_draw_text
541
	;buf2d_crop_color dd sz_buf2d_crop_color
490
	;buf2d_crop_color dd sz_buf2d_crop_color
542
	;buf2d_offset_h dd sz_buf2d_offset_h
491
	;buf2d_offset_h dd sz_buf2d_offset_h
543
	;buf2d_flood_fill dd sz_buf2d_flood_fill
492
	;buf2d_flood_fill dd sz_buf2d_flood_fill
544
	;buf2d_set_pixel dd sz_buf2d_set_pixel
493
	;buf2d_set_pixel dd sz_buf2d_set_pixel
545
	dd 0,0
494
	dd 0,0
546
	sz_init db 'lib_init',0
495
	sz_init db 'lib_init',0
547
	sz_buf2d_create db 'buf2d_create',0
496
	sz_buf2d_create db 'buf2d_create',0
548
	sz_buf2d_create_f_img db 'buf2d_create_f_img',0
497
	sz_buf2d_create_f_img db 'buf2d_create_f_img',0
549
	sz_buf2d_clear db 'buf2d_clear',0
498
	sz_buf2d_clear db 'buf2d_clear',0
550
	sz_buf2d_draw db 'buf2d_draw',0
499
	sz_buf2d_draw db 'buf2d_draw',0
551
	sz_buf2d_delete db 'buf2d_delete',0
500
	sz_buf2d_delete db 'buf2d_delete',0
552
	;sz_buf2d_line db 'buf2d_line',0
501
	;sz_buf2d_line db 'buf2d_line',0
553
	;sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0
502
	;sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0
554
	;sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
503
	;sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
555
	;sz_buf2d_circle db 'buf2d_circle',0
504
	;sz_buf2d_circle db 'buf2d_circle',0
556
	;sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0
505
	;sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0
557
	;sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0
506
	;sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0
558
	sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
507
	sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
559
	;sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0
508
	;sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0
560
	;sz_buf2d_bit_blt db 'buf2d_bit_blt',0
509
	;sz_buf2d_bit_blt db 'buf2d_bit_blt',0
561
	;sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
510
	;sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
562
	;sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
511
	;sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
563
	;sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0
512
	;sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0
564
	sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
513
	sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
565
	sz_buf2d_draw_text db 'buf2d_draw_text',0
514
	sz_buf2d_draw_text db 'buf2d_draw_text',0
566
	;sz_buf2d_crop_color db 'buf2d_crop_color',0
515
	;sz_buf2d_crop_color db 'buf2d_crop_color',0
567
	;sz_buf2d_offset_h db 'buf2d_offset_h',0
516
	;sz_buf2d_offset_h db 'buf2d_offset_h',0
568
	;sz_buf2d_flood_fill db 'buf2d_flood_fill',0
517
	;sz_buf2d_flood_fill db 'buf2d_flood_fill',0
569
	;sz_buf2d_set_pixel db 'buf2d_set_pixel',0
518
	;sz_buf2d_set_pixel db 'buf2d_set_pixel',0
570
 
519
 
571
align 4
520
align 4
572
import_des: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
521
import_des: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
573
	des_encryption dd sz_des_encryption
522
	des_encryption dd sz_des_encryption
574
	des_decryption dd sz_des_decryption
523
	des_decryption dd sz_des_decryption
575
dd 0,0
524
dd 0,0
576
	sz_des_encryption db 'des_encryption',0
525
	sz_des_encryption db 'des_encryption',0
577
	sz_des_decryption db 'des_decryption',0
526
	sz_des_decryption db 'des_decryption',0
578
 
527
 
579
align 4
528
align 4
580
import_box_lib:
529
import_box_lib:
581
	;dd sz_init1
530
	;dd sz_init1
582
	edit_box_draw dd sz_edit_box_draw
531
	edit_box_draw dd sz_edit_box_draw
583
	edit_box_key dd sz_edit_box_key
532
	edit_box_key dd sz_edit_box_key
584
	edit_box_mouse dd sz_edit_box_mouse
533
	edit_box_mouse dd sz_edit_box_mouse
585
	;edit_box_set_text dd sz_edit_box_set_text
534
	;edit_box_set_text dd sz_edit_box_set_text
586
 
535
 
587
	dd 0,0
536
	dd 0,0
588
	;sz_init1 db 'lib_init',0
537
	;sz_init1 db 'lib_init',0
589
	sz_edit_box_draw db 'edit_box',0
538
	sz_edit_box_draw db 'edit_box',0
590
	sz_edit_box_key db 'edit_box_key',0
539
	sz_edit_box_key db 'edit_box_key',0
591
	sz_edit_box_mouse db 'edit_box_mouse',0
540
	sz_edit_box_mouse db 'edit_box_mouse',0
592
	;sz_edit_box_set_text db 'edit_box_set_text',0
541
	;sz_edit_box_set_text db 'edit_box_set_text',0
593
 
542
 
594
mouse_dd dd 0x0
543
mouse_dd dd 0x0
595
sc system_colors 
-
 
596
 
-
 
597
align 16
-
 
598
procinfo process_information 
-
 
599
 
544
 
600
align 4
545
align 4
601
buf_0: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
546
buf_0: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
602
	dw 5 ;+4 left
547
	dw 5 ;+4 left
603
	dw 31 ;+6 top
548
	dw 31 ;+6 top
604
.w: dd 456 ;+8 w
549
.w: dd 456 ;+8 w
605
.h: dd 350 ;+12 h
550
.h: dd 350 ;+12 h
606
.color: dd 0xffffd0 ;+16 color
551
.color: dd 0xffffd0 ;+16 color
607
	db 24 ;+20 bit in pixel
552
	db 24 ;+20 bit in pixel
608
 
553
 
609
align 4
554
align 4
610
buf_1:
555
buf_1:
611
	dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
556
	dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
612
	dw 25 ;+4 left
557
	dw 25 ;+4 left
613
	dw 25 ;+6 top
558
	dw 25 ;+6 top
614
	dd 128 ;+8 w
559
	dd 128 ;+8 w
615
	dd 144 ;+12 h
560
	dd 144 ;+12 h
616
	dd 0 ;+16 color
561
	dd 0 ;+16 color
617
	db 24 ;+20 bit in pixel
562
	db 24 ;+20 bit in pixel
618
 
563
 
619
edit1 edit_box 58, 140,8, 0xffffff, 0xff, 0x80ff, 0, 0x8000, 8, txt_key, mouse_dd, ed_focus+ed_always_focus,8,8
564
edit1 edit_box 58, 140,8, 0xffffff, 0xff, 0x80ff, 0, 0x8000, 8, txt_key, mouse_dd, ed_focus+ed_always_focus,8,8
620
 
565
 
621
txt_openfile db 'Žâªà®©â¥ ä ©« ¤«ï è¨ä஢ ­¨ï ¨«¨ ¤¥è¨ä஢ ­¨ï.',0
566
txt_openfile db 'Žâªà®©â¥ ä ©« ¤«ï è¨ä஢ ­¨ï ¨«¨ ¤¥è¨ä஢ ­¨ï.',0
622
txt_buf rb 80
567
txt_buf rb 80
623
txt_key db 'des_0123',0
568
txt_key db 'des_0123',0
624
mem_key rb 120
569
mem_key rb 120
-
 
570
 
625
 
571
align 16
-
 
572
i_end:
-
 
573
	procinfo process_information
626
i_end:
574
	sc system_colors 
627
	rb 2048
575
	rb 2048
628
stacktop:
576
stacktop:
629
	sys_path rb 1024
577
	sys_path rb 1024
630
	file_name:
-
 
631
		rb 1024 ;4096 
578
	file_name rb 1024 ;4096 
632
	library_path rb 1024
579
	library_path rb 1024
633
	plugin_path rb 4096
580
	plugin_path rb 4096
634
	openfile_path rb 4096
581
	openfile_path rb 4096
635
	filename_area rb 256
582
	filename_area rb 256
636
mem:
583
mem: