Subversion Repositories Kolibri OS

Rev

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

Rev 5935 Rev 5938
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 ;¢ëá®â  ®ª­  ᮠ᢮©á⢠¬¨ ®¡ê¥ªâ 
-
 
8
3d_wnd_l equ   5 ;®âáâ㯠¤«ï tinygl ¡ãä¥à  á«¥¢ 
-
 
9
3d_wnd_t equ  23 ;®âáâ㯠¤«ï tinygl ¡ãä¥à  ᢥàåã
-
 
10
3d_wnd_w equ 320
7
prop_wnd_height equ 460
11
3d_wnd_h equ 240
8
SIZE_ONE_FLOAT equ 14
12
SIZE_ONE_FLOAT equ 14
9
MAX_OBJECT_SIZE equ (4+SIZE_ONE_FLOAT*3+1)
13
MAX_OBJECT_SIZE equ (4+SIZE_ONE_FLOAT*3+1)
10
 
14
 
11
bit_vertexes equ 0
15
bit_vertexes equ 0
12
bit_faces equ 1
16
bit_faces equ 1
13
bit_faces_fill equ 2
17
bit_faces_fill equ 2
14
bit_light equ 3
18
bit_light equ 3
-
 
19
 
-
 
20
ini_name db 'info3ds.ini',0
-
 
21
ini_sec_w3d db 'Window 3d',0
-
 
22
key_dv  db 'draw_vertices',0
-
 
23
key_df  db 'draw_faces',0
-
 
24
key_dff db 'draw_faces_fill',0
-
 
25
key_dl  db 'draw_light',0
-
 
26
key_ox  db 'col_ox',0
-
 
27
key_oy  db 'col_oy',0
15
def_dr_mode equ 0x1111b
28
key_oz  db 'col_oz',0
-
 
29
key_bk  db 'col_bkgnd',0
-
 
30
key_vert db 'col_vertices',0
-
 
31
key_face db 'col_faces',0
16
 
32
 
17
prop_wnd_run db 0 ;¯¥à¥¬¥­­ ï á«¥¤ïé ï §  ⥬ çâ®-¡ë ­¥ § ¯ã᪠âì ¡®«ìè¥ 1-£® ®ª­  ᮠ᢮©á⢠¬¨ ®¤­®¢à¥¬¥­­®
33
prop_wnd_run db 0 ;¯¥à¥¬¥­­ ï á«¥¤ïé ï §  ⥬ çâ®-¡ë ­¥ § ¯ã᪠âì ¡®«ìè¥ 1-£® ®ª­  ᮠ᢮©á⢠¬¨ ®¤­®¢à¥¬¥­­®
18
 
34
 
19
txt_q db '?',0
35
txt_q db '?',0
20
txt_space:
36
txt_space:
21
	db SIZE_ONE_FLOAT dup(' ')
37
	db SIZE_ONE_FLOAT dup(' ')
22
.end:
38
.end:
23
	db 0
39
	db 0
24
 
40
 
25
rad_c dd 150 ;¤«ï ¢ëç¨á«¥­¨ï à ¤¨ãá 
41
rad_c dd 150 ;¤«ï ¢ëç¨á«¥­¨ï à ¤¨ãá 
26
 
42
 
27
obj_point: ;¤®¡ ¢«ï¥¬ë© ®¡ê¥ªâ
43
obj_point: ;¤®¡ ¢«ï¥¬ë© ®¡ê¥ªâ
28
	dd 0   ;㪠§ â¥«ì
44
	dd 0   ;㪠§ â¥«ì
29
.text:
45
.text:
30
	rb MAX_OBJECT_SIZE
46
	rb MAX_OBJECT_SIZE
31
 
47
 
32
 
48
 
33
 
49
 
34
;¤ ­®¥ ®ª­® (¯à®æ¥áá) ¢ë§ë¢ ¥âìáï ä㭪樥© but_wnd_coords
50
;¤ ­®¥ ®ª­® (¯à®æ¥áá) ¢ë§ë¢ ¥âìáï ä㭪樥© but_wnd_coords
35
align 4
51
align 4
36
prop_start:
52
prop_start:
37
pushad
53
pushad
38
	mcall 40,0x27 ;¬ áª  ®¦¨¤ ¥¬ëå ᮡë⨩
54
	mcall 40,0x27 ;¬ áª  ®¦¨¤ ¥¬ëå ᮡë⨩
39
	inc byte[prop_wnd_run]
55
	inc byte[prop_wnd_run]
40
	mov dword[w_scr_t3.type],1
56
	mov dword[w_scr_t3.type],1
41
	call prop_wnd_clear_param
57
	call prop_wnd_clear_param
42
 
58
 
43
	stdcall [tl_node_get_data],tree1
59
	stdcall [tl_node_get_data],tree1
44
	xor edx,edx
60
	xor edx,edx
45
	mov dword[capt_p],txt_q
61
	mov dword[capt_p],txt_q
46
	cmp eax,0
62
	cmp eax,0
47
	je .no_points
63
	je .no_points
48
		mov ebx,[eax] ;¯®«ãç ¥¬ §­ ç¥­¨¥ ᤢ¨£  ¢ë¡à ­­®£® ¡«®ª 
64
		mov ebx,[eax] ;¯®«ãç ¥¬ §­ ç¥­¨¥ ᤢ¨£  ¢ë¡à ­­®£® ¡«®ª 
49
		add ebx,[open_file_lif]
65
		add ebx,[open_file_data]
-
 
66
 
-
 
67
		cmp word[ebx],CHUNK_OBJBLOCK
-
 
68
		jne .end_oblo
-
 
69
			mov dword[capt_p],txt_4000
-
 
70
			call found_block_data
-
 
71
			cmp eax,0
-
 
72
			je .no_points
-
 
73
			mov esi,eax
-
 
74
			movzx ecx,byte[esi+2] ;cl - ã஢¥­ì ¢ë¡à ­­®£® 㧫 
-
 
75
			.cycle_0:
-
 
76
				stdcall [tl_node_poi_get_next_info], tree1,esi
-
 
77
				cmp eax,0
-
 
78
				je .no_points
-
 
79
				cmp byte[eax+2],cl
-
 
80
				jle .no_points
-
 
81
				mov esi,eax
-
 
82
				stdcall [tl_node_poi_get_data], tree1,esi
-
 
83
				mov ebx,[eax]
-
 
84
				add ebx,[open_file_data]
-
 
85
				cmp word[ebx],CHUNK_VERTLIST
-
 
86
				je .ini_vlist
-
 
87
				jmp .cycle_0
-
 
88
			jmp .no_points
-
 
89
		.end_oblo:
-
 
90
		cmp word[ebx],CHUNK_TRIMESH
-
 
91
		jne .end_trim
-
 
92
			mov dword[capt_p],txt_4100
-
 
93
			call found_block_data
-
 
94
			cmp eax,0
-
 
95
			je .no_points
-
 
96
			mov esi,eax
-
 
97
			movzx ecx,byte[esi+2] ;cl - ã஢¥­ì ¢ë¡à ­­®£® 㧫 
-
 
98
			.cycle_1:
-
 
99
				stdcall [tl_node_poi_get_next_info], tree1,esi
-
 
100
				cmp eax,0
-
 
101
				je .no_points
-
 
102
				cmp byte[eax+2],cl
-
 
103
				jle .no_points
-
 
104
				mov esi,eax
-
 
105
				stdcall [tl_node_poi_get_data], tree1,esi
-
 
106
				mov ebx,[eax]
-
 
107
				add ebx,[open_file_data]
-
 
108
				cmp word[ebx],CHUNK_VERTLIST
-
 
109
				je .ini_vlist
-
 
110
				jmp .cycle_1
-
 
111
			jmp .no_points
50
 
112
		.end_trim:
51
		cmp word[ebx],CHUNK_VERTLIST
113
		cmp word[ebx],CHUNK_VERTLIST
-
 
114
		jne .end_vlist
-
 
115
			mov dword[capt_p],txt_4110
52
		jne .end_vlist
116
			.ini_vlist:
53
			movzx edx,word[ebx+6] ;ª®««¨ç¥á⢮ â®ç¥ª
117
			movzx edx,word[ebx+6] ;ª®««¨ç¥á⢮ â®ç¥ª
54
			add ebx,8
-
 
55
			mov dword[capt_p],txt_4110
118
			add ebx,8
56
			;¯®¨áª ¤ ­­ëå ¤«ï âà¥ã£®«ìª®¢
-
 
57
			mov ecx,eax
-
 
58
			stdcall [tl_node_poi_get_info], tree1,0
-
 
59
			@@:
-
 
60
				mov esi,eax
119
			;¯®¨áª ¤ ­­ëå ¤«ï âà¥ã£®«ìª®¢
61
				stdcall [tl_node_poi_get_data], tree1,esi
-
 
62
				cmp eax,ecx
-
 
63
				je @f ;¥á«¨ ¯®¯ «¨ ­  ¢ë¡à ­­ë© 㧥«
-
 
64
				stdcall [tl_node_poi_get_next_info], tree1,esi
120
			call found_block_data
65
				cmp eax,0
-
 
66
				jne @b
121
			cmp eax,0
67
				jmp .set_points
122
			je .set_points
68
			@@:
123
			mov esi,eax
69
			;¥á«¨ ­ è«¨ ¢ë¡à ­­ë© 㧥«, â® ¤ «¥¥ ¯ëâ ¥¬áï ­ ©â¨ 㧥« á âà¥ã£®«ì­¨ª ¬¨
124
			;¥á«¨ ­ è«¨ ¢ë¡à ­­ë© 㧥«, â® ¤ «¥¥ ¯ëâ ¥¬áï ­ ©â¨ 㧥« á âà¥ã£®«ì­¨ª ¬¨
70
			movzx ecx,byte[esi+2] ;cl - ã஢¥­ì ¢ë¡à ­­®£® 㧫 
125
			movzx ecx,byte[esi+2] ;cl - ã஢¥­ì ¢ë¡à ­­®£® 㧫 
71
			.cycle_0:
126
			.cycle_2:
72
				stdcall [tl_node_poi_get_next_info], tree1,esi
127
				stdcall [tl_node_poi_get_next_info], tree1,esi
73
				cmp eax,0
128
				cmp eax,0
74
				je .set_points
129
				je .set_points
75
				mov esi,eax
130
				mov esi,eax
76
				stdcall [tl_node_poi_get_data], tree1,esi
131
				stdcall [tl_node_poi_get_data], tree1,esi
77
				cmp byte[esi+2],cl
132
				cmp byte[esi+2],cl
78
				jl .set_points
133
				jl .set_points
79
				je .found
134
				je .found
80
				jmp .cycle_0
135
				jmp .cycle_2
81
			.found: ;¥á«¨ ­ è«¨ 㧥« ⮣®¦¥ ã஢­ï çâ® ¨ ¢ë¡à ­­ë© 㧥«
136
			.found: ;¥á«¨ ­ è«¨ 㧥« ⮣®¦¥ ã஢­ï çâ® ¨ ¢ë¡à ­­ë© 㧥«
82
				cmp eax,0
137
				cmp eax,0
83
				je .set_points
138
				je .set_points
84
				mov eax,[eax]
139
				mov eax,[eax]
85
				add eax,[open_file_lif]
140
				add eax,[open_file_data]
86
				cmp word[eax],CHUNK_FACELIST
141
				cmp word[eax],CHUNK_FACELIST
87
				jne .cycle_0
142
				jne .cycle_2
88
				movzx ecx,word[eax+6]
143
				movzx ecx,word[eax+6]
89
				mov [obj_tri_count],ecx
144
				mov [obj_tri_count],ecx
90
				add eax,8 ;2+4+2 (chunk+size+count)
145
				add eax,8 ;2+4+2 (chunk+size+count)
91
				mov [obj_tri_data],eax
146
				mov [obj_tri_data],eax
92
			jmp .set_points
147
			jmp .set_points
93
		.end_vlist:
148
		.end_vlist:
94
		cmp word[ebx],CHUNK_TRACKPIVOT
149
		cmp word[ebx],CHUNK_TRACKPIVOT
95
		jne @f
150
		jne @f
96
			inc edx
151
			inc edx
97
			add ebx,6
152
			add ebx,6
98
			mov dword[capt_p],txt_b013
153
			mov dword[capt_p],txt_b013
99
			jmp .set_points
154
			jmp .set_points
100
		@@:
155
		@@:
101
		cmp word[ebx],0xb014
156
		cmp word[ebx],0xb014
102
		jne @f
157
		jne @f
103
			mov edx,2
158
			mov edx,2
104
			add ebx,6
159
			add ebx,6
105
			mov dword[capt_p],txt_b014
160
			mov dword[capt_p],txt_b014
106
			;jmp .set_points
161
			;jmp .set_points
107
		@@:
162
		@@:
108
		.set_points:
163
		.set_points:
109
		mov [obj_poi_data],ebx
164
		mov [obj_poi_data],ebx
110
		mov [obj_poi_count],edx
165
		mov [obj_poi_count],edx
111
	.no_points:
166
	.no_points:
112
 
167
 
113
	;­ áâனª  ᯨ᪠ ®¡ê¥ªâ®¢
168
	;­ áâனª  ᯨ᪠ ®¡ê¥ªâ®¢
114
	mov dword[tree3.info_max_count],2
169
	mov dword[tree3.info_max_count],2
115
	add dword[tree3.info_max_count],edx ;áâ ¢¨¬ ç¨á«® 㧫®¢, à ¢­®¥ ª®««¨ç¥áâ¢ã â®ç¥ª (+2 ­  ­ ç «® ¨ ª®­¥æ ᯨ᪠)
170
	add dword[tree3.info_max_count],edx ;áâ ¢¨¬ ç¨á«® 㧫®¢, à ¢­®¥ ª®««¨ç¥áâ¢ã â®ç¥ª (+2 ­  ­ ç «® ¨ ª®­¥æ ᯨ᪠)
116
	stdcall dword[tl_data_init], tree3
171
	stdcall dword[tl_data_init], tree3
117
	mov eax,dword[icon_tl_sys]
172
	mov eax,dword[icon_tl_sys]
118
	mov dword[tree3.data_img_sys],eax
173
	mov dword[tree3.data_img_sys],eax
119
	mov eax,dword[icon_toolbar]
174
	mov eax,dword[icon_toolbar]
120
	mov dword[tree3.data_img],eax
175
	mov dword[tree3.data_img],eax
121
 
176
 
122
	cmp edx,0
177
	cmp edx,0
123
	je .no_object
178
	je .no_object
124
		mov word[NumberSymbolsAD],5
179
		mov word[NumberSymbolsAD],5
125
		finit
180
		finit
126
		.new_point:
181
		.new_point:
127
			mov dword[obj_point],ebx
182
			mov dword[obj_point],ebx
128
			mov dword[obj_point.text],0
183
			mov dword[obj_point.text],0
129
			cld
184
			cld
130
			mov ecx,3
185
			mov ecx,3
131
			@@:
186
			@@:
132
				fld dword[ebx]
187
				fld dword[ebx]
133
				fstp qword[Data_Double]
188
				fstp qword[Data_Double]
134
				call DoubleFloat_to_String
189
				call DoubleFloat_to_String
135
				add ebx,4
190
				add ebx,4
136
				stdcall str_len, Data_String
191
				stdcall str_len, Data_String
137
				mov esi,txt_space
192
				mov esi,txt_space
138
				add esi,eax
193
				add esi,eax
139
				cmp esi,txt_space.end
194
				cmp esi,txt_space.end
140
				jl .normal_size
195
				jl .normal_size
141
					mov esi,txt_space.end-1 ;¬¨­¨¬ã¬ 1 ¯à®¡¥« ­ã¦­® ¤®¡ ¢¨âì, çâ®-¡ë æ¨äàë ­¥ ᫨¯ «¨áì
196
					mov esi,txt_space.end-1 ;¬¨­¨¬ã¬ 1 ¯à®¡¥« ­ã¦­® ¤®¡ ¢¨âì, çâ®-¡ë æ¨äàë ­¥ ᫨¯ «¨áì
142
				.normal_size:
197
				.normal_size:
143
				stdcall str_cat, obj_point.text,esi
198
				stdcall str_cat, obj_point.text,esi
144
				stdcall str_cat, obj_point.text,Data_String
199
				stdcall str_cat, obj_point.text,Data_String
145
				loop @b
200
				loop @b
146
			stdcall dword[tl_node_add], tree3,(ID_ICON_DATA shl 16),obj_point 
201
			stdcall dword[tl_node_add], tree3,(ID_ICON_DATA shl 16),obj_point 
147
			stdcall dword[tl_cur_next], tree3
202
			stdcall dword[tl_cur_next], tree3
148
			dec edx
203
			dec edx
149
			cmp edx,0
204
			cmp edx,0
150
			jg .new_point
205
			jg .new_point
151
			stdcall dword[tl_cur_beg], tree3
206
			stdcall dword[tl_cur_beg], tree3
152
	.no_object:
207
	.no_object:
153
	call obj_set_sizes
208
	call obj_set_sizes
154
	edit_boxes_set_sys_color edit1,editboxes_end,sc ;ãáâ ­®¢ª  á¨á⥬­ëå 梥⮢
209
	edit_boxes_set_sys_color edit1,editboxes_end,sc ;ãáâ ­®¢ª  á¨á⥬­ëå 梥⮢
155
	stdcall [edit_box_set_text], edit1, txt_q
210
	stdcall [edit_box_set_text], edit1, txt_q
156
	stdcall [edit_box_set_text], edit2, txt_q
211
	stdcall [edit_box_set_text], edit2, txt_q
157
	stdcall [edit_box_set_text], edit3, txt_q
212
	stdcall [edit_box_set_text], edit3, txt_q
-
 
213
	mov eax,0xc0c0c0
-
 
214
	mov ebx,[color_ox]
-
 
215
	shr ebx,2
-
 
216
	and ebx,0x3f3f3f
-
 
217
	add eax,ebx
-
 
218
	mov [edit1.color],eax
-
 
219
	mov eax,0xc0c0c0
-
 
220
	mov ebx,[color_oy]
-
 
221
	shr ebx,2
-
 
222
	and ebx,0x3f3f3f
-
 
223
	add eax,ebx
-
 
224
	mov [edit2.color],eax
-
 
225
	mov eax,0xc0c0c0
-
 
226
	mov ebx,[color_oz]
-
 
227
	shr ebx,2
-
 
228
	and ebx,0x3f3f3f
-
 
229
	add eax,ebx
-
 
230
	mov [edit3.color],eax
158
popad
231
popad
159
 
232
 
160
	call prop_red_win
233
	call prop_red_win
161
 
234
 
162
;­¥ ®âà뢠âì íâã äã­ªæ¨î ®â ¯à¥¤ë¤ã饩
235
;­¥ ®âà뢠âì íâã äã­ªæ¨î ®â ¯à¥¤ë¤ã饩
163
align 4
236
align 4
164
prop_still:
237
prop_still:
165
	pushad
238
	pushad
166
 
239
 
167
	mcall 23,10
240
	mcall 23,10
168
	or eax,eax
241
	or eax,eax
169
	jnz @f
242
	jnz @f
170
		call prop_timer_funct
243
		call prop_timer_funct
171
		jmp .end
244
		jmp .end
172
	@@:
245
	@@:
173
 
246
 
174
	cmp al,1 ;¨§¬. ¯®«®¦¥­¨¥ ®ª­ 
247
	cmp al,1 ;¨§¬. ¯®«®¦¥­¨¥ ®ª­ 
175
	jne @f
248
	jne @f
176
		call prop_red_win
249
		call prop_red_win
177
		jmp .end
250
		jmp .end
178
	@@:
251
	@@:
179
	cmp al,2
252
	cmp al,2
180
	jne @f
253
	jne @f
181
		call prop_key
254
		call prop_key
182
		jmp .end
255
		jmp .end
183
	@@:
256
	@@:
184
	cmp al,3
257
	cmp al,3
185
	jz prop_button
258
	jz prop_button
186
	cmp al,6
259
	cmp al,6
187
	jne @f 
260
	jne @f 
188
		call prop_mouse
261
		call prop_mouse
189
	@@:
262
	@@:
190
.end:
263
.end:
191
	popad
264
	popad
192
	jmp prop_still
265
	jmp prop_still
193
 
266
 
194
align 4
267
align 4
195
prop_red_win:
268
prop_red_win:
196
pushad
269
pushad
197
	mcall 12,1
270
	mcall 12,1
198
 
271
 
199
	xor eax,eax
272
	xor eax,eax
200
	mov edi,dword[capt_p] ;children window caption
273
	mov edi,dword[capt_p] ;children window caption
201
	mov bx,word[procinfo.box.left]
274
	mov bx,word[procinfo.box.left]
202
	add bx,word[buf_0.l]
275
	add bx,word[buf_0.l]
203
	add bx,5 ;è¨à¨­  ¡®ª®¢®© à ¬ª¨
276
	add bx,5 ;è¨à¨­  ¡®ª®¢®© à ¬ª¨
204
	shl ebx,16
277
	shl ebx,16
205
	mov bx,prop_wnd_width
278
	mov bx,prop_wnd_width
206
	mov cx,word[procinfo.box.top]
279
	mov cx,word[procinfo.box.top]
207
	add cx,word[buf_0.t]
280
	add cx,word[buf_0.t]
208
	shl ecx,16
281
	shl ecx,16
209
	mov cx,prop_wnd_height
282
	mov cx,prop_wnd_height
-
 
283
	mov edx,[sc.work]
210
	mov edx,0xffffd0+0x33000000
284
	or  edx,0x33000000
211
	int 0x40
285
	int 0x40
212
 
286
 
213
	mov esi,[sc.work_button]
287
	mov esi,[sc.work_button]
214
	mcall 8, (5 shl 16)+20, (266 shl 16)+20, 3
288
	mcall 8, (5 shl 16)+20, (266 shl 16)+20, 3
215
	mcall , (30 shl 16)+20, (266 shl 16)+20, 4
289
	mcall , (30 shl 16)+20, (266 shl 16)+20, 4
216
 
290
 
217
	mov ebx,[image_data_toolbar]
291
	mov ebx,[image_data_toolbar]
218
	add ebx,4*IMAGE_TOOLBAR_ICON_SIZE
292
	add ebx,3*IMAGE_TOOLBAR_ICON_SIZE
219
	mcall 7, , (16 shl 16)+16, (7 shl 16)+268 ;load
293
	mcall 7, , (16 shl 16)+16, (7 shl 16)+268 ;load
220
 
294
 
221
	sub ebx,IMAGE_TOOLBAR_ICON_SIZE
295
	sub ebx,IMAGE_TOOLBAR_ICON_SIZE
222
	mov edx,(32 shl 16)+268 ;save
296
	mov edx,(32 shl 16)+268 ;save
223
	int 0x40
297
	int 0x40
224
 
298
 
225
	mov dword[w_scr_t3.all_redraw],1
299
	mov dword[w_scr_t3.all_redraw],1
226
	stdcall [scrollbar_ver_draw],dword w_scr_t3
300
	stdcall [scrollbar_ver_draw],dword w_scr_t3
227
	stdcall [tl_draw], tree3
301
	stdcall [tl_draw], tree3
228
	stdcall [edit_box_draw], edit1
302
	stdcall [edit_box_draw], edit1
229
	stdcall [edit_box_draw], edit2
303
	stdcall [edit_box_draw], edit2
230
	stdcall [edit_box_draw], edit3
304
	stdcall [edit_box_draw], edit3
231
 
305
 
232
	stdcall [kmainmenu_draw], [main_menu]
306
	stdcall [kmainmenu_draw], [main_menu]
233
	call draw_3d
307
	call draw_3d
234
	mcall 12,2
308
	mcall 12,2
235
popad
309
popad
236
	ret
310
	ret
237
 
311
 
238
;ãáâ ­®¢ª  ¢á¥å ®á­®¢­ëå ¯¥à¥¬¥­­ëå ¯® 㬮«ç ­¨î
312
;ãáâ ­®¢ª  ¢á¥å ®á­®¢­ëå ¯¥à¥¬¥­­ëå ¯® 㬮«ç ­¨î
239
align 4
313
align 4
240
prop_wnd_clear_param:
314
prop_wnd_clear_param:
241
	mov dword[angle_x],0.0
315
	;ãáâ ­®¢ª  ¯ à ¬¥â஢ ®â®¡à ¦¥­¨ï
242
	mov dword[angle_y],0.0
316
	call mnu_reset_settings
-
 
317
 
243
	mov dword[angle_z],0.0
318
	;®¡­ã«¥­¨¥ 㪠§ â¥«¥© ­  ¤ ­­ë¥ ®¡ê¥ªâ®¢
244
	mov dword[obj_poi_data],0
319
	mov dword[obj_poi_data],0
245
	mov dword[obj_poi_count],0
320
	mov dword[obj_poi_count],0
246
	mov dword[obj_tri_data],0
321
	mov dword[obj_tri_data],0
247
	mov dword[obj_tri_count],0
322
	mov dword[obj_tri_count],0
-
 
323
	ret
-
 
324
 
-
 
325
;¯®¨áª ¤ ­­ëå
-
 
326
;input:
-
 
327
;eax - ⥪ã騩 㧥«
-
 
328
;output:
-
 
329
;eax - áâàãªâãà  â¥ªã饣® 㧫  (¨«¨ 0 ¯à¨ ­¥ã¤ ç¥)
-
 
330
align 4
-
 
331
found_block_data:
-
 
332
push ebx ecx
-
 
333
	mov ecx,eax
-
 
334
	stdcall [tl_node_poi_get_info], tree1,0
-
 
335
	@@:
-
 
336
		mov ebx,eax
248
	mov dword[draw_mode],def_dr_mode
337
		stdcall [tl_node_poi_get_data], tree1,ebx
-
 
338
		cmp eax,ecx
-
 
339
		je @f ;¥á«¨ ¯®¯ «¨ ­  ¢ë¡à ­­ë© 㧥«
-
 
340
		stdcall [tl_node_poi_get_next_info], tree1,ebx
-
 
341
		cmp eax,0
-
 
342
		jne @b
-
 
343
		jmp .end
-
 
344
	@@:
-
 
345
		mov eax,ebx
-
 
346
	.end:
-
 
347
pop ecx ebx
249
	ret
348
	ret
250
 
349
 
251
;ãáâ ­®¢ª  à §¬¥à®¢ ®¡ê¥ªâ 
350
;ãáâ ­®¢ª  à §¬¥à®¢ ®¡ê¥ªâ 
252
align 4
351
align 4
253
proc obj_set_sizes uses eax ebx esi
352
proc obj_set_sizes uses eax ebx esi
254
	cmp dword[obj_poi_count],0
353
	cmp dword[obj_poi_count],0
255
	je .end
354
	je .end
256
		finit
355
		finit
257
		mov eax,[obj_poi_data]
356
		mov eax,[obj_poi_data]
258
		mov ebx,dword[eax]
357
		mov ebx,dword[eax]
259
		mov [obj_x_min],ebx
358
		mov [obj_x_min],ebx
260
		mov [obj_x_max],ebx
359
		mov [obj_x_max],ebx
261
		mov ebx,dword[eax+4]
360
		mov ebx,dword[eax+4]
262
		mov [obj_y_min],ebx
361
		mov [obj_y_min],ebx
263
		mov [obj_y_max],ebx
362
		mov [obj_y_max],ebx
264
		mov ebx,dword[eax+8]
363
		mov ebx,dword[eax+8]
265
		mov [obj_z_min],ebx
364
		mov [obj_z_min],ebx
266
		mov [obj_z_max],ebx
365
		mov [obj_z_max],ebx
267
 
366
 
268
	mov ebx,[obj_poi_data]
367
	mov ebx,[obj_poi_data]
269
	mov esi,[obj_poi_count]
368
	mov esi,[obj_poi_count]
270
align 4
369
align 4
271
	.cycle_0: ;à ¡®â  á ª®®à¤¨­ â®© x
370
	.cycle_0: ;à ¡®â  á ª®®à¤¨­ â®© x
272
		fld dword[ebx]
371
		fld dword[ebx]
273
		fld dword[obj_x_min]
372
		fld dword[obj_x_min]
274
		fcomp
373
		fcomp
275
		fstsw ax
374
		fstsw ax
276
		sahf
375
		sahf
277
		jb @f
376
		jb @f
278
			mov eax,[ebx]
377
			mov eax,[ebx]
279
			mov [obj_x_min],eax
378
			mov [obj_x_min],eax
280
			ffree st0
379
			ffree st0
281
			fincstp
380
			fincstp
282
			jmp .next_x
381
			jmp .next_x
283
		@@:
382
		@@:
284
		fld dword[obj_x_max]
383
		fld dword[obj_x_max]
285
		fcompp
384
		fcompp
286
		fstsw ax
385
		fstsw ax
287
		sahf
386
		sahf
288
		ja .next_x
387
		ja .next_x
289
			mov eax,[ebx]
388
			mov eax,[ebx]
290
			mov [obj_x_max],eax
389
			mov [obj_x_max],eax
291
		.next_x:
390
		.next_x:
292
 
391
 
293
		add ebx,12
392
		add ebx,12
294
		dec esi
393
		dec esi
295
		jnz .cycle_0
394
		jnz .cycle_0
296
 
395
 
297
		fld1
396
		fld1
298
		fld dword[obj_x_max]
397
		fld dword[obj_x_max]
299
		fsub dword[obj_x_min]
398
		fsub dword[obj_x_min]
300
		fst dword[obj_x_centr]
399
		fst dword[obj_x_centr]
301
		fdivp ;1/size.x
400
		fdivp ;1/size.x
302
		fstp dword[obj_x_scale]
401
		fstp dword[obj_x_scale]
303
 
402
 
304
		fld dword[obj_x_centr]
403
		fld dword[obj_x_centr]
305
		fld1
404
		fld1
306
		fld1
405
		fld1
307
		faddp
406
		faddp
308
		fdivp ;centr.x = size.x/2
407
		fdivp ;centr.x = size.x/2
309
		fadd dword[obj_x_min]
408
		fadd dword[obj_x_min]
310
		fchs
409
		fchs
311
		fstp dword[obj_x_centr]
410
		fstp dword[obj_x_centr]
312
 
411
 
313
	mov ebx,[obj_poi_data]
412
	mov ebx,[obj_poi_data]
314
	mov esi,[obj_poi_count]
413
	mov esi,[obj_poi_count]
315
align 4
414
align 4
316
	.cycle_1: ;à ¡®â  á ª®®à¤¨­ â®© y
415
	.cycle_1: ;à ¡®â  á ª®®à¤¨­ â®© y
317
		fld dword[ebx+4]
416
		fld dword[ebx+4]
318
		fld dword[obj_y_min]
417
		fld dword[obj_y_min]
319
		fcomp
418
		fcomp
320
		fstsw ax
419
		fstsw ax
321
		sahf
420
		sahf
322
		jb @f
421
		jb @f
323
			mov eax,[ebx+4]
422
			mov eax,[ebx+4]
324
			mov [obj_y_min],eax
423
			mov [obj_y_min],eax
325
			ffree st0
424
			ffree st0
326
			fincstp
425
			fincstp
327
			jmp .next_y
426
			jmp .next_y
328
		@@:
427
		@@:
329
		fld dword[obj_y_max]
428
		fld dword[obj_y_max]
330
		fcompp
429
		fcompp
331
		fstsw ax
430
		fstsw ax
332
		sahf
431
		sahf
333
		ja .next_y
432
		ja .next_y
334
			mov eax,[ebx+4]
433
			mov eax,[ebx+4]
335
			mov [obj_y_max],eax
434
			mov [obj_y_max],eax
336
		.next_y:
435
		.next_y:
337
 
436
 
338
		add ebx,12
437
		add ebx,12
339
		dec esi
438
		dec esi
340
		jnz .cycle_1
439
		jnz .cycle_1
341
 
440
 
342
		fld1
441
		fld1
343
		fld dword[obj_y_max]
442
		fld dword[obj_y_max]
344
		fsub dword[obj_y_min]
443
		fsub dword[obj_y_min]
345
		fst dword[obj_y_centr]
444
		fst dword[obj_y_centr]
346
		fdivp ;1/size.y
445
		fdivp ;1/size.y
347
		fstp dword[obj_y_scale]
446
		fstp dword[obj_y_scale]
348
 
447
 
349
		fld dword[obj_y_centr]
448
		fld dword[obj_y_centr]
350
		fld1
449
		fld1
351
		fld1
450
		fld1
352
		faddp
451
		faddp
353
		fdivp ;centr.y = size.y/2
452
		fdivp ;centr.y = size.y/2
354
		fadd dword[obj_y_min]
453
		fadd dword[obj_y_min]
355
		fchs
454
		fchs
356
		fstp dword[obj_y_centr]
455
		fstp dword[obj_y_centr]
357
 
456
 
358
	mov ebx,[obj_poi_data]
457
	mov ebx,[obj_poi_data]
359
	mov esi,[obj_poi_count]
458
	mov esi,[obj_poi_count]
360
align 4
459
align 4
361
	.cycle_2: ;à ¡®â  á ª®®à¤¨­ â®© z
460
	.cycle_2: ;à ¡®â  á ª®®à¤¨­ â®© z
362
		fld dword[ebx+8]
461
		fld dword[ebx+8]
363
		fld dword[obj_z_min]
462
		fld dword[obj_z_min]
364
		fcomp
463
		fcomp
365
		fstsw ax
464
		fstsw ax
366
		sahf
465
		sahf
367
		jb @f
466
		jb @f
368
			mov eax,[ebx+8]
467
			mov eax,[ebx+8]
369
			mov [obj_z_min],eax
468
			mov [obj_z_min],eax
370
			ffree st0
469
			ffree st0
371
			fincstp
470
			fincstp
372
			jmp .next_z
471
			jmp .next_z
373
		@@:
472
		@@:
374
		fld dword[obj_z_max]
473
		fld dword[obj_z_max]
375
		fcompp
474
		fcompp
376
		fstsw ax
475
		fstsw ax
377
		sahf
476
		sahf
378
		ja .next_z
477
		ja .next_z
379
			mov eax,[ebx+8]
478
			mov eax,[ebx+8]
380
			mov [obj_z_max],eax
479
			mov [obj_z_max],eax
381
		.next_z:
480
		.next_z:
382
 
481
 
383
		add ebx,12
482
		add ebx,12
384
		dec esi
483
		dec esi
385
		jnz .cycle_2
484
		jnz .cycle_2
386
 
485
 
387
		fld1
486
		fld1
388
		fld dword[obj_z_max]
487
		fld dword[obj_z_max]
389
		fsub dword[obj_z_min]
488
		fsub dword[obj_z_min]
390
		fst dword[obj_z_centr]
489
		fst dword[obj_z_centr]
391
		fdivp ;1/size.z
490
		fdivp ;1/size.z
392
		fstp dword[obj_z_scale]
491
		fstp dword[obj_z_scale]
393
 
492
 
394
		fld dword[obj_z_centr]
493
		fld dword[obj_z_centr]
395
		fld1
494
		fld1
396
		fld1
495
		fld1
397
		faddp
496
		faddp
398
		fdivp ;centr.z = size.z/2
497
		fdivp ;centr.z = size.z/2
399
		fadd dword[obj_z_min]
498
		fadd dword[obj_z_min]
400
		fchs
499
		fchs
401
		fstp dword[obj_z_centr]
500
		fstp dword[obj_z_centr]
402
 
501
 
403
		;­ å®¤¨¬ à ¤¨ãá ¤«ï áä¥àë
502
		;­ å®¤¨¬ à ¤¨ãá ¤«ï áä¥àë
404
		fld dword[obj_x_max]
503
		fld dword[obj_x_max]
405
		fsub dword[obj_x_min]
504
		fsub dword[obj_x_min]
406
		fld dword[obj_y_max]
505
		fld dword[obj_y_max]
407
		fsub dword[obj_y_min]
506
		fsub dword[obj_y_min]
408
		faddp
507
		faddp
409
		fild dword[rad_c]
508
		fild dword[rad_c]
410
		fdivp ;radius=(size.x+size.y)/rad_c
509
		fdivp ;radius=(size.x+size.y)/rad_c
411
		fstp dword[sph_radius]
510
		fstp dword[sph_radius]
412
	.end:
511
	.end:
413
	ret
512
	ret
414
endp
513
endp
415
 
514
 
416
;à¨á®¢ ­¨¥ â®ç¥ª ¢ 3d
515
;à¨á®¢ ­¨¥ â®ç¥ª ¢ 3d
417
align 4
516
align 4
418
draw_3d:
517
draw_3d:
419
	cmp dword[obj_poi_count],2
518
	cmp dword[obj_poi_count],2
420
	jl .end_f
519
	jl .end_f
421
 
-
 
422
	stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;®ç¨á⨬ ¡ãä¥à æ¢¥â  ¨ £«ã¡¨­ë
520
	stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;®ç¨á⨬ ¡ãä¥à æ¢¥â  ¨ £«ã¡¨­ë
423
	stdcall [glPushMatrix]
521
	stdcall [glPushMatrix]
424
	bt dword[draw_mode],bit_light
522
	bt dword[draw_mode],bit_light
425
	jnc @f
523
	jnc @f
426
		call SetLight
524
		call SetLight
427
		jmp .end_l
525
		jmp .end_l
428
	@@:
526
	@@:
429
		stdcall [glDisable],GL_LIGHTING
527
		stdcall [glDisable],GL_LIGHTING
430
	.end_l:
528
	.end_l:
431
	stdcall [glTranslatef], 0.0,0.0,0.5 ;correct for z
529
	stdcall [glTranslatef], 0.0,0.0,0.5 ;correct for z
432
	stdcall [glScalef], [obj_x_scale],[obj_y_scale],[obj_z_scale]
530
	stdcall [glScalef], [obj_x_scale],[obj_y_scale],[obj_z_scale]
433
	stdcall [glScalef], 1.0,1.0,0.7 ;correct for z
531
	stdcall [glScalef], 1.0,1.0,0.7 ;correct for z
434
	stdcall [glRotatef], [angle_z],0.0,0.0,1.0
532
	stdcall [glRotatef], [angle_z],0.0,0.0,1.0
435
	stdcall [glRotatef], [angle_y],0.0,1.0,0.0
533
	stdcall [glRotatef], [angle_y],0.0,1.0,0.0
436
	stdcall [glRotatef], [angle_x],1.0,0.0,0.0
534
	stdcall [glRotatef], [angle_x],1.0,0.0,0.0
437
	stdcall [glTranslatef], [obj_x_centr],[obj_y_centr],[obj_z_centr]
535
	stdcall [glTranslatef], [obj_x_centr],[obj_y_centr],[obj_z_centr]
438
 
536
 
439
	;à¨á®¢ ­¨¥ â®ç¥ª
537
	;à¨á®¢ ­¨¥ â®ç¥ª
440
	bt dword[draw_mode],bit_vertexes
538
	bt dword[draw_mode],bit_vertexes
441
	jnc .end_points
539
	jnc .end_points
442
		stdcall [glColor3f], 1.0,1.0,1.0
540
		stdcall [glColor3ub],[color_vert+2],[color_vert+1],[color_vert]
443
		stdcall [glBegin],GL_POINTS
541
		stdcall [glBegin],GL_POINTS
444
		mov eax,[obj_poi_data]
542
		mov eax,[obj_poi_data]
445
		mov ebx,[obj_poi_count]
543
		mov ebx,[obj_poi_count]
446
		@@:
544
		@@:
447
			stdcall [glVertex3f], [eax],[eax+4],[eax+8]
545
			stdcall [glVertex3f], [eax],[eax+4],[eax+8]
448
			add eax,12
546
			add eax,12
449
			dec ebx
547
			dec ebx
450
			jnz @b
548
			jnz @b
451
		stdcall [glEnd]
549
		stdcall [glEnd]
452
	.end_points:
550
	.end_points:
453
 
551
 
454
	;à¨á®¢ ­¨¥ ¢ë¤¥«¥­­®© â®çª¨
552
	;à¨á®¢ ­¨¥ ¢ë¤¥«¥­­®© â®çª¨
455
	stdcall [tl_node_get_data],tree3
553
	stdcall [tl_node_get_data],tree3
456
	cmp eax,0
554
	cmp eax,0
457
	je @f
555
	je @f
458
		;¢ë¤¥«¥­¨¥  ªâ¨¢­®© â®çª¨
556
		;¢ë¤¥«¥­¨¥  ªâ¨¢­®© â®çª¨
459
		mov eax,[eax]
557
		mov eax,[eax]
460
 
558
 
461
		stdcall [glBegin],GL_LINES
559
		stdcall [glBegin],GL_LINES
462
		stdcall [glColor3f], 1.0, 0.0, 0.0
560
		stdcall [glColor3ub],[color_ox+2],[color_ox+1],[color_ox]
463
		stdcall [glVertex3f], [obj_x_min],[eax+4],[eax+8]
561
		stdcall [glVertex3f], [obj_x_min],[eax+4],[eax+8]
464
		stdcall [glVertex3f], [obj_x_max],[eax+4],[eax+8]
562
		stdcall [glVertex3f], [obj_x_max],[eax+4],[eax+8]
465
		stdcall [glColor3f], 0.0, 0.0, 1.0
563
		stdcall [glColor3ub],[color_oy+2],[color_oy+1],[color_oy]
466
		stdcall [glVertex3f], [eax],[obj_y_min],[eax+8]
564
		stdcall [glVertex3f], [eax],[obj_y_min],[eax+8]
467
		stdcall [glVertex3f], [eax],[obj_y_max],[eax+8]
565
		stdcall [glVertex3f], [eax],[obj_y_max],[eax+8]
468
		stdcall [glColor3f], 0.0, 1.0, 0.0
566
		stdcall [glColor3ub],[color_oz+2],[color_oz+1],[color_oz]
469
		stdcall [glVertex3f], [eax],[eax+4],[obj_z_min]
567
		stdcall [glVertex3f], [eax],[eax+4],[obj_z_min]
470
		stdcall [glVertex3f], [eax],[eax+4],[obj_z_max]
568
		stdcall [glVertex3f], [eax],[eax+4],[obj_z_max]
471
		stdcall [glEnd]
569
		stdcall [glEnd]
472
 
570
 
473
		stdcall [glColor3f], 1.0, 1.0, 0.0
571
		stdcall [glColor3f], 1.0, 1.0, 0.0
474
		stdcall [glPushMatrix]
572
		stdcall [glPushMatrix]
475
			stdcall [glTranslatef], [eax],[eax+4],[eax+8]
573
			stdcall [glTranslatef], [eax],[eax+4],[eax+8]
476
			stdcall [gluSphere], [qObj], [sph_radius], 8,8
574
			stdcall [gluSphere], [qObj], [sph_radius], 8,8
477
		stdcall [glPopMatrix]
575
		stdcall [glPopMatrix]
478
	@@:
576
	@@:
479
 
577
 
480
	;à¨á®¢ ­¨¥ £à ­¥©
578
	;à¨á®¢ ­¨¥ £à ­¥©
481
	bt dword[draw_mode],bit_faces
579
	bt dword[draw_mode],bit_faces
482
	jnc .end_triangles
580
	jnc .end_triangles
483
	cmp dword[obj_tri_count],0
581
	cmp dword[obj_tri_count],0
484
	je .end_triangles
582
	je .end_triangles
485
	cmp dword[obj_poi_count],0
583
	cmp dword[obj_poi_count],0
486
	je .end_triangles
584
	je .end_triangles
487
		stdcall [glColor3f], 0.5,0.5,0.5
-
 
488
		;bt dword[draw_mode],bit_faces_fill
585
		bt dword[draw_mode],bit_faces_fill
489
		;jnc @f
586
		jc @f
-
 
587
			push GL_LINE
-
 
588
			jmp .end_0
490
		;@@:
589
		@@:
-
 
590
			push GL_FILL
-
 
591
		.end_0:
-
 
592
		stdcall [glPolygonMode], GL_FRONT_AND_BACK ;mode - 㦥 ¢ á⥪¥
-
 
593
		stdcall [glColor3ub],[color_face+2],[color_face+1],[color_face]
491
		stdcall [glBegin],GL_TRIANGLES
594
		stdcall [glBegin],GL_TRIANGLES
492
		mov eax,[obj_tri_data]
595
		mov eax,[obj_tri_data]
493
		mov ecx,[obj_tri_count]
596
		mov ecx,[obj_tri_count]
494
		@@:
597
		@@:
495
			movzx ebx,word[eax] ;1-ï ¢¥à設 
598
			movzx ebx,word[eax] ;1-ï ¢¥à設 
496
			imul ebx,12
599
			imul ebx,12
497
			add ebx,[obj_poi_data]
600
			add ebx,[obj_poi_data]
498
			stdcall [glVertex3f], [ebx],[ebx+4],[ebx+8]
601
			stdcall [glVertex3f], [ebx],[ebx+4],[ebx+8]
499
			movzx ebx,word[eax+2] ;2-ï ¢¥à設 
602
			movzx ebx,word[eax+2] ;2-ï ¢¥à設 
500
			imul ebx,12
603
			imul ebx,12
501
			add ebx,[obj_poi_data]
604
			add ebx,[obj_poi_data]
502
			stdcall [glVertex3f], [ebx],[ebx+4],[ebx+8]
605
			stdcall [glVertex3f], [ebx],[ebx+4],[ebx+8]
503
			movzx ebx,word[eax+4] ;3-ï ¢¥à設 
606
			movzx ebx,word[eax+4] ;3-ï ¢¥à設 
504
			imul ebx,12
607
			imul ebx,12
505
			add ebx,[obj_poi_data]
608
			add ebx,[obj_poi_data]
506
			stdcall [glVertex3f], [ebx],[ebx+4],[ebx+8]
609
			stdcall [glVertex3f], [ebx],[ebx+4],[ebx+8]
507
			add eax,8 ;à §¬¥à âà¥ã£®«ì­¨ª  = (3 ¢¥à設ë (¯® 2¡) + ᢮©á⢠ (2¡))
610
			add eax,8 ;à §¬¥à âà¥ã£®«ì­¨ª  = (3 ¢¥à設ë (¯® 2¡) + ᢮©á⢠ (2¡))
508
			dec ecx
611
			dec ecx
509
			jnz @b
612
			jnz @b
510
		stdcall [glEnd]
613
		stdcall [glEnd]
511
	.end_triangles:
614
	.end_triangles:
512
 
615
 
513
	stdcall [glPopMatrix]
616
	stdcall [glPopMatrix]
514
	stdcall [kosglSwapBuffers]
617
	stdcall [kosglSwapBuffers]
515
	.end_f:
618
	.end_f:
516
	ret
619
	ret
517
 
620
 
518
align 4
621
align 4
519
SetLight:
622
SetLight:
520
	stdcall [glLightfv], GL_LIGHT0, GL_POSITION, light_position
623
	stdcall [glLightfv], GL_LIGHT0, GL_POSITION, light_position
521
	stdcall [glLightfv], GL_LIGHT0, GL_SPOT_DIRECTION, light_dir
624
	stdcall [glLightfv], GL_LIGHT0, GL_SPOT_DIRECTION, light_dir
522
 
625
 
523
	stdcall [glLightfv], GL_LIGHT0, GL_DIFFUSE, white_light
626
	stdcall [glLightfv], GL_LIGHT0, GL_DIFFUSE, white_light
524
	stdcall [glLightfv], GL_LIGHT0, GL_SPECULAR, white_light
627
	stdcall [glLightfv], GL_LIGHT0, GL_SPECULAR, white_light
525
 
628
 
526
	stdcall [glEnable], GL_COLOR_MATERIAL
629
	stdcall [glEnable], GL_COLOR_MATERIAL
527
	stdcall [glColorMaterial], GL_FRONT, GL_AMBIENT_AND_DIFFUSE
630
	stdcall [glColorMaterial], GL_FRONT, GL_AMBIENT_AND_DIFFUSE
528
	stdcall [glMaterialfv], GL_FRONT, GL_SPECULAR, mat_specular
631
	stdcall [glMaterialfv], GL_FRONT, GL_SPECULAR, mat_specular
529
	stdcall [glMaterialf], GL_FRONT, GL_SHININESS, mat_shininess
632
	stdcall [glMaterialf], GL_FRONT, GL_SHININESS, mat_shininess
530
	stdcall [glLightModelfv], GL_LIGHT_MODEL_AMBIENT, lmodel_ambient
633
	stdcall [glLightModelfv], GL_LIGHT_MODEL_AMBIENT, lmodel_ambient
531
 
634
 
532
	stdcall [glEnable],GL_LIGHTING
635
	stdcall [glEnable],GL_LIGHTING
533
	stdcall [glEnable],GL_LIGHT0
636
	stdcall [glEnable],GL_LIGHT0
534
	ret
637
	ret
535
 
638
 
536
align 4
639
align 4
537
proc prop_key uses eax ebx
640
proc prop_key uses eax ebx
538
	mcall 2
641
	mcall 2
539
 
642
 
540
	test word [edit1.flags],10b ;ed_focus
643
	test word [edit1.flags],10b ;ed_focus
541
	je @f
644
	je @f
542
		stdcall [edit_box_key], edit1
645
		stdcall [edit_box_key], edit1
543
		jmp .end
646
		jmp .end
544
	@@:
647
	@@:
545
	test word [edit2.flags],10b
648
	test word [edit2.flags],10b
546
	je @f
649
	je @f
547
		stdcall [edit_box_key], edit2
650
		stdcall [edit_box_key], edit2
548
		jmp .end
651
		jmp .end
549
	@@:
652
	@@:
550
	test word [edit3.flags],10b
653
	test word [edit3.flags],10b
551
	je @f
654
	je @f
552
		stdcall [edit_box_key], edit3
655
		stdcall [edit_box_key], edit3
553
		jmp .end
656
		jmp .end
554
	@@:
657
	@@:
555
	cmp dword[el_focus], tree3
658
	cmp dword[el_focus], tree3
556
	jne @f
659
	jne @f
557
		stdcall [tl_key], tree3
660
		stdcall [tl_key], tree3
558
		jmp .end
661
		jmp .end
559
	@@:
662
	@@:
560
 
663
 
561
	cmp ah,178 ;Up
664
	cmp ah,178 ;Up
562
	jne @f
665
	jne @f
563
		fld dword[angle_x]
666
		fld dword[angle_x]
564
		fadd dword[delt_size]
667
		fadd dword[delt_size]
565
		fstp dword[angle_x]
668
		fstp dword[angle_x]
566
		call draw_3d
669
		call draw_3d
567
		jmp .end
670
		jmp .end
568
	@@:
671
	@@:
569
	cmp ah,177 ;Down
672
	cmp ah,177 ;Down
570
	jne @f
673
	jne @f
571
		fld dword[angle_x]
674
		fld dword[angle_x]
572
		fsub dword[delt_size]
675
		fsub dword[delt_size]
573
		fstp dword[angle_x]
676
		fstp dword[angle_x]
574
		call draw_3d
677
		call draw_3d
575
		jmp .end
678
		jmp .end
576
	@@:
679
	@@:
577
	cmp ah,176 ;Left
680
	cmp ah,176 ;Left
578
	jne @f
681
	jne @f
579
		fld dword[angle_y]
682
		fld dword[angle_y]
580
		fadd dword[delt_size]
683
		fadd dword[delt_size]
581
		fstp dword[angle_y]
684
		fstp dword[angle_y]
582
		call draw_3d
685
		call draw_3d
583
		jmp .end
686
		jmp .end
584
	@@:
687
	@@:
585
	cmp ah,179 ;Right
688
	cmp ah,179 ;Right
586
	jne @f
689
	jne @f
587
		fld dword[angle_y]
690
		fld dword[angle_y]
588
		fsub dword[delt_size]
691
		fsub dword[delt_size]
589
		fstp dword[angle_y]
692
		fstp dword[angle_y]
590
		call draw_3d
693
		call draw_3d
591
		;jmp .end
694
		;jmp .end
592
	@@:
695
	@@:
593
	.end:
696
	.end:
594
	ret
697
	ret
595
endp
698
endp
596
 
699
 
597
align 4
700
align 4
598
prop_mouse:
701
prop_mouse:
599
	;push ecx edi
702
	push eax ebx
-
 
703
	mcall 37,3
-
 
704
	bt eax,0
-
 
705
	jnc .end_m
-
 
706
		;mouse l. but. move
-
 
707
		cmp dword[mouse_drag],1
-
 
708
		jne .end_m
-
 
709
		mcall 37,1 ;get mouse coords
-
 
710
		mov ebx,eax
-
 
711
		shr ebx,16 ;mouse.x
-
 
712
		cmp ebx,3d_wnd_l
-
 
713
		jg @f
-
 
714
			mov ebx,3d_wnd_l
-
 
715
		@@:
-
 
716
		sub ebx,3d_wnd_l
-
 
717
		cmp ebx,3d_wnd_w
-
 
718
		jle @f
-
 
719
			mov ebx,3d_wnd_w
-
 
720
		@@:
-
 
721
		and eax,0xffff ;mouse.y
-
 
722
		cmp eax,3d_wnd_t
-
 
723
		jg @f
-
 
724
			mov eax,3d_wnd_t
-
 
725
		@@:
-
 
726
		sub eax,3d_wnd_t
-
 
727
		cmp eax,3d_wnd_h
-
 
728
		jle @f
-
 
729
			mov eax,3d_wnd_h
-
 
730
		@@:
-
 
731
		finit
-
 
732
		fild dword[mouse_y]
-
 
733
		mov [mouse_y],eax
-
 
734
		fisub dword[mouse_y]
-
 
735
		fdiv dword[angle_dxm] ;¥á«¨ ªãàá®à ¤¢¨¦¥âáï ¯® ®á¨ y (¢¢¥àå ¨«¨ ¢­¨§) â® ¯®¢®à®â ¤¥« ¥¬ ¢®ªà㣠®á¨ x
-
 
736
		fadd dword[angle_x]
-
 
737
		fstp dword[angle_x]
-
 
738
 
-
 
739
		fild dword[mouse_x]
-
 
740
		mov [mouse_x],ebx
-
 
741
		fisub dword[mouse_x]
-
 
742
		fdiv dword[angle_dym] ;¥á«¨ ªãàá®à ¤¢¨¦¥âáï ¯® ®á¨ x (¢¢¥àå ¨«¨ ¢­¨§) â® ¯®¢®à®â ¤¥« ¥¬ ¢®ªà㣠®á¨ y
-
 
743
		fadd dword[angle_y]
-
 
744
		fstp dword[angle_y]
-
 
745
 
-
 
746
		call draw_3d
-
 
747
		jmp .end_d
-
 
748
	.end_m:
-
 
749
	bt eax,16
-
 
750
	jnc @f
-
 
751
		;mouse l. but. up
-
 
752
		mov dword[mouse_drag],0
-
 
753
		jmp .end_d
-
 
754
	@@:
-
 
755
	bt eax,8
-
 
756
	jnc .end_d
-
 
757
		;mouse l. but. press
-
 
758
		mcall 37,1 ;get mouse coords
-
 
759
		mov ebx,eax
-
 
760
		shr ebx,16 ;mouse.x
-
 
761
		cmp ebx,3d_wnd_l
-
 
762
		jl .end_d
-
 
763
		sub ebx,3d_wnd_l
-
 
764
		cmp ebx,3d_wnd_w
-
 
765
		jg .end_d
-
 
766
		and eax,0xffff ;mouse.y
-
 
767
		cmp eax,3d_wnd_t
-
 
768
		jl .end_d
-
 
769
		sub eax,3d_wnd_t
-
 
770
		cmp eax,3d_wnd_h
-
 
771
		jg .end_d
-
 
772
		mov dword[mouse_drag],1
-
 
773
		mov dword[mouse_x],ebx
-
 
774
		mov dword[mouse_y],eax
-
 
775
	.end_d:
-
 
776
 
600
	stdcall [kmainmenu_dispatch_cursorevent], [main_menu]
777
	stdcall [kmainmenu_dispatch_cursorevent], [main_menu]
601
	stdcall [tl_mouse], tree3
778
	stdcall [tl_mouse], tree3
602
	stdcall [edit_box_mouse], edit1
779
	stdcall [edit_box_mouse], edit1
603
	stdcall [edit_box_mouse], edit2
780
	stdcall [edit_box_mouse], edit2
604
	stdcall [edit_box_mouse], edit3
781
	stdcall [edit_box_mouse], edit3
605
	;pop edi ecx
782
	pop ebx eax
606
	ret
783
	ret
607
 
784
 
608
align 4
785
align 4
609
prop_button:
786
prop_button:
610
	mcall 17 ;¯®«ãç¨âì ª®¤ ­ ¦ â®© ª­®¯ª¨
787
	mcall 17 ;¯®«ãç¨âì ª®¤ ­ ¦ â®© ª­®¯ª¨
611
 
788
 
612
	cmp ah,3
789
	cmp ah,3
613
	jne @f
790
	jne @f
614
		call get_point_coords
791
		call get_point_coords
615
		call draw_3d
792
		call draw_3d
616
		jmp prop_still.end
793
		jmp prop_still.end
617
	@@:
794
	@@:
618
	cmp ah,4
795
	cmp ah,4
619
	jne @f
796
	jne @f
620
		push eax ebx ecx edi esi
797
		push eax ebx ecx edi esi
621
		stdcall [tl_node_get_data],tree3
798
		stdcall [tl_node_get_data],tree3
622
		cmp eax,0
799
		cmp eax,0
623
		je .no_select_1
800
		je .no_select_1
624
			mov ebx,[eax]
801
			mov ebx,[eax]
625
			finit
802
			finit
626
 
803
 
627
			mov esi,string1
804
			mov esi,string1
628
			mov edi,Data_String
805
			mov edi,Data_String
629
			cld
806
			cld
630
			mov ecx,8
807
			mov ecx,8
631
			rep movsd
808
			rep movsd
632
			call String_to_DoubleFloat
809
			call String_to_DoubleFloat
633
			fld  qword[Data_Double] ;áç¨â뢠¥¬ ª ª double
810
			fld  qword[Data_Double] ;áç¨â뢠¥¬ ª ª double
634
			fstp dword[ebx] ;á®å࠭塞 ª ª float
811
			fstp dword[ebx] ;á®å࠭塞 ª ª float
635
 
812
 
636
			mov esi,string2
813
			mov esi,string2
637
			mov edi,Data_String
814
			mov edi,Data_String
638
			cld
815
			cld
639
			mov ecx,8
816
			mov ecx,8
640
			rep movsd
817
			rep movsd
641
			call String_to_DoubleFloat
818
			call String_to_DoubleFloat
642
			fld  qword[Data_Double] ;áç¨â뢠¥¬ ª ª double
819
			fld  qword[Data_Double] ;áç¨â뢠¥¬ ª ª double
643
			fstp dword[ebx+4] ;á®å࠭塞 ª ª float
820
			fstp dword[ebx+4] ;á®å࠭塞 ª ª float
644
 
821
 
645
			mov esi,string3
822
			mov esi,string3
646
			mov edi,Data_String
823
			mov edi,Data_String
647
			cld
824
			cld
648
			mov ecx,8
825
			mov ecx,8
649
			rep movsd
826
			rep movsd
650
			call String_to_DoubleFloat
827
			call String_to_DoubleFloat
651
			fld  qword[Data_Double] ;áç¨â뢠¥¬ ª ª double
828
			fld  qword[Data_Double] ;áç¨â뢠¥¬ ª ª double
652
			fstp dword[ebx+8] ;á®å࠭塞 ª ª float
829
			fstp dword[ebx+8] ;á®å࠭塞 ª ª float
653
 
830
 
654
			;®¡­®¢«¥­¨¥ ¨§¬¥­¥­­®£® 㧫  ¢ ᯨ᪥ tree3 ¨ £« ¢­®£® ®ª­  (¯® â ©¬¥àã)
831
			;®¡­®¢«¥­¨¥ ¨§¬¥­¥­­®£® 㧫  ¢ ᯨ᪥ tree3 ¨ £« ¢­®£® ®ª­  (¯® â ©¬¥àã)
655
			mov word[NumberSymbolsAD],5
832
			mov word[NumberSymbolsAD],5
656
			mov dword[obj_point],ebx
833
			mov dword[obj_point],ebx
657
			mov dword[obj_point.text],0
834
			mov dword[obj_point.text],0
658
			cld
835
			cld
659
			mov ecx,3
836
			mov ecx,3
660
			.coord:
837
			.coord:
661
				fld dword[ebx]
838
				fld dword[ebx]
662
				fstp qword[Data_Double]
839
				fstp qword[Data_Double]
663
				call DoubleFloat_to_String
840
				call DoubleFloat_to_String
664
				add ebx,4
841
				add ebx,4
665
				stdcall str_len, Data_String
842
				stdcall str_len, Data_String
666
				mov esi,txt_space
843
				mov esi,txt_space
667
				add esi,eax
844
				add esi,eax
668
				cmp esi,txt_space.end
845
				cmp esi,txt_space.end
669
				jl .normal_size
846
				jl .normal_size
670
					mov esi,txt_space.end-1 ;¬¨­¨¬ã¬ 1 ¯à®¡¥« ­ã¦­® ¤®¡ ¢¨âì, çâ®-¡ë æ¨äàë ­¥ ᫨¯ «¨áì
847
					mov esi,txt_space.end-1 ;¬¨­¨¬ã¬ 1 ¯à®¡¥« ­ã¦­® ¤®¡ ¢¨âì, çâ®-¡ë æ¨äàë ­¥ ᫨¯ «¨áì
671
				.normal_size:
848
				.normal_size:
672
				stdcall str_cat, obj_point.text,esi
849
				stdcall str_cat, obj_point.text,esi
673
				stdcall str_cat, obj_point.text,Data_String
850
				stdcall str_cat, obj_point.text,Data_String
674
				loop .coord
851
				loop .coord
675
			stdcall dword[tl_node_set_data], tree3,obj_point
852
			stdcall dword[tl_node_set_data], tree3,obj_point
676
			stdcall dword[tl_draw], tree3
853
			stdcall dword[tl_draw], tree3
677
			mov byte[can_save],1 ;¤«ï ¯®ª §  ª­®¯ª¨ '‘®åà ­¨âì'
854
			mov byte[can_save],1 ;¤«ï ¯®ª §  ª­®¯ª¨ '‘®åà ­¨âì'
678
			mov dword[offs_last_timer],0 ;¤«ï ®¡­®¢«¥­¨ï ¡«®ª  ¢ â ©¬¥à¥
855
			mov dword[offs_last_timer],0 ;¤«ï ®¡­®¢«¥­¨ï ¡«®ª  ¢ â ©¬¥à¥
679
			call draw_3d
856
			call draw_3d
680
		.no_select_1:
857
		.no_select_1:
681
		pop esi edi ecx ebx eax
858
		pop esi edi ecx ebx eax
682
		jmp prop_still.end
859
		jmp prop_still.end
683
	@@:
860
	@@:
684
	cmp ah,5
861
	cmp ah,5
685
	jne @f
862
	jne @f
686
		call mnu_vertexes_on_off
863
		call mnu_vertexes_on_off
687
		jmp prop_still.end
864
		jmp prop_still.end
688
	@@:
865
	@@:
689
	cmp ah,6
866
	cmp ah,6
690
	jne @f
867
	jne @f
691
		call mnu_faces_on_off
868
		call mnu_faces_on_off
692
		jmp prop_still.end
869
		jmp prop_still.end
693
	@@:
870
	@@:
694
	cmp ah,7
871
	cmp ah,7
695
	jne @f
872
	jne @f
-
 
873
		call mnu_faces_fill_on_off
-
 
874
		jmp prop_still.end
-
 
875
	@@:
-
 
876
	cmp ah,8
-
 
877
	jne @f
696
		call mnu_light_on_off
878
		call mnu_light_on_off
697
		jmp prop_still.end
879
		jmp prop_still.end
698
	@@:
880
	@@:
-
 
881
	cmp ah,9
-
 
882
	jne @f
-
 
883
		call mnu_reset_settings
-
 
884
		jmp prop_still.end
-
 
885
	@@:
699
 
886
 
700
	cmp ah,1
887
	cmp ah,1
701
	jne prop_still.end
888
	jne prop_still.end
702
.exit:
889
.exit:
703
	mov dword[tree3.data_img],0 ;ç¨á⨬ 㪠§ â¥«¨ ­  ¨ª®­ª¨ çâ®-¡ë ¨å ­¥ 㤠«¨« ¤¥áâàãªâ®à
890
	mov dword[tree3.data_img],0 ;ç¨á⨬ 㪠§ â¥«¨ ­  ¨ª®­ª¨ çâ®-¡ë ¨å ­¥ 㤠«¨« ¤¥áâàãªâ®à
704
	mov dword[tree3.data_img_sys],0 ;â. ª. ®­¨ ¥é¥ ¨á¯®«ì§ãîâìáï ¢ ¤à㣨å í«¥¬¥­â å
891
	mov dword[tree3.data_img_sys],0 ;â. ª. ®­¨ ¥é¥ ¨á¯®«ì§ãîâìáï ¢ ¤à㣨å í«¥¬¥­â å
705
	stdcall dword[tl_data_clear], tree3
892
	stdcall dword[tl_data_clear], tree3
706
	mov byte[prop_wnd_run],0 ;®¡­ã«ï¥¬ áç¥â稪 ®ª®­
893
	mov byte[prop_wnd_run],0 ;®¡­ã«ï¥¬ áç¥â稪 ®ª®­
707
	mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë
894
	mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë
708
 
895
 
709
align 4
896
align 4
710
get_point_coords:
897
get_point_coords:
711
	;§ £à㧪  ª®®à¤¨­ â ¢ editbox-ë
898
	;§ £à㧪  ª®®à¤¨­ â ¢ editbox-ë
712
	push eax ebx
899
	push eax ebx
713
	stdcall [tl_node_get_data],tree3
900
	stdcall [tl_node_get_data],tree3
714
	cmp eax,0
901
	cmp eax,0
715
	je @f
902
	je @f
716
		mov ebx,[eax]
903
		mov ebx,[eax]
717
		mov word[NumberSymbolsAD],8
904
		mov word[NumberSymbolsAD],8
718
		finit
905
		finit
719
		fld dword[ebx]
906
		fld dword[ebx]
720
		fstp qword[Data_Double]
907
		fstp qword[Data_Double]
721
		call DoubleFloat_to_String
908
		call DoubleFloat_to_String
722
		stdcall [edit_box_set_text], edit1, Data_String
909
		stdcall [edit_box_set_text], edit1, Data_String
723
		fld dword[ebx+4]
910
		fld dword[ebx+4]
724
		fstp qword[Data_Double]
911
		fstp qword[Data_Double]
725
		call DoubleFloat_to_String
912
		call DoubleFloat_to_String
726
		stdcall [edit_box_set_text], edit2, Data_String
913
		stdcall [edit_box_set_text], edit2, Data_String
727
		fld dword[ebx+8]
914
		fld dword[ebx+8]
728
		fstp qword[Data_Double]
915
		fstp qword[Data_Double]
729
		call DoubleFloat_to_String
916
		call DoubleFloat_to_String
730
		stdcall [edit_box_set_text], edit3, Data_String
917
		stdcall [edit_box_set_text], edit3, Data_String
731
		stdcall [edit_box_draw], edit1
918
		stdcall [edit_box_draw], edit1
732
		stdcall [edit_box_draw], edit2
919
		stdcall [edit_box_draw], edit2
733
		stdcall [edit_box_draw], edit3
920
		stdcall [edit_box_draw], edit3
734
	@@:
921
	@@:
735
	pop ebx eax
922
	pop ebx eax
736
	ret
923
	ret
737
 
924
 
738
align 4
925
align 4
739
proc prop_timer_funct uses eax
926
proc prop_timer_funct uses eax
740
	;¯à®á¬ âਢ ¥¬ ¢ë¤¥«¥­­ãî ª®®à¤¨­ âã
927
	;¯à®á¬ âਢ ¥¬ ¢ë¤¥«¥­­ãî ª®®à¤¨­ âã
741
	stdcall [tl_node_get_data],tree3
928
	stdcall [tl_node_get_data],tree3
742
	cmp [cursor_last_draw],eax
929
	cmp [cursor_last_draw],eax
743
	je @f
930
	je @f
744
		mov [cursor_last_draw],eax
931
		mov [cursor_last_draw],eax
745
		call draw_3d
932
		call draw_3d
746
	@@:
933
	@@:
747
	ret
934
	ret
748
endp
935
endp
-
 
936
 
749
 
937
;¨§¬¥­ï¥¬ ०¨¬ à¨á®¢ ­¨ï ¢¥à設
750
align 4
938
align 4
751
mnu_vertexes_on_off:
939
mnu_vertexes_on_off:
752
	xor dword[draw_mode], 1 shl bit_vertexes
940
	xor dword[draw_mode], 1 shl bit_vertexes
753
	ret
941
	ret
-
 
942
 
754
 
943
;¨§¬¥­ï¥¬ ०¨¬ à¨á®¢ ­¨ï £à ­¥©
755
align 4
944
align 4
756
mnu_faces_on_off:
945
mnu_faces_on_off:
757
	xor dword[draw_mode], 1 shl bit_faces
946
	xor dword[draw_mode], 1 shl bit_faces
758
	ret
947
	ret
-
 
948
 
-
 
949
;¨§¬¥­ï¥¬ ª àª á­ë¥ ¨«¨ ᯫ®è­ë¥ £à ­¨
-
 
950
align 4
-
 
951
mnu_faces_fill_on_off:
-
 
952
	xor dword[draw_mode], 1 shl bit_faces_fill
-
 
953
	or  dword[draw_mode], 1 shl bit_faces ;¢ª«îç ¥¬ ०¨¬ à¨á®¢ ­¨ï £à ­¥© (¥á«¨ ¢¤à㣠¡ë« ®âª«î祭)
-
 
954
	ret
-
 
955
 
759
 
956
;¢ª«îç ¥¬ ¨«¨ ®âª«îç ¥¬ ®á¢¥é¥­¨¥
760
align 4
957
align 4
761
mnu_light_on_off:
958
mnu_light_on_off:
762
	xor dword[draw_mode], 1 shl bit_light
959
	xor dword[draw_mode], 1 shl bit_light
763
	ret
960
	ret
764
 
961
 
765
align 4
962
align 4
-
 
963
mnu_reset_settings:
-
 
964
	mov dword[angle_x],0.0
-
 
965
	mov dword[angle_y],0.0
-
 
966
	mov dword[angle_z],0.0
-
 
967
	m2m dword[draw_mode],dword[def_dr_mode]
-
 
968
	ret
-
 
969
 
-
 
970
align 4
-
 
971
def_dr_mode dd 0 ;०¨¬ à¨á®¢ ­¨ï ¯® 㬮«ç ­¨î
-
 
972
delt_size dd 3.0 ;¨§¬¥­¥­¨¥ 㣫®¢ ¯à¨ ¯®¢®à®â å á ª«¨¢¨ âãàë
-
 
973
mouse_drag dd 0 ;०¨¬ ¯®¢®à®â  áæ¥­ë ®â ¯¥à¥¬¥é¥­¨¨ ªãàá®à  ¬ëè¨
-
 
974
mouse_x dd 0
766
draw_mode dd 0
975
mouse_y dd 0
-
 
976
angle_dxm dd 1.7775 ;~ 3d_wnd_w/180 - ¯à¨¡ ¢«¥­¨¥ 㣫®¢ ¯®¢®à®â  áæ¥­ë ¯à¨ ¢à é¥­¨¨ ¬ë襩
-
 
977
angle_dym dd 1.3335 ;~ 3d_wnd_h/180
-
 
978
;angle_dzm dd ?
-
 
979
draw_mode dd 0 ;०¨¬ à¨á®¢ ­¨ï ®¡ê¥ªâ 
767
obj_poi_data dd 0 ;㪠§ â¥«ì ­  ª®®à¤¨­ âë ¢¥à設
980
obj_poi_data dd 0 ;㪠§ â¥«ì ­  ª®®à¤¨­ âë ¢¥à設
768
obj_poi_count dd 0 ;ª®««¨ç¥á⢮ ¢¥à設
981
obj_poi_count dd 0 ;ª®««¨ç¥á⢮ ¢¥à設
769
obj_tri_data dd 0 ;㪠§ â¥«ì ­  ¤ ­­ë¥ âà¥ã£®«ì­¨ª®¢
982
obj_tri_data dd 0 ;㪠§ â¥«ì ­  ¤ ­­ë¥ âà¥ã£®«ì­¨ª®¢
770
obj_tri_count dd 0 ;ª®««¨ç¥á⢮ âà¥ã£®«ì­¨ª®¢
983
obj_tri_count dd 0 ;ª®««¨ç¥á⢮ âà¥ã£®«ì­¨ª®¢
771
cursor_last_draw dd 0 ;¯®«®¦¥­¨¥ ªãàá®à  ¯à¨ ¯®á«¥¤­¥© ¯à®à¨á®¢ª¥ 3d ®ª­ 
984
cursor_last_draw dd 0 ;¯®«®¦¥­¨¥ ªãàá®à  ¯à¨ ¯®á«¥¤­¥© ¯à®à¨á®¢ª¥ 3d ®ª­ 
772
sph_radius dd 0 ;à ¤¨ãá áä¥àë ¤«ï ¢ë¤¥«¥­¨ï  ªâ¨¢­®© â®çª¨
985
sph_radius dd 0 ;à ¤¨ãá áä¥àë ¤«ï ¢ë¤¥«¥­¨ï  ªâ¨¢­®© â®çª¨
773
obj_x_max dd 0
986
obj_x_max dd 0
774
obj_x_min dd 0
987
obj_x_min dd 0
775
obj_x_centr dd 0
988
obj_x_centr dd 0
776
obj_x_scale dd 1.0
989
obj_x_scale dd 1.0
777
obj_y_max dd 0
990
obj_y_max dd 0
778
obj_y_min dd 0
991
obj_y_min dd 0
779
obj_y_centr dd 0
992
obj_y_centr dd 0
780
obj_y_scale dd 1.0
993
obj_y_scale dd 1.0
781
obj_z_max dd 0
994
obj_z_max dd 0
782
obj_z_min dd 0
995
obj_z_min dd 0
783
obj_z_centr dd 0
996
obj_z_centr dd 0
784
obj_z_scale dd 1.0
997
obj_z_scale dd 1.0
785
 
998
 
786
capt_p dd 0
999
capt_p dd 0
787
 
1000
 
788
;¤¥à¥¢® á ®¡ê¥ªâ ¬¨ ¢ ¯®«ì§®¢ â¥«ì᪮¬ ä ©«¥
1001
;¤¥à¥¢® á ®¡ê¥ªâ ¬¨ ¢ ¯®«ì§®¢ â¥«ì᪮¬ ä ©«¥
789
tree3 tree_list MAX_OBJECT_SIZE,3, tl_key_no_edit+tl_list_box_mode,\
1002
tree3 tree_list MAX_OBJECT_SIZE,3, tl_key_no_edit+tl_list_box_mode,\
790
	16,16, 0xffffff,0xb0d0ff,0x400040, 5,290,303,140, 16, 4,0, el_focus,\
1003
	16,16, 0xffffff,0xb0d0ff,0x400040, 5,290,303,140, 16, 4,0, el_focus,\
791
	w_scr_t3,get_point_coords
1004
	w_scr_t3,get_point_coords
792
 
1005
 
793
edit1 edit_box 80,  76, 269, 0xffd0d0, 0xff, 0x80ff, 0, 0x8000, 34, string1, mouse_dd, 0
1006
edit1 edit_box 80,  76, 269, 0xffd0d0, 0xff, 0x80ff, 0, 0x8000, 34, string1, mouse_dd, 0
794
edit2 edit_box 80, 160, 269, 0xd0d0ff, 0xff, 0x80ff, 0, 0x8000, 34, string2, mouse_dd, 0
1007
edit2 edit_box 80, 160, 269, 0xd0d0ff, 0xff, 0x80ff, 0, 0x8000, 34, string2, mouse_dd, 0
795
edit3 edit_box 80, 244, 269, 0xd0ffd0, 0xff, 0x80ff, 0, 0x8000, 34, string3, mouse_dd, 0
1008
edit3 edit_box 80, 244, 269, 0xd0ffd0, 0xff, 0x80ff, 0, 0x8000, 34, string3, mouse_dd, 0
796
editboxes_end:
1009
editboxes_end:
797
 
1010
 
798
string1 rb 34
1011
string1 rb 34
799
string2 rb 34
1012
string2 rb 34
800
string3 rb 34
1013
string3 rb 34
801
 
1014
 
802
align 4
1015
align 4
803
w_scr_t3 scrollbar 16, 0,0,0, 15, 100,0,0, 0,0,0, 1
1016
w_scr_t3 scrollbar 16, 0,0,0, 15, 100,0,0, 0,0,0, 1