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