Compare commits
1 Commits
0fa13bc0d9
...
info3ds-up
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
|
||||
@@ -1099,7 +1099,6 @@ dd 0,0
|
||||
aOpenDialog_Set_file_name db 'OpenDialog_set_file_name',0
|
||||
aOpenDialog_Set_file_ext db 'OpenDialog_set_file_ext',0
|
||||
|
||||
sz_lib_init db 'lib_init',0
|
||||
include '../../develop/libraries/libs-dev/libimg/import.inc'
|
||||
include '../../develop/libraries/box_lib/import.inc'
|
||||
include '../../develop/libraries/buf2d/import.inc'
|
||||
@@ -1192,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> 08.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 08.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
|
||||
@@ -1172,7 +1220,6 @@ dd 0,0
|
||||
aOpenDialog_Set_file_name db 'OpenDialog_set_file_name',0
|
||||
aOpenDialog_Set_file_ext db 'OpenDialog_set_file_ext',0
|
||||
|
||||
sz_lib_init db 'lib_init',0
|
||||
include '../../develop/libraries/libs-dev/libimg/import.inc'
|
||||
include '../../develop/libraries/box_lib/import.inc'
|
||||
include '../../develop/libraries/buf2d/import.inc'
|
||||
@@ -1260,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> 07.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 07.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
|
||||
|
@@ -4,7 +4,7 @@ import_box_lib:
|
||||
macro E_LIB n, lfn
|
||||
{
|
||||
if n eq lib_init
|
||||
dd sz_#n
|
||||
dd strz_#n
|
||||
else if defined sz_#n
|
||||
n dd sz_#n
|
||||
end if
|
||||
|
@@ -4,7 +4,7 @@ import_buf2d:
|
||||
macro E_LIB n
|
||||
{
|
||||
if n eq lib_init
|
||||
dd sz_#n
|
||||
dd strz_#n
|
||||
else if defined sz_#n
|
||||
n dd sz_#n
|
||||
end if
|
||||
|
@@ -4,7 +4,7 @@ import_libimg:
|
||||
macro E_LIB n
|
||||
{
|
||||
if n eq lib_init
|
||||
dd sz_#n
|
||||
dd strz_#n
|
||||
else if defined sz_#n
|
||||
n dd sz_#n
|
||||
end if
|
||||
|
@@ -23,6 +23,9 @@ library_fun_memory_free equ mem_free
|
||||
library_fun_memory_realloc equ mem_realloc
|
||||
library_fun_dll_load equ dll_load
|
||||
|
||||
align 4
|
||||
strz_lib_init db 'lib_init',0
|
||||
|
||||
align 4
|
||||
arrea_xx dd 0
|
||||
file_name db '/sys/@notify',0
|
||||
@@ -214,7 +217,7 @@ end if
|
||||
jmp i_error
|
||||
align 4
|
||||
i_begin:
|
||||
import_boxlib myimport
|
||||
import_some_library myimport
|
||||
test eax,eax
|
||||
jz i_exit
|
||||
i_error:
|
||||
@@ -234,13 +237,13 @@ macro load_library library_name__, library_path__, system_path__, myimport, poin
|
||||
local i_begin
|
||||
local i_error
|
||||
local i_exit
|
||||
push ebx
|
||||
if point_dir_name__ eq
|
||||
copy_path library_name__, [32], library_path__,0
|
||||
else
|
||||
;the macros making way /current path a program/ + name system library
|
||||
copy_path library_name__, [32], library_path__,point_dir_name__
|
||||
end if
|
||||
push ebx
|
||||
mcall SF_SYS_MISC,SSF_LOAD_DLL,library_path__ ; load of alternative
|
||||
test eax,eax
|
||||
jnz i_begin
|
||||
@@ -251,7 +254,7 @@ end if
|
||||
jmp i_error
|
||||
align 4
|
||||
i_begin:
|
||||
import_boxlib myimport
|
||||
import_some_library myimport
|
||||
test eax,eax
|
||||
jz i_exit
|
||||
i_error:
|
||||
@@ -309,7 +312,7 @@ align 4
|
||||
align 4
|
||||
end_steep:
|
||||
mov adr_load_lib,eax ;save adr lib in memory
|
||||
import_boxlib my_import
|
||||
import_some_library my_import
|
||||
test eax,eax
|
||||
jz cycle0n
|
||||
or status_lib,2 ; status of code - enable error - import error
|
||||
@@ -387,7 +390,7 @@ align 4
|
||||
align 4
|
||||
end_steep:
|
||||
mov adr_load_lib,eax ;save adr lib in memory
|
||||
import_boxlib my_import
|
||||
import_some_library my_import
|
||||
test eax,eax
|
||||
jz cycle0n
|
||||
or status_lib,2 ; status of code - enable error - import error
|
||||
@@ -451,7 +454,7 @@ pop ebx eax
|
||||
;output:
|
||||
; eax - <20> 㤠筮 <20><> 0 <20><><EFBFBD> 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD> <20>㭪樨 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> 㤠<><E3A4A0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>㧨<EFBFBD><E3A7A8>
|
||||
; ebx - ࠧ<><E0A0A7>蠥<EFBFBD><E8A0A5><EFBFBD>
|
||||
macro import_boxlib myimport
|
||||
macro import_some_library myimport
|
||||
{
|
||||
local import_loop
|
||||
local import_find
|
||||
|
Reference in New Issue
Block a user