Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6363 → Rev 6364

/programs/media/animage/trunk/animage.asm
116,7 → 116,7
 
call drawwin
;---------------------------------------------------------
;---------Check loading of file from parameters-----------
;---------check loading of file from parameters-----------
;---------------------------------------------------------
mov eax,file_path
cmp [eax],byte 0
139,14 → 139,18
;OpenDialog initialisation
stdcall [OpenDialog_Init], OpenDialog_data
;---------------------------------------------------------------------
mov [Current_instrument],10 ;pencil
call TakeButtonInstruments ;set startup instrument
 
align 4
red:
call drawwin
;----------------------------------------------------------
;---------------------MAIN LOOP----------------------------
;---------------------main loop----------------------------
;----------------------------------------------------------
align 4
still:
call event
mcall SF_WAIT_EVENT
 
cmp eax,1
je red
201,7 → 205,7
include 'spray.inc'
include 'width_lines.inc'
;----------------------------------------------------------
;-------------------ICON"S picture-------------------------
;-------------------icon's picture-------------------------
;----------------------------------------------------------
align 4
panel_picture:
225,6 → 229,7
zoom_cursor:
file 'zoom.cur'
;----------------------------------------------------------
align 4
IM_END:
;-----------------------------------------------------------
;------------variables and data of program------------------
241,13 → 246,12
PointerToSpriteBufer rd 1
PointerToPalette rd 1 ;㪠§ â¥«ì ­  ¯¨«¨âàã (­ã¦¥­ ¤«ï á®åà ­¥­¨ï ¢ *.bmp)
Color rd 1
SColor rd 1
Number_Brush rd 1
Brush_SizeX rd 1
Brush_SizeY rd 1
Current_instrument rd 1
Last_instrument rd 1
Activate_instrument rb 1
SColor rd 1
OldX rd 1
OldY rd 1
 
279,7 → 283,6
Icon_Y rd 1
counter rd 1
counter2 rd 1
Panel_flag rb 1
menu_counter rd 1
counter_11 rd 1
number_panel rd 1
299,24 → 302,19
Scroll2SizeY rd 1
Scroll2FreeY rd 1
 
;extended_memory rd 1
type rw 1
x rd 1
y rd 1
save_flag rb 1
exit_from_work_arrea rb 1
 
Radius rd 1
Dx_ rd 1
Dy_ rd 1
line_width rd 1
lastik_is_active rb 1
a_ellips rd 1
b_ellips rd 1
instrument_used rb 1
used_OldX rd 1
 
used_OldX rd 1 ;for draw hard contour
used_OldY rd 1
rectangular_shade_x rd 1
rectangular_shade_x rd 1 ;ª®®à¤¨­ â  x ®¡« á⨠¤«ï ª®¯¨à®¢ ­¨ï
rectangular_shade_y rd 1
crossing_old_x rd 1
crossing_old_y rd 1
323,8 → 321,6
crossing rd 1
finishing_crossing rd 1
number_undo rd 1
DrawSprite_flag rb 1
Paste_flag rb 1
SpriteSizeX rd 1
SpriteSizeY rd 1
SpriteCoordinatX rd 1
331,13 → 327,20
SpriteCoordinatY rd 1
SpriteOldCoordinatX rd 1
SpriteOldCoordinatY rd 1
 
CursorsID rd 10
 
Activate_instrument rb 1
save_flag rb 1
exit_from_work_arrea rb 1
lastik_is_active rb 1
instrument_used rb 1
DrawSprite_flag rb 1
Paste_flag rb 1
;---------------------------------------------------------------------
IncludeUGlobals
;---------------------------------------------------------------------
align 4
CursorsID rd 10
;---------------------------------------------------------------------
align 4
file_path rb 4096
filename_area rb 256
temp_dir_pach rb 4096
/programs/media/animage/trunk/cursors.inc
8,84 → 8,49
 
mov [PointerToCursorsID],eax
 
mov eax, 37
mov ebx, 4
mov ecx,brush_cursor
mov edx,1
mcall
mcall SF_MOUSE_GET, SSF_LOAD_CURSOR, brush_cursor, 1
 
mov ebx,[PointerToCursorsID]
mov [ebx],eax
add [PointerToCursorsID],4
 
mov eax, 37
mov ebx, 4
mov ecx,flood_fill_cursor
mov edx,1
mcall
mcall SF_MOUSE_GET, SSF_LOAD_CURSOR, flood_fill_cursor, 1
 
mov ebx,[PointerToCursorsID]
mov [ebx],eax
add [PointerToCursorsID],4
 
mov eax, 37
mov ebx, 4
mov ecx,lastik_cursor
mov edx,1
mcall
mcall SF_MOUSE_GET, SSF_LOAD_CURSOR, lastik_cursor, 1
 
mov ebx,[PointerToCursorsID]
mov [ebx],eax
add [PointerToCursorsID],4
 
mcall SF_MOUSE_GET, SSF_LOAD_CURSOR, other_cursor, 1
 
mov eax, 37
mov ebx, 4
mov ecx,other_cursor
mov edx,1
mcall
 
 
mov ebx,[PointerToCursorsID]
mov [ebx],eax
add [PointerToCursorsID],4
 
mov eax, 37
mov ebx, 4
mov ecx,pencil_cursor
mov edx,1
mcall
mcall SF_MOUSE_GET, SSF_LOAD_CURSOR, pencil_cursor, 1
 
 
mov ebx,[PointerToCursorsID]
mov [ebx],eax
add [PointerToCursorsID],4
 
mov eax, 37
mov ebx, 4
mov ecx,pipette_cursor
mov edx,1
mcall
mcall SF_MOUSE_GET, SSF_LOAD_CURSOR, pipette_cursor, 1
 
mov ebx,[PointerToCursorsID]
mov [ebx],eax
add [PointerToCursorsID],4
 
mov eax, 37
mov ebx, 4
mov ecx,spray_cursor
mov edx,1
mcall
mcall SF_MOUSE_GET, SSF_LOAD_CURSOR, spray_cursor, 1
 
mov ebx,[PointerToCursorsID]
mov [ebx],eax
add [PointerToCursorsID],4
 
mov eax, 37
mov ebx, 4
mov ecx,zoom_cursor
mov edx,1
mcall
mcall SF_MOUSE_GET, SSF_LOAD_CURSOR, zoom_cursor, 1
 
mov ebx,[PointerToCursorsID]
mov [ebx],eax
280,6 → 245,9
 
che:
 
cmp eax,8 ;cursors count
jg no_change_cursor
 
dec eax
shl eax,2
mov ebx,[PointerToCursorsID]
286,9 → 254,7
add eax,ebx
mov ecx,[eax]
 
mov eax, 37
mov ebx, 5
mcall
mcall SF_MOUSE_GET, SSF_SET_CURSOR
 
no_change_cursor:
 
/programs/media/animage/trunk/events.inc
1,12 → 1,4
;----------------------------------------------------------
;---------------------system events------------------------
;----------------------------------------------------------
align 4
event:
mcall SF_WAIT_EVENT
ret
 
;----------------------------------------------------------
;---------------------sound of events----------------------
;----------------------------------------------------------
align 4
/programs/media/animage/trunk/events_of_buttons.inc
30,15 → 30,6
mov [Current_instrument],eax
call button_handler_main_menu
 
; set cursor for current instrument
pushad
 
mov eax,CursorsID
mov ebx,[Current_instrument]
 
call set_cursor
popad
 
cmp eax,10
jl still
 
/programs/media/animage/trunk/events_of_mouse.inc
12,33 → 12,6
jne still
call GetMouseCoordinats
;panel
mov edx,[Window_SizeX]
sub edx,5
 
;cmp ebx,0
;jle no_panel
 
cmp ebx,ci_panel_y_pos
jae no_panel
 
cmp eax,5
jle no_panel
 
cmp eax,edx
jae no_panel
 
call GetMouseCoordinats
jmp panel_interraction
 
no_panel:
cmp [Panel_flag],0
jz no_redraw_panel
 
jmp panel_interraction
 
no_redraw_panel:
call GetMouseCoordinats
mov eax,[MouseX]
mov ebx,[MouseY]
mov ecx,[WorkScreen_SizeX]
58,7 → 31,7
;scrollers
call GetMouseClick
cmp eax,1
jne no_click
jne still
 
call GetMouseCoordinats
;interraction with horizontal scroller
169,8 → 142,6
call CalculatePositionScreen
call draw_scrollers
call MovePictureToWorkScreen
 
no_click:
jmp still
 
no_scrollers:
178,8 → 149,8
mov ebx,[MouseY]
mov ecx,[Window_SizeX]
mov edx,[Window_SizeY]
sub ecx,36
sub edx,35
sub ecx,ci_scroll_dim+ci_edit_wnd_border+5+ci_offs_skin_w
sub edx,ci_scroll_dim+ci_edit_wnd_border+5+ci_offs_skin_h
 
cmp eax,ci_scrollh_coord_x_min
jle not_work_arrea
196,11 → 167,18
 
not_work_arrea:
mov [exit_from_work_arrea],1
mcall SF_MOUSE_GET, SSF_SET_CURSOR, 0 ;set standart cursor
jmp still
 
mouse_in_work_arrea:
call GetScreenCordinats
call PrintMousePos
 
;set cursor for current instrument
mov eax,CursorsID
mov ebx,[Current_instrument]
call set_cursor
 
call GetMouseClick
test eax,eax
jz no_use_instruments
208,7 → 186,7
cmp [Activate_instrument],0
jnz no_undo___
;------------begin copy for undo-------------
;copy bufer number 2 to bufer number 0
;copy bufer_0 -> bufer_2
mov edi,[PointerToCopyPicture2]
mov esi,[PointerToPicture]
mov ecx,[Picture_SizeX]
221,7 → 199,6
mov ecx,ebx
and ecx,3
rep movsb
;call MovePictureToWorkScreen
;rotate bufers +1
and [number_undo],0 ;erase all undo
mov eax,[PointerToPicture]
/programs/media/animage/trunk/menu_instruments.inc
218,7 → 218,7
jne no_undo
 
cmp [number_undo],2 ;2 - maximum undo count
jge no_undo
jge end_menu
 
;rotate bufers -1
inc [number_undo]
238,7 → 238,7
jne no_redo
 
cmp [number_undo],0
je no_redo
je end_menu
 
;rotate bufers +1
dec [number_undo]
258,9 → 258,9
jne no_copy
 
cmp [instrument_used],1
jne no_copy
jne end_menu
cmp [Activate_instrument],0
jne no_copy
jne end_menu
 
mov eax,[OldX]
mov ebx,[OldY]
/programs/media/animage/trunk/panel_engen.inc
1,9 → 1,3
;-------------------------------------------------
;-----interraction panel with user----------------
;-------------------------------------------------
panel_interraction:
and [Panel_flag],0
jmp still
;---------------------------------------------------------
;-----draw panel menu(main engin of panel)----------------
;---------------------------------------------------------