kolibrios/programs/media/voxel_editor/utilites/vox_creator.asm

1577 lines
36 KiB
NASM
Raw Normal View History

use32
org 0
db 'MENUET01' ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><EFBFBD><E1AFAE><EFBFBD><EFA5AC><EFBFBD><><E4A0A9> <20><EFBFBD><E1A5A3> 8 <20><><EFBFBD><EFBFBD>
dd 1,start,i_end,mem,stacktop,openfile_path,sys_path
include '../../../../programs/macros.inc'
include '../../../../programs/proc32.inc'
include '../../../../programs/KOSfuncs.inc'
include '../../../../programs/load_img.inc'
include '../trunk/str.inc'
include 'lang.inc'
vox_offs_tree_table equ 4
vox_offs_data equ 12
txt_buf rb 8
include '../trunk/vox_rotate.inc'
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
if lang eq ru
caption db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E1A5AB> 04.05.20',0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
else
caption db 'Voxel creator 04.05.20',0
end if
BUF_STRUCT_SIZE equ 21
buf2d_data equ dword[edi] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD>
buf2d_w equ dword[edi+8] ;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
buf2d_h equ dword[edi+12] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
buf2d_l equ word[edi+4]
buf2d_t equ word[edi+6] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A2A5><EFBFBD>
buf2d_size_lt equ dword[edi+4] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1ABA5> <20> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
buf2d_color equ dword[edi+16] ;梥<><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
buf2d_bits equ byte[edi+20] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD> <20> 1-<2D> <20><><20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD>
run_file_70 FileInfoBlock
vox_obj_size dd 0 ;ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD>ᥫ쭮<E1A5AB><ECADAE> <20><><EFBFBD><EAA5AA> (<28><><EFBFBD> <20>᪮७<E1AAAE><E0A5AD> <20><><EFBFBD><E2A0A2>)
txt_space db ' ',0
if lang eq ru
txt_pref db ' <20> ',0,' <20><>',0,' <20><>',0,' <20><>',0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><E2A0A2>: <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>
txt_f_size: db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: '
else
txt_pref db ' b ',0,' Kb',0,' Mb',0,' Gb',0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><E2A0A2>: <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>
txt_f_size: db 'Size: '
end if
.size: rb 16
IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
image_data_toolbar dd 0
max_open_file_size equ 1024*1024 ;1 Mb
align 4
start:
load_libraries l_libs_start,l_libs_end
;<3B><EFBFBD><20><><>쪮 㤠筮 <20><><EFBFBD><EFBFBD><E3A7A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov ebp,lib_0
cmp dword [ebp+ll_struc_size-4],0
jz @f
mcall SF_TERMINATE_PROCESS
@@:
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
mcall SF_SET_EVENTS_MASK,0x27
stdcall [OpenDialog_Init],OpenDialog_data ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E2AEA2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
stdcall [buf2d_create], buf_0 ;ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
stdcall [buf2d_create], buf_0z
stdcall [buf2d_vox_brush_create], buf_vox, vox_6_7_z
include_image_file 'toolbar.png', image_data_toolbar
stdcall mem.Alloc,max_open_file_size
mov dword[open_file_vox],eax
stdcall mem.Alloc,max_open_file_size
mov dword[open_file_img],eax
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
mov [last_time],eax
;<3B><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
cmp dword[openfile_path],0
je @f
call but_open_file_cmd_lin
@@:
align 4
red_win:
call draw_window
align 4
still:
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
mov ebx,[last_time]
add ebx,10 ;<3B><><EFBFBD><EFBFBD><EFBFBD>
cmp ebx,eax
jge @f
mov ebx,eax
@@:
sub ebx,eax
mcall SF_WAIT_EVENT_TIMEOUT
cmp eax,0
je timer_funct
cmp al,1
jz red_win
cmp al,2
jz key
cmp al,3
jz button
jmp still
align 4
timer_funct:
cmp byte[calc],0
je still
pushad
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
mov [last_time],eax
; ᪨<><EFBFBD><EBA2A0><><E3AAA0><EFBFBD> <20><><EFBFBD><EFBFBD>஢ buf_npl_p, buf_npl, buf_npl_n
mov edi,buf_npl_p
mov eax,buf2d_data
mov edi,buf_npl
mov ebx,buf2d_data
mov edi,buf_npl_n
mov ecx,buf2d_data
; change buffer data pointers
mov buf2d_data,eax
mov edi,buf_npl_p
mov buf2d_data,ebx
mov edi,buf_npl
mov buf2d_data,ecx
mov eax,[n_plane]
mov ebx,buf2d_w
dec ebx
cmp ebx,eax
jg @f
stdcall create_obj_from_plane,buf_npl,eax ;ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><E7A5AD>
;<3B><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E7ADAE><><E0A5A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
call draw_object
mov byte[calc],0
jmp .end_f
@@:
inc eax
stdcall create_plane, buf_npl_n,eax
; ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><ECADAE> <20><><EFBFBD><E7A5AD> <20><> <20><EFBFBD><E1ADAE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> buf_npl
mov edi,buf_npl
mov edx,[bby_min] ;0
.cycle_0:
mov ecx,[btx_min] ;0
.cycle_1:
stdcall [buf2d_get_pixel], edi,ecx,edx
cmp eax,buf2d_color
je @f
mov esi,eax
call need_node
cmp eax,buf2d_color
jne @f ;<3B><><EFBFBD><E1A5A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A5AD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><E2A8AC><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov eax,ebx
sub eax,edx
stdcall buf2d_vox_obj_create_node, [open_file_vox],ecx,[n_plane],\
eax,[k_scale],esi
@@:
inc ecx
cmp ecx,ebx
jle .cycle_1
inc edx
cmp edx,ebx
jle .cycle_0
stdcall [buf2d_draw], buf_npl
inc dword[n_plane] ;<3B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E1AAAE><EFBFBD> <20><><EFBFBD><E7A5AD>
call draw_pok
.end_f:
popad
jmp still
align 4
proc create_plane, buf_img:dword, n_plane:dword
pushad
; <20><><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><E6A5A2> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> buf_img
; bby_min - <20><EFBFBD><E1AFAE><EFBFBD><20><><EFBFBD> <20><><EFBFBD><E2A8AC><EFBFBD>樨 (<28>᫨ ᢥ<><E1A2A5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20><><EFBFBD>⮥)
mov eax,[bby_min]
mov esi,buf_i2
mov esi,[esi] ;buf2d_data
mov edi,[buf_img]
mov ecx,buf2d_w
imul eax,ecx
mov ebx,ecx
imul ecx,ebx
sub ecx,eax
lea ecx,[ecx+ecx*2]
mov edi,buf2d_data
lea eax,[eax+eax*2]
add edi,eax
add esi,eax
cld
rep movsb
mov ecx,ebx
dec ebx
mov edi,buf_i0
.cycle_0:
mov eax,ebx
sub eax,[n_plane] ;eax - <20><><EFBFBD><E0A5A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> n_plane
stdcall [buf2d_get_pixel], edi,ecx,eax ;[n_plane]
cmp eax,buf2d_color
jne @f
;<3B><><EFBFBD><EFBFBD><EFBFBD><E0AAA8><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E2A8AA><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E7A5AD> buf_img
stdcall [buf2d_line], [buf_img],ecx,[bby_min],ecx,ebx, buf2d_color
jmp .end_1
@@:
mov edx,[bby_min] ;xor edx,edx
mov esi,eax
.cycle_1: ;横<> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><><E2A5AA><EFBFBD><EFBFBD><EFBFBD>
stdcall [buf2d_get_pixel], [buf_img],ecx,edx
cmp eax, buf2d_color
je .end_0
stdcall [buf2d_set_pixel], [buf_img],ecx,edx, esi ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><><E2A5AA><EFBFBD><EFBFBD><EFBFBD>
jmp .end_1
.end_0:
inc edx
cmp edx,ebx
jle .cycle_1
.end_1:
loop .cycle_0
;<3B><><EFBFBD><E0A8A7><EFBFBD><E2A0AB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><EFBFBD><E1ADAE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD>
mov ecx,[bby_min]
mov edi,buf_i1
.cycle_2:
stdcall [buf2d_get_pixel], edi,[n_plane],ecx
cmp eax,buf2d_color
jne @f
;<3B><><EFBFBD><EFBFBD><EFBFBD><E0AAA8><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A8A7>⠫쭮<E2A0AB> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E7A5AD> buf_img
stdcall [buf2d_line], [buf_img],[btx_min],ecx,[btx_max],ecx, buf2d_color
jmp .end_3
@@:
mov edx,[btx_max] ;ebx
mov esi,eax
.cycle_3: ;横<> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E2A5AA><EFBFBD><EFBFBD><EFBFBD>
stdcall [buf2d_get_pixel], [buf_img],edx,ecx
cmp eax, buf2d_color
je .end_2
stdcall [buf2d_set_pixel], [buf_img],edx,ecx, esi ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E2A5AA><EFBFBD><EFBFBD><EFBFBD>
jmp .end_3
.end_2:
dec edx
cmp edx,[btx_min]
jge .cycle_3
.end_3:
inc ecx
cmp ecx,ebx
jle .cycle_2
popad
ret
endp
align 4
proc create_obj_from_plane, buf_img:dword, n_plane:dword
pushad
; ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><ECADAE> <20><><EFBFBD><E7A5AD> <20><> <20><EFBFBD><E1ADAE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> buf_img
mov edi,[buf_img]
mov ebx,buf2d_w
dec ebx
mov edx,[bby_min] ;0
.cycle_0:
mov ecx,[btx_min] ;0
.cycle_1:
stdcall [buf2d_get_pixel], edi,ecx,edx
cmp eax,buf2d_color
je @f
mov esi,eax
;call need_node
;cmp eax,buf2d_color
;jne @f ;<3B><><EFBFBD><E1A5A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A5AD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><E2A8AC><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov eax,ebx
sub eax,edx
stdcall buf2d_vox_obj_create_node, [open_file_vox],ecx,[n_plane],\
eax,[k_scale],esi
@@:
inc ecx
cmp ecx,ebx
jle .cycle_1
inc edx
cmp edx,ebx
jle .cycle_0
ret
popad
endp
;description:
; <20><EFBFBD><E3ADAA><EFBFBD> <20><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD> <20><> <20><><EFBFBD><E1A5A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD> [n_plane],ecx,edx
;input:
; ebx = max size y - 1
;output:
; eax = buf2d_color if node need
align 4
need_node:
mov eax,buf2d_color
cmp ecx,[btx_min] ;0
jle .end_f
cmp ecx,[btx_max] ;0
jge .end_f
cmp edx,[bby_min] ;0
jle .end_f
cmp edx,ebx ;max-1
jge .end_f
push ecx edx
stdcall [buf2d_get_pixel], buf_npl_p,ecx,edx ;<3B><EFBFBD><20><EFBFBD><E0A5A4><EFBFBD><EFBFBD> <20><><EFBFBD><E7A5AD>
cmp eax,buf2d_color
je @f
stdcall [buf2d_get_pixel], buf_npl_n,ecx,edx ;<3B><EFBFBD><20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD> <20><><EFBFBD><E7A5AD>
cmp eax,buf2d_color
je @f
dec ecx
stdcall [buf2d_get_pixel], edi,ecx,edx
cmp eax,buf2d_color
je @f
add ecx,2
stdcall [buf2d_get_pixel], edi,ecx,edx
cmp eax,buf2d_color
je @f
dec ecx
dec edx
stdcall [buf2d_get_pixel], edi,ecx,edx
cmp eax,buf2d_color
je @f
add edx,2
stdcall [buf2d_get_pixel], edi,ecx,edx
;cmp eax,buf2d_color
;je @f
@@:
pop edx ecx
.end_f:
ret
align 4
draw_window:
pushad
mcall SF_REDRAW,SSF_BEGIN_DRAW
; *** <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (<28><EFBFBD><EBAFAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 ࠧ <20><><EFBFBD> <20><><EFBFBD><EFBFBD>᪥) ***
mov edx,[sc.work]
or edx,(3 shl 24)+0x30000000
mcall SF_CREATE_WINDOW,(20 shl 16)+410,(20 shl 16)+520,,,caption
; *** ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ***
mov esi,[sc.work_button]
mcall SF_DEFINE_BUTTON,(5 shl 16)+20,(5 shl 16)+20,3
mov ebx,(30 shl 16)+20
mov edx,4
int 0x40
mov ebx,(55 shl 16)+20
mov edx,5
int 0x40
mov ebx,(85 shl 16)+20
mov edx,6
int 0x40
add ebx,25 shl 16
mov edx,7
int 0x40
add ebx,25 shl 16
mov edx,8
int 0x40
add ebx,25 shl 16
mov edx,9
int 0x40
add ebx,25 shl 16
mov edx,10
int 0x40
add ebx,25 shl 16
mov edx,11
int 0x40
add ebx,25 shl 16
mov edx,12
int 0x40
; *** <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ***
mov edx,(7 shl 16)+7 ;icon new
mcall SF_PUT_IMAGE,[image_data_toolbar],(16 shl 16)+16
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;icon open
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;icon save
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(30 shl 16) ;
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;
int 0x40
call draw_buffers
call draw_pok
mcall SF_REDRAW,SSF_END_DRAW
popad
ret
align 4
draw_buffers:
; *** <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ***
stdcall [buf2d_draw], buf_0
stdcall [buf2d_draw], buf_i0
stdcall [buf2d_draw], buf_i1
stdcall [buf2d_draw], buf_i2
ret
align 4
draw_pok:
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E0A0A7><EFBFBD><EFBFBD><><E4A0A9>
mov edi,txt_f_size.size
mov eax,dword[vox_obj_size]
mov ebx,txt_pref
.cycle:
cmp eax,1024
jl @f
shr eax,10
add ebx,4
jmp .cycle
@@:
stdcall convert_int_to_str, 16
stdcall str_cat, edi,ebx
stdcall str_cat, edi,txt_space ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><EFBFBD><E0AEA1>
;<3B><><EFBFBD><E1AEA2><EFBFBD><EFBFBD><><E2A5AA><EFBFBD>
mov ecx,[sc.work_text]
or ecx,0x80000000 or (1 shl 30)
mov edi,[sc.work] ;梥<><> <20><><EFBFBD><EFBFBD>
mcall SF_DRAW_TEXT,(275 shl 16)+7,,txt_f_size
ret
align 4
key:
mcall SF_GET_KEY
jmp still
align 4
button:
mcall SF_GET_BUTTON
cmp ah,3
jne @f
call but_new_file
jmp still
@@:
cmp ah,4
jne @f
call but_open_file ;<3B><><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD>ᥫ쭮<E1A5AB><ECADAE><><E4A0A9>
jmp still
@@:
cmp ah,5
jne @f
call but_save_file
jmp still
@@:
cmp ah,6
jne @f
call but_1
jmp still
@@:
cmp ah,7
jne @f
call but_2
jmp still
@@:
cmp ah,8
jne @f
call but_3
jmp still
@@:
cmp ah,9
jne @f
stdcall but_run, 0
jmp still
@@:
cmp ah,10
jne @f
stdcall but_run, 1
jmp still
@@:
cmp ah,11
jne @f
call but_stop
jmp still
@@:
cmp ah,12
jne @f
call but_rot_z
jmp still
@@:
cmp ah,1
jne still
.exit:
stdcall [buf2d_delete],buf_0
stdcall [buf2d_delete],buf_0z
stdcall [buf2d_vox_brush_delete],buf_vox
stdcall [buf2d_delete],buf_i0
stdcall [buf2d_delete],buf_i1
stdcall [buf2d_delete],buf_i2
stdcall [buf2d_delete],buf_npl_p
stdcall [buf2d_delete],buf_npl
stdcall [buf2d_delete],buf_npl_n
stdcall mem.Free,[image_data_toolbar]
stdcall mem.Free,[open_file_vox]
stdcall mem.Free,[open_file_img]
mcall SF_TERMINATE_PROCESS
align 4
vox_new_data:
db 2,0,0,0
db 000b,001b,010b,011b, 100b,101b,110b,111b ;default table
dd 0 ;null node
align 4
proc but_new_file uses ecx edi esi
mov ecx,vox_offs_data+4
mov [vox_obj_size],ecx
mov esi,vox_new_data
mov edi,[open_file_vox]
cld
rep movsb
ret
endp
align 4
open_file_vox dd 0 ;㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E4A0A9><EFBFBD>
open_file_img dd 0 ;㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E2A5AA><EFBFBD><EFBFBD>
align 4
but_open_file:
pushad
copy_path open_dialog_name,communication_area_default_path,file_name,0
mov [OpenDialog_data.type],0
stdcall [OpenDialog_Start],OpenDialog_data
cmp [OpenDialog_data.status],2
je @f
;<3B><><EFBFBD> <20><><EFBFBD> 㤠筮<E3A4A0> <20><><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
call but_open_file_cmd_lin
@@:
popad
ret
align 4
but_open_file_cmd_lin:
pushad
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 max_open_file_size
m2m [run_file_70.Buffer],dword[open_file_vox]
mov byte[run_file_70+20], 0
mov dword[run_file_70.FileName], openfile_path
mcall SF_FILE,run_file_70
cmp ebx,0xffffffff
je .end_open_file
; <20><EFBFBD><20><> <20><EFBFBD><E0A0A2><EFBFBD><ECADAE><EFBFBD> <20><><EFBFBD>ᥫ쭮<E1A5AB><ECADAE> <20><><EFBFBD><E0ACA0>
mov edi,[open_file_vox]
add edi,vox_offs_tree_table
xor bx,bx
mov ecx,8
cld
@@:
movzx ax,byte[edi]
add bx,ax
inc edi
loop @b
cmp bx,28 ;28=0+1+2+...+7
jne .err_open
mcall SF_SET_CAPTION,1,openfile_path
stdcall buf2d_vox_obj_get_size,[open_file_vox]
mov [vox_obj_size],eax
call draw_object
jmp .end_open_file
.err_open:
call but_new_file
stdcall [mb_create],msgbox_4,thread
.end_open_file:
popad
ret
align 4
but_save_file:
pushad
copy_path open_dialog_name,communication_area_default_path,file_name,0
mov [OpenDialog_data.type],1
stdcall [OpenDialog_Start],OpenDialog_data
cmp [OpenDialog_data.status],2
je .end_save_file
;<3B><><EFBFBD> <20><><EFBFBD> 㤠筮<E3A4A0> <20><><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov eax,6 ;dword[v_zoom] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><20><><><EFBFBD><E7A0AD>
mov ebx,[open_file_vox]
mov byte[ebx],al
stdcall buf2d_vox_obj_get_size, ebx
mov dword[run_file_70.Count], eax ;ࠧ<><E0A0A7><EFBFBD><><E4A0A9>
mov [run_file_70.Function], SSF_CREATE_FILE
mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0
mov ebx, dword[open_file_vox]
mov [run_file_70.Buffer], ebx
mov byte[run_file_70+20], 0
mov dword[run_file_70.FileName], openfile_path
mcall SF_FILE,run_file_70
cmp ebx,0xffffffff
je .end_save_file
.end_save_file:
popad
ret
align 4
but_1:
stdcall open_image_in_buf, buf_i0
ret
align 4
but_2:
stdcall open_image_in_buf, buf_i1
call set_buf_tabs
ret
align 4
but_3:
stdcall open_image_in_buf, buf_i2
call set_buf_tabs
ret
;description:
; <20> <20><><EFBFBD><EFBFBD><EFBFBD><E1A8AC><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> 1-<2D><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> 2-<2D><> <20> 3-<2D><> <20><><EFBFBD><EFBFBD>
align 4
set_buf_tabs:
push eax ebx edi
mov edi,buf_i0
cmp buf2d_data,0
je @f
movzx eax,buf2d_l
mov ebx,buf2d_w
cmp ebx,128
jle .end_0
mov ebx,128
.end_0:
mov edi,buf_i1
mov buf2d_l,ax
add buf2d_l,bx
add buf2d_l,2
shl ebx,1
mov edi,buf_i2
mov buf2d_l,ax
add buf2d_l,bx
add buf2d_l,4
@@:
pop edi ebx eax
ret
align 4
get_scale:
push eax edi
mov edi,buf_i0
mov eax,buf2d_w
mov dword[k_scale],-1
.cycle_s:
cmp eax,0
je @f
shr eax,1
inc dword[k_scale]
jmp .cycle_s
@@:
pop edi eax
ret
align 4
proc set_borders uses eax ebx ecx edx edi
mov ecx,dword[k_scale]
mov edx,1
shl edx,cl
;<3B><><EFBFBD><E0A5A4><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> y <20><> <20><><EFBFBD><E6A5A2> <20><EFBFBD>
mov edi,buf_i2
mov dword[bby_min],0
xor ecx,ecx
.cycle_0:
xor ebx,ebx
.cycle_1:
stdcall [buf2d_get_pixel],edi,ebx,ecx
cmp eax,buf2d_color
jne @f
inc ebx
cmp ebx,edx
jl .cycle_1
inc dword[bby_min]
inc ecx
cmp ecx,edx
jl .cycle_0
@@:
;<3B><><EFBFBD><E0A5A4><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> x <20><> <20><><EFBFBD><E6A5A2> <20><EFBFBD>
mov dword[btx_min],0
xor ebx,ebx
.cycle_2:
mov ecx,[bby_min]
.cycle_3:
stdcall [buf2d_get_pixel],edi,ebx,ecx
cmp eax,buf2d_color
jne @f
inc ecx
cmp ecx,edx
jl .cycle_3
inc dword[btx_min]
inc ebx
cmp ebx,edx
jl .cycle_2
@@:
;<3B><><EFBFBD><E0A5A4><20><><EFBFBD><EFBFBD><E1A8AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> x <20><> <20><><EFBFBD><E6A5A2> <20><EFBFBD>
mov [btx_max],edx
dec dword[btx_max]
mov ebx,[btx_max]
.cycle_4:
mov ecx,[bby_min]
.cycle_5:
stdcall [buf2d_get_pixel],edi,ebx,ecx
cmp eax,buf2d_color
jne @f
inc ecx
cmp ecx,edx
jl .cycle_5
dec dword[btx_max]
dec ebx
cmp ebx,[btx_min]
jg .cycle_4
@@:
;stdcall [buf2d_line], edi, 0,[bby_min],50,[bby_min],255
ret
endp
align 4
btx_min dd 0 ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>. x
btx_max dd 0
bty_min dd 0 ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>. y
bty_max dd 0
;bbx_min dd 0
;bbx_max dd 0
bby_min dd 0 ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>. y
bby_max dd 0
k_scale dd 0
n_plane dd 0
calc db 0 ;<3B>᫨ =1, <20><> <20><><EFBFBD><EFBFBD><><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EAA5AA>
; ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> 3 <20><EFBFBD>:
; 1) <20><20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>, <20><20><><EFBFBD><EFBFBD> <20><><EFBFBD><E2A0A2><EFBFBD> (<28><20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 2-<2D> <20><20><EFBFBD><EFBFBD><E1AAA0>)
; 2) <20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><E1A5AB> (3-<2D> <20>⠯ 㦥 <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
; 3) <20><><EFBFBD>塞 梥<> <20><><EFBFBD><EFBFBD>
align 4
proc buf2d_vox_obj_create_node, v_obj:dword,coord_x:dword,coord_y:dword,\
coord_z:dword,k_scale:dword,color:dword
pushad
locals
p_node dd 0 ;த<><EFBFBD><EFBFBD><>
endl
mov edi,[v_obj]
add edi,vox_offs_data
mov esi,[k_scale]
cmp esi,1
jl .change
; *** (1) ***
.found:
stdcall vox_obj_get_node_position, [v_obj],[coord_x],[coord_y],[coord_z],esi
movzx bx,byte[edi+3]
mov [p_node],edi
add edi,4
cmp eax,0
je .end_1
mov ecx,eax
cld
@@: ;横<> <20><><EFBFBD> <20><EFBFBD><20><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ॢ쥢 <20><>
bt bx,0 ;<3B><EFBFBD><E0AEA2><20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><>
jnc .end_0
xor eax,eax
stdcall vox_obj_rec0 ;<3B> eax <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><20><><EFBFBD><EFBFBD><EFBFBD><><E3A7AB>, <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>
.end_0:
shr bx,1
loop @b
.end_1:
bt bx,0
jnc .creat ;<3B><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><E5AEA4> <20><><E1AEA7><EFBFBD><EFBFBD><EFBFBD>
dec esi
cmp esi,0
jg .found
jmp .change
; *** (2) ***
.creat:
mov edx,[color] ;<3B><><EFBFBD>塞 梥<>
and edx,0xffffff ;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><E4A8AB><EFBFBD>
mov ecx,esi
stdcall vox_obj_add_nodes_mem, [v_obj],edi,ecx ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ꥪ⮬, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><><E3A7AB>
mov ebx,[p_node]
cld
@@:
mov dword[edi],edx
stdcall vox_obj_get_node_bit_mask, [v_obj],[coord_x],[coord_y],[coord_z],esi
or byte[ebx+3],al
mov ebx,edi
add edi,4
dec esi
loop @b
jmp .end_2
; *** (3) ***
.change:
mov eax,[color] ;<3B><><EFBFBD>塞 梥<>
mov word[edi],ax
shr eax,16
mov byte[edi+2],al
.end_2:
popad
ret
endp
; ᤢ<><E1A4A2><EFBFBD><EFBFBD><EFBFBD><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><><E3A7AB>
;input:
; p_insert - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E2A0A2>
; count - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFA5AC><><E3A7AB>
align 4
proc vox_obj_add_nodes_mem uses eax ecx edi esi, v_obj:dword,p_insert:dword,count:dword
mov esi,[v_obj]
;stdcall buf2d_vox_obj_get_size,esi
add esi,[vox_obj_size] ;esi - 㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><><E4A0A9>
mov edi,[count]
shl edi,2
add [vox_obj_size],edi
add edi,esi ;edi - 㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><><E4A0A9>
mov ecx,esi
sub ecx,[p_insert]
shr ecx,2 ;ecx - <20><>᫮ 横<><E6A8AA><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0AEA2><EFBFBD><EFBFBD>
sub esi,4 ;esi - 㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD><>
sub edi,4 ;edi - 㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD><>
std
rep movsd ;ᤢ<><E1A4A2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ret
endp
;???
; <20><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>樨 㧫<> <20> <20><><EFBFBD> (<28><> 0 <20><> 7)
align 4
proc vox_obj_get_node_position uses ebx ecx edi, v_obj:dword,\
coord_x:dword,coord_y:dword,coord_z:dword,k_scale:dword
mov ecx,[k_scale]
dec ecx
mov eax,[coord_x]
mov ebx,[coord_y]
mov edi,[coord_z]
cmp ecx,1
jl .end_0
shr eax,cl
shr ebx,cl
shr edi,cl
.end_0:
and eax,1
bt ebx,0
jnc @f
bts eax,1
@@:
bt edi,0
jnc @f
bts eax,2
@@:
mov edi,[v_obj]
add edi,vox_offs_tree_table
@@:
cmp al,byte[edi]
je @f
inc edi
jmp @b
@@:
sub edi,[v_obj]
sub edi,vox_offs_tree_table
mov eax,edi
ret
endp
;???
;input:
; edi - 㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ᥫ쭮<E1A5AB><ECADAE> <20><><EFBFBD><EAA5AA>
;output:
; eax - eax + <20><>᫮ 㧫<><E3A7AB> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>. <20><><EFBFBD><EAA5AA>
; edi - 㪠<><E3AAA0><EFBFBD> <20><> ᬥ饭<E1ACA5><E9A5AD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>. <20><><EFBFBD><EAA5AA>
align 4
proc vox_obj_rec0
inc eax
cmp byte[edi+3],0 ;ᬮ<><20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E0A5A2>
je .sub_trees
;४<><E0A5AA><EFBFBD><E1A8A2><EFBFBD> <20><><EFBFBD><E0A5A1> <20><><EFBFBD><EFBFBD><EFBFBD>ॢ쥢
push ebx ecx
mov bh,byte[edi+3]
add edi,4
mov bl,8
.cycle:
bt bx,8 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㥬 ⮫쪮 bh
jnc .c_next
stdcall vox_obj_rec0
.c_next:
shr bh,1
dec bl
jnz .cycle
pop ecx ebx
jmp .end_f
.sub_trees:
add edi,4
.end_f:
ret
endp
;output:
; eax - 1,2,4,8,16, ... ,128
align 4
proc vox_obj_get_node_bit_mask uses ebx ecx edi, v_obj:dword,\
coord_x:dword,coord_y:dword,coord_z:dword,k_scale:dword
mov ecx,[k_scale]
dec ecx
mov eax,[coord_x]
mov ebx,[coord_y]
mov edi,[coord_z]
cmp ecx,1
jl .end_0
shr eax,cl
shr ebx,cl
shr edi,cl
.end_0:
and eax,1
bt ebx,0
jnc @f
bts eax,1
@@:
bt edi,0
jnc @f
bts eax,2
@@:
mov ecx,[v_obj]
add ecx,vox_offs_tree_table
@@:
cmp al,byte[ecx]
je @f
inc ecx
jmp @b
@@:
mov eax,1 ;<3B><><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A2AE>砫쭮<E7A0AB> <20><><EFBFBD><EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD>
sub ecx,[v_obj]
sub ecx,vox_offs_tree_table
jz @f
shl eax,cl ;ᤢ<><E1A4A2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
@@:
ret
endp
;output:
; eax - ࠧ<><E0A0A7><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ꥪ⮬ v_obj
align 4
proc buf2d_vox_obj_get_size uses edi, v_obj:dword
mov edi,[v_obj]
add edi,vox_offs_data
xor eax,eax
stdcall vox_obj_rec0 ;eax - <20><>᫮ 㧫<><E3A7AB> <20> <20><><EFBFBD><EAA5AA> v_obj
shl eax,2
add eax,vox_offs_data
ret
endp
;input:
; mode_add - <20><20><><><E0A0A2> 0 ⮣<><E2AEA3><><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20> <><E0A5A6><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E1A5AB>
align 4
proc but_run uses eax ebx edi, mode_add:dword
; <20><EFBFBD>ઠ ࠧ<><E0A0A7><20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD> (⥪<><E2A5AA><EFBFBD><EFBFBD>)
mov edi,buf_i0
mov ebx,buf2d_h
cmp ebx,2
jle .err_size_t
cmp buf2d_w,ebx
jne .err_size_t
;
mov edi,buf_i1
cmp ebx,buf2d_h
jne .err_size_tb
mov ebx,buf2d_h
cmp ebx,2
jle .err_size_b
cmp buf2d_w,ebx
jne .err_size_b
cmp dword[vox_obj_size],vox_offs_data
jl .n_file ;<3B>᫨ ࠭<><E0A0AD><EFBFBD> <20><> <20><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E4A0A9><EFBFBD>
cmp dword[mode_add],0
jne @f
.n_file:
call but_new_file
@@:
mov edi,buf_i0
mov eax,buf2d_w
mov edi,buf_npl
cmp buf2d_data,0
jne @f
; *** ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
m2m buf2d_w,eax
m2m buf2d_h,eax
stdcall [buf2d_create],edi
mov edi,buf_npl_p
m2m buf2d_w,eax
m2m buf2d_h,eax
stdcall [buf2d_create],edi
mov edi,buf_npl_n
m2m buf2d_w,eax
m2m buf2d_h,eax
stdcall [buf2d_create],edi
jmp .end_0
@@:
; *** <20><><EFBFBD><EFBFBD><EFBFBD>塞 ࠧ<><E0A0A7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
stdcall [buf2d_resize], edi, eax,eax,1
mov edi,buf_npl_p
stdcall [buf2d_resize], edi, eax,eax,1
mov edi,buf_npl_n
stdcall [buf2d_resize], edi, eax,eax,1
.end_0:
mov dword[n_plane],1
mov byte[calc],1
call get_scale
call set_borders
stdcall create_plane,buf_npl,0
stdcall create_plane,buf_npl_n,1
stdcall create_obj_from_plane,buf_npl,0 ;ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><>砫쭮<E7A0AB> <20><><EFBFBD><E7A5AD>
jmp @f
.err_size_t:
stdcall [mb_create],msgbox_0,thread
jmp @f
.err_size_b:
stdcall [mb_create],msgbox_1,thread
jmp @f
.err_size_tb:
stdcall [mb_create],msgbox_3,thread
;jmp @f
@@:
ret
endp
;<3B><EFBFBD><E0A5AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EAA5AA>
align 4
but_stop:
cmp byte[calc],0
je @f
call draw_object
mov byte[calc],0
@@:
ret
align 4
but_rot_z:
stdcall vox_obj_rot_z, [open_file_vox]
call draw_object
ret
align 4
draw_object:
;<3B><EFBFBD><><E0A5A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><>
stdcall [buf2d_clear], buf_0, [buf_0.color] ;<3B><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>
stdcall [buf2d_clear], buf_0z, 0 ;<3B><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>
stdcall [buf2d_vox_obj_draw_3g], buf_0, buf_0z, buf_vox,\
[open_file_vox], 0,0, 0, 6 ;[k_scale]
stdcall [buf2d_draw], buf_0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>
ret
align 4
proc open_image_in_buf, buf:dword
pushad
copy_path open_dialog_name,communication_area_default_path,file_name,0
mov [OpenDialog_data.type],0
stdcall [OpenDialog_Start],OpenDialog_data
cmp [OpenDialog_data.status],2
je .end_open_file
;stdcall mem.Alloc, dword size ;<3B><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD>
;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 max_open_file_size
m2m [run_file_70.Buffer],dword[open_file_img]
mov byte[run_file_70+20], 0
mov [run_file_70.FileName], openfile_path
mcall SF_FILE,run_file_70
cmp ebx,0xffffffff
je .end_0
;<3B><><EFBFBD><E0A5A4><20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD>
stdcall dword[img_decode], dword[open_file_img],ebx,0
or eax,eax
jz .end_0 ;<3B><20><><EFBFBD><EFBFBD><20><><EFBFBD><><E4A0A9>
mov ebx,[eax+4] ;+4 = image width
cmp ebx,[eax+8] ;+8 = image height
jne .err_s0
mov ebx,eax
;<3B><EFBFBD>ࠧ㥬 <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20> <20><><EFBFBD><E0ACA0> rgb
stdcall dword[img_to_rgb2], ebx,dword[open_file_img]
mov edi,[buf]
cmp buf2d_data,0
jne @f
m2m buf2d_w,dword[ebx+4] ;+4 = image width
m2m buf2d_h,dword[ebx+8] ;+8 = image height
stdcall [buf2d_create_f_img], edi,[open_file_img]
jmp .end_1
@@:
mov ecx,[ebx+8]
stdcall [buf2d_resize], edi, [ebx+4],ecx,1 ;<3B><><EFBFBD><EFBFBD><EFBFBD>塞 ࠧ<><E0A0A7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
imul ecx,[ebx+4]
lea ecx,[ecx+ecx*2]
mov edi,buf2d_data
mov esi,[open_file_img]
cld
rep movsb ;copy image
jmp .end_1
.err_s0: ;<3B><EFBFBD><E8A8A1>, <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20><><EFBFBD> <20><EFBFBD><EFBFBD><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><E5AEA4> (<28><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
mov ebx,eax
notify_window_run txt_img_not_square
.end_1:
;㤠<><20><EFBFBD><E0A5AC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> ebx
stdcall dword[img_destroy], ebx
.end_0:
call draw_buffers
.end_open_file:
popad
ret
endp
msgbox_0:
db 1,0
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E5ADA5> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E0A5AA><EFBFBD><EFBFBD>',0
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
db 0
msgbox_1:
db 1,0
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E0A5AA><EFBFBD><EFBFBD>',0
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
db 0
msgbox_2:
db 1,0
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A5A4><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E0A5AA><EFBFBD><EFBFBD>',0
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
db 0
msgbox_3:
db 1,0
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E5ADA5> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20><><><E1AEA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',13,\
'<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>',0
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
db 0
msgbox_4:
db 1,0
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
db '<27><><EFBFBD><EFBFBD><EFBFBD><EBA2A0><EFBFBD><EFBFBD><><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><E1A5AB><EFBFBD><EFBFBD> <20><><EFBFBD>',0
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
db 0
txt_img_not_square db '"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',13,10,'<27><><EFBFBD><EFBFBD><EFBFBD><EBA2A0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" -tW',0
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E4A0A9><EFBFBD>
align 4
OpenDialog_data:
.type dd 0 ;0 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 1 - <20><><EFBFBD><EFBFBD><E0A0AD><EFBFBD>, 2 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A5AA><EFBFBD><EFBFBD><EFBFBD>
.procinfo dd procinfo ;+4
.com_area_name dd communication_area_name ;+8
.com_area dd 0 ;+12
.opendir_path dd plugin_path ;+16
.dir_default_path dd default_dir ;+20
.start_path dd file_name ;+24 <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E4A0A9><EFBFBD>
.draw_window dd draw_window ;+28
.status dd 0 ;+32
.openfile_path dd openfile_path ;+36 <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EBA2A0><EFBFBD><EFBFBD><EFBFBD><><E4A0A9>
.filename_area dd filename_area ;+40
.filter_area dd Filter
.x:
.x_size dw 420 ;+48 ; Window X size
.x_start dw 10 ;+50 ; Window X position
.y:
.y_size dw 320 ;+52 ; Window y size
.y_start dw 10 ;+54 ; Window Y position
default_dir db '/rd/1',0
communication_area_name:
db 'FFFFFFFF_open_dialog',0
open_dialog_name:
db 'opendial',0
communication_area_default_path:
db '/rd/1/File managers/',0
Filter:
dd Filter.end - Filter ;.1
.1:
db 'PNG',0
db 'JPG',0
db 'JPEG',0
db 'BMP',0
db 'GIF',0
db 'VOX',0
.end:
db 0
system_dir_0 db '/sys/lib/'
lib_name_0 db 'proc_lib.obj',0
system_dir_1 db '/sys/lib/'
lib_name_1 db 'libimg.obj',0
system_dir_2 db '/sys/lib/'
lib_name_2 db 'buf2d.obj',0
system_dir_3 db '/sys/lib/'
lib_name_3 db 'msgbox.obj',0
align 4
head_f_i:
if lang eq ru
head_f_l db '"<22><><EFBFBD><EFBFBD><E2A5AC><EFBFBD> <20><EFBFBD><E8A8A1>',0
err_message_found_lib_0 db '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',39,'proc_lib.obj',39,'" -tE',0
err_message_import_0 db '<27><EFBFBD><E8A8A1> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',39,'proc_lib.obj',39,'" -tE',0
err_message_found_lib_1 db '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',39,'libimg.obj',39,'" -tE',0
err_message_import_1 db '<27><EFBFBD><E8A8A1> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',39,'libimg.obj',39,'" -tE',0
err_msg_found_lib_2 db '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',39,'buf2d.obj',39,'" -tE',0
err_msg_import_2 db '<27><EFBFBD><E8A8A1> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',39,'buf2d',39,'" -tE',0
err_msg_found_lib_3 db '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',39,'msgbox.obj',39,'" -tE',0
err_msg_import_3 db '<27><EFBFBD><E8A8A1> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',39,'msgbox',39,'" -tE',0
else
head_f_l db '"System error',0
err_message_found_lib_0 db 'Sorry I cannot found library ',39,'proc_lib.obj',39,'" -tE',0
err_message_import_0 db 'Error on load import library ',39,'proc_lib.obj',39,'" -tE',0
err_message_found_lib_1 db 'Sorry I cannot found library ',39,'libimg.obj',39,'" -tE',0
err_message_import_1 db 'Error on load import library ',39,'libimg.obj',39,'" -tE',0
err_msg_found_lib_2 db 'Sorry I cannot found library ',39,'buf2d.obj',39,'" -tE',0
err_msg_import_2 db 'Error on load import library ',39,'buf2d',39,'" -tE',0
err_msg_found_lib_3 db 'Sorry I cannot found library ',39,'msgbox.obj',39,'" -tE',0
err_msg_import_3 db 'Error on load import library ',39,'msgbox',39,'" -tE',0
end if
align 4
l_libs_start:
lib_0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\
err_message_found_lib_0, head_f_l, proclib_import,err_message_import_0, head_f_i
lib_1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\
err_message_found_lib_1, head_f_l, import_libimg, err_message_import_1, head_f_i
lib_2 l_libs lib_name_2, sys_path, library_path, system_dir_2,\
err_msg_found_lib_2,head_f_l,import_buf2d,err_msg_import_2,head_f_i
lib_3 l_libs lib_name_3, sys_path, library_path, system_dir_3,\
err_msg_found_lib_3,head_f_l,import_msgbox_lib,err_msg_import_3,head_f_i
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 ;<3B><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A4A5><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD>
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 ;<3B><EFBFBD><EFBFBD><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RGB
aimg_to_rgb2 db 'img_to_rgb2',0
aimg_decode db 'img_decode',0 ;<3B><><EFBFBD><E2AEAC><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
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
proclib_import: ;<3B><><EFBFBD><EFBFBD><E1A0AD> <20><><EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD><E3A5AC> <20>㭪権
OpenDialog_Init dd aOpenDialog_Init
OpenDialog_Start dd aOpenDialog_Start
dd 0,0
aOpenDialog_Init db 'OpenDialog_init',0
aOpenDialog_Start db 'OpenDialog_start',0
align 4
import_buf2d:
init dd sz_init
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_curve_bezier dd sz_buf2d_curve_bezier
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_flood_fill dd sz_buf2d_flood_fill
buf2d_set_pixel dd sz_buf2d_set_pixel
buf2d_get_pixel dd sz_buf2d_get_pixel
buf2d_vox_brush_create dd sz_buf2d_vox_brush_create
buf2d_vox_brush_delete dd sz_buf2d_vox_brush_delete
buf2d_vox_obj_get_img_w_3g dd sz_buf2d_vox_obj_get_img_w_3g
buf2d_vox_obj_get_img_h_3g dd sz_buf2d_vox_obj_get_img_h_3g
buf2d_vox_obj_draw_1g dd sz_buf2d_vox_obj_draw_1g
buf2d_vox_obj_draw_3g dd sz_buf2d_vox_obj_draw_3g
buf2d_vox_obj_draw_3g_scaled dd sz_buf2d_vox_obj_draw_3g_scaled
buf2d_vox_obj_draw_3g_shadows dd sz_buf2d_vox_obj_draw_3g_shadows
buf2d_vox_obj_draw_pl dd sz_buf2d_vox_obj_draw_pl
buf2d_vox_obj_draw_pl_scaled dd sz_buf2d_vox_obj_draw_pl_scaled
dd 0,0
sz_init 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_curve_bezier db 'buf2d_curve_bezier',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_flood_fill db 'buf2d_flood_fill',0
sz_buf2d_set_pixel db 'buf2d_set_pixel',0
sz_buf2d_get_pixel db 'buf2d_get_pixel',0
sz_buf2d_vox_brush_create db 'buf2d_vox_brush_create',0
sz_buf2d_vox_brush_delete db 'buf2d_vox_brush_delete',0
sz_buf2d_vox_obj_get_img_w_3g db 'buf2d_vox_obj_get_img_w_3g',0
sz_buf2d_vox_obj_get_img_h_3g db 'buf2d_vox_obj_get_img_h_3g',0
sz_buf2d_vox_obj_draw_1g db 'buf2d_vox_obj_draw_1g',0
sz_buf2d_vox_obj_draw_3g db 'buf2d_vox_obj_draw_3g',0
sz_buf2d_vox_obj_draw_3g_scaled db 'buf2d_vox_obj_draw_3g_scaled',0
sz_buf2d_vox_obj_draw_3g_shadows db 'buf2d_vox_obj_draw_3g_shadows',0
sz_buf2d_vox_obj_draw_pl db 'buf2d_vox_obj_draw_pl',0
sz_buf2d_vox_obj_draw_pl_scaled db 'buf2d_vox_obj_draw_pl_scaled',0
align 4
import_msgbox_lib:
mb_create dd amb_create
; mb_reinit dd amb_reinit
; mb_setfunctions dd amb_setfunctions
dd 0,0
amb_create db 'mb_create',0
; amb_reinit db 'mb_reinit',0
; amb_setfunctions db 'mb_setfunctions',0
mouse_dd dd 0
sc system_colors
last_time dd 0
align 16
procinfo process_information
align 4
buf_0: dd 0
dw 5 ;+4 left
dw 35 ;+6 top
.w: dd 6*64 ;+8 w
.h: dd 7*64 ;+12 h
.color: dd 0xffffff ;+16 color
db 24 ;+20 bit in pixel
align 4
buf_0z: dd 0
dw 5 ;+4 left
dw 35 ;+6 top
.w: dd 6*64 ;+8 w
.h: dd 7*64 ;+12 h
.color: dd 0 ;+16 color
db 32 ;+20 bit in pixel
;⥪<><E2A5AA><EFBFBD><EFBFBD><EFBFBD> 1 (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
align 4
buf_i0: dd 0
dw 5 ;+4 left
dw 35 ;+6 top
.w: dd 0 ;+8 w
.h: dd 0 ;+12 h
.color: dd 0 ;+16 color
db 24 ;+20 bit in pixel
;⥪<><E2A5AA><EFBFBD><EFBFBD><EFBFBD> 2
align 4
buf_i1: dd 0
dw 105 ;+4 left
dw 35 ;+6 top
.w: dd 0 ;+8 w
.h: dd 0 ;+12 h
.color: dd 0 ;+16 color
db 24 ;+20 bit in pixel
;⥪<><E2A5AA><EFBFBD><EFBFBD><EFBFBD> 3
align 4
buf_i2: dd 0
dw 205 ;+4 left
dw 35 ;+6 top
.w: dd 0 ;+8 w
.h: dd 0 ;+12 h
.color: dd 0 ;+16 color
db 24 ;+20 bit in pixel
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 3 <20><><EFBFBD><E7A5AD>:
; <20><EFBFBD><E0A5A4><EFBFBD>饥, ⥪<>饥, <20><><EFBFBD><E1ABA5><EFBFBD>饥 (<28><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E5AEA4><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E1A5A8><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E1A5AB> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EAA5AA>)
;<3B><EFBFBD><E0A5A4><EFBFBD><20><><EFBFBD><E7A5AD>
align 4
buf_npl_p: dd 0
dw 0 ;+4 left
dw 0 ;+6 top
.w: dd 0 ;+8 w
.h: dd 0 ;+12 h
.color: dd 0 ;+16 color
db 24 ;+20 bit in pixel
;⥪<><20><><EFBFBD><E7A5AD>
align 4
buf_npl: dd 0
dw 5 ;+4 left
dw 35 ;+6 top
.w: dd 0 ;+8 w
.h: dd 0 ;+12 h
.color: dd 0 ;+16 color
db 24 ;+20 bit in pixel
;<3B><><EFBFBD><E1ABA5><EFBFBD><20><><EFBFBD><E7A5AD>
align 4
buf_npl_n: dd 0
dw 0 ;+4 left
dw 0 ;+6 top
.w: dd 0 ;+8 w
.h: dd 0 ;+12 h
.color: dd 0 ;+16 color
db 24 ;+20 bit in pixel
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><ECADAE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E7ADAE> <20><><EFBFBD><EFBFBD>
align 4
vox_6_7_z:
dd 0,0,1,1,0,0,\
0,2,2,2,2,0,\
2,2,2,2,2,2,\
2,3,2,2,3,2,\
2,3,3,3,3,2,\
0,3,3,3,3,0,\
0,0,3,3,0,0
align 4
buf_vox:
db 6,7,4,3 ;w,h,h_osn,n
rb BUF_STRUCT_SIZE*(2+1)
align 16
i_end:
rb 2048
thread:
rb 2048
stacktop:
sys_path rb 1024
file_name:
rb 1024 ;4096
library_path rb 1024
plugin_path rb 4096
openfile_path rb 4096
filename_area rb 256
mem: