forked from KolibriOS/kolibrios
update code
git-svn-id: svn://kolibrios.org@6237 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
3986546932
commit
10e90697bc
@ -136,6 +136,7 @@ extra_files = {
|
|||||||
{"kolibrios/3D/info3ds/OBJECTS.PNG", PROGS .. "/develop/info3ds/objects.png"},
|
{"kolibrios/3D/info3ds/OBJECTS.PNG", PROGS .. "/develop/info3ds/objects.png"},
|
||||||
{"kolibrios/3D/info3ds/TL_SYS_16.PNG", PROGS .. "/develop/info3ds/tl_sys_16.png"},
|
{"kolibrios/3D/info3ds/TL_SYS_16.PNG", PROGS .. "/develop/info3ds/tl_sys_16.png"},
|
||||||
{"kolibrios/3D/info3ds/TOOLBAR.PNG", PROGS .. "/develop/info3ds/toolbar.png"},
|
{"kolibrios/3D/info3ds/TOOLBAR.PNG", PROGS .. "/develop/info3ds/toolbar.png"},
|
||||||
|
{"kolibrios/3D/info3ds/FONT8X9.BMP", PROGS .. "/fs/kfar/trunk/font8x9.bmp"},
|
||||||
{"kolibrios/emul/dosbox/", "common/emul/DosBox/*"},
|
{"kolibrios/emul/dosbox/", "common/emul/DosBox/*"},
|
||||||
{"kolibrios/emul/e80/readme.txt", PROGS .. "/emulator/e80/trunk/readme.txt"},
|
{"kolibrios/emul/e80/readme.txt", PROGS .. "/emulator/e80/trunk/readme.txt"},
|
||||||
{"kolibrios/emul/fceu/fceu", PROGS .. "/emulator/fceu/fceu"},
|
{"kolibrios/emul/fceu/fceu", PROGS .. "/emulator/fceu/fceu"},
|
||||||
|
@ -6,10 +6,9 @@ use32
|
|||||||
include '../../macros.inc'
|
include '../../macros.inc'
|
||||||
include '../../proc32.inc'
|
include '../../proc32.inc'
|
||||||
include '../../KOSfuncs.inc'
|
include '../../KOSfuncs.inc'
|
||||||
include '../../develop/libraries/box_lib/load_lib.mac'
|
include '../../load_img.inc'
|
||||||
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||||
include '../../develop/libraries/TinyGL/asm_fork/opengl_const.inc'
|
include '../../develop/libraries/TinyGL/asm_fork/opengl_const.inc'
|
||||||
include '../../dll.inc'
|
|
||||||
include 'lang.inc'
|
include 'lang.inc'
|
||||||
include 'info_fun_float.inc'
|
include 'info_fun_float.inc'
|
||||||
include 'info_menu.inc'
|
include 'info_menu.inc'
|
||||||
@ -19,16 +18,6 @@ version_edit equ 1
|
|||||||
|
|
||||||
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
||||||
|
|
||||||
struct FileInfoBlock
|
|
||||||
Function dd ?
|
|
||||||
Position dd ?
|
|
||||||
Flags dd ?
|
|
||||||
Count dd ?
|
|
||||||
Buffer dd ?
|
|
||||||
db ?
|
|
||||||
FileName dd ?
|
|
||||||
ends
|
|
||||||
|
|
||||||
ID_ICON_CHUNK_MAIN equ 0 ;¨ª®ª £« ¢®£® ¡«®ª
|
ID_ICON_CHUNK_MAIN equ 0 ;¨ª®ª £« ¢®£® ¡«®ª
|
||||||
ID_ICON_CHUNK_NOT_FOUND equ 1 ;¨ª®ª ¥ ¨§¢¥á⮣® ¡«®ª
|
ID_ICON_CHUNK_NOT_FOUND equ 1 ;¨ª®ª ¥ ¨§¢¥á⮣® ¡«®ª
|
||||||
ID_ICON_DATA equ 2 ;¨ª®ª ¤«ï ¤ ëå ¡«®ª , ¥ ®¯à¥¤¥«¥®© áâàãªâãàë
|
ID_ICON_DATA equ 2 ;¨ª®ª ¤«ï ¤ ëå ¡«®ª , ¥ ®¯à¥¤¥«¥®© áâàãªâãàë
|
||||||
@ -39,65 +28,19 @@ FILE_ERROR_CHUNK_SIZE equ -3 ;
|
|||||||
|
|
||||||
include 'info_o3d.inc'
|
include 'info_o3d.inc'
|
||||||
|
|
||||||
|
main_wnd_height equ 460 ;¢ëá®â £« ¢®£® ®ª ¯à®£à ¬¬ë
|
||||||
|
IMAGE_TOOLBAR_ICON_SIZE equ 21*21*3
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
fl255 dd 255.0
|
fl255 dd 255.0
|
||||||
image_data dd 0 ;㪠§ â¥«ì ¢à¥¬¥ãî ¯ ¬ïâì, 㦥 ¤«ï ¯à¥®¡à §®¢ ¨ï ¨§®¡à ¦¥¨ï
|
|
||||||
open_file_data dd 0 ;㪠§ â¥«ì ¯ ¬ïâì ¤«ï ®âªàëâ¨ï ä ©«®¢ 3ds
|
open_file_data dd 0 ;㪠§ â¥«ì ¯ ¬ïâì ¤«ï ®âªàëâ¨ï ä ©«®¢ 3ds
|
||||||
open_file_size dd 0 ;à §¬¥à ®âªàë⮣® ä ©«
|
open_file_size dd 0 ;à §¬¥à ®âªàë⮣® ä ©«
|
||||||
open_b rb 560
|
|
||||||
|
|
||||||
;
|
|
||||||
main_wnd_height equ 460 ;¢ëá®â £« ¢®£® ®ª ¯à®£à ¬¬ë
|
|
||||||
fn_toolbar db 'toolbar.png',0
|
|
||||||
IMAGE_TOOLBAR_ICON_SIZE equ 21*21*3
|
|
||||||
IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*12+54
|
|
||||||
image_data_toolbar dd 0
|
image_data_toolbar dd 0
|
||||||
;
|
|
||||||
TREE_ICON_SYS16_BMP_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*11+54 ;à §¬¥à bmp ä ©« á á¨á⥬묨 ¨ª®ª ¬¨
|
|
||||||
icon_tl_sys dd 0 ;㪠§ ⥥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï á¨á⥬ëå ¨ª®®ª
|
icon_tl_sys dd 0 ;㪠§ ⥥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï á¨á⥬ëå ¨ª®®ª
|
||||||
icon_toolbar dd 0 ;㪠§ ⥥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï ¨ª®®ª ®¡ê¥ªâ®¢
|
icon_toolbar dd 0 ;㪠§ ⥥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï ¨ª®®ª ®¡ê¥ªâ®¢
|
||||||
IMAGE_CHUNKS_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*12+54 ;à §¬¥à bmp ä ©« á ¨ª®ª ¬¨ ®¡ê¥ªâ®¢
|
fn_toolbar db 'toolbar.png',0
|
||||||
;
|
|
||||||
IMAGE_FILE1_SIZE equ 128*144*3+54 ;à §¬¥à ä ©« á ¨§®¡à ¦¥¨¥¬
|
|
||||||
|
|
||||||
macro load_image_file path,buf,size { ;¬ ªà®á ¤«ï § £à㧪¨ ¨§®¡à ¦¥¨©
|
align 4
|
||||||
;path - ¬®¦¥â ¡ëâì ¯¥à¥¬¥®© ¨«¨ áâப®¢ë¬ ¯ à ¬¥â஬
|
|
||||||
if path eqtype '' ;¯à®¢¥à塞 § ¤ «¨ áâப®© ¯ à ¬¥âà path
|
|
||||||
jmp @f
|
|
||||||
local .path_str
|
|
||||||
.path_str db path ;ä®à¬¨à㥬 «®ª «ìãî ¯¥à¥¬¥ãî
|
|
||||||
db 0
|
|
||||||
@@:
|
|
||||||
;32 - áâ ¤ àâë© ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥ ¡ëâì ¡ãä¥à á á¨áâ¥¬ë¬ ¯ã⥬
|
|
||||||
copy_path .path_str,[32],file_name,0
|
|
||||||
else
|
|
||||||
copy_path path,[32],file_name,0 ;ä®à¬¨à㥬 ¯®«ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ® ¢ ®¤®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
|
|
||||||
end if
|
|
||||||
|
|
||||||
stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥¨ï
|
|
||||||
mov [buf],eax
|
|
||||||
|
|
||||||
mov [run_file_70.Function], SSF_READ_FILE
|
|
||||||
mov [run_file_70.Position], 0
|
|
||||||
mov [run_file_70.Flags], 0
|
|
||||||
mov [run_file_70.Count], dword size
|
|
||||||
mov [run_file_70.Buffer], eax
|
|
||||||
mov byte[run_file_70+20], 0
|
|
||||||
mov [run_file_70.FileName], file_name
|
|
||||||
mcall SF_FILE,run_file_70 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥¨ï
|
|
||||||
cmp ebx,0xffffffff
|
|
||||||
je @f
|
|
||||||
;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥ë© ¡ãä¥à image_data
|
|
||||||
stdcall dword[img_decode], dword[buf],ebx,0
|
|
||||||
mov dword[image_data],eax
|
|
||||||
;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥¨¥ ª ä®à¬ âã rgb
|
|
||||||
stdcall dword[img_to_rgb2], dword[image_data],dword[buf]
|
|
||||||
;㤠«ï¥¬ ¢à¥¬¥ë© ¡ãä¥à image_data
|
|
||||||
stdcall dword[img_destroy], dword[image_data]
|
|
||||||
@@:
|
|
||||||
}
|
|
||||||
|
|
||||||
;--------------------------------------
|
|
||||||
level_stack dd 0
|
level_stack dd 0
|
||||||
offs_last_timer dd 0 ;¯®á«¥¤¨© ᤢ¨£ ¯®ª § ë© ¢ äãªæ¨¨ â ©¬¥à
|
offs_last_timer dd 0 ;¯®á«¥¤¨© ᤢ¨£ ¯®ª § ë© ¢ äãªæ¨¨ â ©¬¥à
|
||||||
|
|
||||||
@ -191,25 +134,25 @@ start:
|
|||||||
mov dword[w_scr_t1.type],1
|
mov dword[w_scr_t1.type],1
|
||||||
stdcall dword[tl_data_init], tree1
|
stdcall dword[tl_data_init], tree1
|
||||||
;á¨áâ¥¬ë¥ ¨ª®ª¨ 16*16 ¤«ï tree_list
|
;á¨áâ¥¬ë¥ ¨ª®ª¨ 16*16 ¤«ï tree_list
|
||||||
load_image_file 'tl_sys_16.png', icon_tl_sys,TREE_ICON_SYS16_BMP_SIZE
|
load_image_file 'tl_sys_16.png', icon_tl_sys
|
||||||
;¥á«¨ ¨§®¡à ¦¥¨¥ ¥ ®âªàë«®áì, â® ¢ icon_tl_sys ¡ã¤ãâ
|
;¥á«¨ ¨§®¡à ¦¥¨¥ ¥ ®âªàë«®áì, â® ¢ icon_tl_sys ¡ã¤ãâ
|
||||||
;¥ ¨¨æ¨ «¨§¨à®¢ ë¥ ¤ ë¥, ® ®è¨¡ª¨ ¥ ¡ã¤¥â, â. ª. ¡ãä¥à 㦮£® à §¬¥à
|
;¥ ¨¨æ¨ «¨§¨à®¢ ë¥ ¤ ë¥, ® ®è¨¡ª¨ ¥ ¡ã¤¥â, â. ª. ¡ãä¥à 㦮£® à §¬¥à
|
||||||
mov eax,dword[icon_tl_sys]
|
mov eax,dword[icon_tl_sys]
|
||||||
mov dword[tree1.data_img_sys],eax
|
mov dword[tree1.data_img_sys],eax
|
||||||
|
|
||||||
load_image_file 'objects.png', icon_toolbar,IMAGE_CHUNKS_SIZE
|
load_image_file 'objects.png', icon_toolbar
|
||||||
mov eax,dword[icon_toolbar]
|
mov eax,dword[icon_toolbar]
|
||||||
mov dword[tree1.data_img],eax
|
mov dword[tree1.data_img],eax
|
||||||
|
|
||||||
stdcall [buf2d_create], buf_0 ;ᮧ¤ ¨¥ ¡ãä¥à
|
stdcall [buf2d_create], buf_0 ;ᮧ¤ ¨¥ ¡ãä¥à
|
||||||
|
|
||||||
load_image_file 'font8x9.bmp', image_data_toolbar,IMAGE_FILE1_SIZE
|
load_image_file 'font8x9.bmp', image_data_toolbar
|
||||||
stdcall [buf2d_create_f_img], buf_1,[image_data_toolbar] ;ᮧ¤ ¥¬ ¡ãä¥à
|
stdcall [buf2d_create_f_img], buf_1,[image_data_toolbar] ;ᮧ¤ ¥¬ ¡ãä¥à
|
||||||
stdcall mem.Free,[image_data_toolbar] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì
|
stdcall mem.Free,[image_data_toolbar] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì
|
||||||
stdcall [buf2d_conv_24_to_8], buf_1,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç®á⨠8 ¡¨â
|
stdcall [buf2d_conv_24_to_8], buf_1,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç®á⨠8 ¡¨â
|
||||||
stdcall [buf2d_convert_text_matrix], buf_1
|
stdcall [buf2d_convert_text_matrix], buf_1
|
||||||
|
|
||||||
load_image_file fn_toolbar, image_data_toolbar,IMAGE_TOOLBAR_SIZE
|
load_image_file fn_toolbar, image_data_toolbar
|
||||||
|
|
||||||
;à ¡®â á ä ©«®¬ áâ஥ª
|
;à ¡®â á ä ©«®¬ áâ஥ª
|
||||||
copy_path ini_name,sys_path,file_name,0
|
copy_path ini_name,sys_path,file_name,0
|
||||||
@ -1133,15 +1076,15 @@ l_libs_start:
|
|||||||
err_msg_found_lib_0, head_f_l, proclib_import,err_msg_import_0, head_f_i
|
err_msg_found_lib_0, head_f_l, proclib_import,err_msg_import_0, head_f_i
|
||||||
lib_1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\
|
lib_1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\
|
||||||
err_msg_found_lib_1, head_f_l, import_libimg, err_msg_import_1, head_f_i
|
err_msg_found_lib_1, head_f_l, import_libimg, err_msg_import_1, head_f_i
|
||||||
lib_2 l_libs lib_name_2, sys_path, library_path, system_dir_2,\
|
lib_2 l_libs lib_name_2, sys_path, file_name, system_dir_2,\
|
||||||
err_msg_found_lib_2, head_f_l, import_box_lib,err_msg_import_2,head_f_i
|
err_msg_found_lib_2, head_f_l, import_box_lib,err_msg_import_2,head_f_i
|
||||||
lib_3 l_libs lib_name_3, sys_path, library_path, system_dir_3,\
|
lib_3 l_libs lib_name_3, sys_path, file_name, system_dir_3,\
|
||||||
err_msg_found_lib_3, head_f_l, import_buf2d, err_msg_import_3,head_f_i
|
err_msg_found_lib_3, head_f_l, import_buf2d, err_msg_import_3,head_f_i
|
||||||
lib_4 l_libs lib_name_4, sys_path, library_path, system_dir_4,\
|
lib_4 l_libs lib_name_4, sys_path, file_name, system_dir_4,\
|
||||||
err_msg_found_lib_4, head_f_l, import_libkmenu,err_msg_import_4,head_f_i
|
err_msg_found_lib_4, head_f_l, import_libkmenu,err_msg_import_4,head_f_i
|
||||||
lib_5 l_libs lib_name_5, sys_path, library_path, system_dir_5,\
|
lib_5 l_libs lib_name_5, sys_path, file_name, system_dir_5,\
|
||||||
err_msg_found_lib_5, head_f_l, import_lib_tinygl,err_msg_import_5,head_f_i
|
err_msg_found_lib_5, head_f_l, import_lib_tinygl,err_msg_import_5,head_f_i
|
||||||
lib_6 l_libs lib_name_6, sys_path, library_path, system_dir_6,\
|
lib_6 l_libs lib_name_6, sys_path, file_name, system_dir_6,\
|
||||||
err_msg_found_lib_6, head_f_l, import_libini, err_msg_import_6,head_f_i
|
err_msg_found_lib_6, head_f_l, import_libini, err_msg_import_6,head_f_i
|
||||||
l_libs_end:
|
l_libs_end:
|
||||||
|
|
||||||
@ -1390,7 +1333,7 @@ buf_ogl:
|
|||||||
align 4
|
align 4
|
||||||
buf_1:
|
buf_1:
|
||||||
dd 0 ;㪠§ â¥«ì ¡ãä¥à ¨§®¡à ¦¥¨ï
|
dd 0 ;㪠§ â¥«ì ¡ãä¥à ¨§®¡à ¦¥¨ï
|
||||||
dw 25,25 ;+4 left,top
|
dw 0,0 ;+4 left,top
|
||||||
dd 128,144 ;+8 w,h
|
dd 128,144 ;+8 w,h
|
||||||
dd 0,24 ;+16 color,bit in pixel
|
dd 0,24 ;+16 color,bit in pixel
|
||||||
|
|
||||||
@ -1419,9 +1362,9 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ;
|
|||||||
lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; <20> à ¬¥âàë ä®®¢®£® ®á¢¥é¥¨ï
|
lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; <20> à ¬¥âàë ä®®¢®£® ®á¢¥é¥¨ï
|
||||||
|
|
||||||
if lang eq ru
|
if lang eq ru
|
||||||
capt db 'info 3ds ¢¥àá¨ï 08.02.16',0 ;¯®¤¯¨áì ®ª
|
capt db 'info 3ds ¢¥àá¨ï 16.02.16',0 ;¯®¤¯¨áì ®ª
|
||||||
else
|
else
|
||||||
capt db 'info 3ds version 08.02.16',0 ;window caption
|
capt db 'info 3ds version 16.02.16',0 ;window caption
|
||||||
end if
|
end if
|
||||||
|
|
||||||
align 16
|
align 16
|
||||||
@ -1445,10 +1388,10 @@ i_end:
|
|||||||
align 16
|
align 16
|
||||||
thread_coords:
|
thread_coords:
|
||||||
rb 2048
|
rb 2048
|
||||||
|
align 16
|
||||||
stacktop:
|
stacktop:
|
||||||
sys_path rb 2048
|
sys_path rb 2048
|
||||||
file_name rb 4096
|
file_name rb 4096
|
||||||
library_path rb 2048
|
|
||||||
plugin_path rb 4096
|
plugin_path rb 4096
|
||||||
openfile_path rb 4096
|
openfile_path rb 4096
|
||||||
filename_area rb 256
|
filename_area rb 256
|
||||||
|
Loading…
Reference in New Issue
Block a user