Subversion Repositories Kolibri OS

Rev

Rev 6200 | Rev 8174 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6200 Rev 7929
Line 1... Line 1...
1
use32
1
use32
2
	org 0x0
2
	org 0
3
	db 'MENUET01'
3
	db 'MENUET01'
4
	dd 1,start,i_end,mem,stacktop,0,cur_dir_path
4
	dd 1,start,i_end,mem,stacktop,0,cur_dir_path
Line 5... Line 5...
5
 
5
 
6
include '../../../../../proc32.inc'
6
include '../../../../../proc32.inc'
Line 110... Line 110...
110
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
110
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
111
	mcall ,,,(65 shl 16)+5 ;масштаб +
111
	mcall ,,,(65 shl 16)+5 ;масштаб +
112
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
112
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
113
	mcall ,,,(95 shl 16)+5 ;масштаб -
113
	mcall ,,,(95 shl 16)+5 ;масштаб -
Line 114... Line 114...
114
 
114
 
115
	stdcall [kosglSwapBuffers]
115
	call [kosglSwapBuffers]
116
	mcall SF_REDRAW,SSF_END_DRAW
116
	mcall SF_REDRAW,SSF_END_DRAW
117
	popad
117
	popad
Line 118... Line 118...
118
	ret
118
	ret
Line 144... Line 144...
144
		fstp qword[Data_Double]
144
		fstp qword[Data_Double]
145
		call DoubleFloat_to_String
145
		call DoubleFloat_to_String
146
		mov byte[txt_angle_y.v],0
146
		mov byte[txt_angle_y.v],0
147
		stdcall str_cat, txt_angle_y.v,Data_String
147
		stdcall str_cat, txt_angle_y.v,Data_String
148
		call draw_3d
148
		call draw_3d
149
		stdcall [kosglSwapBuffers]
149
		call [kosglSwapBuffers]
150
	@@:
150
	@@:
151
	cmp ah,177 ;Down
151
	cmp ah,177 ;Down
152
	jne @f
152
	jne @f
153
		finit
153
		finit
154
		fld dword[angle_y]
154
		fld dword[angle_y]
Line 158... Line 158...
158
		fstp qword[Data_Double]
158
		fstp qword[Data_Double]
159
		call DoubleFloat_to_String
159
		call DoubleFloat_to_String
160
		mov byte[txt_angle_y.v],0
160
		mov byte[txt_angle_y.v],0
161
		stdcall str_cat, txt_angle_y.v,Data_String
161
		stdcall str_cat, txt_angle_y.v,Data_String
162
		call draw_3d
162
		call draw_3d
163
		stdcall [kosglSwapBuffers]
163
		call [kosglSwapBuffers]
164
	@@:
164
	@@:
165
	cmp ah,176 ;Left
165
	cmp ah,176 ;Left
166
	jne @f
166
	jne @f
167
		finit
167
		finit
168
		fld dword[angle_z]
168
		fld dword[angle_z]
Line 172... Line 172...
172
		fstp qword[Data_Double]
172
		fstp qword[Data_Double]
173
		call DoubleFloat_to_String
173
		call DoubleFloat_to_String
174
		mov byte[txt_angle_z.v],0
174
		mov byte[txt_angle_z.v],0
175
		stdcall str_cat, txt_angle_z.v,Data_String
175
		stdcall str_cat, txt_angle_z.v,Data_String
176
		call draw_3d
176
		call draw_3d
177
		stdcall [kosglSwapBuffers]
177
		call [kosglSwapBuffers]
178
	@@:
178
	@@:
179
	cmp ah,179 ;Right
179
	cmp ah,179 ;Right
180
	jne @f
180
	jne @f
181
		finit
181
		finit
182
		fld dword[angle_z]
182
		fld dword[angle_z]
Line 186... Line 186...
186
		fstp qword[Data_Double]
186
		fstp qword[Data_Double]
187
		call DoubleFloat_to_String
187
		call DoubleFloat_to_String
188
		mov byte[txt_angle_z.v],0
188
		mov byte[txt_angle_z.v],0
189
		stdcall str_cat, txt_angle_z.v,Data_String
189
		stdcall str_cat, txt_angle_z.v,Data_String
190
		call draw_3d
190
		call draw_3d
191
		stdcall [kosglSwapBuffers]
191
		call [kosglSwapBuffers]
192
	@@:
192
	@@:
Line 193... Line 193...
193
 
193
 
Line 194... Line 194...
194
	jmp still
194
	jmp still
Line 225... Line 225...
225
 
225
 
226
align 4
226
align 4
227
but_dr_0:
227
but_dr_0:
228
	mov dword[dr_figure],0
228
	mov dword[dr_figure],0
229
	call draw_3d
229
	call draw_3d
230
	stdcall [kosglSwapBuffers]
230
	call [kosglSwapBuffers]
Line 231... Line 231...
231
	ret
231
	ret
232
 
232
 
233
align 4
233
align 4
234
but_dr_1:
234
but_dr_1:
235
	mov dword[dr_figure],1
235
	mov dword[dr_figure],1
236
	call draw_3d
236
	call draw_3d
Line 237... Line 237...
237
	stdcall [kosglSwapBuffers]
237
	call [kosglSwapBuffers]
238
	ret
238
	ret
239
 
239
 
Line 255... Line 255...
255
	fstp qword[Data_Double]
255
	fstp qword[Data_Double]
256
	call DoubleFloat_to_String
256
	call DoubleFloat_to_String
257
	mov byte[txt_scale.v],0
257
	mov byte[txt_scale.v],0
258
	stdcall str_cat, txt_scale.v,Data_String
258
	stdcall str_cat, txt_scale.v,Data_String
259
	call draw_3d
259
	call draw_3d
260
	stdcall [kosglSwapBuffers]
260
	call [kosglSwapBuffers]
261
	ret
261
	ret
Line 262... Line 262...
262
 
262
 
263
align 4
263
align 4
264
but_zoom_m:
264
but_zoom_m:
Line 278... Line 278...
278
	fstp qword[Data_Double]
278
	fstp qword[Data_Double]
279
	call DoubleFloat_to_String
279
	call DoubleFloat_to_String
280
	mov byte[txt_scale.v],0
280
	mov byte[txt_scale.v],0
281
	stdcall str_cat, txt_scale.v,Data_String
281
	stdcall str_cat, txt_scale.v,Data_String
282
	call draw_3d
282
	call draw_3d
283
	stdcall [kosglSwapBuffers]
283
	call [kosglSwapBuffers]
284
	ret
284
	ret
Line 285... Line 285...
285
 
285
 
286
align 4
286
align 4
287
caption db 'Test textures, [Esc] - exit, [<-],[->],[Up],[Down] - rotate',0
-
 
288
align 4
-
 
289
ctx1 db 28 dup (0) ;TinyGLContext or KOSGLContext
-
 
Line 290... Line 287...
290
;sizeof.TinyGLContext = 28
287
caption db 'Test textures, [Esc] - exit, [<-],[->],[Up],[Down] - rotate',0
291
 
288
 
292
align 4
289
align 4
Line 385... Line 382...
385
	stdcall [buf2d_draw_text], buf_ogl, buf_1,txt_scale,5,5,0xffff00
382
	stdcall [buf2d_draw_text], buf_ogl, buf_1,txt_scale,5,5,0xffff00
386
	stdcall [buf2d_draw_text], buf_ogl, buf_1,txt_angle_z,5,15,0xffff00
383
	stdcall [buf2d_draw_text], buf_ogl, buf_1,txt_angle_z,5,15,0xffff00
387
	stdcall [buf2d_draw_text], buf_ogl, buf_1,txt_angle_y,5,25,0xffff00
384
	stdcall [buf2d_draw_text], buf_ogl, buf_1,txt_angle_y,5,25,0xffff00
388
	ret
385
	ret
Line 389... Line -...
389
 
-
 
390
dr_figure dd 0
-
 
391
qObj dd 0
-
 
392
TexObj dd 0 ;массив указателей на текстуры (в данном случае 1 шт.)
-
 
393
texture dd 0 ;указатель на память с текстурой
-
 
394
text_w dd 0
-
 
395
text_h dd 0
-
 
396
 
386
 
397
scale dd 0.4 ;начальный масштаб
387
scale dd 0.4 ;начальный масштаб
398
sc_delt dd 0.05 ;изменение масштаба при нажатии
388
sc_delt dd 0.05 ;изменение масштаба при нажатии
399
sc_min dd 0.1 ;минимальный масштаб
389
sc_min dd 0.1 ;минимальный масштаб
400
sc_max dd 1.1 ;максимальный масштаб
390
sc_max dd 1.1 ;максимальный масштаб
Line 532... Line 522...
532
lib_name_0 db 'tinygl.obj',0
522
lib_name_0 db 'tinygl.obj',0
533
system_dir_1 db '/sys/lib/'
523
system_dir_1 db '/sys/lib/'
534
lib_name_1 db 'buf2d.obj',0
524
lib_name_1 db 'buf2d.obj',0
535
system_dir_2 db '/sys/lib/'
525
system_dir_2 db '/sys/lib/'
536
lib_name_2 db 'libimg.obj',0
526
lib_name_2 db 'libimg.obj',0
537
err_msg_found_lib_0 db 'Sorry I cannot load library ',39,'tinygl.obj',39,0
527
err_msg_found_lib_0 db 'Sorry I cannot load library ',39,'tinygl.obj',39,'" -tE',0
538
err_msg_found_lib_1 db 'Sorry I cannot load library ',39,'buf2d.obj',39,0
528
err_msg_found_lib_1 db 'Sorry I cannot load library ',39,'buf2d.obj',39,'" -tE',0
539
err_msg_found_lib_2 db 'Sorry I cannot load library ',39,'libimg.obj',39,0
529
err_msg_found_lib_2 db 'Sorry I cannot load library ',39,'libimg.obj',39,'" -tE',0
540
head_f_i:
530
head_f_i:
541
head_f_l db 'System error',0
531
head_f_l db '"System error',0
542
err_msg_import_0 db 'Error on load import library ',39,'tinygl.obj',39,0
532
err_msg_import_0 db 'Error on load import library ',39,'tinygl.obj',39,'" -tE',0
543
err_msg_import_1 db 'Error on load import library ',39,'buf2d.obj',39,0
533
err_msg_import_1 db 'Error on load import library ',39,'buf2d.obj',39,'" -tE',0
544
err_msg_import_2 db 'Error on load import library ',39,'libimg.obj',39,0
534
err_msg_import_2 db 'Error on load import library ',39,'libimg.obj',39,'" -tE',0
545
;--------------------------------------------------
535
;--------------------------------------------------
Line 546... Line 536...
546
 
536
 
547
txt_scale:
537
txt_scale:
548
db 'Scale: '
538
db 'Scale: '
Line 587... Line 577...
587
		err_msg_found_lib_2, head_f_l, import_libimg, err_msg_import_2, head_f_i
577
		err_msg_found_lib_2, head_f_l, import_libimg, err_msg_import_2, head_f_i
588
l_libs_end:
578
l_libs_end:
Line 589... Line 579...
589
 
579
 
590
align 4
580
align 4
-
 
581
i_end:
-
 
582
	ctx1 db 28 dup (0) ;TinyGLContext or KOSGLContext
-
 
583
	;sizeof.TinyGLContext = 28
-
 
584
	dr_figure dd 0
-
 
585
	qObj dd 0
-
 
586
	TexObj dd 0 ;массив указателей на текстуры (в данном случае 1 шт.)
-
 
587
	texture dd 0 ;указатель на память с текстурой
-
 
588
	text_w dd 0
591
i_end:
589
	text_h dd 0
592
	run_file_70 FileInfoBlock
590
	run_file_70 FileInfoBlock
593
	sc system_colors
591
	sc system_colors
594
align 16
592
align 16
595
	rb 4096
593
	rb 4096