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