2015-01-29 12:59:15 +01:00
use32
2018-03-22 21:19:26 +01:00
org 0
2015-01-29 12:59:15 +01:00
db 'MENUET01' ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> . <20> ᯮ<EFBFBD> <E1AFAE> 塞<EFBFBD> <EFA5AC> <EFBFBD> 䠩<> <E4A0A9> <20> ᥣ<EFBFBD> <E1A5A3> 8 <20> <> <EFBFBD> <EFBFBD>
2018-03-22 21:19:26 +01:00
dd 1 , start , i_end , mem , stacktop , openfile_path , sys_path
2015-01-29 12:59:15 +01:00
include '../../../../programs/macros.inc'
include '../../../../programs/proc32.inc'
2016-02-19 22:36:34 +01:00
include '../../../../programs/KOSfuncs.inc'
include '../../../../programs/load_img.inc'
2015-01-29 12:59:15 +01:00
include '../../../../programs/develop/libraries/TinyGL/asm_fork/opengl_const.inc'
include 'vox_3d.inc'
include '../trunk/str.inc'
@ use_library_mem mem.Alloc , mem.Free , mem.ReAlloc , dl l.Load
2018-03-22 21:19:26 +01:00
caption db 'Voxel viewer 22.03.18' , 0 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
2015-01-29 12:59:15 +01:00
2015-12-07 19:47:28 +01:00
3 d_wnd_l equ 5 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> tinygl <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <> <E1ABA5>
3 d_wnd_t equ 30 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> tinygl <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᢥ<> <E1A2A5> <EFBFBD>
3 d_wnd_w equ 512
3 d_wnd_h equ 512
2015-01-29 12:59:15 +01:00
IMAGE_TOOLBAR_ICON_SIZE equ 16 * 16 * 3
2015-02-11 15:28:00 +01:00
IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE * 10
2015-01-29 12:59:15 +01:00
image_data_toolbar dd 0
offs_zbuf_pbuf equ 24
align 4
start:
load_libraries l_libs_start , l_libs_end
;<3B> <EFBFBD> ઠ <20> <> <> 쪮 㤠筮 <20> <> <EFBFBD> 㧨<EFBFBD> <E3A7A8> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<EFBFBD>
mov ebp , lib_0
cmp dword [ ebp + ll_struc_size - 4 ], 0
jz @ f
2016-02-19 22:36:34 +01:00
mcall SF_TERMINATE_PROCESS
2015-01-29 12:59:15 +01:00
@ @ :
2016-02-19 22:36:34 +01:00
mcall SF_STYLE_SETTINGS , SS F_GET_COLORS , sc , si zeof.system_colors
mcall SF_SET_EVENTS_MASK , 0xC0000027
2015-01-29 12:59:15 +01:00
stdcall [ OpenDialog_Init ], OpenDialog_data ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> ⮢<EFBFBD> <E2AEA2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
stdcall [ buf2d_create ], buf_0 ;ᮧ<> <E1AEA7> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2018-03-22 21:19:26 +01:00
include_image_file 'toolbar_t.png' , image_data_toolbar ,,, 6 ;6 - for gray icons
2015-02-11 15:28:00 +01:00
mov eax ,[ image_data_toolbar ]
add eax , IMAGE_TOOLBAR_SIZE
stdcall img_to_gray , [ image_data_toolbar ], eax ,( IMAGE_TOOLBAR_SIZE ) / 3
2015-01-29 12:59:15 +01:00
2016-02-19 22:36:34 +01:00
mcall SF_SYSTEM_GET , SS F_TIME_COUNT
2015-01-29 12:59:15 +01:00
mov [ last_time ], eax
2015-12-07 19:47:28 +01:00
stdcall [ kosglMakeCurrent ], 3 d_wnd_l , 3 d_wnd_t , 3 d_wnd_w , 3 d_wnd_h , ctx1
2015-01-29 12:59:15 +01:00
stdcall [ glEnable ], GL_DEPTH_TEST
stdcall [ glEnable ], GL_NORMALIZE ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ଠ <EFBFBD> <E0ACA0> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 稭<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 䠪⮢
stdcall [ glClearColor ], 0.0 , 0.0 , 0.0 , 0.0
stdcall [ glShadeModel ], GL_SMOOTH
call but_new_file
2018-03-22 21:19:26 +01:00
;<3B> <EFBFBD> ઠ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD>
cmp dword [ openfile_path ], 0
je @ f
call but_open_file_cmd_lin
@ @ :
2015-01-29 12:59:15 +01:00
align 4
red_win:
call draw_window
align 4
still:
2016-02-19 22:36:34 +01:00
mcall SF_SYSTEM_GET , SS F_TIME_COUNT
2015-01-29 12:59:15 +01:00
mov ebx ,[ last_time ]
add ebx , 50 ;<3B> <> <EFBFBD> <EFBFBD> প<EFBFBD>
cmp ebx , eax
jge @ f
mov ebx , eax
@ @ :
sub ebx , eax
2016-02-19 22:36:34 +01:00
mcall SF_WAIT_EVENT_TIMEOUT
2015-01-29 12:59:15 +01:00
bt word [ opt_auto_rotate ], 0
jnc @ f
or eax , eax
jz timer_funct
@ @ :
cmp al , 1
jz red_win
cmp al , 2
jz key
cmp al , 3
jz button
2015-12-07 19:47:28 +01:00
cmp al , 6
jne @ f
call mouse
@ @ :
2015-01-29 12:59:15 +01:00
jmp still
align 4
timer_funct:
pushad
2016-02-19 22:36:34 +01:00
mcall SF_SYSTEM_GET , SS F_TIME_COUNT
2015-01-29 12:59:15 +01:00
mov [ last_time ], eax
;<3B> <> ⮬<EFBFBD> <E2AEAC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㣫<> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
fld dword [ angle_y ]
fsub dword [ delt_size ]
fstp dword [ angle_y ]
call draw_3d
stdcall [ kosglSwapBuffers ]
popad
jmp still
align 4
draw_window:
pushad
2016-02-19 22:36:34 +01:00
mcall SF_REDRAW , SS F_BEGIN_DRAW
2015-01-29 12:59:15 +01:00
; *** <20> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> (<28> 믮<EFBFBD> <EBAFAE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 1 ࠧ <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ᪥) ***
mov edx ,[ sc.work ]
or edx ,( 3 shl 24 ) + 0x30000000
2016-02-19 22:36:34 +01:00
mcall SF_CREATE_WINDOW ,( 20 shl 16 ) + 800 ,( 20 shl 16 ) + 570 ,,, caption
2015-01-29 12:59:15 +01:00
; *** ᮧ<> <E1AEA7> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ***
2016-02-19 22:36:34 +01:00
mcall SF_DEFINE_BUTTON ,( 5 shl 16 ) + 20 ,( 5 shl 16 ) + 20 , 3 ,[ sc.work_button ]
2015-01-29 12:59:15 +01:00
mov ebx ,( 30 shl 16 ) + 20
mov edx , 4
int 0x40
add ebx , 25 shl 16
mov edx , 5
int 0x40
add ebx , 30 shl 16
mov edx , 6
int 0x40
add ebx , 25 shl 16
mov edx , 7
int 0x40
add ebx , 25 shl 16
mov edx , 8
int 0x40
add ebx , 25 shl 16
mov edx , 9
int 0x40
add ebx , 25 shl 16
mov edx , 10
int 0x40
add ebx , 25 shl 16
mov edx , 11
int 0x40
add ebx , 25 shl 16
mov edx , 12
int 0x40
2015-02-11 15:28:00 +01:00
call draw_toolbar_i
stdcall [ buf2d_draw ], buf_0
stdcall [ kosglSwapBuffers ]
2016-02-19 22:36:34 +01:00
mcall SF_REDRAW , SS F_END_DRAW
2015-02-11 15:28:00 +01:00
popad
ret
align 4
draw_toolbar_i:
2015-01-29 12:59:15 +01:00
; *** <20> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ***
mov edx ,( 7 shl 16 ) + 7 ;icon new
2016-02-19 22:36:34 +01:00
mcall SF_PUT_IMAGE ,[ image_data_toolbar ],( 16 shl 16 ) + 16
2015-01-29 12:59:15 +01:00
add ebx , IMAGE_TOOLBAR_ICON_SIZE
add edx ,( 25 shl 16 ) ;icon open
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
add edx ,( 25 shl 16 ) ;icon save
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
add edx ,( 30 shl 16 ) ;zoom +
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
add edx ,( 25 shl 16 ) ;zoom -
int 0x40
2015-02-11 15:28:00 +01:00
2015-01-29 12:59:15 +01:00
add ebx , IMAGE_TOOLBAR_ICON_SIZE
2015-02-11 15:28:00 +01:00
cmp word [ opt_light ], 0
jne @ f
add ebx , IMAGE_TOOLBAR_SIZE ;make gray icon
@ @ :
2015-01-29 12:59:15 +01:00
add edx ,( 25 shl 16 ) ;light on/off
int 0x40
2015-02-11 15:28:00 +01:00
cmp word [ opt_light ], 0
jne @ f
sub ebx , IMAGE_TOOLBAR_SIZE
@ @ :
2015-01-29 12:59:15 +01:00
add ebx , IMAGE_TOOLBAR_ICON_SIZE
2015-02-11 15:28:00 +01:00
cmp word [ opt_cube_box ], 0
jne @ f
add ebx , IMAGE_TOOLBAR_SIZE ;make gray icon
@ @ :
2015-01-29 12:59:15 +01:00
add edx ,( 25 shl 16 ) ;box on/off
int 0x40
2015-02-11 15:28:00 +01:00
cmp word [ opt_cube_box ], 0
jne @ f
sub ebx , IMAGE_TOOLBAR_SIZE
@ @ :
2015-01-29 12:59:15 +01:00
add ebx , IMAGE_TOOLBAR_ICON_SIZE
2015-02-11 15:28:00 +01:00
cmp word [ opt_auto_rotate ], 0
jne @ f
add ebx , IMAGE_TOOLBAR_SIZE ;make gray icon
@ @ :
2015-01-29 12:59:15 +01:00
add edx ,( 25 shl 16 ) ;auto rotate on/off
int 0x40
2015-02-11 15:28:00 +01:00
cmp word [ opt_auto_rotate ], 0
jne @ f
sub ebx , IMAGE_TOOLBAR_SIZE
@ @ :
2015-01-29 12:59:15 +01:00
add ebx , IMAGE_TOOLBAR_ICON_SIZE
add edx ,( 25 shl 16 ) ;info voxels
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
add edx ,( 25 shl 16 ) ;refresh
int 0x40
ret
align 4
key:
2016-02-19 22:36:34 +01:00
mcall SF_GET_KEY
2015-01-29 12:59:15 +01:00
cmp ah , 178 ;Up
jne @ f
2015-02-11 15:28:00 +01:00
fld dword [ angle_x ]
2015-01-29 12:59:15 +01:00
fadd dword [ delt_size ]
2015-02-11 15:28:00 +01:00
fstp dword [ angle_x ]
2015-01-29 12:59:15 +01:00
call draw_3d
stdcall [ kosglSwapBuffers ]
@ @ :
cmp ah , 177 ;Down
jne @ f
2015-02-11 15:28:00 +01:00
fld dword [ angle_x ]
2015-01-29 12:59:15 +01:00
fsub dword [ delt_size ]
2015-02-11 15:28:00 +01:00
fstp dword [ angle_x ]
2015-01-29 12:59:15 +01:00
call draw_3d
stdcall [ kosglSwapBuffers ]
@ @ :
cmp ah , 176 ;Left
jne @ f
2015-02-11 15:28:00 +01:00
fld dword [ angle_y ]
2015-01-29 12:59:15 +01:00
fadd dword [ delt_size ]
2015-02-11 15:28:00 +01:00
fstp dword [ angle_y ]
2015-01-29 12:59:15 +01:00
call draw_3d
stdcall [ kosglSwapBuffers ]
@ @ :
cmp ah , 179 ;Right
jne @ f
2015-02-11 15:28:00 +01:00
fld dword [ angle_y ]
2015-01-29 12:59:15 +01:00
fsub dword [ delt_size ]
2015-02-11 15:28:00 +01:00
fstp dword [ angle_y ]
2015-01-29 12:59:15 +01:00
call draw_3d
stdcall [ kosglSwapBuffers ]
@ @ :
jmp still
2015-12-07 19:47:28 +01:00
align 4
mouse:
push eax ebx
2016-02-19 22:36:34 +01:00
mcall SF_MOUSE_GET , SS F_BUTTON_EXT
2015-12-07 19:47:28 +01:00
bt eax , 0
jnc .end_m
;mouse l. but. move
cmp dword [ mouse_drag ], 1
jne .end_m
2016-02-19 22:36:34 +01:00
mcall SF_MOUSE_GET , SS F_WINDOW_POSITION
2015-12-07 19:47:28 +01:00
mov ebx , eax
shr ebx , 16 ;mouse.x
cmp ebx , 3 d_wnd_l
jg @ f
mov ebx , 3 d_wnd_l
@ @ :
sub ebx , 3 d_wnd_l
cmp ebx , 3 d_wnd_w
jle @ f
mov ebx , 3 d_wnd_w
@ @ :
and eax , 0xffff ;mouse.y
cmp eax , 3 d_wnd_t
jg @ f
mov eax , 3 d_wnd_t
@ @ :
sub eax , 3 d_wnd_t
cmp eax , 3 d_wnd_h
jle @ f
mov eax , 3 d_wnd_h
@ @ :
finit
fild dword [ mouse_y ]
mov [ mouse_y ], eax
fisub dword [ mouse_y ]
fdiv dword [ angle_dxm ] ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> y (<28> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ) <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> x
fadd dword [ angle_x ]
fstp dword [ angle_x ]
fild dword [ mouse_x ]
mov [ mouse_x ], ebx
fisub dword [ mouse_x ]
fdiv dword [ angle_dym ] ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> x (<28> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ) <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> y
fadd dword [ angle_y ]
fstp dword [ angle_y ]
call draw_3d
stdcall [ kosglSwapBuffers ]
jmp .end_d
.end_m:
bt eax , 16
jnc @ f
;mouse l. but. up
mov dword [ mouse_drag ], 0
jmp .end_d
@ @ :
bt eax , 8
jnc .end_d
;mouse l. but. press
2016-02-19 22:36:34 +01:00
mcall SF_MOUSE_GET , SS F_WINDOW_POSITION
2015-12-07 19:47:28 +01:00
mov ebx , eax
shr ebx , 16 ;mouse.x
cmp ebx , 3 d_wnd_l
jl .end_d
sub ebx , 3 d_wnd_l
cmp ebx , 3 d_wnd_w
jg .end_d
and eax , 0xffff ;mouse.y
cmp eax , 3 d_wnd_t
jl .end_d
sub eax , 3 d_wnd_t
cmp eax , 3 d_wnd_h
jg .end_d
mov dword [ mouse_drag ], 1
mov dword [ mouse_x ], ebx
mov dword [ mouse_y ], eax
.end_d:
;stdcall [kmainmenu_dispatch_cursorevent], [main_menu]
pop ebx eax
ret
2015-01-29 12:59:15 +01:00
align 4
button:
2016-02-19 22:36:34 +01:00
mcall SF_GET_BUTTON
2015-01-29 12:59:15 +01:00
cmp ah , 3
jne @ f
call but_new_file
@ @ :
cmp ah , 4
jne @ f
call but_open_file
@ @ :
cmp ah , 5
jne @ f
call but_save_file
@ @ :
cmp ah , 6
jne @ f
call but_zoom_p
@ @ :
cmp ah , 7
jne @ f
call but_zoom_m
@ @ :
cmp ah , 8
jne @ f
call but_3
@ @ :
cmp ah , 9
jne @ f
call but_4
@ @ :
cmp ah , 10
jne @ f
call but_5
@ @ :
cmp ah , 11
jne @ f
call but_6
@ @ :
cmp ah , 12
jne @ f
2015-02-11 15:28:00 +01:00
call but_draw_cadr
2015-01-29 12:59:15 +01:00
@ @ :
cmp ah , 1
jne still
.exit:
stdcall [ buf2d_delete ], buf_0
stdcall mem.Free ,[ image_data_toolbar ]
stdcall mem.Free ,[ open_file_data ]
stdcall mem.Free ,[ open_file_ogl ]
2016-02-19 22:36:34 +01:00
mcall SF_TERMINATE_PROCESS
2015-01-29 12:59:15 +01:00
align 4
but_new_file:
2015-02-17 16:54:14 +01:00
mov dword [ angle_x ], - 30.0
2015-02-11 15:28:00 +01:00
mov dword [ angle_y ], 180.0
mov dword [ angle_z ], 180.0
2015-01-29 12:59:15 +01:00
ret
align 4
open_file_data dd 0 ;㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 䠩<> <E4A0A9> <EFBFBD>
open_file_size dd 0 ;ࠧ<> <E0A0A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ⮣<EFBFBD> 䠩<> <E4A0A9>
open_file_ogl dd 0 ;<3B> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <20> ࠭<EFBFBD> <E0A0AD> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> opengl
v_zoom dd 0
align 4
but_open_file:
pushad
copy_path open_dialog_name , communication_area_default_path , file_name , 0
mov [ OpenDialog_data.type ], 0
stdcall [ OpenDialog_Start ], OpenDialog_data
cmp [ OpenDialog_data.status ], 2
2018-03-22 21:19:26 +01:00
je @ f
;<3B> <> <EFBFBD> <20> <> <EFBFBD> 㤠筮<E3A4A0> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ⨨ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
call but_open_file_cmd_lin
@ @ :
popad
ret
2015-01-29 12:59:15 +01:00
2018-03-22 21:19:26 +01:00
align 4
but_open_file_cmd_lin:
pushad
2016-02-19 22:36:34 +01:00
mov [ run_file_70.Function ], SS F_GET_INFO
2015-01-29 12:59:15 +01:00
mov [ run_file_70.Position ], 0
mov [ run_file_70.Flags ], 0
mov dword [ run_file_70.Count ], 0
mov dword [ run_file_70.Buffer ], open_b
mov byte [ run_file_70 + 20 ], 0
mov dword [ run_file_70.FileName ], openfile_path
2016-02-19 22:36:34 +01:00
mcall SF_FILE , run_file_70
2015-01-29 12:59:15 +01:00
mov ecx , dword [ open_b + 32 ] ;+32 qword: ࠧ<> <E0A0A7> <EFBFBD> 䠩<> <E4A0A9> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
stdcall mem.ReAlloc ,[ open_file_data ], ecx
mov [ open_file_data ], eax
2016-02-19 22:36:34 +01:00
mov [ run_file_70.Function ], SS F_READ_FILE
2015-01-29 12:59:15 +01:00
mov [ run_file_70.Position ], 0
mov [ run_file_70.Flags ], 0
mov dword [ run_file_70.Count ], ecx
m2m dword [ run_file_70.Buffer ], dword [ open_file_data ]
mov byte [ run_file_70 + 20 ], 0
mov dword [ run_file_70.FileName ], openfile_path
2016-02-19 22:36:34 +01:00
mcall SF_FILE , run_file_70
2015-01-29 12:59:15 +01:00
cmp ebx , 0xffffffff
je .end_open_file
mov [ open_file_size ], ebx
2016-02-19 22:36:34 +01:00
mcall SF_SET_CAPTION , 1 , openfile_path
2015-01-29 12:59:15 +01:00
mov eax ,[ open_file_data ]
movzx eax , byte [ eax ]
mov dword [ v_zoom ], eax ;<3B> <> ६ <20> <> <EFBFBD> <EFBFBD> ⠡ <20> <> 㬮<> 砭<EFBFBD> <E7A0AD>
mov ecx ,[ open_file_size ]
sub ecx , vox_offs_data
shr ecx , 2
imul ecx , vox_ogl_size
add ecx , 4 ;ecx = ࠧ<> <E0A0A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 室<EFBFBD> <E5AEA4> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> ᯠ<EFBFBD> <E1AFA0> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD>
stdcall mem.ReAlloc ,[ open_file_ogl ], ecx
or eax , eax
jz .end_open_file
mov [ open_file_ogl ], eax
stdcall buf_vox_obj_create_3d ,[ open_file_data ], eax , 0 , 0 ,[ v_zoom ]
call draw_cadr_8
.end_open_file:
popad
ret
;description:
; <20> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> 8-<2D> <> <20> <> <EFBFBD> <20> <> <EFBFBD> ࠧ<> 묨 㣫<> <E3A3AB> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
align 4
draw_cadr_8:
call but_new_file ;<3B> <> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> 㣫<> <E3A3AB> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 㬮<> 砭<EFBFBD> <E7A0AD>
stdcall [ buf2d_clear ], buf_0 , [ buf_0.color ] ;<3B> <> <EFBFBD> ⨬ <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> 8-<2D> <> <20> <> <EFBFBD>
fild dword [ rot_angles + 4 ]
fstp dword [ angle_y ]
call draw_3d
call draw_cadr
stdcall [ buf2d_bit_blt ], buf_0 , 128 , 0 , buf_1
fild dword [ rot_angles + 8 ]
fstp dword [ angle_y ]
call draw_3d
call draw_cadr
stdcall [ buf2d_bit_blt ], buf_0 , 0 , 128 , buf_1
fild dword [ rot_angles + 12 ]
fstp dword [ angle_y ]
call draw_3d
call draw_cadr
stdcall [ buf2d_bit_blt ], buf_0 , 128 , 128 , buf_1
fild dword [ rot_angles + 16 ]
fstp dword [ angle_y ]
call draw_3d
call draw_cadr
stdcall [ buf2d_bit_blt ], buf_0 , 0 , 256 , buf_1
fild dword [ rot_angles + 20 ]
fstp dword [ angle_y ]
call draw_3d
call draw_cadr
stdcall [ buf2d_bit_blt ], buf_0 , 128 , 256 , buf_1
fild dword [ rot_angles + 24 ]
fstp dword [ angle_y ]
call draw_3d
call draw_cadr
stdcall [ buf2d_bit_blt ], buf_0 , 0 , 384 , buf_1
fild dword [ rot_angles + 28 ]
fstp dword [ angle_y ]
call draw_3d
call draw_cadr
stdcall [ buf2d_bit_blt ], buf_0 , 128 , 384 , buf_1
; *** <20> <> <EFBFBD> <E1ABA5> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ***
fild dword [ rot_angles ]
fstp dword [ angle_y ]
call draw_3d
call draw_cadr
stdcall [ buf2d_bit_blt ], buf_0 , 0 , 0 , buf_1
call draw_3d
; ***
stdcall [ buf2d_draw ], buf_0 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> ࠭<EFBFBD>
ret
align 4
2015-02-11 15:28:00 +01:00
rot_angles dd 180 , 225 , 270 , 315 , 0 , 45 , 90 , 135
2015-01-29 12:59:15 +01:00
align 4
draw_cadr:
mov eax , dword [ ctx1 ] ;eax -> TinyGLContext.GLContext
mov eax ,[ eax ] ;eax -> ZBuffer
mov eax ,[ eax + offs_zbuf_pbuf ] ;eax -> ZBuffer.pbuf
mov dword [ buf_1 ], eax
mov dword [ buf_1.w ], 512
mov dword [ buf_1.h ], 512
stdcall [ buf2d_img_hdiv2 ], buf_1
mov dword [ buf_1.h ], 256
stdcall [ buf2d_img_hdiv2 ], buf_1
mov dword [ buf_1.h ], 128
stdcall [ buf2d_img_wdiv2 ], buf_1
mov dword [ buf_1.w ], 256
stdcall [ buf2d_img_wdiv2 ], buf_1
mov dword [ buf_1.w ], 128
ret
align 4
but_save_file:
pushad
copy_path open_dialog_name , communication_area_default_path , file_name , 0
mov [ OpenDialog_data.type ], 1
stdcall [ OpenDialog_Start ], OpenDialog_data
cmp [ OpenDialog_data.status ], 2
je .end_save_file
;<3B> <> <EFBFBD> <20> <> <EFBFBD> 㤠筮<E3A4A0> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ⨨ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2016-02-19 22:36:34 +01:00
mov [ run_file_70.Function ], SS F_CREATE_FILE
2015-01-29 12:59:15 +01:00
mov [ run_file_70.Position ], 0
mov [ run_file_70.Flags ], 0
mov ebx , dword [ open_file_data ]
;<3B> <> 襬 <20> 䠩<> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⠡
mov edx , dword [ v_zoom ]
mov byte [ ebx ], dl
mov [ run_file_70.Buffer ], ebx
mov ebx ,[ open_file_size ]
mov dword [ run_file_70.Count ], ebx ;ࠧ<> <E0A0A7> <EFBFBD> 䠩<> <E4A0A9>
mov byte [ run_file_70 + 20 ], 0
mov dword [ run_file_70.FileName ], openfile_path
2016-02-19 22:36:34 +01:00
mcall SF_FILE , run_file_70
2015-01-29 12:59:15 +01:00
;cmp ebx,0xffffffff
;je .end_save_file
; ... ᮮ<> 饭<EFBFBD> <E9A5AD> <20> <20> <> 㤠筮<E3A4A0> <20> <> <EFBFBD> ࠭<EFBFBD> <E0A0AD> <EFBFBD> <EFBFBD> ...
.end_save_file:
popad
ret
align 4
proc but_zoom_p uses eax
cmp dword [ v_zoom ], 11 ;max=2^11=2048
jge @ f
inc dword [ v_zoom ]
stdcall buf_vox_obj_create_3d ,[ open_file_data ],[ open_file_ogl ], 0 , 0 ,[ v_zoom ]
call draw_3d
stdcall [ kosglSwapBuffers ]
@ @ :
ret
endp
align 4
proc but_zoom_m uses eax
cmp dword [ v_zoom ], 1
jle @ f
dec dword [ v_zoom ]
stdcall buf_vox_obj_create_3d ,[ open_file_data ],[ open_file_ogl ], 0 , 0 ,[ v_zoom ]
call draw_3d
stdcall [ kosglSwapBuffers ]
@ @ :
ret
endp
align 4
2015-02-11 15:28:00 +01:00
proc but_3 uses eax ebx ecx edx
2015-01-29 12:59:15 +01:00
xor word [ opt_light ], 1
cmp word [ opt_light ], 0
je @ f
stdcall [ glEnable ], GL_LIGHTING
stdcall [ glEnable ], GL_LIGHT0
jmp .end_light
@ @ :
stdcall [ glDisable ], GL_LIGHTING
stdcall [ glDisable ], GL_LIGHT0
.end_light:
2015-02-11 15:28:00 +01:00
call draw_toolbar_i
2015-01-29 12:59:15 +01:00
call draw_3d
stdcall [ kosglSwapBuffers ]
ret
endp
align 4
2015-02-11 15:28:00 +01:00
proc but_4 uses eax ebx ecx edx
2015-01-29 12:59:15 +01:00
xor word [ opt_cube_box ], 1
2015-02-11 15:28:00 +01:00
call draw_toolbar_i
2015-01-29 12:59:15 +01:00
call draw_3d
stdcall [ kosglSwapBuffers ]
ret
endp
align 4
2015-02-11 15:28:00 +01:00
proc but_5 uses eax ebx ecx edx
2015-01-29 12:59:15 +01:00
xor word [ opt_auto_rotate ], 1
2015-02-11 15:28:00 +01:00
call draw_toolbar_i
2015-01-29 12:59:15 +01:00
ret
endp
align 4
proc but_6 uses eax ebx ecx edx edi
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <E1ABA5> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⨪<EFBFBD> <20> <> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
mov eax ,[ open_file_ogl ]
or eax , eax
jz .end_stat
mov ebx ,[ eax ]
mov ecx , ebx
mov edx , ebx
imul ebx , 6
add eax , 4
align 4
.cycle_0:
bt word [ eax + vox_ogl_planes ], vox_ogl_gran_z0
jc @ f
dec ebx
@ @ :
bt word [ eax + vox_ogl_planes ], vox_ogl_gran_z1
jc @ f
dec ebx
@ @ :
bt word [ eax + vox_ogl_planes ], vox_ogl_gran_y0
jc @ f
dec ebx
@ @ :
bt word [ eax + vox_ogl_planes ], vox_ogl_gran_y1
jc @ f
dec ebx
@ @ :
bt word [ eax + vox_ogl_planes ], vox_ogl_gran_x0
jc @ f
dec ebx
@ @ :
bt word [ eax + vox_ogl_planes ], vox_ogl_gran_x1
jc @ f
dec ebx
@ @ :
add eax , vox_ogl_size
loop .cycle_0
mov eax , edx
mov edi , txt_stat_m1.v
stdcall convert_int_to_str , 20
2015-12-07 19:47:28 +01:00
mov eax , ebx
mov edi , txt_stat_m2.v
stdcall convert_int_to_str , 20
2015-01-29 12:59:15 +01:00
2015-12-07 19:47:28 +01:00
stdcall str_n_cat , txt_stat_m1.v , txt_stat_m2 , 50
2015-01-29 12:59:15 +01:00
notify_window_run txt_stat_m1
.end_stat:
ret
endp
align 4
txt_stat_m1:
db '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⨪<EFBFBD> ' , 13 , 10 , '<27> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> : '
2015-12-07 19:47:28 +01:00
.v: rb 70
2015-01-29 12:59:15 +01:00
txt_stat_m2:
db 13 , 10 , '<27> ⮡ࠦ<E2AEA1> <E0A0A6> <EFBFBD> <EFBFBD> <EFBFBD> <20> ࠭<EFBFBD> <E0A0AD> : '
.v: rb 20
align 4
2015-02-11 15:28:00 +01:00
proc but_draw_cadr uses eax ebx ecx edx
mov ebx ,[ angle_x ]
mov ecx ,[ angle_y ]
mov edx ,[ angle_z ]
2015-01-29 12:59:15 +01:00
call draw_cadr_8
2015-02-11 15:28:00 +01:00
mov [ angle_x ], ebx
mov [ angle_y ], ecx
mov [ angle_z ], edx
cmp word [ opt_auto_rotate ], 0
jne @ f
call draw_3d
;stdcall [kosglSwapBuffers]
@ @ :
2015-01-29 12:59:15 +01:00
ret
endp
align 4
draw_3d:
stdcall [ glClear ], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;<3B> <> <EFBFBD> <EFBFBD> ⨬ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 梥<> <E6A2A5> <20> <20> <> 㡨<EFBFBD> <E3A1A8>
stdcall [ glPushMatrix ]
cmp word [ opt_light ], 0
je @ f
call SetLight
@ @ :
stdcall [ glTranslatef ], 0.0 , 0.0 , 0.5 ;<3B> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> z <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <20> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <20> <> 0.0 <20> <> 1.0, <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> 㤥<EFBFBD> <20> <> ᥪ<EFBFBD> <E1A5AA> <EFBFBD> <EFBFBD> <EFBFBD>
;<3B> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <EFBFBD> <EFBFBD> <20> <> ꥪ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <20> <> -0.5 <20> <> 0.5, <20> <> ⮬<EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> +0.5
;<3B> <> <20> <> <EFBFBD> <20> <> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ᥪ<EFBFBD> <E1A5AA> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뫥<EFBFBD> <EBABA5> <EFBFBD> <20> <> <20> ।<EFBFBD> <E0A5A4> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⥩ <20> <> <EFBFBD> <EFBFBD> 祭<EFBFBD> <E7A5AD>
;<3B> <20> <> <EFBFBD> ᨨ opengl <20> <> <EFBFBD> Win <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <> -1.0 <20> <> 1.0 <20> <> ⮬<EFBFBD> ⠬ <20> ⮣<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> 㦭<EFBFBD>
stdcall [ glScalef ], [ scale ], [ scale ], [ scale ] ;㢥<> <E3A2A5> 稢<EFBFBD> <E7A8A2> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <EFBFBD> <EFBFBD> <20> <> ꥪ<EFBFBD> , <20> <> <EFBFBD> -<2D> <> <20> <> <20> <> <EFBFBD> <20> 祭<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 쪨<EFBFBD>
2016-02-19 22:36:34 +01:00
stdcall [ glScalef ], 1.0 , 1.0 , 0.25 ;<3B> <> <EFBFBD> -<2D> <> <20> <> <EFBFBD> <EFBFBD> <20> <> ꥪ<EFBFBD> <EAA5AA> <20> <> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <EFBFBD> <20> <> <20> ࠭<EFBFBD> <20> <> <EFBFBD> <EFBFBD> 祭<EFBFBD> <E7A5AD>
2015-01-29 12:59:15 +01:00
stdcall [ glRotatef ], [ angle_x ], 1.0 , 0.0 , 0.0
2015-02-11 15:28:00 +01:00
stdcall [ glRotatef ], [ angle_y ], 0.0 , 1.0 , 0.0
2015-01-29 12:59:15 +01:00
stdcall [ glRotatef ], [ angle_z ], 0.0 , 0.0 , 1.0
stdcall draw_voxels_3d ,[ open_file_ogl ]
stdcall [ glPopMatrix ]
ret
align 4
proc SetLight
stdcall [ glLightfv ], GL_LIGHT0 , GL_POSITION , light_position
stdcall [ glLightfv ], GL_LIGHT0 , GL_SPOT_DIRECTION , light_dir
stdcall [ glLightfv ], GL_LIGHT0 , GL_DIFFUSE , white_light
stdcall [ glLightfv ], GL_LIGHT0 , GL_SPECULAR , white_light
stdcall [ glEnable ], GL_COLOR_MATERIAL
stdcall [ glColorMaterial ], GL_FRONT , GL_AMBIENT_AND_DIFFUSE
stdcall [ glMaterialfv ], GL_FRONT , GL_SPECULAR , mat_specular
stdcall [ glMaterialf ], GL_FRONT , GL_SHININESS , mat_shininess
stdcall [ glLightModelfv ], GL_LIGHT_MODEL_AMBIENT , lmodel_ambient
stdcall [ glEnable ], GL_LIGHTING
stdcall [ glEnable ], GL_LIGHT0
;;;stdcall [glLightModeli], GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE
ret
endp
align 4
2015-02-11 15:28:00 +01:00
proc img_to_gray , buf_rgb : dword , buf_g24 : dword , pixels : dword
pushad
mov esi ,[ buf_rgb ]
mov edi ,[ buf_g24 ]
mov ecx ,[ pixels ]
mov ebx , 3
align 4
2015-01-29 12:59:15 +01:00
@ @ :
2015-02-11 15:28:00 +01:00
movzx eax , byte [ esi ]
movzx edx , byte [ esi + 1 ]
add eax , edx
movzx edx , byte [ esi + 2 ]
add eax , edx
xor edx , edx
div ebx ;shr eax,2
mov ah , al
mov word [ edi ], ax
mov byte [ edi + 2 ], al
add esi , 3
add edi , 3
loop @ b
popad
2015-01-29 12:59:15 +01:00
ret
endp
2015-02-11 15:28:00 +01:00
2015-01-29 12:59:15 +01:00
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 䠩<> <E4A0A9> <EFBFBD>
align 4
OpenDialog_data:
.type dd 0 ;0 - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , 1 - <20> <> <EFBFBD> ࠭<EFBFBD> <E0A0AD> <EFBFBD> , 2 - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ४<EFBFBD> <E0A5AA> <EFBFBD> <EFBFBD> <EFBFBD>
.procinfo dd procinfo ;+4
.com_area_name dd communication_area_name ;+8
.com_area dd 0 ;+12
.opendir_path dd plugin_path ;+16
.dir_default_path dd default_dir ;+20
.start_path dd file_name ;+24 <20> <> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 䠩<> <E4A0A9> <EFBFBD>
.draw_window dd draw_window ;+28
.status dd 0 ;+32
.openfile_path dd openfile_path ;+36 <20> <> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> 뢠<EFBFBD> <EBA2A0> <EFBFBD> <EFBFBD> <EFBFBD> 䠩<> <E4A0A9>
.filename_area dd filename_area ;+40
.filter_area dd Filter
.x:
.x_size dw 420 ;+48 ; Window X size
.x_start dw 10 ;+50 ; Window X position
.y:
.y_size dw 320 ;+52 ; Window y size
.y_start dw 10 ;+54 ; Window Y position
default_dir db '/rd/1' , 0
communication_area_name:
db 'FFFFFFFF_open_dialog' , 0
open_dialog_name:
db 'opendial' , 0
communication_area_default_path:
db '/rd/1/File managers/' , 0
Filter:
dd Filter.end - Filter ;.1
.1:
db 'VOX' , 0
db 'TXT' , 0
.end:
db 0
head_f_i:
head_f_l db '<27> <> <EFBFBD> ⥬<EFBFBD> <E2A5AC> <EFBFBD> <20> 訡<EFBFBD> <E8A8A1> ' , 0
system_dir_0 db '/sys/lib/'
lib_name_0 db 'proc_lib.obj' , 0
err_message_found_lib_0 db '<27> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<EFBFBD> ' , 39 , 'proc_lib.obj' , 39 , 0
err_message_import_0 db '<27> 訡<EFBFBD> <E8A8A1> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<EFBFBD> ' , 39 , 'proc_lib.obj' , 39 , 0
system_dir_1 db '/sys/lib/'
lib_name_1 db 'libimg.obj' , 0
err_message_found_lib_1 db '<27> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<EFBFBD> ' , 39 , 'libimg.obj' , 39 , 0
err_message_import_1 db '<27> 訡<EFBFBD> <E8A8A1> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<EFBFBD> ' , 39 , 'libimg.obj' , 39 , 0
system_dir_2 db '/sys/lib/'
lib_name_2 db 'buf2d.obj' , 0
err_msg_found_lib_2 db '<27> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<EFBFBD> ' , 39 , 'buf2d.obj' , 39 , 0
err_msg_import_2 db '<27> 訡<EFBFBD> <E8A8A1> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<EFBFBD> ' , 39 , 'buf2d' , 39 , 0
2017-04-19 16:07:11 +02:00
system_dir_3 db '/sys/lib/'
2016-02-19 22:36:34 +01:00
lib_name_3 db 'tinygl.obj' , 0
err_msg_found_lib_3 db '<27> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<EFBFBD> ' , 39 , 'tinygl.obj' , 39 , 0
err_msg_import_3 db '<27> 訡<EFBFBD> <E8A8A1> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<EFBFBD> ' , 39 , 'tinygl' , 39 , 0
2015-01-29 12:59:15 +01:00
l_libs_start:
lib_0 l_libs lib_name_0 , sys_path , file_name , system_dir_0 , \
err_message_found_lib_0 , head_f_l , proclib_import , err_message_import_0 , head_f_i
lib_1 l_libs lib_name_1 , sys_path , file_name , system_dir_1 , \
err_message_found_lib_1 , head_f_l , import_libimg , err_message_import_1 , head_f_i
lib_2 l_libs lib_name_2 , sys_path , library_path , system_dir_2 , \
err_msg_found_lib_2 , head_f_l , import_buf2d , err_msg_import_2 , head_f_i
lib_3 l_libs lib_name_3 , sys_path , library_path , system_dir_3 , \
err_msg_found_lib_3 , head_f_l , import_lib_tinygl , err_msg_import_3 , head_f_i
l_libs_end:
align 4
import_libimg:
dd al ib_init1
img_is_img dd aimg_is_img
img_info dd aimg_info
img_from_file dd aimg_from_file
img_to_file dd aimg_to_file
img_from_rgb dd aimg_from_rgb
img_to_rgb dd aimg_to_rgb
img_to_rgb2 dd aimg_to_rgb2
img_decode dd aimg_decode
img_encode dd aimg_encode
img_create dd aimg_create
img_destroy dd aimg_destroy
img_destroy_layer dd aimg_destroy_layer
img_count dd aimg_count
img_lock_bits dd aimg_lock_bits
img_unlock_bits dd aimg_unlock_bits
img_flip dd aimg_flip
img_flip_layer dd aimg_flip_layer
img_rotate dd aimg_rotate
img_rotate_layer dd aimg_rotate_layer
img_draw dd aimg_draw
dd 0 , 0
alib_init1 db 'lib_init' , 0
aimg_is_img db 'img_is_img' , 0 ;<3B> <> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<EFBFBD> ᤥ<> <E1A4A5> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
aimg_info db 'img_info' , 0
aimg_from_file db 'img_from_file' , 0
aimg_to_file db 'img_to_file' , 0
aimg_from_rgb db 'img_from_rgb' , 0
aimg_to_rgb db 'img_to_rgb' , 0 ;<3B> ८<EFBFBD> ࠧ<EFBFBD> <E0A0A7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> RGB
aimg_to_rgb2 db 'img_to_rgb2' , 0
aimg_decode db 'img_decode' , 0 ;<3B> <> ⮬<EFBFBD> <E2AEAC> <EFBFBD> <EFBFBD> <EFBFBD> ᪨ <20> <> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ଠ <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᪨<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
aimg_encode db 'img_encode' , 0
aimg_create db 'img_create' , 0
aimg_destroy db 'img_destroy' , 0
aimg_destroy_layer db 'img_destroy_layer' , 0
aimg_count db 'img_count' , 0
aimg_lock_bits db 'img_lock_bits' , 0
aimg_unlock_bits db 'img_unlock_bits' , 0
aimg_flip db 'img_flip' , 0
aimg_flip_layer db 'img_flip_layer' , 0
aimg_rotate db 'img_rotate' , 0
aimg_rotate_layer db 'img_rotate_layer' , 0
aimg_draw db 'img_draw' , 0
align 4
proclib_import: ;<3B> <> <EFBFBD> ᠭ<EFBFBD> <E1A0AD> <20> <> ᯮ<EFBFBD> <E1AFAE> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> 㭪権
OpenDialog_Init dd aOpenDialog_Init
OpenDialog_Start dd aOpenDialog_Start
dd 0 , 0
aOpenDialog_Init db 'OpenDialog_init' , 0
aOpenDialog_Start db 'OpenDialog_start' , 0
align 4
import_buf2d:
init dd sz_init
buf2d_create dd sz_buf2d_create
buf2d_create_f_img dd sz_buf2d_create_f_img
buf2d_clear dd sz_buf2d_clear
buf2d_draw dd sz_buf2d_draw
buf2d_delete dd sz_buf2d_delete
buf2d_line dd sz_buf2d_line
buf2d_rect_by_size dd sz_buf2d_rect_by_size
buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
buf2d_circle dd sz_buf2d_circle
buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
buf2d_bit_blt dd sz_buf2d_bit_blt
buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
buf2d_curve_bezier dd sz_buf2d_curve_bezier
buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
buf2d_draw_text dd sz_buf2d_draw_text
buf2d_crop_color dd sz_buf2d_crop_color
buf2d_offset_h dd sz_buf2d_offset_h
buf2d_flood_fill dd sz_buf2d_flood_fill
buf2d_set_pixel dd sz_buf2d_set_pixel
dd 0 , 0
sz_init db 'lib_init' , 0
sz_buf2d_create db 'buf2d_create' , 0
sz_buf2d_create_f_img db 'buf2d_create_f_img' , 0
sz_buf2d_clear db 'buf2d_clear' , 0
sz_buf2d_draw db 'buf2d_draw' , 0
sz_buf2d_delete db 'buf2d_delete' , 0
sz_buf2d_line db 'buf2d_line' , 0
sz_buf2d_rect_by_size db 'buf2d_rect_by_size' , 0
sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size' , 0
sz_buf2d_circle db 'buf2d_circle' , 0
sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2' , 0
sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2' , 0
sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8' , 0
sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32' , 0
sz_buf2d_bit_blt db 'buf2d_bit_blt' , 0
sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp' , 0
sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha' , 0
sz_buf2d_curve_bezier db 'buf2d_curve_bezier' , 0
sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix' , 0
sz_buf2d_draw_text db 'buf2d_draw_text' , 0
sz_buf2d_crop_color db 'buf2d_crop_color' , 0
sz_buf2d_offset_h db 'buf2d_offset_h' , 0
sz_buf2d_flood_fill db 'buf2d_flood_fill' , 0
sz_buf2d_set_pixel db 'buf2d_set_pixel' , 0
;--------------------------------------------------
align 4
import_lib_tinygl:
macro E_LIB n
{
n dd sz_#n
}
include '../../../../programs/develop/libraries/TinyGL/asm_fork/export.inc'
dd 0 , 0
macro E_LIB n
{
sz_#n db ` n , 0
}
include '../../../../programs/develop/libraries/TinyGL/asm_fork/export.inc'
last_time dd 0
align 4
buf_0: dd 0 ;㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
dw 530 ;+4 left
dw 30 ;+6 top
.w: dd 256 ;+8 w
.h: dd 512 ;+12 h
.color: dd 0xffffd0 ;+16 color
db 24 ;+20 bit in pixel
align 4
buf_1: dd 0 ;㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
dw 0 ;+4 left
dw 0 ;+6 top
.w: dd 512 ;+8 w
.h: dd 512 ;+12 h
.color: dd 0xffffff ;+16 color
db 24 ;+20 bit in pixel
align 4
ctx1 db 28 dup ( 0 ) ;TinyGLContext or KOSGLContext
;sizeof.TinyGLContext = 28
scale dd 1.414213562
angle_x dd 0.0
angle_y dd 0.0
angle_z dd 0.0
delt_size dd 3.0
2015-12-07 19:47:28 +01:00
mouse_drag dd 0 ;० <> <E0A5A6> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 業<EFBFBD> <20> <> <20> <> ६<EFBFBD> 饭<EFBFBD> <E9A5AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
mouse_x dd 0
mouse_y dd 0
angle_dxm dd 2.8444 ;~ 3d_wnd_w/180 - <20> ਡ<EFBFBD> <E0A8A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㣫<> <E3A3AB> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 業<EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> 饭<EFBFBD> <E9A5AD> <20> <> 襩
angle_dym dd 2.8444 ;~ 3d_wnd_h/180
2015-01-29 12:59:15 +01:00
opt_light dw 0 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 祭<EFBFBD> <E7A5AD> /<2F> 몫<EFBFBD> 祭<EFBFBD> <E7A5AD> ᢥ<> <E1A2A5>
opt_cube_box dw 1 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> ࠬ<> <E0A0AC> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ꥪ<EFBFBD> <EAA5AA>
2015-02-11 15:28:00 +01:00
opt_auto_rotate dw 0 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> ⮬<EFBFBD> <E2AEAC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <E1AAAE> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ꥪ<EFBFBD> <EAA5AA>
2015-01-29 12:59:15 +01:00
light_position dd 0.0 , 0.0 , 2.0 , 1.0 ; <20> <> ᯮ<EFBFBD> <E1AFAE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 筨<EFBFBD> <E7ADA8> [0][1][2]
;[3] = (0.0 - <20> <> <EFBFBD> <E1AAAE> 筮 㤠<> <E3A4A0> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 筨<EFBFBD> , 1.0 - <20> <> <EFBFBD> <EFBFBD> 筨<EFBFBD> ᢥ<> <E1A2A5> <20> <> <20> <> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ﭨ<EFBFBD> )
light_dir dd 0.0 , 0.0 , 0.0 ;<3B> <> <EFBFBD> ࠢ<EFBFBD> <E0A0A2> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
mat_specular dd 0.3 , 0.3 , 0.3 , 1.0 ; <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
mat_shininess dd 3.0 ; <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> (<28> <> <EFBFBD> <EFBFBD> ⭠<EFBFBD> <20> ய<EFBFBD> <E0AEAF> <EFBFBD> <EFBFBD> <EFBFBD> )
white_light dd 0.8 , 0.8 , 0.8 , 1.0 ; <20> <> <EFBFBD> <EFBFBD> <20> <20> <> ⥭ᨢ<E2A5AD> <E1A8A2> <EFBFBD> <EFBFBD> <EFBFBD> <20> ᢥ饭<E1A2A5> <E9A5AD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 筨<EFBFBD> <E7ADA8> <EFBFBD>
lmodel_ambient dd 0.3 , 0.3 , 0.3 , 1.0 ; <20> <> ࠬ<EFBFBD> <E0A0AC> <EFBFBD> <EFBFBD> 䮭<> <E4AEAD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ᢥ饭<E1A2A5> <E9A5AD>
align 16
i_end:
rb 4096
stacktop:
sys_path rb 1024
2015-12-07 19:47:28 +01:00
file_name rb 2048
2015-01-29 12:59:15 +01:00
library _path rb 1024
plugin_path rb 4096
openfile_path rb 4096
filename_area rb 256
2015-12-07 19:47:28 +01:00
sc system_colors
procinfo process_information
run_file_70 FileInfoBlock
2015-01-29 12:59:15 +01:00
mem: