@@ -1,20 +1,23 @@
; SPDX-License-Identifier: NOASSERTION
;
;*******************************************************
;**************GRAPHICS EDITOR ANIMAGE *****************
;*******************************************************
; version: 1.52
; last update: 23.11.2016
; changes: Can save *.png files
; autors : IgorA
; auth or: IgorA
;--------------------------------------------------------
; version: 1.51
; last update: 23.03.2016
; changes: Use library 'kmenu.obj', update GUI
; autors: IgorA, Veliant, Leency
; auth ors: IgorA, Veliant, Leency
;--------------------------------------------------------
; version: 1.4
; last update: 12.03.2016
; changes: Use library 'libimg.obj'
; autors : IgorA
; auth or: IgorA
;--------------------------------------------------------
; version: 1.3
; last update: 05.10.2010
@@ -30,7 +33,7 @@
;--------------------------------------------------------
; version: 1.1
; last update: 09.12.2006
; autors:
; auth ors:
; programming by andrew_programmer
; design by golus
@@ -40,49 +43,48 @@ org 0
dd 1 , START , IM_END , I_END
dd stacktop , file_path , cur_dir_path
include '../../../ config.inc' ;for nightbuild
include '../../../ macros.inc'
include '../../../ proc32.inc'
include '../../../ KOSfuncs.inc'
include '../../../ load_lib.mac'
include '../../../ dll.inc'
include '../../../ develop/libraries/libs-dev/libio/libio.inc'
include '../../../ develop/libraries/libs-dev/libimg/libimg.inc'
;include '../../../ debug.inc'
include '../../config.inc' ;for nightbuild
include '../../macros.inc'
include '../../proc32.inc'
include '../../KOSfuncs.inc'
include '../../load_lib.mac'
include '../../dll.inc'
include '../../develop/libraries/libs-dev/libio/libio.inc'
include '../../develop/libraries/libs-dev/libimg/libimg.inc'
;include '../../debug.inc'
@ use_library mem.Alloc , mem.Free , mem.ReAlloc , dl l.Load
;---------------------------------------------------------
; *** ª®áâ âë ¤«ï ¨â¥à䥩á ***
; *** constants for interface ***
; ª®à४â¨à®¢ª¨ ᪨
ci_offs_skin_w equ 5 ;ª®à४â¨à®¢ª è¨à¨ã à ¬ª¨ ᪨
ci_offs_skin_h equ 24 ;ª®à४â¨à®¢ª ¢ëá®âã ᪨
; skin adjustments
ci_offs_skin_w equ 5 ;adjustment to the width of the skin frame
ci_offs_skin_h equ 24 ;skin height adjustment
; £« ¢®¥ ®ª®
; main window
ci_wnd_min_siz_x equ 585 ;minimum size x
ci_wnd_min_siz_y equ 400 ;minimum size y
; ¯ ¥«ì ¨áâà㬥⮢
ci_panel_x_pos equ 0 ;ª®®à¤. x ¤«ï ¯ ¥«¨
ci_panel_y_pos equ 20 ;ª®®à¤. y ¤«ï ¯ ¥«¨
ci_panel_but_y1 equ ci_panel_y_pos + 5 ;ª®®à¤. y ¤«ï 1-£® àï¤ ª®¯®ª
ci_panel_but_y2 equ ci_panel_y_pos + 30 ;ª®®à¤. y ¤«ï 2-£® àï¤ ª®¯®ª
ci_palete_y_pos equ ci_panel_y_pos + 51 ;ª®®à¤. y ¤«ï ¯ «¨âàë æ¢¥â®¢
ci_panel_zoom_x equ 178 ;ª®®à¤. x ¤«ï ª®¯®ª ¯ ¥«¨ ¬ áèâ ¡
; toolbar
ci_panel_x_pos equ 0 ;coord. x for panel
ci_panel_y_pos equ 20 ;coord. y for panel
ci_panel_but_y1 equ ci_panel_y_pos + 5 ;y coordinate for 1st row of buttons
ci_panel_but_y2 equ ci_panel_y_pos + 30 ;y coordinate for 2nd row of buttons
ci_palete_y_pos equ ci_panel_y_pos + 51 ;y coordinate for color palette
ci_panel_zoom_x equ 178 ;x coordinate for zoom bar buttons
; ®ª® । ªâ®à
ci_edit_wnd_x_pos equ 0 ;ª®®à¤. x ¤«ï ®ª । ªâ®à
ci_edit_wnd_y_pos equ 71 ;ª®®à¤. y ¤«ï ®ª । ªâ®à
ci_edit_wnd_border equ 3 ;à ¬ª ¢®ªà㣠®ª । ªâ®à
; editor window
ci_edit_wnd_x_pos equ 0 ;x coordinate for editor window
ci_edit_wnd_y_pos equ 71 ;y coordinate for editor window
ci_edit_wnd_border equ 3 ;frame around the editor window
; áªà®««¨£¨
ci_scroll_dim equ 22 ;à §¬¥àë áªà®««¨£®¢
ci_scrollh_coord_x_min equ ( ci_edit_wnd_x_pos + 3 ) ;¬¨¨¬ «ì ï ¯®§¨æ¨ï ¯®«§ãª
;£®à¨§®â «ì®£® áªà®««¨£
ci_scrollv_coord_y_min equ ( ci_edit_wnd_y_pos + 3 ) ;¬¨¨¬ «ì ï ¯®§¨æ¨ï ¯®«§ãª
;¢¥à⨪ «ì®£® áªà®««¨£
; scrolling
ci_scroll_dim equ 22 ;scroll sizes
ci_scrollh_coord_x_min equ ( ci_edit_wnd_x_pos + 3 ) ;x minimum slider position
;horizontal scrolling
ci_scrollv_coord_y_min equ ( ci_edit_wnd_y_pos + 3 ) ;y minimum slider position
;vertical scrolling
;---------------------------------------------------------
include 'bmplib.inc'
@@ -254,7 +256,7 @@ PointerToCopyPicture rd 1
PointerToCopyPicture2 rd 1
PointerToEditBufer rd 1
PointerToSpriteBufer rd 1
PointerToPalette rd 1 ;㪠§ â¥«ì ¯¨«¨âàã (㦥 ¤«ï á®åà ¥¨ï ¢ *.bmp)
PointerToPalette rd 1 ;pointer to the file (needed for saving in *.bmp)
Color rd 1
SColor rd 1
Number_Brush rd 1
@@ -267,34 +269,34 @@ OldY rd 1
MouseX rd 1
MouseY rd 1
MouseBut rd 1 ;ᮡëâ¨ï ®â ª®¯®ª ¬ëè¨
MouseBut rd 1 ;mouse button events
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 ;ª®®à¤¨ â x ªãàá®à á ãç¥â®¬ ¬ áèâ ¡
ScreenY rd 1 ;ª®®à¤¨ â y ªãàá®à á ãç¥â®¬ ¬ áèâ ¡
WorkScreen_SizeX rd 1 ;è¨à¨ à ¡®ç¥£® íªà
WorkScreen_SizeY rd 1 ;¢ëá®â à ¡®ç¥£® íªà
ScreenX rd 1 ;x coordinate of the cursor accounting for the scale
ScreenY rd 1 ;y coordinate of the cursor accounting for the scale
WorkScreen_SizeX rd 1 ;width of the working screen
WorkScreen_SizeY rd 1 ;height of the working screen
MaxWorkScreen_SizeX rd 1
MaxWorkScreen_SizeY rd 1
k rd 1 ;¬ áèâ ¡
k rd 1 ;scale
ReserveArray rd 1 ;㪠§ â¥«ì ¯ ¬ïâì ¨á¯®«ì§ã¥¬ãî ¯à¨ à¨á®¢ ¨¨ 䨣ãà
;¤«ï á®åà ¥¨ï ãç á⪮¢ ä® ¯®¤ 䨣ãà ¬¨, â ª¦¥ ¤«ï § «¨¢ª¨
CounterX rd 1 ;ç¨á«® ¯¨ªá¥«¥© ¨§®¡à ¦¥¨ï ¯® è¨à¨¥, ª®â®àë¥ ¯®¯ ¤ îâ
;¢ íªà à ¡®ç¥© ®¡« áâ¨, á ãç¥â®¬ ⥪ã饣® ¬ áèâ ¡
ReserveArray rd 1 ;pointer to memory used when drawing figures
;to save background areas under figures, as well as for filling
CounterX rd 1 ;number of image pixels by width that fall
;within the workspace screen, given the current zoom level
CounterY rd 1
OffsetYPicture rd 1 ;ᤢ¨£ ¯® ®á¨ y ¢ ¡ãä¥à¥ ¨§®¡à ¦¥¨ï ¯à¨ à¨á®¢ ¨¨
;á«¥¤ãî饩 «¨¨¨ ¨§®¡à ¦¥¨ï
OffsetYWorkScreen rd 1 ;ᤢ¨£ ¯® ®á¨ y ¢ ¡ãä¥à¥ à ¡®ç¥© ®¡« á⨠¯à¨
;à¨á®¢ ¨¨ á«¥¤ãî饩 «¨¨¨ ¯¨ªá¥«¥©. —¥¬ ¡®«ìè¥ ¬ áèâ ¡, ⥬ ¨¦¥
;㦮 ®¯ã᪠âìáï ¯® à ¡®ç¥© ®¡« á⨠.
OffsetYBigPixel rd 1 ;ᤢ¨£ ¯® ®á¨ y ¤«ï à¨á®¢ ¨ï ¯¨ªá¥«¥© ¡®«ì讬
;¬ áèâ ¡¥. <20> ¨áã¥âáï 1-ï ¯®«®á ¯¨ªá¥«ï, ¯®â®¬ 㦮 ¯¥à¥©â¨ ¢¨§ ¨
;¢«¥¢® ¤«ï à¨á®¢ ¨ï á«¥¤ãî饩 ¯®«®áë .
OffsetYPicture rd 1 ;y-shift in image buffer when drawing
;next line of image
OffsetYWorkScreen rd 1 ;y-shift in the workspace buffer when
;drawing the next line of pixels. The larger the scale, the lower
;you need to go down the workspace .
OffsetYBigPixel rd 1 ;shift along the y-axis to draw pixels on a large
;scale. The 1st strip of the pixel is drawn, and then you need to move down and
;left to draw the next strip .
Icon_X rd 1
Icon_Y rd 1
@@ -329,14 +331,14 @@ b_ellips rd 1
used_OldX rd 1 ;for draw hard contour
used_OldY rd 1
paste_img_w rd 1 ;è¨à¨ ¢áâ ¢«ï¥¬®£® ¨§®¡à ¦¥¨ï
paste_img_h rd 1 ;¢ëá®â ¢áâ ¢«ï¥¬®£® ¨§®¡à ¦¥¨ï
crossing_old_x rd 1 ; ç «ì ï ª®®à¤. x ®¡« á⨠ª®¯¨à®¢ ¨ï
crossing_old_y rd 1 ; ç «ì ï ª®®à¤. y ®¡« á⨠ª®¯¨à®¢ ¨ï
rectangular_shade_x rd 1 ;ª®¥ç ï ª®®à¤. x ®¡« á⨠ª®¯¨à®¢ ¨ï
rectangular_shade_y rd 1 ;ª®¥ç ï ª®®à¤. y ®¡« á⨠ª®¯¨à®¢ ¨ï
crossing rd 1 ;0 - ¢ë¤¥«¥¨ï ¥â, 1 - ¨¤¥â ¯à®æ¥á ¢ë¤¥«¥¨ï ,
;2 - ¢ë¤¥«¥¨¥ § ¢¥à襮, 3 - ®¡« áâì ¢ë¤¥«¥¨ï ¯¥à¥¬¥é ¥âáï
paste_img_w rd 1 ;width of the inserted image
paste_img_h rd 1 ;height of the inserted image
crossing_old_x rd 1 ;initial x-coord of copy area
crossing_old_y rd 1 ;initial y-coord of copy area
rectangular_shade_x rd 1 ;end x-coord of copy area
rectangular_shade_y rd 1 ;end y-coord of copy area
crossing rd 1 ;0 - no selection, 1 - selection in progress ,
;2 - selection complete, 3 - selection area moving
number_undo rd 1
SpriteSizeX rd 1 ;???
SpriteSizeY rd 1 ;???
@@ -347,8 +349,8 @@ SpriteOldCoordinatY rd 1
CursorsID rd 10
Activate_instrument rb 1 ;¥á«¨ à ¢® 0 - â® ª®¯¨à®¢ ¨¥ ⥪ã饣® ¡ãä¥à
;¤«ï ¥£® । ªâ¨à®¢ ¨ï, ¥á«¨ 1 - ⥪ã騩 ¡ãä¥à ¥ ª®¯¨àã¥âáï
Activate_instrument rb 1 ;if equal to 0 - then copy the current buffer
;for editing it, if 1 - the current buffer is not copied
save_flag rb 1
exit_from_work_arrea rb 1
lastik_is_active rb 1