Subversion Repositories Kolibri OS

Rev

Rev 6513 | Rev 7128 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6513 Rev 6889
1
;
1
;
2
; ¢ í⮬ ä ©«¥ ᮡ࠭ë ä㭪樨 ­ã¦­ë¥ ¤«ï ᮧ¤ ­¨ï ¨
2
; ¢ í⮬ ä ©«¥ ᮡ࠭ë ä㭪樨 ­ã¦­ë¥ ¤«ï ᮧ¤ ­¨ï ¨
3
; à ¡®âë ®ª­  á ª®®à¤¨­ â ¬¨ ¢¥à設
3
; à ¡®âë ®ª­  á ª®®à¤¨­ â ¬¨ ¢¥à設
4
;
4
;
5
 
5
 
6
prop_wnd_width  equ 340 ;è¨à¨­  ®ª­  ᮠ᢮©á⢠¬¨ ®¡ê¥ªâ 
6
prop_wnd_width  equ 340 ;è¨à¨­  ®ª­  ᮠ᢮©á⢠¬¨ ®¡ê¥ªâ 
7
prop_wnd_height equ 460 ;¢ëá®â  ®ª­  ᮠ᢮©á⢠¬¨ ®¡ê¥ªâ 
7
prop_wnd_height equ 460 ;¢ëá®â  ®ª­  ᮠ᢮©á⢠¬¨ ®¡ê¥ªâ 
8
3d_wnd_l equ   5 ;®âáâ㯠¤«ï tinygl ¡ãä¥à  á«¥¢ 
8
3d_wnd_l equ   5 ;®âáâ㯠¤«ï tinygl ¡ãä¥à  á«¥¢ 
9
3d_wnd_t equ  23 ;®âáâ㯠¤«ï tinygl ¡ãä¥à  ᢥàåã
9
3d_wnd_t equ  23 ;®âáâ㯠¤«ï tinygl ¡ãä¥à  ᢥàåã
10
3d_wnd_w equ 320
10
3d_wnd_w equ 320
11
3d_wnd_h equ 240
11
3d_wnd_h equ 240
12
SIZE_ONE_FLOAT equ 14
12
SIZE_ONE_FLOAT equ 14
13
MAX_OBJECT_SIZE equ (4+SIZE_ONE_FLOAT*3+1)
13
MAX_OBJECT_SIZE equ (4+SIZE_ONE_FLOAT*3+1)
14
 
14
 
15
prop_wnd_run db 0 ;¯¥à¥¬¥­­ ï á«¥¤ïé ï §  ⥬ çâ®-¡ë ­¥ § ¯ã᪠âì ¡®«ìè¥ 1-£® ®ª­  ᮠ᢮©á⢠¬¨ ®¤­®¢à¥¬¥­­®
15
prop_wnd_run db 0 ;¯¥à¥¬¥­­ ï á«¥¤ïé ï §  ⥬ çâ®-¡ë ­¥ § ¯ã᪠âì ¡®«ìè¥ 1-£® ®ª­  ᮠ᢮©á⢠¬¨ ®¤­®¢à¥¬¥­­®
16
 
16
 
17
txt_q db '?',0
17
txt_q db '?',0
18
txt_space:
18
txt_space:
19
	db SIZE_ONE_FLOAT dup(' ')
19
	db SIZE_ONE_FLOAT dup(' ')
20
.end:
20
.end:
21
	db 0
21
	db 0
22
 
22
 
23
obj_point: ;¤®¡ ¢«ï¥¬ë© ®¡ê¥ªâ
23
obj_point: ;¤®¡ ¢«ï¥¬ë© ®¡ê¥ªâ
24
	dd 0   ;㪠§ â¥«ì
24
	dd 0   ;㪠§ â¥«ì
25
.text:
25
.text:
26
	rb MAX_OBJECT_SIZE
26
	rb MAX_OBJECT_SIZE
27
 
27
 
28
if lang eq ru
28
if lang eq ru
29
txt_select_vert: db '‚ë¡à ­®: '
29
txt_select_vert: db '‚ë¡à ­®: '
30
else
30
else
31
txt_select_vert: db 'Select: '
31
txt_select_vert: db 'Select: '
32
end if
32
end if
33
.count:
33
.count:
34
dq 0,0
34
dq 0,0
35
 
35
 
36
;¤ ­®¥ ®ª­® (¯à®æ¥áá) ¢ë§ë¢ ¥âìáï ä㭪樥© but_wnd_coords
36
;¤ ­®¥ ®ª­® (¯à®æ¥áá) ¢ë§ë¢ ¥âìáï ä㭪樥© but_wnd_coords
37
align 4
37
align 4
38
prop_start:
38
prop_start:
39
pushad
39
pushad
40
	mcall SF_SET_EVENTS_MASK,0x27 ;¬ áª  ®¦¨¤ ¥¬ëå ᮡë⨩
40
	mcall SF_SET_EVENTS_MASK,0x27 ;¬ áª  ®¦¨¤ ¥¬ëå ᮡë⨩
41
	inc byte[prop_wnd_run]
41
	inc byte[prop_wnd_run]
42
	mov dword[w_scr_t3.type],1
42
	mov dword[w_scr_t3.type],1
43
	mov edi,o3d
43
	mov edi,o3d
44
	stdcall obj_clear_param, edi
44
	stdcall obj_clear_param, edi
45
	call mnu_reset_settings
45
	call mnu_reset_settings
46
 
46
 
47
	stdcall [tl_node_get_data],tree1
47
	stdcall [tl_node_get_data],tree1
48
	xor edx,edx
48
	xor edx,edx
49
	mov dword[capt_p],txt_q
49
	mov dword[capt_p],txt_q
50
	cmp eax,0
50
	cmp eax,0
51
	je .no_points
51
	je .no_points
52
		mov ebx,[eax] ;¯®«ãç ¥¬ §­ ç¥­¨¥ ᤢ¨£  ¢ë¡à ­­®£® ¡«®ª 
52
		mov ebx,[eax] ;¯®«ãç ¥¬ §­ ç¥­¨¥ ᤢ¨£  ¢ë¡à ­­®£® ¡«®ª 
53
		add ebx,[open_file_data]
53
		add ebx,[open_file_data]
54
 
54
 
55
		cmp word[ebx],CHUNK_OBJBLOCK
55
		cmp word[ebx],CHUNK_OBJBLOCK
56
		jne .end_oblo
56
		jne .end_oblo
57
			mov dword[capt_p],txt_4000
57
			mov dword[capt_p],txt_4000
58
			stdcall obj_init,edi
58
			stdcall obj_init,edi
59
			jmp .no_points
59
			jmp .no_points
60
		.end_oblo:
60
		.end_oblo:
61
		cmp word[ebx],CHUNK_TRIMESH
61
		cmp word[ebx],CHUNK_TRIMESH
62
		jne .end_trim
62
		jne .end_trim
63
			mov dword[capt_p],txt_4100
63
			mov dword[capt_p],txt_4100
64
			stdcall obj_init,edi
64
			stdcall obj_init,edi
65
			jmp .no_points
65
			jmp .no_points
66
		.end_trim:
66
		.end_trim:
67
		cmp word[ebx],CHUNK_VERTLIST
67
		cmp word[ebx],CHUNK_VERTLIST
68
		jne .end_vlist
68
		jne .end_vlist
69
			mov dword[capt_p],txt_4110
69
			mov dword[capt_p],txt_4110
70
			stdcall obj_init,edi
70
			stdcall obj_init,edi
71
			jmp .no_points
71
			jmp .no_points
72
		.end_vlist:
72
		.end_vlist:
73
		cmp word[ebx],CHUNK_TRACKPIVOT
73
		cmp word[ebx],CHUNK_TRACKPIVOT
74
		jne @f
74
		jne @f
75
			inc edx
75
			inc edx
76
			add ebx,6
76
			add ebx,6
77
			mov dword[capt_p],txt_b013
77
			mov dword[capt_p],txt_b013
78
			jmp .set_points
78
			jmp .set_points
79
		@@:
79
		@@:
80
		cmp word[ebx],0xb014
80
		cmp word[ebx],0xb014
81
		jne @f
81
		jne @f
82
			mov edx,2
82
			mov edx,2
83
			add ebx,6
83
			add ebx,6
84
			mov dword[capt_p],txt_b014
84
			mov dword[capt_p],txt_b014
85
			;jmp .set_points
85
			;jmp .set_points
86
		@@:
86
		@@:
87
		.set_points:
87
		.set_points:
88
		mov [edi+offs_obj_poi_data],ebx
88
		mov [edi+obj_3d.poi_data],ebx
89
		mov [edi+offs_obj_poi_count],edx
89
		mov [edi+obj_3d.poi_count],edx
90
	.no_points:
90
	.no_points:
91
 
91
 
92
	;­ áâனª  ᯨ᪠ ®¡ê¥ªâ®¢
92
	;­ áâனª  ᯨ᪠ ®¡ê¥ªâ®¢
93
	mov ebx,[edi+offs_obj_poi_data]
93
	mov ebx,[edi+obj_3d.poi_data]
94
	mov dword[tree3.info_max_count],2
94
	mov dword[tree3.info_max_count],2
95
	mov edx,[edi+offs_obj_poi_count]
95
	mov edx,[edi+obj_3d.poi_count]
96
	add dword[tree3.info_max_count],edx ;áâ ¢¨¬ ç¨á«® 㧫®¢, à ¢­®¥ ª®««¨ç¥áâ¢ã â®ç¥ª (+2 ­  ­ ç «® ¨ ª®­¥æ ᯨ᪠)
96
	add dword[tree3.info_max_count],edx ;áâ ¢¨¬ ç¨á«® 㧫®¢, à ¢­®¥ ª®««¨ç¥áâ¢ã â®ç¥ª (+2 ­  ­ ç «® ¨ ª®­¥æ ᯨ᪠)
97
	stdcall dword[tl_data_init], tree3
97
	stdcall dword[tl_data_init], tree3
98
	mov eax,dword[icon_tl_sys]
98
	mov eax,dword[icon_tl_sys]
99
	mov dword[tree3.data_img_sys],eax
99
	mov dword[tree3.data_img_sys],eax
100
	mov eax,dword[icon_toolbar]
100
	mov eax,dword[icon_toolbar]
101
	mov dword[tree3.data_img],eax
101
	mov dword[tree3.data_img],eax
102
 
102
 
103
	cmp edx,0
103
	cmp edx,0
104
	je .no_object
104
	je .no_object
105
		mov word[NumberSymbolsAD],5
105
		mov word[NumberSymbolsAD],5
106
		finit
106
		finit
107
		mov dword[w_scr_t3.redraw],0
107
		mov dword[w_scr_t3.redraw],0
108
		.new_point:
108
		.new_point:
109
			mov dword[obj_point],ebx
109
			mov dword[obj_point],ebx
110
			mov dword[obj_point.text],0
110
			mov dword[obj_point.text],0
111
			cld
111
			cld
112
			mov ecx,3
112
			mov ecx,3
113
			@@:
113
			@@:
114
				fld dword[ebx]
114
				fld dword[ebx]
115
				fstp qword[Data_Double]
115
				fstp qword[Data_Double]
116
				call DoubleFloat_to_String
116
				call DoubleFloat_to_String
117
				add ebx,4
117
				add ebx,4
118
				stdcall str_len, Data_String
118
				stdcall str_len, Data_String
119
				mov esi,txt_space
119
				mov esi,txt_space
120
				add esi,eax
120
				add esi,eax
121
				cmp esi,txt_space.end
121
				cmp esi,txt_space.end
122
				jl .normal_size
122
				jl .normal_size
123
					mov esi,txt_space.end-1 ;¬¨­¨¬ã¬ 1 ¯à®¡¥« ­ã¦­® ¤®¡ ¢¨âì, çâ®-¡ë æ¨äàë ­¥ ᫨¯ «¨áì
123
					mov esi,txt_space.end-1 ;¬¨­¨¬ã¬ 1 ¯à®¡¥« ­ã¦­® ¤®¡ ¢¨âì, çâ®-¡ë æ¨äàë ­¥ ᫨¯ «¨áì
124
				.normal_size:
124
				.normal_size:
125
				stdcall str_cat, obj_point.text,esi
125
				stdcall str_cat, obj_point.text,esi
126
				stdcall str_cat, obj_point.text,Data_String
126
				stdcall str_cat, obj_point.text,Data_String
127
				loop @b
127
				loop @b
128
			stdcall dword[tl_node_add], tree3,(ID_ICON_POINT shl 16),obj_point 
128
			stdcall dword[tl_node_add], tree3,(ID_ICON_POINT shl 16),obj_point 
129
			stdcall dword[tl_cur_next], tree3
129
			stdcall dword[tl_cur_next], tree3
130
			dec edx
130
			dec edx
131
			cmp edx,0
131
			cmp edx,0
132
			jg .new_point
132
			jg .new_point
133
			mov dword[w_scr_t3.redraw],1
133
			mov dword[w_scr_t3.redraw],1
134
			stdcall dword[tl_cur_beg], tree3
134
			stdcall dword[tl_cur_beg], tree3
135
	.no_object:
135
	.no_object:
136
	stdcall obj_set_sizes, o3d
136
	stdcall obj_set_sizes, o3d
137
	stdcall obj_set_normals, o3d
137
	stdcall obj_set_normals, o3d
138
	edit_boxes_set_sys_color edit1,editboxes_end,sc ;ãáâ ­®¢ª  á¨á⥬­ëå 梥⮢
138
	edit_boxes_set_sys_color edit1,editboxes_end,sc ;ãáâ ­®¢ª  á¨á⥬­ëå 梥⮢
139
	stdcall [edit_box_set_text], edit1, txt_q
139
	stdcall [edit_box_set_text], edit1, txt_q
140
	stdcall [edit_box_set_text], edit2, txt_q
140
	stdcall [edit_box_set_text], edit2, txt_q
141
	stdcall [edit_box_set_text], edit3, txt_q
141
	stdcall [edit_box_set_text], edit3, txt_q
142
	mov eax,0xc0c0c0
142
	mov eax,0xc0c0c0
143
	mov ebx,[color_ox]
143
	mov ebx,[color_ox]
144
	shr ebx,2
144
	shr ebx,2
145
	and ebx,0x3f3f3f
145
	and ebx,0x3f3f3f
146
	add eax,ebx
146
	add eax,ebx
147
	mov [edit1.color],eax
147
	mov [edit1.color],eax
148
	mov eax,0xc0c0c0
148
	mov eax,0xc0c0c0
149
	mov ebx,[color_oy]
149
	mov ebx,[color_oy]
150
	shr ebx,2
150
	shr ebx,2
151
	and ebx,0x3f3f3f
151
	and ebx,0x3f3f3f
152
	add eax,ebx
152
	add eax,ebx
153
	mov [edit2.color],eax
153
	mov [edit2.color],eax
154
	mov eax,0xc0c0c0
154
	mov eax,0xc0c0c0
155
	mov ebx,[color_oz]
155
	mov ebx,[color_oz]
156
	shr ebx,2
156
	shr ebx,2
157
	and ebx,0x3f3f3f
157
	and ebx,0x3f3f3f
158
	add eax,ebx
158
	add eax,ebx
159
	mov [edit3.color],eax
159
	mov [edit3.color],eax
160
popad
160
popad
161
	call prop_red_win
161
	call prop_red_win
162
 
162
 
163
;­¥ ®âà뢠âì íâã äã­ªæ¨î ®â ¯à¥¤ë¤ã饩
163
;­¥ ®âà뢠âì íâã äã­ªæ¨î ®â ¯à¥¤ë¤ã饩
164
align 4
164
align 4
165
prop_still:
165
prop_still:
166
	pushad
166
	pushad
167
 
167
 
168
	mcall SF_WAIT_EVENT_TIMEOUT,10
168
	mcall SF_WAIT_EVENT_TIMEOUT,10
169
	or eax,eax
169
	or eax,eax
170
	jnz @f
170
	jnz @f
171
		call prop_timer_funct
171
		call prop_timer_funct
172
		jmp .end
172
		jmp .end
173
	@@:
173
	@@:
174
 
174
 
175
	cmp al,1 ;¨§¬. ¯®«®¦¥­¨¥ ®ª­ 
175
	cmp al,1 ;¨§¬. ¯®«®¦¥­¨¥ ®ª­ 
176
	jne @f
176
	jne @f
177
		call prop_red_win
177
		call prop_red_win
178
		jmp .end
178
		jmp .end
179
	@@:
179
	@@:
180
	cmp al,2
180
	cmp al,2
181
	jne @f
181
	jne @f
182
		call prop_key
182
		call prop_key
183
		jmp .end
183
		jmp .end
184
	@@:
184
	@@:
185
	cmp al,3
185
	cmp al,3
186
	jz prop_button
186
	jz prop_button
187
	cmp al,6
187
	cmp al,6
188
	jne @f 
188
	jne @f 
189
		call prop_mouse
189
		call prop_mouse
190
	@@:
190
	@@:
191
.end:
191
.end:
192
	popad
192
	popad
193
	jmp prop_still
193
	jmp prop_still
194
 
194
 
195
align 4
195
align 4
196
prop_red_win:
196
prop_red_win:
197
pushad
197
pushad
198
	mcall SF_REDRAW,SSF_BEGIN_DRAW
198
	mcall SF_REDRAW,SSF_BEGIN_DRAW
199
 
199
 
200
	xor eax,eax
200
	xor eax,eax
201
	mov edi,dword[capt_p] ;children window caption
201
	mov edi,dword[capt_p] ;children window caption
202
	mov bx,word[procinfo.box.left]
202
	mov bx,word[procinfo.box.left]
203
	add bx,word[buf_0.l]
203
	add bx,word[buf_0.l]
204
	add bx,5 ;è¨à¨­  ¡®ª®¢®© à ¬ª¨
204
	add bx,5 ;è¨à¨­  ¡®ª®¢®© à ¬ª¨
205
	shl ebx,16
205
	shl ebx,16
206
	mov bx,prop_wnd_width
206
	mov bx,prop_wnd_width
207
	mov cx,word[procinfo.box.top]
207
	mov cx,word[procinfo.box.top]
208
	add cx,word[buf_0.t]
208
	add cx,word[buf_0.t]
209
	shl ecx,16
209
	shl ecx,16
210
	mov cx,prop_wnd_height
210
	mov cx,prop_wnd_height
211
	mov edx,[sc.work]
211
	mov edx,[sc.work]
212
	or  edx,0x33000000
212
	or  edx,0x33000000
213
	int 0x40
213
	int 0x40
214
 
214
 
215
	mov esi,[sc.work_button]
215
	mov esi,[sc.work_button]
216
	mcall SF_DEFINE_BUTTON, (5 shl 16)+20, (266 shl 16)+20, 0x40000003
216
	mcall SF_DEFINE_BUTTON, (5 shl 16)+20, (266 shl 16)+20, 0x40000003
217
	mcall , (30 shl 16)+20, (266 shl 16)+20, 0x40000004
217
	mcall , (30 shl 16)+20, (266 shl 16)+20, 0x40000004
218
 
218
 
219
	mov ebx,[image_data_toolbar]
219
	mov ebx,[image_data_toolbar]
220
	add ebx,3*IMAGE_TOOLBAR_ICON_SIZE
220
	add ebx,3*IMAGE_TOOLBAR_ICON_SIZE
221
	mcall SF_PUT_IMAGE, , (21 shl 16)+21, (5 shl 16)+266 ;load
221
	mcall SF_PUT_IMAGE, , (21 shl 16)+21, (5 shl 16)+266 ;load
222
 
222
 
223
	sub ebx,IMAGE_TOOLBAR_ICON_SIZE
223
	sub ebx,IMAGE_TOOLBAR_ICON_SIZE
224
	mov edx,(30 shl 16)+266 ;save
224
	mov edx,(30 shl 16)+266 ;save
225
	int 0x40
225
	int 0x40
226
 
226
 
227
	mov dword[w_scr_t3.all_redraw],1
227
	mov dword[w_scr_t3.all_redraw],1
228
	stdcall [scrollbar_ver_draw],dword w_scr_t3
228
	stdcall [scrollbar_ver_draw],dword w_scr_t3
229
	stdcall [tl_draw], tree3
229
	stdcall [tl_draw], tree3
230
	stdcall [edit_box_draw], edit1
230
	stdcall [edit_box_draw], edit1
231
	stdcall [edit_box_draw], edit2
231
	stdcall [edit_box_draw], edit2
232
	stdcall [edit_box_draw], edit3
232
	stdcall [edit_box_draw], edit3
233
 
233
 
234
	stdcall [kmainmenu_draw], [main_menu]
234
	stdcall [kmainmenu_draw], [main_menu]
235
	stdcall draw_3d, o3d
235
	stdcall draw_3d, o3d
236
	mcall SF_REDRAW,SSF_END_DRAW
236
	mcall SF_REDRAW,SSF_END_DRAW
237
popad
237
popad
238
	ret
238
	ret
239
 
239
 
240
align 4
240
align 4
241
proc prop_key uses eax ebx
241
proc prop_key uses eax ebx
242
	mcall SF_GET_KEY
242
	mcall SF_GET_KEY
243
 
243
 
244
	test word [edit1.flags],10b ;ed_focus
244
	test word [edit1.flags],10b ;ed_focus
245
	je @f
245
	je @f
246
		stdcall [edit_box_key], edit1
246
		stdcall [edit_box_key], edit1
247
		jmp .end
247
		jmp .end
248
	@@:
248
	@@:
249
	test word [edit2.flags],10b
249
	test word [edit2.flags],10b
250
	je @f
250
	je @f
251
		stdcall [edit_box_key], edit2
251
		stdcall [edit_box_key], edit2
252
		jmp .end
252
		jmp .end
253
	@@:
253
	@@:
254
	test word [edit3.flags],10b
254
	test word [edit3.flags],10b
255
	je @f
255
	je @f
256
		stdcall [edit_box_key], edit3
256
		stdcall [edit_box_key], edit3
257
		jmp .end
257
		jmp .end
258
	@@:
258
	@@:
259
	cmp dword[el_focus], tree3
259
	cmp dword[el_focus], tree3
260
	jne @f
260
	jne @f
261
		stdcall [tl_key], tree3
261
		stdcall [tl_key], tree3
262
		jmp .end
262
		jmp .end
263
	@@:
263
	@@:
264
 
264
 
265
	cmp ah,178 ;Up
265
	cmp ah,178 ;Up
266
	jne @f
266
	jne @f
267
		fld dword[angle_x]
267
		fld dword[angle_x]
268
		fadd dword[delt_size]
268
		fadd dword[delt_size]
269
		fstp dword[angle_x]
269
		fstp dword[angle_x]
270
		stdcall draw_3d, o3d
270
		stdcall draw_3d, o3d
271
		jmp .end
271
		jmp .end
272
	@@:
272
	@@:
273
	cmp ah,177 ;Down
273
	cmp ah,177 ;Down
274
	jne @f
274
	jne @f
275
		fld dword[angle_x]
275
		fld dword[angle_x]
276
		fsub dword[delt_size]
276
		fsub dword[delt_size]
277
		fstp dword[angle_x]
277
		fstp dword[angle_x]
278
		stdcall draw_3d, o3d
278
		stdcall draw_3d, o3d
279
		jmp .end
279
		jmp .end
280
	@@:
280
	@@:
281
	cmp ah,176 ;Left
281
	cmp ah,176 ;Left
282
	jne @f
282
	jne @f
283
		fld dword[angle_y]
283
		fld dword[angle_y]
284
		fadd dword[delt_size]
284
		fadd dword[delt_size]
285
		fstp dword[angle_y]
285
		fstp dword[angle_y]
286
		stdcall draw_3d, o3d
286
		stdcall draw_3d, o3d
287
		jmp .end
287
		jmp .end
288
	@@:
288
	@@:
289
	cmp ah,179 ;Right
289
	cmp ah,179 ;Right
290
	jne @f
290
	jne @f
291
		fld dword[angle_y]
291
		fld dword[angle_y]
292
		fsub dword[delt_size]
292
		fsub dword[delt_size]
293
		fstp dword[angle_y]
293
		fstp dword[angle_y]
294
		stdcall draw_3d, o3d
294
		stdcall draw_3d, o3d
295
		;jmp .end
295
		;jmp .end
296
	@@:
296
	@@:
297
	.end:
297
	.end:
298
	ret
298
	ret
299
endp
299
endp
300
 
300
 
301
align 4
301
align 4
302
prop_mouse:
302
prop_mouse:
303
	push eax ebx
303
	push eax ebx
304
	mcall SF_MOUSE_GET,SSF_BUTTON_EXT
304
	mcall SF_MOUSE_GET,SSF_BUTTON_EXT
305
	bt eax,0
305
	bt eax,0
306
	jnc .end_m
306
	jnc .end_m
307
		;mouse l. but. move
307
		;mouse l. but. move
308
		cmp dword[mouse_drag],1
308
		cmp dword[mouse_drag],1
309
		jne .end_m
309
		jne .end_m
310
		mcall SF_MOUSE_GET,SSF_WINDOW_POSITION ;get mouse coords
310
		mcall SF_MOUSE_GET,SSF_WINDOW_POSITION ;get mouse coords
311
		mov ebx,eax
311
		mov ebx,eax
312
		shr ebx,16 ;mouse.x
312
		shr ebx,16 ;mouse.x
313
		cmp ebx,3d_wnd_l
313
		cmp ebx,3d_wnd_l
314
		jg @f
314
		jg @f
315
			mov ebx,3d_wnd_l
315
			mov ebx,3d_wnd_l
316
		@@:
316
		@@:
317
		sub ebx,3d_wnd_l
317
		sub ebx,3d_wnd_l
318
		cmp ebx,3d_wnd_w
318
		cmp ebx,3d_wnd_w
319
		jle @f
319
		jle @f
320
			mov ebx,3d_wnd_w
320
			mov ebx,3d_wnd_w
321
		@@:
321
		@@:
322
		and eax,0xffff ;mouse.y
322
		and eax,0xffff ;mouse.y
323
		cmp eax,3d_wnd_t
323
		cmp eax,3d_wnd_t
324
		jg @f
324
		jg @f
325
			mov eax,3d_wnd_t
325
			mov eax,3d_wnd_t
326
		@@:
326
		@@:
327
		sub eax,3d_wnd_t
327
		sub eax,3d_wnd_t
328
		cmp eax,3d_wnd_h
328
		cmp eax,3d_wnd_h
329
		jle @f
329
		jle @f
330
			mov eax,3d_wnd_h
330
			mov eax,3d_wnd_h
331
		@@:
331
		@@:
332
		finit
332
		finit
333
		fild dword[mouse_y]
333
		fild dword[mouse_y]
334
		mov [mouse_y],eax
334
		mov [mouse_y],eax
335
		fisub dword[mouse_y]
335
		fisub dword[mouse_y]
336
		fdiv dword[angle_dxm] ;¥á«¨ ªãàá®à ¤¢¨¦¥âáï ¯® ®á¨ y (¢¢¥àå ¨«¨ ¢­¨§) â® ¯®¢®à®â ¤¥« ¥¬ ¢®ªà㣠®á¨ x
336
		fdiv dword[angle_dxm] ;¥á«¨ ªãàá®à ¤¢¨¦¥âáï ¯® ®á¨ y (¢¢¥àå ¨«¨ ¢­¨§) â® ¯®¢®à®â ¤¥« ¥¬ ¢®ªà㣠®á¨ x
337
		fadd dword[angle_x]
337
		fadd dword[angle_x]
338
		fstp dword[angle_x]
338
		fstp dword[angle_x]
339
 
339
 
340
		fild dword[mouse_x]
340
		fild dword[mouse_x]
341
		mov [mouse_x],ebx
341
		mov [mouse_x],ebx
342
		fisub dword[mouse_x]
342
		fisub dword[mouse_x]
343
		fdiv dword[angle_dym] ;¥á«¨ ªãàá®à ¤¢¨¦¥âáï ¯® ®á¨ x (¢¢¥àå ¨«¨ ¢­¨§) â® ¯®¢®à®â ¤¥« ¥¬ ¢®ªà㣠®á¨ y
343
		fdiv dword[angle_dym] ;¥á«¨ ªãàá®à ¤¢¨¦¥âáï ¯® ®á¨ x (¢¢¥àå ¨«¨ ¢­¨§) â® ¯®¢®à®â ¤¥« ¥¬ ¢®ªà㣠®á¨ y
344
		fadd dword[angle_y]
344
		fadd dword[angle_y]
345
		fstp dword[angle_y]
345
		fstp dword[angle_y]
346
 
346
 
347
		stdcall draw_3d, o3d
347
		stdcall draw_3d, o3d
348
		jmp .end_d
348
		jmp .end_d
349
	.end_m:
349
	.end_m:
350
	bt eax,16
350
	bt eax,16
351
	jnc @f
351
	jnc @f
352
		;mouse l. but. up
352
		;mouse l. but. up
353
		mov dword[mouse_drag],0
353
		mov dword[mouse_drag],0
354
		jmp .end_d
354
		jmp .end_d
355
	@@:
355
	@@:
356
	bt eax,8
356
	bt eax,8
357
	jnc .end_d
357
	jnc .end_d
358
		;mouse l. but. press
358
		;mouse l. but. press
359
		mcall SF_MOUSE_GET,SSF_WINDOW_POSITION ;get mouse coords
359
		mcall SF_MOUSE_GET,SSF_WINDOW_POSITION ;get mouse coords
360
		mov ebx,eax
360
		mov ebx,eax
361
		shr ebx,16 ;mouse.x
361
		shr ebx,16 ;mouse.x
362
		cmp ebx,3d_wnd_l
362
		cmp ebx,3d_wnd_l
363
		jl .end_d
363
		jl .end_d
364
		sub ebx,3d_wnd_l
364
		sub ebx,3d_wnd_l
365
		cmp ebx,3d_wnd_w
365
		cmp ebx,3d_wnd_w
366
		jg .end_d
366
		jg .end_d
367
		and eax,0xffff ;mouse.y
367
		and eax,0xffff ;mouse.y
368
		cmp eax,3d_wnd_t
368
		cmp eax,3d_wnd_t
369
		jl .end_d
369
		jl .end_d
370
		sub eax,3d_wnd_t
370
		sub eax,3d_wnd_t
371
		cmp eax,3d_wnd_h
371
		cmp eax,3d_wnd_h
372
		jg .end_d
372
		jg .end_d
373
		mov dword[mouse_drag],1
373
		mov dword[mouse_drag],1
374
		mov dword[mouse_x],ebx
374
		mov dword[mouse_x],ebx
375
		mov dword[mouse_y],eax
375
		mov dword[mouse_y],eax
376
	.end_d:
376
	.end_d:
377
 
377
 
378
	stdcall [kmainmenu_dispatch_cursorevent], [main_menu]
378
	stdcall [kmainmenu_dispatch_cursorevent], [main_menu]
379
	stdcall [tl_mouse], tree3
379
	stdcall [tl_mouse], tree3
380
	stdcall [edit_box_mouse], edit1
380
	stdcall [edit_box_mouse], edit1
381
	stdcall [edit_box_mouse], edit2
381
	stdcall [edit_box_mouse], edit2
382
	stdcall [edit_box_mouse], edit3
382
	stdcall [edit_box_mouse], edit3
383
	pop ebx eax
383
	pop ebx eax
384
	ret
384
	ret
385
 
385
 
386
align 4
386
align 4
387
prop_button:
387
prop_button:
388
	mcall SF_GET_BUTTON
388
	mcall SF_GET_BUTTON
389
 
389
 
390
	cmp ah,3
390
	cmp ah,3
391
	jne @f
391
	jne @f
392
		call get_point_coords
392
		call get_point_coords
393
		stdcall draw_3d, o3d
393
		stdcall draw_3d, o3d
394
		jmp prop_still.end
394
		jmp prop_still.end
395
	@@:
395
	@@:
396
	cmp ah,4
396
	cmp ah,4
397
	jne @f
397
	jne @f
398
		push eax ebx ecx edi esi
398
		push eax ebx ecx edi esi
399
		stdcall [tl_node_get_data],tree3
399
		stdcall [tl_node_get_data],tree3
400
		cmp eax,0
400
		cmp eax,0
401
		je .no_select_1
401
		je .no_select_1
402
			mov ebx,[eax]
402
			mov ebx,[eax]
403
			finit
403
			finit
404
 
404
 
405
			mov esi,string1
405
			mov esi,string1
406
			mov edi,Data_String
406
			mov edi,Data_String
407
			cld
407
			cld
408
			mov ecx,8
408
			mov ecx,8
409
			rep movsd
409
			rep movsd
410
			call String_to_DoubleFloat
410
			call String_to_DoubleFloat
411
			fld  qword[Data_Double] ;áç¨â뢠¥¬ ª ª double
411
			fld  qword[Data_Double] ;áç¨â뢠¥¬ ª ª double
412
			fstp dword[ebx] ;á®å࠭塞 ª ª float
412
			fstp dword[ebx] ;á®å࠭塞 ª ª float
413
 
413
 
414
			mov esi,string2
414
			mov esi,string2
415
			mov edi,Data_String
415
			mov edi,Data_String
416
			cld
416
			cld
417
			mov ecx,8
417
			mov ecx,8
418
			rep movsd
418
			rep movsd
419
			call String_to_DoubleFloat
419
			call String_to_DoubleFloat
420
			fld  qword[Data_Double] ;áç¨â뢠¥¬ ª ª double
420
			fld  qword[Data_Double] ;áç¨â뢠¥¬ ª ª double
421
			fstp dword[ebx+4] ;á®å࠭塞 ª ª float
421
			fstp dword[ebx+4] ;á®å࠭塞 ª ª float
422
 
422
 
423
			mov esi,string3
423
			mov esi,string3
424
			mov edi,Data_String
424
			mov edi,Data_String
425
			cld
425
			cld
426
			mov ecx,8
426
			mov ecx,8
427
			rep movsd
427
			rep movsd
428
			call String_to_DoubleFloat
428
			call String_to_DoubleFloat
429
			fld  qword[Data_Double] ;áç¨â뢠¥¬ ª ª double
429
			fld  qword[Data_Double] ;áç¨â뢠¥¬ ª ª double
430
			fstp dword[ebx+8] ;á®å࠭塞 ª ª float
430
			fstp dword[ebx+8] ;á®å࠭塞 ª ª float
431
 
431
 
432
			;®¡­®¢«¥­¨¥ ¨§¬¥­¥­­®£® 㧫  ¢ ᯨ᪥ tree3 ¨ £« ¢­®£® ®ª­  (¯® â ©¬¥àã)
432
			;®¡­®¢«¥­¨¥ ¨§¬¥­¥­­®£® 㧫  ¢ ᯨ᪥ tree3 ¨ £« ¢­®£® ®ª­  (¯® â ©¬¥àã)
433
			mov word[NumberSymbolsAD],5
433
			mov word[NumberSymbolsAD],5
434
			mov dword[obj_point],ebx
434
			mov dword[obj_point],ebx
435
			mov dword[obj_point.text],0
435
			mov dword[obj_point.text],0
436
			cld
436
			cld
437
			mov ecx,3
437
			mov ecx,3
438
			.coord:
438
			.coord:
439
				fld dword[ebx]
439
				fld dword[ebx]
440
				fstp qword[Data_Double]
440
				fstp qword[Data_Double]
441
				call DoubleFloat_to_String
441
				call DoubleFloat_to_String
442
				add ebx,4
442
				add ebx,4
443
				stdcall str_len, Data_String
443
				stdcall str_len, Data_String
444
				mov esi,txt_space
444
				mov esi,txt_space
445
				add esi,eax
445
				add esi,eax
446
				cmp esi,txt_space.end
446
				cmp esi,txt_space.end
447
				jl .normal_size
447
				jl .normal_size
448
					mov esi,txt_space.end-1 ;¬¨­¨¬ã¬ 1 ¯à®¡¥« ­ã¦­® ¤®¡ ¢¨âì, çâ®-¡ë æ¨äàë ­¥ ᫨¯ «¨áì
448
					mov esi,txt_space.end-1 ;¬¨­¨¬ã¬ 1 ¯à®¡¥« ­ã¦­® ¤®¡ ¢¨âì, çâ®-¡ë æ¨äàë ­¥ ᫨¯ «¨áì
449
				.normal_size:
449
				.normal_size:
450
				stdcall str_cat, obj_point.text,esi
450
				stdcall str_cat, obj_point.text,esi
451
				stdcall str_cat, obj_point.text,Data_String
451
				stdcall str_cat, obj_point.text,Data_String
452
				loop .coord
452
				loop .coord
453
			mov byte[obj_point.text],'*' ;®â¬¥ç ¥¬ çâ® ¢¥à設  ¨§¬¥­ï« áì
453
			mov byte[obj_point.text],'*' ;®â¬¥ç ¥¬ çâ® ¢¥à設  ¨§¬¥­ï« áì
454
			stdcall dword[tl_node_set_data], tree3,obj_point
454
			stdcall dword[tl_node_set_data], tree3,obj_point
455
			stdcall dword[tl_draw], tree3
455
			stdcall dword[tl_draw], tree3
456
			mov byte[can_save],1 ;¤«ï ¯®ª §  ª­®¯ª¨ '‘®åà ­¨âì'
456
			mov byte[can_save],1 ;¤«ï ¯®ª §  ª­®¯ª¨ '‘®åà ­¨âì'
457
			mov dword[offs_last_timer],0 ;¤«ï ®¡­®¢«¥­¨ï ¡«®ª  ¢ â ©¬¥à¥
457
			mov dword[offs_last_timer],0 ;¤«ï ®¡­®¢«¥­¨ï ¡«®ª  ¢ â ©¬¥à¥
458
			stdcall draw_3d, o3d
458
			stdcall draw_3d, o3d
459
		.no_select_1:
459
		.no_select_1:
460
		pop esi edi ecx ebx eax
460
		pop esi edi ecx ebx eax
461
		jmp prop_still.end
461
		jmp prop_still.end
462
	@@:
462
	@@:
463
	cmp ah,5
463
	cmp ah,5
464
	jne @f
464
	jne @f
465
		call mnu_vertexes_on
465
		call mnu_vertexes_on
466
		jmp prop_still.end
466
		jmp prop_still.end
467
	@@:
467
	@@:
468
	cmp ah,6
468
	cmp ah,6
469
	jne @f
469
	jne @f
470
		call mnu_edges_on
470
		call mnu_edges_on
471
		jmp prop_still.end
471
		jmp prop_still.end
472
	@@:
472
	@@:
473
	cmp ah,7
473
	cmp ah,7
474
	jne @f
474
	jne @f
475
		call mnu_faces_on
475
		call mnu_faces_on
476
		jmp prop_still.end
476
		jmp prop_still.end
477
	@@:
477
	@@:
478
	cmp ah,8
478
	cmp ah,8
479
	jne @f
479
	jne @f
480
		call mnu_light_on_off
480
		call mnu_light_on_off
481
		jmp prop_still.end
481
		jmp prop_still.end
482
	@@:
482
	@@:
483
	cmp ah,9
483
	cmp ah,9
484
	jne @f
484
	jne @f
485
		call mnu_smooth_on_off
485
		call mnu_smooth_on_off
486
		jmp prop_still.end
486
		jmp prop_still.end
487
	@@:
487
	@@:
488
	cmp ah,10
488
	cmp ah,10
489
	jne @f
489
	jne @f
490
		call mnu_reset_settings
490
		call mnu_reset_settings
491
		jmp prop_still.end
491
		jmp prop_still.end
492
	@@:
492
	@@:
493
	cmp ah,11
493
	cmp ah,11
494
	jne @f
494
	jne @f
495
		call mnu_vertexes_select
495
		call mnu_vertexes_select
496
		jmp prop_still.end
496
		jmp prop_still.end
497
	@@:
497
	@@:
498
	cmp ah,12
498
	cmp ah,12
499
	jne @f
499
	jne @f
500
		call mnu_vertexes_deselect
500
		call mnu_vertexes_deselect
501
		jmp prop_still.end
501
		jmp prop_still.end
502
	@@:
502
	@@:
503
	cmp ah,13
503
	cmp ah,13
504
	jne @f
504
	jne @f
505
		call mnu_reset_average_x
505
		call mnu_reset_average_x
506
		jmp prop_still.end
506
		jmp prop_still.end
507
	@@:
507
	@@:
508
	cmp ah,14
508
	cmp ah,14
509
	jne @f
509
	jne @f
510
		call mnu_reset_average_y
510
		call mnu_reset_average_y
511
		jmp prop_still.end
511
		jmp prop_still.end
512
	@@:
512
	@@:
513
	cmp ah,15
513
	cmp ah,15
514
	jne @f
514
	jne @f
515
		call mnu_reset_average_z
515
		call mnu_reset_average_z
516
		jmp prop_still.end
516
		jmp prop_still.end
517
	@@:
517
	@@:
518
 
518
 
519
	cmp ah,1
519
	cmp ah,1
520
	jne prop_still.end
520
	jne prop_still.end
521
.exit:
521
.exit:
522
	mov dword[tree3.data_img],0 ;ç¨á⨬ 㪠§ â¥«¨ ­  ¨ª®­ª¨ çâ®-¡ë ¨å ­¥ 㤠«¨« ¤¥áâàãªâ®à
522
	mov dword[tree3.data_img],0 ;ç¨á⨬ 㪠§ â¥«¨ ­  ¨ª®­ª¨ çâ®-¡ë ¨å ­¥ 㤠«¨« ¤¥áâàãªâ®à
523
	mov dword[tree3.data_img_sys],0 ;â. ª. ®­¨ ¥é¥ ¨á¯®«ì§ãîâìáï ¢ ¤à㣨å í«¥¬¥­â å
523
	mov dword[tree3.data_img_sys],0 ;â. ª. ®­¨ ¥é¥ ¨á¯®«ì§ãîâìáï ¢ ¤à㣨å í«¥¬¥­â å
524
	stdcall dword[tl_data_clear], tree3
524
	stdcall dword[tl_data_clear], tree3
525
	mov edi,o3d
525
	mov edi,o3d
526
	stdcall mem.Free,[edi+offs_obj_normals_tri_data]
526
	stdcall mem.Free,[edi+obj_3d.normals_tri_data]
527
	stdcall mem.Free,[edi+offs_obj_normals_poi_data]
527
	stdcall mem.Free,[edi+obj_3d.normals_poi_data]
528
	mov dword[edi+offs_obj_normals_tri_data],0
528
	mov dword[edi+obj_3d.normals_tri_data],0
529
	mov dword[edi+offs_obj_normals_poi_data],0
529
	mov dword[edi+obj_3d.normals_poi_data],0
530
	mov byte[prop_wnd_run],0 ;®¡­ã«ï¥¬ áç¥â稪 ®ª®­
530
	mov byte[prop_wnd_run],0 ;®¡­ã«ï¥¬ áç¥â稪 ®ª®­
531
	mcall SF_TERMINATE_PROCESS ;¢ë室 ¨§ ¯à®£à ¬¬ë
531
	mcall SF_TERMINATE_PROCESS ;¢ë室 ¨§ ¯à®£à ¬¬ë
532
 
532
 
533
align 4
533
align 4
534
get_point_coords:
534
get_point_coords:
535
	;§ £à㧪  ª®®à¤¨­ â ¢ editbox-ë
535
	;§ £à㧪  ª®®à¤¨­ â ¢ editbox-ë
536
	push eax ebx
536
	push eax ebx
537
	stdcall [tl_node_get_data],tree3
537
	stdcall [tl_node_get_data],tree3
538
	cmp eax,0
538
	cmp eax,0
539
	je @f
539
	je @f
540
		mov ebx,[eax]
540
		mov ebx,[eax]
541
		mov word[NumberSymbolsAD],8
541
		mov word[NumberSymbolsAD],8
542
		finit
542
		finit
543
		fld dword[ebx]
543
		fld dword[ebx]
544
		fstp qword[Data_Double]
544
		fstp qword[Data_Double]
545
		call DoubleFloat_to_String
545
		call DoubleFloat_to_String
546
		stdcall [edit_box_set_text], edit1, Data_String
546
		stdcall [edit_box_set_text], edit1, Data_String
547
		fld dword[ebx+4]
547
		fld dword[ebx+4]
548
		fstp qword[Data_Double]
548
		fstp qword[Data_Double]
549
		call DoubleFloat_to_String
549
		call DoubleFloat_to_String
550
		stdcall [edit_box_set_text], edit2, Data_String
550
		stdcall [edit_box_set_text], edit2, Data_String
551
		fld dword[ebx+8]
551
		fld dword[ebx+8]
552
		fstp qword[Data_Double]
552
		fstp qword[Data_Double]
553
		call DoubleFloat_to_String
553
		call DoubleFloat_to_String
554
		stdcall [edit_box_set_text], edit3, Data_String
554
		stdcall [edit_box_set_text], edit3, Data_String
555
		stdcall [edit_box_draw], edit1
555
		stdcall [edit_box_draw], edit1
556
		stdcall [edit_box_draw], edit2
556
		stdcall [edit_box_draw], edit2
557
		stdcall [edit_box_draw], edit3
557
		stdcall [edit_box_draw], edit3
558
	@@:
558
	@@:
559
	pop ebx eax
559
	pop ebx eax
560
	ret
560
	ret
561
 
561
 
562
align 4
562
align 4
563
proc prop_timer_funct uses eax
563
proc prop_timer_funct uses eax
564
	;¯à®á¬ âਢ ¥¬ ¢ë¤¥«¥­­ãî ª®®à¤¨­ âã
564
	;¯à®á¬ âਢ ¥¬ ¢ë¤¥«¥­­ãî ª®®à¤¨­ âã
565
	stdcall [tl_node_get_data],tree3
565
	stdcall [tl_node_get_data],tree3
566
	cmp [cursor_last_draw],eax
566
	cmp [cursor_last_draw],eax
567
	je @f
567
	je @f
568
		mov [cursor_last_draw],eax
568
		mov [cursor_last_draw],eax
569
		stdcall draw_3d, o3d
569
		stdcall draw_3d, o3d
570
	@@:
570
	@@:
571
	ret
571
	ret
572
endp
572
endp
573
 
573
 
574
align 4
574
align 4
575
proc mnu_vertexes_select uses eax ebx
575
proc mnu_vertexes_select uses eax ebx
576
	stdcall [tl_node_get_data],tree3
576
	stdcall [tl_node_get_data],tree3
577
	cmp eax,0
577
	cmp eax,0
578
	je .no_points
578
	je .no_points
579
	stdcall found_block_data,tree3
579
	stdcall found_block_data,tree3
580
	cmp eax,0
580
	cmp eax,0
581
	je .no_points
581
	je .no_points
582
		mov bx,word[eax]
582
		mov bx,word[eax]
583
		cmp bx,ID_ICON_POINT_SEL
583
		cmp bx,ID_ICON_POINT_SEL
584
		je @f
584
		je @f
585
			mov word[eax],ID_ICON_POINT_SEL
585
			mov word[eax],ID_ICON_POINT_SEL
586
			inc dword[obj_poi_sel_c]
586
			inc dword[obj_poi_sel_c]
587
			jmp .change
587
			jmp .change
588
		@@:
588
		@@:
589
			mov word[eax],ID_ICON_POINT
589
			mov word[eax],ID_ICON_POINT
590
			dec dword[obj_poi_sel_c]
590
			dec dword[obj_poi_sel_c]
591
		.change:
591
		.change:
592
			mov eax,[obj_poi_sel_c]
592
			mov eax,[obj_poi_sel_c]
593
			stdcall convert_int_to_str, txt_select_vert.count,16
593
			stdcall convert_int_to_str, txt_select_vert.count,16
594
	.no_points:
594
	.no_points:
595
	ret
595
	ret
596
endp
596
endp
597
 
597
 
598
align 4
598
align 4
599
proc mnu_vertexes_deselect uses eax
599
proc mnu_vertexes_deselect uses eax
600
	cmp dword[obj_poi_sel_c],0
600
	cmp dword[obj_poi_sel_c],0
601
	je .no_points
601
	je .no_points
602
	mov dword[obj_poi_sel_c],0
602
	mov dword[obj_poi_sel_c],0
603
	stdcall [tl_node_poi_get_info], tree3,0
603
	stdcall [tl_node_poi_get_info], tree3,0
604
	cmp eax,0
604
	cmp eax,0
605
	je .no_points
605
	je .no_points
606
	@@:
606
	@@:
607
		mov word[eax],ID_ICON_POINT
607
		mov word[eax],ID_ICON_POINT
608
		stdcall [tl_node_poi_get_next_info], tree3,eax
608
		stdcall [tl_node_poi_get_next_info], tree3,eax
609
		cmp eax,0
609
		cmp eax,0
610
		jne @b
610
		jne @b
611
	.no_points:
611
	.no_points:
612
	ret
612
	ret
613
endp
613
endp
614
 
614
 
615
align 4
615
align 4
616
proc mnu_reset_average_x uses eax ebx ecx edx edi
616
proc mnu_reset_average_x uses eax ebx ecx edx edi
617
	cmp dword[obj_poi_sel_c],2
617
	cmp dword[obj_poi_sel_c],2
618
	jl .end_select
618
	jl .end_select
619
		finit
619
		finit
620
		fldz
620
		fldz
621
		mov ecx,dword[obj_poi_sel_c]
621
		mov ecx,dword[obj_poi_sel_c]
622
		stdcall dword[tl_node_poi_get_info], tree3,0
622
		stdcall dword[tl_node_poi_get_info], tree3,0
623
		@@:
623
		@@:
624
			cmp eax,0
624
			cmp eax,0
625
			je .end_select
625
			je .end_select
626
			mov ebx,eax
626
			mov ebx,eax
627
			cmp word[ebx],ID_ICON_POINT_SEL
627
			cmp word[ebx],ID_ICON_POINT_SEL
628
			jne .next_sel0
628
			jne .next_sel0
629
				stdcall [tl_node_poi_get_data], tree3,ebx
629
				stdcall [tl_node_poi_get_data], tree3,ebx
630
				mov eax,[eax]
630
				mov eax,[eax]
631
				fadd dword[eax]
631
				fadd dword[eax]
632
				dec ecx
632
				dec ecx
633
				jz @f
633
				jz @f
634
			.next_sel0:
634
			.next_sel0:
635
			stdcall dword[tl_node_poi_get_next_info], tree3,ebx
635
			stdcall dword[tl_node_poi_get_next_info], tree3,ebx
636
			jmp @b
636
			jmp @b
637
		@@:
637
		@@:
638
		fidiv dword[obj_poi_sel_c]
638
		fidiv dword[obj_poi_sel_c]
639
		fstp dword[eax]
639
		fstp dword[eax]
640
		mov edx,[eax]
640
		mov edx,[eax]
641
		mov ecx,dword[obj_poi_sel_c]
641
		mov ecx,dword[obj_poi_sel_c]
642
		stdcall dword[tl_node_poi_get_info], tree3,0
642
		stdcall dword[tl_node_poi_get_info], tree3,0
643
		@@:
643
		@@:
644
			cmp eax,0
644
			cmp eax,0
645
			je .end_select
645
			je .end_select
646
			mov ebx,eax
646
			mov ebx,eax
647
			cmp word[ebx],ID_ICON_POINT_SEL
647
			cmp word[ebx],ID_ICON_POINT_SEL
648
			jne .next_sel1
648
			jne .next_sel1
649
				stdcall [tl_node_poi_get_data], tree3,ebx
649
				stdcall [tl_node_poi_get_data], tree3,ebx
650
				mov edi,eax
650
				mov edi,eax
651
				mov eax,[eax]
651
				mov eax,[eax]
652
				mov [eax],edx
652
				mov [eax],edx
653
				stdcall update_tree, edi
653
				stdcall update_tree, edi
654
				dec ecx
654
				dec ecx
655
				jz @f
655
				jz @f
656
			.next_sel1:
656
			.next_sel1:
657
			stdcall dword[tl_node_poi_get_next_info], tree3,ebx
657
			stdcall dword[tl_node_poi_get_next_info], tree3,ebx
658
			jmp @b
658
			jmp @b
659
		@@:
659
		@@:
660
    .end_select:
660
    .end_select:
661
	ret
661
	ret
662
endp
662
endp
663
 
663
 
664
align 4
664
align 4
665
proc mnu_reset_average_y uses eax ebx ecx edx edi
665
proc mnu_reset_average_y uses eax ebx ecx edx edi
666
	cmp dword[obj_poi_sel_c],2
666
	cmp dword[obj_poi_sel_c],2
667
	jl .end_select
667
	jl .end_select
668
		finit
668
		finit
669
		fldz
669
		fldz
670
		mov ecx,dword[obj_poi_sel_c]
670
		mov ecx,dword[obj_poi_sel_c]
671
		stdcall dword[tl_node_poi_get_info], tree3,0
671
		stdcall dword[tl_node_poi_get_info], tree3,0
672
		@@:
672
		@@:
673
			cmp eax,0
673
			cmp eax,0
674
			je .end_select
674
			je .end_select
675
			mov ebx,eax
675
			mov ebx,eax
676
			cmp word[ebx],ID_ICON_POINT_SEL
676
			cmp word[ebx],ID_ICON_POINT_SEL
677
			jne .next_sel0
677
			jne .next_sel0
678
				stdcall [tl_node_poi_get_data], tree3,ebx
678
				stdcall [tl_node_poi_get_data], tree3,ebx
679
				mov eax,[eax]
679
				mov eax,[eax]
680
				fadd dword[eax+4]
680
				fadd dword[eax+4]
681
				dec ecx
681
				dec ecx
682
				jz @f
682
				jz @f
683
			.next_sel0:
683
			.next_sel0:
684
			stdcall dword[tl_node_poi_get_next_info], tree3,ebx
684
			stdcall dword[tl_node_poi_get_next_info], tree3,ebx
685
			jmp @b
685
			jmp @b
686
		@@:
686
		@@:
687
		fidiv dword[obj_poi_sel_c]
687
		fidiv dword[obj_poi_sel_c]
688
		fstp dword[eax+4]
688
		fstp dword[eax+4]
689
		mov edx,[eax+4]
689
		mov edx,[eax+4]
690
		mov ecx,dword[obj_poi_sel_c]
690
		mov ecx,dword[obj_poi_sel_c]
691
		stdcall dword[tl_node_poi_get_info], tree3,0
691
		stdcall dword[tl_node_poi_get_info], tree3,0
692
		@@:
692
		@@:
693
			cmp eax,0
693
			cmp eax,0
694
			je .end_select
694
			je .end_select
695
			mov ebx,eax
695
			mov ebx,eax
696
			cmp word[ebx],ID_ICON_POINT_SEL
696
			cmp word[ebx],ID_ICON_POINT_SEL
697
			jne .next_sel1
697
			jne .next_sel1
698
				stdcall [tl_node_poi_get_data], tree3,ebx
698
				stdcall [tl_node_poi_get_data], tree3,ebx
699
				mov edi,eax
699
				mov edi,eax
700
				mov eax,[eax]
700
				mov eax,[eax]
701
				mov [eax+4],edx
701
				mov [eax+4],edx
702
				stdcall update_tree, edi
702
				stdcall update_tree, edi
703
				dec ecx
703
				dec ecx
704
				jz @f
704
				jz @f
705
			.next_sel1:
705
			.next_sel1:
706
			stdcall dword[tl_node_poi_get_next_info], tree3,ebx
706
			stdcall dword[tl_node_poi_get_next_info], tree3,ebx
707
			jmp @b
707
			jmp @b
708
		@@:
708
		@@:
709
    .end_select:
709
    .end_select:
710
	ret
710
	ret
711
endp
711
endp
712
 
712
 
713
align 4
713
align 4
714
proc mnu_reset_average_z uses eax ebx ecx edx edi
714
proc mnu_reset_average_z uses eax ebx ecx edx edi
715
	cmp dword[obj_poi_sel_c],2
715
	cmp dword[obj_poi_sel_c],2
716
	jl .end_select
716
	jl .end_select
717
		finit
717
		finit
718
		fldz
718
		fldz
719
		mov ecx,dword[obj_poi_sel_c]
719
		mov ecx,dword[obj_poi_sel_c]
720
		stdcall dword[tl_node_poi_get_info], tree3,0
720
		stdcall dword[tl_node_poi_get_info], tree3,0
721
		@@:
721
		@@:
722
			cmp eax,0
722
			cmp eax,0
723
			je .end_select
723
			je .end_select
724
			mov ebx,eax
724
			mov ebx,eax
725
			cmp word[ebx],ID_ICON_POINT_SEL
725
			cmp word[ebx],ID_ICON_POINT_SEL
726
			jne .next_sel0
726
			jne .next_sel0
727
				stdcall [tl_node_poi_get_data], tree3,ebx
727
				stdcall [tl_node_poi_get_data], tree3,ebx
728
				mov eax,[eax]
728
				mov eax,[eax]
729
				fadd dword[eax+8]
729
				fadd dword[eax+8]
730
				dec ecx
730
				dec ecx
731
				jz @f
731
				jz @f
732
			.next_sel0:
732
			.next_sel0:
733
			stdcall dword[tl_node_poi_get_next_info], tree3,ebx
733
			stdcall dword[tl_node_poi_get_next_info], tree3,ebx
734
			jmp @b
734
			jmp @b
735
		@@:
735
		@@:
736
		fidiv dword[obj_poi_sel_c]
736
		fidiv dword[obj_poi_sel_c]
737
		fstp dword[eax+8]
737
		fstp dword[eax+8]
738
		mov edx,[eax+8]
738
		mov edx,[eax+8]
739
		mov ecx,dword[obj_poi_sel_c]
739
		mov ecx,dword[obj_poi_sel_c]
740
		stdcall dword[tl_node_poi_get_info], tree3,0
740
		stdcall dword[tl_node_poi_get_info], tree3,0
741
		@@:
741
		@@:
742
			cmp eax,0
742
			cmp eax,0
743
			je .end_select
743
			je .end_select
744
			mov ebx,eax
744
			mov ebx,eax
745
			cmp word[ebx],ID_ICON_POINT_SEL
745
			cmp word[ebx],ID_ICON_POINT_SEL
746
			jne .next_sel1
746
			jne .next_sel1
747
				stdcall [tl_node_poi_get_data], tree3,ebx
747
				stdcall [tl_node_poi_get_data], tree3,ebx
748
				mov edi,eax
748
				mov edi,eax
749
				mov eax,[eax]
749
				mov eax,[eax]
750
				mov [eax+8],edx
750
				mov [eax+8],edx
751
				stdcall update_tree, edi
751
				stdcall update_tree, edi
752
				dec ecx
752
				dec ecx
753
				jz @f
753
				jz @f
754
			.next_sel1:
754
			.next_sel1:
755
			stdcall dword[tl_node_poi_get_next_info], tree3,ebx
755
			stdcall dword[tl_node_poi_get_next_info], tree3,ebx
756
			jmp @b
756
			jmp @b
757
		@@:
757
		@@:
758
    .end_select:
758
    .end_select:
759
	ret
759
	ret
760
endp
760
endp
761
 
761
 
762
align 4
762
align 4
763
proc update_tree h_mem:dword
763
proc update_tree h_mem:dword
764
pushad
764
pushad
765
	mov edi,[h_mem]
765
	mov edi,[h_mem]
766
	mov ebx,[edi]
766
	mov ebx,[edi]
767
	finit
767
	finit
768
 
768
 
769
	;®¡­®¢«¥­¨¥ ¨§¬¥­¥­­®£® 㧫  ¢ ᯨ᪥ tree3 ¨ £« ¢­®£® ®ª­  (¯® â ©¬¥àã)
769
	;®¡­®¢«¥­¨¥ ¨§¬¥­¥­­®£® 㧫  ¢ ᯨ᪥ tree3 ¨ £« ¢­®£® ®ª­  (¯® â ©¬¥àã)
770
	mov word[NumberSymbolsAD],5
770
	mov word[NumberSymbolsAD],5
771
	mov dword[obj_point.text],0
771
	mov dword[obj_point.text],0
772
	cld
772
	cld
773
	mov ecx,3
773
	mov ecx,3
774
	.coord:
774
	.coord:
775
		fld dword[ebx]
775
		fld dword[ebx]
776
		fstp qword[Data_Double]
776
		fstp qword[Data_Double]
777
		call DoubleFloat_to_String
777
		call DoubleFloat_to_String
778
		add ebx,4
778
		add ebx,4
779
		stdcall str_len, Data_String
779
		stdcall str_len, Data_String
780
		mov esi,txt_space
780
		mov esi,txt_space
781
		add esi,eax
781
		add esi,eax
782
		cmp esi,txt_space.end
782
		cmp esi,txt_space.end
783
		jl .normal_size
783
		jl .normal_size
784
			mov esi,txt_space.end-1 ;¬¨­¨¬ã¬ 1 ¯à®¡¥« ­ã¦­® ¤®¡ ¢¨âì, çâ®-¡ë æ¨äàë ­¥ ᫨¯ «¨áì
784
			mov esi,txt_space.end-1 ;¬¨­¨¬ã¬ 1 ¯à®¡¥« ­ã¦­® ¤®¡ ¢¨âì, çâ®-¡ë æ¨äàë ­¥ ᫨¯ «¨áì
785
		.normal_size:
785
		.normal_size:
786
		stdcall str_cat, obj_point.text,esi
786
		stdcall str_cat, obj_point.text,esi
787
		stdcall str_cat, obj_point.text,Data_String
787
		stdcall str_cat, obj_point.text,Data_String
788
		loop .coord
788
		loop .coord
789
	mov esi,obj_point.text
789
	mov esi,obj_point.text
790
	mov byte[esi],'*' ;®â¬¥ç ¥¬ çâ® ¢¥à設  ¨§¬¥­ï« áì
790
	mov byte[esi],'*' ;®â¬¥ç ¥¬ çâ® ¢¥à設  ¨§¬¥­ï« áì
791
	mov byte[can_save],1 ;¤«ï ¯®ª §  ª­®¯ª¨ '‘®åà ­¨âì'
791
	mov byte[can_save],1 ;¤«ï ¯®ª §  ª­®¯ª¨ '‘®åà ­¨âì'
792
	add edi,4
792
	add edi,4
793
	mov ecx,MAX_OBJECT_SIZE-4
793
	mov ecx,MAX_OBJECT_SIZE-4
794
	rep movsb
794
	rep movsb
795
popad
795
popad
796
	ret
796
	ret
797
endp
797
endp
798
 
798
 
799
align 4
799
align 4
800
angle_dxm dd 1.7775 ;~ 3d_wnd_w/180 - ¯à¨¡ ¢«¥­¨¥ 㣫®¢ ¯®¢®à®â  áæ¥­ë ¯à¨ ¢à é¥­¨¨ ¬ë襩
800
angle_dxm dd 1.7775 ;~ 3d_wnd_w/180 - ¯à¨¡ ¢«¥­¨¥ 㣫®¢ ¯®¢®à®â  áæ¥­ë ¯à¨ ¢à é¥­¨¨ ¬ë襩
801
angle_dym dd 1.3335 ;~ 3d_wnd_h/180
801
angle_dym dd 1.3335 ;~ 3d_wnd_h/180
802
ratio dd 1.3333 ;~ 3d_wnd_w/3d_wnd_h
802
ratio dd 1.3333 ;~ 3d_wnd_w/3d_wnd_h
803
cursor_last_draw dd 0 ;¯®«®¦¥­¨¥ ªãàá®à  ¯à¨ ¯®á«¥¤­¥© ¯à®à¨á®¢ª¥ 3d ®ª­ 
803
cursor_last_draw dd 0 ;¯®«®¦¥­¨¥ ªãàá®à  ¯à¨ ¯®á«¥¤­¥© ¯à®à¨á®¢ª¥ 3d ®ª­ 
804
capt_p dd 0
804
capt_p dd 0
805
 
805
 
806
;¤¥à¥¢® á ®¡ê¥ªâ ¬¨ ¢ ¯®«ì§®¢ â¥«ì᪮¬ ä ©«¥
806
;¤¥à¥¢® á ®¡ê¥ªâ ¬¨ ¢ ¯®«ì§®¢ â¥«ì᪮¬ ä ©«¥
807
tree3 tree_list MAX_OBJECT_SIZE,3, tl_key_no_edit+tl_list_box_mode,\
807
tree3 tree_list MAX_OBJECT_SIZE,3, tl_key_no_edit+tl_list_box_mode,\
808
	16,16, 0xffffff,0xb0d0ff,0x400040, 5,290,303,140, 16, 4,0, el_focus,\
808
	16,16, 0xffffff,0xb0d0ff,0x400040, 5,290,303,140, 16, 4,0, el_focus,\
809
	w_scr_t3,get_point_coords
809
	w_scr_t3,get_point_coords
810
 
810
 
811
edit1 edit_box 80,  76, 269, 0xffd0d0, 0xff, 0x80ff, 0, 0x8000, 34, string1, mouse_dd, 0
811
edit1 edit_box 80,  76, 269, 0xffd0d0, 0xff, 0x80ff, 0, 0x8000, 34, string1, mouse_dd, 0
812
edit2 edit_box 80, 160, 269, 0xd0d0ff, 0xff, 0x80ff, 0, 0x8000, 34, string2, mouse_dd, 0
812
edit2 edit_box 80, 160, 269, 0xd0d0ff, 0xff, 0x80ff, 0, 0x8000, 34, string2, mouse_dd, 0
813
edit3 edit_box 80, 244, 269, 0xd0ffd0, 0xff, 0x80ff, 0, 0x8000, 34, string3, mouse_dd, 0
813
edit3 edit_box 80, 244, 269, 0xd0ffd0, 0xff, 0x80ff, 0, 0x8000, 34, string3, mouse_dd, 0
814
editboxes_end:
814
editboxes_end:
815
 
815
 
816
string1 rb 34
816
string1 rb 34
817
string2 rb 34
817
string2 rb 34
818
string3 rb 34
818
string3 rb 34
819
 
819
 
820
align 4
820
align 4
821
w_scr_t3 scrollbar 16, 0,0,0, 15, 100,0,0, 0,0,0, 1
821
w_scr_t3 scrollbar 16, 0,0,0, 15, 100,0,0, 0,0,0, 1