Rev 3951 | Rev 6329 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
255 | heavyiron | 1 | ;******************************************************* |
2 | ;**************GRAPHICS EDITOR ANIMAGE ***************** |
||
3 | ;******************************************************* |
||
6328 | IgorA | 4 | ; version: 1.4 |
5 | ; last update: 12/03/2016 |
||
6 | ; changes: Use library 'libimg.obj' |
||
7 | ;-------------------------------------------------------- |
||
1643 | mario79 | 8 | ; version: 1.3 |
9 | ; last update: 05/10/2010 |
||
10 | ; written by: Marat Zakiyanov aka Mario79, aka Mario |
||
11 | ; changes: Fixed window flicker when redrawing, |
||
12 | ; Fixed memory leak for stack |
||
13 | ;-------------------------------------------------------- |
||
1632 | mario79 | 14 | ; version: 1.2 |
15 | ; last update: 30/09/2010 |
||
16 | ; written by: Marat Zakiyanov aka Mario79, aka Mario |
||
17 | ; changes: Program used function 68 instead 64 is now, |
||
18 | ; select path with OpenDialog |
||
19 | ;-------------------------------------------------------- |
||
20 | ; version 1.1 year 9.12.2006 |
||
255 | heavyiron | 21 | ; AUTORS: |
22 | ; programming by andrew_programmer |
||
1632 | mario79 | 23 | ; design by golus |
255 | heavyiron | 24 | |
180 | heavyiron | 25 | use32 |
1632 | mario79 | 26 | org 0x0 |
27 | db 'MENUET01' |
||
28 | dd 0x1 |
||
29 | dd START |
||
30 | dd IM_END |
||
6328 | IgorA | 31 | dd I_END |
32 | dd stacktop |
||
1632 | mario79 | 33 | dd file_path ;parameters |
34 | dd cur_dir_path |
||
255 | heavyiron | 35 | |
1702 | Lrz | 36 | include '../../../config.inc' ;for nightbuild |
6328 | IgorA | 37 | include '../../../macros.inc' |
38 | include '../../../proc32.inc' |
||
39 | include '../../../KOSfuncs.inc' |
||
1632 | mario79 | 40 | include '../../../develop/libraries/box_lib/load_lib.mac' |
6328 | IgorA | 41 | include '../../../dll.inc' |
42 | include '../../../libio.inc' |
||
43 | |||
44 | @use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load |
||
45 | |||
1632 | mario79 | 46 | COLOR_ORDER equ MENUETOS |
47 | include 'gif_lite.inc' |
||
48 | include 'bmplib.inc' |
||
49 | include 'dialog2.inc' |
||
50 | include 'design.inc' |
||
51 | include 'graphlib.inc' |
||
255 | heavyiron | 52 | |
1632 | mario79 | 53 | include 'cursors.inc' |
255 | heavyiron | 54 | |
1632 | mario79 | 55 | include 'load_from_parameters.inc' |
255 | heavyiron | 56 | |
180 | heavyiron | 57 | START: |
1632 | mario79 | 58 | mcall 68,11 |
59 | |||
60 | load_libraries l_libs_start,end_l_libs |
||
180 | heavyiron | 61 | |
1632 | mario79 | 62 | cmp eax,-1 |
63 | jz close |
||
180 | heavyiron | 64 | ;-------------------------------------------------------- |
65 | ;---------------set events mask-------------------------- |
||
66 | ;-------------------------------------------------------- |
||
3951 | mario79 | 67 | mcall 40,0x80000067 ; 1100111b |
180 | heavyiron | 68 | ;--------------------------------------------------------- |
255 | heavyiron | 69 | ;-----------------------init data------------------------- |
180 | heavyiron | 70 | ;--------------------------------------------------------- |
1632 | mario79 | 71 | include 'init_data.inc' |
72 | |||
180 | heavyiron | 73 | ;---------------------------------------------------------- |
74 | ;--------get memory and draw window of program------------- |
||
75 | ;---------------------------------------------------------- |
||
1632 | mario79 | 76 | call GetMemory |
77 | call cleare_work_arrea |
||
78 | call load_icons |
||
255 | heavyiron | 79 | |
1632 | mario79 | 80 | ;load cursors |
81 | mov eax,CursorsID |
||
82 | call load_cursors |
||
255 | heavyiron | 83 | |
1632 | mario79 | 84 | call drawwin |
255 | heavyiron | 85 | ;--------------------------------------------------------- |
1643 | mario79 | 86 | ;---------Check loading of file from parameters----------- |
255 | heavyiron | 87 | ;--------------------------------------------------------- |
1632 | mario79 | 88 | mov eax,file_path |
89 | cmp [eax],byte 0 |
||
90 | jz @f |
||
91 | call load_picture |
||
6328 | IgorA | 92 | call MovePictureToWorkScreen |
93 | mov [Scroll1CoordinatX],9 |
||
94 | mov [Scroll2CoordinatY],89 |
||
1632 | mario79 | 95 | @@: |
255 | heavyiron | 96 | |
1632 | mario79 | 97 | ;--------------------------------------------------------------------- |
98 | mov edi,filename_area |
||
99 | mov esi,path4+5 |
||
100 | call copy_str_1 |
||
101 | |||
102 | mov edi,file_path |
||
103 | cmp [edi],byte 0 |
||
104 | jne @f |
||
105 | mov esi,path4 |
||
106 | call copy_str_1 |
||
107 | @@: |
||
108 | ;OpenDialog initialisation |
||
109 | push dword OpenDialog_data |
||
110 | call [OpenDialog_Init] |
||
111 | ;--------------------------------------------------------------------- |
||
180 | heavyiron | 112 | ;---------------------------------------------------------- |
113 | ;---------------------MAIN LOOP---------------------------- |
||
114 | ;---------------------------------------------------------- |
||
1643 | mario79 | 115 | red: |
116 | call drawwin |
||
1632 | mario79 | 117 | still: |
118 | call event |
||
1643 | mario79 | 119 | |
1632 | mario79 | 120 | cmp eax,1 |
1643 | mario79 | 121 | je red |
255 | heavyiron | 122 | |
1632 | mario79 | 123 | cmp eax,2 |
124 | je keys |
||
180 | heavyiron | 125 | |
1632 | mario79 | 126 | cmp eax,3 |
127 | je buttons |
||
255 | heavyiron | 128 | |
1632 | mario79 | 129 | cmp eax,6 |
130 | je mouse |
||
255 | heavyiron | 131 | |
1632 | mario79 | 132 | jmp still |
133 | |||
134 | ;--------------------------------------------------------------------- |
||
135 | copy_str_1: |
||
136 | xor eax,eax |
||
137 | cld |
||
138 | @@: |
||
139 | lodsb |
||
140 | stosb |
||
141 | test eax,eax |
||
142 | jnz @b |
||
143 | ret |
||
144 | ;--------------------------------------------------------------------- |
||
180 | heavyiron | 145 | ;--------------------------------------------------------- |
146 | ;--------------------------------------------------------- |
||
147 | ;--------------------------------------------------------- |
||
1632 | mario79 | 148 | include 'events.inc' |
149 | include 'events_of_window.inc' |
||
150 | include 'events_of_keys.inc' |
||
151 | include 'events_of_buttons.inc' |
||
152 | include 'events_of_mouse.inc' |
||
153 | include 'panel_engen.inc' |
||
154 | include 'screen.inc' |
||
1643 | mario79 | 155 | include 'menu_instruments.inc' |
1632 | mario79 | 156 | include 'icons_instruments.inc' |
157 | include 'icons.inc' |
||
158 | include 'sprites.inc' |
||
159 | include 'string.inc' |
||
160 | include 'palette.inc' |
||
161 | include 'files.inc' |
||
162 | include 'time.inc' |
||
163 | include 'memory.inc' |
||
180 | heavyiron | 164 | ;----------------------------------------------------------- |
255 | heavyiron | 165 | ;------------variables and data of program------------------ |
180 | heavyiron | 166 | ;----------------------------------------------------------- |
1632 | mario79 | 167 | sound_havent_memory db 150,64,0 |
1643 | mario79 | 168 | |
1632 | mario79 | 169 | include 'lib_data.inc' |
170 | include 'panel_data.inc' |
||
171 | include 'palitra256.inc' |
||
172 | include 'brushes.inc' |
||
173 | include 'spray.inc' |
||
174 | include 'width_lines.inc' |
||
180 | heavyiron | 175 | ;---------------------------------------------------------- |
255 | heavyiron | 176 | ;-------------------ICON"S picture------------------------- |
180 | heavyiron | 177 | ;---------------------------------------------------------- |
1632 | mario79 | 178 | dd 0 |
255 | heavyiron | 179 | panel_picture: |
180 | file 'panel_buttons.gif' |
||
6328 | IgorA | 181 | .end: |
255 | heavyiron | 182 | ;****************cursors****************** |
183 | brush_cursor: |
||
184 | file 'brush.cur' |
||
1632 | mario79 | 185 | ;---------------------------------------------------------- |
255 | heavyiron | 186 | flood_fill_cursor: |
187 | file 'flood_fill.cur' |
||
1632 | mario79 | 188 | ;---------------------------------------------------------- |
255 | heavyiron | 189 | lastik_cursor: |
190 | file 'lastik.cur' |
||
1632 | mario79 | 191 | ;---------------------------------------------------------- |
255 | heavyiron | 192 | other_cursor: |
193 | file 'other.cur' |
||
1632 | mario79 | 194 | ;---------------------------------------------------------- |
255 | heavyiron | 195 | pencil_cursor: |
196 | file 'pencil.cur' |
||
1632 | mario79 | 197 | ;---------------------------------------------------------- |
255 | heavyiron | 198 | pipette_cursor: |
199 | file 'pipette.cur' |
||
1632 | mario79 | 200 | ;---------------------------------------------------------- |
255 | heavyiron | 201 | spray_cursor: |
202 | file 'spray.cur' |
||
1632 | mario79 | 203 | ;---------------------------------------------------------- |
255 | heavyiron | 204 | zoom_cursor: |
205 | file 'zoom.cur' |
||
180 | heavyiron | 206 | ;---------------------------------------------------------- |
1632 | mario79 | 207 | IM_END: |
208 | ;----------------------------------------------------------- |
||
209 | ;------------variables and data of program------------------ |
||
210 | ;----------------------------------------------------------- |
||
211 | time rd 1 |
||
212 | PosX rd 1 |
||
213 | PosY rd 1 |
||
214 | PointerToIcons rd 1 |
||
215 | ScreenPointer rd 1 |
||
216 | PointerToPicture rd 1 |
||
217 | PointerToCopyPicture rd 1 |
||
218 | PointerToCopyPicture2 rd 1 |
||
219 | PointerToEditBufer rd 1 |
||
220 | PointerToSpriteBufer rd 1 |
||
221 | PointerToPalette rd 1 |
||
222 | Color rd 1 |
||
223 | Number_Brush rd 1 |
||
224 | Brush_SizeX rd 1 |
||
225 | Brush_SizeY rd 1 |
||
226 | Current_instrument rd 1 |
||
227 | Last_instrument rd 1 |
||
228 | Activate_instrument rb 1 |
||
229 | SColor rd 1 |
||
230 | OldX rd 1 |
||
231 | OldY rd 1 |
||
180 | heavyiron | 232 | |
1632 | mario79 | 233 | MouseX rd 1 |
234 | MouseY rd 1 |
||
235 | Window_SizeX rd 1 |
||
236 | Window_SizeY rd 1 |
||
237 | Window_CordinatX rd 1 |
||
238 | Window_CordinatY rd 1 |
||
239 | Picture_SizeX rd 1 |
||
240 | Picture_SizeY rd 1 |
||
241 | ScreenX rd 1 |
||
242 | ScreenY rd 1 |
||
243 | WorkScreen_SizeX rd 1 |
||
244 | WorkScreen_SizeY rd 1 |
||
245 | MaxWorkScreen_SizeX rd 1 |
||
246 | MaxWorkScreen_SizeY rd 1 |
||
247 | k rd 1 |
||
180 | heavyiron | 248 | |
1632 | mario79 | 249 | ReserveArray rd 1 |
250 | register rd 1 |
||
251 | CounterX rd 1 |
||
252 | CounterY rd 1 |
||
253 | OffsetYPicture rd 1 |
||
254 | OffsetYWorkScreen rd 1 |
||
255 | OffsetYBigPixel rd 1 |
||
256 | |||
257 | Icon_X rd 1 |
||
258 | Icon_Y rd 1 |
||
259 | counter rd 1 |
||
260 | counter2 rd 1 |
||
261 | Icon_text_x rd 1 |
||
262 | Icon_text_y rd 1 |
||
263 | Panel_flag rb 1 |
||
264 | counter_menu rd 1 |
||
265 | menu_coordinat_x rd 1 |
||
266 | menu_size_x rd 1 |
||
267 | menu_counter rd 1 |
||
268 | counter_11 rd 1 |
||
269 | number_panel rd 1 |
||
270 | number_menu rd 1 |
||
271 | |||
272 | Scroll1CoordinatX rd 1 |
||
273 | Scroll1CoordinatY rd 1 |
||
274 | Scroll1MaxSizeX rd 1 |
||
275 | Scroll1MaxSizeY rd 1 |
||
276 | Scroll1SizeX rd 1 |
||
277 | Scroll1FreeX rd 1 |
||
278 | |||
279 | Scroll2CoordinatX rd 1 |
||
280 | Scroll2CoordinatY rd 1 |
||
281 | Scroll2MaxSizeX rd 1 |
||
282 | Scroll2MaxSizeY rd 1 |
||
283 | Scroll2SizeY rd 1 |
||
284 | Scroll2FreeY rd 1 |
||
285 | |||
286 | ;extended_memory rd 1 |
||
287 | type rw 1 |
||
288 | x rd 1 |
||
289 | y rd 1 |
||
290 | save_flag rb 1 |
||
291 | exit_from_work_arrea rb 1 |
||
292 | |||
293 | Radius rd 1 |
||
294 | Dx_ rd 1 |
||
295 | Dy_ rd 1 |
||
296 | line_width rd 1 |
||
297 | lastik_is_active rb 1 |
||
298 | a_ellips rd 1 |
||
299 | b_ellips rd 1 |
||
300 | instrument_used rb 1 |
||
301 | used_OldX rd 1 |
||
302 | used_OldY rd 1 |
||
303 | rectangular_shade_x rd 1 |
||
304 | rectangular_shade_y rd 1 |
||
305 | crossing_old_x rd 1 |
||
306 | crossing_old_y rd 1 |
||
307 | crossing rd 1 |
||
308 | finishing_crossing rd 1 |
||
309 | number_undo rd 1 |
||
310 | DrawSprite_flag rb 1 |
||
311 | Paste_flag rb 1 |
||
312 | SpriteSizeX rd 1 |
||
313 | SpriteSizeY rd 1 |
||
314 | SpriteCoordinatX rd 1 |
||
315 | SpriteCoordinatY rd 1 |
||
316 | SpriteOldCoordinatX rd 1 |
||
317 | SpriteOldCoordinatY rd 1 |
||
318 | ;--------------------------------------------------------------------- |
||
552 | diamond | 319 | IncludeUGlobals |
1632 | mario79 | 320 | ;--------------------------------------------------------------------- |
321 | align 4 |
||
322 | CursorsID rd 10 |
||
323 | ;--------------------------------------------------------------------- |
||
324 | align 4 |
||
6328 | IgorA | 325 | file_path rb 4096 |
326 | filename_area rb 256 |
||
327 | temp_dir_pach rb 4096 |
||
328 | library_path rb 4096 |
||
329 | cur_dir_path rb 4096 |
||
330 | procinfo: rb 1024 |
||
1632 | mario79 | 331 | ;--------------------------------------------------------------------- |
332 | align 4 |
||
333 | rb 4096 |
||
334 | stacktop: |
||
335 | ;--------------------------------------------------------------------- |
||
336 | I_END: |