forked from KolibriOS/kolibrios
'vox_editor' update
git-svn-id: svn://kolibrios.org@2974 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
0cf74faa74
commit
ff07aa50ca
Binary file not shown.
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.9 KiB |
@ -17,7 +17,7 @@ include 'dll.inc'
|
||||
include 'vox_draw.inc'
|
||||
|
||||
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
||||
caption db 'Voxel editor 23.08.12',0 ;¯®¤¯¨áì ®ª
|
||||
caption db 'Voxel editor 12.09.12',0 ;¯®¤¯¨áì ®ª
|
||||
|
||||
struct FileInfoBlock
|
||||
Function dd ?
|
||||
@ -34,7 +34,7 @@ image_data dd 0 ;㪠
|
||||
|
||||
fn_toolbar db 'toolbar.png',0
|
||||
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
|
||||
cursors_count equ 4
|
||||
IMAGE_CURSORS_SIZE equ 4096*cursors_count ;à §¬¥à ª à⨪¨ á ªãàá®à ¬¨
|
||||
@ -494,6 +494,9 @@ pushad
|
||||
add ebx,25 shl 16
|
||||
mov edx,23
|
||||
int 0x40
|
||||
add ebx,25 shl 16
|
||||
mov edx,24
|
||||
int 0x40
|
||||
|
||||
; *** à¨á®¢ ¨¥ ¨ª®®ª ª®¯ª å ***
|
||||
mov eax,7
|
||||
@ -552,6 +555,9 @@ pushad
|
||||
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) ;è¨à¨ ª¨á⨠-1
|
||||
int 0x40
|
||||
add ebx,IMAGE_TOOLBAR_ICON_SIZE
|
||||
@ -697,11 +703,11 @@ button:
|
||||
@@:
|
||||
cmp ah,10
|
||||
jne @f
|
||||
call but_5
|
||||
call but_plane_inc
|
||||
@@:
|
||||
cmp ah,11
|
||||
jne @f
|
||||
call but_6
|
||||
call but_plane_dec
|
||||
@@:
|
||||
cmp ah,12
|
||||
jne @f
|
||||
@ -738,17 +744,21 @@ button:
|
||||
@@:
|
||||
cmp ah,20
|
||||
jne @f
|
||||
call but_bru_w_m
|
||||
call but_brush_clear
|
||||
@@:
|
||||
cmp ah,21
|
||||
jne @f
|
||||
call but_bru_w_p
|
||||
call but_bru_w_m
|
||||
@@:
|
||||
cmp ah,22
|
||||
jne @f
|
||||
call but_bru_h_m
|
||||
call but_bru_w_p
|
||||
@@:
|
||||
cmp ah,23
|
||||
jne @f
|
||||
call but_bru_h_m
|
||||
@@:
|
||||
cmp ah,24
|
||||
jne @f
|
||||
call but_bru_h_p
|
||||
@@:
|
||||
@ -769,12 +779,14 @@ button:
|
||||
stdcall mem.Free,[open_file_vox]
|
||||
mcall -1
|
||||
|
||||
;¤ ë¥ ¤«ï ¨¨æ¨ «¨§ 樨 ¢®ªá¥«ì®£® ®¡ê¥ªâ
|
||||
align 4
|
||||
vox_new_data:
|
||||
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
|
||||
|
||||
;¨¨æ¨ «¨§ æ¨ï ¢®ªá¥«ì®£® ®¡ê¥ªâ
|
||||
align 4
|
||||
proc but_new_file uses ecx edi esi
|
||||
mov ecx,vox_offs_data+4
|
||||
@ -941,7 +953,7 @@ but_4:
|
||||
|
||||
;ᤢ¨£ ¥¬ ¯«®áª®áâì á१
|
||||
align 4
|
||||
but_5:
|
||||
but_plane_inc:
|
||||
push eax ecx
|
||||
inc dword[n_plane]
|
||||
mov eax,[v_zoom]
|
||||
@ -984,7 +996,7 @@ pop ecx eax
|
||||
|
||||
;ᤢ¨£ ¥¬ ¯«®áª®áâì á१
|
||||
align 4
|
||||
but_6:
|
||||
but_plane_dec:
|
||||
dec dword[n_plane]
|
||||
cmp dword[n_plane],0
|
||||
jge .end_f
|
||||
@ -1317,6 +1329,57 @@ popad
|
||||
.end_f:
|
||||
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
|
||||
;¯à¥®¡à §®¢ ¨¥ ª®®à¤¨ â, á ãç¥â®¬ 㢥«¨ç¥¨ï
|
||||
;sub ecx,[scaled_zoom] ;¢ ecx ¯à¨à®áâ ¬ áèâ ¡ (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 ;¡¨â ¯à®§à ç®áâ¨
|
||||
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
|
||||
draw_palete:
|
||||
stdcall [buf2d_clear], buf_0, [buf_0.color] ;ç¨á⨬ ¡ãä¥à
|
||||
|
@ -1,7 +1,10 @@
|
||||
if not exist bin mkdir bin
|
||||
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
|
||||
@kpack bin\buf2d.obj
|
||||
@fasm.exe -m 16384 vox_creator.asm 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
|
BIN
programs/media/voxel_editor/utilites/toolbar_m.png
Normal file
BIN
programs/media/voxel_editor/utilites/toolbar_m.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
1759
programs/media/voxel_editor/utilites/vox_mover.asm
Normal file
1759
programs/media/voxel_editor/utilites/vox_mover.asm
Normal file
File diff suppressed because it is too large
Load Diff
12
programs/media/voxel_editor/utilites/vox_mover.ini
Normal file
12
programs/media/voxel_editor/utilites/vox_mover.ini
Normal 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 ;¬ ªá¨¬ «ìë© à §¬¥à ä ©« ¢ Š¡
|
Loading…
Reference in New Issue
Block a user