Subversion Repositories Kolibri OS

Rev

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

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