'vox_editor' update

git-svn-id: svn://kolibrios.org@2974 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA
2012-09-13 19:51:21 +00:00
parent 0cf74faa74
commit ff07aa50ca
6 changed files with 1847 additions and 10 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@@ -17,7 +17,7 @@ include 'dll.inc'
include 'vox_draw.inc' include 'vox_draw.inc'
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load @use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
caption db 'Voxel editor 23.08.12',0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> caption db 'Voxel editor 12.09.12',0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
struct FileInfoBlock struct FileInfoBlock
Function dd ? Function dd ?
@@ -34,7 +34,7 @@ image_data dd 0 ;㪠
fn_toolbar db 'toolbar.png',0 fn_toolbar db 'toolbar.png',0
IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3 IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*21 IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*22
image_data_toolbar dd 0 image_data_toolbar dd 0
cursors_count equ 4 cursors_count equ 4
IMAGE_CURSORS_SIZE equ 4096*cursors_count ;ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD><E2A8AD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IMAGE_CURSORS_SIZE equ 4096*cursors_count ;ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD><E2A8AD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
@@ -494,6 +494,9 @@ pushad
add ebx,25 shl 16 add ebx,25 shl 16
mov edx,23 mov edx,23
int 0x40 int 0x40
add ebx,25 shl 16
mov edx,24
int 0x40
; *** <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *** ; *** <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ***
mov eax,7 mov eax,7
@@ -552,6 +555,9 @@ pushad
add edx,(25 shl 16) ;<3B><><EFBFBD><EFBFBD><EFBFBD><E1AEA2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> add edx,(25 shl 16) ;<3B><><EFBFBD><EFBFBD><EFBFBD><E1AEA2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
int 0x40 int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;㤠<><E3A4A0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> -1 add edx,(25 shl 16) ;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> -1
int 0x40 int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE add ebx,IMAGE_TOOLBAR_ICON_SIZE
@@ -697,11 +703,11 @@ button:
@@: @@:
cmp ah,10 cmp ah,10
jne @f jne @f
call but_5 call but_plane_inc
@@: @@:
cmp ah,11 cmp ah,11
jne @f jne @f
call but_6 call but_plane_dec
@@: @@:
cmp ah,12 cmp ah,12
jne @f jne @f
@@ -738,17 +744,21 @@ button:
@@: @@:
cmp ah,20 cmp ah,20
jne @f jne @f
call but_bru_w_m call but_brush_clear
@@: @@:
cmp ah,21 cmp ah,21
jne @f jne @f
call but_bru_w_p call but_bru_w_m
@@: @@:
cmp ah,22 cmp ah,22
jne @f jne @f
call but_bru_h_m call but_bru_w_p
@@: @@:
cmp ah,23 cmp ah,23
jne @f
call but_bru_h_m
@@:
cmp ah,24
jne @f jne @f
call but_bru_h_p call but_bru_h_p
@@: @@:
@@ -769,12 +779,14 @@ button:
stdcall mem.Free,[open_file_vox] stdcall mem.Free,[open_file_vox]
mcall -1 mcall -1
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><E6A8A0><EFBFBD><EFBFBD><20><><EFBFBD>ᥫ쭮<E1A5AB><ECADAE> <20><><EFBFBD><EAA5AA>
align 4 align 4
vox_new_data: vox_new_data:
db 2,0,0,0 db 2,0,0,0
db 000b,001b,010b,011b, 100b,101b,110b,111b ;default table db 0,1,2,3,4,5,6,7 ;default table
dd 0 ;null node dd 0 ;null node
;<3B><><EFBFBD><EFBFBD><E6A8A0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ᥫ쭮<E1A5AB><ECADAE> <20><><EFBFBD><EAA5AA>
align 4 align 4
proc but_new_file uses ecx edi esi proc but_new_file uses ecx edi esi
mov ecx,vox_offs_data+4 mov ecx,vox_offs_data+4
@@ -941,7 +953,7 @@ but_4:
;ᤢ<><E1A4A2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E1AAAE><EFBFBD> <20><EFBFBD> ;ᤢ<><E1A4A2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E1AAAE><EFBFBD> <20><EFBFBD>
align 4 align 4
but_5: but_plane_inc:
push eax ecx push eax ecx
inc dword[n_plane] inc dword[n_plane]
mov eax,[v_zoom] mov eax,[v_zoom]
@@ -984,7 +996,7 @@ pop ecx eax
;ᤢ<><E1A4A2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E1AAAE><EFBFBD> <20><EFBFBD> ;ᤢ<><E1A4A2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E1AAAE><EFBFBD> <20><EFBFBD>
align 4 align 4
but_6: but_plane_dec:
dec dword[n_plane] dec dword[n_plane]
cmp dword[n_plane],0 cmp dword[n_plane],0
jge .end_f jge .end_f
@@ -1317,6 +1329,57 @@ popad
.end_f: .end_f:
ret ret
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
align 4 align 4
draw_palete: draw_palete:
stdcall [buf2d_clear], buf_0, [buf_0.color] ;<3B><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD> stdcall [buf2d_clear], buf_0, [buf_0.color] ;<3B><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>

View File

@@ -1,7 +1,10 @@
if not exist bin mkdir bin if not exist bin mkdir bin
if not exist bin\toolbar.png @copy toolbar.png bin\toolbar.png if not exist bin\toolbar.png @copy toolbar.png bin\toolbar.png
if not exist bin\toolbar_m.png @copy toolbar_m.png bin\toolbar_m.png
if not exist bin\buf2d.obj @fasm.exe -m 16384 ..\..\..\develop\libraries\buf2d\trunk\buf2d.asm bin\buf2d.obj if not exist bin\buf2d.obj @fasm.exe -m 16384 ..\..\..\develop\libraries\buf2d\trunk\buf2d.asm bin\buf2d.obj
@kpack bin\buf2d.obj @kpack bin\buf2d.obj
@fasm.exe -m 16384 vox_creator.asm bin\vox_creator.kex @fasm.exe -m 16384 vox_creator.asm bin\vox_creator.kex
@kpack bin\vox_creator.kex @kpack bin\vox_creator.kex
@fasm.exe -m 16384 vox_mover.asm bin\vox_mover.kex
@kpack bin\vox_mover.kex
pause pause

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
[Window]
t=10
l=10
w=740
h=535
buf_w=390
buf_h=455
c_background=239,255,255
[Options]
s_zoom=6
tile_size=5
file_size=256 ;<3B><><EFBFBD><EFBFBD><E1A8AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E0A0A7><EFBFBD><><E4A0A9> <20> <20><>