Rev 7508 | Rev 7663 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7508 | Rev 7662 | ||
---|---|---|---|
1 | use32 |
1 | use32 |
2 | org 0 |
2 | org 0 |
3 | db 'MENUET01' |
3 | db 'MENUET01' |
4 | dd 1,start,i_end,mem,stacktop,0,sys_path |
4 | dd 1,start,i_end,mem,stacktop,file_name,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 '../../develop/libraries/libs-dev/libimg/libimg.inc' |
10 | include '../../develop/libraries/libs-dev/libimg/libimg.inc' |
11 | include '../../develop/libraries/box_lib/trunk/box_lib.mac' |
11 | include '../../develop/libraries/box_lib/trunk/box_lib.mac' |
12 | include 'lang.inc' |
12 | include 'lang.inc' |
13 | include 'cnc_editor.inc' |
13 | include 'cnc_editor.inc' |
14 | include '../../develop/info3ds/info_fun_float.inc' |
14 | include '../../develop/info3ds/info_fun_float.inc' |
15 | 15 | ||
16 | @use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load |
16 | @use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load |
17 | caption db 'CNC editor 30.10.18',0 ;¯®¤¯¨áì ®ª |
17 | caption db 'CNC editor 22.05.19',0 ;¯®¤¯¨áì ®ª |
18 | 18 | ||
19 | run_file_70 FileInfoBlock |
19 | run_file_70 FileInfoBlock |
20 | 20 | ||
21 | offs_last_timer dd 0 ;¯®á«¥¤¨© ᤢ¨£ ¯®ª § ë© ¢ äãªæ¨¨ â ©¬¥à |
21 | offs_last_timer dd 0 ;¯®á«¥¤¨© ᤢ¨£ ¯®ª § ë© ¢ äãªæ¨¨ â ©¬¥à |
22 | 22 | ||
23 | IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3 |
23 | IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3 |
24 | image_data_toolbar dd 0 ;㪠§ â¥«ì ¢à¥¬¥ãî ¯ ¬ïâì. ¤«ï 㦥 ¯à¥®¡à §®¢ ¨ï ¨§®¡à ¦¥¨ï |
24 | image_data_toolbar dd 0 ;㪠§ â¥«ì ¢à¥¬¥ãî ¯ ¬ïâì. ¤«ï 㦥 ¯à¥®¡à §®¢ ¨ï ¨§®¡à ¦¥¨ï |
25 | icon_tl_sys dd 0 ;㪠§ â¥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï á¨á⥬ëå ¨ª®®ª |
25 | icon_tl_sys dd 0 ;㪠§ â¥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï á¨á⥬ëå ¨ª®®ª |
26 | icon_toolbar dd 0 ;㪠§ â¥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï ¨ª®®ª ®¡ê¥ªâ®¢ |
26 | icon_toolbar dd 0 ;㪠§ â¥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï ¨ª®®ª ®¡ê¥ªâ®¢ |
27 | 27 | ||
28 | include 'wnd_point_coords.inc' |
28 | include 'wnd_point_coords.inc' |
29 | include 'wnd_scale.inc' |
29 | include 'wnd_scale.inc' |
30 | include 'wnd_new_file.inc' |
30 | include 'wnd_new_file.inc' |
31 | 31 | ||
32 | align 4 |
32 | align 4 |
33 | start: |
33 | start: |
- | 34 | ;--- copy cmd line --- |
|
- | 35 | mov esi,file_name |
|
- | 36 | mov edi,openfile_path |
|
- | 37 | @@: |
|
- | 38 | lodsd |
|
- | 39 | or eax,eax |
|
- | 40 | jz @f ;¢ë室, ¥á«¨ 0 |
|
- | 41 | stosd |
|
- | 42 | jmp @b |
|
- | 43 | @@: |
|
- | 44 | stosd |
|
- | 45 | ||
34 | load_libraries l_libs_start,l_libs_end |
46 | load_libraries l_libs_start,l_libs_end |
35 | ;¯à®¢¥àª ᪮«ìª® ã¤ ç® § £ã§¨« áì ¡¨¡«¨®â¥ª |
47 | ;¯à®¢¥àª ᪮«ìª® ã¤ ç® § £ã§¨« áì ¡¨¡«¨®â¥ª |
36 | mov ebp,lib_0 |
48 | mov ebp,lib_0 |
37 | cmp dword [ebp+ll_struc_size-4],0 |
49 | cmp dword [ebp+ll_struc_size-4],0 |
38 | jz @f |
50 | jz @f |
39 | mcall SF_TERMINATE_PROCESS |
51 | mcall SF_TERMINATE_PROCESS |
40 | @@: |
52 | @@: |
41 | mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors |
53 | mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors |
42 | mcall SF_SET_EVENTS_MASK,0xC0000027 |
54 | mcall SF_SET_EVENTS_MASK,0xC0000027 |
43 | stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª ¤¨ «®£ |
55 | stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª ¤¨ «®£ |
44 | 56 | ||
45 | stdcall [buf2d_create], buf_0 ;ᮧ¤ ¨¥ ¡ãä¥à |
57 | stdcall [buf2d_create], buf_0 ;ᮧ¤ ¨¥ ¡ãä¥à |
46 | 58 | ||
47 | ;èà¨äâ ¤¥« ¥¬ ¤® ᮧ¤ ¨ï ¯ ¥«¨ (¤«ï íª®®¬¨¨ 㪠§ ⥫ï image_data_toolbar) |
59 | ;èà¨äâ ¤¥« ¥¬ ¤® ᮧ¤ ¨ï ¯ ¥«¨ (¤«ï íª®®¬¨¨ 㪠§ ⥫ï image_data_toolbar) |
48 | include_image_file '..\..\fs\kfar\trunk\font6x9.bmp', image_data_toolbar, buf_1.w,buf_1.h |
60 | include_image_file '..\..\fs\kfar\trunk\font6x9.bmp', image_data_toolbar, buf_1.w,buf_1.h |
49 | stdcall [buf2d_create_f_img], buf_1,[image_data_toolbar] ;ᮧ¤ ¥¬ ¡ãä¥à |
61 | stdcall [buf2d_create_f_img], buf_1,[image_data_toolbar] ;ᮧ¤ ¥¬ ¡ãä¥à |
50 | stdcall mem.Free,[image_data_toolbar] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì |
62 | stdcall mem.Free,[image_data_toolbar] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì |
51 | stdcall [buf2d_conv_24_to_8], buf_1,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç®á⨠8 ¡¨â |
63 | stdcall [buf2d_conv_24_to_8], buf_1,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç®á⨠8 ¡¨â |
52 | stdcall [buf2d_convert_text_matrix], buf_1 |
64 | stdcall [buf2d_convert_text_matrix], buf_1 |
53 | mov eax,[buf_1.h] |
65 | mov eax,[buf_1.h] |
54 | shr eax,8 |
66 | shr eax,8 |
55 | mov [font_h],eax |
67 | mov [font_h],eax |
56 | 68 | ||
57 | include_image_file 'toolbar.png', image_data_toolbar |
69 | include_image_file 'toolbar.png', image_data_toolbar |
58 | 70 | ||
59 | mov dword[w_scr_t1.type],1 |
71 | mov dword[w_scr_t1.type],1 |
60 | stdcall dword[tl_data_init], tree1 |
72 | stdcall dword[tl_data_init], tree1 |
61 | ;á¨áâ¥¬ë¥ ¨ª®ª¨ 16*16 ¤«ï tree_list |
73 | ;á¨áâ¥¬ë¥ ¨ª®ª¨ 16*16 ¤«ï tree_list |
62 | include_image_file 'tl_sys_16.png', icon_tl_sys |
74 | include_image_file 'tl_sys_16.png', icon_tl_sys |
63 | mov eax,dword[icon_tl_sys] |
75 | mov eax,dword[icon_tl_sys] |
64 | mov dword[tree1.data_img_sys],eax |
76 | mov dword[tree1.data_img_sys],eax |
65 | 77 | ||
66 | include_image_file 'objects.png', icon_toolbar |
78 | include_image_file 'objects.png', icon_toolbar |
67 | mov eax,dword[icon_toolbar] |
79 | mov eax,dword[icon_toolbar] |
68 | mov dword[tree1.data_img],eax |
80 | mov dword[tree1.data_img],eax |
69 | 81 | ||
70 | ;*** ãáâ ®¢ª ¢à¥¬¥¨ ¤«ï â ©¬¥à |
82 | ;*** ãáâ ®¢ª ¢à¥¬¥¨ ¤«ï â ©¬¥à |
71 | mcall SF_SYSTEM_GET,SSF_TIME_COUNT |
83 | mcall SF_SYSTEM_GET,SSF_TIME_COUNT |
72 | mov [last_time],eax |
84 | mov [last_time],eax |
- | 85 | ||
- | 86 | ;open file from cmd line |
|
- | 87 | cmp dword[openfile_path],0 |
|
73 | 88 | je @f |
|
- | 89 | call but_open_file.no_dlg |
|
74 | ;call but_new_file |
90 | @@: |
75 | 91 | ||
76 | align 4 |
92 | align 4 |
77 | red_win: |
93 | red_win: |
78 | call draw_window |
94 | call draw_window |
79 | 95 | ||
80 | align 4 |
96 | align 4 |
81 | still: |
97 | still: |
82 | mcall SF_SYSTEM_GET,SSF_TIME_COUNT |
98 | mcall SF_SYSTEM_GET,SSF_TIME_COUNT |
83 | mov ebx,[last_time] |
99 | mov ebx,[last_time] |
84 | add ebx,10 ;§ ¤¥à¦ª |
100 | add ebx,10 ;§ ¤¥à¦ª |
85 | cmp ebx,eax |
101 | cmp ebx,eax |
86 | jge @f |
102 | jge @f |
87 | mov ebx,eax |
103 | mov ebx,eax |
88 | @@: |
104 | @@: |
89 | sub ebx,eax |
105 | sub ebx,eax |
90 | mcall SF_WAIT_EVENT_TIMEOUT |
106 | mcall SF_WAIT_EVENT_TIMEOUT |
91 | cmp eax,0 |
107 | cmp eax,0 |
92 | jne @f |
108 | jne @f |
93 | call timer_funct |
109 | call timer_funct |
94 | jmp still |
110 | jmp still |
95 | @@: |
111 | @@: |
96 | 112 | ||
97 | cmp al,1 |
113 | cmp al,1 |
98 | jz red_win |
114 | jz red_win |
99 | cmp al,2 |
115 | cmp al,2 |
100 | jz key |
116 | jz key |
101 | cmp al,3 |
117 | cmp al,3 |
102 | jz button |
118 | jz button |
103 | cmp al,6 |
119 | cmp al,6 |
104 | jne @f |
120 | jne @f |
105 | mcall SF_THREAD_INFO,procinfo,-1 |
121 | mcall SF_THREAD_INFO,procinfo,-1 |
106 | cmp ax,word[procinfo.window_stack_position] |
122 | cmp ax,word[procinfo.window_stack_position] |
107 | jne @f ;®ª® ¥ ªâ¨¢® |
123 | jne @f ;®ª® ¥ ªâ¨¢® |
108 | call mouse |
124 | call mouse |
109 | @@: |
125 | @@: |
110 | jmp still |
126 | jmp still |
111 | 127 | ||
112 | align 4 |
128 | align 4 |
113 | mouse: |
129 | mouse: |
114 | push eax ebx ecx |
130 | push eax ebx ecx |
115 | mcall SF_MOUSE_GET,SSF_BUTTON_EXT |
131 | mcall SF_MOUSE_GET,SSF_BUTTON_EXT |
116 | bt eax,8 |
132 | bt eax,8 |
117 | jnc @f |
133 | jnc @f |
118 | ;mouse l. but. press |
134 | ;mouse l. but. press |
119 | call mouse_left_d |
135 | call mouse_left_d |
120 | jmp .end_l |
136 | jmp .end_l |
121 | @@: |
137 | @@: |
122 | ;bt eax,0 |
138 | ;bt eax,0 |
123 | ;jnc @f |
139 | ;jnc @f |
124 | ;mouse l. but. move |
140 | ;mouse l. but. move |
125 | ;call mouse_left_m |
141 | ;call mouse_left_m |
126 | ;jmp .end_l |
142 | ;jmp .end_l |
127 | ;@@: |
143 | ;@@: |
128 | bt eax,16 |
144 | bt eax,16 |
129 | jnc .end_l |
145 | jnc .end_l |
130 | ;mouse l. but. up |
146 | ;mouse l. but. up |
131 | call mouse_left_u |
147 | call mouse_left_u |
132 | ;jmp .end_l |
148 | ;jmp .end_l |
133 | .end_l: |
149 | .end_l: |
134 | bt eax,9 |
150 | bt eax,9 |
135 | jnc @f |
151 | jnc @f |
136 | ;mouse r. but. press |
152 | ;mouse r. but. press |
137 | call mouse_right_d |
153 | call mouse_right_d |
138 | ;jmp .end_r |
154 | ;jmp .end_r |
139 | @@: |
155 | @@: |
140 | ;bt eax,1 |
156 | ;bt eax,1 |
141 | ;jnc @f |
157 | ;jnc @f |
142 | ;mouse r. but. move |
158 | ;mouse r. but. move |
143 | ;call mouse_right_m |
159 | ;call mouse_right_m |
144 | ;jmp .end_r |
160 | ;jmp .end_r |
145 | ;@@: |
161 | ;@@: |
146 | ;.end_r: |
162 | ;.end_r: |
147 | 163 | ||
148 | call buf_get_mouse_coord |
164 | call buf_get_mouse_coord |
149 | cmp eax,-1 |
165 | cmp eax,-1 |
150 | je .end0 |
166 | je .end0 |
151 | shl eax,1 |
167 | shl eax,1 |
152 | sub eax,[buf_0.w] |
168 | sub eax,[buf_0.w] |
153 | sar eax,1 |
169 | sar eax,1 |
154 | mov [mouse_prop_x],eax |
170 | mov [mouse_prop_x],eax |
155 | stdcall [tl_node_get_data],tree1 |
171 | stdcall [tl_node_get_data],tree1 |
156 | or eax,eax |
172 | or eax,eax |
157 | jz .end0 |
173 | jz .end0 |
158 | cmp [eax+Figure.OType],'Fig' |
174 | cmp [eax+Figure.OType],'Fig' |
159 | je @f |
175 | je @f |
160 | cmp [eax+Figure.OType],'Obj' |
176 | cmp [eax+Figure.OType],'Obj' |
161 | je .end1 |
177 | je .end1 |
162 | jmp .end0 |
178 | jmp .end0 |
163 | .end1: |
179 | .end1: |
164 | mov eax,ObjData |
180 | mov eax,ObjData |
165 | @@: |
181 | @@: |
166 | mov ecx,eax |
182 | mov ecx,eax |
167 | shl ebx,1 |
183 | shl ebx,1 |
168 | sub ebx,[buf_0.h] |
184 | sub ebx,[buf_0.h] |
169 | sar ebx,1 |
185 | sar ebx,1 |
170 | mov [mouse_prop_y],ebx |
186 | mov [mouse_prop_y],ebx |
171 | 187 | ||
172 | mcall SF_MOUSE_GET,SSF_SCROLL_DATA |
188 | mcall SF_MOUSE_GET,SSF_SCROLL_DATA |
173 | test ax,ax |
189 | test ax,ax |
174 | jz .end0 |
190 | jz .end0 |
175 | finit |
191 | finit |
176 | fld qword[zoom_plus] |
192 | fld qword[zoom_plus] |
177 | fld1 |
193 | fld1 |
178 | fsubp |
194 | fsubp |
179 | fld st0 ;for Y coord |
195 | fld st0 ;for Y coord |
180 | 196 | ||
181 | ;for X coord |
197 | ;for X coord |
182 | fild dword[mouse_prop_x] |
198 | fild dword[mouse_prop_x] |
183 | fmulp st1,st0 |
199 | fmulp st1,st0 |
184 | 200 | ||
185 | mov ebx,eax |
201 | mov ebx,eax |
186 | test ax,0x8000 |
202 | test ax,0x8000 |
187 | jnz .decr |
203 | jnz .decr |
188 | ;㢥«¨ç¥¨¥ ¬ áèâ ¡ |
204 | ;㢥«¨ç¥¨¥ ¬ áèâ ¡ |
189 | fchs |
205 | fchs |
190 | fild dword[ecx+Figure.MCentrX] ;add old value |
206 | fild dword[ecx+Figure.MCentrX] ;add old value |
191 | fmul qword[zoom_plus] |
207 | fmul qword[zoom_plus] |
192 | faddp |
208 | faddp |
193 | 209 | ||
194 | fld qword[ecx+Figure.MScale] |
210 | fld qword[ecx+Figure.MScale] |
195 | fmul qword[zoom_plus] |
211 | fmul qword[zoom_plus] |
196 | ;if (Figure.MScale>16.0) |
212 | ;if (Figure.MScale>16.0) |
197 | ;... |
213 | ;... |
198 | jmp @f |
214 | jmp @f |
199 | .decr: |
215 | .decr: |
200 | ;㬥ì襨¥ ¬ áèâ ¡ |
216 | ;㬥ì襨¥ ¬ áèâ ¡ |
201 | fild dword[ecx+Figure.MCentrX] ;add old value |
217 | fild dword[ecx+Figure.MCentrX] ;add old value |
202 | fdiv qword[zoom_plus] |
218 | fdiv qword[zoom_plus] |
203 | faddp |
219 | faddp |
204 | 220 | ||
205 | fld qword[ecx+Figure.MScale] |
221 | fld qword[ecx+Figure.MScale] |
206 | fdiv qword[zoom_plus] |
222 | fdiv qword[zoom_plus] |
207 | fld1 |
223 | fld1 |
208 | fcomp |
224 | fcomp |
209 | fstsw ax |
225 | fstsw ax |
210 | sahf |
226 | sahf |
211 | jbe @f |
227 | jbe @f |
212 | ;if (Figure.MScale<1.0) |
228 | ;if (Figure.MScale<1.0) |
213 | ffree st0 |
229 | ffree st0 |
214 | fincstp |
230 | fincstp |
215 | ffree st0 |
231 | ffree st0 |
216 | fincstp |
232 | fincstp |
217 | fldz ;default Figure.MCentrX |
233 | fldz ;default Figure.MCentrX |
218 | fld1 ;default Figure.MScale |
234 | fld1 ;default Figure.MScale |
219 | mov dword[ecx+Figure.MCentrY],0 |
235 | mov dword[ecx+Figure.MCentrY],0 |
220 | @@: |
236 | @@: |
221 | fstp qword[ecx+Figure.MScale] |
237 | fstp qword[ecx+Figure.MScale] |
222 | fistp dword[ecx+Figure.MCentrX] |
238 | fistp dword[ecx+Figure.MCentrX] |
223 | 239 | ||
224 | ;for Y coord |
240 | ;for Y coord |
225 | fild dword[mouse_prop_y] |
241 | fild dword[mouse_prop_y] |
226 | fmulp st1,st0 |
242 | fmulp st1,st0 |
227 | test bx,0x8000 |
243 | test bx,0x8000 |
228 | jnz .decr_y |
244 | jnz .decr_y |
229 | ;㢥«¨ç¥¨¥ ¬ áèâ ¡ |
245 | ;㢥«¨ç¥¨¥ ¬ áèâ ¡ |
230 | fild dword[ecx+Figure.MCentrY] ;add old value |
246 | fild dword[ecx+Figure.MCentrY] ;add old value |
231 | fmul qword[zoom_plus] |
247 | fmul qword[zoom_plus] |
232 | faddp |
248 | faddp |
233 | jmp @f |
249 | jmp @f |
234 | .decr_y: |
250 | .decr_y: |
235 | ;㬥ì襨¥ ¬ áèâ ¡ |
251 | ;㬥ì襨¥ ¬ áèâ ¡ |
236 | fchs |
252 | fchs |
237 | fild dword[ecx+Figure.MCentrY] ;add old value |
253 | fild dword[ecx+Figure.MCentrY] ;add old value |
238 | fdiv qword[zoom_plus] |
254 | fdiv qword[zoom_plus] |
239 | faddp |
255 | faddp |
240 | @@: |
256 | @@: |
241 | fistp dword[ecx+Figure.MCentrY] |
257 | fistp dword[ecx+Figure.MCentrY] |
242 | 258 | ||
243 | mov dword[offs_last_timer],0 |
259 | mov dword[offs_last_timer],0 |
244 | .end0: |
260 | .end0: |
245 | 261 | ||
246 | stdcall [tl_mouse], tree1 |
262 | stdcall [tl_mouse], tree1 |
247 | pop ecx ebx eax |
263 | pop ecx ebx eax |
248 | ret |
264 | ret |
249 | 265 | ||
250 | ;output: |
266 | ;output: |
251 | ; eax - buffer coord X (¥á«¨ ªãàá®à § ¡ãä¥à®¬ -1) |
267 | ; eax - buffer coord X (¥á«¨ ªãàá®à § ¡ãä¥à®¬ -1) |
252 | ; ebx - buffer coord Y (¥á«¨ ªãàá®à § ¡ãä¥à®¬ -1) |
268 | ; ebx - buffer coord Y (¥á«¨ ªãàá®à § ¡ãä¥à®¬ -1) |
253 | align 4 |
269 | align 4 |
254 | proc buf_get_mouse_coord |
270 | proc buf_get_mouse_coord |
255 | mcall SF_MOUSE_GET,SSF_WINDOW_POSITION |
271 | mcall SF_MOUSE_GET,SSF_WINDOW_POSITION |
256 | cmp ax,word[buf_0.t] |
272 | cmp ax,word[buf_0.t] |
257 | jl .no_buf ;¥ ¯®¯ «¨ ¢ ®ª® ¡ãä¥à ¯® ®á¨ y |
273 | jl .no_buf ;¥ ¯®¯ «¨ ¢ ®ª® ¡ãä¥à ¯® ®á¨ y |
258 | mov ebx,eax |
274 | mov ebx,eax |
259 | shr ebx,16 |
275 | shr ebx,16 |
260 | cmp bx,word[buf_0.l] |
276 | cmp bx,word[buf_0.l] |
261 | jl .no_buf ;¥ ¯®¯ «¨ ¢ ®ª® ¡ãä¥à ¯® ®á¨ x |
277 | jl .no_buf ;¥ ¯®¯ «¨ ¢ ®ª® ¡ãä¥à ¯® ®á¨ x |
262 | 278 | ||
263 | and eax,0xffff ;®áâ ¢«ï¥¬ ª®®à¤¨ âã y |
279 | and eax,0xffff ;®áâ ¢«ï¥¬ ª®®à¤¨ âã y |
264 | sub ax,word[buf_0.t] |
280 | sub ax,word[buf_0.t] |
265 | cmp eax,[buf_0.h] |
281 | cmp eax,[buf_0.h] |
266 | jg .no_buf |
282 | jg .no_buf |
267 | sub bx,word[buf_0.l] |
283 | sub bx,word[buf_0.l] |
268 | cmp ebx,[buf_0.w] |
284 | cmp ebx,[buf_0.w] |
269 | jg .no_buf |
285 | jg .no_buf |
270 | xchg eax,ebx |
286 | xchg eax,ebx |
271 | jmp .end_f |
287 | jmp .end_f |
272 | .no_buf: |
288 | .no_buf: |
273 | xor eax,eax |
289 | xor eax,eax |
274 | not eax |
290 | not eax |
275 | xor ebx,ebx |
291 | xor ebx,ebx |
276 | not ebx |
292 | not ebx |
277 | .end_f: |
293 | .end_f: |
278 | ret |
294 | ret |
279 | endp |
295 | endp |
280 | 296 | ||
281 | align 4 |
297 | align 4 |
282 | proc timer_funct |
298 | proc timer_funct |
283 | pushad |
299 | pushad |
284 | mcall SF_SYSTEM_GET,SSF_TIME_COUNT |
300 | mcall SF_SYSTEM_GET,SSF_TIME_COUNT |
285 | mov [last_time],eax |
301 | mov [last_time],eax |
286 | 302 | ||
287 | ;¯à®á¬ âਢ ¥¬ ¢ë¤¥«¥ë© ¡«®ª ¤ ëå |
303 | ;¯à®á¬ âਢ ¥¬ ¢ë¤¥«¥ë© ¡«®ª ¤ ëå |
288 | stdcall [tl_node_get_data],tree1 |
304 | stdcall [tl_node_get_data],tree1 |
289 | or eax,eax |
305 | or eax,eax |
290 | jz .end_f |
306 | jz .end_f |
291 | cmp dword[offs_last_timer],eax |
307 | cmp dword[offs_last_timer],eax |
292 | je .end_f |
308 | je .end_f |
293 | ;¥á«¨ ¢ë¤¥«¥ë© ¡«®ª ¤ ëå ¥ ᮢ¯ ¤ ¥â á ¯®á«¥¤¨¬ § ¯®¬¥ë¬ |
309 | ;¥á«¨ ¢ë¤¥«¥ë© ¡«®ª ¤ ëå ¥ ᮢ¯ ¤ ¥â á ¯®á«¥¤¨¬ § ¯®¬¥ë¬ |
294 | mov dword[offs_last_timer],eax |
310 | mov dword[offs_last_timer],eax |
295 | 311 | ||
296 | stdcall get_object_data,eax |
312 | stdcall get_object_data,eax |
297 | or ecx,ecx |
313 | or ecx,ecx |
298 | jz .end_oblo |
314 | jz .end_oblo |
299 | stdcall draw_obj2d,ecx |
315 | stdcall draw_obj2d,ecx |
300 | stdcall [buf2d_draw], buf_0 |
316 | stdcall [buf2d_draw], buf_0 |
301 | jmp .end_f |
317 | jmp .end_f |
302 | .end_oblo: |
318 | .end_oblo: |
303 | 319 | ||
304 | cmp [eax+Figure.OType],'Fig' |
320 | cmp [eax+Figure.OType],'Fig' |
305 | jne .end_fblo |
321 | jne .end_fblo |
306 | stdcall draw_fig2d,eax |
322 | stdcall draw_fig2d,eax |
307 | stdcall [buf2d_draw], buf_0 |
323 | stdcall [buf2d_draw], buf_0 |
308 | jmp .end_f |
324 | jmp .end_f |
309 | .end_fblo: |
325 | .end_fblo: |
310 | 326 | ||
311 | .end_f: |
327 | .end_f: |
312 | 328 | ||
313 | popad |
329 | popad |
314 | ret |
330 | ret |
315 | endp |
331 | endp |
316 | 332 | ||
317 | align 4 |
333 | align 4 |
318 | draw_window: |
334 | draw_window: |
319 | pushad |
335 | pushad |
320 | mcall SF_REDRAW,SSF_BEGIN_DRAW |
336 | mcall SF_REDRAW,SSF_BEGIN_DRAW |
321 | 337 | ||
322 | ; *** à¨á®¢ ¨¥ £« ¢®£® ®ª (¢ë¯®«ï¥âáï 1 à § ¯à¨ § ¯ã᪥) *** |
338 | ; *** à¨á®¢ ¨¥ £« ¢®£® ®ª (¢ë¯®«ï¥âáï 1 à § ¯à¨ § ¯ã᪥) *** |
323 | mov edx,[sc.work] |
339 | mov edx,[sc.work] |
324 | or edx,0x33000000 |
340 | or edx,0x33000000 |
325 | mov edi,caption |
341 | mov edi,caption |
326 | mcall SF_CREATE_WINDOW,(20 shl 16)+599,(20 shl 16)+415 |
342 | mcall SF_CREATE_WINDOW,(20 shl 16)+599,(20 shl 16)+415 |
327 | 343 | ||
328 | mcall SF_THREAD_INFO,procinfo,-1 |
344 | mcall SF_THREAD_INFO,procinfo,-1 |
329 | mov eax,dword[procinfo.box.height] |
345 | mov eax,dword[procinfo.box.height] |
330 | cmp eax,120 |
346 | cmp eax,120 |
331 | jge @f |
347 | jge @f |
332 | mov eax,120 ;min size |
348 | mov eax,120 ;min size |
333 | @@: |
349 | @@: |
334 | sub eax,65 |
350 | sub eax,65 |
335 | mov dword[tree1.box_height],eax |
351 | mov dword[tree1.box_height],eax |
336 | mov word[w_scr_t1.y_size],ax ;®¢ë¥ à §¬¥àë áªà®««¨£ |
352 | mov word[w_scr_t1.y_size],ax ;®¢ë¥ à §¬¥àë áªà®««¨£ |
337 | mov ebx,dword[procinfo.box.width] |
353 | mov ebx,dword[procinfo.box.width] |
338 | cmp ebx,270 |
354 | cmp ebx,270 |
339 | jge @f |
355 | jge @f |
340 | mov ebx,270 |
356 | mov ebx,270 |
341 | @@: |
357 | @@: |
342 | sub ebx,215 |
358 | sub ebx,215 |
343 | cmp eax,dword[buf_0.h] ;ᬮâਬ à §¬¥à ¡ãä¥à |
359 | cmp eax,dword[buf_0.h] ;ᬮâਬ à §¬¥à ¡ãä¥à |
344 | jne @f |
360 | jne @f |
345 | cmp ebx,dword[buf_0.w] |
361 | cmp ebx,dword[buf_0.w] |
346 | jne @f |
362 | jne @f |
347 | jmp .end0 |
363 | jmp .end0 |
348 | @@: |
364 | @@: |
349 | stdcall [buf2d_resize],buf_0,ebx,eax,1 |
365 | stdcall [buf2d_resize],buf_0,ebx,eax,1 |
350 | mov eax,ObjData |
366 | mov eax,ObjData |
351 | mov ecx,[eax+Object.FigCount] |
367 | mov ecx,[eax+Object.FigCount] |
352 | or ecx,ecx |
368 | or ecx,ecx |
353 | jz .end0 |
369 | jz .end0 |
354 | mov eax,[eax+Object.FigData] |
370 | mov eax,[eax+Object.FigData] |
355 | xor edx,edx |
371 | xor edx,edx |
356 | .cycle0: |
372 | .cycle0: |
357 | stdcall FigCalculateSizes,[eax+4*edx],0 |
373 | stdcall FigCalculateSizes,[eax+4*edx],0 |
358 | inc edx |
374 | inc edx |
359 | loop .cycle0 |
375 | loop .cycle0 |
360 | stdcall ObjCalculateScale,ObjData |
376 | stdcall ObjCalculateScale,ObjData |
361 | mov dword[offs_last_timer],0 |
377 | mov dword[offs_last_timer],0 |
362 | call timer_funct |
378 | call timer_funct |
363 | .end0: |
379 | .end0: |
364 | 380 | ||
365 | ; *** ᮧ¤ ¨¥ ª®¯®ª ¯ ¥«ì *** |
381 | ; *** ᮧ¤ ¨¥ ª®¯®ª ¯ ¥«ì *** |
366 | mcall SF_DEFINE_BUTTON,(5 shl 16)+20,(5 shl 16)+20,3, [sc.work_button] |
382 | mcall SF_DEFINE_BUTTON,(5 shl 16)+20,(5 shl 16)+20,3, [sc.work_button] |
367 | 383 | ||
368 | add ebx,25 shl 16 |
384 | add ebx,25 shl 16 |
369 | mcall ,,,4 ;open |
385 | mcall ,,,4 ;open |
370 | add ebx,25 shl 16 |
386 | add ebx,25 shl 16 |
371 | mcall ,,,5 ;save |
387 | mcall ,,,5 ;save |
372 | 388 | ||
373 | add ebx,30 shl 16 |
389 | add ebx,30 shl 16 |
374 | mcall ,,,6 ;captions on off |
390 | mcall ,,,6 ;captions on off |
375 | 391 | ||
376 | add ebx,25 shl 16 |
392 | add ebx,25 shl 16 |
377 | mcall ,,,7 ;figure move up |
393 | mcall ,,,7 ;figure move up |
378 | add ebx,25 shl 16 |
394 | add ebx,25 shl 16 |
379 | mcall ,,,8 ;figure move down |
395 | mcall ,,,8 ;figure move down |
380 | 396 | ||
381 | add ebx,25 shl 16 |
397 | add ebx,25 shl 16 |
382 | mcall ,,,9 ;sel points dlg |
398 | mcall ,,,9 ;sel points dlg |
383 | 399 | ||
384 | add ebx,25 shl 16 |
400 | add ebx,25 shl 16 |
385 | mcall ,,,10 ;sel points move up |
401 | mcall ,,,10 ;sel points move up |
386 | add ebx,25 shl 16 |
402 | add ebx,25 shl 16 |
387 | mcall ,,,11 ;sel points move down |
403 | mcall ,,,11 ;sel points move down |
388 | 404 | ||
389 | add ebx,25 shl 16 |
405 | add ebx,25 shl 16 |
390 | mcall ,,,12 ;align sel points left |
406 | mcall ,,,12 ;align sel points left |
391 | add ebx,25 shl 16 |
407 | add ebx,25 shl 16 |
392 | mcall ,,,13 ;align sel points right |
408 | mcall ,,,13 ;align sel points right |
393 | add ebx,25 shl 16 |
409 | add ebx,25 shl 16 |
394 | mcall ,,,14 ;align sel points top |
410 | mcall ,,,14 ;align sel points top |
395 | add ebx,25 shl 16 |
411 | add ebx,25 shl 16 |
396 | mcall ,,,15 ;align sel points bottom |
412 | mcall ,,,15 ;align sel points bottom |
397 | 413 | ||
398 | add ebx,25 shl 16 |
414 | add ebx,25 shl 16 |
399 | mcall ,,,16 ;copy to clipboard |
415 | mcall ,,,16 ;copy to clipboard |
400 | add ebx,25 shl 16 |
416 | add ebx,25 shl 16 |
401 | mcall ,,,17 ;paste from clipboard |
417 | mcall ,,,17 ;paste from clipboard |
402 | 418 | ||
403 | add ebx,25 shl 16 |
419 | add ebx,25 shl 16 |
404 | mcall ,,,18 ;sel points del |
420 | mcall ,,,18 ;sel points del |
405 | 421 | ||
406 | add ebx,30 shl 16 |
422 | add ebx,30 shl 16 |
407 | mcall ,,,19 ;restore zoom |
423 | mcall ,,,19 ;restore zoom |
408 | 424 | ||
409 | add ebx,30 shl 16 |
425 | add ebx,30 shl 16 |
410 | mcall ,,,20 ;.png |
426 | mcall ,,,20 ;.png |
411 | 427 | ||
412 | add ebx,25 shl 16 |
428 | add ebx,25 shl 16 |
413 | mcall ,,,21 ;options scale |
429 | mcall ,,,21 ;options scale |
414 | 430 | ||
415 | ; *** à¨á®¢ ¨¥ ¨ª®®ª ª®¯ª å *** |
431 | ; *** à¨á®¢ ¨¥ ¨ª®®ª ª®¯ª å *** |
416 | mcall SF_PUT_IMAGE,[image_data_toolbar],(16 shl 16)+16,(7 shl 16)+7 ;icon new |
432 | mcall SF_PUT_IMAGE,[image_data_toolbar],(16 shl 16)+16,(7 shl 16)+7 ;icon new |
417 | 433 | ||
418 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
434 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
419 | add edx,(25 shl 16) ;icon open |
435 | add edx,(25 shl 16) ;icon open |
420 | int 0x40 |
436 | int 0x40 |
421 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
437 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
422 | add edx,(25 shl 16) ;icon save |
438 | add edx,(25 shl 16) ;icon save |
423 | int 0x40 |
439 | int 0x40 |
424 | 440 | ||
425 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
441 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
426 | add edx,(30 shl 16) ;captions on off |
442 | add edx,(30 shl 16) ;captions on off |
427 | int 0x40 |
443 | int 0x40 |
428 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
444 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
429 | add edx,(25 shl 16) ;figure move up |
445 | add edx,(25 shl 16) ;figure move up |
430 | int 0x40 |
446 | int 0x40 |
431 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
447 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
432 | add edx,(25 shl 16) ;figure move down |
448 | add edx,(25 shl 16) ;figure move down |
433 | int 0x40 |
449 | int 0x40 |
434 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
450 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
435 | add edx,(25 shl 16) ;sel points dlg |
451 | add edx,(25 shl 16) ;sel points dlg |
436 | int 0x40 |
452 | int 0x40 |
437 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
453 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
438 | add edx,(25 shl 16) ;sel points move up |
454 | add edx,(25 shl 16) ;sel points move up |
439 | int 0x40 |
455 | int 0x40 |
440 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
456 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
441 | add edx,(25 shl 16) ;sel points move down |
457 | add edx,(25 shl 16) ;sel points move down |
442 | int 0x40 |
458 | int 0x40 |
443 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
459 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
444 | add edx,(25 shl 16) ;aling sel points left |
460 | add edx,(25 shl 16) ;aling sel points left |
445 | int 0x40 |
461 | int 0x40 |
446 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
462 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
447 | add edx,(25 shl 16) ;aling sel points right |
463 | add edx,(25 shl 16) ;aling sel points right |
448 | int 0x40 |
464 | int 0x40 |
449 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
465 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
450 | add edx,(25 shl 16) ;aling sel points top |
466 | add edx,(25 shl 16) ;aling sel points top |
451 | int 0x40 |
467 | int 0x40 |
452 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
468 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
453 | add edx,(25 shl 16) ;aling sel points bottom |
469 | add edx,(25 shl 16) ;aling sel points bottom |
454 | int 0x40 |
470 | int 0x40 |
455 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
471 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
456 | add edx,(25 shl 16) ;copy to clipboard |
472 | add edx,(25 shl 16) ;copy to clipboard |
457 | int 0x40 |
473 | int 0x40 |
458 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
474 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
459 | add edx,(25 shl 16) ;paste from clipboard |
475 | add edx,(25 shl 16) ;paste from clipboard |
460 | int 0x40 |
476 | int 0x40 |
461 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
477 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
462 | add edx,(25 shl 16) ;sel points del |
478 | add edx,(25 shl 16) ;sel points del |
463 | int 0x40 |
479 | int 0x40 |
464 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
480 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
465 | add edx,(30 shl 16) ;restore zoom |
481 | add edx,(30 shl 16) ;restore zoom |
466 | int 0x40 |
482 | int 0x40 |
467 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
483 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
468 | add edx,(30 shl 16) ;.png |
484 | add edx,(30 shl 16) ;.png |
469 | int 0x40 |
485 | int 0x40 |
470 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
486 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
471 | add edx,(25 shl 16) ;options scale |
487 | add edx,(25 shl 16) ;options scale |
472 | int 0x40 |
488 | int 0x40 |
473 | 489 | ||
474 | mov dword[w_scr_t1.all_redraw],1 |
490 | mov dword[w_scr_t1.all_redraw],1 |
475 | stdcall [tl_draw], tree1 |
491 | stdcall [tl_draw], tree1 |
476 | stdcall [buf2d_draw], buf_0 |
492 | stdcall [buf2d_draw], buf_0 |
477 | 493 | ||
478 | mcall SF_REDRAW,SSF_END_DRAW |
494 | mcall SF_REDRAW,SSF_END_DRAW |
479 | popad |
495 | popad |
480 | ret |
496 | ret |
481 | 497 | ||
482 | align 4 |
498 | align 4 |
483 | key: |
499 | key: |
484 | mcall SF_GET_KEY |
500 | mcall SF_GET_KEY |
485 | cmp dword[el_focus], tree1 |
501 | cmp dword[el_focus], tree1 |
486 | jne @f |
502 | jne @f |
487 | stdcall [tl_key], tree1 |
503 | stdcall [tl_key], tree1 |
488 | jmp .end0 |
504 | jmp .end0 |
489 | @@: |
505 | @@: |
490 | 506 | ||
491 | cmp ah,178 ;Up |
507 | cmp ah,178 ;Up |
492 | jne @f |
508 | jne @f |
493 | call but_selection_move_up |
509 | call but_selection_move_up |
494 | jmp .end0 |
510 | jmp .end0 |
495 | @@: |
511 | @@: |
496 | cmp ah,177 ;Down |
512 | cmp ah,177 ;Down |
497 | jne @f |
513 | jne @f |
498 | call but_selection_move_down |
514 | call but_selection_move_down |
499 | jmp .end0 |
515 | jmp .end0 |
500 | @@: |
516 | @@: |
501 | cmp ah,176 ;Left |
517 | cmp ah,176 ;Left |
502 | jne @f |
518 | jne @f |
503 | call but_selection_move_up |
519 | call but_selection_move_up |
504 | jmp .end0 |
520 | jmp .end0 |
505 | @@: |
521 | @@: |
506 | cmp ah,179 ;Right |
522 | cmp ah,179 ;Right |
507 | jne @f |
523 | jne @f |
508 | call but_selection_move_down |
524 | call but_selection_move_down |
509 | jmp .end0 |
525 | jmp .end0 |
510 | @@: |
526 | @@: |
511 | cmp ah,182 ;Delete |
527 | cmp ah,182 ;Delete |
512 | jne @f |
528 | jne @f |
513 | call but_sel_points_del |
529 | call but_sel_points_del |
514 | jmp .end0 |
530 | jmp .end0 |
515 | @@: |
531 | @@: |
516 | 532 | ||
517 | mov ecx,eax |
533 | mov ecx,eax |
518 | mcall SF_KEYBOARD,SSF_GET_CONTROL_KEYS |
534 | mcall SF_KEYBOARD,SSF_GET_CONTROL_KEYS |
519 | bt eax,2 ;left Ctrl |
535 | bt eax,2 ;left Ctrl |
520 | jc .key_Ctrl |
536 | jc .key_Ctrl |
521 | bt eax,3 ;right Ctrl |
537 | bt eax,3 ;right Ctrl |
522 | jc .key_Ctrl |
538 | jc .key_Ctrl |
523 | jmp .end0 |
539 | jmp .end0 |
524 | .key_Ctrl: |
540 | .key_Ctrl: |
525 | cmp ch,15 ;111 ;Ctrl+O |
541 | cmp ch,15 ;111 ;Ctrl+O |
526 | jne @f |
542 | jne @f |
527 | call but_open_file |
543 | call but_open_file |
528 | @@: |
544 | @@: |
529 | cmp ch,19 ;115 ;Ctrl+S |
545 | cmp ch,19 ;115 ;Ctrl+S |
530 | jne @f |
546 | jne @f |
531 | call but_save_file |
547 | call but_save_file |
532 | @@: |
548 | @@: |
533 | cmp ch,14 ;110 ;Ctrl+N |
549 | cmp ch,14 ;110 ;Ctrl+N |
534 | jne @f |
550 | jne @f |
535 | call but_new_file |
551 | call but_new_file |
536 | @@: |
552 | @@: |
537 | cmp ch,1 ;97 ;Ctrl+A |
553 | cmp ch,1 ;97 ;Ctrl+A |
538 | jne @f |
554 | jne @f |
539 | call but_sel_points_all |
555 | call but_sel_points_all |
540 | @@: |
556 | @@: |
541 | .end0: |
557 | .end0: |
542 | jmp still |
558 | jmp still |
543 | 559 | ||
544 | 560 | ||
545 | align 4 |
561 | align 4 |
546 | button: |
562 | button: |
547 | mcall SF_GET_BUTTON |
563 | mcall SF_GET_BUTTON |
548 | cmp ah,3 |
564 | cmp ah,3 |
549 | jne @f |
565 | jne @f |
550 | call but_new_file |
566 | call but_new_file |
551 | jmp still |
567 | jmp still |
552 | @@: |
568 | @@: |
553 | cmp ah,4 |
569 | cmp ah,4 |
554 | jne @f |
570 | jne @f |
555 | call but_open_file |
571 | call but_open_file |
556 | jmp still |
572 | jmp still |
557 | @@: |
573 | @@: |
558 | cmp ah,5 |
574 | cmp ah,5 |
559 | jne @f |
575 | jne @f |
560 | call but_save_file |
576 | call but_save_file |
561 | jmp still |
577 | jmp still |
562 | @@: |
578 | @@: |
563 | cmp ah,6 |
579 | cmp ah,6 |
564 | jne @f |
580 | jne @f |
565 | call but_captions_on_off |
581 | call but_captions_on_off |
566 | jmp still |
582 | jmp still |
567 | @@: |
583 | @@: |
568 | cmp ah,7 |
584 | cmp ah,7 |
569 | jne @f |
585 | jne @f |
570 | call but_sel_figure_move_up |
586 | call but_sel_figure_move_up |
571 | jmp still |
587 | jmp still |
572 | @@: |
588 | @@: |
573 | cmp ah,8 |
589 | cmp ah,8 |
574 | jne @f |
590 | jne @f |
575 | call but_sel_figure_move_down |
591 | call but_sel_figure_move_down |
576 | jmp still |
592 | jmp still |
577 | @@: |
593 | @@: |
578 | cmp ah,9 |
594 | cmp ah,9 |
579 | jne @f |
595 | jne @f |
580 | call but_dlg_point_coords |
596 | call but_dlg_point_coords |
581 | jmp still |
597 | jmp still |
582 | @@: |
598 | @@: |
583 | cmp ah,10 |
599 | cmp ah,10 |
584 | jne @f |
600 | jne @f |
585 | call but_sel_points_move_up |
601 | call but_sel_points_move_up |
586 | jmp still |
602 | jmp still |
587 | @@: |
603 | @@: |
588 | cmp ah,11 |
604 | cmp ah,11 |
589 | jne @f |
605 | jne @f |
590 | call but_sel_points_move_down |
606 | call but_sel_points_move_down |
591 | jmp still |
607 | jmp still |
592 | @@: |
608 | @@: |
593 | cmp ah,12 |
609 | cmp ah,12 |
594 | jne @f |
610 | jne @f |
595 | call but_sel_points_align_coord_xmin |
611 | call but_sel_points_align_coord_xmin |
596 | jmp still |
612 | jmp still |
597 | @@: |
613 | @@: |
598 | cmp ah,13 |
614 | cmp ah,13 |
599 | jne @f |
615 | jne @f |
600 | call but_sel_points_align_coord_xmax |
616 | call but_sel_points_align_coord_xmax |
601 | jmp still |
617 | jmp still |
602 | @@: |
618 | @@: |
603 | cmp ah,14 |
619 | cmp ah,14 |
604 | jne @f |
620 | jne @f |
605 | call but_sel_points_align_coord_ymax |
621 | call but_sel_points_align_coord_ymax |
606 | jmp still |
622 | jmp still |
607 | @@: |
623 | @@: |
608 | cmp ah,15 |
624 | cmp ah,15 |
609 | jne @f |
625 | jne @f |
610 | call but_sel_points_align_coord_ymin |
626 | call but_sel_points_align_coord_ymin |
611 | @@: |
627 | @@: |
612 | cmp ah,16 |
628 | cmp ah,16 |
613 | jne @f |
629 | jne @f |
614 | call but_clipboard_copy_points |
630 | call but_clipboard_copy_points |
615 | jmp still |
631 | jmp still |
616 | @@: |
632 | @@: |
617 | cmp ah,17 |
633 | cmp ah,17 |
618 | jne @f |
634 | jne @f |
619 | call but_clipboard_paste_points |
635 | call but_clipboard_paste_points |
620 | jmp still |
636 | jmp still |
621 | @@: |
637 | @@: |
622 | cmp ah,18 |
638 | cmp ah,18 |
623 | jne @f |
639 | jne @f |
624 | call but_sel_points_del |
640 | call but_sel_points_del |
625 | jmp still |
641 | jmp still |
626 | @@: |
642 | @@: |
627 | cmp ah,19 |
643 | cmp ah,19 |
628 | jne @f |
644 | jne @f |
629 | call but_restore_zoom |
645 | call but_restore_zoom |
630 | jmp still |
646 | jmp still |
631 | @@: |
647 | @@: |
632 | cmp ah,20 |
648 | cmp ah,20 |
633 | jne @f |
649 | jne @f |
634 | call but_save_png |
650 | call but_save_png |
635 | jmp still |
651 | jmp still |
636 | @@: |
652 | @@: |
637 | cmp ah,21 |
653 | cmp ah,21 |
638 | jne @f |
654 | jne @f |
639 | call but_dlg_opt_scale |
655 | call but_dlg_opt_scale |
640 | jmp still |
656 | jmp still |
641 | @@: |
657 | @@: |
642 | 658 | ||
643 | ;cmp ah,22 |
659 | ;cmp ah,22 |
644 | ;jne @f |
660 | ;jne @f |
645 | ;call but_... |
661 | ;call but_... |
646 | ;jmp still |
662 | ;jmp still |
647 | ;@@: |
663 | ;@@: |
648 | cmp ah,1 |
664 | cmp ah,1 |
649 | jne still |
665 | jne still |
650 | .exit: |
666 | .exit: |
651 | stdcall [buf2d_delete],buf_0 |
667 | stdcall [buf2d_delete],buf_0 |
652 | stdcall mem.Free,[image_data_toolbar] |
668 | stdcall mem.Free,[image_data_toolbar] |
653 | stdcall mem.Free,[open_file_data] |
669 | stdcall mem.Free,[open_file_data] |
654 | mcall SF_TERMINATE_PROCESS |
670 | mcall SF_TERMINATE_PROCESS |
655 | 671 | ||
656 | 672 | ||
657 | align 4 |
673 | align 4 |
658 | but_new_file: |
674 | but_new_file: |
659 | cmp byte[wnd_n_file],0 |
675 | cmp byte[wnd_n_file],0 |
660 | jne .end_f |
676 | jne .end_f |
661 | pushad |
677 | pushad |
662 | mcall SF_CREATE_THREAD,1,start_n_file,thread_n_file |
678 | mcall SF_CREATE_THREAD,1,start_n_file,thread_n_file |
663 | popad |
679 | popad |
664 | .end_f: |
680 | .end_f: |
665 | ret |
681 | ret |
666 | 682 | ||
667 | align 4 |
683 | align 4 |
668 | open_file_data dd 0 ;㪠§ â¥«ì ¯ ¬ïâì ¤«ï ®âªàëâ¨ï ä ©«®¢ |
684 | open_file_data dd 0 ;㪠§ â¥«ì ¯ ¬ïâì ¤«ï ®âªàëâ¨ï ä ©«®¢ |
669 | open_file_size dd 0 ;à §¬¥à ®âªàë⮣® ä ©« |
685 | open_file_size dd 0 ;à §¬¥à ®âªàë⮣® ä ©« |
670 | 686 | ||
671 | align 4 |
687 | align 4 |
672 | but_open_file: |
688 | but_open_file: |
673 | pushad |
- | |
674 | copy_path open_dialog_name,communication_area_default_path,file_name,0 |
689 | copy_path open_dialog_name,communication_area_default_path,file_name,0 |
- | 690 | pushad |
|
675 | mov [OpenDialog_data.type],0 |
691 | mov [OpenDialog_data.type],0 |
676 | stdcall [OpenDialog_Start],OpenDialog_data |
692 | stdcall [OpenDialog_Start],OpenDialog_data |
677 | cmp [OpenDialog_data.status],2 |
693 | cmp [OpenDialog_data.status],2 |
678 | je .end_open_file |
694 | je .end_open_file |
679 | ;ª®¤ ¯à¨ 㤠箬 ®âªàë⨨ ¤¨ «®£ |
695 | ;ª®¤ ¯à¨ 㤠箬 ®âªàë⨨ ¤¨ «®£ |
- | 696 | jmp .end0 |
|
- | 697 | .no_dlg: ;¥á«¨ ¬¨ã¥¬ ¤¨ «®£ ®âªàëâ¨ï ä ©« |
|
- | 698 | pushad |
|
- | 699 | mov esi,openfile_path |
|
- | 700 | stdcall str_len,esi |
|
- | 701 | add esi,eax |
|
- | 702 | @@: ;横« ¤«ï ¯®¨áª ç « ¨¬¥¨ ä ©« |
|
- | 703 | dec esi |
|
- | 704 | cmp byte[esi],'/' |
|
- | 705 | je @f |
|
- | 706 | cmp byte[esi],0x5c ;'\' |
|
- | 707 | je @f |
|
- | 708 | cmp esi,openfile_path |
|
- | 709 | jg @b |
|
- | 710 | @@: |
|
- | 711 | inc esi |
|
- | 712 | stdcall [OpenDialog_Set_file_name],OpenDialog_data,esi ;ª®¯¨à㥬 ¨¬ï ä ©« ¢ ¤¨ «®£ á®åà ¥¨ï |
|
- | 713 | .end0: |
|
680 | 714 | ||
681 | mov [run_file_70.Function], SSF_GET_INFO |
715 | mov [run_file_70.Function], SSF_GET_INFO |
682 | mov [run_file_70.Position], 0 |
716 | mov [run_file_70.Position], 0 |
683 | mov [run_file_70.Flags], 0 |
717 | mov [run_file_70.Flags], 0 |
684 | mov dword[run_file_70.Count], 0 |
718 | mov dword[run_file_70.Count], 0 |
685 | mov dword[run_file_70.Buffer], open_b |
719 | mov dword[run_file_70.Buffer], open_b |
686 | mov byte[run_file_70+20], 0 |
720 | mov byte[run_file_70+20], 0 |
687 | mov dword[run_file_70.FileName], openfile_path |
721 | mov dword[run_file_70.FileName], openfile_path |
688 | mcall SF_FILE,run_file_70 |
722 | mcall SF_FILE,run_file_70 |
689 | 723 | ||
690 | mov ecx,dword[open_b+32] ;+32 qword: à §¬¥à ä ©« ¢ ¡ ©â å |
724 | mov ecx,dword[open_b+32] ;+32 qword: à §¬¥à ä ©« ¢ ¡ ©â å |
691 | inc ecx ;for text files |
725 | inc ecx ;for text files |
692 | stdcall mem.ReAlloc,[open_file_data],ecx |
726 | stdcall mem.ReAlloc,[open_file_data],ecx |
693 | mov [open_file_data],eax |
727 | mov [open_file_data],eax |
694 | dec ecx ;for text files |
728 | dec ecx ;for text files |
695 | mov byte[eax+ecx],0 ;for text files |
729 | mov byte[eax+ecx],0 ;for text files |
696 | 730 | ||
697 | mov [run_file_70.Function], SSF_READ_FILE |
731 | mov [run_file_70.Function], SSF_READ_FILE |
698 | mov [run_file_70.Position], 0 |
732 | mov [run_file_70.Position], 0 |
699 | mov [run_file_70.Flags], 0 |
733 | mov [run_file_70.Flags], 0 |
700 | mov dword[run_file_70.Count], ecx |
734 | mov dword[run_file_70.Count], ecx |
701 | m2m dword[run_file_70.Buffer], dword[open_file_data] |
735 | m2m dword[run_file_70.Buffer], dword[open_file_data] |
702 | mov byte[run_file_70+20], 0 |
736 | mov byte[run_file_70+20], 0 |
703 | mov dword[run_file_70.FileName], openfile_path |
737 | mov dword[run_file_70.FileName], openfile_path |
704 | mcall SF_FILE,run_file_70 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥¨ï |
738 | mcall SF_FILE,run_file_70 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥¨ï |
705 | test eax,eax |
739 | test eax,eax |
706 | jnz .end_open_file |
740 | jnz .end_open_file |
707 | cmp ebx,0xffffffff |
741 | cmp ebx,0xffffffff |
708 | je .end_open_file |
742 | je .end_open_file |
709 | 743 | ||
710 | mov [open_file_size],ebx |
744 | mov [open_file_size],ebx |
711 | mcall SF_SET_CAPTION,1,openfile_path |
745 | mcall SF_SET_CAPTION,1,openfile_path |
712 | 746 | ||
713 | ;--- |
747 | ;--- |
714 | and dword[tree1.style],not tl_cursor_pos_limited |
748 | and dword[tree1.style],not tl_cursor_pos_limited |
715 | stdcall FileInit,[open_file_data],[open_file_size] |
749 | stdcall FileInit,[open_file_data],[open_file_size] |
716 | or dword[tree1.style], tl_cursor_pos_limited |
750 | or dword[tree1.style], tl_cursor_pos_limited |
717 | stdcall [buf2d_clear], buf_0, [buf_0.color] ;ç¨á⨬ ¡ãä¥à |
751 | stdcall [buf2d_clear], buf_0, [buf_0.color] ;ç¨á⨬ ¡ãä¥à |
718 | stdcall [buf2d_draw], buf_0 ;®¡®¢«ï¥¬ ¡ãä¥à íªà ¥ |
752 | stdcall [buf2d_draw], buf_0 ;®¡®¢«ï¥¬ ¡ãä¥à íªà ¥ |
719 | .end_open_file: |
753 | .end_open_file: |
720 | popad |
754 | popad |
721 | ret |
755 | ret |
722 | 756 | ||
723 | align 4 |
757 | align 4 |
724 | proc but_save_file |
758 | proc but_save_file |
725 | locals |
759 | locals |
726 | pCou dd ? |
760 | pCou dd ? |
727 | pData dd ? |
761 | pData dd ? |
728 | endl |
762 | endl |
729 | pushad |
763 | pushad |
730 | copy_path open_dialog_name,communication_area_default_path,file_name,0 |
764 | copy_path open_dialog_name,communication_area_default_path,file_name,0 |
731 | mov [OpenDialog_data.type],1 |
765 | mov [OpenDialog_data.type],1 |
- | 766 | stdcall [OpenDialog_Set_file_ext],OpenDialog_data,Filter.1 ;.nc |
|
732 | stdcall [OpenDialog_Start],OpenDialog_data |
767 | stdcall [OpenDialog_Start],OpenDialog_data |
733 | cmp [OpenDialog_data.status],2 |
768 | cmp [OpenDialog_data.status],2 |
734 | je .end_save_file |
769 | je .end_save_file |
735 | ;ª®¤ ¯à¨ 㤠箬 ®âªàë⨨ ¤¨ «®£ |
770 | ;ª®¤ ¯à¨ 㤠箬 ®âªàë⨨ ¤¨ «®£ |
736 | 771 | ||
737 | ;*** ®¯à¥¤¥«¥¨¥ ¯à¨¬¥à®£® à §¬¥à ä ©« |
772 | ;*** ®¯à¥¤¥«¥¨¥ ¯à¨¬¥à®£® à §¬¥à ä ©« |
738 | call get_file_save_size |
773 | call get_file_save_size |
739 | stdcall mem.ReAlloc,[open_file_data],ecx |
774 | stdcall mem.ReAlloc,[open_file_data],ecx |
740 | mov [open_file_data],eax |
775 | mov [open_file_data],eax |
741 | mov [open_file_size],ecx |
776 | mov [open_file_size],ecx |
742 | 777 | ||
743 | ;clear memory |
778 | ;clear memory |
744 | mov edi,eax |
779 | mov edi,eax |
745 | xor eax,eax |
780 | xor eax,eax |
746 | shr ecx,2 |
781 | shr ecx,2 |
747 | rep stosd |
782 | rep stosd |
748 | 783 | ||
749 | ;*** ¯¨è¥¬ ¨ä®à¬ æ¨î ¢ ¯ ¬ïâì |
784 | ;*** ¯¨è¥¬ ¨ä®à¬ æ¨î ¢ ¯ ¬ïâì |
750 | mov edi,[open_file_data] |
785 | mov edi,[open_file_data] |
751 | mov ebx,ObjData |
786 | mov ebx,ObjData |
752 | mov edx,[ebx+Object.FigCount] |
787 | mov edx,[ebx+Object.FigCount] |
753 | or edx,edx |
788 | or edx,edx |
754 | jz .cycle1end |
789 | jz .cycle1end |
755 | mov esi,[ebx+Object.FigData] |
790 | mov esi,[ebx+Object.FigData] |
756 | align 4 |
791 | align 4 |
757 | .cycle1: ;横« ¯® 䨣ãà ¬ |
792 | .cycle1: ;横« ¯® 䨣ãà ¬ |
758 | ;param 1 |
793 | ;param 1 |
759 | mov eax,[esi] |
794 | mov eax,[esi] |
760 | or eax,eax |
795 | or eax,eax |
761 | jz .err_save |
796 | jz .err_save |
762 | mov eax,[eax+Figure.PoiCount] |
797 | mov eax,[eax+Figure.PoiCount] |
763 | mov [pCou],eax |
798 | mov [pCou],eax |
764 | or eax,eax |
799 | or eax,eax |
765 | jnz @f |
800 | jnz @f |
766 | mov eax,[esi] |
801 | mov eax,[esi] |
767 | lea eax,[eax+Figure.Caption] |
802 | lea eax,[eax+Figure.Caption] |
768 | stdcall str_cat,edi,eax |
803 | stdcall str_cat,edi,eax |
769 | stdcall str_len,edi |
804 | stdcall str_len,edi |
770 | add edi,eax |
805 | add edi,eax |
771 | stdcall str_cat,edi,txt_nl |
806 | stdcall str_cat,edi,txt_nl |
772 | @@: |
807 | @@: |
773 | cmp dword[pCou],0 |
808 | cmp dword[pCou],0 |
774 | je .cycle2end |
809 | je .cycle2end |
775 | mov eax,[esi] |
810 | mov eax,[esi] |
776 | mov eax,[eax+Figure.PoiData] |
811 | mov eax,[eax+Figure.PoiData] |
777 | mov [pData],eax |
812 | mov [pData],eax |
778 | mov word[NumberSymbolsAD],8 |
813 | mov word[NumberSymbolsAD],8 |
779 | align 4 |
814 | align 4 |
780 | .cycle2: ;横« ¯® â®çª ¬ |
815 | .cycle2: ;横« ¯® â®çª ¬ |
781 | stdcall str_cat,edi,txt_s_poi |
816 | stdcall str_cat,edi,txt_s_poi |
782 | ;param 1 |
817 | ;param 1 |
783 | push edi esi |
818 | push edi esi |
784 | mov esi,[pData] |
819 | mov esi,[pData] |
785 | lea esi,[esi+Point.CoordX] |
820 | lea esi,[esi+Point.CoordX] |
786 | mov edi,Data_Double |
821 | mov edi,Data_Double |
787 | movsd |
822 | movsd |
788 | movsd |
823 | movsd |
789 | pop esi edi |
824 | pop esi edi |
790 | call DoubleFloat_to_String |
825 | call DoubleFloat_to_String |
791 | call String_crop_0 |
826 | call String_crop_0 |
792 | stdcall str_cat,edi,Data_String |
827 | stdcall str_cat,edi,Data_String |
793 | stdcall str_cat,edi,txt_s_poi_Y |
828 | stdcall str_cat,edi,txt_s_poi_Y |
794 | ;param 2 |
829 | ;param 2 |
795 | push edi esi |
830 | push edi esi |
796 | mov esi,[pData] |
831 | mov esi,[pData] |
797 | lea esi,[esi+Point.CoordY] |
832 | lea esi,[esi+Point.CoordY] |
798 | mov edi,Data_Double |
833 | mov edi,Data_Double |
799 | movsd |
834 | movsd |
800 | movsd |
835 | movsd |
801 | pop esi edi |
836 | pop esi edi |
802 | call DoubleFloat_to_String |
837 | call DoubleFloat_to_String |
803 | call String_crop_0 |
838 | call String_crop_0 |
804 | stdcall str_cat,edi,Data_String |
839 | stdcall str_cat,edi,Data_String |
805 | ; |
840 | ; |
806 | stdcall str_cat,edi,txt_nl |
841 | stdcall str_cat,edi,txt_nl |
807 | add dword[pData],sizeof.Point |
842 | add dword[pData],sizeof.Point |
808 | dec dword[pCou] |
843 | dec dword[pCou] |
809 | jnz .cycle2 |
844 | jnz .cycle2 |
810 | .cycle2end: |
845 | .cycle2end: |
811 | add esi,4 |
846 | add esi,4 |
812 | dec edx |
847 | dec edx |
813 | jnz .cycle1 |
848 | jnz .cycle1 |
814 | .cycle1end: |
849 | .cycle1end: |
815 | 850 | ||
816 | jmp @f |
851 | jmp @f |
817 | .err_save: |
852 | .err_save: |
818 | notify_window_run txt_err_save_txt_file_1 |
853 | notify_window_run txt_err_save_txt_file_1 |
819 | @@: |
854 | @@: |
820 | 855 | ||
821 | ;*** ®¯à¥¤¥«¥¨¥ ¯ à ¬¥â஢ ä ©« |
856 | ;*** ®¯à¥¤¥«¥¨¥ ¯ à ¬¥â஢ ä ©« |
822 | mov edi,[open_file_data] |
857 | mov edi,[open_file_data] |
823 | stdcall str_len,edi |
858 | stdcall str_len,edi |
824 | ;;cmp eax,[open_file_size] |
859 | ;;cmp eax,[open_file_size] |
825 | mov [run_file_70.Count],eax ;à §¬¥à ä ©« |
860 | mov [run_file_70.Count],eax ;à §¬¥à ä ©« |
826 | 861 | ||
827 | ;*** á®åà 塞 ä ©« |
862 | ;*** á®åà 塞 ä ©« |
828 | mov [run_file_70.Function], SSF_CREATE_FILE |
863 | mov [run_file_70.Function], SSF_CREATE_FILE |
829 | mov [run_file_70.Position], 0 |
864 | mov [run_file_70.Position], 0 |
830 | mov [run_file_70.Flags], 0 |
865 | mov [run_file_70.Flags], 0 |
831 | mov ebx, dword[open_file_data] |
866 | mov ebx, dword[open_file_data] |
832 | mov [run_file_70.Buffer], ebx |
867 | mov [run_file_70.Buffer], ebx |
833 | mov byte[run_file_70+20], 0 |
868 | mov byte[run_file_70+20], 0 |
834 | mov dword[run_file_70.FileName], openfile_path |
869 | mov dword[run_file_70.FileName], openfile_path |
835 | mcall SF_FILE,run_file_70 |
870 | mcall SF_FILE,run_file_70 |
836 | or eax,eax |
871 | or eax,eax |
837 | jz .end_save_file |
872 | jz .end_save_file |
838 | or ebx,ebx |
873 | or ebx,ebx |
839 | jnz .end_save_file |
874 | jnz .end_save_file |
840 | ;á®®¡é¥¨¥ ® ¥ã¤ 箬 á®åà ¥¨¨ |
875 | ;á®®¡é¥¨¥ ® ¥ã¤ 箬 á®åà ¥¨¨ |
841 | notify_window_run txt_err_save_txt_file_0 |
876 | notify_window_run txt_err_save_txt_file_0 |
842 | .end_save_file: |
877 | .end_save_file: |
843 | popad |
878 | popad |
844 | ret |
879 | ret |
845 | endp |
880 | endp |
846 | 881 | ||
847 | ;output: |
882 | ;output: |
848 | ; ecx - memory size for save file |
883 | ; ecx - memory size for save file |
849 | align 4 |
884 | align 4 |
850 | proc get_file_save_size uses eax ebx edx esi |
885 | proc get_file_save_size uses eax ebx edx esi |
851 | mov ecx,100 ;title |
886 | mov ecx,100 ;title |
852 | mov ebx,ObjData |
887 | mov ebx,ObjData |
853 | add ecx,50 ;object |
888 | add ecx,50 ;object |
854 | mov edx,[ebx+Object.FigCount] |
889 | mov edx,[ebx+Object.FigCount] |
855 | or edx,edx |
890 | or edx,edx |
856 | jz .cycle1end |
891 | jz .cycle1end |
857 | mov esi,[ebx+Object.FigData] |
892 | mov esi,[ebx+Object.FigData] |
858 | align 4 |
893 | align 4 |
859 | .cycle1: ; 横« ¯® 䨣ãà ¬ |
894 | .cycle1: ; 横« ¯® 䨣ãà ¬ |
860 | add ecx,80 ;figure |
895 | add ecx,80 ;figure |
861 | mov eax,[esi] |
896 | mov eax,[esi] |
862 | or eax,eax |
897 | or eax,eax |
863 | jz @f |
898 | jz @f |
864 | mov eax,[eax+Figure.PoiCount] |
899 | mov eax,[eax+Figure.PoiCount] |
865 | imul eax,70 |
900 | imul eax,70 |
866 | add ecx,eax ;points |
901 | add ecx,eax ;points |
867 | @@: |
902 | @@: |
868 | add esi,4 |
903 | add esi,4 |
869 | dec edx |
904 | dec edx |
870 | jnz .cycle1 |
905 | jnz .cycle1 |
871 | .cycle1end: |
906 | .cycle1end: |
872 | ret |
907 | ret |
873 | endp |
908 | endp |
874 | 909 | ||
875 | align 4 |
910 | align 4 |
876 | but_captions_on_off: |
911 | but_captions_on_off: |
877 | xor dword[opt_draw],1 |
912 | xor dword[opt_draw],1 |
878 | mov dword[offs_last_timer],0 ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
913 | mov dword[offs_last_timer],0 ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
879 | ret |
914 | ret |
880 | 915 | ||
881 | align 4 |
916 | align 4 |
882 | but_sel_figure_move_up: |
917 | but_sel_figure_move_up: |
883 | pushad |
918 | pushad |
884 | stdcall [tl_node_get_data],tree1 |
919 | stdcall [tl_node_get_data],tree1 |
885 | or eax,eax |
920 | or eax,eax |
886 | jz .end_fblo |
921 | jz .end_fblo |
887 | cmp [eax+Figure.OType],'Fig' |
922 | cmp [eax+Figure.OType],'Fig' |
888 | jne .end_fblo |
923 | jne .end_fblo |
889 | stdcall found_parent_obj,eax |
924 | stdcall found_parent_obj,eax |
890 | or eax,eax |
925 | or eax,eax |
891 | jz .end_f ;if not found |
926 | jz .end_f ;if not found |
892 | or ecx,ecx |
927 | or ecx,ecx |
893 | jz .fig_is_0 ;¥á«¨ 䨣ãà ¢ ç «¥ ᯨ᪠|
928 | jz .fig_is_0 ;¥á«¨ 䨣ãà ¢ ç «¥ ᯨ᪠|
894 | mov ebx,[eax+Object.FigData] |
929 | mov ebx,[eax+Object.FigData] |
895 | mov edx,[ebx+4*ecx] ;¯¥à¥¤¢¨£ ¥¬ ï 䨣ãà |
930 | mov edx,[ebx+4*ecx] ;¯¥à¥¤¢¨£ ¥¬ ï 䨣ãà |
896 | mov edi,[ebx+4*ecx-4] |
931 | mov edi,[ebx+4*ecx-4] |
897 | ;¬¥ï¥¬ 䨣ãàë ¬¥áâ ¬¨ |
932 | ;¬¥ï¥¬ 䨣ãàë ¬¥áâ ¬¨ |
898 | mov [ebx+4*ecx],edi |
933 | mov [ebx+4*ecx],edi |
899 | mov [ebx+4*ecx-4],edx |
934 | mov [ebx+4*ecx-4],edx |
900 | ;¬¥ï¥¬ 䨣ãàë ¢ ᯨ᪥ |
935 | ;¬¥ï¥¬ 䨣ãàë ¢ ᯨ᪥ |
901 | stdcall [tl_node_move_up],tree1 |
936 | stdcall [tl_node_move_up],tree1 |
902 | jmp .end_f |
937 | jmp .end_f |
903 | .fig_is_0: |
938 | .fig_is_0: |
904 | notify_window_run txt_err_figure_is_0 |
939 | notify_window_run txt_err_figure_is_0 |
905 | jmp .end_f |
940 | jmp .end_f |
906 | .end_fblo: |
941 | .end_fblo: |
907 | notify_window_run txt_err_no_figure_select |
942 | notify_window_run txt_err_no_figure_select |
908 | .end_f: |
943 | .end_f: |
909 | popad |
944 | popad |
910 | ret |
945 | ret |
911 | 946 | ||
912 | align 4 |
947 | align 4 |
913 | but_save_png: |
948 | but_save_png: |
914 | pushad |
949 | pushad |
915 | stdcall [tl_node_get_data],tree1 |
950 | stdcall [tl_node_get_data],tree1 |
916 | or eax,eax |
951 | or eax,eax |
917 | jz .end_save_file |
952 | jz .end_save_file |
918 | 953 | ||
919 | stdcall get_object_data,eax |
954 | stdcall get_object_data,eax |
920 | or ecx,ecx |
955 | or ecx,ecx |
921 | jz .end_oblo |
956 | jz .end_oblo |
922 | stdcall draw_obj2d_png,ecx |
957 | stdcall draw_obj2d_png,ecx |
923 | jmp .beg0 |
958 | jmp .beg0 |
924 | .end_oblo: |
959 | .end_oblo: |
925 | 960 | ||
926 | ; cmp [eax+Figure.OType],'Fig' |
961 | ; cmp [eax+Figure.OType],'Fig' |
927 | ; jne .end_fblo |
962 | ; jne .end_fblo |
928 | ; stdcall draw_fig2d_png,eax |
963 | ; stdcall draw_fig2d_png,eax |
929 | ; jmp .beg0 |
964 | ; jmp .beg0 |
930 | ; .end_fblo: |
965 | ; .end_fblo: |
931 | 966 | ||
932 | jmp .end_save_file |
967 | jmp .end_save_file |
933 | .beg0: |
968 | .beg0: |
934 | copy_path open_dialog_name,communication_area_default_path,file_name,0 |
969 | copy_path open_dialog_name,communication_area_default_path,file_name,0 |
935 | mov [OpenDialog_data.type],1 |
970 | mov [OpenDialog_data.type],1 |
- | 971 | stdcall [OpenDialog_Set_file_ext],OpenDialog_data,Filter.2 ;.png |
|
936 | stdcall [OpenDialog_Start],OpenDialog_data |
972 | stdcall [OpenDialog_Start],OpenDialog_data |
937 | cmp [OpenDialog_data.status],2 |
973 | cmp [OpenDialog_data.status],1 |
938 | je .end_save_file |
974 | jne .end_save_file |
939 | ;ª®¤ ¯à¨ 㤠箬 ®âªàë⨨ ¤¨ «®£ |
975 | ;ª®¤ ¯à¨ 㤠箬 ®âªàë⨨ ¤¨ «®£ |
940 | mov dword[png_data],0 |
976 | mov dword[png_data],0 |
941 | 977 | ||
942 | ;create image struct |
978 | ;create image struct |
943 | stdcall [img_create], [buf_png.w], [buf_png.h], Image.bpp24 |
979 | stdcall [img_create], [buf_png.w], [buf_png.h], Image.bpp24 |
944 | mov ebx,eax |
980 | mov ebx,eax |
945 | test eax,eax |
981 | test eax,eax |
946 | jz @f |
982 | jz @f |
947 | ;copy foto to image buffer |
983 | ;copy foto to image buffer |
948 | mov edi,[eax+Image.Data] |
984 | mov edi,[eax+Image.Data] |
949 | mov esi,[buf_png] |
985 | mov esi,[buf_png] |
950 | mov ecx,[buf_png.w] |
986 | mov ecx,[buf_png.w] |
951 | mov edx,[buf_png.h] |
987 | mov edx,[buf_png.h] |
952 | imul ecx,edx |
988 | imul ecx,edx |
953 | imul ecx,3 |
989 | imul ecx,3 |
954 | shr ecx,2 ;OpenGL buffer align to 4 |
990 | shr ecx,2 ;OpenGL buffer align to 4 |
955 | rep movsd |
991 | rep movsd |
956 | 992 | ||
957 | ;encode image |
993 | ;encode image |
958 | stdcall [img_encode], eax, LIBIMG_FORMAT_PNG, 0 |
994 | stdcall [img_encode], eax, LIBIMG_FORMAT_PNG, 0 |
959 | test eax,eax |
995 | test eax,eax |
960 | jz @f |
996 | jz @f |
961 | mov [png_data],eax |
997 | mov [png_data],eax |
962 | mov [png_size],ecx |
998 | mov [png_size],ecx |
963 | @@: |
999 | @@: |
964 | stdcall [img_destroy],ebx |
1000 | stdcall [img_destroy],ebx |
965 | 1001 | ||
966 | ; § ¯®«ï¥¬ áâàãªâãàã ¤«ï á®åà ¥¨ï ä ©« |
1002 | ; § ¯®«ï¥¬ áâàãªâãàã ¤«ï á®åà ¥¨ï ä ©« |
967 | mov ebx,run_file_70 |
1003 | mov ebx,run_file_70 |
968 | mov dword[ebx],SSF_CREATE_FILE |
1004 | mov dword[ebx],SSF_CREATE_FILE |
969 | mov eax,[png_size] |
1005 | mov eax,[png_size] |
970 | mov [ebx+12],eax ;file size |
1006 | mov [ebx+12],eax ;file size |
971 | mov eax,[png_data] |
1007 | mov eax,[png_data] |
972 | mov [ebx+16],eax |
1008 | mov [ebx+16],eax |
973 | mov dword[ebx+FileInfoBlock.FileName], openfile_path |
1009 | mov dword[ebx+FileInfoBlock.FileName], openfile_path |
974 | 1010 | ||
975 | mcall SF_FILE,run_file_70 |
1011 | mcall SF_FILE,run_file_70 |
976 | test eax,eax |
1012 | test eax,eax |
977 | jnz .save_error |
1013 | jnz .save_error |
978 | ;notify_window_run openfile_path |
1014 | ;notify_window_run openfile_path |
979 | jmp @f |
1015 | jmp @f |
980 | .save_error: |
1016 | .save_error: |
981 | ;á®®¡é¥¨¥ ® ¥ã¤ 箬 á®åà ¥¨¨ |
1017 | ;á®®¡é¥¨¥ ® ¥ã¤ 箬 á®åà ¥¨¨ |
982 | notify_window_run txt_err_save_img_file |
1018 | notify_window_run txt_err_save_img_file |
983 | @@: |
1019 | @@: |
984 | mcall SF_SYS_MISC, SSF_MEM_FREE, [png_data] |
1020 | mcall SF_SYS_MISC, SSF_MEM_FREE, [png_data] |
985 | .end_save_file: |
1021 | .end_save_file: |
986 | popad |
1022 | popad |
987 | ret |
1023 | ret |
988 | 1024 | ||
989 | ;description: |
1025 | ;description: |
990 | ; ¢ë¤¥«¥ë¥ â®çª¨ ᤢ¨£ îâáï ¢¢¥àå |
1026 | ; ¢ë¤¥«¥ë¥ â®çª¨ ᤢ¨£ îâáï ¢¢¥àå |
991 | align 4 |
1027 | align 4 |
992 | proc but_sel_points_move_up |
1028 | proc but_sel_points_move_up |
993 | locals |
1029 | locals |
994 | pObj dd ? |
1030 | pObj dd ? |
995 | pFig dd ? |
1031 | pFig dd ? |
996 | idFig dd ? |
1032 | idFig dd ? |
997 | endl |
1033 | endl |
998 | pushad |
1034 | pushad |
999 | stdcall [tl_node_get_data],tree1 |
1035 | stdcall [tl_node_get_data],tree1 |
1000 | or eax,eax |
1036 | or eax,eax |
1001 | jz .no_point |
1037 | jz .no_point |
1002 | cmp [eax+Figure.OType],'Fig' |
1038 | cmp [eax+Figure.OType],'Fig' |
1003 | jne .no_point |
1039 | jne .no_point |
1004 | 1040 | ||
1005 | mov [pFig],eax |
1041 | mov [pFig],eax |
1006 | stdcall sel_points_get_count,eax |
1042 | stdcall sel_points_get_count,eax |
1007 | or eax,eax |
1043 | or eax,eax |
1008 | jz .no_point |
1044 | jz .no_point |
1009 | 1045 | ||
1010 | stdcall found_parent_obj,[pFig] |
1046 | stdcall found_parent_obj,[pFig] |
1011 | or eax,eax |
1047 | or eax,eax |
1012 | jz .end_f ;if not found |
1048 | jz .end_f ;if not found |
1013 | mov [pObj],eax |
1049 | mov [pObj],eax |
1014 | mov [idFig],ecx |
1050 | mov [idFig],ecx |
1015 | 1051 | ||
1016 | ;¯à®¢¥à塞 ¢ë¤¥«¥ë¥ â®çª¨ |
1052 | ;¯à®¢¥à塞 ¢ë¤¥«¥ë¥ â®çª¨ |
1017 | mov eax,[pFig] |
1053 | mov eax,[pFig] |
1018 | mov ecx,[eax+Figure.PoiCount] |
1054 | mov ecx,[eax+Figure.PoiCount] |
1019 | or ecx,ecx |
1055 | or ecx,ecx |
1020 | jz .no_point |
1056 | jz .no_point |
1021 | mov ebx,[eax+Figure.PoiData] |
1057 | mov ebx,[eax+Figure.PoiData] |
1022 | xor eax,eax |
1058 | xor eax,eax |
1023 | .cycle0: |
1059 | .cycle0: |
1024 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1060 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1025 | jnc @f |
1061 | jnc @f |
1026 | or eax,eax |
1062 | or eax,eax |
1027 | jz .point_is_0 |
1063 | jz .point_is_0 |
1028 | stdcall point_move_up, [pObj],[pFig],[idFig],ebx;,eax |
1064 | stdcall point_move_up, [pObj],[pFig],[idFig],ebx;,eax |
1029 | @@: |
1065 | @@: |
1030 | inc eax |
1066 | inc eax |
1031 | add ebx,sizeof.Point |
1067 | add ebx,sizeof.Point |
1032 | loop .cycle0 |
1068 | loop .cycle0 |
1033 | 1069 | ||
1034 | ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
1070 | ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
1035 | mov dword[offs_last_timer],0 |
1071 | mov dword[offs_last_timer],0 |
1036 | jmp .end_f |
1072 | jmp .end_f |
1037 | .point_is_0: |
1073 | .point_is_0: |
1038 | notify_window_run txt_err_poi_is_0 |
1074 | notify_window_run txt_err_poi_is_0 |
1039 | jmp .end_f |
1075 | jmp .end_f |
1040 | .no_point: |
1076 | .no_point: |
1041 | notify_window_run txt_err_no_point_sel |
1077 | notify_window_run txt_err_no_point_sel |
1042 | .end_f: |
1078 | .end_f: |
1043 | popad |
1079 | popad |
1044 | ret |
1080 | ret |
1045 | endp |
1081 | endp |
1046 | 1082 | ||
1047 | ;description: |
1083 | ;description: |
1048 | ; ¢ë¤¥«¥ë¥ â®çª¨ ᤢ¨£ îâáï ¢¨§ |
1084 | ; ¢ë¤¥«¥ë¥ â®çª¨ ᤢ¨£ îâáï ¢¨§ |
1049 | align 4 |
1085 | align 4 |
1050 | proc but_sel_points_move_down |
1086 | proc but_sel_points_move_down |
1051 | locals |
1087 | locals |
1052 | pObj dd ? |
1088 | pObj dd ? |
1053 | pFig dd ? |
1089 | pFig dd ? |
1054 | idFig dd ? |
1090 | idFig dd ? |
1055 | endl |
1091 | endl |
1056 | pushad |
1092 | pushad |
1057 | stdcall [tl_node_get_data],tree1 |
1093 | stdcall [tl_node_get_data],tree1 |
1058 | or eax,eax |
1094 | or eax,eax |
1059 | jz .no_point |
1095 | jz .no_point |
1060 | cmp [eax+Figure.OType],'Fig' |
1096 | cmp [eax+Figure.OType],'Fig' |
1061 | jne .no_point |
1097 | jne .no_point |
1062 | 1098 | ||
1063 | mov [pFig],eax |
1099 | mov [pFig],eax |
1064 | stdcall sel_points_get_count,eax |
1100 | stdcall sel_points_get_count,eax |
1065 | or eax,eax |
1101 | or eax,eax |
1066 | jz .no_point |
1102 | jz .no_point |
1067 | 1103 | ||
1068 | stdcall found_parent_obj,[pFig] |
1104 | stdcall found_parent_obj,[pFig] |
1069 | or eax,eax |
1105 | or eax,eax |
1070 | jz .end_f ;if not found |
1106 | jz .end_f ;if not found |
1071 | mov [pObj],eax |
1107 | mov [pObj],eax |
1072 | mov [idFig],ecx |
1108 | mov [idFig],ecx |
1073 | 1109 | ||
1074 | ;¯à®¢¥à塞 ¢ë¤¥«¥ë¥ â®çª¨ |
1110 | ;¯à®¢¥à塞 ¢ë¤¥«¥ë¥ â®çª¨ |
1075 | mov eax,[pFig] |
1111 | mov eax,[pFig] |
1076 | mov ecx,[eax+Figure.PoiCount] |
1112 | mov ecx,[eax+Figure.PoiCount] |
1077 | or ecx,ecx |
1113 | or ecx,ecx |
1078 | jz .no_point |
1114 | jz .no_point |
1079 | mov ebx,ecx |
1115 | mov ebx,ecx |
1080 | dec ebx |
1116 | dec ebx |
1081 | imul ebx,sizeof.Point |
1117 | imul ebx,sizeof.Point |
1082 | add ebx,[eax+Figure.PoiData] |
1118 | add ebx,[eax+Figure.PoiData] |
1083 | .cycle0: |
1119 | .cycle0: |
1084 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1120 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1085 | jnc @f |
1121 | jnc @f |
1086 | cmp ecx,[eax+Figure.PoiCount] |
1122 | cmp ecx,[eax+Figure.PoiCount] |
1087 | je .point_is_last |
1123 | je .point_is_last |
1088 | mov edi,ebx |
1124 | mov edi,ebx |
1089 | add edi,sizeof.Point |
1125 | add edi,sizeof.Point |
1090 | stdcall point_move_up, [pObj],[pFig],[idFig],edi;,ecx |
1126 | stdcall point_move_up, [pObj],[pFig],[idFig],edi;,ecx |
1091 | @@: |
1127 | @@: |
1092 | sub ebx,sizeof.Point |
1128 | sub ebx,sizeof.Point |
1093 | loop .cycle0 |
1129 | loop .cycle0 |
1094 | 1130 | ||
1095 | ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
1131 | ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
1096 | mov dword[offs_last_timer],0 |
1132 | mov dword[offs_last_timer],0 |
1097 | jmp .end_f |
1133 | jmp .end_f |
1098 | .point_is_last: |
1134 | .point_is_last: |
1099 | notify_window_run txt_err_poi_is_last |
1135 | notify_window_run txt_err_poi_is_last |
1100 | jmp .end_f |
1136 | jmp .end_f |
1101 | .no_point: |
1137 | .no_point: |
1102 | notify_window_run txt_err_no_point_sel |
1138 | notify_window_run txt_err_no_point_sel |
1103 | .end_f: |
1139 | .end_f: |
1104 | popad |
1140 | popad |
1105 | ret |
1141 | ret |
1106 | endp |
1142 | endp |
1107 | 1143 | ||
1108 | ;description: |
1144 | ;description: |
1109 | ; ¢ë¤¥«¥¨¥ ¢ë¡à ®© â®çª¨ ᤢ¨£ ¥âáï ¢¢¥àå |
1145 | ; ¢ë¤¥«¥¨¥ ¢ë¡à ®© â®çª¨ ᤢ¨£ ¥âáï ¢¢¥àå |
1110 | align 4 |
1146 | align 4 |
1111 | proc but_selection_move_up |
1147 | proc but_selection_move_up |
1112 | locals |
1148 | locals |
1113 | pFig dd ? |
1149 | pFig dd ? |
1114 | endl |
1150 | endl |
1115 | pushad |
1151 | pushad |
1116 | stdcall [tl_node_get_data],tree1 |
1152 | stdcall [tl_node_get_data],tree1 |
1117 | or eax,eax |
1153 | or eax,eax |
1118 | jz .end_fblo |
1154 | jz .end_fblo |
1119 | cmp [eax+Figure.OType],'Fig' |
1155 | cmp [eax+Figure.OType],'Fig' |
1120 | jne .end_fblo |
1156 | jne .end_fblo |
1121 | 1157 | ||
1122 | mov [pFig],eax |
1158 | mov [pFig],eax |
1123 | stdcall sel_points_get_count,eax |
1159 | stdcall sel_points_get_count,eax |
1124 | cmp eax,1 |
1160 | cmp eax,1 |
1125 | jne .no_point |
1161 | jne .no_point |
1126 | 1162 | ||
1127 | ;¯à®¢¥à塞 ¢ë¤¥«¥ë¥ â®çª¨ |
1163 | ;¯à®¢¥à塞 ¢ë¤¥«¥ë¥ â®çª¨ |
1128 | mov eax,[pFig] |
1164 | mov eax,[pFig] |
1129 | mov ecx,[eax+Figure.PoiCount] |
1165 | mov ecx,[eax+Figure.PoiCount] |
1130 | or ecx,ecx |
1166 | or ecx,ecx |
1131 | jz .no_point |
1167 | jz .no_point |
1132 | dec ecx |
1168 | dec ecx |
1133 | jecxz .end_f |
1169 | jecxz .end_f |
1134 | mov ebx,[eax+Figure.PoiData] |
1170 | mov ebx,[eax+Figure.PoiData] |
1135 | .cycle0: |
1171 | .cycle0: |
1136 | add ebx,sizeof.Point |
1172 | add ebx,sizeof.Point |
1137 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1173 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1138 | jnc @f |
1174 | jnc @f |
1139 | btr dword[ebx+Point.Prop],PROP_BIT_SELECT |
1175 | btr dword[ebx+Point.Prop],PROP_BIT_SELECT |
1140 | bts dword[ebx+Point.Prop-sizeof.Point],PROP_BIT_SELECT |
1176 | bts dword[ebx+Point.Prop-sizeof.Point],PROP_BIT_SELECT |
1141 | xor ecx,ecx |
1177 | xor ecx,ecx |
1142 | inc ecx ;ecx = 1 - for exit from cycle |
1178 | inc ecx ;ecx = 1 - for exit from cycle |
1143 | @@: |
1179 | @@: |
1144 | loop .cycle0 |
1180 | loop .cycle0 |
1145 | 1181 | ||
1146 | ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
1182 | ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
1147 | mov dword[offs_last_timer],0 |
1183 | mov dword[offs_last_timer],0 |
1148 | jmp .end_f |
1184 | jmp .end_f |
1149 | .no_point: |
1185 | .no_point: |
1150 | notify_window_run txt_err_no_point_sel_1 |
1186 | notify_window_run txt_err_no_point_sel_1 |
1151 | jmp .end_f |
1187 | jmp .end_f |
1152 | .end_fblo: |
1188 | .end_fblo: |
1153 | ;notify_window_run txt_err_no_figure_select |
1189 | ;notify_window_run txt_err_no_figure_select |
1154 | .end_f: |
1190 | .end_f: |
1155 | popad |
1191 | popad |
1156 | ret |
1192 | ret |
1157 | endp |
1193 | endp |
1158 | 1194 | ||
1159 | ;description: |
1195 | ;description: |
1160 | ; ¢ë¤¥«¥¨¥ ¢ë¡à ®© â®çª¨ ᤢ¨£ ¥âáï ¢¨§ |
1196 | ; ¢ë¤¥«¥¨¥ ¢ë¡à ®© â®çª¨ ᤢ¨£ ¥âáï ¢¨§ |
1161 | align 4 |
1197 | align 4 |
1162 | proc but_selection_move_down |
1198 | proc but_selection_move_down |
1163 | locals |
1199 | locals |
1164 | pFig dd ? |
1200 | pFig dd ? |
1165 | endl |
1201 | endl |
1166 | pushad |
1202 | pushad |
1167 | stdcall [tl_node_get_data],tree1 |
1203 | stdcall [tl_node_get_data],tree1 |
1168 | or eax,eax |
1204 | or eax,eax |
1169 | jz .end_fblo |
1205 | jz .end_fblo |
1170 | cmp [eax+Figure.OType],'Fig' |
1206 | cmp [eax+Figure.OType],'Fig' |
1171 | jne .end_fblo |
1207 | jne .end_fblo |
1172 | 1208 | ||
1173 | mov [pFig],eax |
1209 | mov [pFig],eax |
1174 | stdcall sel_points_get_count,eax |
1210 | stdcall sel_points_get_count,eax |
1175 | cmp eax,1 |
1211 | cmp eax,1 |
1176 | jne .no_point |
1212 | jne .no_point |
1177 | 1213 | ||
1178 | ;¯à®¢¥à塞 ¢ë¤¥«¥ë¥ â®çª¨ |
1214 | ;¯à®¢¥à塞 ¢ë¤¥«¥ë¥ â®çª¨ |
1179 | mov eax,[pFig] |
1215 | mov eax,[pFig] |
1180 | mov ecx,[eax+Figure.PoiCount] |
1216 | mov ecx,[eax+Figure.PoiCount] |
1181 | or ecx,ecx |
1217 | or ecx,ecx |
1182 | jz .no_point |
1218 | jz .no_point |
1183 | dec ecx |
1219 | dec ecx |
1184 | jecxz .end_f |
1220 | jecxz .end_f |
1185 | mov ebx,[eax+Figure.PoiData] |
1221 | mov ebx,[eax+Figure.PoiData] |
1186 | .cycle0: |
1222 | .cycle0: |
1187 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1223 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1188 | jnc @f |
1224 | jnc @f |
1189 | btr dword[ebx+Point.Prop],PROP_BIT_SELECT |
1225 | btr dword[ebx+Point.Prop],PROP_BIT_SELECT |
1190 | bts dword[ebx+Point.Prop+sizeof.Point],PROP_BIT_SELECT |
1226 | bts dword[ebx+Point.Prop+sizeof.Point],PROP_BIT_SELECT |
1191 | xor ecx,ecx |
1227 | xor ecx,ecx |
1192 | inc ecx ;ecx = 1 - for exit from cycle |
1228 | inc ecx ;ecx = 1 - for exit from cycle |
1193 | @@: |
1229 | @@: |
1194 | add ebx,sizeof.Point |
1230 | add ebx,sizeof.Point |
1195 | loop .cycle0 |
1231 | loop .cycle0 |
1196 | 1232 | ||
1197 | ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
1233 | ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
1198 | mov dword[offs_last_timer],0 |
1234 | mov dword[offs_last_timer],0 |
1199 | jmp .end_f |
1235 | jmp .end_f |
1200 | .no_point: |
1236 | .no_point: |
1201 | notify_window_run txt_err_no_point_sel_1 |
1237 | notify_window_run txt_err_no_point_sel_1 |
1202 | jmp .end_f |
1238 | jmp .end_f |
1203 | .end_fblo: |
1239 | .end_fblo: |
1204 | ;notify_window_run txt_err_no_figure_select |
1240 | ;notify_window_run txt_err_no_figure_select |
1205 | .end_f: |
1241 | .end_f: |
1206 | popad |
1242 | popad |
1207 | ret |
1243 | ret |
1208 | endp |
1244 | endp |
1209 | 1245 | ||
1210 | ;output: |
1246 | ;output: |
1211 | ; eax - couunt new points |
1247 | ; eax - couunt new points |
1212 | align 4 |
1248 | align 4 |
1213 | proc but_clipboard_copy_points uses ebx ecx edx edi esi |
1249 | proc but_clipboard_copy_points uses ebx ecx edx edi esi |
1214 | locals |
1250 | locals |
1215 | pData dd 0 |
1251 | pData dd 0 |
1216 | pBuf dd 0 |
1252 | pBuf dd 0 |
1217 | endl |
1253 | endl |
1218 | stdcall [tl_node_get_data],tree1 |
1254 | stdcall [tl_node_get_data],tree1 |
1219 | or eax,eax |
1255 | or eax,eax |
1220 | jz .no_point |
1256 | jz .no_point |
1221 | cmp [eax+Figure.OType],'Fig' |
1257 | cmp [eax+Figure.OType],'Fig' |
1222 | jne .no_point |
1258 | jne .no_point |
1223 | 1259 | ||
1224 | mov ecx,[eax+Figure.PoiData] |
1260 | mov ecx,[eax+Figure.PoiData] |
1225 | mov [pData],ecx |
1261 | mov [pData],ecx |
1226 | mov ecx,[eax+Figure.PoiCount] |
1262 | mov ecx,[eax+Figure.PoiCount] |
1227 | stdcall sel_points_get_count,eax |
1263 | stdcall sel_points_get_count,eax |
1228 | or eax,eax |
1264 | or eax,eax |
1229 | jz .no_point |
1265 | jz .no_point |
1230 | push eax |
1266 | push eax |
1231 | imul eax,32 ;for string 'X___.________ Y___.________^^' |
1267 | imul eax,32 ;for string 'X___.________ Y___.________^^' |
1232 | stdcall mem.Alloc,eax |
1268 | stdcall mem.Alloc,eax |
1233 | mov [pBuf],eax |
1269 | mov [pBuf],eax |
1234 | 1270 | ||
1235 | mov edx,eax |
1271 | mov edx,eax |
1236 | mov dword[edx+4],0 ;text data |
1272 | mov dword[edx+4],0 ;text data |
1237 | mov dword[edx+8],1 ;code 866 |
1273 | mov dword[edx+8],1 ;code 866 |
1238 | add edx,12 ;system buffer header size |
1274 | add edx,12 ;system buffer header size |
1239 | mov dword[edx],0 |
1275 | mov dword[edx],0 |
1240 | mov word[NumberSymbolsAD],8 |
1276 | mov word[NumberSymbolsAD],8 |
1241 | align 4 |
1277 | align 4 |
1242 | .cycle2: ;横« ¯® â®çª ¬ |
1278 | .cycle2: ;横« ¯® â®çª ¬ |
1243 | mov esi,[pData] |
1279 | mov esi,[pData] |
1244 | bt dword[esi+Point.Prop],PROP_BIT_SELECT |
1280 | bt dword[esi+Point.Prop],PROP_BIT_SELECT |
1245 | jnc .end0 |
1281 | jnc .end0 |
1246 | stdcall str_cat,edx,txt_s_poi |
1282 | stdcall str_cat,edx,txt_s_poi |
1247 | ;param 1 |
1283 | ;param 1 |
1248 | add esi,Point.CoordX |
1284 | add esi,Point.CoordX |
1249 | mov edi,Data_Double |
1285 | mov edi,Data_Double |
1250 | movsd |
1286 | movsd |
1251 | movsd |
1287 | movsd |
1252 | call DoubleFloat_to_String |
1288 | call DoubleFloat_to_String |
1253 | call String_crop_0 |
1289 | call String_crop_0 |
1254 | stdcall str_cat,edx,Data_String |
1290 | stdcall str_cat,edx,Data_String |
1255 | stdcall str_cat,edx,txt_s_poi_Y |
1291 | stdcall str_cat,edx,txt_s_poi_Y |
1256 | ;param 2 |
1292 | ;param 2 |
1257 | ;;mov esi,[pData] |
1293 | ;;mov esi,[pData] |
1258 | ;;lea esi,[esi+Point.CoordY] |
1294 | ;;lea esi,[esi+Point.CoordY] |
1259 | mov edi,Data_Double |
1295 | mov edi,Data_Double |
1260 | movsd |
1296 | movsd |
1261 | movsd |
1297 | movsd |
1262 | call DoubleFloat_to_String |
1298 | call DoubleFloat_to_String |
1263 | call String_crop_0 |
1299 | call String_crop_0 |
1264 | stdcall str_cat,edx,Data_String |
1300 | stdcall str_cat,edx,Data_String |
1265 | ; |
1301 | ; |
1266 | stdcall str_cat,edx,txt_nl |
1302 | stdcall str_cat,edx,txt_nl |
1267 | .end0: |
1303 | .end0: |
1268 | add dword[pData],sizeof.Point |
1304 | add dword[pData],sizeof.Point |
1269 | loop .cycle2 |
1305 | loop .cycle2 |
1270 | .cycle2end: |
1306 | .cycle2end: |
1271 | 1307 | ||
1272 | mov edx,[pBuf] |
1308 | mov edx,[pBuf] |
1273 | add edx,12 |
1309 | add edx,12 |
1274 | stdcall str_len,edx |
1310 | stdcall str_len,edx |
1275 | sub edx,12 |
1311 | sub edx,12 |
1276 | mov [edx],eax |
1312 | mov [edx],eax |
1277 | add eax,12 |
1313 | add eax,12 |
1278 | mov ecx,eax |
1314 | mov ecx,eax |
1279 | mcall SF_CLIPBOARD,SSF_WRITE_CB ;,ecx,edx |
1315 | mcall SF_CLIPBOARD,SSF_WRITE_CB ;,ecx,edx |
1280 | stdcall mem.Free,[pBuf] |
1316 | stdcall mem.Free,[pBuf] |
1281 | pop eax |
1317 | pop eax |
1282 | 1318 | ||
1283 | .no_point: |
1319 | .no_point: |
1284 | ret |
1320 | ret |
1285 | endp |
1321 | endp |
1286 | 1322 | ||
1287 | ;output: |
1323 | ;output: |
1288 | ; eax - couunt new points |
1324 | ; eax - couunt new points |
1289 | align 4 |
1325 | align 4 |
1290 | proc but_clipboard_paste_points uses ebx ecx edx esi edi |
1326 | proc but_clipboard_paste_points uses ebx ecx edx esi edi |
1291 | locals |
1327 | locals |
1292 | pFig dd ? |
1328 | pFig dd ? |
1293 | nCount dd ? |
1329 | nCount dd ? |
1294 | endl |
1330 | endl |
1295 | stdcall [tl_node_get_data],tree1 |
1331 | stdcall [tl_node_get_data],tree1 |
1296 | or eax,eax |
1332 | or eax,eax |
1297 | jz .end0 |
1333 | jz .end0 |
1298 | cmp [eax+Figure.OType],'Fig' |
1334 | cmp [eax+Figure.OType],'Fig' |
1299 | jne .end0 |
1335 | jne .end0 |
1300 | 1336 | ||
1301 | mov [pFig],eax |
1337 | mov [pFig],eax |
1302 | 1338 | ||
1303 | mcall SF_CLIPBOARD,SSF_GET_SLOT_COUNT |
1339 | mcall SF_CLIPBOARD,SSF_GET_SLOT_COUNT |
1304 | cmp eax,1 |
1340 | cmp eax,1 |
1305 | jl .end0 |
1341 | jl .end0 |
1306 | 1342 | ||
1307 | mov esi,eax |
1343 | mov esi,eax |
1308 | .cycle0: ;®¡à âë© æ¨ª« ¯® ᫮⠬ |
1344 | .cycle0: ;®¡à âë© æ¨ª« ¯® ᫮⠬ |
1309 | dec esi ;®¬¥à ⥪ã饣®, ¯à®¢¥à塞®£® á«®â |
1345 | dec esi ;®¬¥à ⥪ã饣®, ¯à®¢¥à塞®£® á«®â |
1310 | mcall SF_CLIPBOARD,SSF_READ_CB,esi |
1346 | mcall SF_CLIPBOARD,SSF_READ_CB,esi |
1311 | cmp eax,1 |
1347 | cmp eax,1 |
1312 | je .end0 |
1348 | je .end0 |
1313 | cmp eax,-1 |
1349 | cmp eax,-1 |
1314 | je .end0 |
1350 | je .end0 |
1315 | mov ecx,dword[eax] |
1351 | mov ecx,dword[eax] |
1316 | cmp ecx,5 ;min text size |
1352 | cmp ecx,5 ;min text size |
1317 | jl .end0 |
1353 | jl .end0 |
1318 | cmp dword[eax+4],0 ;text |
1354 | cmp dword[eax+4],0 ;text |
1319 | je @f |
1355 | je @f |
1320 | cmp esi,1 |
1356 | cmp esi,1 |
1321 | jge .cycle0 ;¥á«¨ ¢ ¡ãä¥à¥ ¥ ⥪áâ, ᫮⮢ ¢ ¡ãä¥à¥ ¥áª®«ìª®, ¯à®¡ã¥¬ ¯¥à¥©â¨ ª ¢¥à奬ã á«®âã |
1357 | jge .cycle0 ;¥á«¨ ¢ ¡ãä¥à¥ ¥ ⥪áâ, ᫮⮢ ¢ ¡ãä¥à¥ ¥áª®«ìª®, ¯à®¡ã¥¬ ¯¥à¥©â¨ ª ¢¥à奬ã á«®âã |
1322 | jmp .end0 |
1358 | jmp .end0 |
1323 | @@: |
1359 | @@: |
1324 | 1360 | ||
1325 | mov esi,eax |
1361 | mov esi,eax |
1326 | add esi,12 ;ᬥ饨¥ ç « ⥪áâ ¢ ¡ãä¥à¥ |
1362 | add esi,12 ;ᬥ饨¥ ç « ⥪áâ ¢ ¡ãä¥à¥ |
1327 | stdcall get_max_points |
1363 | stdcall get_max_points |
1328 | or eax,eax |
1364 | or eax,eax |
1329 | jz .end_f |
1365 | jz .end_f |
1330 | mov [nCount],eax |
1366 | mov [nCount],eax |
1331 | mov ebx,[pFig] |
1367 | mov ebx,[pFig] |
1332 | mov edi,[ebx+Figure.PoiCount] |
1368 | mov edi,[ebx+Figure.PoiCount] |
1333 | add [ebx+Figure.PoiCount],eax |
1369 | add [ebx+Figure.PoiCount],eax |
1334 | add eax,edi |
1370 | add eax,edi |
1335 | imul eax,sizeof.Point |
1371 | imul eax,sizeof.Point |
1336 | stdcall mem.ReAlloc,[ebx+Figure.PoiData],eax |
1372 | stdcall mem.ReAlloc,[ebx+Figure.PoiData],eax |
1337 | mov [ebx+Figure.PoiData],eax |
1373 | mov [ebx+Figure.PoiData],eax |
1338 | 1374 | ||
1339 | mov ecx,edi |
1375 | mov ecx,edi |
1340 | mov edx,eax |
1376 | mov edx,eax |
1341 | align 4 |
1377 | align 4 |
1342 | .cycle1: ;横« ¤«ï áïâ¨ï ¢ë¤¥«¥¨ï á® áâ àëå â®ç¥ª |
1378 | .cycle1: ;横« ¤«ï áïâ¨ï ¢ë¤¥«¥¨ï á® áâ àëå â®ç¥ª |
1343 | btr dword[edx+Point.Prop],PROP_BIT_SELECT |
1379 | btr dword[edx+Point.Prop],PROP_BIT_SELECT |
1344 | add edx,sizeof.Point |
1380 | add edx,sizeof.Point |
1345 | loop .cycle1 |
1381 | loop .cycle1 |
1346 | 1382 | ||
1347 | mov ecx,[nCount] |
1383 | mov ecx,[nCount] |
1348 | imul edi,sizeof.Point |
1384 | imul edi,sizeof.Point |
1349 | add edi,eax |
1385 | add edi,eax |
1350 | finit |
1386 | finit |
1351 | align 4 |
1387 | align 4 |
1352 | .cycle2: ;横« ¤«ï ¤®¡ ¢«¥¨ï ®¢ëå â®ç¥ª |
1388 | .cycle2: ;横« ¤«ï ¤®¡ ¢«¥¨ï ®¢ëå â®ç¥ª |
1353 | stdcall PointInit,edi |
1389 | stdcall PointInit,edi |
1354 | or eax,eax |
1390 | or eax,eax |
1355 | jz .cycle2end |
1391 | jz .cycle2end |
1356 | bts dword[edi+Point.Prop],PROP_BIT_SELECT |
1392 | bts dword[edi+Point.Prop],PROP_BIT_SELECT |
1357 | add edi,sizeof.Point |
1393 | add edi,sizeof.Point |
1358 | loop .cycle2 |
1394 | loop .cycle2 |
1359 | .cycle2end: |
1395 | .cycle2end: |
1360 | or ecx,ecx |
1396 | or ecx,ecx |
1361 | jz .end1 |
1397 | jz .end1 |
1362 | ;㬥ìè ¥¬ ®¡ê¥¬ ¯ ¬ï⨠¢ë¤¥«¥ë© ¤«ï â®ç¥ª |
1398 | ;㬥ìè ¥¬ ®¡ê¥¬ ¯ ¬ï⨠¢ë¤¥«¥ë© ¤«ï â®ç¥ª |
1363 | sub [ebx+Figure.PoiCount],ecx |
1399 | sub [ebx+Figure.PoiCount],ecx |
1364 | mov eax,[ebx+Figure.PoiCount] |
1400 | mov eax,[ebx+Figure.PoiCount] |
1365 | imul eax,sizeof.Point |
1401 | imul eax,sizeof.Point |
1366 | stdcall mem.ReAlloc,[ebx+Figure.PoiData],eax |
1402 | stdcall mem.ReAlloc,[ebx+Figure.PoiData],eax |
1367 | mov [ebx+Figure.PoiData],eax |
1403 | mov [ebx+Figure.PoiData],eax |
1368 | .end1: |
1404 | .end1: |
1369 | stdcall found_parent_obj,ebx ;get figure number in ecx |
1405 | stdcall found_parent_obj,ebx ;get figure number in ecx |
1370 | stdcall figure_update_coords,ObjData,ecx |
1406 | stdcall figure_update_coords,ObjData,ecx |
1371 | 1407 | ||
1372 | mov eax,[nCount] |
1408 | mov eax,[nCount] |
1373 | mov dword[offs_last_timer],0 |
1409 | mov dword[offs_last_timer],0 |
1374 | jmp .end_f |
1410 | jmp .end_f |
1375 | .end0: |
1411 | .end0: |
1376 | xor eax,eax |
1412 | xor eax,eax |
1377 | .end_f: |
1413 | .end_f: |
1378 | ret |
1414 | ret |
1379 | endp |
1415 | endp |
1380 | 1416 | ||
1381 | align 4 |
1417 | align 4 |
1382 | proc but_sel_points_del |
1418 | proc but_sel_points_del |
1383 | locals |
1419 | locals |
1384 | pFig dd ? |
1420 | pFig dd ? |
1385 | nDel dd ? ;need delete |
1421 | nDel dd ? ;need delete |
1386 | endl |
1422 | endl |
1387 | pushad |
1423 | pushad |
1388 | stdcall [tl_node_get_data],tree1 |
1424 | stdcall [tl_node_get_data],tree1 |
1389 | or eax,eax |
1425 | or eax,eax |
1390 | jz .no_point |
1426 | jz .no_point |
1391 | cmp [eax+Figure.OType],'Fig' |
1427 | cmp [eax+Figure.OType],'Fig' |
1392 | jne .no_point |
1428 | jne .no_point |
1393 | 1429 | ||
1394 | mov [pFig],eax |
1430 | mov [pFig],eax |
1395 | stdcall sel_points_get_count,eax |
1431 | stdcall sel_points_get_count,eax |
1396 | or eax,eax |
1432 | or eax,eax |
1397 | jz .no_point |
1433 | jz .no_point |
1398 | mov [nDel],eax |
1434 | mov [nDel],eax |
1399 | 1435 | ||
1400 | ;¯à®¢¥à塞 ¢ë¤¥«¥ë¥ â®çª¨ |
1436 | ;¯à®¢¥à塞 ¢ë¤¥«¥ë¥ â®çª¨ |
1401 | mov ebx,[pFig] |
1437 | mov ebx,[pFig] |
1402 | mov ecx,[ebx+Figure.PoiCount] |
1438 | mov ecx,[ebx+Figure.PoiCount] |
1403 | or ecx,ecx |
1439 | or ecx,ecx |
1404 | jz .no_point |
1440 | jz .no_point |
1405 | 1441 | ||
1406 | cmp ecx,eax |
1442 | cmp ecx,eax |
1407 | jle .no_all |
1443 | jle .no_all |
1408 | 1444 | ||
1409 | stdcall found_parent_obj,[pFig] |
1445 | stdcall found_parent_obj,[pFig] |
1410 | or eax,eax |
1446 | or eax,eax |
1411 | jz .end_f ;if not found |
1447 | jz .end_f ;if not found |
1412 | mov edi,[ebx+Figure.PoiData] |
1448 | mov edi,[ebx+Figure.PoiData] |
1413 | mov edx,[ebx+Figure.PoiCount] |
1449 | mov edx,[ebx+Figure.PoiCount] |
1414 | imul edx,sizeof.Point |
1450 | imul edx,sizeof.Point |
1415 | add edx,edi |
1451 | add edx,edi |
1416 | 1452 | ||
1417 | .cycle0: ;1-ï ¢ë¤¥«¥ ï â®çª |
1453 | .cycle0: ;1-ï ¢ë¤¥«¥ ï â®çª |
1418 | cmp edi,edx |
1454 | cmp edi,edx |
1419 | jge .end0 |
1455 | jge .end0 |
1420 | bt dword[edi+Point.Prop],PROP_BIT_SELECT |
1456 | bt dword[edi+Point.Prop],PROP_BIT_SELECT |
1421 | jc .cycle0end |
1457 | jc .cycle0end |
1422 | add edi,sizeof.Point |
1458 | add edi,sizeof.Point |
1423 | jmp .cycle0 |
1459 | jmp .cycle0 |
1424 | .cycle0end: |
1460 | .cycle0end: |
1425 | 1461 | ||
1426 | mov esi,edi ;á«¥¤ãé ï 1-ï ¥ ¢ë¤¥«¥ ï â®çª |
1462 | mov esi,edi ;á«¥¤ãé ï 1-ï ¥ ¢ë¤¥«¥ ï â®çª |
1427 | add esi,sizeof.Point |
1463 | add esi,sizeof.Point |
1428 | .cycle1: |
1464 | .cycle1: |
1429 | cmp esi,edx |
1465 | cmp esi,edx |
1430 | jge .end0 |
1466 | jge .end0 |
1431 | bt dword[esi+Point.Prop],PROP_BIT_SELECT |
1467 | bt dword[esi+Point.Prop],PROP_BIT_SELECT |
1432 | jnc .cycle1end |
1468 | jnc .cycle1end |
1433 | add esi,sizeof.Point |
1469 | add esi,sizeof.Point |
1434 | jmp .cycle1 |
1470 | jmp .cycle1 |
1435 | .cycle1end: |
1471 | .cycle1end: |
1436 | 1472 | ||
1437 | mov ecx,sizeof.Point |
1473 | mov ecx,sizeof.Point |
1438 | rep movsb ;§ ¬¥ ¢ë¤¥«¥®© â®çª¨ |
1474 | rep movsb ;§ ¬¥ ¢ë¤¥«¥®© â®çª¨ |
1439 | bts dword[esi+Point.Prop-sizeof.Point],PROP_BIT_SELECT ;áâ ¢¨¬ ¢ë¤¥«¥¨¥ â®çªã, çâ®-¡ë ¯®â®¬ ¥¥ 㤠«¨âì |
1475 | bts dword[esi+Point.Prop-sizeof.Point],PROP_BIT_SELECT ;áâ ¢¨¬ ¢ë¤¥«¥¨¥ â®çªã, çâ®-¡ë ¯®â®¬ ¥¥ 㤠«¨âì |
1440 | 1476 | ||
1441 | jmp .cycle0 |
1477 | jmp .cycle0 |
1442 | .end0: |
1478 | .end0: |
1443 | 1479 | ||
1444 | ;®¡®¢«¥¨¥ ¯ ¬ï⨠|
1480 | ;®¡®¢«¥¨¥ ¯ ¬ï⨠|
1445 | mov eax,[ebx+Figure.PoiCount] |
1481 | mov eax,[ebx+Figure.PoiCount] |
1446 | sub eax,[nDel] |
1482 | sub eax,[nDel] |
1447 | mov [ebx+Figure.PoiCount],eax |
1483 | mov [ebx+Figure.PoiCount],eax |
1448 | imul eax,sizeof.Point |
1484 | imul eax,sizeof.Point |
1449 | stdcall mem.ReAlloc,[ebx+Figure.PoiData],eax |
1485 | stdcall mem.ReAlloc,[ebx+Figure.PoiData],eax |
1450 | mov [ebx+Figure.PoiData],eax |
1486 | mov [ebx+Figure.PoiData],eax |
1451 | 1487 | ||
1452 | ;¯¥à¥à áç¥â à §¬¥à®¢ 䨣ãàë |
1488 | ;¯¥à¥à áç¥â à §¬¥à®¢ 䨣ãàë |
1453 | stdcall found_parent_obj,ebx ;get figure number in ecx |
1489 | stdcall found_parent_obj,ebx ;get figure number in ecx |
1454 | stdcall figure_update_coords,ObjData,ecx |
1490 | stdcall figure_update_coords,ObjData,ecx |
1455 | 1491 | ||
1456 | ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
1492 | ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
1457 | mov dword[offs_last_timer],0 |
1493 | mov dword[offs_last_timer],0 |
1458 | jmp .end_f |
1494 | jmp .end_f |
1459 | 1495 | ||
1460 | .no_all: |
1496 | .no_all: |
1461 | notify_window_run txt_err_no_point_del |
1497 | notify_window_run txt_err_no_point_del |
1462 | jmp .end_f |
1498 | jmp .end_f |
1463 | .no_point: |
1499 | .no_point: |
1464 | notify_window_run txt_err_no_point_sel |
1500 | notify_window_run txt_err_no_point_sel |
1465 | .end_f: |
1501 | .end_f: |
1466 | popad |
1502 | popad |
1467 | ret |
1503 | ret |
1468 | endp |
1504 | endp |
1469 | 1505 | ||
1470 | align 4 |
1506 | align 4 |
1471 | proc but_sel_points_all uses eax ecx |
1507 | proc but_sel_points_all uses eax ecx |
1472 | stdcall [tl_node_get_data],tree1 |
1508 | stdcall [tl_node_get_data],tree1 |
1473 | or eax,eax |
1509 | or eax,eax |
1474 | jz .no_point |
1510 | jz .no_point |
1475 | cmp [eax+Figure.OType],'Fig' |
1511 | cmp [eax+Figure.OType],'Fig' |
1476 | jne .no_point |
1512 | jne .no_point |
1477 | 1513 | ||
1478 | mov ecx,[eax+Figure.PoiCount] |
1514 | mov ecx,[eax+Figure.PoiCount] |
1479 | or ecx,ecx |
1515 | or ecx,ecx |
1480 | jz .no_point |
1516 | jz .no_point |
1481 | mov eax,[eax+Figure.PoiData] |
1517 | mov eax,[eax+Figure.PoiData] |
1482 | .cycle0: ;横« ¤«ï ¢ë¤¥«¥¨ï â®ç¥ª |
1518 | .cycle0: ;横« ¤«ï ¢ë¤¥«¥¨ï â®ç¥ª |
1483 | bts dword[eax+Point.Prop],PROP_BIT_SELECT |
1519 | bts dword[eax+Point.Prop],PROP_BIT_SELECT |
1484 | add eax,sizeof.Point |
1520 | add eax,sizeof.Point |
1485 | loop .cycle0 |
1521 | loop .cycle0 |
1486 | ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
1522 | ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
1487 | mov dword[offs_last_timer],0 |
1523 | mov dword[offs_last_timer],0 |
1488 | .no_point: |
1524 | .no_point: |
1489 | ret |
1525 | ret |
1490 | endp |
1526 | endp |
1491 | 1527 | ||
1492 | align 4 |
1528 | align 4 |
1493 | proc but_sel_points_align_coord_xmin |
1529 | proc but_sel_points_align_coord_xmin |
1494 | pushad |
1530 | pushad |
1495 | stdcall [tl_node_get_data],tree1 |
1531 | stdcall [tl_node_get_data],tree1 |
1496 | or eax,eax |
1532 | or eax,eax |
1497 | jz .no_point |
1533 | jz .no_point |
1498 | cmp [eax+Figure.OType],'Fig' |
1534 | cmp [eax+Figure.OType],'Fig' |
1499 | jne .no_point |
1535 | jne .no_point |
1500 | 1536 | ||
1501 | mov ebx,eax |
1537 | mov ebx,eax |
1502 | stdcall sel_points_get_count,eax |
1538 | stdcall sel_points_get_count,eax |
1503 | cmp eax,1 |
1539 | cmp eax,1 |
1504 | jle .no_point |
1540 | jle .no_point |
1505 | mov ecx,[ebx+Figure.PoiCount] |
1541 | mov ecx,[ebx+Figure.PoiCount] |
1506 | or ecx,ecx |
1542 | or ecx,ecx |
1507 | jz .no_point |
1543 | jz .no_point |
1508 | cmp eax,ecx |
1544 | cmp eax,ecx |
1509 | je .no_point ;¥á«¨ ¢ë¤¥«¥ë ¢á¥ â®çª¨, çâ®-¡ë ¥ ¯®àâ¨âì ª®âãà |
1545 | je .no_point ;¥á«¨ ¢ë¤¥«¥ë ¢á¥ â®çª¨, çâ®-¡ë ¥ ¯®àâ¨âì ª®âãà |
1510 | 1546 | ||
1511 | mov edx,ecx |
1547 | mov edx,ecx |
1512 | imul edx,sizeof.Point |
1548 | imul edx,sizeof.Point |
1513 | mov ebx,[ebx+Figure.PoiData] |
1549 | mov ebx,[ebx+Figure.PoiData] |
1514 | add edx,ebx |
1550 | add edx,ebx |
1515 | align 4 |
1551 | align 4 |
1516 | .cycle0: ;1-ï ¢ë¤¥«¥ ï â®çª |
1552 | .cycle0: ;1-ï ¢ë¤¥«¥ ï â®çª |
1517 | cmp ebx,edx |
1553 | cmp ebx,edx |
1518 | jge .no_point |
1554 | jge .no_point |
1519 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1555 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1520 | jc .cycle0end |
1556 | jc .cycle0end |
1521 | add ebx,sizeof.Point |
1557 | add ebx,sizeof.Point |
1522 | jmp .cycle0 |
1558 | jmp .cycle0 |
1523 | .cycle0end: |
1559 | .cycle0end: |
1524 | lea esi,[ebx+Point.CoordX] |
1560 | lea esi,[ebx+Point.CoordX] |
1525 | mov edi,Data_Double |
1561 | mov edi,Data_Double |
1526 | movsd |
1562 | movsd |
1527 | movsd |
1563 | movsd |
1528 | finit |
1564 | finit |
1529 | fld qword[Data_Double] |
1565 | fld qword[Data_Double] |
1530 | align 4 |
1566 | align 4 |
1531 | .cycle1: ;横« ¤«ï 宦¤¥¨ï min(Point.CoordX) |
1567 | .cycle1: ;横« ¤«ï 宦¤¥¨ï min(Point.CoordX) |
1532 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1568 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1533 | jnc .no_sel |
1569 | jnc .no_sel |
1534 | fcom qword[ebx+Point.CoordX] |
1570 | fcom qword[ebx+Point.CoordX] |
1535 | fstsw ax |
1571 | fstsw ax |
1536 | sahf |
1572 | sahf |
1537 | jbe .no_sel |
1573 | jbe .no_sel |
1538 | ;if (st0>Point.CoordX) |
1574 | ;if (st0>Point.CoordX) |
1539 | ffree st0 |
1575 | ffree st0 |
1540 | fincstp |
1576 | fincstp |
1541 | fld qword[ebx+Point.CoordX] |
1577 | fld qword[ebx+Point.CoordX] |
1542 | .no_sel: |
1578 | .no_sel: |
1543 | add ebx,sizeof.Point |
1579 | add ebx,sizeof.Point |
1544 | cmp ebx,edx |
1580 | cmp ebx,edx |
1545 | jl .cycle1 |
1581 | jl .cycle1 |
1546 | fstp qword[Data_Double] |
1582 | fstp qword[Data_Double] |
1547 | align 4 |
1583 | align 4 |
1548 | .cycle2: ;横« ¤«ï ¯à¨á¢ ¨¢ ¨ï ¢á¥¬ Point.CoordX = min(Point.CoordX) |
1584 | .cycle2: ;横« ¤«ï ¯à¨á¢ ¨¢ ¨ï ¢á¥¬ Point.CoordX = min(Point.CoordX) |
1549 | sub edx,sizeof.Point |
1585 | sub edx,sizeof.Point |
1550 | bt dword[edx+Point.Prop],PROP_BIT_SELECT |
1586 | bt dword[edx+Point.Prop],PROP_BIT_SELECT |
1551 | jnc @f |
1587 | jnc @f |
1552 | mov esi,Data_Double |
1588 | mov esi,Data_Double |
1553 | lea edi,[edx+Point.CoordX] |
1589 | lea edi,[edx+Point.CoordX] |
1554 | movsd |
1590 | movsd |
1555 | movsd |
1591 | movsd |
1556 | @@: |
1592 | @@: |
1557 | loop .cycle2 |
1593 | loop .cycle2 |
1558 | ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
1594 | ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
1559 | mov dword[offs_last_timer],0 |
1595 | mov dword[offs_last_timer],0 |
1560 | .no_point: |
1596 | .no_point: |
1561 | popad |
1597 | popad |
1562 | ret |
1598 | ret |
1563 | endp |
1599 | endp |
1564 | 1600 | ||
1565 | align 4 |
1601 | align 4 |
1566 | proc but_sel_points_align_coord_ymin |
1602 | proc but_sel_points_align_coord_ymin |
1567 | pushad |
1603 | pushad |
1568 | stdcall [tl_node_get_data],tree1 |
1604 | stdcall [tl_node_get_data],tree1 |
1569 | or eax,eax |
1605 | or eax,eax |
1570 | jz .no_point |
1606 | jz .no_point |
1571 | cmp [eax+Figure.OType],'Fig' |
1607 | cmp [eax+Figure.OType],'Fig' |
1572 | jne .no_point |
1608 | jne .no_point |
1573 | 1609 | ||
1574 | mov ebx,eax |
1610 | mov ebx,eax |
1575 | stdcall sel_points_get_count,eax |
1611 | stdcall sel_points_get_count,eax |
1576 | cmp eax,1 |
1612 | cmp eax,1 |
1577 | jle .no_point |
1613 | jle .no_point |
1578 | mov ecx,[ebx+Figure.PoiCount] |
1614 | mov ecx,[ebx+Figure.PoiCount] |
1579 | or ecx,ecx |
1615 | or ecx,ecx |
1580 | jz .no_point |
1616 | jz .no_point |
1581 | cmp eax,ecx |
1617 | cmp eax,ecx |
1582 | je .no_point ;¥á«¨ ¢ë¤¥«¥ë ¢á¥ â®çª¨, çâ®-¡ë ¥ ¯®àâ¨âì ª®âãà |
1618 | je .no_point ;¥á«¨ ¢ë¤¥«¥ë ¢á¥ â®çª¨, çâ®-¡ë ¥ ¯®àâ¨âì ª®âãà |
1583 | 1619 | ||
1584 | mov edx,ecx |
1620 | mov edx,ecx |
1585 | imul edx,sizeof.Point |
1621 | imul edx,sizeof.Point |
1586 | mov ebx,[ebx+Figure.PoiData] |
1622 | mov ebx,[ebx+Figure.PoiData] |
1587 | add edx,ebx |
1623 | add edx,ebx |
1588 | align 4 |
1624 | align 4 |
1589 | .cycle0: ;1-ï ¢ë¤¥«¥ ï â®çª |
1625 | .cycle0: ;1-ï ¢ë¤¥«¥ ï â®çª |
1590 | cmp ebx,edx |
1626 | cmp ebx,edx |
1591 | jge .no_point |
1627 | jge .no_point |
1592 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1628 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1593 | jc .cycle0end |
1629 | jc .cycle0end |
1594 | add ebx,sizeof.Point |
1630 | add ebx,sizeof.Point |
1595 | jmp .cycle0 |
1631 | jmp .cycle0 |
1596 | .cycle0end: |
1632 | .cycle0end: |
1597 | lea esi,[ebx+Point.CoordY] |
1633 | lea esi,[ebx+Point.CoordY] |
1598 | mov edi,Data_Double |
1634 | mov edi,Data_Double |
1599 | movsd |
1635 | movsd |
1600 | movsd |
1636 | movsd |
1601 | finit |
1637 | finit |
1602 | fld qword[Data_Double] |
1638 | fld qword[Data_Double] |
1603 | align 4 |
1639 | align 4 |
1604 | .cycle1: ;横« ¤«ï 宦¤¥¨ï min(Point.CoordY) |
1640 | .cycle1: ;横« ¤«ï 宦¤¥¨ï min(Point.CoordY) |
1605 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1641 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1606 | jnc .no_sel |
1642 | jnc .no_sel |
1607 | fcom qword[ebx+Point.CoordY] |
1643 | fcom qword[ebx+Point.CoordY] |
1608 | fstsw ax |
1644 | fstsw ax |
1609 | sahf |
1645 | sahf |
1610 | jbe .no_sel |
1646 | jbe .no_sel |
1611 | ;if (st0>Point.CoordY) |
1647 | ;if (st0>Point.CoordY) |
1612 | ffree st0 |
1648 | ffree st0 |
1613 | fincstp |
1649 | fincstp |
1614 | fld qword[ebx+Point.CoordY] |
1650 | fld qword[ebx+Point.CoordY] |
1615 | .no_sel: |
1651 | .no_sel: |
1616 | add ebx,sizeof.Point |
1652 | add ebx,sizeof.Point |
1617 | cmp ebx,edx |
1653 | cmp ebx,edx |
1618 | jl .cycle1 |
1654 | jl .cycle1 |
1619 | fstp qword[Data_Double] |
1655 | fstp qword[Data_Double] |
1620 | align 4 |
1656 | align 4 |
1621 | .cycle2: ;横« ¤«ï ¯à¨á¢ ¨¢ ¨ï ¢á¥¬ Point.CoordY = min(Point.CoordY) |
1657 | .cycle2: ;横« ¤«ï ¯à¨á¢ ¨¢ ¨ï ¢á¥¬ Point.CoordY = min(Point.CoordY) |
1622 | sub edx,sizeof.Point |
1658 | sub edx,sizeof.Point |
1623 | bt dword[edx+Point.Prop],PROP_BIT_SELECT |
1659 | bt dword[edx+Point.Prop],PROP_BIT_SELECT |
1624 | jnc @f |
1660 | jnc @f |
1625 | mov esi,Data_Double |
1661 | mov esi,Data_Double |
1626 | lea edi,[edx+Point.CoordY] |
1662 | lea edi,[edx+Point.CoordY] |
1627 | movsd |
1663 | movsd |
1628 | movsd |
1664 | movsd |
1629 | @@: |
1665 | @@: |
1630 | loop .cycle2 |
1666 | loop .cycle2 |
1631 | ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
1667 | ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
1632 | mov dword[offs_last_timer],0 |
1668 | mov dword[offs_last_timer],0 |
1633 | .no_point: |
1669 | .no_point: |
1634 | popad |
1670 | popad |
1635 | ret |
1671 | ret |
1636 | endp |
1672 | endp |
1637 | 1673 | ||
1638 | align 4 |
1674 | align 4 |
1639 | proc but_sel_points_align_coord_xmax |
1675 | proc but_sel_points_align_coord_xmax |
1640 | pushad |
1676 | pushad |
1641 | stdcall [tl_node_get_data],tree1 |
1677 | stdcall [tl_node_get_data],tree1 |
1642 | or eax,eax |
1678 | or eax,eax |
1643 | jz .no_point |
1679 | jz .no_point |
1644 | cmp [eax+Figure.OType],'Fig' |
1680 | cmp [eax+Figure.OType],'Fig' |
1645 | jne .no_point |
1681 | jne .no_point |
1646 | 1682 | ||
1647 | mov ebx,eax |
1683 | mov ebx,eax |
1648 | stdcall sel_points_get_count,eax |
1684 | stdcall sel_points_get_count,eax |
1649 | cmp eax,1 |
1685 | cmp eax,1 |
1650 | jle .no_point |
1686 | jle .no_point |
1651 | mov ecx,[ebx+Figure.PoiCount] |
1687 | mov ecx,[ebx+Figure.PoiCount] |
1652 | or ecx,ecx |
1688 | or ecx,ecx |
1653 | jz .no_point |
1689 | jz .no_point |
1654 | cmp eax,ecx |
1690 | cmp eax,ecx |
1655 | je .no_point ;¥á«¨ ¢ë¤¥«¥ë ¢á¥ â®çª¨, çâ®-¡ë ¥ ¯®àâ¨âì ª®âãà |
1691 | je .no_point ;¥á«¨ ¢ë¤¥«¥ë ¢á¥ â®çª¨, çâ®-¡ë ¥ ¯®àâ¨âì ª®âãà |
1656 | 1692 | ||
1657 | mov edx,ecx |
1693 | mov edx,ecx |
1658 | imul edx,sizeof.Point |
1694 | imul edx,sizeof.Point |
1659 | mov ebx,[ebx+Figure.PoiData] |
1695 | mov ebx,[ebx+Figure.PoiData] |
1660 | add edx,ebx |
1696 | add edx,ebx |
1661 | align 4 |
1697 | align 4 |
1662 | .cycle0: ;1-ï ¢ë¤¥«¥ ï â®çª |
1698 | .cycle0: ;1-ï ¢ë¤¥«¥ ï â®çª |
1663 | cmp ebx,edx |
1699 | cmp ebx,edx |
1664 | jge .no_point |
1700 | jge .no_point |
1665 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1701 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1666 | jc .cycle0end |
1702 | jc .cycle0end |
1667 | add ebx,sizeof.Point |
1703 | add ebx,sizeof.Point |
1668 | jmp .cycle0 |
1704 | jmp .cycle0 |
1669 | .cycle0end: |
1705 | .cycle0end: |
1670 | lea esi,[ebx+Point.CoordX] |
1706 | lea esi,[ebx+Point.CoordX] |
1671 | mov edi,Data_Double |
1707 | mov edi,Data_Double |
1672 | movsd |
1708 | movsd |
1673 | movsd |
1709 | movsd |
1674 | finit |
1710 | finit |
1675 | fld qword[Data_Double] |
1711 | fld qword[Data_Double] |
1676 | align 4 |
1712 | align 4 |
1677 | .cycle1: ;横« ¤«ï 宦¤¥¨ï max(Point.CoordX) |
1713 | .cycle1: ;横« ¤«ï 宦¤¥¨ï max(Point.CoordX) |
1678 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1714 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1679 | jnc .no_sel |
1715 | jnc .no_sel |
1680 | fcom qword[ebx+Point.CoordX] |
1716 | fcom qword[ebx+Point.CoordX] |
1681 | fstsw ax |
1717 | fstsw ax |
1682 | sahf |
1718 | sahf |
1683 | jae .no_sel |
1719 | jae .no_sel |
1684 | ;if (st0 |
1720 | ;if (st0 |
1685 | ffree st0 |
1721 | ffree st0 |
1686 | fincstp |
1722 | fincstp |
1687 | fld qword[ebx+Point.CoordX] |
1723 | fld qword[ebx+Point.CoordX] |
1688 | .no_sel: |
1724 | .no_sel: |
1689 | add ebx,sizeof.Point |
1725 | add ebx,sizeof.Point |
1690 | cmp ebx,edx |
1726 | cmp ebx,edx |
1691 | jl .cycle1 |
1727 | jl .cycle1 |
1692 | fstp qword[Data_Double] |
1728 | fstp qword[Data_Double] |
1693 | align 4 |
1729 | align 4 |
1694 | .cycle2: ;横« ¤«ï ¯à¨á¢ ¨¢ ¨ï ¢á¥¬ Point.CoordX = max(Point.CoordX) |
1730 | .cycle2: ;横« ¤«ï ¯à¨á¢ ¨¢ ¨ï ¢á¥¬ Point.CoordX = max(Point.CoordX) |
1695 | sub edx,sizeof.Point |
1731 | sub edx,sizeof.Point |
1696 | bt dword[edx+Point.Prop],PROP_BIT_SELECT |
1732 | bt dword[edx+Point.Prop],PROP_BIT_SELECT |
1697 | jnc @f |
1733 | jnc @f |
1698 | mov esi,Data_Double |
1734 | mov esi,Data_Double |
1699 | lea edi,[edx+Point.CoordX] |
1735 | lea edi,[edx+Point.CoordX] |
1700 | movsd |
1736 | movsd |
1701 | movsd |
1737 | movsd |
1702 | @@: |
1738 | @@: |
1703 | loop .cycle2 |
1739 | loop .cycle2 |
1704 | ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
1740 | ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
1705 | mov dword[offs_last_timer],0 |
1741 | mov dword[offs_last_timer],0 |
1706 | .no_point: |
1742 | .no_point: |
1707 | popad |
1743 | popad |
1708 | ret |
1744 | ret |
1709 | endp |
1745 | endp |
1710 | 1746 | ||
1711 | align 4 |
1747 | align 4 |
1712 | proc but_sel_points_align_coord_ymax |
1748 | proc but_sel_points_align_coord_ymax |
1713 | pushad |
1749 | pushad |
1714 | stdcall [tl_node_get_data],tree1 |
1750 | stdcall [tl_node_get_data],tree1 |
1715 | or eax,eax |
1751 | or eax,eax |
1716 | jz .no_point |
1752 | jz .no_point |
1717 | cmp [eax+Figure.OType],'Fig' |
1753 | cmp [eax+Figure.OType],'Fig' |
1718 | jne .no_point |
1754 | jne .no_point |
1719 | 1755 | ||
1720 | mov ebx,eax |
1756 | mov ebx,eax |
1721 | stdcall sel_points_get_count,eax |
1757 | stdcall sel_points_get_count,eax |
1722 | cmp eax,1 |
1758 | cmp eax,1 |
1723 | jle .no_point |
1759 | jle .no_point |
1724 | mov ecx,[ebx+Figure.PoiCount] |
1760 | mov ecx,[ebx+Figure.PoiCount] |
1725 | or ecx,ecx |
1761 | or ecx,ecx |
1726 | jz .no_point |
1762 | jz .no_point |
1727 | cmp eax,ecx |
1763 | cmp eax,ecx |
1728 | je .no_point ;¥á«¨ ¢ë¤¥«¥ë ¢á¥ â®çª¨, çâ®-¡ë ¥ ¯®àâ¨âì ª®âãà |
1764 | je .no_point ;¥á«¨ ¢ë¤¥«¥ë ¢á¥ â®çª¨, çâ®-¡ë ¥ ¯®àâ¨âì ª®âãà |
1729 | 1765 | ||
1730 | mov edx,ecx |
1766 | mov edx,ecx |
1731 | imul edx,sizeof.Point |
1767 | imul edx,sizeof.Point |
1732 | mov ebx,[ebx+Figure.PoiData] |
1768 | mov ebx,[ebx+Figure.PoiData] |
1733 | add edx,ebx |
1769 | add edx,ebx |
1734 | align 4 |
1770 | align 4 |
1735 | .cycle0: ;1-ï ¢ë¤¥«¥ ï â®çª |
1771 | .cycle0: ;1-ï ¢ë¤¥«¥ ï â®çª |
1736 | cmp ebx,edx |
1772 | cmp ebx,edx |
1737 | jge .no_point |
1773 | jge .no_point |
1738 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1774 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1739 | jc .cycle0end |
1775 | jc .cycle0end |
1740 | add ebx,sizeof.Point |
1776 | add ebx,sizeof.Point |
1741 | jmp .cycle0 |
1777 | jmp .cycle0 |
1742 | .cycle0end: |
1778 | .cycle0end: |
1743 | lea esi,[ebx+Point.CoordY] |
1779 | lea esi,[ebx+Point.CoordY] |
1744 | mov edi,Data_Double |
1780 | mov edi,Data_Double |
1745 | movsd |
1781 | movsd |
1746 | movsd |
1782 | movsd |
1747 | finit |
1783 | finit |
1748 | fld qword[Data_Double] |
1784 | fld qword[Data_Double] |
1749 | align 4 |
1785 | align 4 |
1750 | .cycle1: ;横« ¤«ï 宦¤¥¨ï max(Point.CoordY) |
1786 | .cycle1: ;横« ¤«ï 宦¤¥¨ï max(Point.CoordY) |
1751 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1787 | bt dword[ebx+Point.Prop],PROP_BIT_SELECT |
1752 | jnc .no_sel |
1788 | jnc .no_sel |
1753 | fcom qword[ebx+Point.CoordY] |
1789 | fcom qword[ebx+Point.CoordY] |
1754 | fstsw ax |
1790 | fstsw ax |
1755 | sahf |
1791 | sahf |
1756 | jae .no_sel |
1792 | jae .no_sel |
1757 | ;if (st0 |
1793 | ;if (st0 |
1758 | ffree st0 |
1794 | ffree st0 |
1759 | fincstp |
1795 | fincstp |
1760 | fld qword[ebx+Point.CoordY] |
1796 | fld qword[ebx+Point.CoordY] |
1761 | .no_sel: |
1797 | .no_sel: |
1762 | add ebx,sizeof.Point |
1798 | add ebx,sizeof.Point |
1763 | cmp ebx,edx |
1799 | cmp ebx,edx |
1764 | jl .cycle1 |
1800 | jl .cycle1 |
1765 | fstp qword[Data_Double] |
1801 | fstp qword[Data_Double] |
1766 | align 4 |
1802 | align 4 |
1767 | .cycle2: ;横« ¤«ï ¯à¨á¢ ¨¢ ¨ï ¢á¥¬ Point.CoordY = max(Point.CoordY) |
1803 | .cycle2: ;横« ¤«ï ¯à¨á¢ ¨¢ ¨ï ¢á¥¬ Point.CoordY = max(Point.CoordY) |
1768 | sub edx,sizeof.Point |
1804 | sub edx,sizeof.Point |
1769 | bt dword[edx+Point.Prop],PROP_BIT_SELECT |
1805 | bt dword[edx+Point.Prop],PROP_BIT_SELECT |
1770 | jnc @f |
1806 | jnc @f |
1771 | mov esi,Data_Double |
1807 | mov esi,Data_Double |
1772 | lea edi,[edx+Point.CoordY] |
1808 | lea edi,[edx+Point.CoordY] |
1773 | movsd |
1809 | movsd |
1774 | movsd |
1810 | movsd |
1775 | @@: |
1811 | @@: |
1776 | loop .cycle2 |
1812 | loop .cycle2 |
1777 | ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
1813 | ;¤«ï ®¡®¢«¥¨ï ¯® â ©¬¥àã |
1778 | mov dword[offs_last_timer],0 |
1814 | mov dword[offs_last_timer],0 |
1779 | .no_point: |
1815 | .no_point: |
1780 | popad |
1816 | popad |
1781 | ret |
1817 | ret |
1782 | endp |
1818 | endp |
1783 | 1819 | ||
1784 | align 4 |
1820 | align 4 |
1785 | proc but_restore_zoom uses eax |
1821 | proc but_restore_zoom uses eax |
1786 | stdcall [tl_node_get_data],tree1 |
1822 | stdcall [tl_node_get_data],tree1 |
1787 | or eax,eax |
1823 | or eax,eax |
1788 | jz .end_f |
1824 | jz .end_f |
1789 | cmp [eax+Figure.OType],'Fig' |
1825 | cmp [eax+Figure.OType],'Fig' |
1790 | je @f |
1826 | je @f |
1791 | cmp [eax+Figure.OType],'Obj' |
1827 | cmp [eax+Figure.OType],'Obj' |
1792 | je .end0 |
1828 | je .end0 |
1793 | jmp .end_f |
1829 | jmp .end_f |
1794 | .end0: |
1830 | .end0: |
1795 | mov eax,ObjData |
1831 | mov eax,ObjData |
1796 | @@: |
1832 | @@: |
1797 | finit |
1833 | finit |
1798 | fld1 |
1834 | fld1 |
1799 | fstp qword[eax+Figure.MScale] |
1835 | fstp qword[eax+Figure.MScale] |
1800 | mov dword[eax+Figure.MCentrX],0 |
1836 | mov dword[eax+Figure.MCentrX],0 |
1801 | mov dword[eax+Figure.MCentrY],0 |
1837 | mov dword[eax+Figure.MCentrY],0 |
1802 | mov dword[offs_last_timer],0 |
1838 | mov dword[offs_last_timer],0 |
1803 | .end_f: |
1839 | .end_f: |
1804 | ret |
1840 | ret |
1805 | endp |
1841 | endp |
1806 | 1842 | ||
1807 | align 4 |
1843 | align 4 |
1808 | but_sel_figure_move_down: |
1844 | but_sel_figure_move_down: |
1809 | pushad |
1845 | pushad |
1810 | stdcall [tl_node_get_data],tree1 |
1846 | stdcall [tl_node_get_data],tree1 |
1811 | or eax,eax |
1847 | or eax,eax |
1812 | jz .end_fblo |
1848 | jz .end_fblo |
1813 | cmp [eax+Figure.OType],'Fig' |
1849 | cmp [eax+Figure.OType],'Fig' |
1814 | jne .end_fblo |
1850 | jne .end_fblo |
1815 | stdcall found_parent_obj,eax |
1851 | stdcall found_parent_obj,eax |
1816 | or eax,eax |
1852 | or eax,eax |
1817 | jz .end_f ;if not found |
1853 | jz .end_f ;if not found |
1818 | inc ecx |
1854 | inc ecx |
1819 | cmp ecx,[eax+Object.FigCount] |
1855 | cmp ecx,[eax+Object.FigCount] |
1820 | jge .fig_is_last ;¥á«¨ 䨣ãà ¢ ª®æ¥ ᯨ᪠|
1856 | jge .fig_is_last ;¥á«¨ 䨣ãà ¢ ª®æ¥ ᯨ᪠|
1821 | mov ebx,[eax+Object.FigData] |
1857 | mov ebx,[eax+Object.FigData] |
1822 | mov edx,[ebx+4*ecx] ;¯¥à¥¤¢¨£ ¥¬ ï 䨣ãà |
1858 | mov edx,[ebx+4*ecx] ;¯¥à¥¤¢¨£ ¥¬ ï 䨣ãà |
1823 | mov edi,[ebx+4*ecx-4] |
1859 | mov edi,[ebx+4*ecx-4] |
1824 | ;¬¥ï¥¬ 䨣ãàë ¬¥áâ ¬¨ |
1860 | ;¬¥ï¥¬ 䨣ãàë ¬¥áâ ¬¨ |
1825 | mov [ebx+4*ecx],edi |
1861 | mov [ebx+4*ecx],edi |
1826 | mov [ebx+4*ecx-4],edx |
1862 | mov [ebx+4*ecx-4],edx |
1827 | ;¬¥ï¥¬ 䨣ãàë ¢ ᯨ᪥ |
1863 | ;¬¥ï¥¬ 䨣ãàë ¢ ᯨ᪥ |
1828 | stdcall [tl_node_move_down],tree1 |
1864 | stdcall [tl_node_move_down],tree1 |
1829 | jmp .end_f |
1865 | jmp .end_f |
1830 | .fig_is_last: |
1866 | .fig_is_last: |
1831 | notify_window_run txt_err_figure_is_last |
1867 | notify_window_run txt_err_figure_is_last |
1832 | jmp .end_f |
1868 | jmp .end_f |
1833 | .end_fblo: |
1869 | .end_fblo: |
1834 | notify_window_run txt_err_no_figure_select |
1870 | notify_window_run txt_err_no_figure_select |
1835 | .end_f: |
1871 | .end_f: |
1836 | popad |
1872 | popad |
1837 | ret |
1873 | ret |
1838 | 1874 | ||
1839 | ;description: |
1875 | ;description: |
1840 | ; § ¯ã᪠®ª ᮧ¤ ¨ï/। ªâ¨à®¢ ¨ï â®çª¨ |
1876 | ; § ¯ã᪠®ª ᮧ¤ ¨ï/। ªâ¨à®¢ ¨ï â®çª¨ |
1841 | align 4 |
1877 | align 4 |
1842 | but_dlg_point_coords: |
1878 | but_dlg_point_coords: |
1843 | cmp byte[wnd_run_prop],0 |
1879 | cmp byte[wnd_run_prop],0 |
1844 | jne .end_f |
1880 | jne .end_f |
1845 | pushad |
1881 | pushad |
1846 | stdcall [tl_node_get_data],tree1 |
1882 | stdcall [tl_node_get_data],tree1 |
1847 | or eax,eax |
1883 | or eax,eax |
1848 | jz .end_fblo |
1884 | jz .end_fblo |
1849 | cmp [eax+Figure.OType],'Fig' |
1885 | cmp [eax+Figure.OType],'Fig' |
1850 | jne .end_fblo |
1886 | jne .end_fblo |
1851 | mov [wnd_pFig],eax ;䨣ãà |
1887 | mov [wnd_pFig],eax ;䨣ãà |
1852 | stdcall sel_points_get_count,eax |
1888 | stdcall sel_points_get_count,eax |
1853 | cmp eax,1 |
1889 | cmp eax,1 |
1854 | jne .no_select_1 |
1890 | jne .no_select_1 |
1855 | stdcall found_parent_obj,[wnd_pFig] |
1891 | stdcall found_parent_obj,[wnd_pFig] |
1856 | or eax,eax |
1892 | or eax,eax |
1857 | jz .end0 ;if not found |
1893 | jz .end0 ;if not found |
1858 | 1894 | ||
1859 | mov [wnd_pObj],eax ;obj |
1895 | mov [wnd_pObj],eax ;obj |
1860 | mov [wnd_FigN],ecx ;fig number |
1896 | mov [wnd_FigN],ecx ;fig number |
1861 | stdcall sel_points_get_first,[wnd_pFig] |
1897 | stdcall sel_points_get_first,[wnd_pFig] |
1862 | mov [wnd_pPoi],eax |
1898 | mov [wnd_pPoi],eax |
1863 | mov edx,[wnd_pFig] |
1899 | mov edx,[wnd_pFig] |
1864 | sub eax,[edx+Figure.PoiData] |
1900 | sub eax,[edx+Figure.PoiData] |
1865 | xor edx,edx |
1901 | xor edx,edx |
1866 | mov ecx,sizeof.Point |
1902 | mov ecx,sizeof.Point |
1867 | div ecx |
1903 | div ecx |
1868 | jmp .end1 |
1904 | jmp .end1 |
1869 | .no_select_1: |
1905 | .no_select_1: |
1870 | or eax,eax |
1906 | or eax,eax |
1871 | jnz .end_fblo |
1907 | jnz .end_fblo |
1872 | stdcall found_parent_obj,[wnd_pFig] |
1908 | stdcall found_parent_obj,[wnd_pFig] |
1873 | or eax,eax |
1909 | or eax,eax |
1874 | jz .end0 ;if not found |
1910 | jz .end0 ;if not found |
1875 | 1911 | ||
1876 | mov [wnd_pObj],eax ;obj |
1912 | mov [wnd_pObj],eax ;obj |
1877 | mov [wnd_FigN],ecx ;fig number |
1913 | mov [wnd_FigN],ecx ;fig number |
1878 | xor eax,eax |
1914 | xor eax,eax |
1879 | mov [wnd_pPoi],eax |
1915 | mov [wnd_pPoi],eax |
1880 | mov edx,[wnd_pFig] |
1916 | mov edx,[wnd_pFig] |
1881 | mov eax,[edx+Figure.PoiCount] |
1917 | mov eax,[edx+Figure.PoiCount] |
1882 | .end1: |
1918 | .end1: |
1883 | mov [wnd_PoiN],eax |
1919 | mov [wnd_PoiN],eax |
1884 | mcall SF_CREATE_THREAD,1,start_prop,thread_coords |
1920 | mcall SF_CREATE_THREAD,1,start_prop,thread_coords |
1885 | jmp .end0 |
1921 | jmp .end0 |
1886 | .end_fblo: |
1922 | .end_fblo: |
1887 | notify_window_run txt_err_no_1_point_sel |
1923 | notify_window_run txt_err_no_1_point_sel |
1888 | ;jmp @f |
1924 | ;jmp @f |
1889 | ;.end_fblo: |
1925 | ;.end_fblo: |
1890 | ;notify_window_run txt_err_... |
1926 | ;notify_window_run txt_err_... |
1891 | .end0: |
1927 | .end0: |
1892 | popad |
1928 | popad |
1893 | .end_f: |
1929 | .end_f: |
1894 | ret |
1930 | ret |
1895 | 1931 | ||
1896 | align 4 |
1932 | align 4 |
1897 | but_dlg_opt_scale: |
1933 | but_dlg_opt_scale: |
1898 | cmp byte[wnd_run_scale],0 |
1934 | cmp byte[wnd_run_scale],0 |
1899 | jne .end_f |
1935 | jne .end_f |
1900 | pushad |
1936 | pushad |
1901 | mcall SF_CREATE_THREAD,1,start_scale,thread_scale |
1937 | mcall SF_CREATE_THREAD,1,start_scale,thread_scale |
1902 | popad |
1938 | popad |
1903 | .end_f: |
1939 | .end_f: |
1904 | ret |
1940 | ret |
1905 | 1941 | ||
1906 | 1942 | ||
1907 | 1943 | ||
1908 | ;input: |
1944 | ;input: |
1909 | ; buf - 㪠§ ⥫ì áâபã, ç¨á«® ¤®«¦® ¡ëâì ¢ 10 ¨«¨ 16 à¨ç®¬ ¢¨¤¥ |
1945 | ; buf - 㪠§ ⥫ì áâபã, ç¨á«® ¤®«¦® ¡ëâì ¢ 10 ¨«¨ 16 à¨ç®¬ ¢¨¤¥ |
1910 | ;output: |
1946 | ;output: |
1911 | ; eax - ç¨á«® |
1947 | ; eax - ç¨á«® |
1912 | align 4 |
1948 | align 4 |
1913 | proc conv_str_to_int uses ebx ecx esi, buf:dword |
1949 | proc conv_str_to_int uses ebx ecx esi, buf:dword |
1914 | xor eax,eax |
1950 | xor eax,eax |
1915 | xor ebx,ebx |
1951 | xor ebx,ebx |
1916 | mov esi,[buf] |
1952 | mov esi,[buf] |
1917 | 1953 | ||
1918 | ; á«ãç © ¥á«¨ ¯¥à¥¤ ç¨á«®¬ 室ïâáï ¯à®¡¥«ë |
1954 | ; á«ãç © ¥á«¨ ¯¥à¥¤ ç¨á«®¬ 室ïâáï ¯à®¡¥«ë |
1919 | @@: |
1955 | @@: |
1920 | cmp byte[esi],' ' |
1956 | cmp byte[esi],' ' |
1921 | jne @f |
1957 | jne @f |
1922 | inc esi |
1958 | inc esi |
1923 | jmp @b |
1959 | jmp @b |
1924 | @@: |
1960 | @@: |
1925 | 1961 | ||
1926 | ;®¯à¥¤¥«¥¨¥ ®âà¨æ ⥫ìëå ç¨á¥« |
1962 | ;®¯à¥¤¥«¥¨¥ ®âà¨æ ⥫ìëå ç¨á¥« |
1927 | xor ecx,ecx |
1963 | xor ecx,ecx |
1928 | inc ecx |
1964 | inc ecx |
1929 | cmp byte[esi],'-' |
1965 | cmp byte[esi],'-' |
1930 | jne @f |
1966 | jne @f |
1931 | dec ecx |
1967 | dec ecx |
1932 | inc esi |
1968 | inc esi |
1933 | @@: |
1969 | @@: |
1934 | 1970 | ||
1935 | cmp word[esi],'0x' |
1971 | cmp word[esi],'0x' |
1936 | je .load_digit_16 |
1972 | je .load_digit_16 |
1937 | 1973 | ||
1938 | .load_digit_10: ;áç¨âë¢ ¨¥ 10-â¨çëå æ¨äà |
1974 | .load_digit_10: ;áç¨âë¢ ¨¥ 10-â¨çëå æ¨äà |
1939 | mov bl,byte[esi] |
1975 | mov bl,byte[esi] |
1940 | cmp bl,'0' |
1976 | cmp bl,'0' |
1941 | jl @f |
1977 | jl @f |
1942 | cmp bl,'9' |
1978 | cmp bl,'9' |
1943 | jg @f |
1979 | jg @f |
1944 | sub bl,'0' |
1980 | sub bl,'0' |
1945 | imul eax,10 |
1981 | imul eax,10 |
1946 | add eax,ebx |
1982 | add eax,ebx |
1947 | inc esi |
1983 | inc esi |
1948 | jmp .load_digit_10 |
1984 | jmp .load_digit_10 |
1949 | jmp @f |
1985 | jmp @f |
1950 | 1986 | ||
1951 | .load_digit_16: ;áç¨âë¢ ¨¥ 16-à¨çëå æ¨äà |
1987 | .load_digit_16: ;áç¨âë¢ ¨¥ 16-à¨çëå æ¨äà |
1952 | add esi,2 |
1988 | add esi,2 |
1953 | .cycle_16: |
1989 | .cycle_16: |
1954 | mov bl,byte[esi] |
1990 | mov bl,byte[esi] |
1955 | cmp bl,'0' |
1991 | cmp bl,'0' |
1956 | jl @f |
1992 | jl @f |
1957 | cmp bl,'f' |
1993 | cmp bl,'f' |
1958 | jg @f |
1994 | jg @f |
1959 | cmp bl,'9' |
1995 | cmp bl,'9' |
1960 | jle .us1 |
1996 | jle .us1 |
1961 | cmp bl,'A' |
1997 | cmp bl,'A' |
1962 | jl @f ;®âᥨ¢ ¥¬ ᨬ¢®«ë >'9' ¨ <'A' |
1998 | jl @f ;®âᥨ¢ ¥¬ ᨬ¢®«ë >'9' ¨ <'A' |
1963 | .us1: ;á®áâ ¢®¥ ãá«®¢¨¥ |
1999 | .us1: ;á®áâ ¢®¥ ãá«®¢¨¥ |
1964 | cmp bl,'F' |
2000 | cmp bl,'F' |
1965 | jle .us2 |
2001 | jle .us2 |
1966 | cmp bl,'a' |
2002 | cmp bl,'a' |
1967 | jl @f ;®âᥨ¢ ¥¬ ᨬ¢®«ë >'F' ¨ <'a' |
2003 | jl @f ;®âᥨ¢ ¥¬ ᨬ¢®«ë >'F' ¨ <'a' |
1968 | sub bl,32 ;¯¥à¥¢®¤¨¬ ᨬ¢®«ë ¢ ¢¥à娩 ॣ¨áâà, ¤«ï ã¯à®é¥¨ï ¨å ¯®á«¥¤ã饩 ®¡à ¡®âª¨ |
2004 | sub bl,32 ;¯¥à¥¢®¤¨¬ ᨬ¢®«ë ¢ ¢¥à娩 ॣ¨áâà, ¤«ï ã¯à®é¥¨ï ¨å ¯®á«¥¤ã饩 ®¡à ¡®âª¨ |
1969 | .us2: ;á®áâ ¢®¥ ãá«®¢¨¥ |
2005 | .us2: ;á®áâ ¢®¥ ãá«®¢¨¥ |
1970 | sub bl,'0' |
2006 | sub bl,'0' |
1971 | cmp bl,9 |
2007 | cmp bl,9 |
1972 | jle .cor1 |
2008 | jle .cor1 |
1973 | sub bl,7 ;convert 'A' to '10' |
2009 | sub bl,7 ;convert 'A' to '10' |
1974 | .cor1: |
2010 | .cor1: |
1975 | shl eax,4 |
2011 | shl eax,4 |
1976 | add eax,ebx |
2012 | add eax,ebx |
1977 | inc esi |
2013 | inc esi |
1978 | jmp .cycle_16 |
2014 | jmp .cycle_16 |
1979 | @@: |
2015 | @@: |
1980 | cmp ecx,0 ;¥á«¨ ç¨á«® ®âà¨æ ⥫쮥 |
2016 | cmp ecx,0 ;¥á«¨ ç¨á«® ®âà¨æ ⥫쮥 |
1981 | jne @f |
2017 | jne @f |
1982 | sub ecx,eax |
2018 | sub ecx,eax |
1983 | mov eax,ecx |
2019 | mov eax,ecx |
1984 | @@: |
2020 | @@: |
1985 | ret |
2021 | ret |
1986 | endp |
2022 | endp |
1987 | 2023 | ||
1988 | 2024 | ||
1989 | ;¤ ë¥ ¤«ï ¤¨ «®£ ®âªàëâ¨ï ä ©«®¢ |
2025 | ;¤ ë¥ ¤«ï ¤¨ «®£ ®âªàëâ¨ï ä ©«®¢ |
1990 | align 4 |
2026 | align 4 |
1991 | OpenDialog_data: |
2027 | OpenDialog_data: |
1992 | .type dd 0 ;0 - ®âªàëâì, 1 - á®åà ¨âì, 2 - ¢ë¡à âì ¤â४â®à¨î |
2028 | .type dd 0 ;0 - ®âªàëâì, 1 - á®åà ¨âì, 2 - ¢ë¡à âì ¤â४â®à¨î |
1993 | .procinfo dd procinfo ;+4 |
2029 | .procinfo dd procinfo ;+4 |
1994 | .com_area_name dd communication_area_name ;+8 |
2030 | .com_area_name dd communication_area_name ;+8 |
1995 | .com_area dd 0 ;+12 |
2031 | .com_area dd 0 ;+12 |
1996 | .opendir_path dd plugin_path ;+16 |
2032 | .opendir_path dd plugin_path ;+16 |
1997 | .dir_default_path dd default_dir ;+20 |
2033 | .dir_default_path dd default_dir ;+20 |
1998 | .start_path dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢ |
2034 | .start_path dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢ |
1999 | .draw_window dd draw_window ;+28 |
2035 | .draw_window dd draw_window ;+28 |
2000 | .status dd 0 ;+32 |
2036 | .status dd 0 ;+32 |
2001 | .openfile_path dd openfile_path ;+36 ¯ãâì ª ®âªàë¢ ¥¬®¬ã ä ©«ã |
2037 | .openfile_path dd openfile_path ;+36 ¯ãâì ª ®âªàë¢ ¥¬®¬ã ä ©«ã |
2002 | .filename_area dd filename_area ;+40 |
2038 | .filename_area dd filename_area ;+40 |
2003 | .filter_area dd Filter |
2039 | .filter_area dd Filter |
2004 | .x: |
2040 | .x: |
2005 | .x_size dw 420 ;+48 ; Window X size |
2041 | .x_size dw 420 ;+48 ; Window X size |
2006 | .x_start dw 10 ;+50 ; Window X position |
2042 | .x_start dw 10 ;+50 ; Window X position |
2007 | .y: |
2043 | .y: |
2008 | .y_size dw 320 ;+52 ; Window y size |
2044 | .y_size dw 320 ;+52 ; Window y size |
2009 | .y_start dw 10 ;+54 ; Window Y position |
2045 | .y_start dw 10 ;+54 ; Window Y position |
2010 | 2046 | ||
2011 | default_dir db '/rd/1',0 |
2047 | default_dir db '/rd/1',0 |
2012 | 2048 | ||
2013 | communication_area_name: |
2049 | communication_area_name: |
2014 | db 'FFFFFFFF_open_dialog',0 |
2050 | db 'FFFFFFFF_open_dialog',0 |
2015 | open_dialog_name: |
2051 | open_dialog_name: |
2016 | db 'opendial',0 |
2052 | db 'opendial',0 |
2017 | communication_area_default_path: |
2053 | communication_area_default_path: |
2018 | db '/rd/1/File managers/',0 |
2054 | db '/rd/1/File managers/',0 |
2019 | 2055 | ||
2020 | Filter: |
2056 | Filter: |
2021 | dd Filter.end - Filter ;.1 |
2057 | dd Filter.end - Filter ;.1 |
2022 | .1: |
- | |
2023 | db 'NC',0 |
2058 | .1: db 'NC',0 |
2024 | db 'PNG',0 |
2059 | .2: db 'PNG',0 |
2025 | .end: |
2060 | .end: |
2026 | db 0 |
2061 | db 0 |
2027 | 2062 | ||
2028 | - | ||
2029 | 2063 | ||
2030 | head_f_i: |
- | |
2031 | head_f_l db '¨á⥬ ï ®è¨¡ª ',0 |
- | |
2032 | 2064 | align 4 |
|
2033 | system_dir_0 db '/sys/lib/' |
2065 | system_dir_0 db '/sys/lib/' |
2034 | lib_name_0 db 'proc_lib.obj',0 |
- | |
2035 | err_message_found_lib_0 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'proc_lib.obj',39,0 |
- | |
2036 | err_message_import_0 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,0 |
- | |
2037 | 2066 | lib_name_0 db 'proc_lib.obj',0 |
|
2038 | system_dir_1 db '/sys/lib/' |
2067 | system_dir_1 db '/sys/lib/' |
2039 | lib_name_1 db 'libimg.obj',0 |
- | |
2040 | err_message_found_lib_1 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'libimg.obj',39,0 |
- | |
2041 | err_message_import_1 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,0 |
- | |
2042 | 2068 | lib_name_1 db 'libimg.obj',0 |
|
2043 | system_dir_2 db '/sys/lib/' |
2069 | system_dir_2 db '/sys/lib/' |
2044 | lib_name_2 db 'buf2d.obj',0 |
- | |
2045 | err_msg_found_lib_2 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'buf2d.obj',39,0 |
- | |
2046 | err_msg_import_2 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,0 |
- | |
2047 | 2070 | lib_name_2 db 'buf2d.obj',0 |
|
2048 | system_dir_3 db '/sys/lib/' |
2071 | system_dir_3 db '/sys/lib/' |
2049 | lib_name_3 db 'box_lib.obj',0 |
- | |
2050 | err_msg_found_lib_3 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'box_lib.obj',39,0 |
- | |
- | 2072 | lib_name_3 db 'box_lib.obj',0 |
|
- | 2073 | ||
- | 2074 | head_f_i: |
|
- | 2075 | if lang eq ru |
|
- | 2076 | head_f_l db '"¨á⥬ ï ®è¨¡ª ',0 |
|
- | 2077 | err_message_found_lib_0 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'proc_lib.obj',39,'" -tE',0 |
|
- | 2078 | err_message_import_0 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,'" -tW',0 |
|
- | 2079 | err_message_found_lib_1 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'libimg.obj',39,'" -tE',0 |
|
- | 2080 | err_message_import_1 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,'" -tW',0 |
|
- | 2081 | err_msg_found_lib_2 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'buf2d.obj',39,'" -tE',0 |
|
- | 2082 | err_msg_import_2 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,'" -tW',0 |
|
- | 2083 | err_msg_found_lib_3 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'box_lib.obj',39,'" -tE',0 |
|
- | 2084 | err_msg_import_3 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'box_lib',39,'" -tW',0 |
|
- | 2085 | else |
|
- | 2086 | head_f_l db '"System error',0 |
|
- | 2087 | err_message_found_lib_0 db 'Sorry I cannot found library ',39,'proc_lib.obj',39,'" -tE',0 |
|
- | 2088 | err_message_import_0 db 'Error on load import library ',39,'proc_lib.obj',39,'" -tW',0 |
|
- | 2089 | err_message_found_lib_1 db 'Sorry I cannot found library ',39,'libimg.obj',39,'" -tE',0 |
|
- | 2090 | err_message_import_1 db 'Error on load import library ',39,'libimg.obj',39,'" -tW',0 |
|
- | 2091 | err_msg_found_lib_2 db 'Sorry I cannot found library ',39,'buf2d.obj',39,'" -tE',0 |
|
- | 2092 | err_msg_import_2 db 'Error on load import library ',39,'buf2d',39,'" -tW',0 |
|
- | 2093 | err_msg_found_lib_3 db 'Sorry I cannot found library ',39,'box_lib.obj',39,'" -tE',0 |
|
- | 2094 | err_msg_import_3 db 'Error on load import library ',39,'box_lib',39,'" -tW',0 |
|
- | 2095 | end if |
|
2051 | err_msg_import_3 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'box_lib',39,0 |
2096 | |
2052 | 2097 | align 4 |
|
2053 | l_libs_start: |
2098 | l_libs_start: |
2054 | lib_0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\ |
2099 | lib_0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\ |
2055 | err_message_found_lib_0, head_f_l, proclib_import,err_message_import_0, head_f_i |
2100 | err_message_found_lib_0, head_f_l, proclib_import,err_message_import_0, head_f_i |
2056 | lib_1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\ |
2101 | lib_1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\ |
2057 | err_message_found_lib_1, head_f_l, import_libimg, err_message_import_1, head_f_i |
2102 | err_message_found_lib_1, head_f_l, import_libimg, err_message_import_1, head_f_i |
2058 | lib_2 l_libs lib_name_2, sys_path, library_path, system_dir_2,\ |
2103 | lib_2 l_libs lib_name_2, sys_path, library_path, system_dir_2,\ |
2059 | err_msg_found_lib_2,head_f_l,import_buf2d,err_msg_import_2,head_f_i |
2104 | err_msg_found_lib_2,head_f_l,import_buf2d,err_msg_import_2,head_f_i |
2060 | lib_3 l_libs lib_name_3, sys_path, file_name, system_dir_3,\ |
2105 | lib_3 l_libs lib_name_3, sys_path, file_name, system_dir_3,\ |
2061 | err_msg_found_lib_3, head_f_l, import_box_lib,err_msg_import_3,head_f_i |
2106 | err_msg_found_lib_3, head_f_l, import_box_lib,err_msg_import_3,head_f_i |
2062 | l_libs_end: |
2107 | l_libs_end: |
2063 | 2108 | ||
2064 | align 4 |
2109 | align 4 |
2065 | import_libimg: |
2110 | import_libimg: |
2066 | dd alib_init1 |
2111 | dd alib_init1 |
2067 | img_is_img dd aimg_is_img |
2112 | img_is_img dd aimg_is_img |
2068 | img_info dd aimg_info |
2113 | img_info dd aimg_info |
2069 | img_from_file dd aimg_from_file |
2114 | img_from_file dd aimg_from_file |
2070 | img_to_file dd aimg_to_file |
2115 | img_to_file dd aimg_to_file |
2071 | img_from_rgb dd aimg_from_rgb |
2116 | img_from_rgb dd aimg_from_rgb |
2072 | img_to_rgb dd aimg_to_rgb |
2117 | img_to_rgb dd aimg_to_rgb |
2073 | img_to_rgb2 dd aimg_to_rgb2 |
2118 | img_to_rgb2 dd aimg_to_rgb2 |
2074 | img_decode dd aimg_decode |
2119 | img_decode dd aimg_decode |
2075 | img_encode dd aimg_encode |
2120 | img_encode dd aimg_encode |
2076 | img_create dd aimg_create |
2121 | img_create dd aimg_create |
2077 | img_destroy dd aimg_destroy |
2122 | img_destroy dd aimg_destroy |
2078 | img_destroy_layer dd aimg_destroy_layer |
2123 | img_destroy_layer dd aimg_destroy_layer |
2079 | img_count dd aimg_count |
2124 | img_count dd aimg_count |
2080 | img_lock_bits dd aimg_lock_bits |
2125 | img_lock_bits dd aimg_lock_bits |
2081 | img_unlock_bits dd aimg_unlock_bits |
2126 | img_unlock_bits dd aimg_unlock_bits |
2082 | img_flip dd aimg_flip |
2127 | img_flip dd aimg_flip |
2083 | img_flip_layer dd aimg_flip_layer |
2128 | img_flip_layer dd aimg_flip_layer |
2084 | img_rotate dd aimg_rotate |
2129 | img_rotate dd aimg_rotate |
2085 | img_rotate_layer dd aimg_rotate_layer |
2130 | img_rotate_layer dd aimg_rotate_layer |
2086 | img_draw dd aimg_draw |
2131 | img_draw dd aimg_draw |
2087 | 2132 | ||
2088 | dd 0,0 |
2133 | dd 0,0 |
2089 | alib_init1 db 'lib_init',0 |
2134 | alib_init1 db 'lib_init',0 |
2090 | aimg_is_img db 'img_is_img',0 ;®¯à¥¤¥«ï¥â ¯® ¤ ë¬, ¬®¦¥â «¨ ¡¨¡«¨®â¥ª ᤥ« âì ¨§ ¨å ¨§®¡à ¦¥¨¥ |
2135 | aimg_is_img db 'img_is_img',0 ;®¯à¥¤¥«ï¥â ¯® ¤ ë¬, ¬®¦¥â «¨ ¡¨¡«¨®â¥ª ᤥ« âì ¨§ ¨å ¨§®¡à ¦¥¨¥ |
2091 | aimg_info db 'img_info',0 |
2136 | aimg_info db 'img_info',0 |
2092 | aimg_from_file db 'img_from_file',0 |
2137 | aimg_from_file db 'img_from_file',0 |
2093 | aimg_to_file db 'img_to_file',0 |
2138 | aimg_to_file db 'img_to_file',0 |
2094 | aimg_from_rgb db 'img_from_rgb',0 |
2139 | aimg_from_rgb db 'img_from_rgb',0 |
2095 | aimg_to_rgb db 'img_to_rgb',0 ;¯à¥®¡à §®¢ ¨¥ ¨§®¡à ¦¥¨ï ¢ ¤ ë¥ RGB |
2140 | aimg_to_rgb db 'img_to_rgb',0 ;¯à¥®¡à §®¢ ¨¥ ¨§®¡à ¦¥¨ï ¢ ¤ ë¥ RGB |
2096 | aimg_to_rgb2 db 'img_to_rgb2',0 |
2141 | aimg_to_rgb2 db 'img_to_rgb2',0 |
2097 | aimg_decode db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ëå |
2142 | aimg_decode db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ëå |
2098 | aimg_encode db 'img_encode',0 |
2143 | aimg_encode db 'img_encode',0 |
2099 | aimg_create db 'img_create',0 |
2144 | aimg_create db 'img_create',0 |
2100 | aimg_destroy db 'img_destroy',0 |
2145 | aimg_destroy db 'img_destroy',0 |
2101 | aimg_destroy_layer db 'img_destroy_layer',0 |
2146 | aimg_destroy_layer db 'img_destroy_layer',0 |
2102 | aimg_count db 'img_count',0 |
2147 | aimg_count db 'img_count',0 |
2103 | aimg_lock_bits db 'img_lock_bits',0 |
2148 | aimg_lock_bits db 'img_lock_bits',0 |
2104 | aimg_unlock_bits db 'img_unlock_bits',0 |
2149 | aimg_unlock_bits db 'img_unlock_bits',0 |
2105 | aimg_flip db 'img_flip',0 |
2150 | aimg_flip db 'img_flip',0 |
2106 | aimg_flip_layer db 'img_flip_layer',0 |
2151 | aimg_flip_layer db 'img_flip_layer',0 |
2107 | aimg_rotate db 'img_rotate',0 |
2152 | aimg_rotate db 'img_rotate',0 |
2108 | aimg_rotate_layer db 'img_rotate_layer',0 |
2153 | aimg_rotate_layer db 'img_rotate_layer',0 |
2109 | aimg_draw db 'img_draw',0 |
2154 | aimg_draw db 'img_draw',0 |
2110 | 2155 | ||
2111 | align 4 |
2156 | align 4 |
2112 | proclib_import: ;®¯¨á ¨¥ íªá¯®àâ¨à㥬ëå äãªæ¨© |
2157 | proclib_import: ;®¯¨á ¨¥ íªá¯®àâ¨à㥬ëå äãªæ¨© |
2113 | OpenDialog_Init dd aOpenDialog_Init |
2158 | OpenDialog_Init dd aOpenDialog_Init |
2114 | OpenDialog_Start dd aOpenDialog_Start |
2159 | OpenDialog_Start dd aOpenDialog_Start |
- | 2160 | OpenDialog_Set_file_name dd aOpenDialog_Set_file_name |
|
- | 2161 | OpenDialog_Set_file_ext dd aOpenDialog_Set_file_ext |
|
2115 | dd 0,0 |
2162 | dd 0,0 |
2116 | aOpenDialog_Init db 'OpenDialog_init',0 |
2163 | aOpenDialog_Init db 'OpenDialog_init',0 |
2117 | aOpenDialog_Start db 'OpenDialog_start',0 |
2164 | aOpenDialog_Start db 'OpenDialog_start',0 |
- | 2165 | aOpenDialog_Set_file_name db 'OpenDialog_set_file_name',0 |
|
- | 2166 | aOpenDialog_Set_file_ext db 'OpenDialog_set_file_ext',0 |
|
2118 | 2167 | ||
2119 | align 4 |
2168 | align 4 |
2120 | import_buf2d: |
2169 | import_buf2d: |
2121 | init dd sz_init |
2170 | init dd sz_init |
2122 | buf2d_create dd sz_buf2d_create |
2171 | buf2d_create dd sz_buf2d_create |
2123 | buf2d_create_f_img dd sz_buf2d_create_f_img |
2172 | buf2d_create_f_img dd sz_buf2d_create_f_img |
2124 | buf2d_clear dd sz_buf2d_clear |
2173 | buf2d_clear dd sz_buf2d_clear |
2125 | buf2d_draw dd sz_buf2d_draw |
2174 | buf2d_draw dd sz_buf2d_draw |
2126 | buf2d_delete dd sz_buf2d_delete |
2175 | buf2d_delete dd sz_buf2d_delete |
2127 | buf2d_resize dd sz_buf2d_resize |
2176 | buf2d_resize dd sz_buf2d_resize |
2128 | buf2d_line dd sz_buf2d_line |
2177 | buf2d_line dd sz_buf2d_line |
2129 | buf2d_line_sm dd sz_buf2d_line_sm |
2178 | buf2d_line_sm dd sz_buf2d_line_sm |
2130 | buf2d_rect_by_size dd sz_buf2d_rect_by_size |
2179 | buf2d_rect_by_size dd sz_buf2d_rect_by_size |
2131 | buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size |
2180 | buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size |
2132 | buf2d_circle dd sz_buf2d_circle |
2181 | buf2d_circle dd sz_buf2d_circle |
2133 | buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2 |
2182 | buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2 |
2134 | buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2 |
2183 | buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2 |
2135 | buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8 |
2184 | buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8 |
2136 | buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32 |
2185 | buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32 |
2137 | buf2d_bit_blt dd sz_buf2d_bit_blt |
2186 | buf2d_bit_blt dd sz_buf2d_bit_blt |
2138 | buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp |
2187 | buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp |
2139 | buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha |
2188 | buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha |
2140 | buf2d_curve_bezier dd sz_buf2d_curve_bezier |
2189 | buf2d_curve_bezier dd sz_buf2d_curve_bezier |
2141 | buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix |
2190 | buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix |
2142 | buf2d_draw_text dd sz_buf2d_draw_text |
2191 | buf2d_draw_text dd sz_buf2d_draw_text |
2143 | buf2d_crop_color dd sz_buf2d_crop_color |
2192 | buf2d_crop_color dd sz_buf2d_crop_color |
2144 | buf2d_flip_h dd sz_buf2d_flip_h |
2193 | buf2d_flip_h dd sz_buf2d_flip_h |
2145 | buf2d_flip_v dd sz_buf2d_flip_v |
2194 | buf2d_flip_v dd sz_buf2d_flip_v |
2146 | buf2d_offset_h dd sz_buf2d_offset_h |
2195 | buf2d_offset_h dd sz_buf2d_offset_h |
2147 | buf2d_flood_fill dd sz_buf2d_flood_fill |
2196 | buf2d_flood_fill dd sz_buf2d_flood_fill |
2148 | buf2d_set_pixel dd sz_buf2d_set_pixel |
2197 | buf2d_set_pixel dd sz_buf2d_set_pixel |
2149 | dd 0,0 |
2198 | dd 0,0 |
2150 | sz_init db 'lib_init',0 |
2199 | sz_init db 'lib_init',0 |
2151 | sz_buf2d_create db 'buf2d_create',0 |
2200 | sz_buf2d_create db 'buf2d_create',0 |
2152 | sz_buf2d_create_f_img db 'buf2d_create_f_img',0 |
2201 | sz_buf2d_create_f_img db 'buf2d_create_f_img',0 |
2153 | sz_buf2d_clear db 'buf2d_clear',0 |
2202 | sz_buf2d_clear db 'buf2d_clear',0 |
2154 | sz_buf2d_draw db 'buf2d_draw',0 |
2203 | sz_buf2d_draw db 'buf2d_draw',0 |
2155 | sz_buf2d_delete db 'buf2d_delete',0 |
2204 | sz_buf2d_delete db 'buf2d_delete',0 |
2156 | sz_buf2d_resize db 'buf2d_resize',0 |
2205 | sz_buf2d_resize db 'buf2d_resize',0 |
2157 | sz_buf2d_line db 'buf2d_line',0 |
2206 | sz_buf2d_line db 'buf2d_line',0 |
2158 | sz_buf2d_line_sm db 'buf2d_line_sm',0 |
2207 | sz_buf2d_line_sm db 'buf2d_line_sm',0 |
2159 | sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0 |
2208 | sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0 |
2160 | sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0 |
2209 | sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0 |
2161 | sz_buf2d_circle db 'buf2d_circle',0 |
2210 | sz_buf2d_circle db 'buf2d_circle',0 |
2162 | sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0 |
2211 | sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0 |
2163 | sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0 |
2212 | sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0 |
2164 | sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0 |
2213 | sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0 |
2165 | sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0 |
2214 | sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0 |
2166 | sz_buf2d_bit_blt db 'buf2d_bit_blt',0 |
2215 | sz_buf2d_bit_blt db 'buf2d_bit_blt',0 |
2167 | sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0 |
2216 | sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0 |
2168 | sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0 |
2217 | sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0 |
2169 | sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0 |
2218 | sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0 |
2170 | sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0 |
2219 | sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0 |
2171 | sz_buf2d_draw_text db 'buf2d_draw_text',0 |
2220 | sz_buf2d_draw_text db 'buf2d_draw_text',0 |
2172 | sz_buf2d_crop_color db 'buf2d_crop_color',0 |
2221 | sz_buf2d_crop_color db 'buf2d_crop_color',0 |
2173 | sz_buf2d_flip_h db 'buf2d_flip_h',0 |
2222 | sz_buf2d_flip_h db 'buf2d_flip_h',0 |
2174 | sz_buf2d_flip_v db 'buf2d_flip_v',0 |
2223 | sz_buf2d_flip_v db 'buf2d_flip_v',0 |
2175 | sz_buf2d_offset_h db 'buf2d_offset_h',0 |
2224 | sz_buf2d_offset_h db 'buf2d_offset_h',0 |
2176 | sz_buf2d_flood_fill db 'buf2d_flood_fill',0 |
2225 | sz_buf2d_flood_fill db 'buf2d_flood_fill',0 |
2177 | sz_buf2d_set_pixel db 'buf2d_set_pixel',0 |
2226 | sz_buf2d_set_pixel db 'buf2d_set_pixel',0 |
2178 | 2227 | ||
2179 | align 4 |
2228 | align 4 |
2180 | import_box_lib: |
2229 | import_box_lib: |
2181 | dd sz_init1 |
2230 | dd sz_init1 |
2182 | 2231 | ||
2183 | init_checkbox dd sz_Init_checkbox |
2232 | init_checkbox dd sz_Init_checkbox |
2184 | check_box_draw dd sz_Check_box_draw |
2233 | check_box_draw dd sz_Check_box_draw |
2185 | check_box_mouse dd sz_Check_box_mouse |
2234 | check_box_mouse dd sz_Check_box_mouse |
2186 | ;version_ch dd sz_Version_ch |
2235 | ;version_ch dd sz_Version_ch |
2187 | 2236 | ||
2188 | option_box_draw dd sz_Option_box_draw |
2237 | option_box_draw dd sz_Option_box_draw |
2189 | option_box_mouse dd sz_Option_box_mouse |
2238 | option_box_mouse dd sz_Option_box_mouse |
2190 | ;version_op dd sz_Version_op |
2239 | ;version_op dd sz_Version_op |
2191 | 2240 | ||
2192 | edit_box_draw dd sz_edit_box_draw |
2241 | edit_box_draw dd sz_edit_box_draw |
2193 | edit_box_key dd sz_edit_box_key |
2242 | edit_box_key dd sz_edit_box_key |
2194 | edit_box_mouse dd sz_edit_box_mouse |
2243 | edit_box_mouse dd sz_edit_box_mouse |
2195 | edit_box_set_text dd sz_edit_box_set_text |
2244 | edit_box_set_text dd sz_edit_box_set_text |
2196 | scrollbar_ver_draw dd sz_scrollbar_ver_draw |
2245 | scrollbar_ver_draw dd sz_scrollbar_ver_draw |
2197 | scrollbar_hor_draw dd sz_scrollbar_hor_draw |
2246 | scrollbar_hor_draw dd sz_scrollbar_hor_draw |
2198 | 2247 | ||
2199 | tl_data_init dd sz_tl_data_init |
2248 | tl_data_init dd sz_tl_data_init |
2200 | tl_data_clear dd sz_tl_data_clear |
2249 | tl_data_clear dd sz_tl_data_clear |
2201 | tl_info_clear dd sz_tl_info_clear |
2250 | tl_info_clear dd sz_tl_info_clear |
2202 | tl_key dd sz_tl_key |
2251 | tl_key dd sz_tl_key |
2203 | tl_mouse dd sz_tl_mouse |
2252 | tl_mouse dd sz_tl_mouse |
2204 | tl_draw dd sz_tl_draw |
2253 | tl_draw dd sz_tl_draw |
2205 | tl_info_undo dd sz_tl_info_undo |
2254 | tl_info_undo dd sz_tl_info_undo |
2206 | tl_info_redo dd sz_tl_info_redo |
2255 | tl_info_redo dd sz_tl_info_redo |
2207 | tl_node_add dd sz_tl_node_add |
2256 | tl_node_add dd sz_tl_node_add |
2208 | tl_node_set_data dd sz_tl_node_set_data |
2257 | tl_node_set_data dd sz_tl_node_set_data |
2209 | tl_node_get_data dd sz_tl_node_get_data |
2258 | tl_node_get_data dd sz_tl_node_get_data |
2210 | tl_node_delete dd sz_tl_node_delete |
2259 | tl_node_delete dd sz_tl_node_delete |
2211 | tl_node_move_up dd sz_tl_node_move_up |
2260 | tl_node_move_up dd sz_tl_node_move_up |
2212 | tl_node_move_down dd sz_tl_node_move_down |
2261 | tl_node_move_down dd sz_tl_node_move_down |
2213 | tl_cur_beg dd sz_tl_cur_beg |
2262 | tl_cur_beg dd sz_tl_cur_beg |
2214 | tl_cur_next dd sz_tl_cur_next |
2263 | tl_cur_next dd sz_tl_cur_next |
2215 | tl_cur_perv dd sz_tl_cur_perv |
2264 | tl_cur_perv dd sz_tl_cur_perv |
2216 | tl_node_close_open dd sz_tl_node_close_open |
2265 | tl_node_close_open dd sz_tl_node_close_open |
2217 | tl_node_lev_inc dd sz_tl_node_lev_inc |
2266 | tl_node_lev_inc dd sz_tl_node_lev_inc |
2218 | tl_node_lev_dec dd sz_tl_node_lev_dec |
2267 | tl_node_lev_dec dd sz_tl_node_lev_dec |
2219 | tl_node_poi_get_info dd sz_tl_node_poi_get_info |
2268 | tl_node_poi_get_info dd sz_tl_node_poi_get_info |
2220 | tl_node_poi_get_next_info dd sz_tl_node_poi_get_next_info |
2269 | tl_node_poi_get_next_info dd sz_tl_node_poi_get_next_info |
2221 | tl_node_poi_get_data dd sz_tl_node_poi_get_data |
2270 | tl_node_poi_get_data dd sz_tl_node_poi_get_data |
2222 | 2271 | ||
2223 | dd 0,0 |
2272 | dd 0,0 |
2224 | sz_init1 db 'lib_init',0 |
2273 | sz_init1 db 'lib_init',0 |
2225 | 2274 | ||
2226 | sz_Init_checkbox db 'init_checkbox2',0 |
2275 | sz_Init_checkbox db 'init_checkbox2',0 |
2227 | sz_Check_box_draw db 'check_box_draw2',0 |
2276 | sz_Check_box_draw db 'check_box_draw2',0 |
2228 | sz_Check_box_mouse db 'check_box_mouse2',0 |
2277 | sz_Check_box_mouse db 'check_box_mouse2',0 |
2229 | ;sz_Version_ch db 'version_ch2',0 |
2278 | ;sz_Version_ch db 'version_ch2',0 |
2230 | 2279 | ||
2231 | sz_Option_box_draw db 'option_box_draw',0 |
2280 | sz_Option_box_draw db 'option_box_draw',0 |
2232 | sz_Option_box_mouse db 'option_box_mouse',0 |
2281 | sz_Option_box_mouse db 'option_box_mouse',0 |
2233 | ;sz_Version_op db 'version_op',0 |
2282 | ;sz_Version_op db 'version_op',0 |
2234 | 2283 | ||
2235 | sz_edit_box_draw db 'edit_box',0 |
2284 | sz_edit_box_draw db 'edit_box',0 |
2236 | sz_edit_box_key db 'edit_box_key',0 |
2285 | sz_edit_box_key db 'edit_box_key',0 |
2237 | sz_edit_box_mouse db 'edit_box_mouse',0 |
2286 | sz_edit_box_mouse db 'edit_box_mouse',0 |
2238 | sz_edit_box_set_text db 'edit_box_set_text',0 |
2287 | sz_edit_box_set_text db 'edit_box_set_text',0 |
2239 | sz_scrollbar_ver_draw db 'scrollbar_v_draw',0 |
2288 | sz_scrollbar_ver_draw db 'scrollbar_v_draw',0 |
2240 | sz_scrollbar_hor_draw db 'scrollbar_h_draw',0 |
2289 | sz_scrollbar_hor_draw db 'scrollbar_h_draw',0 |
2241 | 2290 | ||
2242 | sz_tl_data_init db 'tl_data_init',0 |
2291 | sz_tl_data_init db 'tl_data_init',0 |
2243 | sz_tl_data_clear db 'tl_data_clear',0 |
2292 | sz_tl_data_clear db 'tl_data_clear',0 |
2244 | sz_tl_info_clear db 'tl_info_clear',0 |
2293 | sz_tl_info_clear db 'tl_info_clear',0 |
2245 | sz_tl_key db 'tl_key',0 |
2294 | sz_tl_key db 'tl_key',0 |
2246 | sz_tl_mouse db 'tl_mouse',0 |
2295 | sz_tl_mouse db 'tl_mouse',0 |
2247 | sz_tl_draw db 'tl_draw',0 |
2296 | sz_tl_draw db 'tl_draw',0 |
2248 | sz_tl_info_undo db 'tl_info_undo',0 |
2297 | sz_tl_info_undo db 'tl_info_undo',0 |
2249 | sz_tl_info_redo db 'tl_info_redo',0 |
2298 | sz_tl_info_redo db 'tl_info_redo',0 |
2250 | sz_tl_node_add db 'tl_node_add',0 |
2299 | sz_tl_node_add db 'tl_node_add',0 |
2251 | sz_tl_node_set_data db 'tl_node_set_data',0 |
2300 | sz_tl_node_set_data db 'tl_node_set_data',0 |
2252 | sz_tl_node_get_data db 'tl_node_get_data',0 |
2301 | sz_tl_node_get_data db 'tl_node_get_data',0 |
2253 | sz_tl_node_delete db 'tl_node_delete',0 |
2302 | sz_tl_node_delete db 'tl_node_delete',0 |
2254 | sz_tl_node_move_up db 'tl_node_move_up',0 |
2303 | sz_tl_node_move_up db 'tl_node_move_up',0 |
2255 | sz_tl_node_move_down db 'tl_node_move_down',0 |
2304 | sz_tl_node_move_down db 'tl_node_move_down',0 |
2256 | sz_tl_cur_beg db 'tl_cur_beg',0 |
2305 | sz_tl_cur_beg db 'tl_cur_beg',0 |
2257 | sz_tl_cur_next db 'tl_cur_next',0 |
2306 | sz_tl_cur_next db 'tl_cur_next',0 |
2258 | sz_tl_cur_perv db 'tl_cur_perv',0 |
2307 | sz_tl_cur_perv db 'tl_cur_perv',0 |
2259 | sz_tl_node_close_open db 'tl_node_close_open',0 |
2308 | sz_tl_node_close_open db 'tl_node_close_open',0 |
2260 | sz_tl_node_lev_inc db 'tl_node_lev_inc',0 |
2309 | sz_tl_node_lev_inc db 'tl_node_lev_inc',0 |
2261 | sz_tl_node_lev_dec db 'tl_node_lev_dec',0 |
2310 | sz_tl_node_lev_dec db 'tl_node_lev_dec',0 |
2262 | sz_tl_node_poi_get_info db 'tl_node_poi_get_info',0 |
2311 | sz_tl_node_poi_get_info db 'tl_node_poi_get_info',0 |
2263 | sz_tl_node_poi_get_next_info db 'tl_node_poi_get_next_info',0 |
2312 | sz_tl_node_poi_get_next_info db 'tl_node_poi_get_next_info',0 |
2264 | sz_tl_node_poi_get_data db 'tl_node_poi_get_data',0 |
2313 | sz_tl_node_poi_get_data db 'tl_node_poi_get_data',0 |
2265 | 2314 | ||
2266 | align 4 |
2315 | align 4 |
2267 | mouse_dd dd 0 |
2316 | mouse_dd dd 0 |
2268 | last_time dd 0 |
2317 | last_time dd 0 |
2269 | 2318 | ||
2270 | align 16 |
2319 | align 16 |
2271 | sc system_colors |
2320 | sc system_colors |
2272 | 2321 | ||
2273 | align 16 |
2322 | align 16 |
2274 | procinfo process_information |
2323 | procinfo process_information |
2275 | 2324 | ||
2276 | align 4 |
2325 | align 4 |
2277 | buf_0: dd 0 ;㪠§ â¥«ì ¡ãä¥à ¨§®¡à ¦¥¨ï |
2326 | buf_0: dd 0 ;㪠§ â¥«ì ¡ãä¥à ¨§®¡à ¦¥¨ï |
2278 | .l: dw 205 ;+4 left |
2327 | .l: dw 205 ;+4 left |
2279 | .t: dw 35 ;+6 top |
2328 | .t: dw 35 ;+6 top |
2280 | .w: dd 384 ;+8 w |
2329 | .w: dd 384 ;+8 w |
2281 | .h: dd 350 ;+12 h |
2330 | .h: dd 350 ;+12 h |
2282 | .color: dd 0xffffd0 ;+16 color |
2331 | .color: dd 0xffffd0 ;+16 color |
2283 | db 24 ;+20 bit in pixel |
2332 | db 24 ;+20 bit in pixel |
2284 | 2333 | ||
2285 | align 4 |
2334 | align 4 |
2286 | buf_1: |
2335 | buf_1: |
2287 | dd 0 ;㪠§ â¥«ì ¡ãä¥à ¨§®¡à ¦¥¨ï |
2336 | dd 0 ;㪠§ â¥«ì ¡ãä¥à ¨§®¡à ¦¥¨ï |
2288 | dd 0 ;+4 left,top |
2337 | dd 0 ;+4 left,top |
2289 | .w: dd 0 |
2338 | .w: dd 0 |
2290 | .h: dd 0,0,24 ;+12 color,bit in pixel |
2339 | .h: dd 0,0,24 ;+12 color,bit in pixel |
2291 | 2340 | ||
2292 | font_h dd 0 ;¢ëá®â èà¨äâ |
2341 | font_h dd 0 ;¢ëá®â èà¨äâ |
2293 | 2342 | ||
2294 | align 4 |
2343 | align 4 |
2295 | buf_png: |
2344 | buf_png: |
2296 | dd 0,0 |
2345 | dd 0,0 |
2297 | .w: dd 0 |
2346 | .w: dd 0 |
2298 | .h: dd 0,0xffffff,24 |
2347 | .h: dd 0,0xffffff,24 |
2299 | 2348 | ||
2300 | align 4 |
2349 | align 4 |
2301 | el_focus dd tree1 |
2350 | el_focus dd tree1 |
2302 | tree1 tree_list size_one_list,1000+2, tl_key_no_edit+tl_draw_par_line,\ |
2351 | tree1 tree_list size_one_list,1000+2, tl_key_no_edit+tl_draw_par_line,\ |
2303 | 16,16, 0xffffff,0xb0d0ff,0x400040, 5,35,195-16,340, 16,Figure.Caption,0,\ |
2352 | 16,16, 0xffffff,0xb0d0ff,0x400040, 5,35,195-16,340, 16,Figure.Caption,0,\ |
2304 | el_focus,w_scr_t1,0 |
2353 | el_focus,w_scr_t1,0 |
2305 | 2354 | ||
2306 | align 4 |
2355 | align 4 |
2307 | w_scr_t1 scrollbar 16,0, 3,0, 15, 100, 0,0, 0,0,0, 1 |
2356 | w_scr_t1 scrollbar 16,0, 3,0, 15, 100, 0,0, 0,0,0, 1 |
2308 | 2357 | ||
2309 | ;input: |
2358 | ;input: |
2310 | ; eax - ç¨á«® |
2359 | ; eax - ç¨á«® |
2311 | ; edi - ¡ãä¥à ¤«ï áâப¨ |
2360 | ; edi - ¡ãä¥à ¤«ï áâப¨ |
2312 | ; len - ¤«¨ ¡ãä¥à |
2361 | ; len - ¤«¨ ¡ãä¥à |
2313 | ;output: |
2362 | ;output: |
2314 | align 4 |
2363 | align 4 |
2315 | proc convert_int_to_str uses eax ecx edx edi esi, len:dword |
2364 | proc convert_int_to_str uses eax ecx edx edi esi, len:dword |
2316 | mov esi,[len] |
2365 | mov esi,[len] |
2317 | add esi,edi |
2366 | add esi,edi |
2318 | dec esi |
2367 | dec esi |
2319 | call .str |
2368 | call .str |
2320 | ret |
2369 | ret |
2321 | endp |
2370 | endp |
2322 | 2371 | ||
2323 | align 4 |
2372 | align 4 |
2324 | .str: |
2373 | .str: |
2325 | mov ecx,10 |
2374 | mov ecx,10 |
2326 | cmp eax,ecx |
2375 | cmp eax,ecx |
2327 | jb @f |
2376 | jb @f |
2328 | xor edx,edx |
2377 | xor edx,edx |
2329 | div ecx |
2378 | div ecx |
2330 | push edx |
2379 | push edx |
2331 | ;dec edi ;ᬥ饨¥ ¥®¡å®¤¨¬®¥ ¤«ï § ¯¨á¨ á ª®æ áâப¨ |
2380 | ;dec edi ;ᬥ饨¥ ¥®¡å®¤¨¬®¥ ¤«ï § ¯¨á¨ á ª®æ áâப¨ |
2332 | call .str |
2381 | call .str |
2333 | pop eax |
2382 | pop eax |
2334 | @@: |
2383 | @@: |
2335 | cmp edi,esi |
2384 | cmp edi,esi |
2336 | jge @f |
2385 | jge @f |
2337 | or al,0x30 |
2386 | or al,0x30 |
2338 | stosb |
2387 | stosb |
2339 | mov byte[edi],0 ;¢ ª®¥æ áâப¨ áâ ¢¨¬ 0, çâ®-¡ë ¥ ¢ë« §¨« ¬ãá®à |
2388 | mov byte[edi],0 ;¢ ª®¥æ áâப¨ áâ ¢¨¬ 0, çâ®-¡ë ¥ ¢ë« §¨« ¬ãá®à |
2340 | @@: |
2389 | @@: |
2341 | ret |
2390 | ret |
2342 | 2391 | ||
2343 | align 4 |
2392 | align 4 |
2344 | proc mem_copy uses ecx esi edi, destination:dword, source:dword, len:dword |
2393 | proc mem_copy uses ecx esi edi, destination:dword, source:dword, len:dword |
2345 | cld |
2394 | cld |
2346 | mov esi, dword[source] |
2395 | mov esi, dword[source] |
2347 | mov edi, dword[destination] |
2396 | mov edi, dword[destination] |
2348 | mov ecx, dword[len] |
2397 | mov ecx, dword[len] |
2349 | rep movsb |
2398 | rep movsb |
2350 | ret |
2399 | ret |
2351 | endp |
2400 | endp |
2352 | 2401 | ||
2353 | align 16 |
2402 | align 16 |
2354 | i_end: |
2403 | i_end: |
2355 | rb 2048 |
2404 | rb 2048 |
2356 | thread_coords: |
2405 | thread_coords: |
2357 | rb 2048 |
2406 | rb 2048 |
2358 | thread_scale: |
2407 | thread_scale: |
2359 | rb 2048 |
2408 | rb 2048 |
2360 | thread_n_file: |
2409 | thread_n_file: |
2361 | rb 2048 |
2410 | rb 2048 |
2362 | stacktop: |
2411 | stacktop: |
2363 | sys_path rb 1024 |
2412 | sys_path rb 1024 |
2364 | file_name: |
2413 | file_name: |
2365 | rb 1024 ;4096 |
2414 | rb 1024 ;4096 |
2366 | library_path rb 1024 |
2415 | library_path rb 1024 |
2367 | plugin_path rb 4096 |
2416 | plugin_path rb 4096 |
2368 | openfile_path rb 4096 |
2417 | openfile_path rb 4096 |
2369 | filename_area rb 256 |
2418 | filename_area rb 256 |
2370 | mem:'a' |
2419 | mem:'a' |
2371 | >'A' |
2420 | >'A' |
2372 | > |
2421 | > |
2373 | > |
2422 | > |
2374 | >1.0) |
2423 | >1.0) |
2375 | > |
2424 | > |