Compare commits
1 Commits
3716d5067b
...
3d772ea025
Author | SHA1 | Date | |
---|---|---|---|
3d772ea025 |
@@ -2,9 +2,6 @@ if not exist bin mkdir bin
|
||||
@erase lang.inc
|
||||
@echo lang fix en_US >lang.inc
|
||||
@copy objects.png bin\objects.png
|
||||
if not exist bin\info3ds.ini @copy info3ds.ini bin\info3ds.ini
|
||||
if not exist bin\toolbar.png @copy toolbar.png bin\toolbar.png
|
||||
if not exist bin\font8x9.bmp @copy ..\..\fs\kfar\trunk\font8x9.bmp bin\font8x9.bmp
|
||||
@fasm.exe -m 16384 info3ds.asm bin\info3ds.kex
|
||||
@kpack bin\info3ds.kex
|
||||
@fasm.exe -m 16384 info3ds_u.asm bin\info3ds_u.kex
|
||||
|
@@ -2,9 +2,6 @@ if not exist bin mkdir bin
|
||||
@erase lang.inc
|
||||
@echo lang fix ru_RU >lang.inc
|
||||
@copy objects.png bin\objects.png
|
||||
if not exist bin\info3ds.ini @copy info3ds.ini bin\info3ds.ini
|
||||
if not exist bin\toolbar.png @copy toolbar.png bin\toolbar.png
|
||||
if not exist bin\font8x9.bmp @copy ..\..\fs\kfar\trunk\font8x9.bmp bin\font8x9.bmp
|
||||
@fasm.exe -m 16384 info3ds.asm bin\info3ds.kex
|
||||
@kpack bin\info3ds.kex
|
||||
@fasm.exe -m 16384 info3ds_u.asm bin\info3ds_u.kex
|
||||
|
@@ -274,7 +274,7 @@ still:
|
||||
cmp al,EV_MOUSE
|
||||
jne @f
|
||||
mcall SF_THREAD_INFO,procinfo,-1
|
||||
cmp ax,word[procinfo+4]
|
||||
cmp ax,word[procinfo.window_stack_position]
|
||||
jne @f ;<3B><><EFBFBD><EFBFBD> <20><> <20><>⨢<EFBFBD><E2A8A2>
|
||||
call mouse
|
||||
@@:
|
||||
@@ -385,7 +385,7 @@ pushad
|
||||
mcall , (20 shl 16)+560, (20 shl 16)+main_wnd_height
|
||||
|
||||
mcall SF_THREAD_INFO,procinfo,-1
|
||||
mov eax,dword[procinfo.box.height]
|
||||
mov eax,[procinfo.box.height]
|
||||
cmp eax,250
|
||||
jge @f
|
||||
mov eax,250
|
||||
@@ -399,7 +399,7 @@ pushad
|
||||
mov dword[offs_last_timer],0 ;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> ⠩<><E2A0A9><EFBFBD><EFBFBD>
|
||||
@@:
|
||||
|
||||
mov eax,dword[procinfo.box.width]
|
||||
mov eax,[procinfo.box.width]
|
||||
cmp eax,400
|
||||
jge @f
|
||||
mov eax,400
|
||||
@@ -1191,9 +1191,9 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ;
|
||||
lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; <20><>ࠬ<EFBFBD><E0A0AC><EFBFBD><EFBFBD> 䮭<><E4AEAD><EFBFBD><EFBFBD><EFBFBD> <20>ᢥ饭<E1A2A5><E9A5AD>
|
||||
|
||||
if lang eq ru_RU
|
||||
capt db 'info 3ds <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 21.05.25',0
|
||||
capt db 'info 3ds <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 14.07.25',0
|
||||
else ; Default to en_US
|
||||
capt db 'info 3ds version 21.05.25',0 ;window caption
|
||||
capt db 'info 3ds version 14.07.25',0 ;window caption
|
||||
end if
|
||||
|
||||
align 16
|
||||
|
@@ -26,8 +26,8 @@ include 'convert_stl_3ds.inc'
|
||||
|
||||
3d_wnd_l equ 205 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> tinygl <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <><E1ABA5>
|
||||
3d_wnd_t equ 47 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> tinygl <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᢥ<><E1A2A5><EFBFBD>
|
||||
3d_wnd_w equ 344
|
||||
3d_wnd_h equ 312
|
||||
3d_wnd_w equ 345
|
||||
3d_wnd_h equ 384
|
||||
|
||||
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
||||
|
||||
@@ -48,6 +48,7 @@ list_offs_text equ 14+sizeof.obj_3d ;ᤢ
|
||||
include 'info_o3d.inc'
|
||||
|
||||
align 4
|
||||
fl180 dd 180.0
|
||||
fl255 dd 255.0
|
||||
open_file_data dd 0 ;㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<><E4A0A9><EFBFBD> 3ds
|
||||
open_file_size dd 0 ;ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>⮣<EFBFBD> 䠩<><E4A0A9>
|
||||
@@ -227,7 +228,7 @@ start:
|
||||
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
|
||||
mov [last_time],eax
|
||||
|
||||
stdcall [kosglMakeCurrent], 3d_wnd_l,3d_wnd_t,3d_wnd_w,3d_wnd_h,ctx1
|
||||
stdcall [kosglMakeCurrent], 3d_wnd_l,3d_wnd_t,[buf_ogl.w],[buf_ogl.h],ctx1
|
||||
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], [color_bk+8],[color_bk+4],[color_bk],0.0
|
||||
@@ -261,20 +262,20 @@ still:
|
||||
or eax,eax
|
||||
jz timer_funct
|
||||
|
||||
cmp al,1
|
||||
cmp al,EV_REDRAW
|
||||
jne @f
|
||||
call draw_window
|
||||
jmp still
|
||||
@@:
|
||||
cmp al,2
|
||||
cmp al,EV_KEY
|
||||
jz key
|
||||
cmp al,3
|
||||
cmp al,EV_BUTTON
|
||||
jz button
|
||||
cmp al,6
|
||||
cmp al,EV_MOUSE
|
||||
jne @f
|
||||
mcall SF_THREAD_INFO,procinfo,-1
|
||||
cmp ax,word[procinfo+4]
|
||||
jne @f ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><>⨢<EFBFBD><E2A8A2>
|
||||
cmp ax,word[procinfo.window_stack_position]
|
||||
jne @f ;window is not active
|
||||
call mouse
|
||||
@@:
|
||||
jmp still
|
||||
@@ -305,9 +306,9 @@ mouse:
|
||||
mov ebx,3d_wnd_l
|
||||
@@:
|
||||
sub ebx,3d_wnd_l
|
||||
cmp ebx,3d_wnd_w
|
||||
cmp ebx,[buf_ogl.w]
|
||||
jle @f
|
||||
mov ebx,3d_wnd_w
|
||||
mov ebx,[buf_ogl.w]
|
||||
@@:
|
||||
movsx eax,ax ;mouse.y
|
||||
cmp eax,3d_wnd_t
|
||||
@@ -315,9 +316,9 @@ mouse:
|
||||
mov eax,3d_wnd_t
|
||||
@@:
|
||||
sub eax,3d_wnd_t
|
||||
cmp eax,3d_wnd_h
|
||||
cmp eax,[buf_ogl.h]
|
||||
jle @f
|
||||
mov eax,3d_wnd_h
|
||||
mov eax,[buf_ogl.h]
|
||||
@@:
|
||||
finit
|
||||
fild dword[mouse_y]
|
||||
@@ -355,13 +356,13 @@ mouse:
|
||||
cmp ebx,3d_wnd_l
|
||||
jl .end_d
|
||||
sub ebx,3d_wnd_l
|
||||
cmp ebx,3d_wnd_w
|
||||
cmp ebx,[buf_ogl.w]
|
||||
jg .end_d
|
||||
movsx eax,ax ;mouse.y
|
||||
cmp eax,3d_wnd_t
|
||||
jl .end_d
|
||||
sub eax,3d_wnd_t
|
||||
cmp eax,3d_wnd_h
|
||||
cmp eax,[buf_ogl.h]
|
||||
jg .end_d
|
||||
mov dword[mouse_drag],1
|
||||
mov dword[mouse_x],ebx
|
||||
@@ -444,16 +445,7 @@ pushad
|
||||
or edx,0x33000000
|
||||
mcall SF_CREATE_WINDOW, (20 shl 16)+560, (20 shl 16)+main_wnd_height,,, capt
|
||||
|
||||
mcall SF_THREAD_INFO,procinfo,-1
|
||||
mov eax,dword[procinfo.box.height]
|
||||
cmp eax,250
|
||||
jge @f
|
||||
mov eax,250
|
||||
@@:
|
||||
sub eax,30
|
||||
sub eax,[tree1.box_top]
|
||||
mov [tree1.box_height],eax
|
||||
mov word[w_scr_t1.y_size],ax ;<3B><><EFBFBD><EFBFBD><EFBFBD> ࠧ<><E0A0A7><EFBFBD><EFBFBD> <20><><EFBFBD><E0AEAB><EFBFBD><EFBFBD><EFBFBD>
|
||||
call OnResize
|
||||
|
||||
stdcall [kmainmenu_draw], [main_menu]
|
||||
|
||||
@@ -497,6 +489,62 @@ pushad
|
||||
popad
|
||||
ret
|
||||
|
||||
align 4
|
||||
OnResize:
|
||||
mcall SF_STYLE_SETTINGS,SSF_GET_SKIN_HEIGHT
|
||||
push eax
|
||||
mcall SF_THREAD_INFO,procinfo,-1
|
||||
mov eax,[procinfo.box.height]
|
||||
cmp eax,250
|
||||
jge @f
|
||||
mov eax,250
|
||||
@@:
|
||||
sub eax,[esp]
|
||||
sub eax,5
|
||||
sub eax,[tree1.box_top]
|
||||
mov [tree1.box_height],eax
|
||||
mov word[w_scr_t1.y_size],ax ;new scroll sizes
|
||||
|
||||
cmp [buf_ogl.h],eax
|
||||
je @f
|
||||
mov [buf_ogl.h],eax
|
||||
mov dword[buf_ogl.w],0 ;reset width
|
||||
@@:
|
||||
pop eax
|
||||
movzx eax,word[w_scr_t1.x_size]
|
||||
add eax,[tree1.box_left]
|
||||
add eax,[tree1.box_width]
|
||||
add eax,15 ;5 px * 3 borders
|
||||
sub eax,[procinfo.box.width]
|
||||
neg eax
|
||||
cmp eax,64
|
||||
jge @f
|
||||
mov eax,64
|
||||
@@:
|
||||
cmp [buf_ogl.w],eax
|
||||
je .end
|
||||
mov [buf_ogl.w],eax
|
||||
fild dword[buf_ogl.w]
|
||||
fld st0
|
||||
fdiv dword[fl180]
|
||||
fstp dword[angle_dxm]
|
||||
fidiv dword[buf_ogl.h]
|
||||
fstp dword[ratio]
|
||||
stdcall [glViewport], 0,0, [buf_ogl.w], [buf_ogl.h]
|
||||
|
||||
mov eax,[ctx1.gl_context]
|
||||
mov eax,[eax] ;eax -> ZBuffer
|
||||
mov eax,[eax+ZBuffer.pbuf]
|
||||
mov dword[buf_ogl],eax
|
||||
|
||||
stdcall [tl_node_get_data],tree1
|
||||
or eax,eax
|
||||
jz .end
|
||||
add eax,list_offs_obj3d
|
||||
stdcall draw_3d, eax
|
||||
.end:
|
||||
ret
|
||||
|
||||
align 4
|
||||
key:
|
||||
mcall SF_GET_KEY
|
||||
@@ -1259,9 +1307,9 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ;
|
||||
lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; <20><>ࠬ<EFBFBD><E0A0AC><EFBFBD><EFBFBD> 䮭<><E4AEAD><EFBFBD><EFBFBD><EFBFBD> <20>ᢥ饭<E1A2A5><E9A5AD>
|
||||
|
||||
if lang eq ru_RU
|
||||
capt db 'info 3ds [user] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 21.05.25',0 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
capt db 'info 3ds [user] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 14.07.25',0 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
else ; Default to en_US
|
||||
capt db 'info 3ds [user] version 21.05.25',0 ; Window caption
|
||||
capt db 'info 3ds [user] version 14.07.25',0 ; Window caption
|
||||
end if
|
||||
|
||||
align 16
|
||||
|
@@ -188,6 +188,9 @@ prop_still:
|
||||
jz prop_button
|
||||
cmp al,EV_MOUSE
|
||||
jne @f
|
||||
mcall SF_THREAD_INFO,procinfo,-1
|
||||
cmp ax,word[procinfo.window_stack_position]
|
||||
jne @f ;window is not active
|
||||
call prop_mouse
|
||||
@@:
|
||||
.end:
|
||||
@@ -234,7 +237,7 @@ pushad
|
||||
fld st0
|
||||
fdiv dword[fl180]
|
||||
fstp dword[angle_dxm]
|
||||
fidiv dword[buf_0.h]
|
||||
fidiv dword[buf_ogl.h]
|
||||
fstp dword[ratio]
|
||||
stdcall [glViewport], 0,0, [buf_ogl.w], 3d_wnd_h
|
||||
stdcall obj_set_sizes, o3d
|
||||
|
Reference in New Issue
Block a user