Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 2932 → Rev 2933

/programs/media/voxel_editor/trunk/build_ru.bat
1,4 → 1,6
if not exist bin mkdir bin
if not exist bin\cursors.png @copy cursors.png bin\cursors.png
if not exist bin\cursors_gr.png @copy cursors_gr.png bin\cursors_gr.png
if not exist bin\toolbar.png @copy toolbar.png bin\toolbar.png
@copy *.vox bin\*.vox
if not exist bin\buf2d.obj @fasm.exe -m 16384 ..\..\..\develop\libraries\buf2d\trunk\buf2d.asm bin\buf2d.obj
/programs/media/voxel_editor/trunk/cursors.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/programs/media/voxel_editor/trunk/cursors_gr.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/programs/media/voxel_editor/trunk/voxel_editor.asm
17,7 → 17,7
include 'vox_draw.inc'
 
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
caption db 'Voxel editor 19.07.12',0 ;¯®¤¯¨áì ®ª­ 
caption db 'Voxel editor 23.08.12',0 ;¯®¤¯¨áì ®ª­ 
 
struct FileInfoBlock
Function dd ?
36,6 → 36,8
IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*21
image_data_toolbar dd 0
cursors_count equ 4
IMAGE_CURSORS_SIZE equ 4096*cursors_count ;à §¬¥à ª à⨭ª¨ á ªãàá®à ¬¨
 
;§­ ç¥­¨ï § ¤ ¢ ¥¬ë¥ ¯® 㬮«ç ­¨î, ¡¥§ ini ä ©« 
ini_def_window_t equ 10
105,6 → 107,8
OT_MAP_Y equ 0
OT_CAPT_X_COLOR equ 5 ;®âáâ㯠¤«ï ¯®¤¯¨á¨ 梥â 
OT_CAPT_Y_COLOR equ 30
PEN_MODE_NONE equ -1
PEN_MODE_CLEAR equ 0 ;०¨¬ áâ¨à ­¨ï
PEN_MODE_SELECT_COLOR equ 2 ;०¨¬ ¢ë¡®à  梥â 
 
align 4
165,6 → 169,19
add eax,[tile_size]
mov [buf_pl.h],eax
 
;*** § £à㧪  ªãàá®à®¢
load_image_file 'cursors_gr.png',image_data_toolbar,IMAGE_CURSORS_SIZE
stdcall [buf2d_create_f_img], buf_curs_8,[image_data_toolbar] ;ᮧ¤ ¥¬ ¡ãä¥à
stdcall mem.Free,[image_data_toolbar] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì
 
load_image_file 'cursors.png',image_data_toolbar, IMAGE_CURSORS_SIZE
stdcall [buf2d_create_f_img], buf_curs,[image_data_toolbar] ;ᮧ¤ ¥¬ ¡ãä¥à
stdcall mem.Free,[image_data_toolbar] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì
 
stdcall [buf2d_conv_24_to_8], buf_curs_8,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç­®á⨠8¡¨â
stdcall [buf2d_conv_24_to_32],buf_curs,buf_curs_8 ;¤¥« ¥¬ ¡ãä¥à rgba 32¡¨â
 
 
stdcall [buf2d_create], buf_0 ;ᮧ¤ ­¨¥ ¡ãä¥à  ¨§®¡à ¦¥­¨ï
stdcall [buf2d_create], buf_0z ;ᮧ¤ ­¨¥ ¡ãä¥à  £«ã¡¨­ë
stdcall [buf2d_create], buf_pl ;ᮧ¤ ­¨¥ ¡ãä¥à  ¤«ï á¥ç¥­¨ï
178,6 → 195,9
 
call but_new_file
 
;¯¥à¢®­ ç «ì­ ï ãáâ ­®¢ª  ªãàá®à 
stdcall set_pen_mode,1,0,((9 shl 8)+9) shl 16 ;pen
 
align 4
red_win:
call draw_window
294,7 → 314,7
div ecx
mov [v_cur_x],eax ;X-coord
 
cmp dword[v_pen_mode],0
cmp dword[v_pen_mode],PEN_MODE_CLEAR
jl .end_1
cmp dword[v_pen_mode],1
jg .end_1
697,7 → 717,7
@@:
cmp ah,15
jne @f
mov dword[v_pen_mode],PEN_MODE_SELECT_COLOR
stdcall set_pen_mode,PEN_MODE_SELECT_COLOR,3,((9 shl 8)+9) shl 16
call draw_palete
@@:
cmp ah,16
743,6 → 763,8
stdcall [buf2d_delete],buf_r_z
@@:
stdcall [buf2d_vox_brush_delete], buf_vox
stdcall [buf2d_delete],buf_curs
stdcall [buf2d_delete],buf_curs_8
stdcall mem.Free,[image_data_toolbar]
stdcall mem.Free,[open_file_vox]
mcall -1
1000,7 → 1022,7
but_mode_pen:
push eax
mov eax,dword[v_pen_mode]
mov dword[v_pen_mode],1 ;pen
stdcall set_pen_mode,1,0,((9 shl 8)+9) shl 16 ;pen
cmp eax,PEN_MODE_SELECT_COLOR
jne @f
call draw_objects
1012,7 → 1034,7
but_mode_brush:
push eax
mov eax,dword[v_pen_mode]
mov dword[v_pen_mode],3 ;brush
stdcall set_pen_mode,3,1,((9 shl 8)+9) shl 16 ;brush
cmp eax,PEN_MODE_SELECT_COLOR
jne @f
call draw_objects
1024,7 → 1046,7
but_mode_clear:
push eax
mov eax,dword[v_pen_mode]
mov dword[v_pen_mode],0 ;clear
stdcall set_pen_mode,PEN_MODE_CLEAR,2,((15 shl 8)+9) shl 16
cmp eax,PEN_MODE_SELECT_COLOR
jne @f
call draw_objects
1308,7 → 1330,7
v_cur_y dd 0 ;ª®®à¤¨­ â  ªãàá®à  y (­® ®áì ¢ ®¡ê¥ªâ¥ z)
n_plane dd 0 ;¯«®áª®áâì á¥ç¥­¨ï
v_color dd 0xff ;梥⠪ à ­¤ è 
v_pen_mode dd 1 ;०¨¬: 0-áâ¨à ­¨ï, 1-à¨á®¢ ­¨ï
v_pen_mode dd PEN_MODE_NONE ;०¨¬ à ¡®âë ªãàá®à  (á¬. ª®­áâ ­âë PEN_MODE_...)
mode_light dd 1 ;०¨¬ ®á¢¥é¥­¨ï
cam_x dd 0
cam_y dd 0
1464,6 → 1486,28
popad
ret
 
;hot_p - ª®®à¤¨­ âë £®àï祩 â®çª¨ ªãàá®à , ᬥ饭­ë¥ ­  ¡¨â 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 ;㬭®¦ ¥¬ ­  4 ª¡
add ecx,[buf_curs.data]
mcall 37,4
 
cmp eax,0
je @f
mov [cursor_pointer],eax
mcall 37,5,[cursor_pointer]
@@:
ret
endp
 
if 0
;input:
; buf - 㪠§ â¥«ì ­  áâபã, ç¨á«® ¤®«¦­® ¡ëâì ¢ 10 ¨«¨ 16 à¨ç­®¬ ¢¨¤¥
1860,6 → 1904,28
buf_r_z:
rb BUF_STRUCT_SIZE
 
align 4
cursor_pointer dd 0 ;㪠§ â¥«ì ­  ¤ ­­ë¥ ¤«ï ªãàá®à 
 
buf_curs: ;¡ãä¥à á ªãàá®à ¬¨
.data: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
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: ;¡ãä¥à á ¯à®§à ç­®áâìî ¤«ï ªãàá®à®¢
.data: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
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
vox_6_7_z: