1 Commits

Author SHA1 Message Date
3716d5067b Info3ds: added resizing of the window with the figure
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 24s
Build system / Build (pull_request) Successful in 5m2s
and the list of vertices in the properties window,

Info3ds, Info3ds_u: files with menu icons are embedded into the program
2025-05-21 07:06:30 +03:00
5 changed files with 39 additions and 84 deletions

View File

@@ -2,6 +2,9 @@ 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

View File

@@ -2,6 +2,9 @@ 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

View File

@@ -274,7 +274,7 @@ still:
cmp al,EV_MOUSE
jne @f
mcall SF_THREAD_INFO,procinfo,-1
cmp ax,word[procinfo.window_stack_position]
cmp ax,word[procinfo+4]
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,[procinfo.box.height]
mov eax,dword[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,[procinfo.box.width]
mov eax,dword[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> 14.07.25',0
capt db 'info 3ds <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 21.05.25',0
else ; Default to en_US
capt db 'info 3ds version 14.07.25',0 ;window caption
capt db 'info 3ds version 21.05.25',0 ;window caption
end if
align 16

View File

@@ -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 345
3d_wnd_h equ 384
3d_wnd_w equ 344
3d_wnd_h equ 312
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
@@ -48,7 +48,6 @@ 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>
@@ -228,7 +227,7 @@ start:
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
mov [last_time],eax
stdcall [kosglMakeCurrent], 3d_wnd_l,3d_wnd_t,[buf_ogl.w],[buf_ogl.h],ctx1
stdcall [kosglMakeCurrent], 3d_wnd_l,3d_wnd_t,3d_wnd_w,3d_wnd_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
@@ -262,20 +261,20 @@ still:
or eax,eax
jz timer_funct
cmp al,EV_REDRAW
cmp al,1
jne @f
call draw_window
jmp still
@@:
cmp al,EV_KEY
cmp al,2
jz key
cmp al,EV_BUTTON
cmp al,3
jz button
cmp al,EV_MOUSE
cmp al,6
jne @f
mcall SF_THREAD_INFO,procinfo,-1
cmp ax,word[procinfo.window_stack_position]
jne @f ;window is not active
cmp ax,word[procinfo+4]
jne @f ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E2A8A2>
call mouse
@@:
jmp still
@@ -306,9 +305,9 @@ mouse:
mov ebx,3d_wnd_l
@@:
sub ebx,3d_wnd_l
cmp ebx,[buf_ogl.w]
cmp ebx,3d_wnd_w
jle @f
mov ebx,[buf_ogl.w]
mov ebx,3d_wnd_w
@@:
movsx eax,ax ;mouse.y
cmp eax,3d_wnd_t
@@ -316,9 +315,9 @@ mouse:
mov eax,3d_wnd_t
@@:
sub eax,3d_wnd_t
cmp eax,[buf_ogl.h]
cmp eax,3d_wnd_h
jle @f
mov eax,[buf_ogl.h]
mov eax,3d_wnd_h
@@:
finit
fild dword[mouse_y]
@@ -356,13 +355,13 @@ mouse:
cmp ebx,3d_wnd_l
jl .end_d
sub ebx,3d_wnd_l
cmp ebx,[buf_ogl.w]
cmp ebx,3d_wnd_w
jg .end_d
movsx eax,ax ;mouse.y
cmp eax,3d_wnd_t
jl .end_d
sub eax,3d_wnd_t
cmp eax,[buf_ogl.h]
cmp eax,3d_wnd_h
jg .end_d
mov dword[mouse_drag],1
mov dword[mouse_x],ebx
@@ -445,7 +444,16 @@ pushad
or edx,0x33000000
mcall SF_CREATE_WINDOW, (20 shl 16)+560, (20 shl 16)+main_wnd_height,,, capt
call OnResize
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>
stdcall [kmainmenu_draw], [main_menu]
@@ -489,62 +497,6 @@ 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
@@ -1307,9 +1259,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> 14.07.25',0 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
capt db 'info 3ds [user] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 21.05.25',0 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
else ; Default to en_US
capt db 'info 3ds [user] version 14.07.25',0 ; Window caption
capt db 'info 3ds [user] version 21.05.25',0 ; Window caption
end if
align 16

View File

@@ -188,9 +188,6 @@ 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:
@@ -237,7 +234,7 @@ pushad
fld st0
fdiv dword[fl180]
fstp dword[angle_dxm]
fidiv dword[buf_ogl.h]
fidiv dword[buf_0.h]
fstp dword[ratio]
stdcall [glViewport], 0,0, [buf_ogl.w], 3d_wnd_h
stdcall obj_set_sizes, o3d