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