2012-06-05 17:33:54 +02:00
use32
org 0x0
db 'MENUET01' ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> . <20> ᯮ<EFBFBD> <E1AFAE> 塞<EFBFBD> <EFA5AC> <EFBFBD> 䠩<> <E4A0A9> <20> ᥣ<EFBFBD> <E1A5A3> 8 <20> <> <EFBFBD> <EFBFBD>
dd 0x1
dd start
dd i_end ;ࠧ<> <E0A0A7> <EFBFBD> <20> ਫ<EFBFBD> <E0A8AB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
dd mem
dd stacktop
dd 0
dd sys_path
2012-06-12 11:56:51 +02:00
include '../../../../programs/macros.inc'
include '../../../../programs/proc32.inc'
include '../../../../programs/develop/libraries/box_lib/load_lib.mac'
2012-06-05 17:33:54 +02:00
include 'mem.inc'
include 'dll.inc'
include 'vox_draw.inc'
@ use_library_mem mem.Alloc , mem.Free , mem.ReAlloc , dl l.Load
2012-10-01 12:45:57 +02:00
caption db 'Voxel editor 01.10.12' , 0 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
2012-06-05 17:33:54 +02:00
struc t FileInfoBlock
Function dd ?
Position dd ?
Flags dd ?
Count dd ?
Buffer dd ?
db ?
FileName dd ?
ends
run_file_70 FileInfoBlock
image_data dd 0 ;㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> . <20> <> <EFBFBD> <20> 㦥<EFBFBD> <20> ८<EFBFBD> ࠧ<EFBFBD> <E0A0A7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
fn_toolbar db 'toolbar.png' , 0
IMAGE_TOOLBAR_ICON_SIZE equ 16 * 16 * 3
2012-10-01 12:45:57 +02:00
IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE * 23
2012-06-05 17:33:54 +02:00
image_data_toolbar dd 0
2012-08-23 21:57:13 +02:00
cursors_count equ 4
IMAGE_CURSORS_SIZE equ 4096 * cursors_count ;ࠧ<> <E0A0A7> <EFBFBD> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ࠬ<EFBFBD>
2012-06-05 17:33:54 +02:00
2012-07-17 10:33:56 +02:00
;<3B> <> <EFBFBD> 祭<EFBFBD> <E7A5AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 㬮<> 砭<EFBFBD> <E7A0AD> , <20> <> <EFBFBD> ini 䠩<> <E4A0A9>
ini_def_window_t equ 10
ini_def_window_l equ 10
ini_def_window_w equ 550
ini_def_window_h equ 415
ini_def_buf_w equ 198 ;=192+6
ini_def_buf_h equ 231 ;=224+7
ini_def_s_zoom equ 5
ini_def_t_size equ 10
ini_def_color_b equ 0xffffff
;<3B> <> <EFBFBD> ᠭ<EFBFBD> <E1A0AD> <20> <> ࠬ<EFBFBD> <E0A0AC> <20> <> <EFBFBD> ini 䠩<> <E4A0A9>
ini_name db 'vox_editor.ini' , 0
ini_sec_window db 'Window' , 0
key_window_t db 't' , 0
key_window_l db 'l' , 0
key_window_w db 'w' , 0
key_window_h db 'h' , 0
key_buf_w db 'buf_w' , 0
key_buf_h db 'buf_h' , 0
ini_sec_options db 'Options' , 0
key_s_zoom db 's_zoom' , 0
key_t_size db 'tile_size' , 0
key_f_size db 'file_size' , 0
key_col_b db 'c_background' , 0
2012-06-05 17:33:54 +02:00
macro load_image_file path , buf , si ze { ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 㧪<EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
;path - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> ப<EFBFBD> <E0AEAA> <EFBFBD> <EFBFBD> <20> <> ࠬ<EFBFBD> <E0A0AC>
if path eqtype '' ;<3B> <EFBFBD> <E0AEA2> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> ப<EFBFBD> <E0AEAA> <20> <> ࠬ<EFBFBD> <E0A0AC> <EFBFBD> path
jmp @ f
local .path_str
.path_str db path ;<3B> <> ନ<EFBFBD> 㥬 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> <EFBFBD>
db 0
@ @ :
;32 - <20> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> ⥬<EFBFBD> <E2A5AC> <EFBFBD> <20> <> ⥬
copy_path .path_str ,[ 32 ], file_name , 0x0
else
copy_path path ,[ 32 ], file_name , 0x0 ;<3B> <> ନ<EFBFBD> 㥬 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> 䠩<> <E4A0A9> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> ࠧ㬥<E0A0A7> <E3ACA5> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> ணࠬ<E0AEA3> <E0A0AC> <EFBFBD>
end if
stdcall mem.Alloc , dword si ze ;<3B> 뤥<EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
mov [ buf ], eax
mov eax , 70 ;70-<2D> <20> 㭪<EFBFBD> <E3ADAA> <EFBFBD> ࠡ<> <E0A0A1> <EFBFBD> <20> 䠩<> <E4A0A9> <EFBFBD> <EFBFBD>
mov [ run_file_70.Function ], 0
mov [ run_file_70.Position ], 0
mov [ run_file_70.Flags ], 0
mov [ run_file_70.Count ], dword si ze
m2m [ run_file_70.Buffer ], [ buf ]
mov byte [ run_file_70 + 20 ], 0
mov [ run_file_70.FileName ], file_name
mov ebx , run_file_70
int 0x40 ;<3B> <> <EFBFBD> <EFBFBD> 㦠<EFBFBD> <E3A6A0> 䠩<> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
cmp ebx , 0xffffffff
je @ f
;<3B> <> ।<EFBFBD> <E0A5A4> 塞 <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <20> <> ॢ<EFBFBD> <E0A5A2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <20> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> image_data
stdcall dword [ img_decode ], dword [ buf ], ebx , 0
mov dword [ image_data ], eax
;<3B> ८<EFBFBD> ࠧ㥬 <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <20> <> ଠ <EFBFBD> <E0ACA0> rgb
stdcall dword [ img_to_rgb2 ], dword [ image_data ], dword [ buf ]
;㤠<> 塞 <20> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> image_data
stdcall dword [ img_destroy ], dword [ image_data ]
@ @ :
}
OT_MAP_X equ 0
OT_MAP_Y equ 0
2012-06-11 00:19:58 +02:00
OT_CAPT_X_COLOR equ 5 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 梥<> <E6A2A5>
OT_CAPT_Y_COLOR equ 30
2012-08-23 21:57:13 +02:00
PEN_MODE_NONE equ - 1
PEN_MODE_CLEAR equ 0 ;० <> <E0A5A6> <20> <> <EFBFBD> ࠭<EFBFBD> <E0A0AD>
2012-07-19 21:06:06 +02:00
PEN_MODE_SELECT_COLOR equ 2 ;० <> <E0A5A6> <20> 롮<EFBFBD> <EBA1AE> 梥<> <E6A2A5>
2012-06-05 17:33:54 +02:00
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_2
cmp dword [ ebp + ll_struc_size - 4 ], 0
jz @ f
mcall - 1 ;exit not correct
@ @ :
mcall 48 , 3 , sc , si zeof.system_colors
mcall 40 , 0x27
stdcall [ OpenDialog_Init ], OpenDialog_data ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> ⮢<EFBFBD> <E2AEA2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2012-07-17 10:33:56 +02:00
;--- load ini file ---
copy_path ini_name , sys_path , file_name , 0
;window startup pozition
stdcall dword [ ini_get_int ], file_name , ini_sec_window , key_window_l , ini_def_window_l
mov word [ wnd_s_pos + 2 ], ax
stdcall dword [ ini_get_int ], file_name , ini_sec_window , key_window_w , ini_def_window_w
mov word [ wnd_s_pos ], ax
stdcall dword [ ini_get_int ], file_name , ini_sec_window , key_window_t , ini_def_window_t
mov word [ wnd_s_pos + 6 ], ax
stdcall dword [ ini_get_int ], file_name , ini_sec_window , key_window_h , ini_def_window_h
mov word [ wnd_s_pos + 4 ], ax
;image buffer size
stdcall dword [ ini_get_int ], file_name , ini_sec_window , key_buf_w , ini_def_buf_w
mov [ buf_0.w ], eax
mov [ buf_0z.w ], eax
add ax , 15
mov [ buf_pl.l ], ax ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> ࠢ<EFBFBD> <E0A0A2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
stdcall dword [ ini_get_int ], file_name , ini_sec_window , key_buf_h , ini_def_buf_h
mov [ buf_0.h ], eax
mov [ buf_0z.h ], eax
;梥<> 䮭<>
stdcall dword [ ini_get_color ], file_name , ini_sec_window , key_col_b , ini_def_color_b
mov [ buf_0.color ], eax
mov [ buf_pl.color ], eax
;<3B> <> <EFBFBD> ⠡, <20> <> <20> <> <EFBFBD> <EFBFBD> ண<EFBFBD> <20> 㤥<EFBFBD> 㢥<> <E3A2A5> 祭<EFBFBD> <E7A5AD>
stdcall dword [ ini_get_int ], file_name , ini_sec_options , key_s_zoom , ini_def_s_zoom
mov [ scaled_zoom ], eax
;ࠧ<> <E0A0A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⨪<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <E1AAAE> <EFBFBD> <20> <> 祭<EFBFBD> <E7A5AD>
stdcall dword [ ini_get_int ], file_name , ini_sec_options , key_t_size , ini_def_t_size
mov [ tile_size ], eax
stdcall dword [ ini_get_int ], file_name , ini_sec_options , key_f_size , 64
shl eax , 10
mov [ max_open_file_size ], eax
mov ecx ,[ scaled_zoom ]
xor eax , eax
inc eax
shl eax , cl
imul eax ,[ tile_size ]
mov [ buf_pl.w ], eax
add eax ,[ tile_size ]
mov [ buf_pl.h ], eax
2012-08-23 21:57:13 +02:00
;*** <20> <> <EFBFBD> <EFBFBD> 㧪<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
load_image_file 'cursors_gr.png' , image_data_toolbar , IMAGE_CURSORS_SIZE
stdcall [ buf2d_create_f_img ], buf_curs_8 ,[ image_data_toolbar ] ;ᮧ<> <E1AEA7> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
stdcall mem.Free ,[ image_data_toolbar ] ;<3B> <EFBFBD> <E1A2AE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
load_image_file 'cursors.png' , image_data_toolbar , IMAGE_CURSORS_SIZE
stdcall [ buf2d_create_f_img ], buf_curs ,[ image_data_toolbar ] ;ᮧ<> <E1AEA7> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
stdcall mem.Free ,[ image_data_toolbar ] ;<3B> <EFBFBD> <E1A2AE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
stdcall [ buf2d_conv_24_to_8 ], buf_curs_8 , 1 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <EFBFBD> <E0AEA7> 筮<EFBFBD> <E7ADAE> <EFBFBD> 8<> <38> <EFBFBD>
stdcall [ buf2d_conv_24_to_32 ], buf_curs , buf_curs_8 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> rgba 32<33> <32> <EFBFBD>
2012-06-05 17:33:54 +02:00
stdcall [ buf2d_create ], buf_0 ;ᮧ<> <E1AEA7> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
stdcall [ buf2d_create ], buf_0z ;ᮧ<> <E1AEA7> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 㡨<EFBFBD> <E3A1A8>
stdcall [ buf2d_create ], buf_pl ;ᮧ<> <E1AEA7> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> 祭<EFBFBD> <E7A5AD>
2012-10-01 12:45:57 +02:00
stdcall [ buf2d_vox_brush_create ], buf_vox_g3 , vox_6_7_z
stdcall [ buf2d_vox_brush_create ], buf_vox_g2 , vox_6_4_z
2012-06-05 17:33:54 +02:00
load_image_file fn_toolbar , image_data_toolbar , IMAGE_TOOLBAR_SIZE
2012-07-17 10:33:56 +02:00
stdcall mem.Alloc ,[ max_open_file_size ]
2012-06-05 17:33:54 +02:00
mov dword [ open_file_vox ], eax
call but_new_file
2012-08-23 21:57:13 +02:00
;<3B> <> ࢮ<EFBFBD> <E0A2AE> 砫쭠<E7A0AB> <20> <> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
stdcall set_pen_mode , 1 , 0 ,(( 9 shl 8 ) + 9 ) shl 16 ;pen
2012-06-05 17:33:54 +02:00
align 4
red_win:
call draw_window
align 4
still:
mcall 10
cmp al , 1
jz red_win
cmp al , 2
jz key
cmp al , 3
jz button
cmp al , 6
jne @ f
mcall 9 , procinfo , - 1
cmp ax , word [ procinfo + 4 ]
jne @ f ;<3B> <> <EFBFBD> <EFBFBD> <20> <> <20> <> ⨢<EFBFBD> <E2A8A2>
call mouse
@ @ :
jmp still
align 4
mouse:
pushad
mcall 37 , 2
2012-06-11 00:19:58 +02:00
bt eax , 1 ;right button
jnc @ f
mcall 37 , 1 ;get mouse coords
mov ebx , eax
shr ebx , 16
and eax , 0xffff
stdcall get_buf_color , buf_0
stdcall get_buf_color , buf_pl
jmp .end_f
@ @ :
2012-06-05 17:33:54 +02:00
bt eax , 0 ;left button
jnc .end_f
mcall 37 , 1 ;get mouse coords
mov ebx , eax
2012-06-11 00:19:58 +02:00
shr ebx , 16
2012-06-05 17:33:54 +02:00
and eax , 0xffff
2012-07-19 21:06:06 +02:00
cmp dword [ v_pen_mode ], PEN_MODE_SELECT_COLOR
2012-06-05 17:33:54 +02:00
jne .end_2
stdcall get_buf_color , buf_0
stdcall get_buf_color , buf_pl
jmp .end_f
.end_2:
2012-06-11 00:19:58 +02:00
push eax ebx
mov edx ,[ v_zoom ]
cmp edx ,[ scaled_zoom ]
jle @ f
;० <> <E0A5A6> <20> <> <EFBFBD> <EFBFBD> ⠡<EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
sub edx ,[ scaled_zoom ]
sub ax , word [ buf_0.t ]
sub bx , word [ buf_0.l ]
2012-10-01 12:45:57 +02:00
stdcall get_mouse_ev_scale , [ buf_vox ], ebx , eax , [ scaled_zoom ], edx
2012-06-11 00:19:58 +02:00
cmp eax , 0
je @ f
mov ebx , eax
and eax , 0x3fffffff
rol ebx , 2
and ebx , 3
dec ebx
shl ebx , 2
add ebx , cam_x
mov dword [ ebx ], eax ;change [cam_x] or [cam_y] or [cam_z]
call draw_objects
pop ebx eax
jmp .end_f
@ @ :
pop ebx eax
;eax - mouse coord y
;ebx - mouse coord x
2012-06-05 17:33:54 +02:00
movzx edx , word [ buf_pl.t ]
add edx , OT_MAP_Y
cmp eax , edx
jl .end_f
sub eax , edx
xor edx , edx
2012-07-17 10:33:56 +02:00
mov ecx ,[ tile_size ] ;H
2012-06-05 17:33:54 +02:00
div ecx
movzx edx , word [ buf_pl.l ]
add edx , OT_MAP_X
cmp ebx , edx
jl .end_f
call convert_y ;<3B> ८<EFBFBD> ࠧ<EFBFBD> <E0A0A7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> y
cmp eax , 0
jge .end_0 ;<3B> <> ࠭<EFBFBD> 祭<EFBFBD> <E7A5AD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> y
cmp eax , - 1
jne .end_f
;<3B> <> <EFBFBD> 塞 <20> <> 祭<EFBFBD> <E7A5AD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⨪
sub ebx , edx
mov eax , ebx
xor edx , edx
2012-07-17 10:33:56 +02:00
mov ecx ,[ tile_size ] ;W
2012-06-05 17:33:54 +02:00
div ecx
mov [ n_plane ], eax
jmp .end_1
.end_0:
mov [ v_cur_y ], eax ;Y-coord
sub ebx , edx
mov eax , ebx
xor edx , edx
2012-07-17 10:33:56 +02:00
mov ecx ,[ tile_size ] ;W
2012-06-05 17:33:54 +02:00
div ecx
mov [ v_cur_x ], eax ;X-coord
2012-08-23 21:57:13 +02:00
cmp dword [ v_pen_mode ], PEN_MODE_CLEAR
2012-06-11 00:19:58 +02:00
jl .end_1
2012-06-05 17:33:54 +02:00
cmp dword [ v_pen_mode ], 1
2012-06-11 00:19:58 +02:00
jg .end_1
mov eax ,[ v_cur_x ]
mov ebx ,[ n_plane ]
mov edx ,[ v_cur_y ]
2012-07-19 21:06:06 +02:00
2012-06-11 00:19:58 +02:00
mov ecx ,[ v_zoom ]
cmp ecx ,[ scaled_zoom ]
jle .no_c_coord_0
;<3B> ८<EFBFBD> ࠧ<EFBFBD> <E0A0A7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> , <20> <20> <> <EFBFBD> ⮬ 㢥<> <E3A2A5> 祭<EFBFBD> <E7A5AD>
;sub ecx,[scaled_zoom] ;<3B> ecx <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⠡<EFBFBD> (ecx>0)
mov ecx ,[ scaled_zoom ]
mov edi ,[ cam_x ]
shl edi , cl
add eax , edi
mov edi ,[ cam_y ]
shl edi , cl
add ebx , edi
mov edi ,[ cam_z ]
shl edi , cl
add edx , edi
.no_c_coord_0:
;<3B> ⫨<EFBFBD> <E2ABA8> <EFBFBD> 騩<EFBFBD> <E9A8A9> <20> <> ࠬ<EFBFBD> <E0A0AC> <EFBFBD> <20> <> <EFBFBD> <20> 㭪樨 ᮧ<> <E1AEA7> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD>
cmp dword [ v_pen_mode ], 1
jne @ f
push dword [ v_color ]
@ @ :
;<3B> 맮<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ࠬ<EFBFBD> <E0A0AC> <20> <> <EFBFBD> <20> 㭪権
push dword [ v_zoom ]
push edx
push ebx
push eax
push dword [ open_file_vox ]
;<3B> 맮<EFBFBD> <20> 㭪権
cmp dword [ v_pen_mode ], 1
jne @ f
call buf2d_vox_obj_create_node
;stdcall buf2d_vox_obj_create_node, [open_file_vox], eax,ebx,edx, [v_zoom], [v_color]
jmp .end_1
@ @ :
call buf2d_vox_obj_delete_node
;stdcall buf2d_vox_obj_delete_node, [open_file_vox], eax,ebx,edx, [v_zoom]
2012-06-05 17:33:54 +02:00
.end_1:
call draw_objects
call draw_pok
.end_f:
popad
ret
2012-06-11 00:19:58 +02:00
;input:
; eax - coord y
; ebx - coord x
2012-06-05 17:33:54 +02:00
align 4
2012-06-11 00:19:58 +02:00
proc get_buf_color , buf : dword
pushad
2012-06-05 17:33:54 +02:00
mov edi ,[ buf ]
cmp ax , buf2d_t
jl .end_f
sub ax , buf2d_t
cmp eax , buf2d_h
jg .end_f
cmp bx , buf2d_l
jl .end_f
sub bx , buf2d_l
cmp ebx , buf2d_w
jg .end_f
stdcall [ buf2d_get_pixel ], edi , ebx , eax
mov [ v_color ], eax
2012-06-12 11:56:51 +02:00
call on_change_color ;<3B> ⮡ࠦ<E2AEA1> <E0A0A6> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 梥<> <E6A2A5>
2012-06-05 17:33:54 +02:00
.end_f:
2012-06-11 00:19:58 +02:00
popad
2012-06-05 17:33:54 +02:00
ret
endp
;<3B> ८<EFBFBD> ࠧ<EFBFBD> <E0A0A7> 뢠<EFBFBD> <EBA2A0> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> y (<28> <> <EFBFBD> 祭<EFBFBD> <E7A5AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㢥<> <E3A2A5> 稢<EFBFBD> <E7A8A2> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> )
align 4
convert_y:
push ecx edx
mov ecx ,[ v_zoom ]
2012-06-11 00:19:58 +02:00
cmp ecx ,[ scaled_zoom ]
jle @ f
mov ecx ,[ scaled_zoom ]
@ @ :
2012-06-05 17:33:54 +02:00
mov edx , 1
cmp ecx , 1
2012-06-11 00:19:58 +02:00
jl @ f
shl edx , cl
2012-06-05 17:33:54 +02:00
@ @ :
sub edx , eax
dec edx
mov eax , edx
pop edx ecx
ret
align 4
draw_window:
pushad
mcall 12 , 1
; *** <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
mov edi , caption
2012-07-17 10:33:56 +02:00
mcall 0 , dword [ wnd_s_pos ], dword [ wnd_s_pos + 4 ]
2012-06-05 17:33:54 +02:00
; *** ᮧ<> <E1AEA7> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ***
mov eax , 8
mov ebx ,( 5 shl 16 ) + 20
mov ecx ,( 5 shl 16 ) + 20
mov edx , 3
mov esi ,[ sc.work_button ]
int 0x40
mov ebx ,( 30 shl 16 ) + 20
mov edx , 4
int 0x40
add ebx , 25 shl 16
mov edx , 5
int 0x40
add ebx , 30 shl 16
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
add ebx , 25 shl 16
mov edx , 13
int 0x40
add ebx , 25 shl 16
mov edx , 14
int 0x40
add ebx , 25 shl 16
mov edx , 15
int 0x40
add ebx , 25 shl 16
mov edx , 16
int 0x40
2012-07-19 21:06:06 +02:00
add ebx , 25 shl 16
mov edx , 17
int 0x40
add ebx , 25 shl 16
mov edx , 18
int 0x40
add ebx , 25 shl 16
mov edx , 19
int 0x40
add ebx , 25 shl 16
mov edx , 20
int 0x40
add ebx , 25 shl 16
mov edx , 21
int 0x40
add ebx , 25 shl 16
mov edx , 22
int 0x40
add ebx , 25 shl 16
mov edx , 23
int 0x40
2012-09-13 21:51:21 +02:00
add ebx , 25 shl 16
mov edx , 24
int 0x40
2012-10-01 12:45:57 +02:00
add ebx , 25 shl 16
mov edx , 25
int 0x40
2012-06-05 17:33:54 +02:00
; *** <20> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ***
mov eax , 7
mov ebx ,[ image_data_toolbar ]
mov ecx ,( 16 shl 16 ) + 16
mov edx ,( 7 shl 16 ) + 7 ;icon new
int 0x40
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
2012-07-19 21:06:06 +02:00
add edx ,( 30 shl 16 ) ;㢥<> <E3A2A5> <EFBFBD> . <20> <> <EFBFBD> <EFBFBD> ⠡
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
add edx ,( 25 shl 16 ) ;㬥<> <E3ACA5> <EFBFBD> . <20> <> <EFBFBD> <EFBFBD> ⠡
2012-06-05 17:33:54 +02:00
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
2012-10-01 12:45:57 +02:00
add edx ,( 25 shl 16 ) ;camera 3g 2g
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
2012-07-19 21:06:06 +02:00
add edx ,( 25 shl 16 ) ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 1
2012-06-05 17:33:54 +02:00
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
2012-07-19 21:06:06 +02:00
add edx ,( 25 shl 16 ) ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 2
2012-06-05 17:33:54 +02:00
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
2012-07-19 21:06:06 +02:00
add edx ,( 25 shl 16 ) ;ᤢ<> <E1A4A2> <20> <> <EFBFBD> <EFBFBD> <E1AAAE> <EFBFBD> +
2012-06-05 17:33:54 +02:00
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
2012-07-19 21:06:06 +02:00
add edx ,( 25 shl 16 ) ;ᤢ<> <E1A4A2> <20> <> <EFBFBD> <EFBFBD> <E1AAAE> <EFBFBD> -
2012-06-05 17:33:54 +02:00
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
2012-07-19 21:06:06 +02:00
add edx ,( 25 shl 16 ) ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 㬥<EFBFBD> <E3ACA5> <20> <> ࠭<EFBFBD> <E0A0AD> <EFBFBD>
2012-06-05 17:33:54 +02:00
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
2012-07-19 21:06:06 +02:00
add edx ,( 25 shl 16 ) ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 㬥<EFBFBD> <E3ACA5> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
2012-06-05 17:33:54 +02:00
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
2012-07-19 21:06:06 +02:00
add edx ,( 25 shl 16 ) ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 㬥<EFBFBD> <E3ACA5> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 窠
2012-06-05 17:33:54 +02:00
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
2012-07-19 21:06:06 +02:00
add edx ,( 25 shl 16 ) ;<3B> 롮<EFBFBD> 梥<> <E6A2A5>
2012-06-05 17:33:54 +02:00
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
2012-07-19 21:06:06 +02:00
add edx ,( 25 shl 16 ) ;<3B> ᢥ饭<E1A2A5> <E9A5AD>
2012-06-05 17:33:54 +02:00
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
2012-07-19 21:06:06 +02:00
add edx ,( 25 shl 16 ) ;७<> <E0A5AD> <EFBFBD> 2*2
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
add edx ,( 25 shl 16 ) ;ᮧ<> <E1AEA7> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
add edx ,( 25 shl 16 ) ;<3B> <> <EFBFBD> <EFBFBD> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
2012-09-13 21:51:21 +02:00
add edx ,( 25 shl 16 ) ;㤠<> <E3A4A0> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
2012-07-19 21:06:06 +02:00
add edx ,( 25 shl 16 ) ;<3B> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> -1
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
add edx ,( 25 shl 16 ) ;<3B> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> +1
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
add edx ,( 25 shl 16 ) ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> -1
int 0x40
add ebx , IMAGE_TOOLBAR_ICON_SIZE
add edx ,( 25 shl 16 ) ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> +1
2012-06-05 17:33:54 +02:00
int 0x40
; *** <20> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ***
call draw_objects
call draw_pok
mcall 12 , 2
popad
ret
align 4
draw_pok:
mov eax , 47
mov ecx ,[ v_zoom ]
2012-06-12 11:56:51 +02:00
mov ebx ,( 3 shl 16 ) + ( 1 shl 31 )
2012-07-19 21:06:06 +02:00
mov edx ,(( 350 + 6 * 9 ) shl 16 ) + OT_CAPT_Y_COLOR + 2
2012-06-05 17:33:54 +02:00
mov esi ,[ sc.work_button_text ]
or esi ,( 1 shl 30 )
mov edi ,[ sc.work_button ]
int 0x40 ;<3B> <> <EFBFBD> <EFBFBD> ⠡
mov ecx ,[ n_plane ]
2012-07-19 21:06:06 +02:00
add edx , 115 shl 16 ;9
2012-06-12 11:56:51 +02:00
int 0x40 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 祭<EFBFBD> <E7A5AD>
2012-06-05 17:33:54 +02:00
2012-07-19 21:06:06 +02:00
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ࠬ<EFBFBD> <E0A0AC> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov dword [ txt_curor.size ], 0
mov eax , dword [ v_cur_x ]
mov edi , txt_curor.size
call convert_int_to_str
stdcall str_cat , edi , txt_mull
mov eax , dword [ v_cur_y ]
mov edi , txt_buf
call convert_int_to_str
stdcall str_cat , txt_curor.size , edi
stdcall str_cat , txt_curor.size , txt_space ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 騩 <20> <EFBFBD> <E0AEA1>
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ࠬ<EFBFBD> <E0A0AC> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
mov dword [ txt_brush.size ], 0
mov eax , dword [ brush_w ]
mov edi , txt_brush.size
call convert_int_to_str
stdcall str_cat , edi , txt_mull
mov eax , dword [ brush_h ]
mov edi , txt_buf
call convert_int_to_str
stdcall str_cat , txt_brush.size , edi
stdcall str_cat , txt_brush.size , txt_space ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 騩 <20> <EFBFBD> <E0AEA1>
2012-06-11 00:19:58 +02:00
mov eax , 4 ;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> ⥪<> <E2A5AA> <EFBFBD>
mov ebx ,( OT_CAPT_X_COLOR shl 16 ) + OT_CAPT_Y_COLOR + 2
mov ecx ,[ sc.work_text ]
or ecx , 0x80000000 ;or (1 shl 30)
mov edx , txt_color
int 0x40
2012-07-19 21:06:06 +02:00
mov edx , txt_curor
add ebx , 115 shl 16
or ecx ,( 1 shl 30 )
mov edi ,[ sc.work ]
int 0x40
mov edx , txt_brush
add ebx , 115 shl 16
int 0x40
mov edx , txt_zoom
add ebx , 115 shl 16
int 0x40
mov edx , txt_n_plane
add ebx , 115 shl 16
int 0x40
2012-06-12 11:56:51 +02:00
call on_change_color
ret
align 4
on_change_color:
pushad
2012-06-11 00:19:58 +02:00
mov ebx ,(( OT_CAPT_X_COLOR + 35 ) shl 16 ) + 16 ;<3B> <> <20> <> <EFBFBD> x
mov ecx ,( OT_CAPT_Y_COLOR shl 16 ) + 12 ;<3B> <> <20> <> <EFBFBD> y
mov edx ,[ v_color ]
mcall 13
2012-06-12 11:56:51 +02:00
mov ebx ,( 1 shl 8 ) + ( 6 shl 16 )
mov ecx , edx
mov edx ,(( OT_CAPT_X_COLOR + 55 ) shl 16 ) + OT_CAPT_Y_COLOR + 2
mov esi ,[ sc.work_text ]
add esi ,( 1 shl 30 )
mov edi ,[ sc.work ]
mcall 47
popad
2012-06-05 17:33:54 +02:00
ret
align 4
key:
mcall 2
jmp still
align 4
button:
mcall 17
cmp ah , 3
jne @ f
call but_new_file
call draw_objects
call draw_pok
@ @ :
cmp ah , 4
jne @ f
call but_open_file
@ @ :
cmp ah , 5
jne @ f
call but_save_file
@ @ :
cmp ah , 6
jne @ f
2012-10-01 17:21:16 +02:00
call but_camera_3g_2g
2012-06-05 17:33:54 +02:00
@ @ :
cmp ah , 7
jne @ f
2012-10-01 17:21:16 +02:00
call but_zoom_p
2012-06-05 17:33:54 +02:00
@ @ :
cmp ah , 8
jne @ f
2012-10-01 17:21:16 +02:00
call but_zoom_m
2012-06-05 17:33:54 +02:00
@ @ :
cmp ah , 9
jne @ f
2012-10-01 12:45:57 +02:00
call but_3
2012-06-05 17:33:54 +02:00
@ @ :
cmp ah , 10
jne @ f
2012-10-01 12:45:57 +02:00
call but_4
2012-06-05 17:33:54 +02:00
@ @ :
cmp ah , 11
jne @ f
2012-10-01 12:45:57 +02:00
call but_plane_inc
2012-06-05 17:33:54 +02:00
@ @ :
cmp ah , 12
jne @ f
2012-10-01 12:45:57 +02:00
call but_plane_dec
2012-06-05 17:33:54 +02:00
@ @ :
cmp ah , 13
jne @ f
2012-10-01 12:45:57 +02:00
call but_mode_pen
2012-06-05 17:33:54 +02:00
@ @ :
cmp ah , 14
jne @ f
2012-10-01 12:45:57 +02:00
call but_mode_brush
2012-06-05 17:33:54 +02:00
@ @ :
cmp ah , 15
2012-10-01 12:45:57 +02:00
jne @ f
call but_mode_clear
@ @ :
cmp ah , 16
2012-06-05 17:33:54 +02:00
jne @ f
2012-08-23 21:57:13 +02:00
stdcall set_pen_mode , PEN_MODE_SELECT_COLOR , 3 ,(( 9 shl 8 ) + 9 ) shl 16
2012-07-19 21:06:06 +02:00
call draw_palete
2012-06-05 17:33:54 +02:00
@ @ :
2012-10-01 12:45:57 +02:00
cmp ah , 17
2012-07-19 21:06:06 +02:00
jne @ f
call but_light
@ @ :
2012-10-01 12:45:57 +02:00
cmp ah , 18
2012-06-05 17:33:54 +02:00
jne @ f
call but_rend_2_2
@ @ :
2012-10-01 12:45:57 +02:00
cmp ah , 19
2012-07-19 21:06:06 +02:00
jne @ f
call but_brush_copy
@ @ :
2012-10-01 12:45:57 +02:00
cmp ah , 20
2012-07-19 21:06:06 +02:00
jne @ f
call but_brush_draw
@ @ :
2012-10-01 12:45:57 +02:00
cmp ah , 21
2012-07-19 21:06:06 +02:00
jne @ f
2012-09-13 21:51:21 +02:00
call but_brush_clear
2012-07-19 21:06:06 +02:00
@ @ :
2012-10-01 12:45:57 +02:00
cmp ah , 22
2012-07-19 21:06:06 +02:00
jne @ f
2012-09-13 21:51:21 +02:00
call but_bru_w_m
2012-07-19 21:06:06 +02:00
@ @ :
2012-10-01 12:45:57 +02:00
cmp ah , 23
2012-07-19 21:06:06 +02:00
jne @ f
2012-09-13 21:51:21 +02:00
call but_bru_w_p
2012-07-19 21:06:06 +02:00
@ @ :
2012-10-01 12:45:57 +02:00
cmp ah , 24
2012-09-13 21:51:21 +02:00
jne @ f
call but_bru_h_m
@ @ :
2012-10-01 12:45:57 +02:00
cmp ah , 25
2012-07-19 21:06:06 +02:00
jne @ f
call but_bru_h_p
@ @ :
2012-06-05 17:33:54 +02:00
cmp ah , 1
jne still
.exit:
stdcall [ buf2d_delete ], buf_0
stdcall [ buf2d_delete ], buf_0z
cmp dword [ buf_r_img ], 0
je @ f
stdcall [ buf2d_delete ], buf_r_img
stdcall [ buf2d_delete ], buf_r_z
@ @ :
2012-10-01 12:45:57 +02:00
stdcall [ buf2d_vox_brush_delete ], buf_vox_g3
stdcall [ buf2d_vox_brush_delete ], buf_vox_g2
2012-08-23 21:57:13 +02:00
stdcall [ buf2d_delete ], buf_curs
stdcall [ buf2d_delete ], buf_curs_8
2012-06-05 17:33:54 +02:00
stdcall mem.Free ,[ image_data_toolbar ]
stdcall mem.Free ,[ open_file_vox ]
mcall - 1
2012-09-13 21:51:21 +02:00
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> 樠<EFBFBD> <E6A8A0> <EFBFBD> <EFBFBD> 樨 <20> <> <EFBFBD> ᥫ쭮<E1A5AB> <ECADAE> <20> <> ꥪ<EFBFBD> <EAA5AA>
2012-06-05 17:33:54 +02:00
align 4
vox_new_data:
db 2 , 0 , 0 , 0
2012-09-13 21:51:21 +02:00
db 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ;default table
2012-06-05 17:33:54 +02:00
dd 0 ;null node
2012-09-13 21:51:21 +02:00
;<3B> <> <EFBFBD> 樠<EFBFBD> <E6A8A0> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ쭮<E1A5AB> <ECADAE> <20> <> ꥪ<EFBFBD> <EAA5AA>
2012-06-05 17:33:54 +02:00
align 4
proc but_new_file uses ecx edi esi
mov ecx , vox_offs_data + 4
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> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 䠩<> <E4A0A9> <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 .end_open_file
;<3B> <> <EFBFBD> <20> <> <EFBFBD> 㤠筮<E3A4A0> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ⨨ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov eax , 70 ;70-<2D> <20> 㭪<EFBFBD> <E3ADAA> <EFBFBD> ࠡ<> <E0A0A1> <EFBFBD> <20> 䠩<> <E4A0A9> <EFBFBD> <EFBFBD>
mov [ run_file_70.Function ], 0
mov [ run_file_70.Position ], 0
mov [ run_file_70.Flags ], 0
2012-07-17 10:33:56 +02:00
m2m dword [ run_file_70.Count ], dword [ max_open_file_size ]
2012-06-05 17:33:54 +02:00
m2m [ run_file_70.Buffer ], [ open_file_vox ]
mov byte [ run_file_70 + 20 ], 0
mov dword [ run_file_70.FileName ], openfile_path
mov ebx , run_file_70
int 0x40 ;<3B> <> <EFBFBD> <EFBFBD> 㦠<EFBFBD> <E3A6A0> 䠩<> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
cmp ebx , 0xffffffff
je .end_open_file
2012-07-17 10:33:56 +02:00
;add ebx,[open_file_vox]
;mov byte[ebx],0 ;<3B> <> <20> <> <EFBFBD> 砩 <20> ࠭<> <E0A0AD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 䠩<> <20> <> <EFBFBD> <EFBFBD> 襣<EFBFBD> ࠧ<> <E0A0A7> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ⨬ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 䠩<> <E4A0A9> <EFBFBD>
2012-06-05 17:33:54 +02:00
mcall 71 , 1 , openfile_path
;---
;
mov eax ,[ open_file_vox ]
movzx eax , byte [ eax ]
and eax , 0xff ;<3B> <> ६ <20> <> <EFBFBD> <EFBFBD> ⠡ <20> <> 㬮<> 砭<EFBFBD> <E7A0AD>
mov dword [ v_zoom ], eax ;<3B> <> ६ <20> <> <EFBFBD> <EFBFBD> ⠡ <20> <> 㬮<> 砭<EFBFBD> <E7A0AD>
2012-06-12 11:56:51 +02:00
mov dword [ cam_x ], 0
mov dword [ cam_y ], 0
mov dword [ cam_z ], 0
2012-06-05 17:33:54 +02:00
call draw_objects
.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 , 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 eax , 70 ;70-<2D> <20> 㭪<EFBFBD> <E3ADAA> <EFBFBD> ࠡ<> <E0A0A1> <EFBFBD> <20> 䠩<> <E4A0A9> <EFBFBD> <EFBFBD>
mov [ run_file_70.Function ], 2
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
mov ebx , run_file_70
int 0x40 ;<3B> <> <EFBFBD> <EFBFBD> 㦠<EFBFBD> <E3A6A0> 䠩<> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
cmp ebx , 0xffffffff
je .end_save_file
.end_save_file:
popad
ret
2012-10-01 12:45:57 +02:00
;ᬥ<> <E1ACA5> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> ᬮ<EFBFBD> <E1ACAE> 3 <20> 2 <20> ࠭<EFBFBD> <E0A0AD>
align 4
but_camera_3g_2g:
cmp dword [ buf_vox ], buf_vox_g3
je @ f
mov dword [ buf_vox ], buf_vox_g3
jmp .end_0
@ @ :
mov dword [ buf_vox ], buf_vox_g2
.end_0:
call draw_objects
ret
2012-06-11 00:19:58 +02:00
;㢥<> <E3A2A5> 祭<EFBFBD> <E7A5AD> <20> <> <EFBFBD> <EFBFBD> ⠡<EFBFBD>
2012-06-05 17:33:54 +02:00
align 4
2012-06-12 11:56:51 +02:00
but_zoom_p:
2012-06-11 00:19:58 +02:00
cmp dword [ v_zoom ], 10 ;<3B> <> <EFBFBD> ᨬ<EFBFBD> <E1A8AC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ࠧ<> <E0A0A7> <EFBFBD> , <20> <> <20> <> <EFBFBD> <EFBFBD> ண<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㢥<> <E3A2A5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 2^10=1024
2012-06-05 17:33:54 +02:00
jge @ f
inc dword [ v_zoom ]
shl dword [ n_plane ], 1
2012-06-11 00:19:58 +02:00
push eax
mov eax ,[ v_zoom ]
cmp eax ,[ scaled_zoom ]
jl .end_0
2012-06-12 11:56:51 +02:00
push ecx
mov ecx ,[ scaled_zoom ]
xor eax , eax
inc eax
shl eax , cl
2012-06-11 00:19:58 +02:00
shl dword [ cam_x ], 1
shl dword [ cam_y ], 1
shl dword [ cam_z ], 1
2012-06-12 11:56:51 +02:00
cmp eax ,[ n_plane ]
jg .end_1
;<3B> <> ४<EFBFBD> <E0A5AA> <EFBFBD> <E0AEA2> <20> <> <EFBFBD> <EFBFBD> 㭪<EFBFBD>
sub [ n_plane ], eax
inc dword [ cam_y ]
.end_1:
pop ecx
2012-06-11 00:19:58 +02:00
.end_0:
pop eax
2012-06-05 17:33:54 +02:00
call draw_objects
call draw_pok
@ @ :
ret
2012-06-11 00:19:58 +02:00
;㬥<> <E3ACA5> 襭<EFBFBD> <E8A5AD> <20> <> <EFBFBD> <EFBFBD> ⠡<EFBFBD>
2012-06-05 17:33:54 +02:00
align 4
2012-06-12 11:56:51 +02:00
but_zoom_m:
cmp dword [ v_zoom ], 1
2012-06-05 17:33:54 +02:00
jl @ f
dec dword [ v_zoom ]
shr dword [ n_plane ], 1
2012-06-11 00:19:58 +02:00
push eax
mov eax ,[ v_zoom ]
cmp eax ,[ scaled_zoom ]
jl .end_0
shr dword [ cam_x ], 1
shr dword [ cam_y ], 1
2012-06-12 11:56:51 +02:00
jnc .end_1
;<3B> <> ४<EFBFBD> <E0A5AA> <EFBFBD> <E0AEA2> <20> <> <EFBFBD> <EFBFBD> 㭪<EFBFBD>
push ecx
mov ecx ,[ scaled_zoom ]
dec ecx
xor eax , eax
inc eax
shl eax , cl
add [ n_plane ], eax
pop ecx
.end_1:
2012-06-11 00:19:58 +02:00
shr dword [ cam_z ], 1
.end_0:
pop eax
2012-06-05 17:33:54 +02:00
call draw_objects
call draw_pok
@ @ :
ret
align 4
but_3:
stdcall vox_obj_rot_z , [ open_file_vox ]
call draw_objects
ret
align 4
but_4:
stdcall vox_obj_rot_x , [ open_file_vox ]
call draw_objects
ret
2012-06-12 11:56:51 +02:00
;ᤢ<> <E1A4A2> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <E1AAAE> <EFBFBD> <20> १<EFBFBD>
2012-06-05 17:33:54 +02:00
align 4
2012-09-13 21:51:21 +02:00
but_plane_inc:
2012-06-12 11:56:51 +02:00
push eax ecx
2012-06-05 17:33:54 +02:00
inc dword [ n_plane ]
2012-06-12 11:56:51 +02:00
mov eax ,[ v_zoom ]
cmp eax ,[ scaled_zoom ]
jle .end_0
;<3B> ந<EFBFBD> 室<EFBFBD> <E5AEA4> <20> <> <EFBFBD> <EFBFBD> ⠡<EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD>
mov ecx ,[ scaled_zoom ]
xor eax , eax
inc eax
shl eax , cl
cmp eax ,[ n_plane ]
jg @ f
mov dword [ n_plane ], 0
inc dword [ cam_y ] ;<3B> <> <EFBFBD> <EFBFBD> 室<EFBFBD> <E5AEA4> <20> <20> <> ᥤ<EFBFBD> <E1A5A4> <EFBFBD> <20> <> <EFBFBD>
neg ecx
;inc ecx
add ecx ,[ v_zoom ]
xor eax , eax
inc eax
shl eax , cl
cmp eax ,[ cam_y ]
jg @ f
mov dword [ cam_y ], 0 ;<3B> <> 横<EFBFBD> <E6A8AA> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> 뫥<EFBFBD> <EBABA5> <EFBFBD> <20> <> <20> ।<EFBFBD> <E0A5A4> <EFBFBD> <20> <> <EFBFBD> <E1ABA5> <EFBFBD> <EFBFBD> <EFBFBD> <20> 㡠
@ @ :
jmp .end_1
.end_0:
;<3B> <> <EFBFBD> <EFBFBD> ⠡<EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> <20> <> <20> ந<EFBFBD> 室<EFBFBD> <E5AEA4>
mov ecx , eax
xor eax , eax
inc eax
shl eax , cl
cmp eax ,[ n_plane ]
jg .end_1
mov dword [ n_plane ], 0
.end_1:
2012-06-05 17:33:54 +02:00
call draw_objects
call draw_pok
2012-06-12 11:56:51 +02:00
pop ecx eax
2012-06-05 17:33:54 +02:00
ret
2012-06-12 11:56:51 +02:00
;ᤢ<> <E1A4A2> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <E1AAAE> <EFBFBD> <20> १<EFBFBD>
2012-06-05 17:33:54 +02:00
align 4
2012-09-13 21:51:21 +02:00
but_plane_dec:
2012-06-12 11:56:51 +02:00
dec dword [ n_plane ]
2012-06-05 17:33:54 +02:00
cmp dword [ n_plane ], 0
2012-06-12 11:56:51 +02:00
jge .end_f
push eax ecx
mov ecx ,[ scaled_zoom ]
xor eax , eax
inc eax
shl eax , cl
dec eax
mov dword [ n_plane ], eax
mov eax ,[ v_zoom ]
cmp eax ,[ scaled_zoom ]
jle .end_0
;<3B> ந<EFBFBD> 室<EFBFBD> <E5AEA4> <20> <> <EFBFBD> <EFBFBD> ⠡<EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD>
dec dword [ cam_y ] ;<3B> <> <EFBFBD> <EFBFBD> 室<EFBFBD> <E5AEA4> <20> <20> <> ᥤ<EFBFBD> <E1A5A4> <EFBFBD> <20> <> <EFBFBD>
cmp dword [ cam_y ], 0
jge .end_0
mov ecx , eax
sub ecx ,[ scaled_zoom ]
xor eax , eax
inc eax
shl eax , cl
dec eax
mov dword [ cam_y ], eax ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> 㡠 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 0 <20> <> <EFBFBD> ࠢ<EFBFBD> 塞 <20> <> <20> <> <EFBFBD> ᨬ<EFBFBD> <E1A8AC> 쭮<EFBFBD> <20> <> <EFBFBD> 祭<EFBFBD> <E7A5AD>
.end_0:
pop ecx eax
.end_f:
call draw_objects
call draw_pok
2012-06-05 17:33:54 +02:00
ret
align 4
2012-07-19 21:06:06 +02:00
but_mode_pen:
push eax
mov eax , dword [ v_pen_mode ]
2012-08-23 21:57:13 +02:00
stdcall set_pen_mode , 1 , 0 ,(( 9 shl 8 ) + 9 ) shl 16 ;pen
2012-07-19 21:06:06 +02:00
cmp eax , PEN_MODE_SELECT_COLOR
jne @ f
call draw_objects
@ @ :
pop eax
ret
align 4
but_mode_brush:
2012-06-05 17:33:54 +02:00
push eax
mov eax , dword [ v_pen_mode ]
2012-08-23 21:57:13 +02:00
stdcall set_pen_mode , 3 , 1 ,(( 9 shl 8 ) + 9 ) shl 16 ;brush
2012-07-19 21:06:06 +02:00
cmp eax , PEN_MODE_SELECT_COLOR
2012-06-05 17:33:54 +02:00
jne @ f
call draw_objects
@ @ :
pop eax
ret
align 4
2012-07-19 21:06:06 +02:00
but_mode_clear:
2012-06-05 17:33:54 +02:00
push eax
mov eax , dword [ v_pen_mode ]
2012-08-23 21:57:13 +02:00
stdcall set_pen_mode , PEN_MODE_CLEAR , 2 ,(( 15 shl 8 ) + 9 ) shl 16
2012-07-19 21:06:06 +02:00
cmp eax , PEN_MODE_SELECT_COLOR
2012-06-05 17:33:54 +02:00
jne @ f
call draw_objects
@ @ :
pop eax
ret
align 4
but_light:
xor dword [ mode_light ], 1
call draw_objects
ret
align 4
but_rend_2_2:
push edi
cmp dword [ buf_r_img ], 0
jne @ f
;ᮧ<> <E1AEA7> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ७<> <E0A5AD> <EFBFBD> <EFBFBD>
push ecx esi
mov edi , buf_r_img
mov esi , buf_0
mov ecx , BUF_STRUCT_SIZE
cld
rep movsb ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬 <20> <> <EFBFBD> <20> <> ࠬ<EFBFBD> <E0A0AC> <EFBFBD> <EFBFBD> <20> <20> ᭮<EFBFBD> <E1ADAE> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov edi , buf_r_img
mov buf2d_data , 0
shl buf2d_w , 1 ;㢥<> <E3A2A5> 稢<EFBFBD> <E7A8A2> <EFBFBD> ࠧ<> <E0A0A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
shl buf2d_h , 1
stdcall [ buf2d_create ], buf_r_img
mov edi , buf_r_z
mov esi , buf_0z
mov ecx , BUF_STRUCT_SIZE
cld
rep movsb ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬 <20> <> <EFBFBD> <20> <> ࠬ<EFBFBD> <E0A0AC> <EFBFBD> <EFBFBD> <20> <20> ᭮<EFBFBD> <E1ADAE> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov edi , buf_r_z
mov buf2d_data , 0
shl buf2d_w , 1 ;㢥<> <E3A2A5> 稢<EFBFBD> <E7A8A2> <EFBFBD> ࠧ<> <E0A0A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
shl buf2d_h , 1
stdcall [ buf2d_create ], buf_r_z
pop esi ecx
@ @ :
stdcall [ buf2d_clear ], buf_r_img , [ buf_0.color ] ;<3B> <> <EFBFBD> ⨬ <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
stdcall [ buf2d_clear ], buf_r_z , 0 ;<3B> <> <EFBFBD> ⨬ <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
push eax ebx ecx
mov eax ,[ v_zoom ]
2012-06-11 00:19:58 +02:00
cmp eax ,[ scaled_zoom ]
jle .end_scaled
;७<> <E0A5AD> <EFBFBD> 㢥<> <E3A2A5> 祭<EFBFBD> <E7A5AD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ꥪ<EFBFBD> <EAA5AA>
mov ebx ,[ scaled_zoom ]
sub eax , ebx
inc ebx
2012-10-01 12:45:57 +02:00
stdcall [ buf2d_vox_obj_draw_3g_scaled ], buf_r_img , buf_r_z , [ buf_vox ], \
2012-06-19 14:20:54 +02:00
[ open_file_vox ], 0 , 0 , 0 , ebx , [ cam_x ],[ cam_y ],[ cam_z ], eax , [ sc.work_graph ]
2012-06-11 00:19:58 +02:00
bt dword [ mode_light ], 0
jnc @ f
2012-10-01 12:45:57 +02:00
stdcall [ buf2d_vox_obj_draw_3g_shadows ], buf_r_img , buf_r_z , [ buf_vox ], 0 , 0 , 0 , ebx , 3
2012-06-11 00:19:58 +02:00
@ @ :
xor ebx , ebx
xor ecx , ecx
mov edi , buf_r_img
stdcall [ buf2d_img_hdiv2 ], edi
shr buf2d_h , 1
stdcall [ buf2d_img_wdiv2 ], edi
shr buf2d_w , 1
jmp .show
.end_scaled:
2012-06-05 17:33:54 +02:00
2012-06-11 00:19:58 +02:00
inc eax
2012-10-01 12:45:57 +02:00
stdcall [ buf2d_vox_obj_draw_3g ], buf_r_img , buf_r_z , [ buf_vox ], [ open_file_vox ], 0 , 0 , 0 , eax
2012-06-21 13:32:18 +02:00
stdcall [ buf2d_vox_obj_draw_1g ], buf_r_img , buf_r_z , [ open_file_vox ], 0 , 0 , eax
2012-06-05 17:33:54 +02:00
bt dword [ mode_light ], 0
jnc @ f
2012-10-01 12:45:57 +02:00
stdcall [ buf2d_vox_obj_draw_3g_shadows ], buf_r_img , buf_r_z , [ buf_vox ], 0 , 0 , 0 , eax , 3
2012-06-05 17:33:54 +02:00
@ @ :
mov edi , buf_r_img
stdcall [ buf2d_img_hdiv2 ], edi
shr buf2d_h , 1
stdcall [ buf2d_img_wdiv2 ], edi
shr buf2d_w , 1
2012-10-01 12:45:57 +02:00
stdcall [ buf2d_vox_obj_get_img_w_3g ], [ buf_vox ],[ v_zoom ]
2012-06-05 17:33:54 +02:00
mov ebx ,[ buf_0.w ]
sub ebx , eax
shr ebx , 1 ;ebx - <20> <> <EFBFBD> 業<> <EFBFBD> <E0AEA2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 쪨<EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <20> <> ਧ<EFBFBD> <E0A8A7> ⠫<EFBFBD>
2012-10-01 12:45:57 +02:00
stdcall [ buf2d_vox_obj_get_img_h_3g ], [ buf_vox ],[ v_zoom ]
2012-06-05 17:33:54 +02:00
cmp eax ,[ buf_0.h ]
jg @ f
mov ecx ,[ buf_0.h ]
sub ecx , eax
2012-06-11 00:19:58 +02:00
shr ecx , 1 ;ecx - <20> <> <EFBFBD> 業<> <EFBFBD> <E0AEA2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 쪨<EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> ⨪<EFBFBD> <E2A8AA> <EFBFBD>
@ @ :
.show:
2012-06-05 17:33:54 +02:00
stdcall [ buf2d_bit_blt ], buf_0 , ebx , ecx , edi
shl buf2d_h , 1
shl buf2d_w , 1
pop ecx ebx eax
pop edi
stdcall [ buf2d_draw ], buf_0 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> ࠭<EFBFBD>
ret
2012-07-19 21:06:06 +02:00
;㬥<> <E3ACA5> 蠥<EFBFBD> <20> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
align 4
but_bru_w_m:
cmp dword [ brush_w ], 1
jle @ f
dec dword [ brush_w ]
pushad
call draw_pok
call draw_vox_cursor
stdcall [ buf2d_draw ], buf_pl ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> ࠭<EFBFBD>
popad
@ @ :
ret
;㢥<> <E3A2A5> 稢<EFBFBD> <E7A8A2> <EFBFBD> <20> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
align 4
but_bru_w_p:
cmp dword [ brush_w ], 32
jge @ f
inc dword [ brush_w ]
pushad
call draw_pok
call draw_vox_cursor
stdcall [ buf2d_draw ], buf_pl ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> ࠭<EFBFBD>
popad
@ @ :
ret
;㬥<> <E3ACA5> 蠥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
align 4
but_bru_h_m:
cmp dword [ brush_h ], 1
jle @ f
dec dword [ brush_h ]
pushad
call draw_pok
call draw_vox_cursor
stdcall [ buf2d_draw ], buf_pl ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> ࠭<EFBFBD>
popad
@ @ :
ret
;㢥<> <E3A2A5> 稢<EFBFBD> <E7A8A2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
align 4
but_bru_h_p:
cmp dword [ brush_h ], 32
jge @ f
inc dword [ brush_h ]
pushad
call draw_pok
call draw_vox_cursor
stdcall [ buf2d_draw ], buf_pl ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> ࠭<EFBFBD>
popad
@ @ :
ret
align 4
but_brush_copy:
cmp dword [ v_pen_mode ], 3
jne .end_f
pushad
mov eax ,[ v_cur_x ]
mov ebx ,[ n_plane ]
mov edx ,[ v_cur_y ]
mov ecx ,[ v_zoom ]
cmp ecx ,[ scaled_zoom ]
jle @ f
;<3B> ८<EFBFBD> ࠧ<EFBFBD> <E0A0A7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> , <20> <20> <> <EFBFBD> ⮬ 㢥<> <E3A2A5> 祭<EFBFBD> <E7A5AD>
;sub ecx,[scaled_zoom] ;<3B> ecx <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⠡<EFBFBD> (ecx>0)
mov ecx ,[ scaled_zoom ]
mov edi ,[ cam_x ]
shl edi , cl
add eax , edi
mov edi ,[ cam_y ]
shl edi , cl
add ebx , edi
mov edi ,[ cam_z ]
shl edi , cl
add edx , edi
@ @ :
cld
mov edi , brush_data
mov esi , edx
sub esi ,[ brush_h ]
.cycle_0:
mov ecx ,[ brush_w ]
@ @ :
push eax
stdcall buf2d_vox_obj_node_get_color , [ open_file_vox ], eax , ebx , edx , [ v_zoom ]
cmp eax ,[ v_color ]
jne .end_0
mov eax , 1 shl 30
.end_0:
mov dword [ edi ], eax ;color
pop eax
inc eax
add edi , 4
loop @ b
dec edx
sub eax ,[ brush_w ]
cmp edx , esi
jg .cycle_0
call draw_objects
popad
.end_f:
ret
align 4
but_brush_draw:
cmp dword [ v_pen_mode ], 3
jne .end_f
pushad
mov eax ,[ v_cur_x ]
mov ebx ,[ n_plane ]
mov edx ,[ v_cur_y ]
mov ecx ,[ v_zoom ]
cmp ecx ,[ scaled_zoom ]
jle @ f
;<3B> ८<EFBFBD> ࠧ<EFBFBD> <E0A0A7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> , <20> <20> <> <EFBFBD> ⮬ 㢥<> <E3A2A5> 祭<EFBFBD> <E7A5AD>
;sub ecx,[scaled_zoom] ;<3B> ecx <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⠡<EFBFBD> (ecx>0)
mov ecx ,[ scaled_zoom ]
mov edi ,[ cam_x ]
shl edi , cl
add eax , edi
mov edi ,[ cam_y ]
shl edi , cl
add ebx , edi
mov edi ,[ cam_z ]
shl edi , cl
add edx , edi
@ @ :
cld
mov edi , brush_data
mov esi , edx
sub esi ,[ brush_h ]
.cycle_0:
mov ecx ,[ brush_w ]
@ @ :
bt dword [ edi ], 31 ;<3B> <> <EFBFBD> <20> <EFBFBD> <E0AEA7> 筮<EFBFBD> <E7ADAE> <EFBFBD>
jc .end_2
bt dword [ edi ], 30 ;<3B> <> <EFBFBD> ⥪<> 饣<EFBFBD> 梥<> <E6A2A5>
jnc .end_0
push dword [ v_color ]
jmp .end_1
.end_0:
push dword [ edi ]
.end_1:
stdcall buf2d_vox_obj_create_node , [ open_file_vox ], eax , ebx , edx , [ v_zoom ] ;, color
.end_2:
inc eax
add edi , 4
loop @ b
dec edx
sub eax ,[ brush_w ]
cmp edx , esi
jg .cycle_0
call draw_objects
popad
.end_f:
ret
2012-09-13 21:51:21 +02:00
align 4
but_brush_clear:
cmp dword [ v_pen_mode ], 3
jne .end_f
pushad
mov eax ,[ v_cur_x ]
mov ebx ,[ n_plane ]
mov edx ,[ v_cur_y ]
mov ecx ,[ v_zoom ]
cmp ecx ,[ scaled_zoom ]
jle @ f
;<3B> ८<EFBFBD> ࠧ<EFBFBD> <E0A0A7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> , <20> <20> <> <EFBFBD> ⮬ 㢥<> <E3A2A5> 祭<EFBFBD> <E7A5AD>
;sub ecx,[scaled_zoom] ;<3B> ecx <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⠡<EFBFBD> (ecx>0)
mov ecx ,[ scaled_zoom ]
mov edi ,[ cam_x ]
shl edi , cl
add eax , edi
mov edi ,[ cam_y ]
shl edi , cl
add ebx , edi
mov edi ,[ cam_z ]
shl edi , cl
add edx , edi
@ @ :
cld
mov edi , brush_data
mov esi , edx
sub esi ,[ brush_h ]
.cycle_0:
mov ecx ,[ brush_w ]
@ @ :
bt dword [ edi ], 31 ;<3B> <> <EFBFBD> <20> <EFBFBD> <E0AEA7> 筮<EFBFBD> <E7ADAE> <EFBFBD>
jc .end_2
stdcall buf2d_vox_obj_delete_node , [ open_file_vox ], eax , ebx , edx , [ v_zoom ]
.end_2:
inc eax
add edi , 4
loop @ b
dec edx
sub eax ,[ brush_w ]
cmp edx , esi
jg .cycle_0
call draw_objects
popad
.end_f:
ret
2012-06-05 17:33:54 +02:00
align 4
draw_palete:
stdcall [ buf2d_clear ], buf_0 , [ buf_0.color ] ;<3B> <> <EFBFBD> ⨬ <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
2012-06-11 00:19:58 +02:00
stdcall buf2d_draw_palete , buf_0 , 5 , 3 , 9 , 6 , 18 , 512
2012-06-05 17:33:54 +02:00
stdcall [ buf2d_draw ], buf_0 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> ࠭<EFBFBD>
ret
2012-07-19 21:06:06 +02:00
align 4
2012-06-11 00:19:58 +02:00
v_zoom dd 3 ;⥪<> 騩 <20> <> <EFBFBD> <EFBFBD> ⠡
2012-06-05 17:33:54 +02:00
v_cur_x dd 0 ;<3B> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> x
v_cur_y dd 0 ;<3B> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> y (<28> <> <20> <> <EFBFBD> <20> <20> <> ꥪ<EFBFBD> <EAA5AA> z)
n_plane dd 0 ;<3B> <> <EFBFBD> <EFBFBD> <E1AAAE> <EFBFBD> <20> <> 祭<EFBFBD> <E7A5AD>
v_color dd 0xff ;梥<> <20> <> ࠭<EFBFBD> <E0A0AD> <EFBFBD> <EFBFBD>
2012-08-23 21:57:13 +02:00
v_pen_mode dd PEN_MODE_NONE ;० <> <E0A5A6> ࠡ<> <E0A0A1> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> (<28> <> . <20> <> <EFBFBD> <EFBFBD> ⠭<EFBFBD> <E2A0AD> PEN_MODE_...)
2012-06-05 17:33:54 +02:00
mode_light dd 1 ;० <> <E0A5A6> <20> ᢥ饭<E1A2A5> <E9A5AD>
2012-06-11 00:19:58 +02:00
cam_x dd 0
cam_y dd 0
cam_z dd 0
scaled_zoom dd 5 ;<3B> <> <EFBFBD> <EFBFBD> ⠡ <20> <> <20> <> <EFBFBD> <EFBFBD> ண<EFBFBD> <20> <> 稭<EFBFBD> <E7A8AD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
2012-07-17 10:33:56 +02:00
tile_size dd ? ;ࠧ<> <E0A0A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⨪<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <E1AAAE> <EFBFBD> <20> <20> <> 祭<EFBFBD> <E7A5AD> <EFBFBD>
max_open_file_size dd ?
2012-07-19 21:06:06 +02:00
brush_w dd 5 ;<3B> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
brush_h dd 5 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
brush_data dd 1 shl 31 , 1 shl 30 , 1 shl 30 , 1 shl 30 , 1 shl 31
dd 1 shl 30 , 1 shl 30 , 1 shl 30 , 1 shl 30 , 1 shl 30
dd 1 shl 30 , 1 shl 30 , 1 shl 30 , 1 shl 30 , 1 shl 30
dd 1 shl 30 , 1 shl 30 , 1 shl 30 , 1 shl 30 , 1 shl 30
dd 1 shl 31 , 1 shl 30 , 1 shl 30 , 1 shl 30 , 1 shl 31
rd 999 ;32*32-25
2012-06-05 17:33:54 +02:00
txt_zoom db '<27> <> <EFBFBD> <EFBFBD> ⠡:' , 0
2012-07-19 21:06:06 +02:00
txt_curor: db '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> : '
.size: rb 10
2012-06-05 17:33:54 +02:00
txt_n_plane db '<27> <> 祭<EFBFBD> <E7A5AD> :' , 0
2012-06-11 00:19:58 +02:00
txt_color db '<27> <> <EFBFBD> <EFBFBD> :' , 0
2012-07-19 21:06:06 +02:00
txt_brush: db '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> : '
.size: rb 10
txt_mull db '*' , 0
txt_space db ' ' , 0
txt_buf rb 16
2012-06-05 17:33:54 +02:00
align 4
draw_objects:
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_clear ], buf_pl , [ buf_pl.color ] ;<3B> <> <EFBFBD> ⨬ <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
2012-07-19 21:06:06 +02:00
cmp dword [ v_pen_mode ], PEN_MODE_SELECT_COLOR
2012-06-05 17:33:54 +02:00
jne @ f
call draw_palete
jmp .end_f
@ @ :
2012-06-11 00:19:58 +02:00
push eax ebx ecx
2012-10-01 12:45:57 +02:00
stdcall [ buf2d_vox_obj_get_img_w_3g ], [ buf_vox ],[ v_zoom ]
2012-06-11 00:19:58 +02:00
mov ebx ,[ buf_0.w ]
sub ebx , eax
shr ebx , 1 ;ebx - <20> <> <EFBFBD> 業<> <EFBFBD> <E0AEA2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 쪨<EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <20> <> ਧ<EFBFBD> <E0A8A7> ⠫<EFBFBD>
2012-06-05 17:33:54 +02:00
2012-06-11 00:19:58 +02:00
xor ecx , ecx
2012-10-01 12:45:57 +02:00
stdcall [ buf2d_vox_obj_get_img_h_3g ], [ buf_vox ],[ v_zoom ]
2012-06-11 00:19:58 +02:00
cmp eax ,[ buf_0.h ]
jg @ f
mov ecx ,[ buf_0.h ]
sub ecx , eax
2012-10-01 12:45:57 +02:00
shr ecx , 1 ;ecx - <20> <> <EFBFBD> 業<> <EFBFBD> <E0AEA2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 쪨<EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> ⨪<EFBFBD> <E2A8AA> <EFBFBD>
2012-06-11 00:19:58 +02:00
@ @ :
2012-06-05 17:33:54 +02:00
2012-06-11 00:19:58 +02:00
mov eax ,[ v_zoom ]
cmp eax ,[ scaled_zoom ]
jg @ f
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ० <> <E0A5A6> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
2012-10-01 12:45:57 +02:00
stdcall [ buf2d_vox_obj_draw_3g ], buf_0 , buf_0z , [ buf_vox ], \
2012-06-12 11:56:51 +02:00
[ open_file_vox ], ebx , ecx , 0 , eax
stdcall [ buf2d_vox_obj_draw_pl ], buf_pl , [ open_file_vox ], \
2012-07-17 10:33:56 +02:00
OT_MAP_X , OT_MAP_Y ,[ tile_size ], eax , [ n_plane ], [ sc.work_graph ]
2012-06-21 13:32:18 +02:00
stdcall [ buf2d_vox_obj_draw_1g ], buf_0 , buf_0z , \
[ open_file_vox ], 0 , 0 , eax
2012-06-05 17:33:54 +02:00
bt dword [ mode_light ], 0
2012-06-11 00:19:58 +02:00
jnc .end_1
2012-10-01 12:45:57 +02:00
stdcall [ buf2d_vox_obj_draw_3g_shadows ], buf_0 , buf_0z , [ buf_vox ], ebx , ecx , 0 , eax , 3
2012-06-11 00:19:58 +02:00
.end_1:
jmp .end_0
@ @ :
;० <> <E0A5A6> <20> <> <EFBFBD> <EFBFBD> ⠡<EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
sub eax ,[ scaled_zoom ]
2012-10-01 12:45:57 +02:00
stdcall [ buf2d_vox_obj_draw_3g_scaled ], buf_0 , buf_0z , [ buf_vox ], \
2012-06-11 00:19:58 +02:00
[ open_file_vox ], 0 , 0 , 0 , [ scaled_zoom ], [ cam_x ],[ cam_y ],[ cam_z ], eax , [ sc.work_graph ] ;scroll -> 2^eax
stdcall [ buf2d_vox_obj_draw_pl_scaled ], buf_pl , [ open_file_vox ], \
2012-07-17 10:33:56 +02:00
OT_MAP_X , OT_MAP_Y ,[ tile_size ], [ scaled_zoom ], [ n_plane ], [ sc.work_graph ],[ cam_x ],[ cam_y ],[ cam_z ], eax
2012-06-11 00:19:58 +02:00
bt dword [ mode_light ], 0
jnc .end_2
2012-10-01 12:45:57 +02:00
stdcall [ buf2d_vox_obj_draw_3g_shadows ], buf_0 , buf_0z , [ buf_vox ], 0 , 0 , 0 , [ scaled_zoom ], 3
2012-06-11 00:19:58 +02:00
.end_2:
2012-06-05 17:33:54 +02:00
.end_0:
2012-06-11 00:19:58 +02:00
pop ecx ebx eax
2012-06-05 17:33:54 +02:00
2012-06-19 14:20:54 +02:00
call draw_vox_cursor
2012-06-05 17:33:54 +02:00
stdcall [ buf2d_draw ], buf_0 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> ࠭<EFBFBD>
stdcall [ buf2d_draw ], buf_pl ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> ࠭<EFBFBD>
.end_f:
ret
2012-06-19 14:20:54 +02:00
;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
align 4
draw_vox_cursor:
pushad
mov ecx ,[ v_zoom ]
cmp ecx ,[ scaled_zoom ]
jle @ f
mov ecx ,[ scaled_zoom ]
@ @ :
xor edx , edx
inc edx
shl edx , cl
mov eax ,[ v_cur_x ]
cmp eax , edx
jge .end_f ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
2012-07-17 10:33:56 +02:00
mov edi ,[ tile_size ]
2012-06-19 14:20:54 +02:00
imul eax , edi
add eax , OT_MAP_X
mov ebx , edx
dec ebx
sub ebx ,[ v_cur_y ]
imul ebx , edi
add ebx , OT_MAP_Y
inc eax
inc ebx
sub edi , 2
stdcall [ buf2d_rect_by_size ], buf_pl , eax , ebx , edi , edi ,[ sc.work_graph ]
dec ebx
add edi , 2
2012-07-19 21:06:06 +02:00
cmp dword [ v_pen_mode ], 3
je .brush
2012-06-19 14:20:54 +02:00
;<3B> <> ਧ<EFBFBD> <E0A8A7> ⠫<EFBFBD> <E2A0AB> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
sub eax , 2
mov ecx , edi
imul edi , edx
shr ecx , 1
add ebx , ecx ;業<> <EFBFBD> <E0AEA2> <20> <> <20> <> ।<EFBFBD> <E0A5A4> <EFBFBD> <20> <> <EFBFBD> ⪨
mov ecx , OT_MAP_X
add edi , ecx
stdcall [ buf2d_line ], buf_pl , ecx , ebx , eax , ebx ,[ sc.work_graph ]
2012-07-17 10:33:56 +02:00
add eax ,[ tile_size ]
2012-06-19 14:20:54 +02:00
inc eax
cmp eax , edi
jge @ f ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
dec edi
stdcall [ buf2d_line ], buf_pl , eax , ebx , edi , ebx ,[ sc.work_graph ]
@ @ :
2012-07-19 21:06:06 +02:00
jmp .end_f
;ࠬ<> <E0A0AC> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
.brush:
dec eax
mov ecx ,[ brush_w ]
imul ecx ,[ tile_size ]
;mov edi,eax
mov edi , ecx
mov esi ,[ brush_h ]
imul esi ,[ tile_size ]
stdcall [ buf2d_rect_by_size ], buf_pl , eax , ebx , edi , esi ,[ sc.work_graph ]
2012-06-19 14:20:54 +02:00
.end_f:
popad
ret
2012-08-23 21:57:13 +02:00
;hot_p - <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 祩 <20> <> 窨 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , ᬥ饭<E1ACA5> <E9A5AD> <EFBFBD> <20> <> <20> <> <EFBFBD> 16 ((cx shl 8) + cy) shl 16
align 4
proc set_pen_mode uses eax ebx ecx edx , mode : dword , icon : dword , hot_p : dword
mov eax ,[ mode ]
cmp [ v_pen_mode ], eax
je @ f
mov [ v_pen_mode ], eax
mov edx ,[ hot_p ]
mov dx , 2 ;LOAD_INDIRECT
mov ecx ,[ icon ]
shl ecx , 12 ;㬭<> <E3ACAD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 4 <20> <>
add ecx ,[ buf_curs.data ]
mcall 37 , 4
cmp eax , 0
je @ f
mov [ cursor_pointer ], eax
mcall 37 , 5 ,[ cursor_pointer ]
@ @ :
ret
endp
2012-06-05 17:33:54 +02:00
if 0
;input:
; buf - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> ப<EFBFBD> , <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> 10 <20> <> <EFBFBD> 16 <20> <> 筮<EFBFBD> <20> <> <EFBFBD> <EFBFBD>
;output:
; eax - <20> <>
align 4
proc conv_str_to_int , buf : dword
xor eax , eax
push ebx ecx esi
xor ebx , ebx
mov esi ,[ buf ]
;<3B> <> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥫<EFBFBD> <E2A5AB> <EFBFBD> <EFBFBD> <20> <> ᥫ
xor ecx , ecx
inc ecx
cmp byte [ esi ], '-'
jne @ f
dec ecx
inc esi
@ @ :
cmp word [ esi ], '0x'
je .load_digit_16
.load_digit_10: ;<3B> <> <EFBFBD> <EFBFBD> 뢠<EFBFBD> <EBA2A0> <EFBFBD> 10-<2D> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
mov bl , byte [ esi ]
cmp bl , '0'
jl @ f
cmp bl , '9'
jg @ f
sub bl , '0'
imul eax , 10
add eax , ebx
inc esi
jmp .load_digit_10
jmp @ f
.load_digit_16: ;<3B> <> <EFBFBD> <EFBFBD> 뢠<EFBFBD> <EBA2A0> <EFBFBD> 16-<2D> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
add esi , 2
.cycle_16:
mov bl , byte [ esi ]
cmp bl , '0'
jl @ f
cmp bl , 'f'
jg @ f
cmp bl , '9'
jle .us1
cmp bl , 'A'
jl @ f ;<3B> <> ᥨ<EFBFBD> <E1A5A8> <EFBFBD> <EFBFBD> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD> >'9' <20> <'A'
.us1: ;<3B> <> <EFBFBD> ⠢<EFBFBD> <E2A0A2> <EFBFBD> <20> <EFBFBD> <E1ABAE> <EFBFBD>
cmp bl , 'F'
jle .us2
cmp bl , 'a'
jl @ f ;<3B> <> ᥨ<EFBFBD> <E1A5A8> <EFBFBD> <EFBFBD> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD> >'F' <20> <'a'
sub bl , 32 ;<3B> <> ॢ<EFBFBD> <E0A5A2> <EFBFBD> <EFBFBD> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> 孨<EFBFBD> ॣ<> <E0A5A3> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 饭<EFBFBD> <E9A5AD> <20> <> <20> <> <EFBFBD> <E1ABA5> 饩 <20> <> ࠡ<EFBFBD> ⪨
.us2: ;<3B> <> <EFBFBD> ⠢<EFBFBD> <E2A0A2> <EFBFBD> <20> <EFBFBD> <E1ABAE> <EFBFBD>
sub bl , '0'
cmp bl , 9
jle .cor1
sub bl , 7 ;convert 'A' to '10'
.cor1:
shl eax , 4
add eax , ebx
inc esi
jmp .cycle_16
@ @ :
cmp ecx , 0 ;<3B> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥫쭮<E2A5AB>
jne @ f
sub ecx , eax
mov eax , ecx
@ @ :
pop esi ecx ebx
ret
endp
end if
2012-07-19 21:06:06 +02:00
;input:
; eax = value
; edi = string buffer
;output:
align 4
convert_int_to_str:
pushad
mov dword [ edi + 1 ], 0
mov word [ edi + 5 ], 0
call .str
popad
ret
align 4
.str:
mov ecx , 0x0a ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ⥬<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <E1ABA5> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ॣ<> <E0A5A3> <EFBFBD> <EFBFBD> <EFBFBD> ebx,eax,ecx,edx <20> 室<EFBFBD> <E5AEA4> <EFBFBD> <20> <> ࠬ<EFBFBD> <E0A0AC> <EFBFBD> <EFBFBD> eax - <20> <>
;<3B> <> <EFBFBD> ॢ<EFBFBD> <E0A5A2> <20> <> <20> ASCII <20> <> ப<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ecx=<3D> <> <EFBFBD> ⥬<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <E1ABA5> edi <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> 㤠 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 뢠<EFBFBD> <EBA2A0> , <20> 㤥<EFBFBD> <20> <> ப<EFBFBD> , <20> <> <EFBFBD> 祬 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> <EFBFBD>
cmp eax , ecx ;<3B> ࠢ<EFBFBD> <E0A0A2> <EFBFBD> <EFBFBD> <20> <20> eax <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 祬 <20> ecx <20> <> <20> <> ३<EFBFBD> <E0A5A9> <20> <> @@-1 <20> .<2E> . <20> <> pop eax
jb @ f
xor edx , edx ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> edx
div ecx ;ࠧ<> <E0A0A7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> - <20> <> <EFBFBD> <EFBFBD> ⮪ <20> edx
push edx ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> ⥪
;dec edi ;ᬥ饭<E1ACA5> <E9A5AD> <20> <> <EFBFBD> <EFBFBD> 室<EFBFBD> <E5AEA4> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD>
call .str ;<3B> <> ३<EFBFBD> <E0A5A9> <20> <> ᠬ<> ᥡ<> <20> .<2E> . <20> 맢<EFBFBD> <EBA7A2> <EFBFBD> ᠬ<> ᥡ<> <20> ⠪ <20> <> ⮣<> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> eax <20> <> <20> ⠭<EFBFBD> <E2A0AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 祬 <20> ecx
pop eax
@ @ : ;cmp al,10 ;<3B> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> 祭<EFBFBD> <E7A5AD> <20> al 祬 10 (<28> <> <EFBFBD> <20> <> <EFBFBD> ⥬<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <E1ABA5> 10 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> - <20> <> 譠<EFBFBD> ))
or al , 0x30 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 祬 <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
stosb ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ॣ<> <E0A5A3> <EFBFBD> <EFBFBD> <EFBFBD> al <20> <20> 祪<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> es:edi
ret ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 祭<> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 室 <20> .<2E> . <20> <> <EFBFBD> <EFBFBD> <20> <20> ⥪<EFBFBD> <20> ࠭<EFBFBD> <E0A0AD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> -<2D> <> <20> 맮<EFBFBD> <EBA7AE> <EFBFBD> <20> <> <20> ⮫쪮 ࠧ <20> <> <20> <20> 㤥<EFBFBD> <20> <> <EFBFBD> 뢠<EFBFBD> <EBA2A0> <EFBFBD> <EFBFBD>
align 4
proc str_cat , str1 : dword , str2 : dword
push eax ecx edi esi
mov esi , dword [ str2 ]
stdcall str_len , esi
mov ecx , eax
inc ecx
mov edi , dword [ str1 ]
stdcall str_len , edi
add edi , eax
cld
repne movsb
pop esi edi ecx eax
ret
endp
;output:
; eax = strlen
align 4
proc str_len , str1 : dword
mov eax ,[ str1 ]
@ @ :
cmp byte [ eax ], 0
je @ f
inc eax
jmp @ b
@ @ :
sub eax ,[ str1 ]
ret
endp
2012-06-05 17:33:54 +02:00
;<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 'VOX' , 0
.end:
db 0
head_f_i:
head_f_l db '<27> <> <EFBFBD> ⥬<EFBFBD> <E2A5AC> <EFBFBD> <20> 訡<EFBFBD> <E8A8A1> ' , 0
system_dir_0 db '/sys/lib/'
lib_name_0 db 'proc_lib.obj' , 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 , 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 , 0
system_dir_1 db '/sys/lib/'
lib_name_1 db 'libimg.obj' , 0
err_message_found_lib_1 db '<27> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<EFBFBD> ' , 39 , 'libimg.obj' , 39 , 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 , 0
system_dir_2 db '/sys/lib/'
lib_name_2 db 'buf2d.obj' , 0
err_msg_found_lib_2 db '<27> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<EFBFBD> ' , 39 , 'buf2d.obj' , 39 , 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 , 0
2012-07-17 10:33:56 +02:00
system_dir_3 db '/sys/lib/'
lib_name_3 db 'libini.obj' , 0
err_msg_found_lib_3 db '<27> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<EFBFBD> ' , 39 , 'libini.obj' , 39 , 0
err_msg_import_3 db '<27> 訡<EFBFBD> <E8A8A1> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<EFBFBD> ' , 39 , 'libini' , 39 , 0
2012-06-05 17:33:54 +02:00
l_libs_start:
lib0 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
lib1 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
2012-07-17 10:33:56 +02:00
lib_3 l_libs lib_name_3 , sys_path , library_path , system_dir_3 , \
err_msg_found_lib_3 , head_f_l , import_libini , err_msg_import_3 , head_f_i
2012-06-05 17:33:54 +02:00
l_libs_end:
align 4
import_libimg:
dd al ib_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_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
2012-06-11 00:19:58 +02:00
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
2012-06-21 13:32:18 +02:00
buf2d_vox_obj_draw_1g dd sz_buf2d_vox_obj_draw_1g
2012-06-11 00:19:58 +02:00
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
2012-06-12 11:56:51 +02:00
buf2d_vox_obj_draw_3g_shadows dd sz_buf2d_vox_obj_draw_3g_shadows
2012-06-11 00:19:58 +02:00
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
2012-06-12 11:56:51 +02:00
2012-06-05 17:33:54 +02:00
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_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
2012-06-11 00:19:58 +02:00
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
2012-06-21 13:32:18 +02:00
sz_buf2d_vox_obj_draw_1g db 'buf2d_vox_obj_draw_1g' , 0
2012-06-11 00:19:58 +02:00
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
2012-06-12 11:56:51 +02:00
sz_buf2d_vox_obj_draw_3g_shadows db 'buf2d_vox_obj_draw_3g_shadows' , 0
2012-06-11 00:19:58 +02:00
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
2012-06-05 17:33:54 +02:00
2012-07-17 10:33:56 +02:00
align 4
import_libini:
dd al ib_init2
ini_get_str dd aini_get_str
ini_get_int dd aini_get_int
ini_get_color dd aini_get_color
dd 0 , 0
alib_init2 db 'lib_init' , 0
aini_get_str db 'ini_get_str' , 0
aini_get_int db 'ini_get_int' , 0
aini_get_color db 'ini_get_color' , 0
2012-06-05 17:33:54 +02:00
mouse_dd dd 0x0
sc system_colors
align 16
procinfo process_information
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> ᭮<EFBFBD> <E1ADAE> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
align 4
buf_0: dd 0 ;㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> a<EFBFBD> <61> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
.l: dw 5 ;+4 left
.t: dw 45 ;+6 top
2012-06-11 00:19:58 +02:00
.w: dd 192 + 6 ;+8 w
.h: dd 224 + 7 ;+12 h
2012-06-05 17:33:54 +02:00
.color: dd 0xffffff ;+16 color
db 24 ;+20 bit in pixel
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 㡨<EFBFBD> <E3A1A8> <20> ᭮<EFBFBD> <E1ADAE> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
align 4
buf_0z: dd 0
dw 0 ;+4 left
dw 0 ;+6 top
2012-06-11 00:19:58 +02:00
.w: dd 192 + 6 ;+8 w
.h: dd 224 + 7 ;+12 h
2012-06-05 17:33:54 +02:00
.color: dd 0 ;+16 color
db 32 ;+20 bit in pixel
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> १<EFBFBD> <20> <> ꥪ<EFBFBD> <EAA5AA>
align 4
buf_pl: dd 0
2012-06-11 00:19:58 +02:00
.l: dw 15 + 192 + 6 ;+4 left
2012-06-05 17:33:54 +02:00
.t: dw 45 ;+6 top
.w: dd 320 ;+8 w
.h: dd 330 ;+12 h
.color: dd 0xffffff ;+16 color
db 24 ;+20 bit in pixel
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 襭<EFBFBD> <E8A5AD> <EFBFBD> ७<> <E0A5AD> <EFBFBD> <EFBFBD>
align 4
buf_r_img:
rb BUF_STRUCT_SIZE
align 4
buf_r_z:
rb BUF_STRUCT_SIZE
2012-08-23 21:57:13 +02:00
align 4
cursor_pointer dd 0 ;㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
buf_curs: ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ࠬ<EFBFBD>
.data: dd 0 ;㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
dw 0 ;+4 left
dw 0 ;+6 top
dd 32 ;+8 w
dd 32 * cursors_count ;+12 h
dd 0 ;+16 color
db 24 ;+20 bit in pixel
align 4
buf_curs_8: ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <EFBFBD> <E0AEA7> 筮<EFBFBD> <E7ADAE> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
.data: dd 0 ;㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
dw 0 ;+4 left
dw 0 ;+6 top
dd 32 ;+8 w
dd 32 * cursors_count ;+12 h
dd 0 ;+16 color
db 24 ;+20 bit in pixel
2012-06-05 17:33:54 +02:00
;<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
2012-10-01 12:45:57 +02:00
vox_6_7_z: ;<3B> <> <EFBFBD> ᥫ<EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 3 <20> ࠭<EFBFBD>
2012-06-05 17:33:54 +02:00
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
2012-10-01 12:45:57 +02:00
vox_6_4_z: ;<3B> <> <EFBFBD> ᥫ<EFBFBD> , <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 2 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ࠭<EFBFBD> <20> <20> <> <EFBFBD> 孥<EFBFBD> <20> ࠭<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
dd 1 , 2 , 3 , 3 , 2 , 1 , \
1 , 2 , 3 , 3 , 2 , 1 , \
1 , 2 , 3 , 3 , 2 , 1 , \
1 , 2 , 3 , 3 , 2 , 1
align 4
buf_vox dd buf_vox_g3
buf_vox_g3:
2012-06-05 17:33:54 +02:00
db 6 , 7 , 4 , 3 ;w,h,h_osn,n
2012-07-17 10:33:56 +02:00
rb BUF_STRUCT_SIZE * ( 3 + 1 )
2012-06-05 17:33:54 +02:00
2012-10-01 12:45:57 +02:00
align 4
buf_vox_g2:
db 6 , 4 , 0 , 3 ;w,h,h_osn,n
rb BUF_STRUCT_SIZE * ( 3 + 1 )
2012-06-05 17:33:54 +02:00
i_end:
2012-07-17 10:33:56 +02:00
wnd_s_pos: ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⮢<EFBFBD> <E2AEA2> <20> <> <EFBFBD> <EFBFBD> 樨 <20> <> <EFBFBD> <EFBFBD>
rq 0
rb 4096 ;2048
2012-06-05 17:33:54 +02:00
stacktop:
sys_path rb 1024
file_name:
rb 1024 ;4096
library _path rb 1024
2012-07-17 10:33:56 +02:00
plugin_path rb 1024 ;4096
openfile_path rb 1024 ;4096
2012-06-05 17:33:54 +02:00
filename_area rb 256
mem: