Subversion Repositories Kolibri OS

Rev

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

Rev 7861 Rev 8174
1
use32
1
use32
2
	org 0
2
	org 0
3
	db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
3
	db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
4
	dd 1, start, i_end, mem, stacktop, openfile_path, sys_path
4
	dd 1, start, i_end, mem, stacktop, openfile_path, sys_path
5
 
5
 
6
include '../../../../programs/macros.inc'
6
include '../../../macros.inc'
7
include '../../../../programs/proc32.inc'
7
include '../../../proc32.inc'
8
include '../../../../programs/KOSfuncs.inc'
8
include '../../../KOSfuncs.inc'
9
include '../../../../programs/load_img.inc'
9
include '../../../load_img.inc'
-
 
10
include '../../../develop/libraries/TinyGL/asm_fork/opengl_const.inc'
10
include '../../../../programs/develop/libraries/TinyGL/asm_fork/opengl_const.inc'
11
include '../../../develop/libraries/TinyGL/asm_fork/zbuffer.inc'
11
include 'vox_3d.inc'
12
include 'vox_3d.inc'
12
include '../trunk/str.inc'
13
include '../trunk/str.inc'
13
include 'lang.inc'
14
include 'lang.inc'
14
 
15
 
15
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
16
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
16
if lang eq ru
17
if lang eq ru
17
caption db 'à®á¬®âà ¢®ªá¥«¥© 04.05.20',0 ;¯®¤¯¨áì ®ª­ 
18
caption db 'à®á¬®âà ¢®ªá¥«¥© 11.11.20',0 ;¯®¤¯¨áì ®ª­ 
18
else
19
else
19
caption db 'Voxel viewer 04.05.20',0
20
caption db 'Voxel viewer 11.11.20',0
20
end if
21
end if
21
 
22
 
22
3d_wnd_l equ   5 ;®âáâ㯠¤«ï tinygl ¡ãä¥à  á«¥¢ 
23
3d_wnd_l equ   5 ;®âáâ㯠¤«ï tinygl ¡ãä¥à  á«¥¢ 
23
3d_wnd_t equ  30 ;®âáâ㯠¤«ï tinygl ¡ãä¥à  ᢥàåã
24
3d_wnd_t equ  30 ;®âáâ㯠¤«ï tinygl ¡ãä¥à  ᢥàåã
24
3d_wnd_w equ 512
25
3d_wnd_w equ 512
25
3d_wnd_h equ 512
26
3d_wnd_h equ 512
26
 
27
 
27
IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
28
IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
28
IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*10
29
IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*10
29
image_data_toolbar dd 0
30
image_data_toolbar dd 0
30
 
-
 
31
offs_zbuf_pbuf equ 24
-
 
32
 
31
 
33
align 4
32
align 4
34
start:
33
start:
35
	load_libraries l_libs_start,l_libs_end
34
	load_libraries l_libs_start,l_libs_end
36
	;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ¡¨¡«¨®â¥ª 
35
	;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ¡¨¡«¨®â¥ª 
37
	mov	ebp,lib_0
36
	mov	ebp,lib_0
38
	cmp	dword [ebp+ll_struc_size-4],0
37
	cmp	dword [ebp+ll_struc_size-4],0
39
	jz	@f
38
	jz	@f
40
		mcall SF_TERMINATE_PROCESS
39
		mcall SF_TERMINATE_PROCESS
41
	@@:
40
	@@:
42
	mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
41
	mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
43
	mcall SF_SET_EVENTS_MASK,0xC0000027
42
	mcall SF_SET_EVENTS_MASK,0xC0000027
44
	stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª  ¤¨ «®£ 
43
	stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª  ¤¨ «®£ 
45
 
44
 
46
	stdcall [buf2d_create], buf_0 ;ᮧ¤ ­¨¥ ¡ãä¥à 
45
	stdcall [buf2d_create], buf_0 ;ᮧ¤ ­¨¥ ¡ãä¥à 
47
 
46
 
48
	include_image_file 'toolbar_t.png', image_data_toolbar,,,6 ;6 - for gray icons
47
	include_image_file 'toolbar_t.png', image_data_toolbar,,,6 ;6 - for gray icons
49
	mov eax,[image_data_toolbar]
48
	mov eax,[image_data_toolbar]
50
	add eax,IMAGE_TOOLBAR_SIZE
49
	add eax,IMAGE_TOOLBAR_SIZE
51
	stdcall img_to_gray, [image_data_toolbar],eax,(IMAGE_TOOLBAR_SIZE)/3
50
	stdcall img_to_gray, [image_data_toolbar],eax,(IMAGE_TOOLBAR_SIZE)/3
52
 
51
 
53
	mcall SF_SYSTEM_GET,SSF_TIME_COUNT
52
	mcall SF_SYSTEM_GET,SSF_TIME_COUNT
54
	mov [last_time],eax
53
	mov [last_time],eax
55
 
54
 
56
	stdcall [kosglMakeCurrent], 3d_wnd_l,3d_wnd_t,3d_wnd_w,3d_wnd_h,ctx1
55
	stdcall [kosglMakeCurrent], 3d_wnd_l,3d_wnd_t,3d_wnd_w,3d_wnd_h,ctx1
57
	stdcall [glEnable], GL_DEPTH_TEST
56
	stdcall [glEnable], GL_DEPTH_TEST
58
	stdcall [glEnable], GL_NORMALIZE ;¤¥« ¬ ­®à¬ «¨ ®¤¨­ ª®¢®© ¢¥«¨ç¨­ë ¢® ¨§¡¥¦ ­¨¥  àâ¥ä ªâ®¢
57
	stdcall [glEnable], GL_NORMALIZE ;¤¥« ¬ ­®à¬ «¨ ®¤¨­ ª®¢®© ¢¥«¨ç¨­ë ¢® ¨§¡¥¦ ­¨¥  àâ¥ä ªâ®¢
59
	stdcall [glClearColor], 0.0,0.0,0.0,0.0
58
	stdcall [glClearColor], 0.0,0.0,0.0,0.0
60
	stdcall [glShadeModel], GL_SMOOTH
59
	stdcall [glShadeModel], GL_SMOOTH
61
 
60
 
62
	call but_new_file
61
	call but_new_file
63
	;¯à®¢¥àª  ª®¬ ­¤­®© áâப¨
62
	;¯à®¢¥àª  ª®¬ ­¤­®© áâப¨
64
	cmp dword[openfile_path],0
63
	cmp dword[openfile_path],0
65
	je @f
64
	je @f
66
		call but_open_file_cmd_lin
65
		call but_open_file_cmd_lin
67
	@@:
66
	@@:
68
 
67
 
69
align 4
68
align 4
70
red_win:
69
red_win:
71
	call draw_window
70
	call draw_window
72
 
71
 
73
align 4
72
align 4
74
still:
73
still:
75
	mcall SF_SYSTEM_GET,SSF_TIME_COUNT
74
	mcall SF_SYSTEM_GET,SSF_TIME_COUNT
76
	mov ebx,[last_time]
75
	mov ebx,[last_time]
77
	add ebx,50 ;§ ¤¥à¦ª 
76
	add ebx,50 ;§ ¤¥à¦ª 
78
	cmp ebx,eax
77
	cmp ebx,eax
79
	jge @f
78
	jge @f
80
		mov ebx,eax
79
		mov ebx,eax
81
	@@:
80
	@@:
82
	sub ebx,eax
81
	sub ebx,eax
83
	mcall SF_WAIT_EVENT_TIMEOUT
82
	mcall SF_WAIT_EVENT_TIMEOUT
84
	bt word[opt_auto_rotate],0
83
	bt word[opt_auto_rotate],0
85
	jnc @f
84
	jnc @f
86
		or eax,eax
85
		or eax,eax
87
		jz timer_funct
86
		jz timer_funct
88
	@@:
87
	@@:
89
 
88
 
90
	cmp al,1
89
	cmp al,1
91
	jz red_win
90
	jz red_win
92
	cmp al,2
91
	cmp al,2
93
	jz key
92
	jz key
94
	cmp al,3
93
	cmp al,3
95
	jz button
94
	jz button
96
	cmp al,6
95
	cmp al,6
97
	jne @f 
96
	jne @f 
98
		call mouse
97
		call mouse
99
	@@:
98
	@@:
100
 
99
 
101
	jmp still
100
	jmp still
102
 
101
 
103
align 4
102
align 4
104
timer_funct:
103
timer_funct:
105
	pushad
104
	pushad
106
	mcall SF_SYSTEM_GET,SSF_TIME_COUNT
105
	mcall SF_SYSTEM_GET,SSF_TIME_COUNT
107
	mov [last_time],eax
106
	mov [last_time],eax
108
 
107
 
109
	; ¢â®¬ â¨ç¥áª®¥ ¨§¬¥­¥­¨¥ 㣫  ®¡§®à 
108
	; ¢â®¬ â¨ç¥áª®¥ ¨§¬¥­¥­¨¥ 㣫  ®¡§®à 
110
	fld dword[angle_y]
109
	fld dword[angle_y]
111
	fsub dword[delt_size]
110
	fsub dword[delt_size]
112
	fstp dword[angle_y]
111
	fstp dword[angle_y]
113
	call draw_3d
112
	call draw_3d
114
	stdcall [kosglSwapBuffers]
113
	call [kosglSwapBuffers]
115
 
114
 
116
	popad
115
	popad
117
	jmp still
116
	jmp still
118
 
117
 
119
align 4
118
align 4
120
draw_window:
119
draw_window:
121
pushad
120
pushad
122
	mcall SF_REDRAW,SSF_BEGIN_DRAW
121
	mcall SF_REDRAW,SSF_BEGIN_DRAW
123
 
122
 
124
	; *** à¨á®¢ ­¨¥ £« ¢­®£® ®ª­  (¢ë¯®«­ï¥âáï 1 à § ¯à¨ § ¯ã᪥) ***
123
	; *** à¨á®¢ ­¨¥ £« ¢­®£® ®ª­  (¢ë¯®«­ï¥âáï 1 à § ¯à¨ § ¯ã᪥) ***
125
	mov edx,[sc.work]
124
	mov edx,[sc.work]
126
	or  edx,(3 shl 24)+0x30000000
125
	or  edx,(3 shl 24)+0x30000000
127
	mcall SF_CREATE_WINDOW,(20 shl 16)+800,(20 shl 16)+570,,,caption
126
	mcall SF_CREATE_WINDOW,(20 shl 16)+800,(20 shl 16)+570,,,caption
128
 
127
 
129
	; *** ᮧ¤ ­¨¥ ª­®¯®ª ­  ¯ ­¥«ì ***
128
	; *** ᮧ¤ ­¨¥ ª­®¯®ª ­  ¯ ­¥«ì ***
130
	mcall SF_DEFINE_BUTTON,(5 shl 16)+20,(5 shl 16)+20,3,[sc.work_button]
129
	mcall SF_DEFINE_BUTTON,(5 shl 16)+20,(5 shl 16)+20,3,[sc.work_button]
131
 
130
 
132
	mov ebx,(30 shl 16)+20
131
	mov ebx,(30 shl 16)+20
133
	mov edx,4
132
	mcall ,,,4
134
	int 0x40
-
 
135
	add ebx,25 shl 16
133
	add ebx,25 shl 16
136
	mov edx,5
134
	mcall ,,,5
137
	int 0x40
-
 
138
	add ebx,30 shl 16
135
	add ebx,30 shl 16
139
	mov edx,6
136
	mcall ,,,6
140
	int 0x40
-
 
141
	add ebx,25 shl 16
137
	add ebx,25 shl 16
142
	mov edx,7
138
	mcall ,,,7
143
	int 0x40
-
 
144
	add ebx,25 shl 16
139
	add ebx,25 shl 16
145
	mov edx,8
140
	mcall ,,,8
146
	int 0x40
-
 
147
	add ebx,25 shl 16
141
	add ebx,25 shl 16
148
	mov edx,9
142
	mcall ,,,9
149
	int 0x40
-
 
150
	add ebx,25 shl 16
143
	add ebx,25 shl 16
151
	mov edx,10
144
	mcall ,,,10
152
	int 0x40
-
 
153
	add ebx,25 shl 16
145
	add ebx,25 shl 16
154
	mov edx,11
146
	mcall ,,,11
155
	int 0x40
-
 
156
	add ebx,25 shl 16
147
	add ebx,25 shl 16
157
	mov edx,12
148
	mcall ,,,12
158
	int 0x40
-
 
159
 
149
 
160
	call draw_toolbar_i
150
	call draw_toolbar_i
161
 
151
 
162
	stdcall [buf2d_draw], buf_0
152
	stdcall [buf2d_draw], buf_0
163
	stdcall [kosglSwapBuffers]
153
	call [kosglSwapBuffers]
164
 
154
 
165
	mcall SF_REDRAW,SSF_END_DRAW
155
	mcall SF_REDRAW,SSF_END_DRAW
166
popad
156
popad
167
	ret
157
	ret
168
 
158
 
169
 
159
 
170
align 4
160
align 4
171
draw_toolbar_i:
161
draw_toolbar_i:
172
	; *** à¨á®¢ ­¨¥ ¨ª®­®ª ­  ª­®¯ª å ***
162
	; *** à¨á®¢ ­¨¥ ¨ª®­®ª ­  ª­®¯ª å ***
173
	mov edx,(7 shl 16)+7 ;icon new
163
	mov edx,(7 shl 16)+7 ;icon new
174
	mcall SF_PUT_IMAGE,[image_data_toolbar],(16 shl 16)+16
164
	mcall SF_PUT_IMAGE,[image_data_toolbar],(16 shl 16)+16
175
 
165
 
176
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
166
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
177
	add edx,(25 shl 16) ;icon open
167
	add edx,(25 shl 16) ;icon open
178
	int 0x40
168
	int 0x40
179
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
169
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
180
	add edx,(25 shl 16) ;icon save
170
	add edx,(25 shl 16) ;icon save
181
	int 0x40
171
	int 0x40
182
 
172
 
183
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
173
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
184
	add edx,(30 shl 16) ;zoom +
174
	add edx,(30 shl 16) ;zoom +
185
	int 0x40
175
	int 0x40
186
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
176
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
187
	add edx,(25 shl 16) ;zoom -
177
	add edx,(25 shl 16) ;zoom -
188
	int 0x40
178
	int 0x40
189
 
179
 
190
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
180
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
191
	cmp word[opt_light],0
181
	cmp word[opt_light],0
192
	jne @f
182
	jne @f
193
		add ebx,IMAGE_TOOLBAR_SIZE ;make gray icon
183
		add ebx,IMAGE_TOOLBAR_SIZE ;make gray icon
194
	@@:
184
	@@:
195
	add edx,(25 shl 16) ;light on/off
185
	add edx,(25 shl 16) ;light on/off
196
	int 0x40
186
	int 0x40
197
	cmp word[opt_light],0
187
	cmp word[opt_light],0
198
	jne @f
188
	jne @f
199
		sub ebx,IMAGE_TOOLBAR_SIZE
189
		sub ebx,IMAGE_TOOLBAR_SIZE
200
	@@:
190
	@@:
201
 
191
 
202
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
192
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
203
	cmp word[opt_cube_box],0
193
	cmp word[opt_cube_box],0
204
	jne @f
194
	jne @f
205
		add ebx,IMAGE_TOOLBAR_SIZE ;make gray icon
195
		add ebx,IMAGE_TOOLBAR_SIZE ;make gray icon
206
	@@:
196
	@@:
207
	add edx,(25 shl 16) ;box on/off
197
	add edx,(25 shl 16) ;box on/off
208
	int 0x40
198
	int 0x40
209
	cmp word[opt_cube_box],0
199
	cmp word[opt_cube_box],0
210
	jne @f
200
	jne @f
211
		sub ebx,IMAGE_TOOLBAR_SIZE
201
		sub ebx,IMAGE_TOOLBAR_SIZE
212
	@@:
202
	@@:
213
 
203
 
214
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
204
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
215
	cmp word[opt_auto_rotate],0
205
	cmp word[opt_auto_rotate],0
216
	jne @f
206
	jne @f
217
		add ebx,IMAGE_TOOLBAR_SIZE ;make gray icon
207
		add ebx,IMAGE_TOOLBAR_SIZE ;make gray icon
218
	@@:
208
	@@:
219
	add edx,(25 shl 16) ;auto rotate on/off
209
	add edx,(25 shl 16) ;auto rotate on/off
220
	int 0x40
210
	int 0x40
221
	cmp word[opt_auto_rotate],0
211
	cmp word[opt_auto_rotate],0
222
	jne @f
212
	jne @f
223
		sub ebx,IMAGE_TOOLBAR_SIZE
213
		sub ebx,IMAGE_TOOLBAR_SIZE
224
	@@:
214
	@@:
225
 
215
 
226
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
216
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
227
	add edx,(25 shl 16) ;info voxels
217
	add edx,(25 shl 16) ;info voxels
228
	int 0x40
218
	int 0x40
229
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
219
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
230
	add edx,(25 shl 16) ;refresh
220
	add edx,(25 shl 16) ;refresh
231
	int 0x40
221
	int 0x40
232
	ret
222
	ret
233
 
223
 
234
 
224
 
235
align 4
225
align 4
236
key:
226
key:
237
	mcall SF_GET_KEY
227
	mcall SF_GET_KEY
238
 
228
 
239
	cmp ah,178 ;Up
229
	cmp ah,178 ;Up
240
	jne @f
230
	jne @f
241
		fld dword[angle_x]
231
		fld dword[angle_x]
242
		fadd dword[delt_size]
232
		fadd dword[delt_size]
243
		fstp dword[angle_x]
233
		fstp dword[angle_x]
244
		call draw_3d
234
		jmp .end0
245
		stdcall [kosglSwapBuffers]
-
 
246
	@@:
235
	@@:
247
	cmp ah,177 ;Down
236
	cmp ah,177 ;Down
248
	jne @f
237
	jne @f
249
		fld dword[angle_x]
238
		fld dword[angle_x]
250
		fsub dword[delt_size]
239
		fsub dword[delt_size]
251
		fstp dword[angle_x]
240
		fstp dword[angle_x]
252
		call draw_3d
241
		jmp .end0
253
		stdcall [kosglSwapBuffers]
-
 
254
	@@:
242
	@@:
255
	cmp ah,176 ;Left
243
	cmp ah,176 ;Left
256
	jne @f
244
	jne @f
257
		fld dword[angle_y]
245
		fld dword[angle_y]
258
		fadd dword[delt_size]
246
		fadd dword[delt_size]
259
		fstp dword[angle_y]
247
		fstp dword[angle_y]
260
		call draw_3d
248
		jmp .end0
261
		stdcall [kosglSwapBuffers]
-
 
262
	@@:
249
	@@:
263
	cmp ah,179 ;Right
250
	cmp ah,179 ;Right
264
	jne @f
251
	jne still  ;@f
265
		fld dword[angle_y]
252
		fld dword[angle_y]
266
		fsub dword[delt_size]
253
		fsub dword[delt_size]
267
		fstp dword[angle_y]
254
		fstp dword[angle_y]
-
 
255
	.end0:
268
		call draw_3d
256
		call draw_3d
269
		stdcall [kosglSwapBuffers]
257
		call [kosglSwapBuffers]
270
	@@:
258
	;@@:
271
 
-
 
272
	jmp still
259
	jmp still
273
 
260
 
274
 
261
 
275
align 4
262
align 4
276
mouse:
263
mouse:
277
	push eax ebx
264
	push eax ebx
278
	mcall SF_MOUSE_GET,SSF_BUTTON_EXT
265
	mcall SF_MOUSE_GET,SSF_BUTTON_EXT
279
	bt eax,0
266
	bt eax,0
280
	jnc .end_m
267
	jnc .end_m
281
		;mouse l. but. move
268
		;mouse l. but. move
282
		cmp dword[mouse_drag],1
269
		cmp dword[mouse_drag],1
283
		jne .end_m
270
		jne .end_m
284
		mcall SF_MOUSE_GET,SSF_WINDOW_POSITION
271
		mcall SF_MOUSE_GET,SSF_WINDOW_POSITION
285
		mov ebx,eax
272
		mov ebx,eax
286
		shr ebx,16 ;mouse.x
273
		shr ebx,16 ;mouse.x
287
		cmp ebx,3d_wnd_l
274
		cmp ebx,3d_wnd_l
288
		jg @f
275
		jg @f
289
			mov ebx,3d_wnd_l
276
			mov ebx,3d_wnd_l
290
		@@:
277
		@@:
291
		sub ebx,3d_wnd_l
278
		sub ebx,3d_wnd_l
292
		cmp ebx,3d_wnd_w
279
		cmp ebx,3d_wnd_w
293
		jle @f
280
		jle @f
294
			mov ebx,3d_wnd_w
281
			mov ebx,3d_wnd_w
295
		@@:
282
		@@:
296
		and eax,0xffff ;mouse.y
283
		and eax,0xffff ;mouse.y
297
		cmp eax,3d_wnd_t
284
		cmp eax,3d_wnd_t
298
		jg @f
285
		jg @f
299
			mov eax,3d_wnd_t
286
			mov eax,3d_wnd_t
300
		@@:
287
		@@:
301
		sub eax,3d_wnd_t
288
		sub eax,3d_wnd_t
302
		cmp eax,3d_wnd_h
289
		cmp eax,3d_wnd_h
303
		jle @f
290
		jle @f
304
			mov eax,3d_wnd_h
291
			mov eax,3d_wnd_h
305
		@@:
292
		@@:
306
		finit
293
		finit
307
		fild dword[mouse_y]
294
		fild dword[mouse_y]
308
		mov [mouse_y],eax
295
		mov [mouse_y],eax
309
		fisub dword[mouse_y]
296
		fisub dword[mouse_y]
310
		fdiv dword[angle_dxm] ;¥á«¨ ªãàá®à ¤¢¨¦¥âáï ¯® ®á¨ y (¢¢¥àå ¨«¨ ¢­¨§) â® ¯®¢®à®â ¤¥« ¥¬ ¢®ªà㣠®á¨ x
297
		fdiv dword[angle_dxm] ;¥á«¨ ªãàá®à ¤¢¨¦¥âáï ¯® ®á¨ y (¢¢¥àå ¨«¨ ¢­¨§) â® ¯®¢®à®â ¤¥« ¥¬ ¢®ªà㣠®á¨ x
311
		fadd dword[angle_x]
298
		fadd dword[angle_x]
312
		fstp dword[angle_x]
299
		fstp dword[angle_x]
313
 
300
 
314
		fild dword[mouse_x]
301
		fild dword[mouse_x]
315
		mov [mouse_x],ebx
302
		mov [mouse_x],ebx
316
		fisub dword[mouse_x]
303
		fisub dword[mouse_x]
317
		fdiv dword[angle_dym] ;¥á«¨ ªãàá®à ¤¢¨¦¥âáï ¯® ®á¨ x (¢¢¥àå ¨«¨ ¢­¨§) â® ¯®¢®à®â ¤¥« ¥¬ ¢®ªà㣠®á¨ y
304
		fdiv dword[angle_dym] ;¥á«¨ ªãàá®à ¤¢¨¦¥âáï ¯® ®á¨ x (¢¢¥àå ¨«¨ ¢­¨§) â® ¯®¢®à®â ¤¥« ¥¬ ¢®ªà㣠®á¨ y
318
		fadd dword[angle_y]
305
		fadd dword[angle_y]
319
		fstp dword[angle_y]
306
		fstp dword[angle_y]
320
 
307
 
321
		call draw_3d
308
		call draw_3d
322
		stdcall [kosglSwapBuffers]
309
		call [kosglSwapBuffers]
323
		jmp .end_d
310
		jmp .end_d
324
	.end_m:
311
	.end_m:
325
	bt eax,16
312
	bt eax,16
326
	jnc @f
313
	jnc @f
327
		;mouse l. but. up
314
		;mouse l. but. up
328
		mov dword[mouse_drag],0
315
		mov dword[mouse_drag],0
329
		jmp .end_d
316
		jmp .end_d
330
	@@:
317
	@@:
331
	bt eax,8
318
	bt eax,8
332
	jnc .end_d
319
	jnc .end_d
333
		;mouse l. but. press
320
		;mouse l. but. press
334
		mcall SF_MOUSE_GET,SSF_WINDOW_POSITION
321
		mcall SF_MOUSE_GET,SSF_WINDOW_POSITION
335
		mov ebx,eax
322
		mov ebx,eax
336
		shr ebx,16 ;mouse.x
323
		shr ebx,16 ;mouse.x
337
		cmp ebx,3d_wnd_l
324
		cmp ebx,3d_wnd_l
338
		jl .end_d
325
		jl .end_d
339
		sub ebx,3d_wnd_l
326
		sub ebx,3d_wnd_l
340
		cmp ebx,3d_wnd_w
327
		cmp ebx,3d_wnd_w
341
		jg .end_d
328
		jg .end_d
342
		and eax,0xffff ;mouse.y
329
		and eax,0xffff ;mouse.y
343
		cmp eax,3d_wnd_t
330
		cmp eax,3d_wnd_t
344
		jl .end_d
331
		jl .end_d
345
		sub eax,3d_wnd_t
332
		sub eax,3d_wnd_t
346
		cmp eax,3d_wnd_h
333
		cmp eax,3d_wnd_h
347
		jg .end_d
334
		jg .end_d
348
		mov dword[mouse_drag],1
335
		mov dword[mouse_drag],1
349
		mov dword[mouse_x],ebx
336
		mov dword[mouse_x],ebx
350
		mov dword[mouse_y],eax
337
		mov dword[mouse_y],eax
351
	.end_d:
338
	.end_d:
352
 
339
 
353
	;stdcall [kmainmenu_dispatch_cursorevent], [main_menu]
340
	;stdcall [kmainmenu_dispatch_cursorevent], [main_menu]
354
	pop ebx eax
341
	pop ebx eax
355
	ret
342
	ret
356
 
343
 
357
align 4
344
align 4
358
button:
345
button:
359
	mcall SF_GET_BUTTON
346
	mcall SF_GET_BUTTON
360
	cmp ah,3
347
	cmp ah,3
361
	jne @f
348
	jne @f
362
		call but_new_file
349
		call but_new_file
363
		jmp still
350
		jmp still
364
	@@:
351
	@@:
365
	cmp ah,4
352
	cmp ah,4
366
	jne @f
353
	jne @f
367
		call but_open_file
354
		call but_open_file
368
		jmp still
355
		jmp still
369
	@@:
356
	@@:
370
	cmp ah,5
357
	cmp ah,5
371
	jne @f
358
	jne @f
372
		call but_save_file
359
		call but_save_file
373
		jmp still
360
		jmp still
374
	@@:
361
	@@:
375
	cmp ah,6
362
	cmp ah,6
376
	jne @f
363
	jne @f
377
		call but_zoom_p
364
		call but_zoom_p
378
		jmp still
365
		jmp still
379
	@@:
366
	@@:
380
	cmp ah,7
367
	cmp ah,7
381
	jne @f
368
	jne @f
382
		call but_zoom_m
369
		call but_zoom_m
383
		jmp still
370
		jmp still
384
	@@:
371
	@@:
385
	cmp ah,8
372
	cmp ah,8
386
	jne @f
373
	jne @f
387
		call but_light
374
		call but_light
388
		jmp still
375
		jmp still
389
	@@:
376
	@@:
390
	cmp ah,9
377
	cmp ah,9
391
	jne @f
378
	jne @f
392
		call but_4
379
		call but_4
393
		jmp still
380
		jmp still
394
	@@:
381
	@@:
395
	cmp ah,10
382
	cmp ah,10
396
	jne @f
383
	jne @f
397
		call but_5
384
		call but_5
398
		jmp still
385
		jmp still
399
	@@:
386
	@@:
400
	cmp ah,11
387
	cmp ah,11
401
	jne @f
388
	jne @f
402
		call but_info
389
		call but_info
403
		jmp still
390
		jmp still
404
	@@:
391
	@@:
405
	cmp ah,12
392
	cmp ah,12
406
	jne @f
393
	jne @f
407
		call but_draw_cadr
394
		call but_draw_cadr
408
		jmp still
395
		jmp still
409
	@@:
396
	@@:
410
	cmp ah,1
397
	cmp ah,1
411
	jne still
398
	jne still
412
.exit:
399
.exit:
413
	stdcall [buf2d_delete],buf_0
400
	stdcall [buf2d_delete],buf_0
414
	stdcall mem.Free,[image_data_toolbar]
401
	stdcall mem.Free,[image_data_toolbar]
415
	stdcall mem.Free,[open_file_data]
402
	stdcall mem.Free,[open_file_data]
416
	stdcall mem.Free,[open_file_ogl]
403
	stdcall mem.Free,[open_file_ogl]
417
	mcall SF_TERMINATE_PROCESS
404
	mcall SF_TERMINATE_PROCESS
418
 
405
 
419
 
406
 
420
align 4
407
align 4
421
but_new_file:
408
but_new_file:
422
	mov dword[angle_x], -30.0
409
	mov dword[angle_x], -30.0
423
	mov dword[angle_y], 180.0
410
	mov dword[angle_y], 180.0
424
	mov dword[angle_z], 180.0
411
	mov dword[angle_z], 180.0
425
	ret
412
	ret
426
 
413
 
427
align 4
414
align 4
428
open_file_data dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï ®âªàëâ¨ï ä ©«®¢
415
open_file_data dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï ®âªàëâ¨ï ä ©«®¢
429
open_file_size dd 0 ;à §¬¥à ®âªàë⮣® ä ©« 
416
open_file_size dd 0 ;à §¬¥à ®âªàë⮣® ä ©« 
430
open_file_ogl dd 0 ;¤«ï § ¯¨á¨ ª®®à¤¨­ â èà ­¥© ¢®ªá¥«¥© ¢ ¯®ª §¥ opengl
417
open_file_ogl dd 0 ;¤«ï § ¯¨á¨ ª®®à¤¨­ â èà ­¥© ¢®ªá¥«¥© ¢ ¯®ª §¥ opengl
431
v_zoom dd 0
418
v_zoom dd 0
432
 
419
 
433
align 4
420
align 4
434
but_open_file:
421
but_open_file:
435
	copy_path open_dialog_name,communication_area_default_path,file_name,0
422
	copy_path open_dialog_name,communication_area_default_path,file_name,0
436
pushad
423
pushad
437
	mov [OpenDialog_data.type],0
424
	mov [OpenDialog_data.type],0
438
	stdcall [OpenDialog_Start],OpenDialog_data
425
	stdcall [OpenDialog_Start],OpenDialog_data
439
	cmp [OpenDialog_data.status],2
426
	cmp [OpenDialog_data.status],2
440
	je @f
427
	je @f
441
		;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
428
		;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
442
		call but_open_file_cmd_lin
429
		call but_open_file_cmd_lin
443
	@@:
430
	@@:
444
popad
431
popad
445
	ret
432
	ret
446
 
433
 
447
align 4
434
align 4
448
but_open_file_cmd_lin:
435
but_open_file_cmd_lin:
449
pushad
436
pushad
450
	mov [run_file_70.Function], SSF_GET_INFO
437
	mov [run_file_70.Function], SSF_GET_INFO
451
	mov [run_file_70.Position], 0
438
	mov [run_file_70.Position], 0
452
	mov [run_file_70.Flags], 0
439
	mov [run_file_70.Flags], 0
453
	mov dword[run_file_70.Count], 0
440
	mov dword[run_file_70.Count], 0
454
	mov dword[run_file_70.Buffer], open_b
441
	mov dword[run_file_70.Buffer], open_b
455
	mov byte[run_file_70+20], 0
442
	mov byte[run_file_70+20], 0
456
	mov dword[run_file_70.FileName], openfile_path
443
	mov dword[run_file_70.FileName], openfile_path
457
	mcall SF_FILE,run_file_70
444
	mcall SF_FILE,run_file_70
458
 
445
 
459
	mov ecx,dword[open_b+32] ;+32 qword: à §¬¥à ä ©«  ¢ ¡ ©â å
446
	mov ecx,dword[open_b+32] ;+32 qword: à §¬¥à ä ©«  ¢ ¡ ©â å
460
	stdcall mem.ReAlloc,[open_file_data],ecx
447
	stdcall mem.ReAlloc,[open_file_data],ecx
461
	mov [open_file_data],eax
448
	mov [open_file_data],eax
462
	
449
	
463
	mov [run_file_70.Function], SSF_READ_FILE
450
	mov [run_file_70.Function], SSF_READ_FILE
464
	mov [run_file_70.Position], 0
451
	mov [run_file_70.Position], 0
465
	mov [run_file_70.Flags], 0
452
	mov [run_file_70.Flags], 0
466
	mov dword[run_file_70.Count], ecx
453
	mov dword[run_file_70.Count], ecx
467
	m2m dword[run_file_70.Buffer], dword[open_file_data]
454
	m2m dword[run_file_70.Buffer], dword[open_file_data]
468
	mov byte[run_file_70+20], 0
455
	mov byte[run_file_70+20], 0
469
	mov dword[run_file_70.FileName], openfile_path
456
	mov dword[run_file_70.FileName], openfile_path
470
	mcall SF_FILE,run_file_70
457
	mcall SF_FILE,run_file_70
471
	cmp ebx,0xffffffff
458
	cmp ebx,0xffffffff
472
	je .end_open_file
459
	je .end_open_file
473
 
460
 
474
	mov [open_file_size],ebx
461
	mov [open_file_size],ebx
475
	mcall SF_SET_CAPTION,1,openfile_path
462
	mcall SF_SET_CAPTION,1,openfile_path
476
 
463
 
477
	mov eax,[open_file_data]
464
	mov eax,[open_file_data]
478
	movzx eax,byte[eax]
465
	movzx eax,byte[eax]
479
	mov dword[v_zoom],eax ;¡¥à¥¬ ¬ áèâ ¡ ¯® 㬮«ç ­¨î
466
	mov dword[v_zoom],eax ;¡¥à¥¬ ¬ áèâ ¡ ¯® 㬮«ç ­¨î
480
	mov ecx,[open_file_size]
467
	mov ecx,[open_file_size]
481
	sub ecx,vox_offs_data
468
	sub ecx,vox_offs_data
482
	shr ecx,2
469
	shr ecx,2
483
	imul ecx,vox_ogl_size
470
	imul ecx,vox_ogl_size
484
	add ecx,4 ;ecx = à §¬¥à ¯ ¬ï⨠­¥®¡å®¤¨¬®© ¤«ï à á¯ ª®¢ª¨ ª®®à¤¨­ â
471
	add ecx,4 ;ecx = à §¬¥à ¯ ¬ï⨠­¥®¡å®¤¨¬®© ¤«ï à á¯ ª®¢ª¨ ª®®à¤¨­ â
485
	stdcall mem.ReAlloc,[open_file_ogl],ecx
472
	stdcall mem.ReAlloc,[open_file_ogl],ecx
486
	or eax,eax
473
	or eax,eax
487
	jz .end_open_file
474
	jz .end_open_file
488
		mov [open_file_ogl],eax
475
		mov [open_file_ogl],eax
489
		stdcall buf_vox_obj_create_3d,[open_file_data],eax,0,0,[v_zoom]
476
		stdcall buf_vox_obj_create_3d,[open_file_data],eax,0,0,[v_zoom]
490
		call draw_cadr_8
477
		call draw_cadr_8
491
	.end_open_file:
478
	.end_open_file:
492
popad
479
popad
493
	ret
480
	ret
494
 
481
 
495
;description:
482
;description:
496
; à¨á®¢ ­¨¥ 8-¬¨ ª ¤à®¢ ¯®¤ à §­ë¬¨ 㣫 ¬¨ ¯®¢®à®â 
483
; à¨á®¢ ­¨¥ 8-¬¨ ª ¤à®¢ ¯®¤ à §­ë¬¨ 㣫 ¬¨ ¯®¢®à®â 
497
align 4
484
align 4
498
draw_cadr_8:
485
draw_cadr_8:
499
	call but_new_file ;ãáâ ­®¢ª  㣫®¢ ¯®¢®à®â  ¯® 㬮«ç ­¨î
486
	call but_new_file ;ãáâ ­®¢ª  㣫®¢ ¯®¢®à®â  ¯® 㬮«ç ­¨î
500
	stdcall [buf2d_clear], buf_0, [buf_0.color] ;ç¨á⨬ ¡ãä¥à
487
	stdcall [buf2d_clear], buf_0, [buf_0.color] ;ç¨á⨬ ¡ãä¥à
501
 
488
 
502
	;à¨á®¢ ­¨¥ 8-¬¨ ª ¤à®¢
489
	;à¨á®¢ ­¨¥ 8-¬¨ ª ¤à®¢
503
	fild dword[rot_angles+4]
490
	fild dword[rot_angles+4]
504
	fstp dword[angle_y]
491
	fstp dword[angle_y]
505
	call draw_3d
492
	call draw_3d
506
	call draw_cadr
493
	call draw_cadr
507
	stdcall [buf2d_bit_blt], buf_0, 128, 0, buf_1
494
	stdcall [buf2d_bit_blt], buf_0, 128, 0, buf_1
508
 
495
 
509
	fild dword[rot_angles+8]
496
	fild dword[rot_angles+8]
510
	fstp dword[angle_y]
497
	fstp dword[angle_y]
511
	call draw_3d
498
	call draw_3d
512
	call draw_cadr
499
	call draw_cadr
513
	stdcall [buf2d_bit_blt], buf_0, 0, 128, buf_1
500
	stdcall [buf2d_bit_blt], buf_0, 0, 128, buf_1
514
	
501
	
515
	fild dword[rot_angles+12]
502
	fild dword[rot_angles+12]
516
	fstp dword[angle_y]
503
	fstp dword[angle_y]
517
	call draw_3d
504
	call draw_3d
518
	call draw_cadr
505
	call draw_cadr
519
	stdcall [buf2d_bit_blt], buf_0, 128, 128, buf_1
506
	stdcall [buf2d_bit_blt], buf_0, 128, 128, buf_1
520
 
507
 
521
	fild dword[rot_angles+16]
508
	fild dword[rot_angles+16]
522
	fstp dword[angle_y]
509
	fstp dword[angle_y]
523
	call draw_3d
510
	call draw_3d
524
	call draw_cadr
511
	call draw_cadr
525
	stdcall [buf2d_bit_blt], buf_0, 0, 256, buf_1
512
	stdcall [buf2d_bit_blt], buf_0, 0, 256, buf_1
526
	
513
	
527
	fild dword[rot_angles+20]
514
	fild dword[rot_angles+20]
528
	fstp dword[angle_y]
515
	fstp dword[angle_y]
529
	call draw_3d
516
	call draw_3d
530
	call draw_cadr
517
	call draw_cadr
531
	stdcall [buf2d_bit_blt], buf_0, 128, 256, buf_1
518
	stdcall [buf2d_bit_blt], buf_0, 128, 256, buf_1
532
 
519
 
533
	fild dword[rot_angles+24]
520
	fild dword[rot_angles+24]
534
	fstp dword[angle_y]
521
	fstp dword[angle_y]
535
	call draw_3d
522
	call draw_3d
536
	call draw_cadr
523
	call draw_cadr
537
	stdcall [buf2d_bit_blt], buf_0, 0, 384, buf_1
524
	stdcall [buf2d_bit_blt], buf_0, 0, 384, buf_1
538
	
525
	
539
	fild dword[rot_angles+28]
526
	fild dword[rot_angles+28]
540
	fstp dword[angle_y]
527
	fstp dword[angle_y]
541
	call draw_3d
528
	call draw_3d
542
	call draw_cadr
529
	call draw_cadr
543
	stdcall [buf2d_bit_blt], buf_0, 128, 384, buf_1
530
	stdcall [buf2d_bit_blt], buf_0, 128, 384, buf_1
544
 
531
 
545
	; *** ¯®á«¥¤­¨© ª ¤à ***
532
	; *** ¯®á«¥¤­¨© ª ¤à ***
546
	fild dword[rot_angles]
533
	fild dword[rot_angles]
547
	fstp dword[angle_y]
534
	fstp dword[angle_y]
548
	call draw_3d
535
	call draw_3d
549
	call draw_cadr
536
	call draw_cadr
550
	stdcall [buf2d_bit_blt], buf_0, 0, 0, buf_1
537
	stdcall [buf2d_bit_blt], buf_0, 0, 0, buf_1
551
	
538
	
552
	call draw_3d
539
	call draw_3d
553
	; ***
540
	; ***
554
 
541
 
555
	stdcall [buf2d_draw], buf_0 ;®¡­®¢«ï¥¬ ¡ãä¥à ­  íªà ­¥
542
	stdcall [buf2d_draw], buf_0 ;®¡­®¢«ï¥¬ ¡ãä¥à ­  íªà ­¥
556
	ret
543
	ret
557
 
544
 
558
align 4
545
align 4
559
rot_angles dd 180,225,270,315,0,45,90,135
546
rot_angles dd 180,225,270,315,0,45,90,135
560
 
547
 
561
align 4
548
align 4
562
draw_cadr:
549
draw_cadr:
563
	mov eax,dword[ctx1] ;eax -> TinyGLContext.GLContext
550
	mov eax,dword[ctx1] ;eax -> TinyGLContext.GLContext
564
	mov eax,[eax] ;eax -> ZBuffer
551
	mov eax,[eax] ;eax -> ZBuffer
565
	mov eax,[eax+offs_zbuf_pbuf] ;eax -> ZBuffer.pbuf
552
	mov eax,[eax+ZBuffer.pbuf]
566
	mov dword[buf_1],eax
553
	mov dword[buf_1],eax
567
 
554
 
568
	mov dword[buf_1.w],512
555
	mov dword[buf_1.w],512
569
	mov dword[buf_1.h],512
556
	mov dword[buf_1.h],512
570
	stdcall [buf2d_img_hdiv2],buf_1
557
	stdcall [buf2d_img_hdiv2],buf_1
571
	mov dword[buf_1.h],256
558
	mov dword[buf_1.h],256
572
	stdcall [buf2d_img_hdiv2],buf_1
559
	stdcall [buf2d_img_hdiv2],buf_1
573
	mov dword[buf_1.h],128
560
	mov dword[buf_1.h],128
574
	stdcall [buf2d_img_wdiv2],buf_1
561
	stdcall [buf2d_img_wdiv2],buf_1
575
	mov dword[buf_1.w],256
562
	mov dword[buf_1.w],256
576
	stdcall [buf2d_img_wdiv2],buf_1
563
	stdcall [buf2d_img_wdiv2],buf_1
577
	mov dword[buf_1.w],128
564
	mov dword[buf_1.w],128
578
	ret
565
	ret
579
 
566
 
580
align 4
567
align 4
581
but_save_file:
568
but_save_file:
582
	copy_path open_dialog_name,communication_area_default_path,file_name,0
569
	copy_path open_dialog_name,communication_area_default_path,file_name,0
583
	pushad
570
	pushad
584
	mov [OpenDialog_data.type],1
571
	mov [OpenDialog_data.type],1
585
	stdcall [OpenDialog_Start],OpenDialog_data
572
	stdcall [OpenDialog_Start],OpenDialog_data
586
	cmp [OpenDialog_data.status],2
573
	cmp [OpenDialog_data.status],2
587
	je .end_save_file
574
	je .end_save_file
588
	;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
575
	;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
589
 
576
 
590
	mov [run_file_70.Function], SSF_CREATE_FILE
577
	mov [run_file_70.Function], SSF_CREATE_FILE
591
	mov [run_file_70.Position], 0
578
	mov [run_file_70.Position], 0
592
	mov [run_file_70.Flags], 0
579
	mov [run_file_70.Flags], 0
593
	mov ebx, dword[open_file_data]
580
	mov ebx, dword[open_file_data]
594
	;¯¨è¥¬ ¢ ä ©« ­®¢ë© ¬ áèâ ¡
581
	;¯¨è¥¬ ¢ ä ©« ­®¢ë© ¬ áèâ ¡
595
	mov edx,dword[v_zoom]
582
	mov edx,dword[v_zoom]
596
	mov byte[ebx],dl
583
	mov byte[ebx],dl
597
	mov [run_file_70.Buffer], ebx
584
	mov [run_file_70.Buffer], ebx
598
	mov ebx,[open_file_size]
585
	mov ebx,[open_file_size]
599
	mov dword[run_file_70.Count], ebx ;à §¬¥à ä ©« 
586
	mov dword[run_file_70.Count], ebx ;à §¬¥à ä ©« 
600
	mov byte[run_file_70+20], 0
587
	mov byte[run_file_70+20], 0
601
	mov dword[run_file_70.FileName], openfile_path
588
	mov dword[run_file_70.FileName], openfile_path
602
	mcall SF_FILE,run_file_70
589
	mcall SF_FILE,run_file_70
603
	;cmp ebx,0xffffffff
590
	;cmp ebx,0xffffffff
604
	;je .end_save_file
591
	;je .end_save_file
605
	; ... á®®¡é¥­¨¥ ® ­¥ã¤ ç­®¬ á®åà ­¥­¨¨ ...
592
	; ... á®®¡é¥­¨¥ ® ­¥ã¤ ç­®¬ á®åà ­¥­¨¨ ...
606
 
593
 
607
	.end_save_file:
594
	.end_save_file:
608
	popad
595
	popad
609
	ret
596
	ret
610
 
597
 
611
align 4
598
align 4
612
proc but_zoom_p uses eax
599
proc but_zoom_p uses eax
613
    cmp dword[v_zoom],11 ;max=2^11=2048
600
    cmp dword[v_zoom],11 ;max=2^11=2048
614
    jge @f
601
    jge @f
615
        inc dword[v_zoom]
602
        inc dword[v_zoom]
616
        stdcall buf_vox_obj_create_3d,[open_file_data],[open_file_ogl],0,0,[v_zoom]
603
        stdcall buf_vox_obj_create_3d,[open_file_data],[open_file_ogl],0,0,[v_zoom]
617
		call draw_3d
604
		call draw_3d
618
		stdcall [kosglSwapBuffers]
605
		call [kosglSwapBuffers]
619
    @@:
606
    @@:
620
    ret
607
    ret
621
endp
608
endp
622
 
609
 
623
align 4
610
align 4
624
proc but_zoom_m uses eax
611
proc but_zoom_m uses eax
625
    cmp dword[v_zoom],1
612
    cmp dword[v_zoom],1
626
    jle @f
613
    jle @f
627
        dec dword[v_zoom]
614
        dec dword[v_zoom]
628
        stdcall buf_vox_obj_create_3d,[open_file_data],[open_file_ogl],0,0,[v_zoom]
615
        stdcall buf_vox_obj_create_3d,[open_file_data],[open_file_ogl],0,0,[v_zoom]
629
		call draw_3d
616
		call draw_3d
630
		stdcall [kosglSwapBuffers]
617
		call [kosglSwapBuffers]
631
    @@:
618
    @@:
632
    ret
619
    ret
633
endp
620
endp
634
 
621
 
635
align 4
622
align 4
636
proc but_light uses eax ebx ecx edx
623
proc but_light uses eax ebx ecx edx
637
	xor word[opt_light],1
624
	xor word[opt_light],1
638
	cmp word[opt_light],0
625
	cmp word[opt_light],0
639
	je @f
626
	je @f
640
		stdcall [glEnable], GL_LIGHTING
627
		stdcall [glEnable], GL_LIGHTING
641
		stdcall [glEnable], GL_LIGHT0
628
		stdcall [glEnable], GL_LIGHT0
642
		jmp .end_light
629
		jmp .end_light
643
	@@:
630
	@@:
644
		stdcall [glDisable], GL_LIGHTING
631
		stdcall [glDisable], GL_LIGHTING
645
		stdcall [glDisable], GL_LIGHT0
632
		stdcall [glDisable], GL_LIGHT0
646
	.end_light:
633
	.end_light:
647
	call draw_toolbar_i
634
	call draw_toolbar_i
648
	call draw_3d
635
	call draw_3d
649
	stdcall [kosglSwapBuffers]
636
	call [kosglSwapBuffers]
650
	ret
637
	ret
651
endp
638
endp
652
 
639
 
653
align 4
640
align 4
654
proc but_4 uses eax ebx ecx edx
641
proc but_4 uses eax ebx ecx edx
655
	xor word[opt_cube_box],1
642
	xor word[opt_cube_box],1
656
	call draw_toolbar_i
643
	call draw_toolbar_i
657
	call draw_3d
644
	call draw_3d
658
	stdcall [kosglSwapBuffers]
645
	call [kosglSwapBuffers]
659
	ret
646
	ret
660
endp
647
endp
661
 
648
 
662
align 4
649
align 4
663
proc but_5 uses eax ebx ecx edx
650
proc but_5 uses eax ebx ecx edx
664
	xor word[opt_auto_rotate],1
651
	xor word[opt_auto_rotate],1
665
	call draw_toolbar_i
652
	call draw_toolbar_i
666
	ret
653
	ret
667
endp
654
endp
668
 
655
 
669
align 4
656
align 4
670
proc but_info uses eax ebx ecx edx edi
657
proc but_info uses eax ebx ecx edx edi
671
	;¢ëç¨á«¥­¨¥ áâ â¨á⨪¨ ¯® ¢®ªá¥«ï¬
658
	;¢ëç¨á«¥­¨¥ áâ â¨á⨪¨ ¯® ¢®ªá¥«ï¬
672
	mov eax,[open_file_ogl]
659
	mov eax,[open_file_ogl]
673
	or eax,eax
660
	or eax,eax
674
	jz .end_stat
661
	jz .end_stat
675
		mov ebx,[eax]
662
		mov ebx,[eax]
676
		mov ecx,ebx
663
		mov ecx,ebx
677
		mov edx,ebx
664
		mov edx,ebx
678
		imul ebx,6
665
		imul ebx,6
679
		add eax,4
666
		add eax,4
680
align 4
667
align 4
681
		.cycle_0:
668
		.cycle_0:
682
			bt word[eax+vox_ogl_planes],vox_ogl_gran_z0
669
			bt word[eax+vox_ogl_planes],vox_ogl_gran_z0
683
			jc @f
670
			jc @f
684
			dec ebx
671
			dec ebx
685
			@@:
672
			@@:
686
			bt word[eax+vox_ogl_planes],vox_ogl_gran_z1
673
			bt word[eax+vox_ogl_planes],vox_ogl_gran_z1
687
			jc @f
674
			jc @f
688
			dec ebx
675
			dec ebx
689
			@@:
676
			@@:
690
			bt word[eax+vox_ogl_planes],vox_ogl_gran_y0
677
			bt word[eax+vox_ogl_planes],vox_ogl_gran_y0
691
			jc @f
678
			jc @f
692
			dec ebx
679
			dec ebx
693
			@@:
680
			@@:
694
			bt word[eax+vox_ogl_planes],vox_ogl_gran_y1
681
			bt word[eax+vox_ogl_planes],vox_ogl_gran_y1
695
			jc @f
682
			jc @f
696
			dec ebx
683
			dec ebx
697
			@@:
684
			@@:
698
			bt word[eax+vox_ogl_planes],vox_ogl_gran_x0
685
			bt word[eax+vox_ogl_planes],vox_ogl_gran_x0
699
			jc @f
686
			jc @f
700
			dec ebx
687
			dec ebx
701
			@@:
688
			@@:
702
			bt word[eax+vox_ogl_planes],vox_ogl_gran_x1
689
			bt word[eax+vox_ogl_planes],vox_ogl_gran_x1
703
			jc @f
690
			jc @f
704
			dec ebx
691
			dec ebx
705
			@@:
692
			@@:
706
			add eax,vox_ogl_size
693
			add eax,vox_ogl_size
707
		loop .cycle_0
694
		loop .cycle_0
708
 
695
 
709
		mov eax,edx
696
		mov eax,edx
710
		mov edi,txt_stat_m1.v
697
		mov edi,txt_stat_m1.v
711
		stdcall convert_int_to_str,20
698
		stdcall convert_int_to_str,20
712
 
699
 
713
		mov eax,ebx
700
		mov eax,ebx
714
		mov edi,txt_stat_m2.v
701
		mov edi,txt_stat_m2.v
715
		stdcall convert_int_to_str,20
702
		stdcall convert_int_to_str,20
716
 
703
 
717
		stdcall str_n_cat,txt_stat_m1.v,txt_stat_m2,50
704
		stdcall str_n_cat,txt_stat_m1.v,txt_stat_m2,50
718
		notify_window_run txt_stat_m1
705
		notify_window_run txt_stat_m1
719
	.end_stat:
706
	.end_stat:
720
	ret
707
	ret
721
endp
708
endp
722
 
709
 
723
align 4
710
align 4
724
txt_stat_m1:
711
txt_stat_m1:
725
if lang eq ru
712
if lang eq ru
726
	db '‘â â¨á⨪ ',13,10,'‚®ªá¥«¥©: '
713
	db '‘â â¨á⨪ ',13,10,'‚®ªá¥«¥©: '
727
.v: rb 70
714
.v: rb 70
728
txt_stat_m2:
715
txt_stat_m2:
729
	db 13,10,'Žâ®¡à ¦ ¥¬ëå £à ­¥©: '
716
	db 13,10,'Žâ®¡à ¦ ¥¬ëå £à ­¥©: '
730
else
717
else
731
	db 'Statistics',13,10,'Voxels: '
718
	db 'Statistics',13,10,'Voxels: '
732
.v: rb 70
719
.v: rb 70
733
txt_stat_m2:
720
txt_stat_m2:
734
	db 13,10,'Facets displayed: '
721
	db 13,10,'Facets displayed: '
735
end if
722
end if
736
.v: rb 20
723
.v: rb 20
737
 
724
 
738
align 4
725
align 4
739
proc but_draw_cadr uses eax ebx ecx edx
726
proc but_draw_cadr uses eax ebx ecx edx
740
	mov ebx,[angle_x]
727
	mov ebx,[angle_x]
741
	mov ecx,[angle_y]
728
	mov ecx,[angle_y]
742
	mov edx,[angle_z]
729
	mov edx,[angle_z]
743
	call draw_cadr_8
730
	call draw_cadr_8
744
	mov [angle_x],ebx
731
	mov [angle_x],ebx
745
	mov [angle_y],ecx
732
	mov [angle_y],ecx
746
	mov [angle_z],edx
733
	mov [angle_z],edx
747
	cmp word[opt_auto_rotate],0
734
	cmp word[opt_auto_rotate],0
748
	jne @f
735
	jne @f
749
		call draw_3d
736
		call draw_3d
750
		;stdcall [kosglSwapBuffers]
737
		;call [kosglSwapBuffers]
751
	@@:
738
	@@:
752
	ret
739
	ret
753
endp
740
endp
754
 
741
 
755
align 4
742
align 4
756
draw_3d:
743
draw_3d:
757
	stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;®ç¨á⨬ ¡ãä¥à æ¢¥â  ¨ £«ã¡¨­ë
744
	stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;®ç¨á⨬ ¡ãä¥à æ¢¥â  ¨ £«ã¡¨­ë
758
	stdcall [glPushMatrix]
745
	stdcall [glPushMatrix]
759
 
746
 
760
	cmp word[opt_light],0
747
	cmp word[opt_light],0
761
	je @f
748
	je @f
762
		call SetLight
749
		call SetLight
763
	@@:
750
	@@:
764
	stdcall [glTranslatef], 0.0,0.0,0.5 ;ª®®à¤¨­ âë ¯® ®á¨ z ¤®«¦­ë ¡ëâì ¢ ¯à¥¤¥« å ®â 0.0 ¤® 1.0, ¨­ ç¥ ¨§®¡à ¦¥­¨¥ ¡ã¤¥â ®âᥪ âìáï
751
	stdcall [glTranslatef], 0.0,0.0,0.5 ;ª®®à¤¨­ âë ¯® ®á¨ z ¤®«¦­ë ¡ëâì ¢ ¯à¥¤¥« å ®â 0.0 ¤® 1.0, ¨­ ç¥ ¨§®¡à ¦¥­¨¥ ¡ã¤¥â ®âᥪ âìáï
765
		;¢®ªá¥«ì­ë© ®¡ê¥ªâ ¨¬¥¥â ª®®à¤¨­ âë ¯® ®áï¬ ®â -0.5 ¤® 0.5, ¯®â®¬ã ¥£® ¤¢¨£ ¥¬ ­  +0.5
752
		;¢®ªá¥«ì­ë© ®¡ê¥ªâ ¨¬¥¥â ª®®à¤¨­ âë ¯® ®áï¬ ®â -0.5 ¤® 0.5, ¯®â®¬ã ¥£® ¤¢¨£ ¥¬ ­  +0.5
766
		;­® ¢á¥ ¦¥ ¯à¨ ¯®¢®à®â å ¡ã¤ãâ ®âᥪ âáï ªà ï, ª®â®àë¥ ¢ë«¥§ãâ §  ¯à¥¤¥«ë ¯«®áª®á⥩ ®âá¥ç¥­¨ï
753
		;­® ¢á¥ ¦¥ ¯à¨ ¯®¢®à®â å ¡ã¤ãâ ®âᥪ âáï ªà ï, ª®â®àë¥ ¢ë«¥§ãâ §  ¯à¥¤¥«ë ¯«®áª®á⥩ ®âá¥ç¥­¨ï
767
		;¢ ¢¥àᨨ opengl ¯®¤ Win ª®®à¤¨­ âë ¨¤ãâ ®â -1.0 ¤® 1.0 ¯®â®¬ã â ¬ í⮣® ¤¥« âì ­¥ ­ã¦­®
754
		;¢ ¢¥àᨨ opengl ¯®¤ Win ª®®à¤¨­ âë ¨¤ãâ ®â -1.0 ¤® 1.0 ¯®â®¬ã â ¬ í⮣® ¤¥« âì ­¥ ­ã¦­®
768
	stdcall [glScalef], [scale], [scale], [scale] ;㢥«¨ç¨¢ ¥¬ ¢®ªá¥«ì­ë© ®¡ê¥ªâ, çâ®-¡ë ­¥ ¡ë« ®ç¥­ì ¬ «¥­ìª¨¬
755
	stdcall [glScalef], [scale], [scale], [scale] ;㢥«¨ç¨¢ ¥¬ ¢®ªá¥«ì­ë© ®¡ê¥ªâ, çâ®-¡ë ­¥ ¡ë« ®ç¥­ì ¬ «¥­ìª¨¬
769
	stdcall [glScalef], 1.0, 1.0, 0.25 ;çâ®-¡ë ªà ï ®¡ê¥ªâ  ­¥ ¢ë« §¨«¨ §  £à ­¨ ®âá¥ç¥­¨ï
756
	stdcall [glScalef], 1.0, 1.0, 0.25 ;çâ®-¡ë ªà ï ®¡ê¥ªâ  ­¥ ¢ë« §¨«¨ §  £à ­¨ ®âá¥ç¥­¨ï
770
	stdcall [glRotatef], [angle_x],1.0,0.0,0.0
757
	stdcall [glRotatef], [angle_x],1.0,0.0,0.0
771
	stdcall [glRotatef], [angle_y],0.0,1.0,0.0
758
	stdcall [glRotatef], [angle_y],0.0,1.0,0.0
772
	stdcall [glRotatef], [angle_z],0.0,0.0,1.0
759
	stdcall [glRotatef], [angle_z],0.0,0.0,1.0
773
	stdcall draw_voxels_3d,[open_file_ogl]
760
	stdcall draw_voxels_3d,[open_file_ogl]
774
 
761
 
775
	stdcall [glPopMatrix]
762
	call [glPopMatrix]
776
ret
763
ret
777
 
764
 
778
align 4
765
align 4
779
proc SetLight
766
proc SetLight
780
    stdcall [glLightfv], GL_LIGHT0, GL_POSITION, light_position
767
    stdcall [glLightfv], GL_LIGHT0, GL_POSITION, light_position
781
    stdcall [glLightfv], GL_LIGHT0, GL_SPOT_DIRECTION, light_dir
768
    stdcall [glLightfv], GL_LIGHT0, GL_SPOT_DIRECTION, light_dir
782
 
769
 
783
    stdcall [glLightfv], GL_LIGHT0, GL_DIFFUSE, white_light
770
    stdcall [glLightfv], GL_LIGHT0, GL_DIFFUSE, white_light
784
    stdcall [glLightfv], GL_LIGHT0, GL_SPECULAR, white_light
771
    stdcall [glLightfv], GL_LIGHT0, GL_SPECULAR, white_light
785
 
772
 
786
    stdcall [glEnable], GL_COLOR_MATERIAL
773
    stdcall [glEnable], GL_COLOR_MATERIAL
787
    stdcall [glColorMaterial], GL_FRONT, GL_AMBIENT_AND_DIFFUSE
774
    stdcall [glColorMaterial], GL_FRONT, GL_AMBIENT_AND_DIFFUSE
788
    stdcall [glMaterialfv], GL_FRONT, GL_SPECULAR, mat_specular
775
    stdcall [glMaterialfv], GL_FRONT, GL_SPECULAR, mat_specular
789
    stdcall [glMaterialf], GL_FRONT, GL_SHININESS, mat_shininess
776
    stdcall [glMaterialf], GL_FRONT, GL_SHININESS, mat_shininess
790
    stdcall [glLightModelfv], GL_LIGHT_MODEL_AMBIENT, lmodel_ambient
777
    stdcall [glLightModelfv], GL_LIGHT_MODEL_AMBIENT, lmodel_ambient
791
  
778
  
792
    stdcall [glEnable], GL_LIGHTING
779
    stdcall [glEnable], GL_LIGHTING
793
    stdcall [glEnable], GL_LIGHT0
780
    stdcall [glEnable], GL_LIGHT0
794
    
781
    
795
    ;;;stdcall [glLightModeli], GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE
782
    ;;;stdcall [glLightModeli], GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE
796
    ret
783
    ret
797
endp
784
endp
798
 
785
 
799
align 4
786
align 4
800
proc img_to_gray, buf_rgb:dword, buf_g24:dword, pixels:dword
787
proc img_to_gray, buf_rgb:dword, buf_g24:dword, pixels:dword
801
pushad
788
pushad
802
	mov esi,[buf_rgb]
789
	mov esi,[buf_rgb]
803
	mov edi,[buf_g24]
790
	mov edi,[buf_g24]
804
	mov ecx,[pixels]
791
	mov ecx,[pixels]
805
	mov ebx,3
792
	mov ebx,3
806
align 4
793
align 4
807
	@@:
794
	@@:
808
		movzx eax,byte[esi]
795
		movzx eax,byte[esi]
809
		movzx edx,byte[esi+1]
796
		movzx edx,byte[esi+1]
810
		add eax,edx
797
		add eax,edx
811
		movzx edx,byte[esi+2]
798
		movzx edx,byte[esi+2]
812
		add eax,edx
799
		add eax,edx
813
		xor edx,edx
800
		xor edx,edx
814
		div ebx ;shr eax,2
801
		div ebx ;shr eax,2
815
		mov ah,al
802
		mov ah,al
816
		mov word[edi],ax
803
		mov word[edi],ax
817
		mov byte[edi+2],al
804
		mov byte[edi+2],al
818
		add esi,3
805
		add esi,3
819
		add edi,3
806
		add edi,3
820
		loop @b
807
		loop @b
821
popad
808
popad
822
	ret
809
	ret
823
endp
810
endp
824
 
811
 
825
 
812
 
826
;¤ ­­ë¥ ¤«ï ¤¨ «®£  ®âªàëâ¨ï ä ©«®¢
813
;¤ ­­ë¥ ¤«ï ¤¨ «®£  ®âªàëâ¨ï ä ©«®¢
827
align 4
814
align 4
828
OpenDialog_data:
815
OpenDialog_data:
829
.type			dd 0 ;0 - ®âªàëâì, 1 - á®åà ­¨âì, 2 - ¢ë¡à âì ¤â४â®à¨î
816
.type			dd 0 ;0 - ®âªàëâì, 1 - á®åà ­¨âì, 2 - ¢ë¡à âì ¤â४â®à¨î
830
.procinfo		dd procinfo	;+4
817
.procinfo		dd procinfo	;+4
831
.com_area_name		dd communication_area_name	;+8
818
.com_area_name		dd communication_area_name	;+8
832
.com_area		dd 0	;+12
819
.com_area		dd 0	;+12
833
.opendir_path		dd plugin_path	;+16
820
.opendir_path		dd plugin_path	;+16
834
.dir_default_path	dd default_dir ;+20
821
.dir_default_path	dd default_dir ;+20
835
.start_path		dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢
822
.start_path		dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢
836
.draw_window		dd draw_window	;+28
823
.draw_window		dd draw_window	;+28
837
.status 		dd 0	;+32
824
.status 		dd 0	;+32
838
.openfile_path		dd openfile_path	;+36 ¯ãâì ª ®âªà뢠¥¬®¬ã ä ©«ã
825
.openfile_path		dd openfile_path	;+36 ¯ãâì ª ®âªà뢠¥¬®¬ã ä ©«ã
839
.filename_area		dd filename_area	;+40
826
.filename_area		dd filename_area	;+40
840
.filter_area		dd Filter
827
.filter_area		dd Filter
841
.x:
828
.x:
842
.x_size 		dw 420 ;+48 ; Window X size
829
.x_size 		dw 420 ;+48 ; Window X size
843
.x_start		dw 10 ;+50 ; Window X position
830
.x_start		dw 10 ;+50 ; Window X position
844
.y:
831
.y:
845
.y_size 		dw 320 ;+52 ; Window y size
832
.y_size 		dw 320 ;+52 ; Window y size
846
.y_start		dw 10 ;+54 ; Window Y position
833
.y_start		dw 10 ;+54 ; Window Y position
847
 
834
 
848
default_dir db '/rd/1',0
835
default_dir db '/rd/1',0
849
 
836
 
850
communication_area_name:
837
communication_area_name:
851
	db 'FFFFFFFF_open_dialog',0
838
	db 'FFFFFFFF_open_dialog',0
852
open_dialog_name:
839
open_dialog_name:
853
	db 'opendial',0
840
	db 'opendial',0
854
communication_area_default_path:
841
communication_area_default_path:
855
	db '/rd/1/File managers/',0
842
	db '/rd/1/File managers/',0
856
 
843
 
857
Filter:
844
Filter:
858
dd Filter.end - Filter ;.1
845
dd Filter.end - Filter ;.1
859
.1:
846
.1:
860
db 'VOX',0
847
db 'VOX',0
861
db 'TXT',0
848
db 'TXT',0
862
.end:
849
.end:
863
db 0
850
db 0
864
 
851
 
865
 
852
 
866
 
853
 
867
system_dir_0 db '/sys/lib/'
854
system_dir_0 db '/sys/lib/'
868
lib_name_0 db 'proc_lib.obj',0
855
lib_name_0 db 'proc_lib.obj',0
869
system_dir_1 db '/sys/lib/'
856
system_dir_1 db '/sys/lib/'
870
lib_name_1 db 'libimg.obj',0
857
lib_name_1 db 'libimg.obj',0
871
system_dir_2 db '/sys/lib/'
858
system_dir_2 db '/sys/lib/'
872
lib_name_2 db 'buf2d.obj',0
859
lib_name_2 db 'buf2d.obj',0
873
system_dir_3 db '/sys/lib/'
860
system_dir_3 db '/sys/lib/'
874
lib_name_3 db 'tinygl.obj',0
861
lib_name_3 db 'tinygl.obj',0
875
 
862
 
876
align 4
863
align 4
877
head_f_i:
864
head_f_i:
878
if lang eq ru
865
if lang eq ru
879
head_f_l db '"‘¨á⥬­ ï ®è¨¡ª ',0
866
head_f_l db '"‘¨á⥬­ ï ®è¨¡ª ',0
880
err_message_found_lib_0 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'proc_lib.obj',39,'" -tE',0
867
err_message_found_lib_0 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'proc_lib.obj',39,'" -tE',0
881
err_message_import_0 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,'" -tE',0
868
err_message_import_0 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,'" -tE',0
882
err_message_found_lib_1 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libimg.obj',39,'" -tE',0
869
err_message_found_lib_1 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libimg.obj',39,'" -tE',0
883
err_message_import_1 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,'" -tE',0
870
err_message_import_1 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,'" -tE',0
884
err_msg_found_lib_2 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'buf2d.obj',39,'" -tE',0
871
err_msg_found_lib_2 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'buf2d.obj',39,'" -tE',0
885
err_msg_import_2 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,'" -tE',0
872
err_msg_import_2 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,'" -tE',0
886
err_msg_found_lib_3 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'tinygl.obj',39,'" -tE',0
873
err_msg_found_lib_3 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'tinygl.obj',39,'" -tE',0
887
err_msg_import_3 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'tinygl',39,'" -tE',0
874
err_msg_import_3 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'tinygl',39,'" -tE',0
888
else
875
else
889
head_f_l db '"System error',0
876
head_f_l db '"System error',0
890
err_message_found_lib_0 db 'Sorry I cannot found library ',39,'proc_lib.obj',39,'" -tE',0
877
err_message_found_lib_0 db 'Sorry I cannot found library ',39,'proc_lib.obj',39,'" -tE',0
891
err_message_import_0 db 'Error on load import library ',39,'proc_lib.obj',39,'" -tE',0
878
err_message_import_0 db 'Error on load import library ',39,'proc_lib.obj',39,'" -tE',0
892
err_message_found_lib_1 db 'Sorry I cannot found library ',39,'libimg.obj',39,'" -tE',0
879
err_message_found_lib_1 db 'Sorry I cannot found library ',39,'libimg.obj',39,'" -tE',0
893
err_message_import_1 db 'Error on load import library ',39,'libimg.obj',39,'" -tE',0
880
err_message_import_1 db 'Error on load import library ',39,'libimg.obj',39,'" -tE',0
894
err_msg_found_lib_2 db 'Sorry I cannot found library ',39,'buf2d.obj',39,'" -tE',0
881
err_msg_found_lib_2 db 'Sorry I cannot found library ',39,'buf2d.obj',39,'" -tE',0
895
err_msg_import_2 db 'Error on load import library ',39,'buf2d',39,'" -tE',0
882
err_msg_import_2 db 'Error on load import library ',39,'buf2d',39,'" -tE',0
896
err_msg_found_lib_3 db 'Sorry I cannot found library ',39,'tinygl.obj',39,'" -tE',0
883
err_msg_found_lib_3 db 'Sorry I cannot found library ',39,'tinygl.obj',39,'" -tE',0
897
err_msg_import_3 db 'Error on load import library ',39,'tinygl',39,'" -tE',0
884
err_msg_import_3 db 'Error on load import library ',39,'tinygl',39,'" -tE',0
898
end if
885
end if
899
 
886
 
900
l_libs_start:
887
l_libs_start:
901
	lib_0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\
888
	lib_0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\
902
		err_message_found_lib_0, head_f_l, proclib_import,err_message_import_0, head_f_i
889
		err_message_found_lib_0, head_f_l, proclib_import,err_message_import_0, head_f_i
903
	lib_1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\
890
	lib_1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\
904
		err_message_found_lib_1, head_f_l, import_libimg, err_message_import_1, head_f_i
891
		err_message_found_lib_1, head_f_l, import_libimg, err_message_import_1, head_f_i
905
	lib_2 l_libs lib_name_2, sys_path, library_path, system_dir_2,\
892
	lib_2 l_libs lib_name_2, sys_path, library_path, system_dir_2,\
906
		err_msg_found_lib_2,head_f_l,import_buf2d,err_msg_import_2,head_f_i
893
		err_msg_found_lib_2,head_f_l,import_buf2d,err_msg_import_2,head_f_i
907
	lib_3 l_libs lib_name_3, sys_path, library_path, system_dir_3,\
894
	lib_3 l_libs lib_name_3, sys_path, library_path, system_dir_3,\
908
		err_msg_found_lib_3,head_f_l,import_lib_tinygl,err_msg_import_3,head_f_i
895
		err_msg_found_lib_3,head_f_l,import_lib_tinygl,err_msg_import_3,head_f_i
909
l_libs_end:
896
l_libs_end:
910
 
897
 
911
align 4
898
align 4
912
import_libimg:
899
import_libimg:
913
	dd alib_init1
900
	dd alib_init1
914
	img_is_img  dd aimg_is_img
901
;	img_is_img  dd aimg_is_img
915
	img_info    dd aimg_info
902
;	img_info    dd aimg_info
916
	img_from_file dd aimg_from_file
903
;	img_from_file dd aimg_from_file
917
	img_to_file dd aimg_to_file
904
;	img_to_file dd aimg_to_file
918
	img_from_rgb dd aimg_from_rgb
905
;	img_from_rgb dd aimg_from_rgb
919
	img_to_rgb  dd aimg_to_rgb
906
;	img_to_rgb  dd aimg_to_rgb
920
	img_to_rgb2 dd aimg_to_rgb2
907
	img_to_rgb2 dd aimg_to_rgb2
921
	img_decode  dd aimg_decode
908
	img_decode  dd aimg_decode
922
	img_encode  dd aimg_encode
909
;	img_encode  dd aimg_encode
923
	img_create  dd aimg_create
910
;	img_create  dd aimg_create
924
	img_destroy dd aimg_destroy
911
	img_destroy dd aimg_destroy
925
	img_destroy_layer dd aimg_destroy_layer
912
;	img_destroy_layer dd aimg_destroy_layer
926
	img_count   dd aimg_count
913
;	img_count   dd aimg_count
927
	img_lock_bits dd aimg_lock_bits
914
;	img_lock_bits dd aimg_lock_bits
928
	img_unlock_bits dd aimg_unlock_bits
915
;	img_unlock_bits dd aimg_unlock_bits
929
	img_flip    dd aimg_flip
916
;	img_flip    dd aimg_flip
930
	img_flip_layer dd aimg_flip_layer
917
;	img_flip_layer dd aimg_flip_layer
931
	img_rotate  dd aimg_rotate
918
;	img_rotate  dd aimg_rotate
932
	img_rotate_layer dd aimg_rotate_layer
919
;	img_rotate_layer dd aimg_rotate_layer
933
	img_draw    dd aimg_draw
920
;	img_draw    dd aimg_draw
-
 
921
;	img_convert dd aimg_convert
934
 
922
 
935
	dd 0,0
923
	dd 0,0
936
	alib_init1   db 'lib_init',0
924
	alib_init1   db 'lib_init',0
937
	aimg_is_img  db 'img_is_img',0 ;®¯à¥¤¥«ï¥â ¯® ¤ ­­ë¬, ¬®¦¥â «¨ ¡¨¡«¨®â¥ª  ᤥ« âì ¨§ ­¨å ¨§®¡à ¦¥­¨¥
925
;	aimg_is_img  db 'img_is_img',0 ;®¯à¥¤¥«ï¥â ¯® ¤ ­­ë¬, ¬®¦¥â «¨ ¡¨¡«¨®â¥ª  ᤥ« âì ¨§ ­¨å ¨§®¡à ¦¥­¨¥
938
	aimg_info    db 'img_info',0
926
;	aimg_info    db 'img_info',0
939
	aimg_from_file db 'img_from_file',0
927
;	aimg_from_file db 'img_from_file',0
940
	aimg_to_file db 'img_to_file',0
928
;	aimg_to_file db 'img_to_file',0
941
	aimg_from_rgb db 'img_from_rgb',0
929
;	aimg_from_rgb db 'img_from_rgb',0
942
	aimg_to_rgb  db 'img_to_rgb',0 ;¯à¥®¡à §®¢ ­¨¥ ¨§®¡à ¦¥­¨ï ¢ ¤ ­­ë¥ RGB
930
;	aimg_to_rgb  db 'img_to_rgb',0 ;¯à¥®¡à §®¢ ­¨¥ ¨§®¡à ¦¥­¨ï ¢ ¤ ­­ë¥ RGB
943
	aimg_to_rgb2 db 'img_to_rgb2',0
931
	aimg_to_rgb2 db 'img_to_rgb2',0
944
	aimg_decode  db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ­­ëå
932
	aimg_decode  db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ­­ëå
945
	aimg_encode  db 'img_encode',0
933
;	aimg_encode  db 'img_encode',0
946
	aimg_create  db 'img_create',0
934
;	aimg_create  db 'img_create',0
947
	aimg_destroy db 'img_destroy',0
935
	aimg_destroy db 'img_destroy',0
948
	aimg_destroy_layer db 'img_destroy_layer',0
936
;	aimg_destroy_layer db 'img_destroy_layer',0
949
	aimg_count   db 'img_count',0
937
;	aimg_count   db 'img_count',0
950
	aimg_lock_bits db 'img_lock_bits',0
938
;	aimg_lock_bits db 'img_lock_bits',0
951
	aimg_unlock_bits db 'img_unlock_bits',0
939
;	aimg_unlock_bits db 'img_unlock_bits',0
952
	aimg_flip    db 'img_flip',0
940
;	aimg_flip    db 'img_flip',0
953
	aimg_flip_layer db 'img_flip_layer',0
941
;	aimg_flip_layer db 'img_flip_layer',0
954
	aimg_rotate  db 'img_rotate',0
942
;	aimg_rotate  db 'img_rotate',0
955
	aimg_rotate_layer db 'img_rotate_layer',0
943
;	aimg_rotate_layer db 'img_rotate_layer',0
956
	aimg_draw    db 'img_draw',0
944
;	aimg_draw    db 'img_draw',0
-
 
945
;	aimg_convert db 'img_convert',0
957
 
946
 
958
align 4
947
align 4
959
proclib_import: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
948
proclib_import: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
960
	OpenDialog_Init dd aOpenDialog_Init
949
	OpenDialog_Init dd aOpenDialog_Init
961
	OpenDialog_Start dd aOpenDialog_Start
950
	OpenDialog_Start dd aOpenDialog_Start
962
dd 0,0
951
dd 0,0
963
	aOpenDialog_Init db 'OpenDialog_init',0
952
	aOpenDialog_Init db 'OpenDialog_init',0
964
	aOpenDialog_Start db 'OpenDialog_start',0
953
	aOpenDialog_Start db 'OpenDialog_start',0
965
 
954
 
966
align 4
955
align 4
967
import_buf2d:
956
import_buf2d:
968
	init dd sz_init
957
	init dd sz_init
969
	buf2d_create dd sz_buf2d_create
958
	buf2d_create dd sz_buf2d_create
970
	buf2d_create_f_img dd sz_buf2d_create_f_img
959
	buf2d_create_f_img dd sz_buf2d_create_f_img
971
	buf2d_clear dd sz_buf2d_clear
960
	buf2d_clear dd sz_buf2d_clear
972
	buf2d_draw dd sz_buf2d_draw
961
	buf2d_draw dd sz_buf2d_draw
973
	buf2d_delete dd sz_buf2d_delete
962
	buf2d_delete dd sz_buf2d_delete
974
	buf2d_line dd sz_buf2d_line
963
	buf2d_line dd sz_buf2d_line
975
	buf2d_rect_by_size dd sz_buf2d_rect_by_size
964
	buf2d_rect_by_size dd sz_buf2d_rect_by_size
976
	buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
965
	buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
977
	buf2d_circle dd sz_buf2d_circle
966
	buf2d_circle dd sz_buf2d_circle
978
	buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
967
	buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
979
	buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
968
	buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
980
	buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
969
	buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
981
	buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
970
	buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
982
	buf2d_bit_blt dd sz_buf2d_bit_blt
971
	buf2d_bit_blt dd sz_buf2d_bit_blt
983
	buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
972
	buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
984
	buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
973
	buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
985
	buf2d_curve_bezier dd sz_buf2d_curve_bezier
974
	buf2d_curve_bezier dd sz_buf2d_curve_bezier
986
	buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
975
	buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
987
	buf2d_draw_text dd sz_buf2d_draw_text
976
	buf2d_draw_text dd sz_buf2d_draw_text
988
	buf2d_crop_color dd sz_buf2d_crop_color
977
	buf2d_crop_color dd sz_buf2d_crop_color
989
	buf2d_offset_h dd sz_buf2d_offset_h
978
	buf2d_offset_h dd sz_buf2d_offset_h
990
	buf2d_flood_fill dd sz_buf2d_flood_fill
979
	buf2d_flood_fill dd sz_buf2d_flood_fill
991
	buf2d_set_pixel dd sz_buf2d_set_pixel
980
	buf2d_set_pixel dd sz_buf2d_set_pixel
992
	dd 0,0
981
	dd 0,0
993
	sz_init db 'lib_init',0
982
	sz_init db 'lib_init',0
994
	sz_buf2d_create db 'buf2d_create',0
983
	sz_buf2d_create db 'buf2d_create',0
995
	sz_buf2d_create_f_img db 'buf2d_create_f_img',0
984
	sz_buf2d_create_f_img db 'buf2d_create_f_img',0
996
	sz_buf2d_clear db 'buf2d_clear',0
985
	sz_buf2d_clear db 'buf2d_clear',0
997
	sz_buf2d_draw db 'buf2d_draw',0
986
	sz_buf2d_draw db 'buf2d_draw',0
998
	sz_buf2d_delete db 'buf2d_delete',0
987
	sz_buf2d_delete db 'buf2d_delete',0
999
	sz_buf2d_line db 'buf2d_line',0
988
	sz_buf2d_line db 'buf2d_line',0
1000
	sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0
989
	sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0
1001
	sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
990
	sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
1002
	sz_buf2d_circle db 'buf2d_circle',0
991
	sz_buf2d_circle db 'buf2d_circle',0
1003
	sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0
992
	sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0
1004
	sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0
993
	sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0
1005
	sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
994
	sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
1006
	sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0
995
	sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0
1007
	sz_buf2d_bit_blt db 'buf2d_bit_blt',0
996
	sz_buf2d_bit_blt db 'buf2d_bit_blt',0
1008
	sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
997
	sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
1009
	sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
998
	sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
1010
	sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0
999
	sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0
1011
	sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
1000
	sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
1012
	sz_buf2d_draw_text db 'buf2d_draw_text',0
1001
	sz_buf2d_draw_text db 'buf2d_draw_text',0
1013
	sz_buf2d_crop_color db 'buf2d_crop_color',0
1002
	sz_buf2d_crop_color db 'buf2d_crop_color',0
1014
	sz_buf2d_offset_h db 'buf2d_offset_h',0
1003
	sz_buf2d_offset_h db 'buf2d_offset_h',0
1015
	sz_buf2d_flood_fill db 'buf2d_flood_fill',0
1004
	sz_buf2d_flood_fill db 'buf2d_flood_fill',0
1016
	sz_buf2d_set_pixel db 'buf2d_set_pixel',0
1005
	sz_buf2d_set_pixel db 'buf2d_set_pixel',0
1017
 
1006
 
1018
;--------------------------------------------------
1007
;--------------------------------------------------
1019
align 4
1008
align 4
1020
import_lib_tinygl:
1009
import_lib_tinygl:
1021
 
1010
 
1022
macro E_LIB n
1011
macro E_LIB n
1023
{
1012
{
1024
	n dd sz_#n
1013
	n dd sz_#n
1025
}
1014
}
1026
include '../../../../programs/develop/libraries/TinyGL/asm_fork/export.inc'
1015
include '../../../develop/libraries/TinyGL/asm_fork/export.inc'
1027
	dd 0,0
1016
	dd 0,0
1028
macro E_LIB n
1017
macro E_LIB n
1029
{
1018
{
1030
	sz_#n db `n,0
1019
	sz_#n db `n,0
1031
}
1020
}
1032
include '../../../../programs/develop/libraries/TinyGL/asm_fork/export.inc'
1021
include '../../../develop/libraries/TinyGL/asm_fork/export.inc'
1033
 
1022
 
1034
last_time dd 0
1023
last_time dd 0
1035
 
1024
 
1036
align 4
1025
align 4
1037
buf_0: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
1026
buf_0: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
1038
	dw 530 ;+4 left
1027
	dw 530 ;+4 left
1039
	dw 30 ;+6 top
1028
	dw 30 ;+6 top
1040
.w: dd 256 ;+8 w
1029
.w: dd 256 ;+8 w
1041
.h: dd 512 ;+12 h
1030
.h: dd 512 ;+12 h
1042
.color: dd 0xffffd0 ;+16 color
1031
.color: dd 0xffffd0 ;+16 color
1043
	db 24 ;+20 bit in pixel
1032
	db 24 ;+20 bit in pixel
1044
 
1033
 
1045
align 4
1034
align 4
1046
buf_1: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
1035
buf_1: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
1047
	dw 0 ;+4 left
1036
	dw 0 ;+4 left
1048
	dw 0 ;+6 top
1037
	dw 0 ;+6 top
1049
.w: dd 512 ;+8 w
1038
.w: dd 512 ;+8 w
1050
.h: dd 512 ;+12 h
1039
.h: dd 512 ;+12 h
1051
.color: dd 0xffffff ;+16 color
1040
.color: dd 0xffffff ;+16 color
1052
	db 24 ;+20 bit in pixel
1041
	db 24 ;+20 bit in pixel
1053
 
-
 
1054
align 4
-
 
1055
ctx1 db 28 dup (0) ;TinyGLContext or KOSGLContext
-
 
1056
;sizeof.TinyGLContext = 28
-
 
1057
 
1042
 
1058
scale dd 1.414213562
1043
scale dd 1.414213562
1059
angle_x dd 0.0
1044
angle_x dd 0.0
1060
angle_y dd 0.0
1045
angle_y dd 0.0
1061
angle_z dd 0.0
1046
angle_z dd 0.0
1062
delt_size dd 3.0
1047
delt_size dd 3.0
1063
mouse_drag dd 0 ;०¨¬ ¯®¢®à®â  áæ¥­ë ®â ¯¥à¥¬¥é¥­¨¨ ªãàá®à  ¬ëè¨
-
 
1064
mouse_x dd 0
-
 
1065
mouse_y dd 0
-
 
1066
angle_dxm dd 2.8444 ;~ 3d_wnd_w/180 - ¯à¨¡ ¢«¥­¨¥ 㣫®¢ ¯®¢®à®â  áæ¥­ë ¯à¨ ¢à é¥­¨¨ ¬ë襩
1048
angle_dxm dd 2.8444 ;~ 3d_wnd_w/180 - ¯à¨¡ ¢«¥­¨¥ 㣫®¢ ¯®¢®à®â  áæ¥­ë ¯à¨ ¢à é¥­¨¨ ¬ë襩
1067
angle_dym dd 2.8444 ;~ 3d_wnd_h/180
1049
angle_dym dd 2.8444 ;~ 3d_wnd_h/180
1068
 
1050
 
1069
opt_light dw 0 ;®¯æ¨ï ¤«ï ¢ª«î祭¨ï/¢ëª«î祭¨ï ᢥâ 
1051
opt_light dw 0 ;®¯æ¨ï ¤«ï ¢ª«î祭¨ï/¢ëª«î祭¨ï ᢥâ 
1070
opt_cube_box dw 1 ;®¯æ¨ï ¤«ï à¨á®¢ ­¨ï à ¬ª¨ ¢®ªà㣠®¡ê¥ªâ 
1052
opt_cube_box dw 1 ;®¯æ¨ï ¤«ï à¨á®¢ ­¨ï à ¬ª¨ ¢®ªà㣠®¡ê¥ªâ 
1071
opt_auto_rotate dw 0 ;®¯æ¨ï ¤«ï  ¢â®¬ â¨ç¥áª®£® ¯®¢®à®â  ®¡ê¥ªâ 
1053
opt_auto_rotate dw 0 ;®¯æ¨ï ¤«ï  ¢â®¬ â¨ç¥áª®£® ¯®¢®à®â  ®¡ê¥ªâ 
1072
 
1054
 
1073
light_position dd 0.0, 0.0, 2.0, 1.0 ;  á¯®«®¦¥­¨¥ ¨áâ®ç­¨ª  [0][1][2]
1055
light_position dd 0.0, 0.0, 2.0, 1.0 ;  á¯®«®¦¥­¨¥ ¨áâ®ç­¨ª  [0][1][2]
1074
	;[3] = (0.0 - ¡¥áª®­¥ç­® 㤠«¥­­ë© ¨áâ®ç­¨ª, 1.0 - ¨áâ®ç­¨ª á¢¥â  ­  ®¯à¥¤¥«¥­­®¬ à ááâ®ï­¨¨)
1056
	;[3] = (0.0 - ¡¥áª®­¥ç­® 㤠«¥­­ë© ¨áâ®ç­¨ª, 1.0 - ¨áâ®ç­¨ª á¢¥â  ­  ®¯à¥¤¥«¥­­®¬ à ááâ®ï­¨¨)
1075
light_dir dd 0.0,0.0,0.0 ;­ ¯à ¢«¥­¨¥ « ¬¯ë
1057
light_dir dd 0.0,0.0,0.0 ;­ ¯à ¢«¥­¨¥ « ¬¯ë
1076
 
1058
 
1077
mat_specular dd 0.3, 0.3, 0.3, 1.0 ; –¢¥â ¡«¨ª 
1059
mat_specular dd 0.3, 0.3, 0.3, 1.0 ; –¢¥â ¡«¨ª 
1078
mat_shininess dd 3.0 ;  §¬¥à ¡«¨ª  (®¡à â­ ï ¯à®¯®àæ¨ï)
1060
mat_shininess dd 3.0 ;  §¬¥à ¡«¨ª  (®¡à â­ ï ¯à®¯®àæ¨ï)
1079
white_light dd 0.8, 0.8, 0.8, 1.0 ; –¢¥â ¨ ¨­â¥­á¨¢­®áâì ®á¢¥é¥­¨ï, £¥­¥à¨à㥬®£® ¨áâ®ç­¨ª®¬
1061
white_light dd 0.8, 0.8, 0.8, 1.0 ; –¢¥â ¨ ¨­â¥­á¨¢­®áâì ®á¢¥é¥­¨ï, £¥­¥à¨à㥬®£® ¨áâ®ç­¨ª®¬
1080
lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ;  à ¬¥âàë ä®­®¢®£® ®á¢¥é¥­¨ï
1062
lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ;  à ¬¥âàë ä®­®¢®£® ®á¢¥é¥­¨ï
1081
 
1063
 
1082
 
1064
 
1083
align 16
1065
align 16
1084
i_end:
1066
i_end:
-
 
1067
	ctx1 rb 28 ;sizeof.TinyGLContext = 28
-
 
1068
	mouse_drag dd 0 ;०¨¬ ¯®¢®à®â  áæ¥­ë ®â ¯¥à¥¬¥é¥­¨¨ ªãàá®à  ¬ëè¨
-
 
1069
	mouse_x dd 0
-
 
1070
	mouse_y dd 0
1085
	rb 4096
1071
	rb 4096
1086
stacktop:
1072
stacktop:
1087
	sys_path rb 1024
1073
	sys_path rb 1024
1088
	file_name rb 2048 
1074
	file_name rb 2048 
1089
	library_path rb 1024
1075
	library_path rb 1024
1090
	plugin_path rb 4096
1076
	plugin_path rb 4096
1091
	openfile_path rb 4096
1077
	openfile_path rb 4096
1092
	filename_area rb 256
1078
	filename_area rb 256
1093
	sc system_colors
1079
	sc system_colors
1094
	procinfo process_information
1080
	procinfo process_information
1095
	run_file_70 FileInfoBlock
1081
	run_file_70 FileInfoBlock
1096
mem:
1082
mem: