Animage
1) Program used function 68 instead 64 is now 2) Select path with OpenDialog git-svn-id: svn://kolibrios.org@1632 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
7f37261a3b
commit
d052c50a74
@ -1,278 +1,344 @@
|
||||
;*******************************************************
|
||||
;**************GRAPHICS EDITOR ANIMAGE *****************
|
||||
;*******************************************************
|
||||
|
||||
|
||||
; version 1.1 year 9.12.2006
|
||||
|
||||
; version: 1.2
|
||||
; last update: 30/09/2010
|
||||
; written by: Marat Zakiyanov aka Mario79, aka Mario
|
||||
; changes: Program used function 68 instead 64 is now,
|
||||
; select path with OpenDialog
|
||||
;--------------------------------------------------------
|
||||
; version 1.1 year 9.12.2006
|
||||
; AUTORS:
|
||||
; programming by andrew_programmer
|
||||
; design by golus
|
||||
; design by golus
|
||||
|
||||
use32
|
||||
org 0x0
|
||||
org 0x0
|
||||
|
||||
db 'MENUET01'
|
||||
dd 0x1
|
||||
dd START
|
||||
dd I_END
|
||||
dd 0x19000;100 kb
|
||||
dd 0x19000;
|
||||
dd parameters,0x0
|
||||
db 'MENUET01'
|
||||
dd 0x1
|
||||
dd START
|
||||
dd IM_END
|
||||
dd I_END ;0x19000;100 kb
|
||||
dd stacktop ;0x19000;
|
||||
dd file_path ;parameters
|
||||
dd cur_dir_path
|
||||
|
||||
|
||||
include '..\..\..\macros.inc'
|
||||
COLOR_ORDER equ MENUETOS
|
||||
include 'gif_lite.inc'
|
||||
include 'bmplib.inc'
|
||||
include 'dialog.inc'
|
||||
include 'dialog2.inc'
|
||||
include 'design.inc'
|
||||
include 'graphlib.inc'
|
||||
include '..\..\..\macros.inc'
|
||||
include '../../../develop/libraries/box_lib/load_lib.mac'
|
||||
@use_library
|
||||
COLOR_ORDER equ MENUETOS
|
||||
include 'gif_lite.inc'
|
||||
include 'bmplib.inc'
|
||||
;include 'dialog.inc'
|
||||
include 'dialog2.inc'
|
||||
include 'design.inc'
|
||||
include 'graphlib.inc'
|
||||
|
||||
include 'cursors.inc'
|
||||
include 'cursors.inc'
|
||||
|
||||
include 'load_from_parameters.inc'
|
||||
include 'load_from_parameters.inc'
|
||||
|
||||
START:
|
||||
mcall 68,11
|
||||
|
||||
load_libraries l_libs_start,end_l_libs
|
||||
|
||||
cmp eax,-1
|
||||
jz close
|
||||
;--------------------------------------------------------
|
||||
;---------------set events mask--------------------------
|
||||
;--------------------------------------------------------
|
||||
mov eax,40
|
||||
mov ebx,1100111b
|
||||
mcall
|
||||
mcall 40,1100111b
|
||||
;---------------------------------------------------------
|
||||
;-----------------------init data-------------------------
|
||||
;---------------------------------------------------------
|
||||
include 'init_data.inc'
|
||||
include 'init_data.inc'
|
||||
|
||||
;----------------------------------------------------------
|
||||
;--------get memory and draw window of program-------------
|
||||
;----------------------------------------------------------
|
||||
call GetMemory
|
||||
call cleare_work_arrea
|
||||
call load_icons
|
||||
call GetMemory
|
||||
call cleare_work_arrea
|
||||
call load_icons
|
||||
|
||||
;load cursors
|
||||
mov eax,CursorsID
|
||||
call load_cursors
|
||||
;load cursors
|
||||
mov eax,CursorsID
|
||||
call load_cursors
|
||||
|
||||
call drawwin
|
||||
call drawwin
|
||||
;---------------------------------------------------------
|
||||
;---------Check loading of file from psrsmeters-----------
|
||||
;---------------------------------------------------------
|
||||
|
||||
mov eax,parameters
|
||||
mov ebx,file_path
|
||||
call check_loading_from_parameters
|
||||
; mov eax,parameters
|
||||
; mov ebx,file_path
|
||||
; call check_loading_from_parameters
|
||||
mov eax,file_path
|
||||
cmp [eax],byte 0
|
||||
jz @f
|
||||
call load_picture
|
||||
@@:
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
mov edi,filename_area
|
||||
mov esi,path4+5
|
||||
call copy_str_1
|
||||
|
||||
mov edi,file_path
|
||||
cmp [edi],byte 0
|
||||
jne @f
|
||||
mov esi,path4
|
||||
call copy_str_1
|
||||
@@:
|
||||
;OpenDialog initialisation
|
||||
push dword OpenDialog_data
|
||||
call [OpenDialog_Init]
|
||||
;---------------------------------------------------------------------
|
||||
;----------------------------------------------------------
|
||||
;---------------------MAIN LOOP----------------------------
|
||||
;----------------------------------------------------------
|
||||
still:
|
||||
call event
|
||||
cmp eax,1
|
||||
jne no_redraw_window
|
||||
|
||||
still:
|
||||
call drawwin
|
||||
jmp still
|
||||
|
||||
call event
|
||||
no_redraw_window:
|
||||
cmp eax,2
|
||||
je keys
|
||||
|
||||
cmp eax,1
|
||||
jne no_redraw_window
|
||||
cmp eax,3
|
||||
je buttons
|
||||
|
||||
call drawwin
|
||||
jmp still
|
||||
cmp eax,6
|
||||
je mouse
|
||||
|
||||
no_redraw_window:
|
||||
|
||||
cmp eax,2
|
||||
je keys
|
||||
|
||||
cmp eax,3
|
||||
je buttons
|
||||
|
||||
cmp eax,6
|
||||
je mouse
|
||||
|
||||
jmp still
|
||||
jmp still
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
copy_str_1:
|
||||
xor eax,eax
|
||||
cld
|
||||
@@:
|
||||
lodsb
|
||||
stosb
|
||||
test eax,eax
|
||||
jnz @b
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
;---------------------------------------------------------
|
||||
;---------------------------------------------------------
|
||||
;---------------------------------------------------------
|
||||
|
||||
include 'events.inc'
|
||||
include 'events_of_window.inc'
|
||||
include 'events_of_keys.inc'
|
||||
include 'events_of_buttons.inc'
|
||||
include 'events_of_mouse.inc'
|
||||
include 'panel_engen.inc'
|
||||
include 'screen.inc'
|
||||
include 'menu_instruments.inc'
|
||||
include 'icons_instruments.inc'
|
||||
include 'icons.inc'
|
||||
include 'sprites.inc'
|
||||
include 'string.inc'
|
||||
include 'palette.inc'
|
||||
include 'files.inc'
|
||||
include 'time.inc'
|
||||
include 'memory.inc'
|
||||
|
||||
include 'events.inc'
|
||||
include 'events_of_window.inc'
|
||||
include 'events_of_keys.inc'
|
||||
include 'events_of_buttons.inc'
|
||||
include 'events_of_mouse.inc'
|
||||
include 'panel_engen.inc'
|
||||
include 'screen.inc'
|
||||
include 'menu_instruments.inc'
|
||||
include 'icons_instruments.inc'
|
||||
include 'icons.inc'
|
||||
include 'sprites.inc'
|
||||
include 'string.inc'
|
||||
include 'palette.inc'
|
||||
include 'files.inc'
|
||||
include 'time.inc'
|
||||
include 'memory.inc'
|
||||
;-----------------------------------------------------------
|
||||
;------------variables and data of program------------------
|
||||
;-----------------------------------------------------------
|
||||
|
||||
CursorsID rd 10
|
||||
|
||||
parameters rb 257
|
||||
|
||||
file_path:
|
||||
times 1024+16 db 0
|
||||
|
||||
time dd 0
|
||||
sound_havent_memory db 150,64,0
|
||||
PosX dd 0
|
||||
PosY dd 0
|
||||
PointerToIcons dd 0
|
||||
ScreenPointer dd 0
|
||||
PointerToPicture dd 0
|
||||
PointerToCopyPicture dd 0
|
||||
PointerToCopyPicture2 dd 0
|
||||
PointerToEditBufer dd 0
|
||||
PointerToSpriteBufer dd 0
|
||||
PointerToPalette dd 0
|
||||
Color dd 0
|
||||
Number_Brush dd 0
|
||||
Brush_SizeX dd 0
|
||||
Brush_SizeY dd 0
|
||||
Current_instrument dd 0
|
||||
Last_instrument dd 0
|
||||
Activate_instrument db 0
|
||||
SColor dd 0
|
||||
OldX dd 0
|
||||
OldY dd 0
|
||||
|
||||
MouseX dd 0
|
||||
MouseY dd 0
|
||||
Window_SizeX dd 0
|
||||
Window_SizeY dd 0
|
||||
Window_CordinatX dd 0
|
||||
Window_CordinatY dd 0
|
||||
Picture_SizeX dd 0
|
||||
Picture_SizeY dd 0
|
||||
ScreenX dd 0
|
||||
ScreenY dd 0
|
||||
WorkScreen_SizeX dd 0
|
||||
WorkScreen_SizeY dd 0
|
||||
MaxWorkScreen_SizeX dd 0
|
||||
MaxWorkScreen_SizeY dd 0
|
||||
k dd 0
|
||||
IPC_table rd 256
|
||||
ReserveArray dd 0
|
||||
register dd 0
|
||||
CounterX dd 0
|
||||
CounterY dd 0
|
||||
OffsetYPicture dd 0
|
||||
OffsetYWorkScreen dd 0
|
||||
OffsetYBigPixel dd 0
|
||||
|
||||
Icon_X dd 0
|
||||
Icon_Y dd 0
|
||||
counter dd 0
|
||||
counter2 dd 0
|
||||
Icon_text_x dd 0
|
||||
Icon_text_y dd 0
|
||||
Panel_flag db 0
|
||||
counter_menu dd 0
|
||||
menu_coordinat_x dd 0
|
||||
menu_size_x dd 0
|
||||
menu_counter dd 0
|
||||
counter_11 dd 0
|
||||
number_panel dd 0
|
||||
number_menu dd 0
|
||||
|
||||
Scroll1CoordinatX dd 0
|
||||
Scroll1CoordinatY dd 0
|
||||
Scroll1MaxSizeX dd 0
|
||||
Scroll1MaxSizeY dd 0
|
||||
Scroll1SizeX dd 0
|
||||
Scroll1FreeX dd 0
|
||||
|
||||
Scroll2CoordinatX dd 0
|
||||
Scroll2CoordinatY dd 0
|
||||
Scroll2MaxSizeX dd 0
|
||||
Scroll2MaxSizeY dd 0
|
||||
Scroll2SizeY dd 0
|
||||
Scroll2FreeY dd 0
|
||||
|
||||
extended_memory dd 0
|
||||
type dw 0
|
||||
x dd 0
|
||||
y dd 0
|
||||
save_flag db 0
|
||||
exit_from_work_arrea db 0
|
||||
|
||||
Radius dd 0
|
||||
Dx_ dd 0
|
||||
Dy_ dd 0
|
||||
line_width dd 0
|
||||
lastik_is_active db 0
|
||||
a_ellips dd 0
|
||||
b_ellips dd 0
|
||||
instrument_used db 0
|
||||
used_OldX dd 0
|
||||
used_OldY dd 0
|
||||
rectangular_shade_x dd 0
|
||||
rectangular_shade_y dd 0
|
||||
crossing_old_x dd 0
|
||||
crossing_old_y dd 0
|
||||
crossing dd 0
|
||||
finishing_crossing dd 0
|
||||
number_undo dd 0
|
||||
DrawSprite_flag db 0
|
||||
Paste_flag db 0
|
||||
SpriteSizeX dd 0
|
||||
SpriteSizeY dd 0
|
||||
SpriteCoordinatX dd 0
|
||||
SpriteCoordinatY dd 0
|
||||
SpriteOldCoordinatX dd 0
|
||||
SpriteOldCoordinatY dd 0
|
||||
|
||||
include 'panel_data.inc'
|
||||
include 'palitra256.inc'
|
||||
include 'brushes.inc'
|
||||
include 'spray.inc'
|
||||
include 'width_lines.inc'
|
||||
sound_havent_memory db 150,64,0
|
||||
include 'lib_data.inc'
|
||||
include 'panel_data.inc'
|
||||
include 'palitra256.inc'
|
||||
include 'brushes.inc'
|
||||
include 'spray.inc'
|
||||
include 'width_lines.inc'
|
||||
;----------------------------------------------------------
|
||||
;-------------------ICON"S picture-------------------------
|
||||
;----------------------------------------------------------
|
||||
dd 0
|
||||
|
||||
dd 0
|
||||
panel_picture:
|
||||
file 'panel_buttons.gif'
|
||||
|
||||
;****************cursors******************
|
||||
brush_cursor:
|
||||
file 'brush.cur'
|
||||
|
||||
;----------------------------------------------------------
|
||||
flood_fill_cursor:
|
||||
file 'flood_fill.cur'
|
||||
|
||||
;----------------------------------------------------------
|
||||
lastik_cursor:
|
||||
file 'lastik.cur'
|
||||
|
||||
;----------------------------------------------------------
|
||||
other_cursor:
|
||||
file 'other.cur'
|
||||
|
||||
;----------------------------------------------------------
|
||||
pencil_cursor:
|
||||
file 'pencil.cur'
|
||||
|
||||
;----------------------------------------------------------
|
||||
pipette_cursor:
|
||||
file 'pipette.cur'
|
||||
|
||||
;----------------------------------------------------------
|
||||
spray_cursor:
|
||||
file 'spray.cur'
|
||||
|
||||
;----------------------------------------------------------
|
||||
zoom_cursor:
|
||||
file 'zoom.cur'
|
||||
|
||||
;----------------------------------------------------------
|
||||
IM_END:
|
||||
;-----------------------------------------------------------
|
||||
;------------variables and data of program------------------
|
||||
;-----------------------------------------------------------
|
||||
time rd 1
|
||||
PosX rd 1
|
||||
PosY rd 1
|
||||
PointerToIcons rd 1
|
||||
ScreenPointer rd 1
|
||||
PointerToPicture rd 1
|
||||
PointerToCopyPicture rd 1
|
||||
PointerToCopyPicture2 rd 1
|
||||
PointerToEditBufer rd 1
|
||||
PointerToSpriteBufer rd 1
|
||||
PointerToPalette rd 1
|
||||
Color 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
|
||||
|
||||
I_END:
|
||||
MouseX rd 1
|
||||
MouseY rd 1
|
||||
Window_SizeX rd 1
|
||||
Window_SizeY rd 1
|
||||
Window_CordinatX rd 1
|
||||
Window_CordinatY rd 1
|
||||
Picture_SizeX rd 1
|
||||
Picture_SizeY rd 1
|
||||
ScreenX rd 1
|
||||
ScreenY rd 1
|
||||
WorkScreen_SizeX rd 1
|
||||
WorkScreen_SizeY rd 1
|
||||
MaxWorkScreen_SizeX rd 1
|
||||
MaxWorkScreen_SizeY rd 1
|
||||
k rd 1
|
||||
|
||||
ReserveArray rd 1
|
||||
register rd 1
|
||||
CounterX rd 1
|
||||
CounterY rd 1
|
||||
OffsetYPicture rd 1
|
||||
OffsetYWorkScreen rd 1
|
||||
OffsetYBigPixel rd 1
|
||||
|
||||
Icon_X rd 1
|
||||
Icon_Y rd 1
|
||||
counter rd 1
|
||||
counter2 rd 1
|
||||
Icon_text_x rd 1
|
||||
Icon_text_y rd 1
|
||||
Panel_flag rb 1
|
||||
counter_menu rd 1
|
||||
menu_coordinat_x rd 1
|
||||
menu_size_x rd 1
|
||||
menu_counter rd 1
|
||||
counter_11 rd 1
|
||||
number_panel rd 1
|
||||
number_menu rd 1
|
||||
|
||||
Scroll1CoordinatX rd 1
|
||||
Scroll1CoordinatY rd 1
|
||||
Scroll1MaxSizeX rd 1
|
||||
Scroll1MaxSizeY rd 1
|
||||
Scroll1SizeX rd 1
|
||||
Scroll1FreeX rd 1
|
||||
|
||||
Scroll2CoordinatX rd 1
|
||||
Scroll2CoordinatY rd 1
|
||||
Scroll2MaxSizeX rd 1
|
||||
Scroll2MaxSizeY rd 1
|
||||
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_OldY rd 1
|
||||
rectangular_shade_x rd 1
|
||||
rectangular_shade_y rd 1
|
||||
crossing_old_x rd 1
|
||||
crossing_old_y rd 1
|
||||
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
|
||||
SpriteCoordinatY rd 1
|
||||
SpriteOldCoordinatX rd 1
|
||||
SpriteOldCoordinatY rd 1
|
||||
;---------------------------------------------------------------------
|
||||
IncludeUGlobals
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
CursorsID rd 10
|
||||
;---------------------------------------------------------------------
|
||||
;align 4
|
||||
;parameters
|
||||
; rb 257
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
file_path:
|
||||
rb 4096 ;rb 1024+16
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
filename_area:
|
||||
rb 256
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
temp_dir_pach:
|
||||
rb 4096
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
library_path:
|
||||
rb 4096
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
cur_dir_path:
|
||||
rb 4096
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
procinfo:
|
||||
rb 1024
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
IPC_table rd 256
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
rb 4096
|
||||
stacktop:
|
||||
;---------------------------------------------------------------------
|
||||
I_END:
|
13
programs/media/animage/trunk/build.sh
Normal file
13
programs/media/animage/trunk/build.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
# This script does for linux the same as build.bat for DOS,
|
||||
# it compiles the KoOS kernel, hopefully ;-)
|
||||
|
||||
echo "lang fix ru"
|
||||
echo "lang fix ru" > lang.inc
|
||||
fasm -m 16384 animage.asm animage
|
||||
rm -f lang.inc
|
||||
exit 0
|
||||
|
||||
|
||||
|
||||
|
@ -1,2 +1,3 @@
|
||||
@fasm animage.asm animage
|
||||
@kpack animage
|
||||
@pause
|
@ -78,7 +78,7 @@
|
||||
|
||||
mov eax,CursorsID
|
||||
call delete_cursors
|
||||
|
||||
close:
|
||||
mov eax,-1
|
||||
mcall
|
||||
|
||||
|
@ -11,19 +11,33 @@
|
||||
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
|
||||
|
||||
; mov [ScreenPointer],0x19000
|
||||
; 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
|
||||
|
||||
; mov [ScreenPointer],I_END ; S = 0, L = 3600000 + 60000 + 500000 = 4160000 = 3,97 Mb
|
||||
; mov [PointerToPicture], I_END+(1200*1000*3)+50*(20*20*3)+500000 ; S = 4160000, L = 768000 = 750 Kb
|
||||
; mov [PointerToCopyPicture], I_END+(1200*1000*3)+50*(20*20*3)+500000+(640*400*3) ; S = 4928000, L = 768000 = 750 Kb
|
||||
; mov [PointerToCopyPicture2],I_END+(1200*1000*3)+50*(20*20*3)+500000+(640*400*3)*2 ; S = 5696000, L = 768000 = 750 Kb
|
||||
; mov [PointerToEditBufer], I_END+(1200*1000*3)+50*(20*20*3)+500000+(640*400*3)*3 ; S = 6464000, L = 768000 = 750 Kb
|
||||
; mov [PointerToSpriteBufer], I_END+(1200*1000*3)+50*(20*20*3)+500000+(640*400*3)*4 ; S = 7232000, L = 768000 = 750 Kb
|
||||
; mov [PointerToPalette], I_END+(1200*100*3)+50*(20*20*3)+1 ; S = 420001
|
||||
; mov [ReserveArray], I_END+(1200*1000)*3+50*(20*20*3)+8 ; S = 3660008
|
||||
|
||||
mcall 68,12,4096
|
||||
mov [ScreenPointer],eax
|
||||
|
||||
and [save_flag],0
|
||||
mov [line_width],1
|
||||
mov [lastik_is_active],0
|
||||
@ -32,7 +46,7 @@
|
||||
and [number_undo],0
|
||||
and [instrument_used],0
|
||||
and [DrawSprite_flag],0
|
||||
and [extended_memory],0
|
||||
; and [extended_memory],0
|
||||
|
||||
;mov eax,68
|
||||
;mov ebx,11
|
||||
|
68
programs/media/animage/trunk/lib_data.inc
Normal file
68
programs/media/animage/trunk/lib_data.inc
Normal file
@ -0,0 +1,68 @@
|
||||
;---------------------------------------------------------------------
|
||||
system_dir_ProcLib db '/sys/lib/proc_lib.obj',0
|
||||
;---------------------------------------------------------------------
|
||||
head_f_i:
|
||||
head_f_l db 'System error',0
|
||||
|
||||
err_message_found_lib2 db 'proc_lib.obj - Not found!',0
|
||||
|
||||
err_message_import2 db 'proc_lib.obj - Wrong import!',0
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
l_libs_start:
|
||||
|
||||
library02 l_libs system_dir_ProcLib+9, cur_dir_path, library_path, system_dir_ProcLib, \
|
||||
err_message_found_lib2, head_f_l, ProcLib_import, err_message_import2, head_f_i
|
||||
|
||||
end_l_libs:
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
OpenDialog_data:
|
||||
.type dd 1 ; Save
|
||||
.procinfo dd procinfo ;+4
|
||||
.com_area_name dd communication_area_name ;+8
|
||||
.com_area dd 0 ;+12
|
||||
.opendir_pach dd temp_dir_pach ;+16
|
||||
.dir_default_pach dd communication_area_default_pach ;+20
|
||||
.start_path dd open_dialog_path ;+24
|
||||
.draw_window dd drawwin ;+28
|
||||
.status dd 0 ;+32
|
||||
.openfile_pach dd file_path ;+36
|
||||
.filename_area dd filename_area ;+40
|
||||
.filter_area dd Filter
|
||||
.x:
|
||||
.x_size dw 420 ;+48 ; Window X size
|
||||
.x_start dw 10 ;+50 ; Window X position
|
||||
.y:
|
||||
.y_size dw 320 ;+52 ; Window y size
|
||||
.y_start dw 10 ;+54 ; Window Y position
|
||||
|
||||
communication_area_name:
|
||||
db 'FFFFFFFF_open_dialog',0
|
||||
open_dialog_path:
|
||||
db '/sys/File Managers/opendial',0
|
||||
communication_area_default_pach:
|
||||
db '/rd0/1/',0
|
||||
|
||||
Filter:
|
||||
dd Filter.end - Filter
|
||||
.1:
|
||||
db 'MGB',0
|
||||
.end:
|
||||
db 0
|
||||
|
||||
;start_temp_file_name: db 'pattern.mgb',0
|
||||
|
||||
path4 db '/sys/noname.bmp',0
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
ProcLib_import:
|
||||
OpenDialog_Init dd aOpenDialog_Init
|
||||
OpenDialog_Start dd aOpenDialog_Start
|
||||
;OpenDialog__Version dd aOpenDialog_Version
|
||||
dd 0
|
||||
dd 0
|
||||
aOpenDialog_Init db 'OpenDialog_init',0
|
||||
aOpenDialog_Start db 'OpenDialog_start',0
|
||||
;aOpenDialog_Version db 'Version_OpenDialog',0
|
||||
;---------------------------------------------------------------------
|
@ -5,25 +5,24 @@
|
||||
;OUT
|
||||
;value not returned
|
||||
|
||||
check_loading_from_parameters:
|
||||
;check_loading_from_parameters:
|
||||
|
||||
cmp [eax],byte 0
|
||||
jz no_parameters
|
||||
; cmp [eax],byte 0
|
||||
; jz no_parameters
|
||||
|
||||
;copy file name
|
||||
mov esi,eax
|
||||
mov edi,ebx
|
||||
mov ecx,256
|
||||
rep movsb
|
||||
; mov esi,eax
|
||||
; mov edi,ebx
|
||||
; mov ecx,256
|
||||
; rep movsb
|
||||
|
||||
;load file in memory
|
||||
|
||||
call load_picture
|
||||
; call load_picture
|
||||
|
||||
no_parameters:
|
||||
; no_parameters:
|
||||
|
||||
ret
|
||||
|
||||
; ret
|
||||
|
||||
; load picture from file to memory
|
||||
|
||||
@ -83,36 +82,8 @@ load_picture:
|
||||
;----------------------------------------------------------
|
||||
;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-------------------
|
||||
;----------------------------------------------------------
|
||||
|
@ -1,28 +1,76 @@
|
||||
;----------------------------------------------------------
|
||||
;--------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 ; 4192384
|
||||
; add ecx,[extended_memory]
|
||||
; mcall
|
||||
; test eax,eax
|
||||
; jz have_new_memory
|
||||
; mov esi,sound_havent_memory
|
||||
; call sound
|
||||
; jmp still
|
||||
;have_new_memory:
|
||||
; popad
|
||||
; ret
|
||||
|
||||
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]
|
||||
mcall
|
||||
pushad
|
||||
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,(1200*1000)*3+50*(20*20*3)+500000+16000+0x4000 ; 4192384
|
||||
mcall 68,20,,[ScreenPointer]
|
||||
test eax,eax
|
||||
jnz have_new_memory
|
||||
mov esi,sound_havent_memory
|
||||
call sound
|
||||
pushad
|
||||
jmp still
|
||||
|
||||
test eax,eax
|
||||
jz have_new_memory
|
||||
have_new_memory:
|
||||
mov [ScreenPointer],eax
|
||||
call prepare_data_pointers
|
||||
popad
|
||||
ret
|
||||
;---------------------------------------------------------
|
||||
prepare_data_pointers:
|
||||
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 esi,sound_havent_memory
|
||||
call sound
|
||||
mov [PointerToPicture],ebx
|
||||
mov [PointerToCopyPicture],ebx
|
||||
mov [PointerToCopyPicture2],ebx
|
||||
mov [PointerToEditBufer],ebx
|
||||
mov [PointerToSpriteBufer],ebx
|
||||
|
||||
jmp still
|
||||
add [PointerToCopyPicture],eax
|
||||
|
||||
have_new_memory:
|
||||
popad
|
||||
ret
|
||||
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
|
||||
ret
|
||||
;---------------------------------------------------------
|
@ -172,34 +172,6 @@ TakeInstruments:
|
||||
mcall
|
||||
|
||||
;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
|
||||
|
||||
@ -217,7 +189,17 @@ TakeInstruments:
|
||||
cmp [number_menu],2
|
||||
jne no_open
|
||||
|
||||
opendialog drawwin,open_1,open_2,file_path
|
||||
; opendialog drawwin,open_1,open_2,file_path
|
||||
;---------------------------------------------------------------------
|
||||
mov [OpenDialog_data.type],0 ; open
|
||||
|
||||
push dword OpenDialog_data
|
||||
call [OpenDialog_Start]
|
||||
|
||||
cmp [OpenDialog_data.status],1
|
||||
jne still
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
open_1:
|
||||
|
||||
mov eax,40
|
||||
@ -278,35 +260,6 @@ TakeInstruments:
|
||||
;----------------------------------------------------------
|
||||
;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-------------------
|
||||
@ -380,7 +333,16 @@ TakeInstruments:
|
||||
cmp [number_menu],4
|
||||
jne no_save
|
||||
|
||||
savedialog drawwin,save1,save2,file_path
|
||||
; savedialog drawwin,save1,save2,file_path
|
||||
;---------------------------------------------------------------------
|
||||
mov [OpenDialog_data.type],1 ; save
|
||||
|
||||
push dword OpenDialog_data
|
||||
call [OpenDialog_Start]
|
||||
|
||||
cmp [OpenDialog_data.status],1
|
||||
jne still
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
save1:
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
;**********************************************************
|
||||
;------------------TEXT DATA-------------------------------
|
||||
;**********************************************************
|
||||
name_of_program db 'Graphics editor <<ANIMAGE>> V 1.1',0
|
||||
name_of_program db 'Graphics editor <<ANIMAGE>> V 1.2',0
|
||||
mouse_pos_x db 'X='
|
||||
mouse_pos_y db 'Y='
|
||||
new_text1 db 'PICTURE SIZE X'
|
||||
|
Loading…
Reference in New Issue
Block a user