new version of animage from andrew_programmer

git-svn-id: svn://kolibrios.org@255 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
heavyiron 2006-12-29 14:50:24 +00:00
parent f5b902bbee
commit af99f0b88d
40 changed files with 6475 additions and 5744 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

View File

@ -0,0 +1,117 @@
;----------------------------------------------------------
;--------------------COLOR BRUSHES-------------------------
;----------------------------------------------------------
Brush_color:
;
db 0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
;
db 0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
;
db 0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0
db 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0
db 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0
db 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0
db 0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
;
db 0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0
db 0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0
db 0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0
db 0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0
db 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0
db 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0
db 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0
db 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0
db 0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0
db 0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0
db 0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0
db 0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
;
db 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
;
db 0

View File

@ -1,3 +1,2 @@
@fasm animage.asm animage
@mtappack animage
@pause

View File

@ -0,0 +1,324 @@
;load cursors from memory
;IN
; eax- pointer to memory for ID of cursors
;OUT
; not returned value
load_cursors:
mov [PointerToCursorsID],eax
mov eax, 37
mov ebx, 4
mov ecx,brush_cursor
mov edx,1
int 0x40
mov ebx,[PointerToCursorsID]
mov [ebx],eax
add [PointerToCursorsID],4
mov eax, 37
mov ebx, 4
mov ecx,flood_fill_cursor
mov edx,1
int 0x40
mov ebx,[PointerToCursorsID]
mov [ebx],eax
add [PointerToCursorsID],4
mov eax, 37
mov ebx, 4
mov ecx,lastik_cursor
mov edx,1
int 0x40
mov ebx,[PointerToCursorsID]
mov [ebx],eax
add [PointerToCursorsID],4
mov eax, 37
mov ebx, 4
mov ecx,other_cursor
mov edx,1
int 0x40
mov ebx,[PointerToCursorsID]
mov [ebx],eax
add [PointerToCursorsID],4
mov eax, 37
mov ebx, 4
mov ecx,pencil_cursor
mov edx,1
int 0x40
mov ebx,[PointerToCursorsID]
mov [ebx],eax
add [PointerToCursorsID],4
mov eax, 37
mov ebx, 4
mov ecx,pipette_cursor
mov edx,1
int 0x40
mov ebx,[PointerToCursorsID]
mov [ebx],eax
add [PointerToCursorsID],4
mov eax, 37
mov ebx, 4
mov ecx,spray_cursor
mov edx,1
int 0x40
mov ebx,[PointerToCursorsID]
mov [ebx],eax
add [PointerToCursorsID],4
mov eax, 37
mov ebx, 4
mov ecx,zoom_cursor
mov edx,1
int 0x40
mov ebx,[PointerToCursorsID]
mov [ebx],eax
add [PointerToCursorsID],4
ret
;set cirsor
;IN
;eax- pointer to IDs of cursors
;ebx- number(ID) of current instrument
set_cursor:
mov [PointerToCursorsID],eax
cmp ebx,10
jne no_1_l
mov eax,5
jmp che
no_1_l:
cmp ebx,11
jne no_2_l
mov eax,1
jmp che
no_2_l:
cmp ebx,12
jne no_3_l
mov eax,7
jmp che
no_3_l:
cmp ebx,13
jne no_4_l
mov eax,3
jmp che
no_4_l:
cmp ebx,14
jne no_5_l
mov eax,2
jmp che
no_5_l:
cmp ebx,15
jne no_6_l
mov eax,6
jmp che
no_6_l:
cmp ebx,16
jne no_7_l
mov eax,4
jmp che
no_7_l:
cmp ebx,17
jne no_8_l
mov eax,4
jmp che
no_8_l:
cmp ebx,18
jne no_9_l
mov eax,4
jmp che
no_9_l:
cmp ebx,19
jne no_10_l
mov eax,4
jmp che
no_10_l:
cmp ebx,20
jne no_11_l
mov eax,4
jmp che
no_11_l:
cmp ebx,21
jne no_12_l
mov eax,4
jmp che
no_12_l:
cmp ebx,22
jne no_13_l
mov eax,4
jmp che
no_13_l:
cmp ebx,23
jne no_14_l
mov eax,4
jmp che
no_14_l:
cmp ebx,24
jne no_15_l
mov eax,4
jmp che
no_15_l:
cmp ebx,25
jne no_16_l
mov eax,4
jmp che
no_16_l:
cmp ebx,26
jne no_17_l
mov eax,4
jmp che
no_17_l:
cmp ebx,27
jne no_18_l
mov eax,4
jmp che
no_18_l:
cmp ebx,28
jne no_19_l
mov eax,4
jmp che
no_19_l:
cmp ebx,45
jne no_25_l
mov eax,8
jmp che
no_25_l:
cmp ebx,46
jne no_26_l
mov eax,8
jmp che
no_26_l:
cmp ebx,47
jne no_27_l
mov eax,8
jmp che
no_27_l:
cmp ebx,48
jne no_28_l
mov eax,8
jmp che
no_28_l:
cmp ebx,49
jne no_29_l
mov eax,8
jmp che
no_29_l:
cmp ebx,50
jne no_30_l
mov eax,8
jmp che
no_30_l:
cmp ebx,40
je no_change_cursor
cmp ebx,41
je no_change_cursor
cmp ebx,42
je no_change_cursor
cmp ebx,43
je no_change_cursor
cmp ebx,44
je no_change_cursor
cmp ebx,52
je no_change_cursor
cmp ebx,51
je no_change_cursor
cmp ebx,52
je no_change_cursor
che:
dec eax
shl eax,2
mov ebx,[PointerToCursorsID]
add eax,ebx
mov ecx,[eax]
mov eax, 37
mov ebx, 5
int 0x40
no_change_cursor:
ret
;delete cursors
;IN
;eax- pointer to IDs of cursors
;OUT
;not returned value
delete_cursors:
mov [PointerToCursorsID],eax
mov edx,8
next_cursor_delete:
mov eax,[PointerToCursorsID]
mov ecx,[eax]
mov eax,37
mov ebx,6
int 0x40
add [PointerToCursorsID],4
dec edx
jnz next_cursor_delete
ret
PointerToCursorsID dd 0

View File

@ -9,10 +9,10 @@ draw_volume_rectangle:
cmp esi,1
jne no_volume_light_rectangle
mov [color_rectangle],9350878
mov [color_line1],5669590
mov [color_line2],12508927
mov [color_line3],9350878
mov [color_rectangle],0xc7cbcf
mov [color_line1],0xaeabae
mov [color_line2],0xffffff
mov [color_line3],0xc7cbcf
jmp exit_colors
no_volume_light_rectangle:
@ -20,10 +20,10 @@ draw_volume_rectangle:
cmp esi,2
jne no_pressed_rectangle
mov [color_rectangle],9089258
mov [color_line1],5669590
mov [color_line2],9089258
mov [color_line3],9089258
mov [color_rectangle],0x666666
mov [color_line1],0xaeabae
mov [color_line2],0x666666
mov [color_line3],0x666666
jmp exit_colors
@ -32,10 +32,10 @@ draw_volume_rectangle:
cmp esi,3
jne no_pressed_panel
mov [color_rectangle],9350878
mov [color_line1],5669590
mov [color_rectangle],0xc7cbcf
mov [color_line1],0xaeabae
mov [color_line2],7000
mov [color_line3],12508927
mov [color_line3],0xffffff
jmp exit_colors
no_pressed_panel:
@ -44,9 +44,9 @@ draw_volume_rectangle:
jne no_pressed_light_panel
mov [color_rectangle],0xffffff
mov [color_line1],5669590
mov [color_line1],0xaeabae
mov [color_line2],7000
mov [color_line3],12508927
mov [color_line3],0xffffff
jmp exit_colors
no_pressed_light_panel:
@ -54,10 +54,10 @@ draw_volume_rectangle:
cmp esi,5
jne no_light_pressed_rectangle
mov [color_rectangle],9089258
mov [color_line1],5669590
mov [color_line2],9089258
mov [color_line3],9089258
mov [color_rectangle],0x666666
mov [color_line1],0xaeabae
mov [color_line2],0x666666
mov [color_line3],0x666666
jmp exit_colors
@ -66,10 +66,10 @@ draw_volume_rectangle:
cmp esi,6
jne no_work_rectangle
mov [color_rectangle],9350878
mov [color_line1],5669590
mov [color_line2],9350878
mov [color_line3],9350878
mov [color_rectangle],0xc7cbcf
mov [color_line1],0xaeabae
mov [color_line2],0xc7cbcf
mov [color_line3],0xc7cbcf
jmp exit_colors
no_work_rectangle:
@ -77,10 +77,10 @@ draw_volume_rectangle:
cmp esi,7
jne no_work_rectangle_2
mov [color_rectangle],9350878
mov [color_line1],9350878
mov [color_line2],9350878
mov [color_line3],9350878
mov [color_rectangle],0xc7cbcf
mov [color_line1],0xc7cbcf
mov [color_line2],0xc7cbcf
mov [color_line3],0xc7cbcf
jmp exit_colors
no_work_rectangle_2:
@ -227,7 +227,8 @@ draw_conture:
mov [line_size_x],ecx
mov [line_size_y],edx
mov [color_line1],5669590
mov [color_line1],0xaeabae
;line 1
mov edx,[color_line1]
@ -317,7 +318,7 @@ draw_line:
;----------------------------------------------------------
;lightlin 12508927
;lines 5669590
;workpan 9350878
;workpan 9350879
;btnpress 9089258
line_x dd 0
line_y dd 0

View File

@ -12,9 +12,9 @@ local dlg_is_work, ready, procinfo
cld
;; mov esi,path
mov edi,path
mov eax,0
mov ecx,200
rep stosb
xor eax,eax
mov ecx,(1024+16)/4
rep stosd
;mov [get_loops],0
mov [dlg_pid_get],0
@ -56,7 +56,7 @@ new_d:
mov eax,60
mov ebx,1 ; define IPC
mov ecx,path ; offset of area
mov edx,150 ; size 150 bytes
mov edx,1024+16 ; size
int 0x40
; change wanted events list 7-bit IPC event
@ -68,7 +68,7 @@ new_d:
; STEP 3 run SYSTEM XTREE with parameters
;
mov eax,58
mov eax,70
mov ebx,run_fileinfo
int 0x40
@ -79,15 +79,14 @@ getmesloop:
mov eax,23
mov ebx,50 ;0.5 sec
int 0x40
cmp eax,1
je mred
cmp eax,2
je mkey
cmp eax,3
je mbutton
cmp eax,7
je mgetmes
dec eax
jz mred
dec eax
jz mkey
dec eax
jz mbutton
cmp al, 7-3
jz mgetmes
; Get number of procces
mov ebx,procinfo
@ -180,8 +179,8 @@ ready:
cld
mov esi,path+16
mov edi,path
mov ecx,200
rep movsb
mov ecx,1024/4
rep movsd
mov [edi],byte 0
jmp openoff
@ -197,11 +196,11 @@ param:
dd 0,0 ; Type of dialog
run_fileinfo:
dd 16
dd 7
dd 0
dd param
dd 0
dd procinfo ; 0x10000
dd 0
;run_filepath
db '/RD/1/SYSXTREE',0
@ -224,8 +223,8 @@ local dlg_is_work, ready, procinfo
cld
;; mov esi,path
mov edi,path
mov eax,0
mov ecx,200
xor eax,eax
mov ecx,(1024+16)/4
rep stosb
;mov [get_loops],0
@ -267,8 +266,8 @@ new_d:
; define IPC memory
mov eax,60
mov ebx,1 ; define IPC
mov ecx,path ; offset of area
mov edx,150 ; size 150 bytes
mov ecx,path ; offset of area
mov edx,1024+16 ; size
int 0x40
; change wanted events list 7-bit IPC event
@ -280,7 +279,7 @@ new_d:
; STEP 3 run SYSTEM XTREE with parameters
;
mov eax,58
mov eax,70
mov ebx,run_fileinfo
int 0x40
@ -291,15 +290,14 @@ getmesloop:
mov eax,23
mov ebx,50 ;0.5 sec
int 0x40
cmp eax,1
je mred
cmp eax,2
je mkey
cmp eax,3
je mbutton
cmp eax,7
je mgetmes
dec eax
jz mred
dec eax
jz mkey
dec eax
jz mbutton
cmp al, 7-3
jz mgetmes
; Get number of procces
mov ebx,procinfo
@ -392,8 +390,8 @@ ready:
cld
mov esi,path+16
mov edi,path
mov ecx,200
rep movsb
mov ecx,1024/4
rep movsd
mov [edi],byte 0
jmp openoff
@ -409,11 +407,11 @@ param:
dd 0,0 ; Type of dialog
run_fileinfo:
dd 16
dd 7
dd 0
dd param
dd 0
dd procinfo
dd 0
;run_filepath:
db '/RD/1/SYSXTREE',0

View File

@ -0,0 +1,15 @@
;----------------------------------------------------------
;---------------------system events------------------------
;----------------------------------------------------------
event:
mov eax,10
int 0x40
ret
;---------------------------------------------------------
;---------------SOUND of EVENTS---------------------------
;---------------------------------------------------------
sound:
mov eax,55
mov ebx,eax
int 0x40
ret

View File

@ -0,0 +1,108 @@
;---------------------------------------------
;-----------panel BUTTONS---------------------
;---------------------------------------------
buttons:
cmp [Current_instrument],21
jne no_finish_instrument_button
cmp [instrument_used],1
jne no_finish_instrument_button
cmp [Activate_instrument],0
jne no_finish_instrument_button
cmp [crossing],1
jne no_finish_instrument_button
mov [finishing_crossing],1
call TakeButtonInstruments
no_finish_instrument_button:
mov eax,17
int 0x40
shr eax,8
cmp eax,1
jne no_exit
mov eax,CursorsID
call delete_cursors
mov eax,-1
int 0x40
no_exit:
mov [Current_instrument],eax
; set cursor for current instrument
pushad
mov eax,CursorsID
mov ebx,[Current_instrument]
call set_cursor
popad
cmp eax,10
jl still
;save instrumnets 10-40
cmp eax,40
jae no_save_last_instrument
mov [Last_instrument],eax
no_save_last_instrument:
cmp eax,10
je still
cmp eax,14
je still
cmp eax,11
je still
cmp eax,13
je still
cmp eax,12
je still
cmp eax,51
jne no_palette_
call TakeButtonInstruments
jmp still
no_palette_:
cmp eax,17
je still
cmp eax,21
jne no_allocation__
and [Activate_instrument],0
jmp still
no_allocation__:
cmp eax,20
jne no_kontur__
and [instrument_used],0
jmp still
no_kontur__:
call TakeButtonInstruments
jmp still

View File

@ -0,0 +1,94 @@
;------------------------------------------
;-------------KEYS-------------------------
;------------------------------------------
keys:
mov eax,2
int 0x40
shr eax,8
cmp eax,176
jne key2
sub [PosX],20
jmp change_screen
key2:
cmp eax,179
jne key3
add [PosX],20
jmp change_screen
key3:
cmp eax,177
jne key4
add [PosY],20
jmp change_screen
key4:
cmp eax,178
jne key5
sub [PosY],20
jmp change_screen
key5:
cmp eax,49
jne key6
mov [k],1
mov [Scroll1CoordinatX],9
mov [Scroll2CoordinatY],89
call drawwin
jmp change_screen
key6:
cmp eax,50
jne key7
mov [k],2
mov [Scroll1CoordinatX],9
mov [Scroll2CoordinatY],89
call drawwin
jmp change_screen
key7:
cmp eax,52
jne key8
mov [k],4
mov [Scroll1CoordinatX],9
mov [Scroll2CoordinatY],89
call drawwin
jmp change_screen
key8:
cmp eax,56
jne key9
mov [k],8
mov [Scroll1CoordinatX],9
mov [Scroll2CoordinatY],89
call drawwin
jmp change_screen
key9:
cmp eax,48
jne key10
mov [k],16
mov [Scroll1CoordinatX],9
mov [Scroll2CoordinatY],89
call drawwin
jmp change_screen
key10:
cmp eax,255
jne key11
call analizing_picture_to_palette
call drawwin
jmp change_screen
key11:
cmp eax,27
jne still
mov eax,CursorsID
call delete_cursors
mov eax,-1
int 0x40
jmp still
change_screen:
call CalculatePositionScreen
call MovePictureToWorkScreen
call draw_scrollers
call PrintMousePos
jmp still

View File

@ -0,0 +1,318 @@
;---------------------------------------------
;-------------interraction MOUSE--------------
;---------------------------------------------
mouse:
call GetMouseCoordinats
;panel
mov edx,[Window_SizeX]
sub edx,5
cmp ebx,20
jle no_panel
cmp ebx,20+15
jae no_panel
cmp eax,5
jle no_panel
cmp eax,edx ;585
jae no_panel
call GetMouseCoordinats
mov [counter],7
mov edi,panel_text
call panel_interraction
jmp still
no_panel:
cmp [Panel_flag],0
jz no_redraw_panel
mov [counter],7
mov edi,panel_text
call panel_interraction
no_redraw_panel:
call GetMouseCoordinats
mov eax,[MouseX]
mov ebx,[MouseY]
mov ecx,[WorkScreen_SizeX]
mov edx,[WorkScreen_SizeY]
add ecx,9
add edx,89
cmp eax,ecx
jae mouse_scroll
cmp ebx,edx
jae mouse_scroll
jmp no_scrollers
mouse_scroll:
mov [exit_from_work_arrea],1 ;mouse situated after work arrea
;scrollers
call GetMouseClick
cmp eax,1
jne no_click
call GetMouseCoordinats
;interraction with horizontal scroller
mov eax,[Scroll1CoordinatX]
mov ebx,[Scroll1CoordinatY]
mov ecx,[MouseX]
mov edx,[MouseY]
mov esi,[Scroll1MaxSizeX]
mov edi,[Scroll1MaxSizeY]
call columnus
test eax,eax
jz no_horizontal
mov eax,9
mov ebx,[Scroll1CoordinatY]
mov ecx,[Scroll1MaxSizeX]
mov edx,14+10
mov esi,7
inc ecx
call draw_volume_rectangle
mov eax,[MouseX]
mov ebx,[Scroll1SizeX]
shr ebx,1
sub eax,ebx
mov ecx,[MouseX]
add ecx,ebx
mov edx,8+1
add edx,[Scroll1MaxSizeX]
mov [Scroll1CoordinatX],eax
sub eax,9
jns no_min_scroll
mov [Scroll1CoordinatX],9
no_min_scroll:
cmp ecx,edx
jl no_max_scroll
sub edx,ebx
sub edx,ebx
mov [Scroll1CoordinatX],edx
no_max_scroll:
;
mov eax,[Scroll1CoordinatX]
sub eax,9
mov ebx,[Picture_SizeX]
imul eax,ebx
mov ebx,[Scroll1MaxSizeX]
cdq
idiv ebx
mov [PosX],eax
jmp no_vertical
no_horizontal:
mov eax,[Scroll2CoordinatX]
mov ebx,[Scroll2CoordinatY]
mov ecx,[MouseX]
mov edx,[MouseY]
mov esi,[Scroll2MaxSizeX]
mov edi,[Scroll2MaxSizeY]
call columnus
test eax,eax
jz no_vertical
mov eax,[Scroll2CoordinatX]
mov ebx,89
mov ecx,14+10
mov edx,[Scroll2MaxSizeY]
mov esi,7
inc edx
call draw_volume_rectangle
mov eax,[MouseY]
mov ebx,[Scroll2SizeY]
shr ebx,1
sub eax,ebx
mov ecx,[MouseY]
add ecx,ebx
mov edx,89
add edx,[Scroll2MaxSizeY]
mov [Scroll2CoordinatY],eax
sub eax,89
jns no_min_scroll2
mov [Scroll2CoordinatY],89
no_min_scroll2:
cmp ecx,edx
jl no_max_scroll2
sub edx,ebx
sub edx,ebx
mov [Scroll2CoordinatY],edx
no_max_scroll2:
;
mov eax,[Scroll2CoordinatY]
sub eax,89
mov ebx,[Picture_SizeY]
imul eax,ebx
mov ebx,[Scroll2MaxSizeY]
cdq
idiv ebx
mov [PosY],eax
no_vertical:
call CalculatePositionScreen
call draw_scrollers
call MovePictureToWorkScreen
no_click:
jmp still
no_scrollers:
mov eax,[MouseX]
mov ebx,[MouseY]
mov ecx,[Window_SizeX]
mov edx,[Window_SizeY]
sub ecx,36
sub edx,35
cmp eax,9
jle not_work_arrea
cmp eax,ecx
jae not_work_arrea
cmp ebx,20+15+1+50
jle not_work_arrea
cmp ebx,edx
jae not_work_arrea
jmp mouse_in_work_arrea
not_work_arrea:
mov [exit_from_work_arrea],1
jmp still
mouse_in_work_arrea:
call GetScreenCordinats
call PrintMousePos
call GetMouseClick
test eax,eax
jz no_use_instruments
cmp [Activate_instrument],0
jnz no_undo___
;------------begin copy for undo-------------
inc [number_undo]
cmp [number_undo],1
jne no_one__
mov edi,[PointerToCopyPicture]
no_one__:
cmp [number_undo],2
jne no_two__
mov edi,[PointerToCopyPicture2]
no_two__:
cmp [number_undo],3
jne no_three__
;copy bufer number two to bufer number one
mov esi,[PointerToCopyPicture2]
mov edi,[PointerToCopyPicture]
mov ecx,[Picture_SizeX]
imul ecx,[Picture_SizeY]
lea ecx,[ecx+ecx*2]
add ecx,4
shr ecx,2
inc ecx
cld
rep movsd
;end copy
dec [number_undo]
mov edi,[PointerToCopyPicture2]
no_three__:
mov esi,[PointerToPicture]
mov ecx,[Picture_SizeX]
imul ecx,[Picture_SizeY]
lea ecx,[ecx+ecx*2]
add ecx,4
shr ecx,2
inc ecx
cld
rep movsd
;--------------end copy for undo-------------
no_undo___:
call TakeButtonInstruments
no_use_instruments:
mov eax,[Current_instrument]
and [Activate_instrument],0
jmp still
;-----------------------------------------------
;---------get mouse cordinats-------------------
;-----------------------------------------------
GetMouseCoordinats:
mov eax,37
mov ebx,1
int 0x40
mov ebx,eax
shr eax,16
and ebx,0xffff
mov [MouseX],eax
mov [MouseY],ebx
ret
;------------------------------------------------
;-------get mouse attributs----------------------
;------------------------------------------------
GetMouseClick:
mov eax,37
mov ebx,2
int 0x40
ret

View File

@ -0,0 +1,97 @@
;----------------------------------------------------------
;-------------draw window of program-----------------------
;----------------------------------------------------------
drawwin:
mov eax,9
mov ebx,IPC_table
or ecx,-1
int 0x40
mov eax,[IPC_table+34]
mov ebx,[IPC_table+38]
mov ecx,[IPC_table+42]
mov edx,[IPC_table+46]
mov [Window_CordinatX],eax
mov [Window_CordinatY],ebx
mov [Window_SizeX],ecx
mov [Window_SizeY],edx
cmp [Window_SizeX],585
jae no_minimum_size_x
mov [Window_SizeX],585
mov ecx,[Window_SizeX]
no_minimum_size_x:
cmp [Window_SizeY],400
jae no_minimum_size_y
mov [Window_SizeY],400
mov edx,[Window_SizeY]
no_minimum_size_y:
mov [MaxWorkScreen_SizeX],ecx
mov [MaxWorkScreen_SizeY],edx
sub [MaxWorkScreen_SizeX],20+10+5+10
sub [MaxWorkScreen_SizeY],20+10+15+1+49+20+10
cmp [MaxWorkScreen_SizeX],0
jns no_znak1
mov [MaxWorkScreen_SizeX],ecx
no_znak1:
cmp [MaxWorkScreen_SizeY],0
jns no_znak2
mov [MaxWorkScreen_SizeY],edx
no_znak2:
mov eax,12
mov ebx,1
int 0x40
and eax,0
mov ebx,[Window_CordinatX]
mov ecx,[Window_CordinatY]
shl ebx,16
shl ecx,16
add ebx,[Window_SizeX]
add ecx,[Window_SizeY]
mov edx,0x03aabbcc
mov esi,0x805080d0
mov edi,0x005080d0
int 0x40
call draw_panel
call PrintMousePos
mov [counter],7
mov edi,panel_text
call print_panel_text
mov eax,10
mov ebx,5
mov ecx,0xffffff
mov edx,name_of_program
mov esi,34
call print_text
mov eax,12
mov ebx,2
int 0x40
mov ecx,[k]
and [PosX],0
and [PosY],0
call MovePictureToWorkScreen
call draw_scrollers
call draw_icons
ret

View File

@ -0,0 +1,135 @@
;-----------------------------------------------------------
;-----------load heading of file in memory------------------
;-----------------------------------------------------------
load_heading_of_file:
mov [where_load_file],ebx
mov [full_file_path],eax
mov esi,[full_file_path]
mov edi,filepath
mov ecx,256
rep movsd
xor eax,eax
mov ecx,[where_load_file]
mov edx,filepath
mov [file_information],eax
mov [file_information+4],eax
mov [file_information+8],eax
mov [file_information+12],dword 512
mov [file_information+16],ecx
mov [file_information+20],al
mov [file_information+21],edx
mov eax,70
mov ebx,file_information
int 0x40
ret
;-----------------------------------------------------------
;--------load file in memory--------------------------------
;-----------------------------------------------------------
load_file:
mov [where_load_file],ebx
mov [full_file_path],eax
mov esi,[full_file_path]
mov edi,filepath
mov ecx,256
rep movsd
xor eax,eax
mov ebx,bufer_for_info
mov ecx,filepath
mov [file_information],dword 5
mov [file_information+4],eax
mov [file_information+8],eax
mov [file_information+12],eax
mov [file_information+16],ebx
mov [file_information+20],al
mov [file_information+21],ecx
mov eax,70
mov ebx,file_information
int 0x40
test eax,eax
jnz error_load_file
xor eax,eax
mov ebx,[bufer_for_info+32]
mov ecx,[where_load_file]
mov edx,filepath
mov [file_information],eax
mov [file_information+4],eax
mov [file_information+8],eax
mov [file_information+12],ebx
mov [file_information+16],ecx
mov [file_information+20],al
mov [file_information+21],edx
mov eax,70
mov ebx,file_information
int 0x40
error_load_file:
ret
;-----------------------------------------------------------
;---------------save in file from memory--------------------
;-----------------------------------------------------------
save_file:
mov [size_to_save],ecx
mov [pointer_to_data],ebx
mov [full_file_path],eax
mov esi,[full_file_path]
mov edi,filepath
mov ecx,256
rep movsd
xor eax,eax
mov ebx,[size_to_save]
mov ecx,[pointer_to_data]
mov edx,filepath
mov [file_information],dword 2
mov [file_information+4],eax
mov [file_information+8],eax
mov [file_information+12],ebx
mov [file_information+16],ecx
mov [file_information+20],al
mov [file_information+21],edx
mov eax,70
mov ebx,file_information
int 0x40
ret
;----------------------------------------------------------
;-------------file information structure-------------------
;----------------------------------------------------------
file_information:
dd 5
dd 0
dd 0
dd 0
dd bufer_for_info
dd 0
dd filepath
filepath rb 1040
bufer_for_info rd 10
full_file_path dd 0
where_load_file dd 0
size_to_save dd 0
pointer_to_data dd 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

View File

@ -0,0 +1,158 @@
;-----------------------------------------------------------
;---load icons in memory and draw icons on panel-----------
;-----------------------------------------------------------
load_icons:
mov esi,panel_picture
mov edi,[ScreenPointer]
mov eax,edi
add edi,(1200*1000*3)
;mov edi,[PointerToIcons]
call ReadGIF
ret
draw_icons:
mov [Icon_X],7
mov [Icon_Y],20+15+4
;draw panel picture
mov edx,[Icon_X]
shl edx,16
add edx,[Icon_Y]
mov ebx,[ScreenPointer]
add ebx,(1200*1000*3)+12
mov eax,7
mov ecx,417*65536+46
int 0x40
;main buttons of instrumnts
and [counter],0
mov [Icon_X],8
mov [Icon_Y],20+15+4+1
main_buttons:
mov eax,8
mov ebx,[Icon_X]
mov ecx,[Icon_Y]
dec ebx
dec ecx
shl ebx,16
shl ecx,16
add ebx,19
add ecx,20
mov edx,[counter]
add edx,10
add edx,1000000000000000000000000000000b
int 0x40
add [Icon_X],22
inc [counter]
cmp [counter],19
jne main_buttons
;buttons of brushes(and lines width)
and [counter],0
mov [Icon_X],7+1
mov [Icon_Y],20+15+4+25+1
next_button_brush:
mov eax,8
mov ebx,[Icon_X]
mov ecx,[Icon_Y]
dec ebx
dec ecx
shl ebx,16
shl ecx,16
add ebx,19
add ecx,20
mov edx,[counter]
add edx,40
add edx,1000000000000000000000000000000b
int 0x40
add [Icon_X],19
inc [counter]
cmp [counter],5
jne next_button_brush
;buttons of zoom
and [counter],0
mov [Icon_X],7+155+1
mov [Icon_Y],20+15+4+25+1
next_button_zoom:
mov eax,8
mov ebx,[Icon_X]
mov ecx,[Icon_Y]
dec ebx
dec ecx
shl ebx,16
shl ecx,16
add ebx,19
add ecx,20
mov edx,[counter]
add edx,45
add edx,1000000000000000000000000000000b
int 0x40
add [Icon_X],19
inc [counter]
cmp [counter],6
jne next_button_zoom
; button of palette
mov [Icon_X],7+105+1
mov [Icon_Y],20+15+4+25+1
mov eax,8
mov ebx,[Icon_X]
mov ecx,[Icon_Y]
dec ebx
dec ecx
shl ebx,16
shl ecx,16
add ebx,20
add ecx,21
mov edx,51
add edx,1000000000000000000000000000000b
int 0x40
; button of color
mov [Icon_X],7+128+1
mov [Icon_Y],20+15+4+25+1
mov eax,8
mov ebx,[Icon_X]
mov ecx,[Icon_Y]
dec ebx
dec ecx
shl ebx,16
shl ecx,16
add ebx,20
add ecx,21
mov edx,52
add edx,1000000000000000000000000000000b
int 0x40
mov eax,13
mov ebx,136*65536+20
mov ecx,65*65536+20
mov edx,[Color]
int 0x40
ret

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,48 @@
;---------------------------------------------------------
;--------initializate data and params of program----------
;---------------------------------------------------------
mov [Scroll1CoordinatX],8+1
mov [Scroll2CoordinatY],20+15+1+50+3
mov [Window_SizeX],640
mov [Window_SizeY],220
mov [Window_CordinatX],50
mov [Window_CordinatY],50
mov [WorkScreen_SizeX],100
mov [WorkScreen_SizeY],100
mov [MaxWorkScreen_SizeX],100
mov [MaxWorkScreen_SizeY],100
mov [ScreenPointer],0x19000
and [PosX],0
and [PosY],0
mov [Picture_SizeX],640;400
mov [Picture_SizeY],400;280
mov [k],1
mov [PointerToPicture],0x19000+(1200*1000*3)+50*(20*20*3)+500000
mov [PointerToCopyPicture],0x19000+(1200*1000*3)+50*(20*20*3)+500000+(640*400*3)
mov [PointerToCopyPicture2],0x19000+(1200*1000*3)+50*(20*20*3)+500000+(640*400*3)*2
mov [PointerToEditBufer],0x19000+(1200*1000*3)+50*(20*20*3)+500000+(640*400*3)*3
mov [PointerToSpriteBufer],0x19000+(1200*1000*3)+50*(20*20*3)+500000+(640*400*3)*4
mov [PointerToPalette],0x19000+(1200*100*3)+50*(20*20*3)+1
mov [ReserveArray],0x19000+(1200*1000)*3+50*(20*20*3)+8
and [save_flag],0
mov [line_width],1
mov [lastik_is_active],0
and [crossing],0
and [finishing_crossing],0
and [number_undo],0
and [instrument_used],0
and [DrawSprite_flag],0
and [extended_memory],0
;mov eax,68
;mov ebx,11
;int 0x40
;mov eax,68
;mov ebx,12
;mov ecx,60000
;int 0x40
;mov [PointerToIcons],eax
finit

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

View File

@ -0,0 +1,15 @@
; load dll from file to memory
; IN
; eax - pointer to full dll path(path to dll +name_of_dll)
; OUT
; eax- handle to table of export of dll
load_dll:
mov ecx,eax
mov eax,68
mov ebx,19
int 0x40
ret

View File

@ -0,0 +1,154 @@
;loading file from parameters if parametrs <> 0
;IN
; eax- pointer to parameters
; ebx- pointer to path of file
;OUT
;value not returned
check_loading_from_parameters:
cmp [eax],byte 0
jz no_parameters
;copy file name
mov esi,eax
mov edi,ebx
mov ecx,256
rep movsb
;load file in memory
call load_picture
no_parameters:
ret
; load picture from file to memory
load_picture:
mov eax,file_path
mov ebx,[ScreenPointer]
add ebx,0x10000
call load_heading_of_file
mov esi,[ScreenPointer]
add esi,0x10000
;-------------is this BMP file ?----------------
xor eax,eax
mov ax,[esi]
mov [type],ax
cmp [type],word 'BM'
jne no_bmp_file_1
xor eax,eax
xor ebx,ebx
mov eax,[esi+18]
mov ebx,[esi+22]
mov [Picture_SizeX],eax
mov [Picture_SizeY],ebx
jmp exit_type_1
no_bmp_file_1:
;-------------is this GIF file ?----------------
xor eax,eax
mov ax,[esi]
mov [type],ax
cmp [type],'GI'
jne no_gif_file_1
add esi,6
xor eax,eax
xor ebx,ebx
mov ax,word[esi]
mov bx,word[esi+2]
mov [Picture_SizeX],eax
mov [Picture_SizeY],ebx
jmp exit_type_1
no_gif_file_1:
jmp no_unpakcing_file_1
exit_type_1:
;----------------------------------------------------------
;Get momory for unpacking picture and for picture's bufers
;----------------------------------------------------------
mov eax,[Picture_SizeX]
mov ebx,[Picture_SizeY]
imul eax,ebx
lea eax,[eax+eax*2]
mov ebx,[ScreenPointer]
add ebx,(1200*1000*3)+50*(20*20*3)+500000
mov [PointerToPicture],ebx
mov [PointerToCopyPicture],ebx
mov [PointerToCopyPicture2],ebx
mov [PointerToEditBufer],ebx
mov [PointerToSpriteBufer],ebx
add [PointerToCopyPicture],eax
add [PointerToCopyPicture2],eax
add [PointerToCopyPicture2],eax
add [PointerToEditBufer],eax
add [PointerToEditBufer],eax
add [PointerToEditBufer],eax
add [PointerToSpriteBufer],eax
add [PointerToSpriteBufer],eax
add [PointerToSpriteBufer],eax
add [PointerToSpriteBufer],eax
call GetMemory
;----------------------------------------------------------
;--------------------Load file in memory-------------------
;----------------------------------------------------------
mov eax,file_path
mov ebx,[PointerToCopyPicture]
add ebx,1000
call load_file
;----------------------------------------------------------
;-------------------Unpacking picture----------------------
;----------------------------------------------------------
mov esi,[PointerToCopyPicture]
add esi,1000
mov edi,[PointerToPicture]
mov eax,[ScreenPointer]
cmp [type],'BM'
jne no_unpakcing_bmp_file_1
;BMP DECODER
call bmptoimg
mov [save_flag],1
no_unpakcing_bmp_file_1:
cmp [type],'GI'
jne no_unpakcing_file_1
;GIF DECODER
sub edi,12
call ReadGIF
mov [save_flag],1
no_unpakcing_file_1:
call MovePictureToWorkScreen
mov [Scroll1CoordinatX],9
mov [Scroll2CoordinatY],89
ret

View File

@ -0,0 +1,28 @@
;----------------------------------------------------------
;--------change size of memory which use program-----------
;----------------------------------------------------------
GetMemory:
pushad
mov eax,64
mov ebx,1
mov ecx,[Picture_SizeX]
mov edx,[Picture_SizeY]
imul ecx,edx
lea ecx,[ecx+ecx*2]
lea ecx,[ecx+ecx*4] ;(Picture_SizeX*Picture_SizeY*3)*5
add ecx,[ScreenPointer]
add ecx,(1200*1000)*3+50*(20*20*3)+500000+16000+0x4000
add ecx,[extended_memory]
int 0x40
test eax,eax
jz have_new_memory
mov esi,sound_havent_memory
call sound
jmp still
have_new_memory:
popad
ret

View File

@ -0,0 +1,848 @@
;-----------------------------------------------------------
;-----------instruments of menu-----------------------------
;-----------------------------------------------------------
TakeInstruments:
;|||||||||||||||||||FILE||||||||||||||||||||||
cmp [number_panel],7
jne no_file
;<<<<<NEW>>>>>>>
cmp [number_menu],1
jne no_new
mov eax,80
mov ebx,100
mov ecx,150
mov edx,90
mov esi,1
call draw_volume_rectangle
mov eax,177
mov ebx,115
mov ecx,40
mov edx,14
mov esi,4
call draw_volume_rectangle
mov eax,177
mov ebx,115+24
mov ecx,40
mov edx,14
mov esi,4
call draw_volume_rectangle
mov eax,175
mov ebx,170
mov ecx,40
mov edx,15
mov esi,1
call draw_volume_rectangle
mov eax,90
mov ebx,118
mov ecx,0xffffff
mov edx,new_text1
mov esi,14
call print_text
mov eax,90
mov ebx,118+24
mov ecx,0xffffff
mov edx,new_text2
mov esi,14
call print_text
mov eax,185
mov ebx,175
mov ecx,0xffffff
mov edx,ok_text
mov esi,2
call print_text
mov eax,8
mov ebx,177*65536+40
mov ecx,115*65536+14
mov edx,1000000000000000000000000000000b
add edx,1000
int 0x40
mov eax,8
mov ebx,177*65536+40
mov ecx,139*65536+14
mov edx,1000000000000000000000000000000b
add edx,1001
int 0x40
mov eax,8
mov ebx,175*65536+40
mov ecx,170*65536+15
mov edx,1000000000000000000000000000000b
add edx,1002
int 0x40
no_activate_space:
mov eax,10
int 0x40
cmp eax,1
je exit_new
cmp eax,3
jne no_activate_space
mov eax,17
int 0x40
shr eax,8
cmp eax,1000
jl no_activate_space
cmp eax,1000
jne no_picture_size_x
mov eax,180
mov ebx,119
mov ecx,5
call dialog_line
mov eax,string_
mov ebx,13
call find_symvol
dec eax
mov [length_number],eax
mov eax,string_
call value
mov [Picture_SizeX],eax
jmp no_activate_space
no_picture_size_x:
cmp eax,1001
jne no_picture_size_y
mov eax,180
mov ebx,119+24
mov ecx,5
call dialog_line
mov eax,string_
mov ebx,13
call find_symvol
dec eax
mov [length_number],eax
mov eax,string_
call value
mov [Picture_SizeY],eax
jmp no_activate_space
no_picture_size_y:
cmp eax,1002
jne no_activate_space
exit_new:
mov eax,8
mov ebx,175*65536+40
mov ecx,170*65536+15
mov edx,11100000000000000000000000000000b
add edx,1002
int 0x40
mov eax,8
mov ebx,177*65536+40
mov ecx,139*65536+14
mov edx,11100000000000000000000000000000b
add edx,1001
int 0x40
mov eax,8
mov ebx,177*65536+40
mov ecx,115*65536+14
mov edx,11100000000000000000000000000000b
add edx,1000
int 0x40
;get memory for new picture
mov eax,[Picture_SizeX]
mov ebx,[Picture_SizeY]
imul eax,ebx
lea eax,[eax+eax*2]
mov ebx,[ScreenPointer]
add ebx,(1200*1000*3)+50*(20*20*3)+500000
mov [PointerToPicture],ebx
mov [PointerToCopyPicture],ebx
mov [PointerToCopyPicture2],ebx
mov [PointerToEditBufer],ebx
mov [PointerToSpriteBufer],ebx
add [PointerToCopyPicture],eax
add [PointerToCopyPicture2],eax
add [PointerToCopyPicture2],eax
add [PointerToEditBufer],eax
add [PointerToEditBufer],eax
add [PointerToEditBufer],eax
add [PointerToSpriteBufer],eax
add [PointerToSpriteBufer],eax
add [PointerToSpriteBufer],eax
add [PointerToSpriteBufer],eax
call GetMemory
and [save_flag],0
and [number_panel],0
and [number_menu],0
call cleare_work_arrea
call drawwin
jmp still
no_new:
;<<<<<OPEN>>>>>>>
cmp [number_menu],2
jne no_open
opendialog drawwin,open_1,open_2,file_path
open_1:
mov eax,40
mov ebx,100111b
int 0x40
mov eax,file_path
mov ebx,[ScreenPointer]
add ebx,0x10000
call load_heading_of_file
mov esi,[ScreenPointer]
add esi,0x10000
;-------------is this BMP file ?----------------
xor eax,eax
mov ax,[esi]
mov [type],ax
cmp [type],word 'BM'
jne no_bmp_file
xor eax,eax
xor ebx,ebx
mov eax,[esi+18]
mov ebx,[esi+22]
mov [Picture_SizeX],eax
mov [Picture_SizeY],ebx
jmp exit_type
no_bmp_file:
;-------------is this GIF file ?----------------
xor eax,eax
mov ax,[esi]
mov [type],ax
cmp [type],'GI'
jne no_gif_file
add esi,6
xor eax,eax
xor ebx,ebx
mov ax,word[esi]
mov bx,word[esi+2]
mov [Picture_SizeX],eax
mov [Picture_SizeY],ebx
jmp exit_type
no_gif_file:
jmp no_unpakcing_file
exit_type:
;----------------------------------------------------------
;Get momory for unpacking picture and for picture's bufers
;----------------------------------------------------------
mov eax,[Picture_SizeX]
mov ebx,[Picture_SizeY]
imul eax,ebx
lea eax,[eax+eax*2]
mov ebx,[ScreenPointer]
add ebx,(1200*1000*3)+50*(20*20*3)+500000
mov [PointerToPicture],ebx
mov [PointerToCopyPicture],ebx
mov [PointerToCopyPicture2],ebx
mov [PointerToEditBufer],ebx
mov [PointerToSpriteBufer],ebx
add [PointerToCopyPicture],eax
add [PointerToCopyPicture2],eax
add [PointerToCopyPicture2],eax
add [PointerToEditBufer],eax
add [PointerToEditBufer],eax
add [PointerToEditBufer],eax
add [PointerToSpriteBufer],eax
add [PointerToSpriteBufer],eax
add [PointerToSpriteBufer],eax
add [PointerToSpriteBufer],eax
call GetMemory
;----------------------------------------------------------
;--------------------Load file in memory-------------------
;----------------------------------------------------------
mov eax,file_path
mov ebx,[PointerToCopyPicture]
add ebx,1000
call load_file
;----------------------------------------------------------
;-------------------Unpacking picture----------------------
;----------------------------------------------------------
mov esi,[PointerToCopyPicture]
add esi,1000
mov edi,[PointerToPicture]
mov eax,[ScreenPointer]
cmp [type],'BM'
jne no_unpakcing_bmp_file
;BMP DECODER
call bmptoimg
mov [save_flag],1
no_unpakcing_bmp_file:
cmp [type],'GI'
jne no_unpakcing_file
;GIF DECODER
sub edi,12
call ReadGIF
mov [save_flag],1
no_unpakcing_file:
call load_icons
call drawwin
open_2:
mov [Scroll1CoordinatX],9
mov [Scroll2CoordinatY],89
and [number_panel],0
and [number_menu],0
jmp still
no_open:
;<<<<<<<<<<<SAVE>>>>>>>>>>>>
cmp [number_menu],3
jne no_save_
mov al,[save_flag]
test al,al
jz no_save_file
jmp save_enter
no_save_file:
and [number_panel],0
and [number_menu],0
jmp still
no_save_:
;<<<<<<<<<SAVE AS>>>>>>>>>>>
cmp [number_menu],4
jne no_save
savedialog drawwin,save1,save2,file_path
save1:
save_enter:
mov eax,40
mov ebx,100111b
int 0x40
call analizing_picture_to_palette
;eax => number of colors in picture
mov ebx,[PointerToPicture]
mov ecx,[PointerToEditBufer]
mov edx,[PointerToPalette]
mov esi,[Picture_SizeX]
mov edi,[Picture_SizeY]
call coding_bmp
mov eax,file_path
mov ecx,ebx
mov ebx,[PointerToEditBufer]
push eax
push ebx
push ecx
call save_file
mov [save_flag],1
and [number_panel],0
and [number_menu],0
call drawwin
jmp still
save2:
and [number_panel],0
and [number_menu],0
jmp still
no_save:
;<<<<<<EXIT>>>>>>>
cmp [number_menu],5
jne no_exit_program
mov eax,-1
int 0x40
no_exit_program:
no_file:
;|||||||||||||||||||||||||||||EDIT|||||||||||||||||||||||||
;<<<<<<<<<<UNDO>>>>>>>>>>
cmp [number_panel],6
jne no_edit
cmp [number_menu],1
jne no_undo
cmp [number_undo],1
jne no_one____
mov esi,[PointerToCopyPicture]
no_one____:
cmp [number_undo],2
jne no_two____
mov esi,[PointerToCopyPicture2]
no_two____:
mov edi,[PointerToPicture]
mov ecx,[Picture_SizeX]
imul ecx,[Picture_SizeY]
lea ecx,[ecx+ecx*2]
add ecx,4
shr ecx,2
cld
rep movsd
call MovePictureToWorkScreen
dec [number_undo]
jnz no_null_undo
mov [number_undo],1
no_null_undo:
and [number_panel],0
and [number_menu],0
jmp still
no_undo:
;<<<<<<<<<<COPY>>>>>>>>>>
cmp [number_menu],2
jne no_copy
cmp [instrument_used],1
jne no_copy
cmp [Activate_instrument],0
jne no_copy
mov eax,[OldX]
mov ebx,[OldY]
cmp eax,[rectangular_shade_x]
jl no_remove_x_copy
mov ecx,[rectangular_shade_x]
mov [OldX],ecx ; OldX <-----> rectangulare_shade_x
mov [rectangular_shade_x],eax
no_remove_x_copy:
cmp ebx,[rectangular_shade_y]
jl no_remove_y_copy
mov ecx,[rectangular_shade_y]
mov [OldY],ecx ; OldY <-----> rectangulare_shade_y
mov [rectangular_shade_y],ebx
no_remove_y_copy:
mov eax,[OldX]
mov ebx,[OldY]
mov ecx,[rectangular_shade_x]
mov edx,[rectangular_shade_y]
inc eax
inc ebx
dec ecx
dec edx
mov [x],eax
mov [y],ebx
mov esi,eax
mov edi,ebx
mov [Dx_],1
mov [Dy_],1
sub ecx,eax
jnz no_signum_fill_r_x_copy
mov [Dx_],-1
no_signum_fill_r_x_copy:
sub edx,ebx
jnz no_signum_fill_r_y_copy
mov [Dy_],-1
no_signum_fill_r_y_copy:
mov ebx,[rectangular_shade_y]
sub ebx,edi
mov edx,[PointerToEditBufer]
mov [y],edi
loop_fill_rectangle_y_copy:
mov [x],esi
loop_fill_rectangle_x_copy:
push esi
push edi
mov eax,[PointerToPicture]
mov ebx,[Picture_SizeX]
mov esi,[x]
mov edi,[y]
call GetColorOfPixel
mov [edx],ax
shr eax,16
mov [edx+2],al
pop edi
pop esi
add edx,3
mov eax,[x]
add eax,[Dx_]
mov [x],eax
cmp eax,[rectangular_shade_x]
jl loop_fill_rectangle_x_copy
mov eax,[y]
add eax,[Dy_]
mov [y],eax
cmp eax,[rectangular_shade_y]
jl loop_fill_rectangle_y_copy
call MovePictureToWorkScreen
and [number_panel],0
and [number_menu],0
mov [DrawSprite_flag],1
jmp still
no_copy:
;<<<<<<<<<<PASTE>>>>>>>>
cmp [number_menu],3
jne no_paste
cmp [instrument_used],1
jne no_paste
cmp [Activate_instrument],0
jne no_paste
mov eax,[OldX]
mov ebx,[OldY]
cmp eax,[rectangular_shade_x]
jl no_remove_x_paste
mov ecx,[rectangular_shade_x]
mov [OldX],ecx ; OldX <-----> rectangulare_shade_x
mov [rectangular_shade_x],eax
no_remove_x_paste:
cmp ebx,[rectangular_shade_y]
jl no_remove_y_paste
mov ecx,[rectangular_shade_y]
mov [OldY],ecx ; OldY <-----> rectangulare_shade_y
mov [rectangular_shade_y],ebx
no_remove_y_paste:
mov eax,[OldX]
mov ebx,[OldY]
mov ecx,[rectangular_shade_x]
mov edx,[rectangular_shade_y]
inc eax
inc ebx
dec ecx
dec edx
mov [x],eax
mov [y],ebx
mov esi,eax
mov edi,ebx
mov [Dx_],1
mov [Dy_],1
sub ecx,eax
jnz no_signum_fill_r_x_paste
mov [Dx_],-1
no_signum_fill_r_x_paste:
sub edx,ebx
jnz no_signum_fill_r_y_paste
mov [Dy_],-1
no_signum_fill_r_y_paste:
mov edx,[PointerToEditBufer]
mov [y],edi
loop_fill_rectangle_y_paste:
mov [x],esi
loop_fill_rectangle_x_paste:
push esi
push edi
mov ecx,[edx]
and ecx,0xffffff ;color
mov eax,[PointerToPicture]
mov ebx,[Picture_SizeX]
mov esi,[x]
mov edi,[y]
call PutPixel
pop edi
pop esi
add edx,3
mov eax,[x]
add eax,[Dx_]
mov [x],eax
cmp eax,[rectangular_shade_x]
jl loop_fill_rectangle_x_paste
mov eax,[y]
add eax,[Dy_]
mov [y],eax
cmp eax,[rectangular_shade_y]
jl loop_fill_rectangle_y_paste
call MovePictureToWorkScreen
and [number_panel],0
and [number_menu],0
mov [Paste_flag],1
jmp still
no_paste:
;<<<<<<<<<<CUT>>>>>>>>>>
cmp [number_menu],4
jne no_cut
cmp [instrument_used],1
jne no_cut
cmp [Activate_instrument],0
jne no_cut
mov eax,[OldX]
mov ebx,[OldY]
cmp eax,[rectangular_shade_x]
jl no_remove_x_cut
mov ecx,[rectangular_shade_x]
mov [OldX],ecx ; OldX <-----> rectangulare_shade_x
mov [rectangular_shade_x],eax
no_remove_x_cut:
cmp ebx,[rectangular_shade_y]
jl no_remove_y_cut
mov ecx,[rectangular_shade_y]
mov [OldY],ecx ; OldY <-----> rectangulare_shade_y
mov [rectangular_shade_y],ebx
no_remove_y_cut:
mov eax,[OldX]
mov ebx,[OldY]
mov ecx,[rectangular_shade_x]
mov edx,[rectangular_shade_y]
inc eax
inc ebx
dec ecx
dec edx
mov [x],eax
mov [y],ebx
mov esi,eax
mov edi,ebx
mov [Dx_],1
mov [Dy_],1
sub ecx,eax
jnz no_signum_fill_r_x
mov [Dx_],-1
no_signum_fill_r_x:
sub edx,ebx
jnz no_signum_fill_r_y
mov [Dy_],-1
no_signum_fill_r_y:
mov [y],edi
loop_fill_rectangle_y:
mov [x],esi
loop_fill_rectangle_x:
push esi
push edi
mov eax,[PointerToPicture]
mov ebx,[Picture_SizeX]
mov ecx,dword 0xffffff
mov esi,[x]
mov edi,[y]
call PutPixel
pop edi
pop esi
mov eax,[x]
add eax,[Dx_]
mov [x],eax
cmp eax,[rectangular_shade_x]
jl loop_fill_rectangle_x
mov eax,[y]
add eax,[Dy_]
mov [y],eax
cmp eax,[rectangular_shade_y]
jl loop_fill_rectangle_y
call MovePictureToWorkScreen
and [number_panel],0
and [number_menu],0
jmp still
no_cut:
;<<<<<<CLEARE ALL>>>>>>
cmp [number_menu],5
jne no_cleare_all
call cleare_work_arrea
call MovePictureToWorkScreen
and [number_panel],0
and [number_menu],0
jmp still
no_cleare_all:
;<<<<<<TO ALLOCATE ALL>>>>>>
cmp [number_menu],6
jne no_to_allocate_all
mov [OldX],1
mov [OldY],1
mov eax,[Picture_SizeX]
mov ebx,[Picture_SizeY]
dec eax
dec ebx
mov [rectangular_shade_x],eax
mov [rectangular_shade_y],ebx
mov [instrument_used],1
mov [Activate_instrument],1
mov [Current_instrument],30
mov [crossing],0
and [number_panel],0
and [number_menu],0
;call TakeButtonInstruments
;call MovePictureToWorkScreen
jmp still
no_to_allocate_all:
no_edit:
jmp still
ret

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

View File

@ -0,0 +1,56 @@
;-----------------------------------------------------------
;-------analizing picture to palette------------------------
;-----------------------------------------------------------
analizing_picture_to_palette:
mov eax,[Picture_SizeX]
mov ebx,[Picture_SizeY]
imul eax,ebx
mov ecx,eax
mov edx,[PointerToPicture]
mov esi,1 ;counter colors in palette
;put firs color of picture how one color in palette
mov ebp,[PointerToPalette]
mov eax,[edx]
and eax,0xffffff
mov [ebp],eax
analizing_to_palette:
mov eax,[edx]
and eax,0xffffff
mov edi,esi
mov ebp,[PointerToPalette]
next_color_in_palette:
mov ebx,[ebp]
and ebx,0xffffff
cmp ebx,eax ;this is color have in palette
je exit_loop_palette
add ebp,4
dec edi
jnz next_color_in_palette
inc esi
cmp esi,256 ;256 colors
ja more_than_256_colors
mov ebp,[PointerToPalette]
mov ebx,esi
dec ebx
shl ebx,2
add ebp,ebx
mov [ebp],ax
shr eax,16
mov [ebp+2],al
exit_loop_palette:
add edx,3
dec ecx
jnz analizing_to_palette
more_than_256_colors:
mov eax,esi
ret

View File

@ -0,0 +1,133 @@
;------------------------------------------------
;--------Palette with 256 colors-----------------
;------------------------------------------------
;three bytes for one color
palitra:
db 0,0,0,0,0,0,128,0
db 0,128,0,0,0,128,128,0
db 128,0,0,0,128,0,128,0
db 128,128,0,0,128,128,128,0
db 192,220,192,0,240,202,166,0
db 170,63,42,0,255,63,42,0
db 0,95,42,0,85,95,42,0
db 170,95,42,0,255,95,42,0
db 0,127,42,0,85,127,42,0
db 170,127,42,0,255,127,42,0
db 0,159,42,0,85,159,42,0
db 170,159,42,0,255,159,42,0
db 0,191,42,0,85,191,42,0
db 170,191,42,0,255,191,42,0
db 0,223,42,0,85,223,42,0
db 170,223,42,0,255,223,42,0
db 0,255,42,0,85,255,42,0
db 170,255,42,0,255,255,42,0
db 0,0,85,0,85,0,85,0
db 170,0,85,0,255,0,85,0
db 0,31,85,0,85,31,85,0
db 170,31,85,0,255,31,85,0
db 0,63,85,0,85,63,85,0
db 170,63,85,0,255,63,85,0
db 0,95,85,0,85,95,85,0
db 170,95,85,0,255,95,85,0
db 0,127,85,0,85,127,85,0
db 170,127,85,0,255,127,85,0
db 0,159,85,0,85,159,85,0
db 170,159,85,0,255,159,85,0
db 0,191,85,0,85,191,85,0
db 170,191,85,0,255,191,85,0
db 0,223,85,0,85,223,85,0
db 170,223,85,0,255,223,85,0
db 0,255,85,0,85,255,85,0
db 170,255,85,0,255,255,85,0
db 0,0,127,0,85,0,127,0
db 170,0,127,0,255,0,127,0
db 0,31,127,0,85,31,127,0
db 170,31,127,0,255,31,127,0
db 0,63,127,0,85,63,127,0
db 170,63,127,0,255,63,127,0
db 0,95,127,0,85,95,127,0
db 170,95,127,0,255,95,127,0
db 0,127,127,0,85,127,127,0
db 170,127,127,0,255,127,127,0
db 0,159,127,0,85,159,127,0
db 170,159,127,0,255,159,127,0
db 0,191,127,0,85,191,127,0
db 170,191,127,0,255,191,127,0
db 0,223,127,0,85,223,127,0
db 170,223,127,0,255,223,127,0
db 0,255,127,0,85,255,127,0
db 170,255,127,0,255,255,127,0
db 0,0,170,0,85,0,170,0
db 170,0,170,0,255,0,170,0
db 0,31,170,0,85,31,170,0
db 170,31,170,0,255,31,170,0
db 0,63,170,0,85,63,170,0
db 170,63,170,0,255,63,170,0
db 0,95,170,0,85,95,170,0
db 170,95,170,0,255,95,170,0
db 0,127,170,0,85,127,170,0
db 170,127,170,0,255,127,170,0
db 0,159,170,0,85,159,170,0
db 170,159,170,0,255,159,170,0
db 0,191,170,0,85,191,170,0
db 170,191,170,0,255,191,170,0
db 0,223,170,0,85,223,170,0
db 170,223,170,0,255,223,170,0
db 0,255,170,0,85,255,170,0
db 170,255,170,0,255,255,170,0
db 0,0,212,0,85,0,212,0
db 170,0,212,0,255,0,212,0
db 0,31,212,0,85,31,212,0
db 170,31,212,0,255,31,212,0
db 0,63,212,0,85,63,212,0
db 170,63,212,0,255,63,212,0
db 0,95,212,0,85,95,212,0
db 170,95,212,0,255,95,212,0
db 0,127,212,0,85,127,212,0
db 170,127,212,0,255,127,212,0
db 0,159,212,0,85,159,212,0
db 170,159,212,0,255,159,212,0
db 0,191,212,0,85,191,212,0
db 170,191,212,0,255,191,212,0
db 0,223,212,0,85,223,212,0
db 170,223,212,0,255,223,212,0
db 0,255,212,0,85,255,212,0
db 170,255,212,0,255,255,212,0
db 85,0,255,0,170,0,255,0
db 0,31,255,0,85,31,255,0
db 170,31,255,0,255,31,255,0
db 0,63,255,0,85,63,255,0
db 170,63,255,0,255,63,255,0
db 0,95,255,0,85,95,255,0
db 170,95,255,0,255,95,255,0
db 0,127,255,0,85,127,255,0
db 170,127,255,0,255,127,255,0
db 0,159,255,0,85,159,255,0
db 170,159,255,0,255,159,255,0
db 0,191,255,0,85,191,255,0
db 170,191,255,0,255,191,255,0
db 0,223,255,0,85,223,255,0
db 170,223,255,0,255,223,255,0
db 85,255,255,0,170,255,255,0
db 255,204,204,0,255,204,255,0
db 255,255,51,0,255,255,102,0
db 255,255,153,0,255,255,204,0
db 0,127,0,0,85,127,0,0
db 170,127,0,0,255,127,0,0
db 0,159,0,0,85,159,0,0
db 170,159,0,0,255,159,0,0
db 0,191,0,0,85,191,0,0
db 170,191,0,0,255,191,0,0
db 0,223,0,0,85,223,0,0
db 170,223,0,0,255,223,0,0
db 85,255,0,0,170,255,0,0
db 0,0,42,0,85,0,42,0
db 170,0,42,0,255,0,42,0
db 0,31,42,0,85,31,42,0
db 170,31,42,0,255,31,42,0
db 0,63,42,0,170,174,160,0
db 240,251,255,0,164,160,160,0
db 128,128,128,0,0,0,255,0
db 0,255,0,0,0,255,255,0
db 255,0,0,0,255,0,255,0
db 255,255,0,0xff,0xff,0xff,0xff

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -0,0 +1,93 @@
;**********************************************************
;------------------TEXT DATA-------------------------------
;**********************************************************
name_of_program db 'Graphics editor <<ANIMAGE>> V 1.1',0
mouse_pos_x db 'X='
mouse_pos_y db 'Y='
new_text1 db 'PICTURE SIZE X'
new_text2 db 'PICTURE SIZE Y'
ok_text db 'OK'
panel_text: dd 15,24,4
db 'FILE'
dd 65,24,4
db 'EDIT'
dd 115,24,11
db 'INSTRUMENTS'
dd 235,24,7
db 'PALETTE'
dd 315,24,7
db 'FILTERS'
dd 395,24,9
db 'ANIMATION'
dd 495,24,4
db 'HELP'
menu_text_en:
dd menu_text7
dd menu_text6
dd menu_text5
dd menu_text4
dd menu_text3
dd menu_text2
dd menu_text1
dd 0,0,0
menu_rectangles: dd 485,36,120,100
dd 385,36,120,100
dd 295,36,120,100
dd 225,36,120,100
dd 105,36,120,100
dd 55,36,120,100;20
dd 5,36,120,100
menu_text1:
dd 15,45,3
db 'NEW'
dd 15,65,4
db 'OPEN'
dd 15,85,4
db 'SAVE'
dd 15,105,7
db 'SAVE AS'
dd 15,125,4
db 'EXIT'
menu_text2:
dd 65,45,4
db 'UNDO'
dd 65,65,4
db 'COPY'
dd 65,85,5
db 'PASTE'
dd 65,105,3
db 'CUT'
dd 65,125,13
db 'CLEARE SCREEN'
;dd 95,145,12
;db 'ALLOCATE ALL'
menu_text3:
dd 115,45,3
db 0,0,0;'PENCIL'
dd 115,65,3
db 0,0,0;'BRUSHES'
dd 115,85,3
db 0,0,0;'COLORS'
dd 115,105,3
db 0,0,0;'PIPETKA'
menu_text4:
dd 235,45,1
db 0,0,0
menu_text5:
dd 315,45,1
db 0,0,0
menu_text6:
dd 395,45,1
db 0,0,0
menu_text7:
dd 495,45,1
db 0,0,0,0
menu_counters:
dd 1,1,1,1,1,5,5

View File

@ -0,0 +1,540 @@
;-------------------------------------------------
;-----interraction panel with user----------------
;-------------------------------------------------
panel_interraction:
;>>>>>>>>>>>>>>>>>>>>>>>>>>
mov eax,18
mov ebx,14
;int 0x40
and [Panel_flag],0
;collision with text on panel
next_columnus_text:
mov eax,[edi]
mov ebx,[edi+4]
sub eax,10
sub ebx,3
mov [Icon_text_x],eax
mov [Icon_text_y],ebx
mov esi,[edi+8]
imul esi,10
mov [button_menu_size_x],esi
mov [button_menu_size_y],dword 13
mov esi,[edi+8]
add edi,4*3
add edi,esi
mov ecx,[MouseX]
mov edx,[MouseY]
push edi
mov edi,[button_menu_size_y]
mov esi,[button_menu_size_x]
call columnus
pop edi
mov esi,7
test eax,eax
jz no_columnus_text
mov esi,1
mov [Panel_flag],1
call GetMouseClick
test eax,eax
jz no_mouse_pressed
mov eax,18
mov ebx,14
;int 0x40
call print_panel_menu
no_mouse_pressed:
no_columnus_text:
mov eax,[Icon_text_x]
mov ebx,[Icon_text_y]
mov ecx,[button_menu_size_x] ;-------------------------
mov edx,[button_menu_size_y]
call draw_volume_rectangle
push [counter]
push edi
mov [counter],7
mov edi,panel_text
call print_panel_text
pop edi
pop [counter]
dec [counter]
jnz next_columnus_text
ret
;---------------------------------------------------------
;-----draw panel menu(main engin of panel)----------------
;---------------------------------------------------------
print_panel_menu:
push [counter]
;delit main buttons(some time)
mov [counter],10
next_icon_delit1:
mov eax,8
mov edx,[counter]
add edx,11100000000000000000000000000000b
int 0x40
inc [counter]
cmp [counter],30
jl next_icon_delit1
;delit buttons of brushes
mov [counter],40
next_icon_delit2:
mov eax,8
mov edx,[counter]
add edx,11100000000000000000000000000000b
int 0x40
inc [counter]
cmp [counter],45
jl next_icon_delit2
;delit buttons of zoom
mov [counter],45
next_icon_delit3:
mov eax,8
mov edx,[counter]
add edx,11100000000000000000000000000000b
int 0x40
inc [counter]
cmp [counter],50
jl next_icon_delit3
;delit buttons of palette
mov eax,8
mov edx,51
add edx,11100000000000000000000000000000b
int 0x40
;delit buttons of color
mov eax,8
mov edx,52
add edx,11100000000000000000000000000000b
int 0x40
pop [counter]
push esi
mov esi,[counter]
dec esi
shl esi,4
mov eax,[menu_rectangles+esi]
mov ebx,[menu_rectangles+esi+4]
mov ecx,[menu_rectangles+esi+8]
mov edx,[menu_rectangles+esi+12]
mov esi,1
mov [menu_coordinat_x],eax
mov [menu_size_x],ecx
call draw_volume_rectangle
pop esi
calculate_counter_menu:
;calculate menu counter
mov eax,[counter]
dec eax
shl eax,2
mov ebx,[menu_counters+eax]
mov [counter_menu],ebx
call GetMouseCoordinats
and [menu_counter],0
push esi
push edi
;ᣫ ¦¨¢ ­¨¥  ­¨¬ æ¨¨ >>>>>>>>>>>>>>>>>>
mov eax,18
mov ebx,14
;int 0x40
menu_loop:
mov eax,[menu_coordinat_x]
mov ebx,36
mov ecx,[MouseX]
mov edx,[MouseY]
mov esi,[menu_size_x]
mov edi,18
add ebx,[menu_counter]
add eax,2
sub esi,3
inc ebx
call columnus
mov esi,7
test eax,eax
jz no_columnus_menu_text
mov esi,1
no_columnus_menu_text:
mov eax,[menu_coordinat_x]
mov ebx,36
mov ecx,[menu_size_x]
mov edx,18
add ebx,[menu_counter]
add eax,2
sub ecx,3
inc ebx
call draw_volume_rectangle
add [menu_counter],20
dec [counter_menu]
jnz menu_loop
;print menu text
push [counter]
mov esi,[counter]
dec esi
shl esi,2
mov edi,[menu_text_en+esi]
mov eax,[menu_counters+esi]
mov [counter],eax
call print_panel_text
pop [counter]
pop edi
pop esi
menu_still:
mov eax,10
int 0x40
mov eax,2
int 0x40
mov eax,17
int 0x40
call GetMouseClick
test eax,eax
jz calculate_counter_menu
call GetMouseCoordinats
;calculate menu counter
mov eax,[counter]
dec eax
shl eax,2
mov ebx,[menu_counters+eax]
mov [counter_menu],ebx
and [menu_counter],0
and [counter_11],0
push esi
push edi
menu_loop2:
mov eax,[menu_coordinat_x]
mov ebx,36
mov ecx,[MouseX]
mov edx,[MouseY]
mov esi,[menu_size_x]
mov edi,18
add ebx,[menu_counter]
add eax,2
sub esi,3
inc ebx
call columnus
inc [counter_11]
test eax,eax
jz no_columnus_menu_text2
mov esi,[counter_11]
mov [number_menu],esi
no_columnus_menu_text2:
add [menu_counter],20
dec [counter_menu]
jnz menu_loop2
pop edi
pop esi
mov eax,5
mov ebx,15
int 0x40
push [counter]
pushad
call drawwin
popad
pop [counter]
mov eax,[counter]
mov [number_panel],eax
call TakeInstruments
jmp still
;---------------------------------------------------------
;------print mouse position on panel----------------------
;---------------------------------------------------------
PrintMousePos:
pushad
mov eax,[Window_SizeX]
sub eax,75
mov ebx,20+15+6
mov ecx,52
mov edx,18
mov esi,4
call draw_volume_rectangle
mov eax,[Window_SizeX]
sub eax,75
mov ebx,20+15+6+18+2
mov ecx,52
mov edx,18
mov esi,4
call draw_volume_rectangle
mov eax,[Window_SizeX]
sub eax,70
mov ebx,20+15+6+6
and ecx,0
mov edx,mouse_pos_x
mov esi,2
call print_text
mov eax,[Window_SizeX]
sub eax,70
mov ebx,20+15+6+6+18+1
and ecx,0
mov edx,mouse_pos_y
mov esi,2
call print_text
mov eax,47
mov ebx,4*65536
mov ecx,[ScreenX]
add ecx,[PosX]
mov edx,[Window_SizeX]
sub edx,55
shl edx,16
add edx,20+15+6+6
and esi,0
int 0x40
mov eax,47
mov ebx,4*65536
mov ecx,[ScreenY]
add ecx,[PosY]
mov edx,[Window_SizeX]
sub edx,55
shl edx,16
add edx,20+15+6+18+1+6
and esi,0
int 0x40
popad
ret
;----------------------------------------------------------
;---------------draw panel in window of program------------
;----------------------------------------------------------
draw_panel:
mov eax,5
mov ebx,20
mov ecx,[Window_SizeX]
mov edx,15
mov esi,6
sub ecx,10
call draw_volume_rectangle
;mov eax,5
;mov ebx,20
;mov ecx,[Window_SizeX]
;mov edx,15
;mov esi,6
;sub ecx,10
;call draw_volume_rectangle
mov eax,5
mov ebx,20+15+1
mov ecx,[Window_SizeX]
mov edx,50
mov esi,1
sub ecx,10
call draw_volume_rectangle
mov eax,5
mov ebx,20+15+1+50+1
mov ecx,[Window_SizeX]
mov edx,[Window_SizeY]
mov esi,1
sub ecx,10+20
sub edx,20+15+1+50+1+5+20
call draw_volume_rectangle
mov eax,5
mov ebx,[Window_SizeY]
mov ecx,[Window_SizeX]
mov edx,20+10
mov esi,3
sub ecx,30
sub ebx,25+10
call draw_volume_rectangle
mov eax,[Window_SizeX]
mov ebx,20+15+1+49+2
mov ecx,20+10
mov edx,[Window_SizeY]
mov esi,3
sub eax,25+10
sub edx,20+15+1+49+5+20
call draw_volume_rectangle
mov eax,[Window_SizeX]
mov ebx,[Window_SizeY]
mov ecx,20+10
mov edx,20+10
mov esi,6
sub eax,25+10
sub ebx,25+10
call draw_volume_rectangle
;mov eax,445
;mov ebx,20+15+6
;mov ecx,37
;mov edx,37
;mov esi,4
;call draw_volume_rectangle
ret
;----------------------------------------------------------
;----------print text on the panel and menu----------------
;----------------------------------------------------------
print_panel_text:
next_panel_text:
mov eax,[edi]
mov ebx,[edi+4]
;xor ecx,ecx
mov ecx,0x10000000
mov edx,edi
add edx,12
mov esi,[edi+8]
add edi,esi
add edi,3*4
push edi
call print_text
pop edi
dec [counter]
jnz next_panel_text
ret
;----------------------------------------------------------
;------------draw lines of scoll---------------------------
;----------------------------------------------------------
draw_scrollers:
mov edi,[CounterX]
mov eax,[Scroll1CoordinatX]
mov ebx,[Window_SizeY]
sub ebx,22+10
mov ecx,[Window_SizeX]
sub ecx,10+5+20+10+1
mov edx,14+10
mov esi,1
mov [Scroll1CoordinatX],eax
mov [Scroll1CoordinatY],ebx
mov [Scroll1MaxSizeY],edx
mov [Scroll1MaxSizeX],ecx
imul ecx,edi
push eax
push ebx
push edx
mov eax,ecx
mov ebx,[Picture_SizeX]
cdq
idiv ebx
mov ecx,eax
pop edx
pop ebx
pop eax
mov [Scroll1SizeX],ecx
mov edi,[Scroll1MaxSizeX]
sub edi,ecx
mov [Scroll1FreeX],edi
call draw_volume_rectangle
mov eax,[Window_SizeX]
sub eax,22+10
mov ebx,[Scroll2CoordinatY]
mov ecx,14+10
mov edx,[Window_SizeY]
sub edx,20+15+1+49+10+20+11
mov esi,1
mov [Scroll2CoordinatX],eax
mov [Scroll2CoordinatY],ebx
mov [Scroll2MaxSizeX],ecx
mov [Scroll2MaxSizeY],edx
imul edx,[CounterY]
push eax
push ebx
mov eax,edx
mov ebx,[Picture_SizeY]
cdq
idiv ebx
mov edx,eax
pop ebx
pop eax
mov [Scroll2SizeY],edx
mov edi,[Scroll2MaxSizeY]
sub edi,edx
mov [Scroll2FreeY],edi
call draw_volume_rectangle
ret
ret
button_menu_size_x dd 0
button_menu_size_y dd 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

View File

@ -1,172 +0,0 @@
*******************************English version*********************************
Hi! (:-) )
1) My name is Andrey(or an english Andrew) Ignatyev( nik andrew_programmer).
2) ANIMAGE(Animation and Image or animation of image) is graphics editor written
in pure assembler for Kolibri operation system.
3) My email polynki@mail.ru You can send my some quation or help my :) with deve-
lopment(for example write decoder or coder some graphics formats).
Offten I'm be a forum meos.sysbin.com
Sorry,but documantation only an rassian,because i'm can a litl speake an
english.
But i'm done interface of program anderstandly.
********************************Russian version********************************
*******************************************************************************
*********************************…„…<EFBFBD>ˆ**************************************
*******************************************************************************
‡¤à ¢áâ¢ã©â¥.
1) Œ¥­ï §®¢ãâ €­¤à¥© ˆ£­ â쥢(­¨ª andrew_programmer).
2) ANIMAGE íâ® £à ä¨ç¥áª¨© । ªâ®à ­ ¯¨á ­­ë© ­  ç¨á⮬  áᥬ¡«¥à¥ ¤«ï ®¯¥à -
樮­­®© á¨áâ¥¬ë Š®«¨¡à¨(«ãçè ï ®¯¥à æ¨®­­ ï á¨á⥬  ¢ ¬¨à¥).
3) ‚ë ¬®¦¥â¥ ¯®áë« âì ¬­¥ ¢®¯à®áë ¨«¨ ¯®¬®çì ¬­¥ ¢ ࠧࠡ®âª¥-­ ¯à¨¬¥à ­ ¯¨á âì
¤¥ª®¤¥à ¨«¨ ª®¤¥à ª ª®£®-­¨¡ã¤ì £à ä¨ç¥áª®£® ä®à¬ â .„«ï ⮣® çâ®¡ë ­ ¯¨á âì
¤¥ª®¤¥à ¢ ¬ ¢®®¡é¥ ­¥ ­ ¤® §­ âì ª ª à ¡®â ¥â £à ä¨ç¥áª¨© । ªâ®à.…¤¨­á⢥­­®¥
çâ® ¢ ¬ ­¥®¡å®¤¨¬® §­ âì - íâ® â®,çâ® ¢ esi ­ å®¤¨âìáï 㪠§ â¥«ì ­  à á¯ ª®¢ë¢ -
¥¬ë© ä ©«,  ¢ edi 㪠§ â¥«ì ­  ®¡« áâì ªã¤  ­ã¦­® à á¯ ª®¢ë¢ âì ä ©«.„«ï à ¡®âë
¤¥ª®¤¥à /ª®¤¥à  ç¥à¥§ eax ¯¥à¥¤ ¥âáï 㪠§ â¥«ì ­  ®¡« áâì ¢ 64 ª¨«®¡ ©â .
‚ë ¬®¦¥â¥ á¢ï§ âìáï á® ¬­®© ¯® í«¥ªâà®­­®© ¯®ç⥠polynki@mail.ru .ˆ ¥é¥ ï ç áâ®
¡ë¢ î ­  ä®à㬥 meos.sysbin.com
******************************************************************************
****************—⮠㬥¥â ¤¥« âì £à ä¨ç¥áª¨© । ªâ®à*************************
******************************************************************************
ˆ§ ¨ª®­®ª ­  ¯ ­¥«¨ £à ä¨ç¥áª®£® । ªâ®à  ­¥à ¡®â îâ ⮫쪮: ¢ë¤¥«¥­¨¥ ®¡« áâ¨
¯à®¨§¢®«ì­®© ä®à¬ë(¯®ª ç⮠ॠ«¨§®¢ ­  à ¡®â  ⮫쪮 á ¯àאַ㣮«ì­®© ®¡« áâìî),
¢ë¢®¤ ⥪áâ (­¥®¡å®¤¨¬® ¯à®¤ã¬ âì à ¡®âã èà¨ä⮢),£à ¤¨¥­â­ ï § «¨¢ª (­ã¦­® ¯à®
¤ã¬ âì à §«¨ç­ë¥ ¢ à¨ ­âë § «¨¢®ª),¨­áâà㬥­â ïમáâì(¢®§¬®¦­® ¥£® ­ã¦­® ¢ª«îç¨â
¢ ¯®¤¬¥­î 䨫ìâàë),¯®¢®à®â ª à⨭ª¨ ­  ¯à®¨§¢®«ì­ë© 㣮«(§­ ç®ª ¯®«ãªà㣠 á®
áâ५ª®©).‚áñ ®áâ «ì­®¥ à ¡®â ¥â.
⥪á⮢®¬ ¬¥­î ¯®«­®áâìî à ¡®â ¥â ¬¥­î FILE ¨ EDIT. ¬¥­î EDIT ᥩç á 5 ¯ã­ªâ®¢,
­® á® ¢à¥¬¥­¥¬ ¯®ï¢ïâìáï ¤à㣨¥ ¯®¤¯ã­ªâë.Žáâ «ì­ë¥ ¬¥­î ­¥ ॠ«¨§®¢ ­ë.
************************************************************************
<<<<<<<<<<<<<<<<<<„®ªã¬¥­â æ¨ï ª £à ä¨ç¥áª®¬ã । ªâ®àã>>>>>>>>>>>>>>>>>
************************************************************************
***********************⥪á⮢ ï ¯ ­¥«ì ¬¥­î****************************
Œ¥­î FILE:
NEW - ᮧ¤ ­¨¥ à ¡®ç¥© ®¡« á⨠¤«ï à¨á®¢ ­¨ï.‚ë ¢¢®¤¨â¥ ¢ ¯®«¥ X à §¬¥à ª à⨭-
ª¨ ¯® X,  ¢ ¯®«¥ Y à §¬¥à ª à⨭ª¨ ¯® Y.<EFBFBD>¥§ ¡ë¢ ©â¥ ¯®á«¥ ­ ¡®à  ª ¦¤®© æ¨äàë ¢
ᮮ⢥âáâ¢ãî饬 ¯®«¥,­ ¦¨¬ âì ª« ¢¨èã ‚‚Ž„.<EFBFBD>®á«¥ § ¤ ­¨ï à §¬¥à  ª à⨪¨ ­ ¦¬¨â¥
¬ë誮© ª­®¯ªã OK. ¢ á ¯®ï¢¨âìáï à ¡®ç ï ®¡« áâì § ¤ ­­ë¬ à §¬¥à®¬.
OPEN - ®âªàë⨥ ä ©«  á ¤¨áª .<EFBFBD>®á«¥ ­ ¦ â¨ï ­  íâã ª­®¯ªã ¢ë 㢨¤¥ ®ª­® ¬¨­¨
¡à ã§¥à  ¢ ª®â®à®¬ ¡ã¤ã⠮⮡ࠦ¥­ë ¨¬¥î騥áï ã ¢ á ¢ á¨á⥬¥ ¤¨áª®¢ë¥ ãáâன-
á⢠(¥á«¨ Š®«¨¡à¨ ¨å ®¡­ à㦨â). ¯®¬®éìî í⮣® ¡à ã§¥à  § å®¤¨â¥ ­  ¤¨áª ¨
¢ë¡¨à ¥â¥ ­ã¦­ë© ¢ ¬ £à ä¨ç¥áª¨© ¢ ©«.<EFBFBD>  ¤ ­­ë© ¬®¬¥­â £à ä¨ç¥áª¨© । ªâ®à
¬®¦¥â ç¨â âì ä ©«ë £à ä¨ç¥áª¨å ä®à¬ â®¢ BMP ¨ GIF.…᫨ ®¡ê¥¬ ä ©«  ¤®áâ â®ç­®
¡®«ì让(­¥áª®«ìª® ¬¥£ ¡ ©â ¨ ¡®«¥¥),â® ä ©« ®âªà뢠¥âáï ­¥áà §ã   ç¥à¥§ ­¥á-
ª®«ìª® ᥪ㭤.
SAVE AS- á®åà ­¥­¨¥ ä ©«  ­  ¤¨áª®¢®¬ ãáâனá⢥.<EFBFBD>®á«¥ ­ ¦ â¨ï ­  íâã ª­®¯ªã
¯®ï¢«ï¥âáï ®ª­® ¬¨­¨¡à ã§¥à ,®¯¨á ­­®£® ¢ëè¥.‚ë â ª¦¥ ¢ë¡¨à ¥â¥ á ¯®¬®éî
¡à ã§¥à  ­ã¦­ë© ¢ ¬ ª â «®£ ¨ 饫ª ¥â¥ ­  ¯®«®áªã á ¤¥à¨ªâ®à¨¥ ª ä ©«ã,ª®â®-
à ï ®â®¡à ¦ ¥âáï á­¨§ã ¡à ã§¥à .<EFBFBD>¥à¥¤¢¨­ã¢ ªãàá®à ¢ ª®­¥æ áâ®à®ª¨ á ª â «®£®¬,
¢ë ¢¢®¤¨â¥ ¨¬ï ä ©«  á à áè¨à¥­¨¥¬.
;-----------------------------------------------------------------------------
<EFBFBD>  ¤ ­­ë© ¬®¬¥­â ॠ«¨§®¢ ­® ¯®«­®æ¥­­®¥
á®åà ­¥­¨¥ ¨ ç⥭¨¥ ä®à¬ â  BMP(24,8,4,1 ¡¨â ­  ¯¨ªá¥«ì).
;-----------------------------------------------------------------------------
SAVE - íâ  ®¯æ¨ï ¨á¯®«ì§ã¥âáï ¢ ⮬ á«ãç ¥,ª®£¤  ä ©« ¡ë« á®åà ­¥­ á ¯®¬®-
éêî SAVE AS.‚ è ä ©« á®åà ­ï¥âáï á ⥬ ¦¥ ¨¬¥­¥¬ ¨ ¢â®¬ ¦¥ ª â «®£¥,ª®â®àë© ¢ë
¢¢¥«¨ à ­¥¥,¨á¯®«ì§ãï SAVE AS.
EXIT - íâ® ª­®¯ª  ¢ë室  ¨§ ¯à®£à ¬¬ë.Ž­  ¯à®¤ã¡«¨à®¢ ­  ª« ¢¨è¥© ESC ­  ª« ¢¨-
 âãà¥.
Œ¥­î EDIT:
UNDO - ®â¬¥­  ¤¥©á⢨ï.<EFBFBD>â  ®¯æ¨ï ¯®§¢®«ï¥â ¤¥« âì ®â¬¥­ã ¯®á«¥¤­¨å ¤¥©á⢨©.<EFBFBD>  ¤ ­
­ë© ¬®¬¥­â ç¨á«® ®âª â®¢ á®áâ ¢«ï¥â ¤¢ .
COPY - ª®¯¨àã¥â ¢ë¤¥«¥­­ãî á ¯®¬®éìî ¨­áâà㬥­â  „…<EFBFBD>ˆ(®­ ­ å®¤¨âìáï ­  ¯ ­¥«¨
¢¢¨¤¥ ¨ª®­ª¨ ¯àאַ㣮«ì­¨ª ,­ à¨á®¢ ­­®£® ¯ã­ªâ¨à­®© «¨­¨¥©) ®¡« áâì ¢ ¡ãä¥à.
PASTE - ¢áâ ¢«ï¥â ᪮¯¨à®¢ ­­ãî ᯮ¬®éìî ¨­áâà㬥­â  COPY ®¡« áâì.
CUT - ¢ë१ ¥â ¢ë¤¥«¥­­ãî ®¡« áâì(®­  áâ ­®¢¨âìáï ¡¥«®©).
CLEARE SCREEN - ®ç¨é ¥â à ¡®çãî ®¡« áâì(®­  áâ ­®¢¨âìáï ¡¥«®©).
******************************ˆŠŽ<EFBFBD>Šˆ ˆ<EFBFBD><EFBFBD>“Œ…<EFBFBD>Ž*******************************
********Š¨áâ¨***************
<EFBFBD>¥à¢ë¥ 5 ¨ª®­®ª ¨§®¡à ¦ îâ 5 ⨯®¢ ª¨á⥩.<EFBFBD>à¨ç¥¬ à §¬¥à ª¨á⨠¢ â®ç­®á⨠ᮮâ-
¢¥âáâ¢ã¥â ⮬ã,ª®â®àë© ¨§®¡à ¦¥­ ­  ¨ª®­ª¥.„«ï à¨á®¢ ­¨ï ª¨áâìî ¢ ¬ ­ã¦­® «¨¡®
­ ¦ âì ­  ¨§®¡à ¦¥­¨¥ ⨯  ª¨áâ¨,«¨¡® ­  á ¬ ¨­áâà㬥­â Šˆ‘’œ,ª®â®àë© ¨§®¡à ¦¥­
¢¢¨¤¥ ஧®¢®£® 㪠§ â¥«ï ¬ëè¨.
******Š à ­¤ è**************
„«ï à¨á®¢ ­¨ï ¨­áâà㬥­â®¬ Š à ­¤ è,¢ ¬ ­ã¦­® 饫ª­ãâì ­  ¨ª®­ª¥ á ¥£® ¨§®¡à ¦¥-
­¨¥¬ ¨ ®­ áࠧ㠦¥ ¡ã¤¥â  ªâ¨¢¨à®¢ ­.ˆ­áâà㬥­â ª à ­¤ è à¨áã¥â ¯® ®â¤¥«ì­ë¬
¯¨ªá¥«ï¬(®­ ­¥§ ¬¥­¨¬ ¯à¨ ᮧ¤ ­¨¨ ¯¨ªá¥«ì­®© £à ä¨ª¨).
******<EFBFBD> «¨âà ***************
<EFBFBD> «¨âà  ¨§®¡à ¦¥­  ­  ¯ ­¥«¨ ¢¢¨¤¥ ¨ª®­ª¨ ¨§ 梥â­ëå ª¢ ¤à â¨ª®¢.„«ï ¢ë¡à 
æ¢¥â  à¨á®¢ ­¨ï ¢ ¬ ­¥®¡å®¤¨¬® 饫ª­ãâì ­  ¨ª®­ª¥, ¨ ¢ ¯®ï¢¨¢è¥©áï ¯ «¨âà¥
¢ë¡à âì ­ã¦­ë© æ¢¥â à¨á®¢ ­¨ï.<EFBFBD> «¨âà  á®¤¥à¦¨â 256 梥⮢.
******<EFBFBD>¨¯¥âª ***************
ˆ­áâà㬥­â <EFBFBD>¨¯¥âª  ¯®§¢®«ï¥â ãáâ ­®¢¨âì 梥⮬ à¨á®¢ ­¨ï 梥â ⮣® ¯¨ªá¥«ï ­ 
ª®â®àë© ¢ë ­ ¢¥«¨ ¯¨¯¥âªã(¯ à¨ í⮬ ­ã¦­® ­ ¦ âì «¥¢ãî ª­®¯ªã ¬ëè¨).
******“¢¥«¨ç¥­¨¥************
ˆ­áâà㬥­â “¢¥«¨ç¥­¨¥ ­¥®¡å®¤¨¬ ¤«ï 㢥«¨ç¥­¨ï ¬ áèâ ¡  ª à⨭ª¨(íâ® ®ç¥­ì
­ã¦­® ¯à¨ ᮧ¤ ­¨¨ ¯¨ªá¥«ì­®© £à ä¨ª¨).<EFBFBD>â®â ¨­áâà㬥­â ¨§®¡à ¦¥­ ¢¢¨¤¥ ç¥âëà¥å
¨ª®­®ª: "x1","x2","x4","x8","x16".—⮠ᮮ⢥âáâ¢ã¥â 㢥«¨ç¥­¨î ¢:
1x1,2x2,4x4,8x8,16x16 à §.
„¥©á⢨¥ íâ¨å ¨ª®­®ª ¯à®¤ã¡«¨à®¢ ­® á ª« ¢¨ âãàë ª« ¢¨è ¬¨:"1","2","4","8","0".
********‹ á⨪**************
ˆ­áâà㬥­â ‹ á⨪ áâ¨à ¥â ç áâì ª à⨪¨,§ ªà è¨¢ ï ¥ñ 梥⮬ ä®­ .<EFBFBD>  á ¬®¬ ¤¥«¥
¨­áâà㬥­ « á⨪ - íâ® ª¨áâì à¨áãîé ï ¡¥«ë¬ 梥⮬.<EFBFBD>®í⮬㠬¥­ïâì ä®à¬ã « á⨪ 
¬®¦­® 饫ª ï ¯® ¨§®¡à ¦¥­¨ï¬ ⨯®¢ ª¨á⥩.
<EFBFBD>  ¯ ­¥«¨ ­ å®¤¨âìáï ¥é¥ ¬­®£® ¤àã£¨å ¨­áâà㬥­â®¢,­® ¯¨á âì ¤®ªã¬¥­â æ¨î ¤ «ìè¥ -
¬­¥ ­¥å®ç¥âìáï,⥬ ¡®«¥¥,çâ® ¥ñ ¬ «® ªâ® ç¨â ¥â(­ à®¤ ¯à¥¤¯®ç¨â ¥â ¨áá«¥¤®¢ âì
¢áñ ¬¥â®¤®¬ â몠).

View File

@ -0,0 +1,352 @@
;----------------------------------------------------------
;--------Move picture from array to work screeen-----------
;----------------------------------------------------------
MovePictureToWorkScreen:
call cleare_screen
mov eax,[Picture_SizeX]
mov ebx,[Picture_SizeY]
mov ecx,[MaxWorkScreen_SizeX]
mov edx,[MaxWorkScreen_SizeY]
mov esi,[k]
imul eax,esi
imul ebx,esi
cmp eax,ecx
jle lab1
mov eax,[MaxWorkScreen_SizeX]
mov [WorkScreen_SizeX],eax
jmp lab2
lab1:
mov [WorkScreen_SizeX],eax
lab2:
cmp ebx,edx
jle lab3
mov ebx,[MaxWorkScreen_SizeY]
mov [WorkScreen_SizeY],ebx
jmp lab4
lab3:
mov [WorkScreen_SizeY],ebx
lab4:
mov eax,[WorkScreen_SizeX]
mov ebx,[k]
cdq
idiv ebx
mov [CounterX],eax
mov eax,[WorkScreen_SizeY]
cdq
idiv ebx
mov [CounterY],eax
mov eax,[WorkScreen_SizeX]
mov ecx,eax
mov ebx,[k]
cdq
idiv ebx
imul eax,ebx
sub ecx,eax
lea ecx,[ecx+ecx*2]
;
mov eax,[WorkScreen_SizeX]
mov ebx,[k]
dec ebx
imul eax,ebx
lea eax,[eax+eax*2]
add eax,ecx
mov [OffsetYWorkScreen],eax
mov ebx,[Picture_SizeX]
mov eax,[CounterX]
sub ebx,eax
lea ebx,[ebx+ebx*2]
mov [OffsetYPicture],ebx
mov eax,[WorkScreen_SizeX]
mov ebx,[k]
sub eax,ebx
lea eax,[eax+eax*2]
mov [OffsetYBigPixel],eax
mov eax,[PosX]
mov ebx,[PosY]
mov ecx,[Picture_SizeX]
imul ecx,ebx
add eax,ecx
lea eax,[eax+eax*2]
add eax,[PointerToPicture]
mov ebx,[ScreenPointer]
mov edi,[CounterY]
;if size of picture natural(mastab is 1) than move picture to work screen
cmp [k],1
jne no_zoom_1_
screen_y_1:
mov esi,[CounterX]
screen_x_1:
mov ecx,[eax]
and ecx,0xffffff
mov ebp,ecx
shr ecx,16
mov [ebx],bp
mov [ebx+2],cl
add ebx,3;
add eax,3
dec esi
jnz screen_x_1
add eax,[OffsetYPicture]
add ebx,[OffsetYWorkScreen]
dec edi
jnz screen_y_1
jmp fps
no_zoom_1_:
cmp [k],2
jne no_zoom_2
screen_y_2:
mov esi,[CounterX]
screen_x_2:
mov ecx,[eax]
and ecx,0xffffff
mov ebp,ecx
shr ecx,16
mov edx,ebx
mov [edx],bp
mov [edx+2],cl
mov [edx+3],bp
mov [edx+3+2],cl
add edx,3*2
add edx,[OffsetYBigPixel]
mov [edx],bp
mov [edx+2],cl
mov [edx+3],bp
mov [edx+3+2],cl
add edx,3*2
add edx,[OffsetYBigPixel]
add ebx,3*2
add eax,3
dec esi
jnz screen_x_2
add eax,[OffsetYPicture]
add ebx,[OffsetYWorkScreen]
dec edi
jnz screen_y_2
jmp fps
no_zoom_2:
cmp [k],4
jne no_zoom_4
screen_y_4:
mov esi,[CounterX]
screen_x_4:
mov ecx,[eax]
and ecx,0xffffff
mov ebp,ecx
shr ecx,16
mov edx,ebx
mov [edx],bp
mov [edx+2],cl
mov [edx+3],bp
mov [edx+3+2],cl
mov [edx+6],bp
mov [edx+6+2],cl
mov [edx+9],bp
mov [edx+9+2],cl
add edx,3*4
add edx,[OffsetYBigPixel]
mov [edx],bp
mov [edx+2],cl
mov [edx+3],bp
mov [edx+3+2],cl
mov [edx+6],bp
mov [edx+6+2],cl
mov [edx+9],bp
mov [edx+9+2],cl
add edx,3*4
add edx,[OffsetYBigPixel]
mov [edx],bp
mov [edx+2],cl
mov [edx+3],bp
mov [edx+3+2],cl
mov [edx+6],bp
mov [edx+6+2],cl
mov [edx+9],bp
mov [edx+9+2],cl
add edx,3*4
add edx,[OffsetYBigPixel]
mov [edx],bp
mov [edx+2],cl
mov [edx+3],bp
mov [edx+3+2],cl
mov [edx+6],bp
mov [edx+6+2],cl
mov [edx+9],bp
mov [edx+9+2],cl
add edx,3*4
add edx,[OffsetYBigPixel]
add ebx,4*3
add eax,3
dec esi
jnz screen_x_4
add eax,[OffsetYPicture]
add ebx,[OffsetYWorkScreen]
dec edi
jnz screen_y_4
jmp fps
no_zoom_4:
;if zoom more than 4
screen_y:
mov esi,[CounterX]
screen_x:
mov ecx,[eax]
and ecx,0xffffff
mov ebp,ecx
shr ecx,16
push ebx
push eax
mov edx,[k]
big_pixel_y:
mov eax,[k]
big_pixel_x:
mov [ebx],bp
mov [ebx+2],cl
add ebx,3
dec eax
jnz big_pixel_x
add ebx,[OffsetYBigPixel]
dec edx
jnz big_pixel_y
pop eax
pop ebx
mov edx,[k]
lea edx,[edx+edx*2]
add ebx,edx
add eax,3
dec esi
jnz screen_x
add eax,[OffsetYPicture]
add ebx,[OffsetYWorkScreen]
dec edi
jnz screen_y
fps:
;mov eax,18
;mov ebx,14
;int 0x40
mov eax,7
mov ebx,[ScreenPointer]
mov ecx,[WorkScreen_SizeX]
mov edx,[WorkScreen_SizeY]
shl ecx,16
add ecx,edx
mov edx,8*65536+20+15+49+5+1
int 0x40
ret
;----------------------------------------------------------
;--------------------clear screen--------------------------
;----------------------------------------------------------
cleare_screen:
mov eax,[ScreenPointer]
mov ebx,[WorkScreen_SizeX]
imul ebx,[WorkScreen_SizeY]
lea ebx,[ebx+ebx*2]
shr ebx,3
inc ebx
mov esi,0xffffff
clear_screen_loop:
mov [eax],esi
mov [eax+3],esi
mov [eax+6],si
add eax,4+4
dec ebx
jnz clear_screen_loop
ret
;----------------------------------------------------------
;-------------cleare work arrea(work screen)---------------
;----------------------------------------------------------
cleare_work_arrea:
mov eax,[PointerToPicture]
mov ebx,[Picture_SizeX]
imul ebx,[Picture_SizeY]
lea ebx,[ebx+ebx*2]
shr ebx,3
inc ebx
mov esi,0xffffff
clear_work_arrea_loop:
mov [eax],esi
mov [eax+3],esi
mov [eax+6],si
add eax,4+4
dec ebx
jnz clear_work_arrea_loop
ret
;-----------------------------------------------------------
;calculate position work screen on a picture
;-----------------------------------------------------------
CalculatePositionScreen:
mov eax,[Picture_SizeX]
mov ebx,[Picture_SizeY]
mov ecx,[CounterX]
mov edx,[CounterY]
sub eax,ecx
sub ebx,edx
cmp [PosX],eax
jle no_limit_screen_x
mov [PosX],eax
no_limit_screen_x:
cmp [PosY],ebx
jle no_limit_screen_y
mov [PosY],ebx
no_limit_screen_y:
cmp [PosX],0
jns no_minimum_screen_x
mov [PosX],0
no_minimum_screen_x:
cmp [PosY],0
jns no_minimum_screen_y
mov [PosY],0
no_minimum_screen_y:
ret
;-----------------------------------------------------------
;-----------calculate cordinats on work picture--------------
;-----------------------------------------------------------
GetScreenCordinats:
mov eax,[MouseX]
mov ebx,[MouseY]
sub eax,9
sub ebx,87
mov ecx,[k]
cdq
idiv ecx
mov [ScreenX],eax
mov eax,ebx
cdq
idiv ecx
mov [ScreenY],eax
ret

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

View File

@ -0,0 +1,68 @@
;------------------------------------------
;-----------------Sprays-------------------
;------------------------------------------
Spray_color:
;
db 0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0
db 0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
;
db 0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0
db 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0
db 0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0
db 0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0
db 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0
db 0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0
db 0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0
db 0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0
db 0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0
db 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0
db 0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
;
db 0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0
db 0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0
db 0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0
db 0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0
db 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0
db 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0
db 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0
db 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0
db 0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0
db 0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0
db 0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0
db 0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

View File

@ -0,0 +1,111 @@
;-----------------------------------------------------------
;------------------SaveFonForSprite-------------------------
;-----------------------------------------------------------
SaveFonForSprite:
mov edi,[PointerToSpriteBufer]
mov ecx,[SpriteSizeX]
mov edx,[Picture_SizeX]
sub edx,[SpriteSizeX]
mov esi,[SpriteCoordinatY]
imul esi,[Picture_SizeX]
add esi,[SpriteCoordinatX]
lea edx,[edx+edx*2]
lea esi,[esi+esi*2]
add esi,[PointerToPicture]
mov ebx,[SpriteSizeY]
mov [counter],ecx
next_line_sprite_save:
mov ecx,[counter]
next_pixel_sprite_save:
mov eax,[esi]
and eax,0xffffff
mov [edi],ax
shr eax,16
mov [edi+2],al
add esi,3
add edi,3
dec ecx
jnz next_pixel_sprite_save
add esi,edx
dec ebx
jnz next_line_sprite_save
ret
;-----------------------------------------------------------
;-------------------PutFonForSprite-------------------------
;-----------------------------------------------------------
PutFonForSprite:
mov esi,[PointerToSpriteBufer]
mov ecx,[SpriteSizeX]
mov edx,[Picture_SizeX]
sub edx,[SpriteSizeX]
mov edi,[SpriteOldCoordinatY]
imul edi,[Picture_SizeX]
add edi,[SpriteOldCoordinatX]
lea edx,[edx+edx*2]
lea edi,[edi+edi*2]
add edi,[PointerToPicture]
mov ebx,[SpriteSizeY]
mov [counter],ecx
next_line_sprite_put:
mov ecx,[counter]
next_pixel_sprite_put:
mov eax,[esi]
and eax,0xffffff
mov [edi],ax
shr eax,16
mov [edi+2],al
add esi,3
add edi,3
dec ecx
jnz next_pixel_sprite_put
add edi,edx
dec ebx
jnz next_line_sprite_put
ret
;-----------------------------------------------------------
;------------------DrawFonForSprite-------------------------
;-----------------------------------------------------------
DrawSprite:
mov esi,[PointerToEditBufer]
mov ecx,[SpriteSizeX]
mov edx,[Picture_SizeX]
sub edx,[SpriteSizeX]
mov edi,[SpriteCoordinatY]
imul edi,[Picture_SizeX]
add edi,[SpriteCoordinatX]
lea edx,[edx+edx*2]
lea edi,[edi+edi*2]
add edi,[PointerToPicture]
mov ebx,[SpriteSizeY]
mov [counter],ecx
next_line_sprite_draw:
mov ecx,[counter]
next_pixel_sprite_draw:
mov eax,[esi]
and eax,0xffffff
mov [edi],ax
shr eax,16
mov [edi+2],al
add esi,3
add edi,3
dec ecx
jnz next_pixel_sprite_draw
add edi,edx
dec ebx
jnz next_line_sprite_draw
ret

View File

@ -0,0 +1,19 @@
;-----------------------------------------------------------
;-------find simvole in string------------------------------
;-----------------------------------------------------------
find_symvol:
;eax=string
;ebx=symvol
mov esi,eax
next_symvol:
xor ecx,ecx
mov cl,[eax]
cmp cl,bl
je symvol_fined
inc eax
jmp next_symvol
symvol_fined:
sub eax,esi
ret

View File

@ -0,0 +1,11 @@
;---------------------------------------------------------
;---------- get time in 1/100 secunds---------------------
;---------------------------------------------------------
Clock:
mov eax,26
mov ebx,9
int 0x40
mov [time],eax
ret

View File

@ -0,0 +1,64 @@
;-----------------------------------------
width_pixels:
db 1,0,0,0,0
db 0,0,0,0,0
db 0,0,0,0,0
db 0,0,0,0,0
db 0,0,0,0,0
;
db 1,1,0,0,0
db 1,1,0,0,0
db 0,0,0,0,0
db 0,0,0,0,0
db 0,0,0,0,0
;
db 0,1,0,0,0
db 1,1,1,0,0
db 0,1,0,0,0
db 0,0,0,0,0
db 0,0,0,0,0
;
db 0,1,1,0,0
db 1,1,1,1,0
db 1,1,1,1,0
db 0,1,1,0,0
db 0,0,0,0,0
;
db 0,0,1,0,0
db 0,1,1,1,0
db 1,1,1,1,1
db 0,1,1,1,0
db 0,0,1,0,0
;-----------------------------------------
width_pixels_rectangle:
db 1,0,0,0,0
db 0,0,0,0,0
db 0,0,0,0,0
db 0,0,0,0,0
db 0,0,0,0,0
;
db 1,1,0,0,0
db 1,1,0,0,0
db 0,0,0,0,0
db 0,0,0,0,0
db 0,0,0,0,0
;
db 1,1,1,0,0
db 1,1,1,0,0
db 1,1,1,0,0
db 0,0,0,0,0
db 0,0,0,0,0
;
db 1,1,1,1,0
db 1,1,1,1,0
db 1,1,1,1,0
db 1,1,1,1,0
db 0,0,0,0,0
;
db 1,1,1,1,1
db 1,1,1,1,1
db 1,1,1,1,1
db 1,1,1,1,1
db 1,1,1,1,1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B