Subversion Repositories Kolibri OS

Rev

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

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