Rev 6369 | Rev 6385 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6362 | IgorA | 1 | macro instrument_set m_num, code |
2 | { |
||
3 | local no_instrument |
||
4 | cmp [number_menu],m_num |
||
5 | jne no_instrument |
||
6 | mov [Current_instrument],code |
||
7 | call TakeButtonInstruments |
||
8 | jmp end_menu |
||
9 | no_instrument: |
||
10 | } |
||
11 | |||
255 | heavyiron | 12 | ;----------------------------------------------------------- |
13 | ;-----------instruments of menu----------------------------- |
||
14 | ;----------------------------------------------------------- |
||
6362 | IgorA | 15 | align 4 |
255 | heavyiron | 16 | TakeInstruments: |
1643 | mario79 | 17 | ;|||||||||||||||||||FILE|||||||||||||||||||||| |
18 | cmp [number_panel],7 |
||
19 | jne no_file |
||
255 | heavyiron | 20 | |
6359 | IgorA | 21 | ; <<< New >>> |
1643 | mario79 | 22 | cmp [number_menu],1 |
23 | jne no_new |
||
255 | heavyiron | 24 | |
6359 | IgorA | 25 | call dialog2_draw |
255 | heavyiron | 26 | |
1643 | mario79 | 27 | mov edx,1000000000000000000000000000000b+1000 |
6342 | IgorA | 28 | mcall SF_DEFINE_BUTTON,<177,40>,<115,14>, |
255 | heavyiron | 29 | |
1643 | mario79 | 30 | mov edx,1000000000000000000000000000000b+1001 |
6359 | IgorA | 31 | mcall ,,<139,14>, |
255 | heavyiron | 32 | |
1643 | mario79 | 33 | mov edx,1000000000000000000000000000000b+1002 |
6359 | IgorA | 34 | mcall ,,<170,15> |
255 | heavyiron | 35 | |
1643 | mario79 | 36 | no_activate_space: |
6359 | IgorA | 37 | mcall SF_SLEEP, 5 ;fix cpu use 100% |
6342 | IgorA | 38 | mcall SF_WAIT_EVENT |
255 | heavyiron | 39 | |
6359 | IgorA | 40 | cmp eax,1 ;redraw window |
41 | jne @f |
||
42 | call dialog2_draw |
||
43 | jmp no_activate_space |
||
44 | @@: |
||
255 | heavyiron | 45 | |
6359 | IgorA | 46 | cmp eax,3 ;press button |
47 | jne no_activate_space |
||
255 | heavyiron | 48 | |
6342 | IgorA | 49 | mcall SF_GET_BUTTON |
1643 | mario79 | 50 | shr eax,8 |
255 | heavyiron | 51 | |
1643 | mario79 | 52 | cmp eax,1000 |
53 | jl no_activate_space |
||
255 | heavyiron | 54 | |
1643 | mario79 | 55 | cmp eax,1000 |
56 | jne no_picture_size_x |
||
255 | heavyiron | 57 | |
1643 | mario79 | 58 | mov eax,180 |
59 | mov ebx,119 |
||
60 | mov ecx,5 |
||
61 | call dialog_line |
||
255 | heavyiron | 62 | |
1643 | mario79 | 63 | mov eax,string_ |
64 | mov ebx,13 |
||
65 | call find_symvol |
||
255 | heavyiron | 66 | |
1643 | mario79 | 67 | dec eax |
68 | mov [length_number],eax |
||
69 | mov eax,string_ |
||
6359 | IgorA | 70 | call str_to_int |
255 | heavyiron | 71 | |
1643 | mario79 | 72 | mov [Picture_SizeX],eax |
73 | jmp no_activate_space |
||
74 | ;--------------------------------------------------------------------- |
||
75 | no_picture_size_x: |
||
76 | cmp eax,1001 |
||
77 | jne no_picture_size_y |
||
255 | heavyiron | 78 | |
1643 | mario79 | 79 | mov eax,180 |
80 | mov ebx,119+24 |
||
81 | mov ecx,5 |
||
82 | call dialog_line |
||
255 | heavyiron | 83 | |
1643 | mario79 | 84 | mov eax,string_ |
85 | mov ebx,13 |
||
86 | call find_symvol |
||
255 | heavyiron | 87 | |
1643 | mario79 | 88 | dec eax |
89 | mov [length_number],eax |
||
90 | mov eax,string_ |
||
6359 | IgorA | 91 | call str_to_int |
255 | heavyiron | 92 | |
1643 | mario79 | 93 | mov [Picture_SizeY],eax |
94 | jmp no_activate_space |
||
95 | ;--------------------------------------------------------------------- |
||
96 | no_picture_size_y: |
||
97 | cmp eax,1002 |
||
98 | jne no_activate_space |
||
255 | heavyiron | 99 | |
1643 | mario79 | 100 | exit_new: |
101 | mov edx,11100000000000000000000000000000b+1002 |
||
6359 | IgorA | 102 | mcall SF_DEFINE_BUTTON,<177,40>,<170,15> |
255 | heavyiron | 103 | |
1643 | mario79 | 104 | mov edx,11100000000000000000000000000000b+1001 |
6359 | IgorA | 105 | mcall ,,<139,14> |
255 | heavyiron | 106 | |
1643 | mario79 | 107 | mov edx,11100000000000000000000000000000b+1000 |
108 | mcall ,,<115,14> |
||
255 | heavyiron | 109 | |
1643 | mario79 | 110 | ;get memory for new picture |
6359 | IgorA | 111 | call GetMemory |
255 | heavyiron | 112 | |
1643 | mario79 | 113 | and [save_flag],0 |
255 | heavyiron | 114 | |
6359 | IgorA | 115 | call cleare_work_arrea |
116 | call drawwin |
||
6362 | IgorA | 117 | jmp end_menu |
1643 | mario79 | 118 | ;--------------------------------------------------------------------- |
119 | no_new: |
||
6359 | IgorA | 120 | ; <<< Open >>> |
1643 | mario79 | 121 | cmp [number_menu],2 |
122 | jne no_open |
||
255 | heavyiron | 123 | |
1632 | mario79 | 124 | ;--------------------------------------------------------------------- |
125 | mov [OpenDialog_data.type],0 ; open |
||
126 | |||
127 | push dword OpenDialog_data |
||
128 | call [OpenDialog_Start] |
||
129 | |||
130 | cmp [OpenDialog_data.status],1 |
||
6362 | IgorA | 131 | jne end_menu |
1632 | mario79 | 132 | ;--------------------------------------------------------------------- |
6342 | IgorA | 133 | mcall SF_SET_EVENTS_MASK,0x80000027 ;100111b |
1632 | mario79 | 134 | |
6328 | IgorA | 135 | call load_picture |
6342 | IgorA | 136 | call drawwin |
6362 | IgorA | 137 | jmp end_menu |
1643 | mario79 | 138 | ;--------------------------------------------------------------------- |
139 | no_open: |
||
6359 | IgorA | 140 | ; <<< Save >>> |
1643 | mario79 | 141 | cmp [number_menu],3 |
142 | jne no_save_ |
||
255 | heavyiron | 143 | |
1643 | mario79 | 144 | mov al,[save_flag] |
6362 | IgorA | 145 | test al,al |
146 | jz end_menu |
||
1643 | mario79 | 147 | jmp save_enter |
148 | ;--------------------------------------------------------------------- |
||
149 | no_save_: |
||
6359 | IgorA | 150 | ; <<< Save as >>> |
1643 | mario79 | 151 | cmp [number_menu],4 |
152 | jne no_save |
||
255 | heavyiron | 153 | |
1643 | mario79 | 154 | ; savedialog drawwin,save1,save2,file_path |
1632 | mario79 | 155 | ;--------------------------------------------------------------------- |
1636 | mario79 | 156 | ; replace extension to '.bmp' |
157 | push eax esi |
||
158 | mov esi,[OpenDialog_data.filename_area] |
||
159 | xor eax,eax |
||
160 | cld |
||
161 | @@: |
||
162 | lodsb |
||
163 | test eax,eax |
||
164 | jnz @r |
||
1643 | mario79 | 165 | sub esi,5 |
1636 | mario79 | 166 | cmp [esi],byte '.' |
167 | jne @f |
||
1643 | mario79 | 168 | mov [esi],dword '.bmp' |
1636 | mario79 | 169 | @@: |
170 | pop esi eax |
||
171 | ;--------------------------------------------------------------------- |
||
1632 | mario79 | 172 | mov [OpenDialog_data.type],1 ; save |
6359 | IgorA | 173 | stdcall [OpenDialog_Start],OpenDialog_data |
1643 | mario79 | 174 | |
1632 | mario79 | 175 | cmp [OpenDialog_data.status],1 |
6362 | IgorA | 176 | jne end_menu |
1632 | mario79 | 177 | ;--------------------------------------------------------------------- |
1643 | mario79 | 178 | save1: |
179 | save_enter: |
||
6342 | IgorA | 180 | mcall SF_SET_EVENTS_MASK,0x80000027 ;100111b |
255 | heavyiron | 181 | |
6359 | IgorA | 182 | call analizing_picture_to_palette |
255 | heavyiron | 183 | |
1643 | mario79 | 184 | ;eax => number of colors in picture |
185 | mov ebx,[PointerToPicture] |
||
186 | mov ecx,[PointerToEditBufer] |
||
187 | mov edx,[PointerToPalette] |
||
188 | mov esi,[Picture_SizeX] |
||
189 | mov edi,[Picture_SizeY] |
||
255 | heavyiron | 190 | |
1643 | mario79 | 191 | call coding_bmp |
255 | heavyiron | 192 | |
1643 | mario79 | 193 | mov eax,file_path |
194 | mov ecx,ebx |
||
195 | mov ebx,[PointerToEditBufer] |
||
255 | heavyiron | 196 | |
1643 | mario79 | 197 | call save_file |
255 | heavyiron | 198 | |
1643 | mario79 | 199 | mov [save_flag],1 |
6362 | IgorA | 200 | call drawwin |
201 | jmp end_menu |
||
1643 | mario79 | 202 | ;--------------------------------------------------------------------- |
203 | no_save: |
||
6359 | IgorA | 204 | ; <<< Exit >>> |
1643 | mario79 | 205 | cmp [number_menu],5 |
206 | jne no_exit_program |
||
255 | heavyiron | 207 | |
6355 | IgorA | 208 | mcall SF_TERMINATE_PROCESS |
1643 | mario79 | 209 | ;--------------------------------------------------------------------- |
210 | no_exit_program: |
||
211 | no_file: |
||
212 | ;|||||||||||||||||||||||||||||EDIT||||||||||||||||||||||||| |
||
213 | cmp [number_panel],6 |
||
6359 | IgorA | 214 | jne no_edit |
255 | heavyiron | 215 | |
6359 | IgorA | 216 | ; <<< Undo >>> |
1643 | mario79 | 217 | cmp [number_menu],1 |
218 | jne no_undo |
||
255 | heavyiron | 219 | |
6355 | IgorA | 220 | cmp [number_undo],2 ;2 - maximum undo count |
6364 | IgorA | 221 | jge end_menu |
255 | heavyiron | 222 | |
6355 | IgorA | 223 | ;rotate bufers -1 |
224 | inc [number_undo] |
||
225 | mov eax,[PointerToPicture] |
||
226 | mov ebx,[PointerToCopyPicture] |
||
227 | mov ecx,[PointerToCopyPicture2] |
||
228 | mov [PointerToPicture],ebx |
||
229 | mov [PointerToCopyPicture],ecx |
||
230 | mov [PointerToCopyPicture2],eax |
||
255 | heavyiron | 231 | |
6355 | IgorA | 232 | call MovePictureToWorkScreen |
6362 | IgorA | 233 | jmp end_menu |
1643 | mario79 | 234 | ;--------------------------------------------------------------------- |
235 | no_undo: |
||
6359 | IgorA | 236 | ; <<< Redo >>> |
237 | cmp [number_menu],2 |
||
238 | jne no_redo |
||
239 | |||
240 | cmp [number_undo],0 |
||
6364 | IgorA | 241 | je end_menu |
6359 | IgorA | 242 | |
243 | ;rotate bufers +1 |
||
244 | dec [number_undo] |
||
245 | mov eax,[PointerToPicture] |
||
246 | mov ebx,[PointerToCopyPicture] |
||
247 | mov ecx,[PointerToCopyPicture2] |
||
248 | mov [PointerToPicture],ecx |
||
249 | mov [PointerToCopyPicture],eax |
||
250 | mov [PointerToCopyPicture2],ebx |
||
251 | |||
252 | call MovePictureToWorkScreen |
||
6362 | IgorA | 253 | jmp end_menu |
6359 | IgorA | 254 | ;--------------------------------------------------------------------- |
255 | no_redo: |
||
256 | ; <<< Copy >>> |
||
257 | cmp [number_menu],3 |
||
1643 | mario79 | 258 | jne no_copy |
255 | heavyiron | 259 | |
1643 | mario79 | 260 | cmp [instrument_used],1 |
6364 | IgorA | 261 | jne end_menu |
1643 | mario79 | 262 | cmp [Activate_instrument],0 |
6364 | IgorA | 263 | jne end_menu |
255 | heavyiron | 264 | |
1643 | mario79 | 265 | mov eax,[OldX] |
266 | mov ebx,[OldY] |
||
255 | heavyiron | 267 | |
1643 | mario79 | 268 | cmp eax,[rectangular_shade_x] |
269 | jl no_remove_x_copy |
||
255 | heavyiron | 270 | |
1643 | mario79 | 271 | mov ecx,[rectangular_shade_x] |
272 | mov [OldX],ecx ; OldX <-----> rectangulare_shade_x |
||
273 | mov [rectangular_shade_x],eax |
||
255 | heavyiron | 274 | |
1643 | mario79 | 275 | no_remove_x_copy: |
276 | cmp ebx,[rectangular_shade_y] |
||
277 | jl no_remove_y_copy |
||
255 | heavyiron | 278 | |
1643 | mario79 | 279 | mov ecx,[rectangular_shade_y] |
280 | mov [OldY],ecx ; OldY <-----> rectangulare_shade_y |
||
281 | mov [rectangular_shade_y],ebx |
||
255 | heavyiron | 282 | |
1643 | mario79 | 283 | no_remove_y_copy: |
284 | mov eax,[OldX] |
||
285 | mov ebx,[OldY] |
||
286 | mov ecx,[rectangular_shade_x] |
||
287 | mov edx,[rectangular_shade_y] |
||
288 | inc eax |
||
289 | inc ebx |
||
290 | dec ecx |
||
291 | dec edx |
||
255 | heavyiron | 292 | |
1643 | mario79 | 293 | mov [x],eax |
294 | mov [y],ebx |
||
295 | mov esi,eax |
||
296 | mov edi,ebx |
||
297 | mov [Dx_],1 |
||
298 | mov [Dy_],1 |
||
255 | heavyiron | 299 | |
1643 | mario79 | 300 | sub ecx,eax |
301 | jnz no_signum_fill_r_x_copy |
||
255 | heavyiron | 302 | |
1643 | mario79 | 303 | mov [Dx_],-1 |
255 | heavyiron | 304 | |
1643 | mario79 | 305 | no_signum_fill_r_x_copy: |
306 | sub edx,ebx |
||
307 | jnz no_signum_fill_r_y_copy |
||
255 | heavyiron | 308 | |
1643 | mario79 | 309 | mov [Dy_],-1 |
255 | heavyiron | 310 | |
1643 | mario79 | 311 | no_signum_fill_r_y_copy: |
312 | mov ebx,[rectangular_shade_y] |
||
313 | sub ebx,edi |
||
255 | heavyiron | 314 | |
1643 | mario79 | 315 | mov edx,[PointerToEditBufer] |
6369 | IgorA | 316 | mov eax,[rectangular_shade_x] |
317 | sub eax,[OldX] |
||
318 | mov [edx],eax ;image.w |
||
319 | mov eax,[rectangular_shade_y] |
||
320 | sub eax,[OldY] |
||
321 | mov [edx+4],eax ;image.h |
||
322 | mov dword[edx+8],24 ;bit in pixel |
||
323 | add edx,12 ;copy image parametrs |
||
1643 | mario79 | 324 | mov [y],edi |
255 | heavyiron | 325 | |
1643 | mario79 | 326 | loop_fill_rectangle_y_copy: |
327 | mov [x],esi |
||
255 | heavyiron | 328 | |
1643 | mario79 | 329 | loop_fill_rectangle_x_copy: |
330 | push esi edi |
||
331 | mov eax,[PointerToPicture] |
||
332 | mov ebx,[Picture_SizeX] |
||
333 | mov esi,[x] |
||
334 | mov edi,[y] |
||
335 | call GetColorOfPixel |
||
336 | mov [edx],ax |
||
337 | shr eax,16 |
||
338 | mov [edx+2],al |
||
339 | pop edi esi |
||
255 | heavyiron | 340 | |
1643 | mario79 | 341 | add edx,3 |
342 | mov eax,[x] |
||
343 | add eax,[Dx_] |
||
344 | mov [x],eax |
||
255 | heavyiron | 345 | |
1643 | mario79 | 346 | cmp eax,[rectangular_shade_x] |
347 | jl loop_fill_rectangle_x_copy |
||
255 | heavyiron | 348 | |
1643 | mario79 | 349 | mov eax,[y] |
350 | add eax,[Dy_] |
||
351 | mov [y],eax |
||
255 | heavyiron | 352 | |
1643 | mario79 | 353 | cmp eax,[rectangular_shade_y] |
354 | jl loop_fill_rectangle_y_copy |
||
255 | heavyiron | 355 | |
6369 | IgorA | 356 | ;...todo use system buffer... |
357 | ;mcall SF_CLIPBOARD,SSF_WRITE_CB,,[PointerToEditBufer] |
||
358 | |||
1643 | mario79 | 359 | call MovePictureToWorkScreen |
360 | mov [DrawSprite_flag],1 |
||
6362 | IgorA | 361 | jmp end_menu |
1643 | mario79 | 362 | ;--------------------------------------------------------------------- |
363 | no_copy: |
||
6359 | IgorA | 364 | ; <<< Paste >>> |
365 | cmp [number_menu],4 |
||
1643 | mario79 | 366 | jne no_paste |
255 | heavyiron | 367 | |
1643 | mario79 | 368 | cmp [instrument_used],1 |
369 | jne no_paste |
||
255 | heavyiron | 370 | |
1643 | mario79 | 371 | cmp [Activate_instrument],0 |
372 | jne no_paste |
||
255 | heavyiron | 373 | |
1643 | mario79 | 374 | mov eax,[OldX] |
375 | mov ebx,[OldY] |
||
255 | heavyiron | 376 | |
1643 | mario79 | 377 | cmp eax,[rectangular_shade_x] |
378 | jl no_remove_x_paste |
||
255 | heavyiron | 379 | |
1643 | mario79 | 380 | mov ecx,[rectangular_shade_x] |
381 | mov [OldX],ecx ; OldX <-----> rectangulare_shade_x |
||
382 | mov [rectangular_shade_x],eax |
||
255 | heavyiron | 383 | |
1643 | mario79 | 384 | no_remove_x_paste: |
385 | cmp ebx,[rectangular_shade_y] |
||
386 | jl no_remove_y_paste |
||
255 | heavyiron | 387 | |
1643 | mario79 | 388 | mov ecx,[rectangular_shade_y] |
389 | mov [OldY],ecx ; OldY <-----> rectangulare_shade_y |
||
390 | mov [rectangular_shade_y],ebx |
||
255 | heavyiron | 391 | |
1643 | mario79 | 392 | no_remove_y_paste: |
393 | mov eax,[OldX] |
||
394 | mov ebx,[OldY] |
||
395 | mov ecx,[rectangular_shade_x] |
||
396 | mov edx,[rectangular_shade_y] |
||
397 | inc eax |
||
398 | inc ebx |
||
399 | dec ecx |
||
400 | dec edx |
||
255 | heavyiron | 401 | |
1643 | mario79 | 402 | mov [x],eax |
403 | mov [y],ebx |
||
404 | mov esi,eax |
||
405 | mov edi,ebx |
||
406 | mov [Dx_],1 |
||
407 | mov [Dy_],1 |
||
255 | heavyiron | 408 | |
1643 | mario79 | 409 | sub ecx,eax |
410 | jnz no_signum_fill_r_x_paste |
||
255 | heavyiron | 411 | |
1643 | mario79 | 412 | mov [Dx_],-1 |
255 | heavyiron | 413 | |
1643 | mario79 | 414 | no_signum_fill_r_x_paste: |
415 | sub edx,ebx |
||
416 | jnz no_signum_fill_r_y_paste |
||
255 | heavyiron | 417 | |
1643 | mario79 | 418 | mov [Dy_],-1 |
255 | heavyiron | 419 | |
1643 | mario79 | 420 | no_signum_fill_r_y_paste: |
421 | mov edx,[PointerToEditBufer] |
||
6369 | IgorA | 422 | cmp dword[edx+8],24 |
423 | jne end_menu |
||
424 | mov eax,[edx] |
||
425 | add eax,[OldX] |
||
426 | mov [paste_img_w],eax |
||
427 | mov eax,[edx+4] |
||
428 | add eax,[OldY] |
||
429 | mov [paste_img_h],eax |
||
430 | add edx,12 ;copy image parametrs |
||
1643 | mario79 | 431 | mov [y],edi |
255 | heavyiron | 432 | |
1643 | mario79 | 433 | loop_fill_rectangle_y_paste: |
434 | mov [x],esi |
||
255 | heavyiron | 435 | |
1643 | mario79 | 436 | loop_fill_rectangle_x_paste: |
437 | push esi edi |
||
438 | mov ecx,[edx] |
||
439 | and ecx,0xffffff ;color |
||
440 | mov eax,[PointerToPicture] |
||
441 | mov ebx,[Picture_SizeX] |
||
442 | mov esi,[x] |
||
443 | mov edi,[y] |
||
444 | call PutPixel |
||
445 | pop edi esi |
||
255 | heavyiron | 446 | |
1643 | mario79 | 447 | add edx,3 |
255 | heavyiron | 448 | |
1643 | mario79 | 449 | mov eax,[x] |
450 | add eax,[Dx_] |
||
6369 | IgorA | 451 | cmp eax,[paste_img_w] |
452 | je no_paste_data_x |
||
1643 | mario79 | 453 | mov [x],eax |
454 | cmp eax,[rectangular_shade_x] |
||
455 | jl loop_fill_rectangle_x_paste |
||
6369 | IgorA | 456 | no_paste_data_x: |
255 | heavyiron | 457 | |
1643 | mario79 | 458 | mov eax,[y] |
459 | add eax,[Dy_] |
||
6369 | IgorA | 460 | cmp eax,[paste_img_h] |
461 | je no_paste_data_y |
||
1643 | mario79 | 462 | mov [y],eax |
463 | cmp eax,[rectangular_shade_y] |
||
464 | jl loop_fill_rectangle_y_paste |
||
6369 | IgorA | 465 | no_paste_data_y: |
255 | heavyiron | 466 | |
1643 | mario79 | 467 | call MovePictureToWorkScreen |
468 | mov [Paste_flag],1 |
||
6362 | IgorA | 469 | jmp end_menu |
1643 | mario79 | 470 | ;--------------------------------------------------------------------- |
471 | no_paste: |
||
6359 | IgorA | 472 | ; <<< Cut >>> |
473 | cmp [number_menu],5 |
||
1643 | mario79 | 474 | jne no_cut |
255 | heavyiron | 475 | |
1643 | mario79 | 476 | cmp [instrument_used],1 |
477 | jne no_cut |
||
255 | heavyiron | 478 | |
1643 | mario79 | 479 | cmp [Activate_instrument],0 |
480 | jne no_cut |
||
255 | heavyiron | 481 | |
1643 | mario79 | 482 | mov eax,[OldX] |
483 | mov ebx,[OldY] |
||
255 | heavyiron | 484 | |
1643 | mario79 | 485 | cmp eax,[rectangular_shade_x] |
486 | jl no_remove_x_cut |
||
255 | heavyiron | 487 | |
1643 | mario79 | 488 | mov ecx,[rectangular_shade_x] |
489 | mov [OldX],ecx ; OldX <-----> rectangulare_shade_x |
||
490 | mov [rectangular_shade_x],eax |
||
255 | heavyiron | 491 | |
1643 | mario79 | 492 | no_remove_x_cut: |
493 | cmp ebx,[rectangular_shade_y] |
||
494 | jl no_remove_y_cut |
||
255 | heavyiron | 495 | |
1643 | mario79 | 496 | mov ecx,[rectangular_shade_y] |
497 | mov [OldY],ecx ; OldY <-----> rectangulare_shade_y |
||
498 | mov [rectangular_shade_y],ebx |
||
255 | heavyiron | 499 | |
1643 | mario79 | 500 | no_remove_y_cut: |
501 | mov eax,[OldX] |
||
502 | mov ebx,[OldY] |
||
503 | mov ecx,[rectangular_shade_x] |
||
504 | mov edx,[rectangular_shade_y] |
||
505 | inc eax |
||
506 | inc ebx |
||
507 | dec ecx |
||
508 | dec edx |
||
255 | heavyiron | 509 | |
1643 | mario79 | 510 | mov [x],eax |
511 | mov [y],ebx |
||
512 | mov esi,eax |
||
513 | mov edi,ebx |
||
514 | mov [Dx_],1 |
||
515 | mov [Dy_],1 |
||
255 | heavyiron | 516 | |
1643 | mario79 | 517 | sub ecx,eax |
518 | jnz no_signum_fill_r_x |
||
255 | heavyiron | 519 | |
1643 | mario79 | 520 | mov [Dx_],-1 |
255 | heavyiron | 521 | |
1643 | mario79 | 522 | no_signum_fill_r_x: |
523 | sub edx,ebx |
||
524 | jnz no_signum_fill_r_y |
||
255 | heavyiron | 525 | |
1643 | mario79 | 526 | mov [Dy_],-1 |
255 | heavyiron | 527 | |
1643 | mario79 | 528 | no_signum_fill_r_y: |
529 | mov [y],edi |
||
255 | heavyiron | 530 | |
1643 | mario79 | 531 | loop_fill_rectangle_y: |
532 | mov [x],esi |
||
255 | heavyiron | 533 | |
1643 | mario79 | 534 | loop_fill_rectangle_x: |
535 | push esi edi |
||
536 | mov eax,[PointerToPicture] |
||
537 | mov ebx,[Picture_SizeX] |
||
538 | mov ecx,dword 0xffffff |
||
539 | mov esi,[x] |
||
540 | mov edi,[y] |
||
541 | call PutPixel |
||
542 | pop edi esi |
||
255 | heavyiron | 543 | |
1643 | mario79 | 544 | mov eax,[x] |
545 | add eax,[Dx_] |
||
546 | mov [x],eax |
||
255 | heavyiron | 547 | |
1643 | mario79 | 548 | cmp eax,[rectangular_shade_x] |
549 | jl loop_fill_rectangle_x |
||
255 | heavyiron | 550 | |
1643 | mario79 | 551 | mov eax,[y] |
552 | add eax,[Dy_] |
||
553 | mov [y],eax |
||
255 | heavyiron | 554 | |
1643 | mario79 | 555 | cmp eax,[rectangular_shade_y] |
556 | jl loop_fill_rectangle_y |
||
255 | heavyiron | 557 | |
1643 | mario79 | 558 | call MovePictureToWorkScreen |
6362 | IgorA | 559 | jmp end_menu |
1643 | mario79 | 560 | ;--------------------------------------------------------------------- |
561 | no_cut: |
||
6359 | IgorA | 562 | ; <<< Cleare all >>> |
563 | cmp [number_menu],6 |
||
1643 | mario79 | 564 | jne no_cleare_all |
255 | heavyiron | 565 | |
1643 | mario79 | 566 | call cleare_work_arrea |
567 | call MovePictureToWorkScreen |
||
6362 | IgorA | 568 | jmp end_menu |
1643 | mario79 | 569 | ;--------------------------------------------------------------------- |
570 | no_cleare_all: |
||
6359 | IgorA | 571 | ; <<< To allocate all >>> |
572 | cmp [number_menu],7 |
||
6362 | IgorA | 573 | jne end_menu ;no_to_allocate_all |
255 | heavyiron | 574 | |
1643 | mario79 | 575 | mov [OldX],1 |
576 | mov [OldY],1 |
||
577 | mov eax,[Picture_SizeX] |
||
578 | mov ebx,[Picture_SizeY] |
||
579 | dec eax |
||
580 | dec ebx |
||
581 | mov [rectangular_shade_x],eax |
||
582 | mov [rectangular_shade_y],ebx |
||
583 | mov [instrument_used],1 |
||
584 | mov [Activate_instrument],1 |
||
585 | mov [Current_instrument],30 |
||
586 | mov [crossing],0 |
||
587 | ; call TakeButtonInstruments |
||
588 | ; call MovePictureToWorkScreen |
||
6362 | IgorA | 589 | jmp end_menu |
1643 | mario79 | 590 | ;--------------------------------------------------------------------- |
591 | ;no_to_allocate_all: |
||
6359 | IgorA | 592 | no_edit: |
593 | ;|||||||||||||||||||||||||INSTRUMENTS|||||||||||||||||||||| |
||
594 | cmp [number_panel],5 |
||
595 | jne no_instruments |
||
596 | |||
6362 | IgorA | 597 | instrument_set 1,10 ; pensil |
598 | instrument_set 2,11 ; draw brush |
||
599 | instrument_set 3,12 ; spray |
||
600 | instrument_set 4,13 ; lastik |
||
601 | instrument_set 5,14 ; flood fill |
||
602 | instrument_set 6,15 ; pipetka |
||
603 | instrument_set 7,16 ; draw line |
||
604 | instrument_set 8,17 ; draw rectangle |
||
605 | instrument_set 9,18 ; draw circle |
||
606 | instrument_set 10,19 ; draw ellips |
||
607 | instrument_set 11,20 ; draw hard contour |
||
6359 | IgorA | 608 | |
6362 | IgorA | 609 | no_instruments: |
6371 | IgorA | 610 | ;|||||||||||||||||||||||||FILTERS|||||||||||||||||||||||||| |
611 | cmp [number_panel],4 |
||
612 | jne no_filters |
||
6362 | IgorA | 613 | |
6371 | IgorA | 614 | instrument_set 1,23 ; reflection from left to right |
615 | instrument_set 2,24 ; reflection from up to down |
||
616 | |||
617 | no_filters: |
||
618 | |||
6362 | IgorA | 619 | end_menu: |
6359 | IgorA | 620 | and [number_panel],0 |
621 | and [number_menu],0 |
||
622 | jmp still |
||
1643 | mario79 | 623 | ;---------------------------------------------------------------------><><<>><><<>----->----->><><<>----->----->><><<>----->----->><><<>><><<>><><<>><><<>><><<>><><<>><><<>115,14>139,14>170,15>177,40>170,15>139,14>115,14>177,40>><><<> |