Compare commits
1 Commits
a8675404e7
...
1a2e3e7938
| Author | SHA1 | Date | |
|---|---|---|---|
| 1a2e3e7938 |
@@ -152,6 +152,9 @@ extra_files = {
|
||||
{"HD_Load/USB_boot_old/", SRC_PROGS .. "/hd_load/usb_boot_old/usb_boot_866.txt"},
|
||||
{"HD_Load/USB_boot_old/", SRC_PROGS .. "/hd_load/usb_boot_old/usb_boot_1251.txt"},
|
||||
{"kolibrios/3D/info3ds/INFO3DS.INI", SRC_PROGS .. "/develop/info3ds/info3ds.ini"},
|
||||
{"kolibrios/3D/info3ds/OBJECTS.PNG", SRC_PROGS .. "/develop/info3ds/objects.png"},
|
||||
{"kolibrios/3D/info3ds/TOOLBAR.PNG", SRC_PROGS .. "/develop/info3ds/toolbar.png"},
|
||||
{"kolibrios/3D/info3ds/FONT8X9.BMP", SRC_PROGS .. "/fs/kfar/trunk/font8x9.bmp"},
|
||||
{"kolibrios/3D/blocks/blocks.kex", "../programs/bcc32/games/blocks/bin/blocks.kex"},
|
||||
{"kolibrios/3D/blocks/models/", "../programs/bcc32/games/blocks/models/*"},
|
||||
{"kolibrios/3D/md2view/", "common/3d/md2view/*"},
|
||||
@@ -595,8 +598,8 @@ tup.append_table(extra_files, {
|
||||
{"kolibrios/3D/flatwav", VAR_PROGS .. "/demos/flatwav/trunk/flatwav"},
|
||||
{"kolibrios/3D/mos3de", VAR_PROGS .. "/demos/mos3de/mos3de"},
|
||||
{"kolibrios/3D/info3ds/INFO3DS", VAR_PROGS .. "/develop/info3ds/info3ds"},
|
||||
{"kolibrios/3D/info3ds/INFO3DS_U", VAR_PROGS .. "/develop/info3ds/info3ds_u"},
|
||||
{"kolibrios/3D/textures1", VAR_PROGS .. "/develop/libraries/TinyGL/asm_fork/examples/textures1"},
|
||||
{"kolibrios/3D/info3ds/INFO3DS_U", VAR_PROGS .. "/develop/info3ds/info3ds_u"},
|
||||
{"kolibrios/3D/voxel_editor/VOXEL_EDITOR", VAR_PROGS .. "/media/voxel_editor/trunk/voxel_editor"},
|
||||
{"kolibrios/3D/voxel_utilites/VOX_CREATOR" , VAR_PROGS .. "/media/voxel_editor/utilites/vox_creator"},
|
||||
{"kolibrios/3D/voxel_utilites/VOX_MOVER" , VAR_PROGS .. "/media/voxel_editor/utilites/vox_mover"},
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
; SPDX-License-Identifier: GPL-2.0-only
|
||||
; Info3ds - is a program for viewing the structure of *.3ds files
|
||||
; Copyright (C) 2011-2025 KolibriOS team
|
||||
|
||||
use32
|
||||
org 0
|
||||
db 'MENUET01'
|
||||
db 'MENUET01' ;¨¤¥â¨ä. ¨á¯®«ï¥¬®£® ä ©« ¢á¥£¤ 8 ¡ ©â
|
||||
dd 1, start, i_end, mem, stacktop, file_name, sys_path
|
||||
|
||||
version_edit equ 1
|
||||
@@ -26,34 +22,36 @@ include 'convert_stl_3ds.inc'
|
||||
|
||||
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
||||
|
||||
ID_ICON_CHUNK_MAIN equ 0 ;main block icon
|
||||
ID_ICON_CHUNK_NOT_FOUND equ 1 ;unknown block icon
|
||||
ID_ICON_DATA equ 2 ;icon for block data, undefined structure
|
||||
ID_ICON_CHUNK_MAIN equ 0 ;¨ª®ª £« ¢®£® ¡«®ª
|
||||
ID_ICON_CHUNK_NOT_FOUND equ 1 ;¨ª®ª ¥ ¨§¢¥á⮣® ¡«®ª
|
||||
ID_ICON_DATA equ 2 ;¨ª®ª ¤«ï ¤ ëå ¡«®ª , ¥ ®¯à¥¤¥«¥®© áâàãªâãàë
|
||||
ID_ICON_POINT equ 8
|
||||
ID_ICON_POINT_SEL equ 9
|
||||
|
||||
FILE_ERROR_CHUNK_SIZE equ -3 ;block size error
|
||||
FILE_ERROR_CHUNK_SIZE equ -3 ;®è¨¡ª ¢ à §¬¥à¥ ¡«®ª
|
||||
|
||||
include 'info_o3d.inc'
|
||||
|
||||
main_wnd_height equ 460 ;height of the main program window
|
||||
main_wnd_height equ 460 ;¢ëá®â £« ¢®£® ®ª ¯à®£à ¬¬ë
|
||||
IMAGE_TOOLBAR_ICON_SIZE equ 21*21*3
|
||||
|
||||
align 4
|
||||
fl255 dd 255.0
|
||||
open_file_data dd 0 ;pointer to memory for opening 3ds files
|
||||
open_file_size dd 0
|
||||
open_file_data dd 0 ;㪠§ â¥«ì ¯ ¬ïâì ¤«ï ®âªàëâ¨ï ä ©«®¢ 3ds
|
||||
open_file_size dd 0 ;à §¬¥à ®âªàë⮣® ä ©«
|
||||
image_data_toolbar dd 0
|
||||
icon_tl_sys dd 0 ;pointer to memory for storing system icons
|
||||
icon_toolbar dd 0 ;pointer to memory for storing object icons
|
||||
|
||||
level_stack dd 0
|
||||
offs_last_timer dd 0 ;last shift shown in timer function
|
||||
icon_tl_sys dd 0 ;㪠§ ⥥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï á¨á⥬ëå ¨ª®®ª
|
||||
icon_toolbar dd 0 ;㪠§ ⥥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï ¨ª®®ª ®¡ê¥ªâ®¢
|
||||
fn_toolbar db 'toolbar.png',0
|
||||
|
||||
align 4
|
||||
file_3ds: ;variables used when opening a file
|
||||
.offs: dd 0 ;+0 pointer to the beginning of the block
|
||||
.size: dd 0 ;+4 block size (for 1st parameter = 3ds file size)
|
||||
level_stack dd 0
|
||||
offs_last_timer dd 0 ;¯®á«¥¤¨© ᤢ¨£ ¯®ª § ë© ¢ äãªæ¨¨ â ©¬¥à
|
||||
|
||||
align 4
|
||||
file_3ds: ;¯¥à¥¬¥ë¥ ¨á¯®«ì§ã¥¬ë¥ ¯à¨ ®âªàë⨨ ä ©«
|
||||
.offs: dd 0 ;+0 㪠§ ⥫ì ç «® ¡«®ª
|
||||
.size: dd 0 ;+4 à §¬¥à ¡«®ª (¤«ï 1-£® ¯ à ¬¥âà = à §¬¥à ä ©« 3ds)
|
||||
rb 8*MAX_FILE_LEVEL
|
||||
|
||||
size_one_list equ 42
|
||||
@@ -83,7 +81,7 @@ start:
|
||||
stosd
|
||||
|
||||
load_libraries l_libs_start,l_libs_end
|
||||
;checking how successfully the libraries were loaded
|
||||
;¯à®¢¥àª ᪮«ìª® ã¤ ç® § £ã§¨«¨áì ¡¨¡«¨®â¥ª¨
|
||||
mov ebp,lib_0
|
||||
.test_lib_open:
|
||||
cmp dword [ebp+ll_struc_size-4],0
|
||||
@@ -96,7 +94,7 @@ start:
|
||||
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
|
||||
mcall SF_SET_EVENTS_MASK,0xC0000027
|
||||
|
||||
stdcall [OpenDialog_Init],OpenDialog_data ;preparation of dialogue
|
||||
stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª ¤¨ «®£
|
||||
|
||||
;kmenu initialisation
|
||||
stdcall [kmenu_init],sc
|
||||
@@ -145,68 +143,70 @@ start:
|
||||
stdcall [tl_data_init], tree1
|
||||
;á¨áâ¥¬ë¥ ¨ª®ª¨ 16*16 ¤«ï tree_list
|
||||
include_image_file 'tl_sys_16.png', icon_tl_sys
|
||||
mov eax,[icon_tl_sys]
|
||||
mov [tree1.data_img_sys],eax
|
||||
;¥á«¨ ¨§®¡à ¦¥¨¥ ¥ ®âªàë«®áì, â® ¢ icon_tl_sys ¡ã¤ãâ
|
||||
;¥ ¨¨æ¨ «¨§¨à®¢ ë¥ ¤ ë¥, ® ®è¨¡ª¨ ¥ ¡ã¤¥â, â. ª. ¡ãä¥à 㦮£® à §¬¥à
|
||||
mov eax,dword[icon_tl_sys]
|
||||
mov dword[tree1.data_img_sys],eax
|
||||
|
||||
include_image_file 'objects.png', icon_toolbar
|
||||
mov eax,[icon_toolbar]
|
||||
mov [tree1.data_img],eax
|
||||
load_image_file 'objects.png', icon_toolbar
|
||||
mov eax,dword[icon_toolbar]
|
||||
mov dword[tree1.data_img],eax
|
||||
|
||||
stdcall [buf2d_create], buf_0 ;á®§¤ ¨¥ ¡ãä¥à
|
||||
|
||||
include_image_file '../../fs/kfar/trunk/font8x9.bmp', image_data_toolbar
|
||||
load_image_file 'font8x9.bmp', image_data_toolbar
|
||||
stdcall [buf2d_create_f_img], buf_1,[image_data_toolbar] ;á®§¤ ¥¬ ¡ãä¥à
|
||||
stdcall mem.Free,[image_data_toolbar] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì
|
||||
stdcall [buf2d_conv_24_to_8], buf_1,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç®á⨠8 ¡¨â
|
||||
stdcall [buf2d_convert_text_matrix], buf_1
|
||||
|
||||
include_image_file 'toolbar.png', image_data_toolbar
|
||||
load_image_file fn_toolbar, image_data_toolbar
|
||||
|
||||
;à ¡®â á ä ©«®¬ áâ஥ª
|
||||
copy_path ini_name,sys_path,file_name,0
|
||||
mov dword[def_dr_mode],0
|
||||
stdcall [ini_get_int],file_name,ini_sec_w3d,key_dv,1
|
||||
stdcall dword[ini_get_int],file_name,ini_sec_w3d,key_dv,1
|
||||
or eax,eax
|
||||
jz @f
|
||||
or dword[def_dr_mode], 1 shl bit_vertexes
|
||||
@@:
|
||||
stdcall [ini_get_int],file_name,ini_sec_w3d,key_df,1
|
||||
stdcall dword[ini_get_int],file_name,ini_sec_w3d,key_df,1
|
||||
or eax,eax
|
||||
jz @f
|
||||
or dword[def_dr_mode], 1 shl bit_faces
|
||||
@@:
|
||||
stdcall [ini_get_int],file_name,ini_sec_w3d,key_dff,1
|
||||
stdcall dword[ini_get_int],file_name,ini_sec_w3d,key_dff,1
|
||||
or eax,eax
|
||||
jz @f
|
||||
or dword[def_dr_mode], 1 shl bit_faces_fill
|
||||
@@:
|
||||
stdcall [ini_get_int],file_name,ini_sec_w3d,key_dl,1
|
||||
stdcall dword[ini_get_int],file_name,ini_sec_w3d,key_dl,1
|
||||
or eax,eax
|
||||
jz @f
|
||||
or dword[def_dr_mode], 1 shl bit_light
|
||||
@@:
|
||||
stdcall [ini_get_int],file_name,ini_sec_w3d,key_ds,1
|
||||
stdcall dword[ini_get_int],file_name,ini_sec_w3d,key_ds,1
|
||||
or eax,eax
|
||||
jz @f
|
||||
or dword[def_dr_mode], 1 shl bit_smooth
|
||||
@@:
|
||||
stdcall [ini_get_color],file_name,ini_sec_w3d,key_ox,0x0000ff
|
||||
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_ox,0x0000ff
|
||||
mov [color_ox],eax
|
||||
stdcall [ini_get_color],file_name,ini_sec_w3d,key_oy,0xff0000
|
||||
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_oy,0xff0000
|
||||
mov [color_oy],eax
|
||||
stdcall [ini_get_color],file_name,ini_sec_w3d,key_oz,0x00ff00
|
||||
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_oz,0x00ff00
|
||||
mov [color_oz],eax
|
||||
stdcall [ini_get_color],file_name,ini_sec_w3d,key_bk,0x000000
|
||||
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_bk,0x000000
|
||||
mov [color_bk],eax
|
||||
shr eax,8
|
||||
mov [color_bk+4],eax
|
||||
shr eax,8
|
||||
mov [color_bk+8],eax
|
||||
stdcall [ini_get_color],file_name,ini_sec_w3d,key_vert,0xffffff
|
||||
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_vert,0xffffff
|
||||
mov [color_vert],eax
|
||||
stdcall [ini_get_color],file_name,ini_sec_w3d,key_face,0x808080
|
||||
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_face,0x808080
|
||||
mov [color_face],eax
|
||||
stdcall [ini_get_color],file_name,ini_sec_w3d,key_select,0xffff00
|
||||
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_select,0xffff00
|
||||
mov [color_select],eax
|
||||
finit
|
||||
fild dword[color_bk+8]
|
||||
@@ -262,16 +262,16 @@ 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+4]
|
||||
@@ -282,7 +282,7 @@ still:
|
||||
|
||||
align 4
|
||||
mouse:
|
||||
stdcall [tl_mouse], tree1
|
||||
stdcall [tl_mouse], dword tree1
|
||||
ret
|
||||
|
||||
align 4
|
||||
@@ -457,7 +457,7 @@ popad
|
||||
align 4
|
||||
key:
|
||||
mcall SF_GET_KEY
|
||||
stdcall [tl_key], tree1
|
||||
stdcall [tl_key], dword tree1
|
||||
jmp still
|
||||
|
||||
|
||||
@@ -1087,6 +1087,53 @@ l_libs_start:
|
||||
lib_6 l_libs lib_name_6, file_name, system_dir_6, import_libini
|
||||
l_libs_end:
|
||||
|
||||
align 4
|
||||
import_libimg:
|
||||
dd alib_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 ;®¯à¥¤¥«ï¥â ¯® ¤ ë¬, ¬®¦¥â «¨ ¡¨¡«¨®â¥ª ᤥ« âì ¨§ ¨å ¨§®¡à ¦¥¨¥
|
||||
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 ;¯à¥®¡à §®¢ ¨¥ ¨§®¡à ¦¥¨ï ¢ ¤ ë¥ RGB
|
||||
aimg_to_rgb2 db 'img_to_rgb2',0
|
||||
aimg_decode db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ëå
|
||||
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
|
||||
import_proclib:
|
||||
OpenDialog_Init dd aOpenDialog_Init
|
||||
@@ -1099,10 +1146,122 @@ 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'
|
||||
align 4
|
||||
import_buf2d:
|
||||
dd sz_init0
|
||||
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_resize dd sz_buf2d_resize
|
||||
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_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_set_pixel dd sz_buf2d_set_pixel
|
||||
dd 0,0
|
||||
sz_init0 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_resize db 'buf2d_resize',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_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_set_pixel db 'buf2d_set_pixel',0
|
||||
|
||||
align 4
|
||||
import_box_lib:
|
||||
dd sz_init1
|
||||
edit_box_draw dd sz_edit_box_draw
|
||||
edit_box_key dd sz_edit_box_key
|
||||
edit_box_mouse dd sz_edit_box_mouse
|
||||
edit_box_set_text dd sz_edit_box_set_text
|
||||
scrollbar_ver_draw dd sz_scrollbar_ver_draw
|
||||
scrollbar_hor_draw dd sz_scrollbar_hor_draw
|
||||
|
||||
tl_data_init dd sz_tl_data_init
|
||||
tl_data_clear dd sz_tl_data_clear
|
||||
tl_info_clear dd sz_tl_info_clear
|
||||
tl_key dd sz_tl_key
|
||||
tl_mouse dd sz_tl_mouse
|
||||
tl_draw dd sz_tl_draw
|
||||
tl_info_undo dd sz_tl_info_undo
|
||||
tl_info_redo dd sz_tl_info_redo
|
||||
tl_node_add dd sz_tl_node_add
|
||||
tl_node_set_data dd sz_tl_node_set_data
|
||||
tl_node_get_data dd sz_tl_node_get_data
|
||||
tl_node_delete dd sz_tl_node_delete
|
||||
tl_node_move_up dd sz_tl_node_move_up
|
||||
tl_node_move_down dd sz_tl_node_move_down
|
||||
tl_cur_beg dd sz_tl_cur_beg
|
||||
tl_cur_next dd sz_tl_cur_next
|
||||
tl_cur_perv dd sz_tl_cur_perv
|
||||
tl_node_close_open dd sz_tl_node_close_open
|
||||
tl_node_lev_inc dd sz_tl_node_lev_inc
|
||||
tl_node_lev_dec dd sz_tl_node_lev_dec
|
||||
tl_node_poi_get_info dd sz_tl_node_poi_get_info
|
||||
tl_node_poi_get_next_info dd sz_tl_node_poi_get_next_info
|
||||
tl_node_poi_get_data dd sz_tl_node_poi_get_data
|
||||
|
||||
dd 0,0
|
||||
sz_init1 db 'lib_init',0
|
||||
sz_edit_box_draw db 'edit_box_draw',0
|
||||
sz_edit_box_key db 'edit_box_key',0
|
||||
sz_edit_box_mouse db 'edit_box_mouse',0
|
||||
sz_edit_box_set_text db 'edit_box_set_text',0
|
||||
sz_scrollbar_ver_draw db 'scrollbar_v_draw',0
|
||||
sz_scrollbar_hor_draw db 'scrollbar_h_draw',0
|
||||
|
||||
sz_tl_data_init db 'tl_data_init',0
|
||||
sz_tl_data_clear db 'tl_data_clear',0
|
||||
sz_tl_info_clear db 'tl_info_clear',0
|
||||
sz_tl_key db 'tl_key',0
|
||||
sz_tl_mouse db 'tl_mouse',0
|
||||
sz_tl_draw db 'tl_draw',0
|
||||
sz_tl_info_undo db 'tl_info_undo',0
|
||||
sz_tl_info_redo db 'tl_info_redo',0
|
||||
sz_tl_node_add db 'tl_node_add',0
|
||||
sz_tl_node_set_data db 'tl_node_set_data',0
|
||||
sz_tl_node_get_data db 'tl_node_get_data',0
|
||||
sz_tl_node_delete db 'tl_node_delete',0
|
||||
sz_tl_node_move_up db 'tl_node_move_up',0
|
||||
sz_tl_node_move_down db 'tl_node_move_down',0
|
||||
sz_tl_cur_beg db 'tl_cur_beg',0
|
||||
sz_tl_cur_next db 'tl_cur_next',0
|
||||
sz_tl_cur_perv db 'tl_cur_perv',0
|
||||
sz_tl_node_close_open db 'tl_node_close_open',0
|
||||
sz_tl_node_lev_inc db 'tl_node_lev_inc',0
|
||||
sz_tl_node_lev_dec db 'tl_node_lev_dec',0
|
||||
sz_tl_node_poi_get_info db 'tl_node_poi_get_info',0
|
||||
sz_tl_node_poi_get_next_info db 'tl_node_poi_get_next_info',0
|
||||
sz_tl_node_poi_get_data db 'tl_node_poi_get_data',0
|
||||
|
||||
align 4
|
||||
import_libkmenu:
|
||||
@@ -1128,7 +1287,23 @@ dd 0,0
|
||||
akmenuitem_delete db 'kmenuitem_delete',0
|
||||
akmenuitem_draw db 'kmenuitem_draw',0
|
||||
|
||||
include '../../develop/libraries/TinyGL/asm_fork/import.inc'
|
||||
align 4
|
||||
import_tinygl:
|
||||
macro E_LIB n
|
||||
{
|
||||
if defined sz_#n
|
||||
n dd sz_#n
|
||||
end if
|
||||
}
|
||||
include '../../develop/libraries/TinyGL/asm_fork/export.inc'
|
||||
dd 0,0
|
||||
macro E_LIB n
|
||||
{
|
||||
if used n
|
||||
sz_#n db `n,0
|
||||
end if
|
||||
}
|
||||
include '../../develop/libraries/TinyGL/asm_fork/export.inc'
|
||||
|
||||
align 4
|
||||
import_libini:
|
||||
@@ -1192,9 +1367,9 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ;
|
||||
lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; <20> à ¬¥âàë ä®®¢®£® ®á¢¥é¥¨ï
|
||||
|
||||
if lang eq ru_RU
|
||||
capt db 'info 3ds ¢¥àá¨ï 08.05.25',0
|
||||
capt db 'info 3ds ¢¥àá¨ï 04.05.25',0 ;¯®¤¯¨áì ®ª
|
||||
else ; Default to en_US
|
||||
capt db 'info 3ds version 08.05.25',0 ;window caption
|
||||
capt db 'info 3ds version 04.05.25',0 ;window caption
|
||||
end if
|
||||
|
||||
align 16
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
; SPDX-License-Identifier: GPL-2.0-only
|
||||
; Info3ds_u - is a program for viewing the structure of *.3ds files
|
||||
; Copyright (C) 2015-2025 KolibriOS team
|
||||
|
||||
use32
|
||||
org 0
|
||||
db 'MENUET01' ;¨¤¥â¨ä. ¨á¯®«ï¥¬®£® ä ©« ¢á¥£¤ 8 ¡ ©â
|
||||
@@ -16,7 +12,6 @@ include '../../develop/libraries/libs-dev/libimg/libimg.inc'
|
||||
include '../../load_img.inc'
|
||||
include '../../load_lib.mac'
|
||||
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||
include '../../develop/libraries/TinyGL/asm_fork/kosgl.inc'
|
||||
include '../../develop/libraries/TinyGL/asm_fork/opengl_const.inc'
|
||||
include 'lang.inc' ; Language support for locales: ru_RU (CP866), en_US.
|
||||
include 'info_fun_float.inc'
|
||||
@@ -54,6 +49,7 @@ open_file_size dd 0 ;ࠧ
|
||||
|
||||
;
|
||||
main_wnd_height equ 460 ;¢ëá®â £« ¢®£® ®ª ¯à®£à ¬¬ë
|
||||
fn_toolbar db 'toolbar.png',0
|
||||
IMAGE_TOOLBAR_ICON_SIZE equ 21*21*3
|
||||
image_data_toolbar dd 0
|
||||
;
|
||||
@@ -144,17 +140,17 @@ start:
|
||||
mov eax,dword[icon_tl_sys]
|
||||
mov dword[tree1.data_img_sys],eax
|
||||
|
||||
include_image_file 'objects.png', icon_toolbar
|
||||
load_image_file 'objects.png', icon_toolbar
|
||||
mov eax,dword[icon_toolbar]
|
||||
mov dword[tree1.data_img],eax
|
||||
|
||||
include_image_file '../../fs/kfar/trunk/font8x9.bmp', image_data_toolbar
|
||||
load_image_file 'font8x9.bmp', image_data_toolbar
|
||||
stdcall [buf2d_create_f_img], buf_1,[image_data_toolbar] ;á®§¤ ¥¬ ¡ãä¥à
|
||||
stdcall mem.Free,[image_data_toolbar] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì
|
||||
stdcall [buf2d_conv_24_to_8], buf_1,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç®á⨠8 ¡¨â
|
||||
stdcall [buf2d_convert_text_matrix], buf_1
|
||||
|
||||
include_image_file 'toolbar.png', image_data_toolbar
|
||||
load_image_file fn_toolbar, image_data_toolbar
|
||||
|
||||
;à ¡®â á ä ©«®¬ áâ஥ª
|
||||
copy_path ini_name,sys_path,file_name,0
|
||||
@@ -235,7 +231,7 @@ start:
|
||||
call [gluNewQuadric]
|
||||
mov [qObj],eax
|
||||
|
||||
mov eax,[ctx1.gl_context]
|
||||
mov eax,dword[ctx1] ;eax -> TinyGLContext.GLContext
|
||||
mov eax,[eax] ;eax -> ZBuffer
|
||||
mov eax,[eax+ZBuffer.pbuf]
|
||||
mov dword[buf_ogl],eax
|
||||
@@ -1156,10 +1152,57 @@ l_libs_start:
|
||||
lib_2 l_libs lib_name_2, file_name, system_dir_2, import_box_lib
|
||||
lib_3 l_libs lib_name_3, file_name, system_dir_3, import_buf2d
|
||||
lib_4 l_libs lib_name_4, file_name, system_dir_4, import_libkmenu
|
||||
lib_5 l_libs lib_name_5, file_name, system_dir_5, import_tinygl
|
||||
lib_5 l_libs lib_name_5, file_name, system_dir_5, import_lib_tinygl
|
||||
lib_6 l_libs lib_name_6, file_name, system_dir_6, import_libini
|
||||
l_libs_end:
|
||||
|
||||
align 4
|
||||
import_libimg:
|
||||
dd alib_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 ;®¯à¥¤¥«ï¥â ¯® ¤ ë¬, ¬®¦¥â «¨ ¡¨¡«¨®â¥ª ᤥ« âì ¨§ ¨å ¨§®¡à ¦¥¨¥
|
||||
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 ;¯à¥®¡à §®¢ ¨¥ ¨§®¡à ¦¥¨ï ¢ ¤ ë¥ RGB
|
||||
aimg_to_rgb2 db 'img_to_rgb2',0
|
||||
aimg_decode db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ëå
|
||||
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
|
||||
import_proclib:
|
||||
OpenDialog_Init dd aOpenDialog_Init
|
||||
@@ -1172,10 +1215,122 @@ 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'
|
||||
align 4
|
||||
import_buf2d:
|
||||
dd sz_init0
|
||||
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_resize dd sz_buf2d_resize
|
||||
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_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_set_pixel dd sz_buf2d_set_pixel
|
||||
dd 0,0
|
||||
sz_init0 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_resize db 'buf2d_resize',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_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_set_pixel db 'buf2d_set_pixel',0
|
||||
|
||||
align 4
|
||||
import_box_lib:
|
||||
dd sz_init1
|
||||
edit_box_draw dd sz_edit_box_draw
|
||||
edit_box_key dd sz_edit_box_key
|
||||
edit_box_mouse dd sz_edit_box_mouse
|
||||
edit_box_set_text dd sz_edit_box_set_text
|
||||
scrollbar_ver_draw dd sz_scrollbar_ver_draw
|
||||
scrollbar_hor_draw dd sz_scrollbar_hor_draw
|
||||
|
||||
tl_data_init dd sz_tl_data_init
|
||||
tl_data_clear dd sz_tl_data_clear
|
||||
tl_info_clear dd sz_tl_info_clear
|
||||
tl_key dd sz_tl_key
|
||||
tl_mouse dd sz_tl_mouse
|
||||
tl_draw dd sz_tl_draw
|
||||
tl_info_undo dd sz_tl_info_undo
|
||||
tl_info_redo dd sz_tl_info_redo
|
||||
tl_node_add dd sz_tl_node_add
|
||||
tl_node_set_data dd sz_tl_node_set_data
|
||||
tl_node_get_data dd sz_tl_node_get_data
|
||||
tl_node_delete dd sz_tl_node_delete
|
||||
tl_node_move_up dd sz_tl_node_move_up
|
||||
tl_node_move_down dd sz_tl_node_move_down
|
||||
tl_cur_beg dd sz_tl_cur_beg
|
||||
tl_cur_next dd sz_tl_cur_next
|
||||
tl_cur_perv dd sz_tl_cur_perv
|
||||
tl_node_close_open dd sz_tl_node_close_open
|
||||
tl_node_lev_inc dd sz_tl_node_lev_inc
|
||||
tl_node_lev_dec dd sz_tl_node_lev_dec
|
||||
tl_node_poi_get_info dd sz_tl_node_poi_get_info
|
||||
tl_node_poi_get_next_info dd sz_tl_node_poi_get_next_info
|
||||
tl_node_poi_get_data dd sz_tl_node_poi_get_data
|
||||
|
||||
dd 0,0
|
||||
sz_init1 db 'lib_init',0
|
||||
sz_edit_box_draw db 'edit_box_draw',0
|
||||
sz_edit_box_key db 'edit_box_key',0
|
||||
sz_edit_box_mouse db 'edit_box_mouse',0
|
||||
sz_edit_box_set_text db 'edit_box_set_text',0
|
||||
sz_scrollbar_ver_draw db 'scrollbar_v_draw',0
|
||||
sz_scrollbar_hor_draw db 'scrollbar_h_draw',0
|
||||
|
||||
sz_tl_data_init db 'tl_data_init',0
|
||||
sz_tl_data_clear db 'tl_data_clear',0
|
||||
sz_tl_info_clear db 'tl_info_clear',0
|
||||
sz_tl_key db 'tl_key',0
|
||||
sz_tl_mouse db 'tl_mouse',0
|
||||
sz_tl_draw db 'tl_draw',0
|
||||
sz_tl_info_undo db 'tl_info_undo',0
|
||||
sz_tl_info_redo db 'tl_info_redo',0
|
||||
sz_tl_node_add db 'tl_node_add',0
|
||||
sz_tl_node_set_data db 'tl_node_set_data',0
|
||||
sz_tl_node_get_data db 'tl_node_get_data',0
|
||||
sz_tl_node_delete db 'tl_node_delete',0
|
||||
sz_tl_node_move_up db 'tl_node_move_up',0
|
||||
sz_tl_node_move_down db 'tl_node_move_down',0
|
||||
sz_tl_cur_beg db 'tl_cur_beg',0
|
||||
sz_tl_cur_next db 'tl_cur_next',0
|
||||
sz_tl_cur_perv db 'tl_cur_perv',0
|
||||
sz_tl_node_close_open db 'tl_node_close_open',0
|
||||
sz_tl_node_lev_inc db 'tl_node_lev_inc',0
|
||||
sz_tl_node_lev_dec db 'tl_node_lev_dec',0
|
||||
sz_tl_node_poi_get_info db 'tl_node_poi_get_info',0
|
||||
sz_tl_node_poi_get_next_info db 'tl_node_poi_get_next_info',0
|
||||
sz_tl_node_poi_get_data db 'tl_node_poi_get_data',0
|
||||
|
||||
align 4
|
||||
import_libkmenu:
|
||||
@@ -1201,7 +1356,19 @@ dd 0,0
|
||||
akmenuitem_delete db 'kmenuitem_delete',0
|
||||
akmenuitem_draw db 'kmenuitem_draw',0
|
||||
|
||||
include '../../develop/libraries/TinyGL/asm_fork/import.inc'
|
||||
align 4
|
||||
import_lib_tinygl:
|
||||
macro E_LIB n
|
||||
{
|
||||
n dd sz_#n
|
||||
}
|
||||
include '../../develop/libraries/TinyGL/asm_fork/export.inc'
|
||||
dd 0,0
|
||||
macro E_LIB n
|
||||
{
|
||||
sz_#n db `n,0
|
||||
}
|
||||
include '../../develop/libraries/TinyGL/asm_fork/export.inc'
|
||||
|
||||
align 4
|
||||
import_libini:
|
||||
@@ -1260,14 +1427,14 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ;
|
||||
lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; <20> à ¬¥âàë ä®®¢®£® ®á¢¥é¥¨ï
|
||||
|
||||
if lang eq ru_RU
|
||||
capt db 'info 3ds [user] ¢¥àá¨ï 07.05.25',0 ; ¯®¤¯¨áì ®ª
|
||||
capt db 'info 3ds [user] ¢¥àá¨ï 14.04.25',0 ; ¯®¤¯¨áì ®ª
|
||||
else ; Default to en_US
|
||||
capt db 'info 3ds [user] version 07.05.25',0 ; Window caption
|
||||
capt db 'info 3ds [user] version 14.04.25',0 ; Window caption
|
||||
end if
|
||||
|
||||
align 16
|
||||
i_end:
|
||||
ctx1 TinyGLContext
|
||||
ctx1 rb 28 ;sizeof.TinyGLContext = 28
|
||||
procinfo process_information
|
||||
run_file_70 FileInfoBlock
|
||||
sc system_colors
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
;
|
||||
; This file contains functions needed to create
|
||||
; and operate a window with vertex coordinates
|
||||
; ¢ í⮬ ä ©«¥ ᮡà ë äãªæ¨¨ ã¦ë¥ ¤«ï á®§¤ ¨ï ¨
|
||||
; à ¡®âë ®ª á ª®®à¤¨ â ¬¨ ¢¥àè¨
|
||||
;
|
||||
|
||||
3d_wnd_l equ 5 ;tinygl buffer left indent
|
||||
3d_wnd_t equ 23 ;tinygl buffer top indent
|
||||
3d_wnd_w equ 396
|
||||
prop_wnd_width equ 340 ;è¨à¨ ®ª ᮠ᢮©á⢠¬¨ ®¡ê¥ªâ
|
||||
prop_wnd_height equ 460 ;¢ëá®â ®ª ᮠ᢮©á⢠¬¨ ®¡ê¥ªâ
|
||||
3d_wnd_l equ 5 ;®âáâ㯠¤«ï tinygl ¡ãä¥à á«¥¢
|
||||
3d_wnd_t equ 23 ;®âáâ㯠¤«ï tinygl ¡ãä¥à ᢥàåã
|
||||
3d_wnd_w equ 320
|
||||
3d_wnd_h equ 240
|
||||
SIZE_ONE_FLOAT equ 14
|
||||
MAX_OBJECT_SIZE equ (4+SIZE_ONE_FLOAT*3+1)
|
||||
|
||||
align 4
|
||||
fl180 dd 180.0
|
||||
|
||||
prop_wnd_run db 0 ;variable that ensures that no more than 1 window with properties is launched at the same time
|
||||
prop_wnd_run db 0 ;¯¥à¥¬¥ ï á«¥¤ïé ï § ⥬ çâ®-¡ë ¥ § ¯ã᪠âì ¡®«ìè¥ 1-£® ®ª ᮠ᢮©á⢠¬¨ ®¤®¢à¥¬¥®
|
||||
|
||||
txt_q db '?',0
|
||||
txt_space:
|
||||
@@ -174,19 +173,19 @@ prop_still:
|
||||
jmp .end
|
||||
@@:
|
||||
|
||||
cmp al,EV_REDRAW
|
||||
cmp al,1 ;¨§¬. ¯®«®¦¥¨¥ ®ª
|
||||
jne @f
|
||||
call prop_red_win
|
||||
jmp .end
|
||||
@@:
|
||||
cmp al,EV_KEY
|
||||
cmp al,2
|
||||
jne @f
|
||||
call prop_key
|
||||
jmp .end
|
||||
@@:
|
||||
cmp al,EV_BUTTON
|
||||
cmp al,3
|
||||
jz prop_button
|
||||
cmp al,EV_MOUSE
|
||||
cmp al,6
|
||||
jne @f
|
||||
call prop_mouse
|
||||
@@:
|
||||
@@ -199,65 +198,20 @@ prop_red_win:
|
||||
pushad
|
||||
mcall SF_REDRAW,SSF_BEGIN_DRAW
|
||||
|
||||
mcall SF_STYLE_SETTINGS,SSF_GET_SKIN_HEIGHT
|
||||
push eax
|
||||
mcall SF_THREAD_INFO,procinfo,-1
|
||||
cmp dword[procinfo.box.height],0
|
||||
je .resize_end
|
||||
mov eax,[procinfo.box.height]
|
||||
sub eax,[esp]
|
||||
sub eax,[tree3.box_top]
|
||||
sub eax,5
|
||||
cmp eax,48
|
||||
jge @f
|
||||
mov eax,48 ;min size
|
||||
@@:
|
||||
mov dword[tree3.box_height],eax
|
||||
mov word[w_scr_t3.y_size],ax
|
||||
mov ebx,[procinfo.box.width]
|
||||
sub ebx,37
|
||||
cmp ebx,240
|
||||
jge @f
|
||||
mov ebx,240
|
||||
@@:
|
||||
mov [tree3.box_width],ebx
|
||||
add ebx,[tree3.box_left]
|
||||
mov word[w_scr_t3.x_pos],bx
|
||||
;todo: resize scroll slider
|
||||
|
||||
mov eax,[tree3.box_width]
|
||||
add eax,16
|
||||
cmp [buf_ogl.w],eax
|
||||
je .resize_end
|
||||
mov [buf_ogl.w],eax
|
||||
fild dword[buf_ogl.w]
|
||||
fld st0
|
||||
fdiv dword[fl180]
|
||||
fstp dword[angle_dxm]
|
||||
fidiv dword[buf_0.h]
|
||||
fstp dword[ratio]
|
||||
stdcall [glViewport], 0,0, [buf_ogl.w], 3d_wnd_h
|
||||
stdcall obj_set_sizes, o3d
|
||||
.resize_end:
|
||||
|
||||
xor eax,eax
|
||||
mov edi,dword[capt_p] ;children window caption
|
||||
mov bx,word[procinfo.box.left]
|
||||
add bx,word[buf_0.l]
|
||||
add bx,5 ;side frame width
|
||||
add bx,5 ;è¨à¨ ¡®ª®¢®© à ¬ª¨
|
||||
shl ebx,16
|
||||
mov bx,word[tree3.box_width]
|
||||
add bx,37
|
||||
mov bx,prop_wnd_width
|
||||
mov cx,word[procinfo.box.top]
|
||||
add cx,word[buf_0.t]
|
||||
shl ecx,16
|
||||
pop eax
|
||||
add eax,[tree3.box_height]
|
||||
add eax,[tree3.box_top]
|
||||
add eax,5
|
||||
mov cx,ax
|
||||
mov cx,prop_wnd_height
|
||||
mov edx,[sc.work]
|
||||
or edx,0x33000000
|
||||
mcall SF_CREATE_WINDOW
|
||||
int 0x40
|
||||
|
||||
mov esi,[sc.work_button]
|
||||
mcall SF_DEFINE_BUTTON, (5 shl 16)+20, (266 shl 16)+20, 0x40000003
|
||||
@@ -272,7 +226,7 @@ pushad
|
||||
int 0x40
|
||||
|
||||
mov dword[w_scr_t3.all_redraw],1
|
||||
stdcall [scrollbar_v_draw], w_scr_t3
|
||||
stdcall [scrollbar_ver_draw],dword w_scr_t3
|
||||
stdcall [tl_draw], tree3
|
||||
stdcall [edit_box_draw], edit1
|
||||
stdcall [edit_box_draw], edit2
|
||||
@@ -362,9 +316,9 @@ prop_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
|
||||
@@:
|
||||
and eax,0xffff ;mouse.y
|
||||
cmp eax,3d_wnd_t
|
||||
@@ -380,14 +334,14 @@ prop_mouse:
|
||||
fild dword[mouse_y]
|
||||
mov [mouse_y],eax
|
||||
fisub dword[mouse_y]
|
||||
fdiv dword[angle_dym] ;if the cursor moves along the y axis
|
||||
fdiv dword[angle_dxm] ;¥á«¨ ªãàá®à ¤¢¨¦¥âáï ¯® ®á¨ y (¢¢¥àå ¨«¨ ¢¨§) â® ¯®¢®à®â ¤¥« ¥¬ ¢®ªà㣠®á¨ x
|
||||
fadd dword[angle_x]
|
||||
fstp dword[angle_x]
|
||||
|
||||
fild dword[mouse_x]
|
||||
mov [mouse_x],ebx
|
||||
fisub dword[mouse_x]
|
||||
fdiv dword[angle_dxm] ;if the cursor moves along the x axis
|
||||
fdiv dword[angle_dym] ;¥á«¨ ªãàá®à ¤¢¨¦¥âáï ¯® ®á¨ x (¢¢¥àå ¨«¨ ¢¨§) â® ¯®¢®à®â ¤¥« ¥¬ ¢®ªà㣠®á¨ y
|
||||
fadd dword[angle_y]
|
||||
fstp dword[angle_y]
|
||||
|
||||
@@ -409,7 +363,7 @@ prop_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
|
||||
and eax,0xffff ;mouse.y
|
||||
cmp eax,3d_wnd_t
|
||||
@@ -857,7 +811,7 @@ capt_p dd 0
|
||||
|
||||
;¤¥à¥¢® á ®¡ê¥ªâ ¬¨ ¢ ¯®«ì§®¢ ⥫ì᪮¬ ä ©«¥
|
||||
tree3 tree_list MAX_OBJECT_SIZE,3, tl_key_no_edit+tl_list_box_mode,\
|
||||
16,16, 0xffffff,0xb0d0ff,0x10400040, 5,290,380,140, 16, 4,0, el_focus,\
|
||||
16,16, 0xffffff,0xb0d0ff,0x400040, 5,290,303,140, 16, 4,0, el_focus,\
|
||||
w_scr_t3,get_point_coords
|
||||
|
||||
edit1 edit_box 80, 76, 269, 0xffd0d0, 0xff, 0x80ff, 0, 0x8000, 32, string1, mouse_dd, 0
|
||||
|
||||
Reference in New Issue
Block a user