From 0fa13bc0d9fe6a921e089675b4798d6b01845a09 Mon Sep 17 00:00:00 2001 From: IgorA Date: Sat, 17 May 2025 21:59:17 +0300 Subject: [PATCH] Info3ds: added resizing of the window with the figure --- data/Tupfile.lua | 3 - programs/develop/info3ds/info3ds.asm | 279 ++++-------------- programs/develop/info3ds/info3ds_u.asm | 203 ++----------- programs/develop/info3ds/info_wnd_coords.inc | 94 ++++-- .../libraries/TinyGL/asm_fork/import.inc | 18 ++ programs/develop/libraries/box_lib/export.inc | 117 ++++++++ programs/develop/libraries/box_lib/import.inc | 24 ++ programs/develop/libraries/buf2d/export.inc | 48 +++ programs/develop/libraries/buf2d/import.inc | 20 ++ .../libraries/libs-dev/libimg/export.inc | 34 +++ .../libraries/libs-dev/libimg/import.inc | 20 ++ 11 files changed, 421 insertions(+), 439 deletions(-) create mode 100644 programs/develop/libraries/TinyGL/asm_fork/import.inc create mode 100644 programs/develop/libraries/box_lib/export.inc create mode 100644 programs/develop/libraries/box_lib/import.inc create mode 100644 programs/develop/libraries/buf2d/export.inc create mode 100644 programs/develop/libraries/buf2d/import.inc create mode 100644 programs/develop/libraries/libs-dev/libimg/export.inc create mode 100644 programs/develop/libraries/libs-dev/libimg/import.inc diff --git a/data/Tupfile.lua b/data/Tupfile.lua index 8c8d302e5..b0bb4cfa1 100644 --- a/data/Tupfile.lua +++ b/data/Tupfile.lua @@ -152,9 +152,6 @@ 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/*"}, diff --git a/programs/develop/info3ds/info3ds.asm b/programs/develop/info3ds/info3ds.asm index 107b28a17..3484b7b22 100644 --- a/programs/develop/info3ds/info3ds.asm +++ b/programs/develop/info3ds/info3ds.asm @@ -1,6 +1,10 @@ +; 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' ;идентиф. исполняемого файла всегда 8 байт + db 'MENUET01' dd 1, start, i_end, mem, stacktop, file_name, sys_path version_edit equ 1 @@ -22,36 +26,34 @@ include 'convert_stl_3ds.inc' @use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load -ID_ICON_CHUNK_MAIN equ 0 ;иконка главного блока -ID_ICON_CHUNK_NOT_FOUND equ 1 ;иконка не известного блока -ID_ICON_DATA equ 2 ;иконка для данных блока, не определенной структуры +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_POINT equ 8 ID_ICON_POINT_SEL equ 9 -FILE_ERROR_CHUNK_SIZE equ -3 ;ошибка в размере блока +FILE_ERROR_CHUNK_SIZE equ -3 ;block size error include 'info_o3d.inc' -main_wnd_height equ 460 ;высота главного окна программы +main_wnd_height equ 460 ;height of the main program window IMAGE_TOOLBAR_ICON_SIZE equ 21*21*3 align 4 fl255 dd 255.0 -open_file_data dd 0 ;указатель на память для открытия файлов 3ds -open_file_size dd 0 ;размер открытого файла +open_file_data dd 0 ;pointer to memory for opening 3ds files +open_file_size dd 0 image_data_toolbar dd 0 -icon_tl_sys dd 0 ;указатеель на память для хранения системных иконок -icon_toolbar dd 0 ;указатеель на память для хранения иконок объектов -fn_toolbar db 'toolbar.png',0 +icon_tl_sys dd 0 ;pointer to memory for storing system icons +icon_toolbar dd 0 ;pointer to memory for storing object icons -align 4 level_stack dd 0 -offs_last_timer dd 0 ;последний сдвиг показаный в функции таймера +offs_last_timer dd 0 ;last shift shown in timer function align 4 -file_3ds: ;переменные используемые при открытии файла -.offs: dd 0 ;+0 указатель на начало блока -.size: dd 0 ;+4 размер блока (для 1-го параметра = размер файла 3ds) +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) rb 8*MAX_FILE_LEVEL size_one_list equ 42 @@ -81,7 +83,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 @@ -94,7 +96,7 @@ start: mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors mcall SF_SET_EVENTS_MASK,0xC0000027 - stdcall [OpenDialog_Init],OpenDialog_data ;подготовка диалога + stdcall [OpenDialog_Init],OpenDialog_data ;preparation of dialogue ;kmenu initialisation stdcall [kmenu_init],sc @@ -143,70 +145,68 @@ start: stdcall [tl_data_init], tree1 ;системные иконки 16*16 для tree_list include_image_file 'tl_sys_16.png', icon_tl_sys - ;если изображение не открылось, то в icon_tl_sys будут - ;не инициализированные данные, но ошибки не будет, т. к. буфер нужного размера - mov eax,dword[icon_tl_sys] - mov dword[tree1.data_img_sys],eax + mov eax,[icon_tl_sys] + mov [tree1.data_img_sys],eax - load_image_file 'objects.png', icon_toolbar - mov eax,dword[icon_toolbar] - mov dword[tree1.data_img],eax + include_image_file 'objects.png', icon_toolbar + mov eax,[icon_toolbar] + mov [tree1.data_img],eax stdcall [buf2d_create], buf_0 ;создание буфера - load_image_file 'font8x9.bmp', image_data_toolbar + include_image_file '../../fs/kfar/trunk/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 - load_image_file fn_toolbar, image_data_toolbar + include_image_file 'toolbar.png', image_data_toolbar ;работа с файлом настроек copy_path ini_name,sys_path,file_name,0 mov dword[def_dr_mode],0 - stdcall dword[ini_get_int],file_name,ini_sec_w3d,key_dv,1 + stdcall [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 dword[ini_get_int],file_name,ini_sec_w3d,key_df,1 + stdcall [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 dword[ini_get_int],file_name,ini_sec_w3d,key_dff,1 + stdcall [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 dword[ini_get_int],file_name,ini_sec_w3d,key_dl,1 + stdcall [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 dword[ini_get_int],file_name,ini_sec_w3d,key_ds,1 + stdcall [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 dword[ini_get_color],file_name,ini_sec_w3d,key_ox,0x0000ff + stdcall [ini_get_color],file_name,ini_sec_w3d,key_ox,0x0000ff mov [color_ox],eax - stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_oy,0xff0000 + stdcall [ini_get_color],file_name,ini_sec_w3d,key_oy,0xff0000 mov [color_oy],eax - stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_oz,0x00ff00 + stdcall [ini_get_color],file_name,ini_sec_w3d,key_oz,0x00ff00 mov [color_oz],eax - stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_bk,0x000000 + stdcall [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 dword[ini_get_color],file_name,ini_sec_w3d,key_vert,0xffffff + stdcall [ini_get_color],file_name,ini_sec_w3d,key_vert,0xffffff mov [color_vert],eax - stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_face,0x808080 + stdcall [ini_get_color],file_name,ini_sec_w3d,key_face,0x808080 mov [color_face],eax - stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_select,0xffff00 + stdcall [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,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] @@ -282,7 +282,7 @@ still: align 4 mouse: - stdcall [tl_mouse], dword tree1 + stdcall [tl_mouse], tree1 ret align 4 @@ -457,7 +457,7 @@ popad align 4 key: mcall SF_GET_KEY - stdcall [tl_key], dword tree1 + stdcall [tl_key], tree1 jmp still @@ -1087,53 +1087,6 @@ 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 @@ -1146,122 +1099,10 @@ dd 0,0 aOpenDialog_Set_file_name db 'OpenDialog_set_file_name',0 aOpenDialog_Set_file_ext db 'OpenDialog_set_file_ext',0 -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 +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_libkmenu: @@ -1287,23 +1128,7 @@ dd 0,0 akmenuitem_delete db 'kmenuitem_delete',0 akmenuitem_draw db 'kmenuitem_draw',0 -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' +include '../../develop/libraries/TinyGL/asm_fork/import.inc' align 4 import_libini: @@ -1367,9 +1192,9 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ; lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; Параметры фонового освещения if lang eq ru_RU -capt db 'info 3ds версия 04.05.25',0 ;подпись окна +capt db 'info 3ds версия 08.05.25',0 else ; Default to en_US -capt db 'info 3ds version 04.05.25',0 ;window caption +capt db 'info 3ds version 08.05.25',0 ;window caption end if align 16 diff --git a/programs/develop/info3ds/info3ds_u.asm b/programs/develop/info3ds/info3ds_u.asm index 29fdff4f5..64d3e9924 100644 --- a/programs/develop/info3ds/info3ds_u.asm +++ b/programs/develop/info3ds/info3ds_u.asm @@ -1,3 +1,7 @@ +; 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 байт @@ -12,6 +16,7 @@ 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' @@ -49,7 +54,6 @@ 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 ; @@ -140,17 +144,17 @@ start: mov eax,dword[icon_tl_sys] mov dword[tree1.data_img_sys],eax - load_image_file 'objects.png', icon_toolbar + include_image_file 'objects.png', icon_toolbar mov eax,dword[icon_toolbar] mov dword[tree1.data_img],eax - load_image_file 'font8x9.bmp', image_data_toolbar + include_image_file '../../fs/kfar/trunk/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 - load_image_file fn_toolbar, image_data_toolbar + include_image_file 'toolbar.png', image_data_toolbar ;работа с файлом настроек copy_path ini_name,sys_path,file_name,0 @@ -231,7 +235,7 @@ start: call [gluNewQuadric] mov [qObj],eax - mov eax,dword[ctx1] ;eax -> TinyGLContext.GLContext + mov eax,[ctx1.gl_context] mov eax,[eax] ;eax -> ZBuffer mov eax,[eax+ZBuffer.pbuf] mov dword[buf_ogl],eax @@ -1152,57 +1156,10 @@ 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_lib_tinygl + lib_5 l_libs lib_name_5, file_name, system_dir_5, import_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 @@ -1215,122 +1172,10 @@ dd 0,0 aOpenDialog_Set_file_name db 'OpenDialog_set_file_name',0 aOpenDialog_Set_file_ext db 'OpenDialog_set_file_ext',0 -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 +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_libkmenu: @@ -1356,19 +1201,7 @@ dd 0,0 akmenuitem_delete db 'kmenuitem_delete',0 akmenuitem_draw db 'kmenuitem_draw',0 -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' +include '../../develop/libraries/TinyGL/asm_fork/import.inc' align 4 import_libini: @@ -1427,14 +1260,14 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ; lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; Параметры фонового освещения if lang eq ru_RU -capt db 'info 3ds [user] версия 14.04.25',0 ; подпись окна +capt db 'info 3ds [user] версия 07.05.25',0 ; подпись окна else ; Default to en_US -capt db 'info 3ds [user] version 14.04.25',0 ; Window caption +capt db 'info 3ds [user] version 07.05.25',0 ; Window caption end if align 16 i_end: - ctx1 rb 28 ;sizeof.TinyGLContext = 28 + ctx1 TinyGLContext procinfo process_information run_file_70 FileInfoBlock sc system_colors diff --git a/programs/develop/info3ds/info_wnd_coords.inc b/programs/develop/info3ds/info_wnd_coords.inc index b4af7c850..77ce3153a 100644 --- a/programs/develop/info3ds/info_wnd_coords.inc +++ b/programs/develop/info3ds/info_wnd_coords.inc @@ -1,18 +1,19 @@ ; -; в этом файле собраны функции нужные для создания и -; работы окна с координатами вершин +; This file contains functions needed to create +; and operate a window with vertex coordinates ; -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_l equ 5 ;tinygl buffer left indent +3d_wnd_t equ 23 ;tinygl buffer top indent +3d_wnd_w equ 396 3d_wnd_h equ 240 SIZE_ONE_FLOAT equ 14 MAX_OBJECT_SIZE equ (4+SIZE_ONE_FLOAT*3+1) -prop_wnd_run db 0 ;переменная следящая за тем что-бы не запускать больше 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 txt_q db '?',0 txt_space: @@ -173,19 +174,19 @@ prop_still: jmp .end @@: - cmp al,1 ;изм. положение окна + cmp al,EV_REDRAW jne @f call prop_red_win jmp .end @@: - cmp al,2 + cmp al,EV_KEY jne @f call prop_key jmp .end @@: - cmp al,3 + cmp al,EV_BUTTON jz prop_button - cmp al,6 + cmp al,EV_MOUSE jne @f call prop_mouse @@: @@ -198,20 +199,65 @@ prop_red_win: pushad mcall SF_REDRAW,SSF_BEGIN_DRAW - xor eax,eax + 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: + mov edi,dword[capt_p] ;children window caption mov bx,word[procinfo.box.left] add bx,word[buf_0.l] - add bx,5 ;ширина боковой рамки + add bx,5 ;side frame width shl ebx,16 - mov bx,prop_wnd_width + mov bx,word[tree3.box_width] + add bx,37 mov cx,word[procinfo.box.top] add cx,word[buf_0.t] shl ecx,16 - mov cx,prop_wnd_height + pop eax + add eax,[tree3.box_height] + add eax,[tree3.box_top] + add eax,5 + mov cx,ax mov edx,[sc.work] or edx,0x33000000 - int 0x40 + mcall SF_CREATE_WINDOW mov esi,[sc.work_button] mcall SF_DEFINE_BUTTON, (5 shl 16)+20, (266 shl 16)+20, 0x40000003 @@ -226,7 +272,7 @@ pushad int 0x40 mov dword[w_scr_t3.all_redraw],1 - stdcall [scrollbar_ver_draw],dword w_scr_t3 + stdcall [scrollbar_v_draw], w_scr_t3 stdcall [tl_draw], tree3 stdcall [edit_box_draw], edit1 stdcall [edit_box_draw], edit2 @@ -316,9 +362,9 @@ prop_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] @@: and eax,0xffff ;mouse.y cmp eax,3d_wnd_t @@ -334,14 +380,14 @@ prop_mouse: fild dword[mouse_y] mov [mouse_y],eax fisub dword[mouse_y] - fdiv dword[angle_dxm] ;если курсор движется по оси y (вверх или вниз) то поворот делаем вокруг оси x + fdiv dword[angle_dym] ;if the cursor moves along the y axis fadd dword[angle_x] fstp dword[angle_x] fild dword[mouse_x] mov [mouse_x],ebx fisub dword[mouse_x] - fdiv dword[angle_dym] ;если курсор движется по оси x (вверх или вниз) то поворот делаем вокруг оси y + fdiv dword[angle_dxm] ;if the cursor moves along the x axis fadd dword[angle_y] fstp dword[angle_y] @@ -363,7 +409,7 @@ prop_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 and eax,0xffff ;mouse.y cmp eax,3d_wnd_t @@ -811,7 +857,7 @@ capt_p dd 0 ;дерево с объектами в пользовательском файле tree3 tree_list MAX_OBJECT_SIZE,3, tl_key_no_edit+tl_list_box_mode,\ - 16,16, 0xffffff,0xb0d0ff,0x400040, 5,290,303,140, 16, 4,0, el_focus,\ + 16,16, 0xffffff,0xb0d0ff,0x10400040, 5,290,380,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 diff --git a/programs/develop/libraries/TinyGL/asm_fork/import.inc b/programs/develop/libraries/TinyGL/asm_fork/import.inc new file mode 100644 index 000000000..a8a0e608d --- /dev/null +++ b/programs/develop/libraries/TinyGL/asm_fork/import.inc @@ -0,0 +1,18 @@ +align 4 +import_tinygl: + +macro E_LIB n +{ +if defined sz_#n + n dd sz_#n +end if +} +include 'export.inc' + dd 0,0 +macro E_LIB n +{ +if used n + sz_#n db `n,0 +end if +} +include 'export.inc' \ No newline at end of file diff --git a/programs/develop/libraries/box_lib/export.inc b/programs/develop/libraries/box_lib/export.inc new file mode 100644 index 000000000..a840d848c --- /dev/null +++ b/programs/develop/libraries/box_lib/export.inc @@ -0,0 +1,117 @@ +; +; Export functions +; + +E_LIB lib_init +E_LIB version + +E_LIB edit_box_draw +E_LIB edit_box_key +E_LIB edit_box_key_safe +E_LIB edit_box_mouse +E_LIB edit_box_set_text +E_LIB version_ed + +E_LIB init_checkbox, init_checkbox2 +E_LIB check_box_draw, check_box_draw2 +E_LIB check_box_mouse, check_box_mouse2 +E_LIB version_ch, version_ch2 + +E_LIB option_box_draw +E_LIB option_box_mouse +E_LIB version_op + +E_LIB scrollbar_v_draw +E_LIB scrollbar_v_mouse +E_LIB scrollbar_h_draw +E_LIB scrollbar_h_mouse +E_LIB version_scrollbar + +E_LIB dbutton_draw +E_LIB dbutton_mouse +E_LIB version_dbutton + +E_LIB menu_bar_draw +E_LIB menu_bar_mouse +E_LIB menu_bar_activate +E_LIB version_menu_bar + +E_LIB FileBrowser_draw +E_LIB FileBrowser_mouse +E_LIB FileBrowser_key +E_LIB version_FileBrowser + +E_LIB tl_data_init +E_LIB tl_data_clear +E_LIB tl_info_clear +E_LIB tl_key +E_LIB tl_mouse +E_LIB tl_draw +E_LIB tl_info_undo +E_LIB tl_info_redo +E_LIB tl_node_add +E_LIB tl_node_set_data +E_LIB tl_node_get_data +E_LIB tl_node_delete +E_LIB tl_cur_beg +E_LIB tl_cur_next +E_LIB tl_cur_perv +E_LIB tl_node_close_open +E_LIB tl_node_lev_inc +E_LIB tl_node_lev_dec +E_LIB tl_node_move_up +E_LIB tl_node_move_down +E_LIB tl_node_poi_get_info +E_LIB tl_node_poi_get_next_info +E_LIB tl_node_poi_get_data +E_LIB tl_save_mem +E_LIB tl_load_mem +E_LIB tl_get_mem_size +E_LIB version_tree_list + +E_LIB PathShow_prepare +E_LIB PathShow_draw +E_LIB version_PathShow + +E_LIB ted_but_sumb_upper +E_LIB ted_but_sumb_lover +E_LIB ted_but_convert_by_table +E_LIB ted_can_save +E_LIB ted_clear +E_LIB ted_delete +E_LIB ted_draw +E_LIB ted_init +E_LIB ted_init_scroll_bars +E_LIB ted_init_syntax_file +E_LIB ted_is_select +E_LIB ted_key +E_LIB ted_mouse +E_LIB ted_open_file +E_LIB ted_save_file +E_LIB ted_text_add +E_LIB ted_but_select_word +E_LIB ted_but_cut +E_LIB ted_but_copy +E_LIB ted_but_paste +E_LIB ted_but_undo +E_LIB ted_but_redo +E_LIB ted_but_reverse +E_LIB ted_but_find +E_LIB ted_but_replace +E_LIB ted_text_colored +E_LIB ted_go_to_position +E_LIB version_text_edit + +E_LIB frame_draw +E_LIB version_frame + +E_LIB progressbar_draw +E_LIB progressbar_progress + +E_LIB tooltip_init +E_LIB tooltip_delete +E_LIB tooltip_test_show +E_LIB tooltip_mouse +E_LIB get_font_size + +purge E_LIB diff --git a/programs/develop/libraries/box_lib/import.inc b/programs/develop/libraries/box_lib/import.inc new file mode 100644 index 000000000..285e111bf --- /dev/null +++ b/programs/develop/libraries/box_lib/import.inc @@ -0,0 +1,24 @@ +align 4 +import_box_lib: + +macro E_LIB n, lfn +{ +if n eq lib_init + dd sz_#n +else if defined sz_#n + n dd sz_#n +end if +} +include 'export.inc' + dd 0,0 +macro E_LIB n, lfn +{ +if used n +if lfn eq + sz_#n db `n,0 +else + sz_#n db `lfn,0 +end if +end if +} +include 'export.inc' \ No newline at end of file diff --git a/programs/develop/libraries/buf2d/export.inc b/programs/develop/libraries/buf2d/export.inc new file mode 100644 index 000000000..55c7a4dac --- /dev/null +++ b/programs/develop/libraries/buf2d/export.inc @@ -0,0 +1,48 @@ +; +; Export functions +; + +E_LIB lib_init +E_LIB buf2d_create +E_LIB buf2d_create_f_img +E_LIB buf2d_clear +E_LIB buf2d_draw +E_LIB buf2d_delete +E_LIB buf2d_resize +E_LIB buf2d_rotate +E_LIB buf2d_line +E_LIB buf2d_line_sm +E_LIB buf2d_rect_by_size +E_LIB buf2d_filled_rect_by_size +E_LIB buf2d_circle +E_LIB buf2d_img_hdiv2 +E_LIB buf2d_img_wdiv2 +E_LIB buf2d_conv_24_to_8 +E_LIB buf2d_conv_24_to_32 +E_LIB buf2d_bit_blt +E_LIB buf2d_bit_blt_transp +E_LIB buf2d_bit_blt_alpha +E_LIB buf2d_curve_bezier +E_LIB buf2d_convert_text_matrix +E_LIB buf2d_draw_text +E_LIB buf2d_crop_color +E_LIB buf2d_offset_h +E_LIB buf2d_flood_fill +E_LIB buf2d_set_pixel +E_LIB buf2d_get_pixel +E_LIB buf2d_flip_h +E_LIB buf2d_flip_v +E_LIB buf2d_filter_dither + +E_LIB buf2d_vox_brush_create +E_LIB buf2d_vox_brush_delete +E_LIB buf2d_vox_obj_get_img_w_3g +E_LIB buf2d_vox_obj_get_img_h_3g +E_LIB buf2d_vox_obj_draw_1g +E_LIB buf2d_vox_obj_draw_3g +E_LIB buf2d_vox_obj_draw_3g_scaled +E_LIB buf2d_vox_obj_draw_pl +E_LIB buf2d_vox_obj_draw_pl_scaled +E_LIB buf2d_vox_obj_draw_3g_shadows + +purge E_LIB diff --git a/programs/develop/libraries/buf2d/import.inc b/programs/develop/libraries/buf2d/import.inc new file mode 100644 index 000000000..8306497b5 --- /dev/null +++ b/programs/develop/libraries/buf2d/import.inc @@ -0,0 +1,20 @@ +align 4 +import_buf2d: + +macro E_LIB n +{ +if n eq lib_init + dd sz_#n +else if defined sz_#n + n dd sz_#n +end if +} +include 'export.inc' + dd 0,0 +macro E_LIB n +{ +if used n + sz_#n db `n,0 +end if +} +include 'export.inc' \ No newline at end of file diff --git a/programs/develop/libraries/libs-dev/libimg/export.inc b/programs/develop/libraries/libs-dev/libimg/export.inc new file mode 100644 index 000000000..34151ab69 --- /dev/null +++ b/programs/develop/libraries/libs-dev/libimg/export.inc @@ -0,0 +1,34 @@ +; +; Export functions +; + +E_LIB lib_init +E_LIB version +E_LIB img_is_img +E_LIB img_info +E_LIB img_from_file +E_LIB img_to_file +E_LIB img_from_rgb +E_LIB img_to_rgb +E_LIB img_to_rgb2 +E_LIB img_decode +E_LIB img_encode ;supported formats: PNG 24 32, BMP 24 32, PNM 1 8g 24 +E_LIB img_create +E_LIB img_destroy +E_LIB img_destroy_layer +E_LIB img_count +E_LIB img_lock_bits +E_LIB img_unlock_bits +E_LIB img_flip +E_LIB img_flip_layer +E_LIB img_rotate +E_LIB img_rotate_layer +E_LIB img_draw +E_LIB img_scale +E_LIB img_get_scaled_size +E_LIB img_convert +E_LIB img_blend +E_LIB img_resize_data +E_LIB img_formats_table + +purge E_LIB diff --git a/programs/develop/libraries/libs-dev/libimg/import.inc b/programs/develop/libraries/libs-dev/libimg/import.inc new file mode 100644 index 000000000..6e379d6a4 --- /dev/null +++ b/programs/develop/libraries/libs-dev/libimg/import.inc @@ -0,0 +1,20 @@ +align 4 +import_libimg: + +macro E_LIB n +{ +if n eq lib_init + dd sz_#n +else if defined sz_#n + n dd sz_#n +end if +} +include 'export.inc' + dd 0,0 +macro E_LIB n +{ +if used n + sz_#n db `n,0 +end if +} +include 'export.inc' \ No newline at end of file