Subversion Repositories Kolibri OS

Rev

Rev 6385 | 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
;---------------------------------------------------------------------
6741 IgorA 156
; replace extension to '.png'
1636 mario79 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
6741 IgorA 168
	mov	[esi],dword '.png'
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
 
6741 IgorA 182
	xor al,al
183
	mov edi,file_path
184
	repne scasb
185
	mov eax,[edi-5]
186
	or eax,0x20202000 ;down register
187
	cmp eax,'.png'
188
	jne .end0
189
		;create image struct
190
		stdcall [img_create], [Picture_SizeX], [Picture_SizeY], Image.bpp24
191
		test eax,eax
192
		jz @f
193
			;copy image
194
			mov edi,[eax+Image.Data]
195
			mov esi,[PointerToPicture]
196
			mov ecx,[Picture_SizeX]
197
			imul ecx,[Picture_SizeY]
198
			imul ecx,3
199
			rep movsb
200
 
201
			;encode image
202
			stdcall [img_encode], eax, LIBIMG_FORMAT_PNG, 0
203
			test eax,eax
204
			jz @f
205
 
206
			;copy output image
207
			mov edi,[PointerToEditBufer]
208
			mov esi,eax
209
			mov eax,ecx
210
			rep movsb
211
		@@:
212
		mov	ecx,eax
213
		mov	eax,file_path
214
		mov	ebx,[PointerToEditBufer]
215
		jmp .end1
216
	.end0:
217
 
6359 IgorA 218
	call analizing_picture_to_palette
255 heavyiron 219
 
1643 mario79 220
	;eax => number of colors in picture
221
	mov	ebx,[PointerToPicture]
222
	mov	ecx,[PointerToEditBufer]
223
	mov	edx,[PointerToPalette]
224
	mov	esi,[Picture_SizeX]
225
	mov	edi,[Picture_SizeY]
255 heavyiron 226
 
1643 mario79 227
	call	coding_bmp
255 heavyiron 228
 
1643 mario79 229
	mov	eax,file_path
230
	mov	ecx,ebx
231
	mov	ebx,[PointerToEditBufer]
255 heavyiron 232
 
6741 IgorA 233
	.end1:
1643 mario79 234
	call	save_file
255 heavyiron 235
 
1643 mario79 236
	mov	[save_flag],1
6362 IgorA 237
	call drawwin
238
	jmp	end_menu
1643 mario79 239
;---------------------------------------------------------------------
240
no_save:
6359 IgorA 241
; <<< Exit >>>
1643 mario79 242
	cmp	[number_menu],5
243
	jne	no_exit_program
255 heavyiron 244
 
6355 IgorA 245
	mcall SF_TERMINATE_PROCESS
1643 mario79 246
;---------------------------------------------------------------------
247
no_exit_program:
248
no_file:
249
;|||||||||||||||||||||||||||||EDIT|||||||||||||||||||||||||
250
	cmp	[number_panel],6
6359 IgorA 251
	jne	no_edit
255 heavyiron 252
 
6359 IgorA 253
; <<< Undo >>>
1643 mario79 254
	cmp	[number_menu],1
255
	jne	no_undo
255 heavyiron 256
 
6355 IgorA 257
	cmp	[number_undo],2 ;2 - maximum undo count
6364 IgorA 258
	jge	end_menu
255 heavyiron 259
 
6355 IgorA 260
;rotate bufers -1
261
	inc	[number_undo]
262
	mov eax,[PointerToPicture]
263
	mov ebx,[PointerToCopyPicture]
264
	mov ecx,[PointerToCopyPicture2]
265
	mov [PointerToPicture],ebx
266
	mov [PointerToCopyPicture],ecx
267
	mov [PointerToCopyPicture2],eax
255 heavyiron 268
 
6355 IgorA 269
	call MovePictureToWorkScreen
6362 IgorA 270
	jmp end_menu
1643 mario79 271
;---------------------------------------------------------------------
272
no_undo:
6359 IgorA 273
; <<< Redo >>>
274
	cmp [number_menu],2
275
	jne no_redo
276
 
277
	cmp [number_undo],0
6364 IgorA 278
	je end_menu
6359 IgorA 279
 
280
;rotate bufers +1
281
	dec [number_undo]
282
	mov eax,[PointerToPicture]
283
	mov ebx,[PointerToCopyPicture]
284
	mov ecx,[PointerToCopyPicture2]
285
	mov [PointerToPicture],ecx
286
	mov [PointerToCopyPicture],eax
287
	mov [PointerToCopyPicture2],ebx
288
 
289
	call MovePictureToWorkScreen
6362 IgorA 290
	jmp end_menu
6359 IgorA 291
;---------------------------------------------------------------------
292
no_redo:
293
; <<< Copy >>>
294
	cmp	[number_menu],3
1643 mario79 295
	jne	no_copy
255 heavyiron 296
 
6385 IgorA 297
	mov	eax,[crossing_old_x]
298
	mov	ebx,[crossing_old_y]
255 heavyiron 299
 
1643 mario79 300
	cmp	eax,[rectangular_shade_x]
301
	jl	no_remove_x_copy
255 heavyiron 302
 
1643 mario79 303
	mov	ecx,[rectangular_shade_x]
6385 IgorA 304
	mov	[crossing_old_x],ecx ; crossing_old_x <-----> rectangulare_shade_x
1643 mario79 305
	mov	[rectangular_shade_x],eax
255 heavyiron 306
 
1643 mario79 307
no_remove_x_copy:
308
	cmp	ebx,[rectangular_shade_y]
309
	jl	no_remove_y_copy
255 heavyiron 310
 
1643 mario79 311
	mov	ecx,[rectangular_shade_y]
6385 IgorA 312
	mov	[crossing_old_y],ecx			 ; crossing_old_y <-----> rectangulare_shade_y
1643 mario79 313
	mov	[rectangular_shade_y],ebx
255 heavyiron 314
 
1643 mario79 315
no_remove_y_copy:
6385 IgorA 316
	mov	eax,[crossing_old_x]
317
	mov	ebx,[crossing_old_y]
1643 mario79 318
	mov	ecx,[rectangular_shade_x]
319
	mov	edx,[rectangular_shade_y]
320
	inc	eax
321
	inc	ebx
322
	dec	ecx
323
	dec	edx
255 heavyiron 324
 
1643 mario79 325
	mov	[x],eax
326
	mov	[y],ebx
327
	mov	esi,eax
328
	mov	edi,ebx
329
	mov	[Dx_],1
330
	mov	[Dy_],1
255 heavyiron 331
 
1643 mario79 332
	sub	ecx,eax
333
	jnz	no_signum_fill_r_x_copy
255 heavyiron 334
 
1643 mario79 335
	mov	[Dx_],-1
255 heavyiron 336
 
1643 mario79 337
no_signum_fill_r_x_copy:
338
	sub	edx,ebx
339
	jnz	no_signum_fill_r_y_copy
255 heavyiron 340
 
1643 mario79 341
	mov	[Dy_],-1
255 heavyiron 342
 
1643 mario79 343
no_signum_fill_r_y_copy:
344
	mov	ebx,[rectangular_shade_y]
345
	sub	ebx,edi
255 heavyiron 346
 
1643 mario79 347
	mov	edx,[PointerToEditBufer]
6369 IgorA 348
	mov	eax,[rectangular_shade_x]
6385 IgorA 349
	sub eax,[crossing_old_x]
6369 IgorA 350
	mov [edx],eax ;image.w
351
	mov	eax,[rectangular_shade_y]
6385 IgorA 352
	sub eax,[crossing_old_y]
6369 IgorA 353
	mov [edx+4],eax ;image.h
354
	mov dword[edx+8],24 ;bit in pixel
355
	add edx,12 ;copy image parametrs
1643 mario79 356
	mov	[y],edi
255 heavyiron 357
 
1643 mario79 358
loop_fill_rectangle_y_copy:
359
	mov	[x],esi
255 heavyiron 360
 
1643 mario79 361
loop_fill_rectangle_x_copy:
362
	push	esi edi
363
	mov	eax,[PointerToPicture]
364
	mov	ebx,[Picture_SizeX]
365
	mov	esi,[x]
366
	mov	edi,[y]
367
	call	GetColorOfPixel
368
	mov	[edx],ax
369
	shr	eax,16
370
	mov	[edx+2],al
371
	pop	edi esi
255 heavyiron 372
 
1643 mario79 373
	add	edx,3
374
	mov	eax,[x]
375
	add	eax,[Dx_]
376
	mov	[x],eax
255 heavyiron 377
 
1643 mario79 378
	cmp	eax,[rectangular_shade_x]
379
	jl	loop_fill_rectangle_x_copy
255 heavyiron 380
 
1643 mario79 381
	mov	eax,[y]
382
	add	eax,[Dy_]
383
	mov	[y],eax
255 heavyiron 384
 
1643 mario79 385
	cmp	eax,[rectangular_shade_y]
386
	jl	loop_fill_rectangle_y_copy
255 heavyiron 387
 
6369 IgorA 388
	;...todo use system buffer...
389
	;mcall SF_CLIPBOARD,SSF_WRITE_CB,,[PointerToEditBufer]
390
 
1643 mario79 391
	call	MovePictureToWorkScreen
392
	mov	[DrawSprite_flag],1
6362 IgorA 393
	jmp	end_menu
1643 mario79 394
;---------------------------------------------------------------------
395
no_copy:
6359 IgorA 396
; <<< Paste >>>
397
	cmp	[number_menu],4
1643 mario79 398
	jne	no_paste
255 heavyiron 399
 
6385 IgorA 400
	mov	eax,[crossing_old_x]
401
	mov	ebx,[crossing_old_y]
255 heavyiron 402
 
1643 mario79 403
	cmp	eax,[rectangular_shade_x]
404
	jl	no_remove_x_paste
255 heavyiron 405
 
1643 mario79 406
	mov	ecx,[rectangular_shade_x]
6385 IgorA 407
	mov	[crossing_old_x],ecx ; crossing_old_x <-----> rectangulare_shade_x
1643 mario79 408
	mov	[rectangular_shade_x],eax
255 heavyiron 409
 
1643 mario79 410
no_remove_x_paste:
411
	cmp	ebx,[rectangular_shade_y]
412
	jl	no_remove_y_paste
255 heavyiron 413
 
1643 mario79 414
	mov	ecx,[rectangular_shade_y]
6385 IgorA 415
	mov	[crossing_old_y],ecx ; crossing_old_y <-----> rectangulare_shade_y
1643 mario79 416
	mov	[rectangular_shade_y],ebx
255 heavyiron 417
 
1643 mario79 418
no_remove_y_paste:
6385 IgorA 419
	mov	eax,[crossing_old_x]
420
	mov	ebx,[crossing_old_y]
1643 mario79 421
	mov	ecx,[rectangular_shade_x]
422
	mov	edx,[rectangular_shade_y]
423
	inc	eax
424
	inc	ebx
425
	dec	ecx
426
	dec	edx
255 heavyiron 427
 
1643 mario79 428
	mov	[x],eax
429
	mov	[y],ebx
430
	mov	esi,eax
431
	mov	edi,ebx
432
	mov	[Dx_],1
433
	mov	[Dy_],1
255 heavyiron 434
 
1643 mario79 435
	sub	ecx,eax
436
	jnz	no_signum_fill_r_x_paste
255 heavyiron 437
 
1643 mario79 438
	mov	[Dx_],-1
255 heavyiron 439
 
1643 mario79 440
no_signum_fill_r_x_paste:
441
	sub	edx,ebx
442
	jnz	no_signum_fill_r_y_paste
255 heavyiron 443
 
1643 mario79 444
	mov	[Dy_],-1
255 heavyiron 445
 
1643 mario79 446
no_signum_fill_r_y_paste:
447
	mov	edx,[PointerToEditBufer]
6369 IgorA 448
	cmp dword[edx+8],24
449
	jne	end_menu
450
	mov eax,[edx]
6385 IgorA 451
	add eax,[crossing_old_x]
6369 IgorA 452
	mov [paste_img_w],eax
453
	mov eax,[edx+4]
6385 IgorA 454
	add eax,[crossing_old_y]
6369 IgorA 455
	mov [paste_img_h],eax
456
	add edx,12 ;copy image parametrs
1643 mario79 457
	mov	[y],edi
255 heavyiron 458
 
1643 mario79 459
loop_fill_rectangle_y_paste:
460
	mov	[x],esi
255 heavyiron 461
 
1643 mario79 462
loop_fill_rectangle_x_paste:
463
	push	esi edi
464
	mov	ecx,[edx]
465
	and	ecx,0xffffff ;color
466
	mov	eax,[PointerToPicture]
467
	mov	ebx,[Picture_SizeX]
468
	mov	esi,[x]
469
	mov	edi,[y]
470
	call	PutPixel
471
	pop	edi esi
255 heavyiron 472
 
1643 mario79 473
	add	edx,3
255 heavyiron 474
 
1643 mario79 475
	mov	eax,[x]
476
	add	eax,[Dx_]
6369 IgorA 477
	cmp eax,[paste_img_w]
478
	je no_paste_data_x
1643 mario79 479
	mov	[x],eax
480
	cmp	eax,[rectangular_shade_x]
481
	jl	loop_fill_rectangle_x_paste
6369 IgorA 482
no_paste_data_x:
255 heavyiron 483
 
1643 mario79 484
	mov	eax,[y]
485
	add	eax,[Dy_]
6369 IgorA 486
	cmp eax,[paste_img_h]
487
	je no_paste_data_y
1643 mario79 488
	mov	[y],eax
489
	cmp	eax,[rectangular_shade_y]
490
	jl	loop_fill_rectangle_y_paste
6369 IgorA 491
no_paste_data_y:
255 heavyiron 492
 
1643 mario79 493
	call	MovePictureToWorkScreen
494
	mov	[Paste_flag],1
6362 IgorA 495
	jmp	end_menu
1643 mario79 496
;---------------------------------------------------------------------
497
no_paste:
6359 IgorA 498
; <<< Cut >>>
499
	cmp	[number_menu],5
1643 mario79 500
	jne	no_cut
255 heavyiron 501
 
6385 IgorA 502
	mov	eax,[crossing_old_x]
503
	mov	ebx,[crossing_old_y]
255 heavyiron 504
 
1643 mario79 505
	cmp	eax,[rectangular_shade_x]
506
	jl	no_remove_x_cut
255 heavyiron 507
 
1643 mario79 508
	mov	ecx,[rectangular_shade_x]
6385 IgorA 509
	mov	[crossing_old_x],ecx ; crossing_old_x <-----> rectangulare_shade_x
1643 mario79 510
	mov	[rectangular_shade_x],eax
255 heavyiron 511
 
1643 mario79 512
no_remove_x_cut:
513
	cmp	ebx,[rectangular_shade_y]
514
	jl	no_remove_y_cut
255 heavyiron 515
 
1643 mario79 516
	mov	ecx,[rectangular_shade_y]
6385 IgorA 517
	mov	[crossing_old_y],ecx ; crossing_old_y <-----> rectangulare_shade_y
1643 mario79 518
	mov	[rectangular_shade_y],ebx
255 heavyiron 519
 
1643 mario79 520
no_remove_y_cut:
6385 IgorA 521
	mov	eax,[crossing_old_x]
522
	mov	ebx,[crossing_old_y]
1643 mario79 523
	mov	ecx,[rectangular_shade_x]
524
	mov	edx,[rectangular_shade_y]
525
	inc	eax
526
	inc	ebx
527
	dec	ecx
528
	dec	edx
255 heavyiron 529
 
1643 mario79 530
	mov	[x],eax
531
	mov	[y],ebx
532
	mov	esi,eax
533
	mov	edi,ebx
534
	mov	[Dx_],1
535
	mov	[Dy_],1
255 heavyiron 536
 
1643 mario79 537
	sub	ecx,eax
538
	jnz	no_signum_fill_r_x
255 heavyiron 539
 
1643 mario79 540
	mov	[Dx_],-1
255 heavyiron 541
 
1643 mario79 542
no_signum_fill_r_x:
543
	sub	edx,ebx
544
	jnz	no_signum_fill_r_y
255 heavyiron 545
 
1643 mario79 546
	mov	[Dy_],-1
255 heavyiron 547
 
1643 mario79 548
no_signum_fill_r_y:
549
	mov	[y],edi
255 heavyiron 550
 
1643 mario79 551
loop_fill_rectangle_y:
552
	mov	[x],esi
255 heavyiron 553
 
1643 mario79 554
loop_fill_rectangle_x:
555
	push	esi edi
556
	mov	eax,[PointerToPicture]
557
	mov	ebx,[Picture_SizeX]
558
	mov	ecx,dword 0xffffff
559
	mov	esi,[x]
560
	mov	edi,[y]
561
	call	PutPixel
562
	pop	edi esi
255 heavyiron 563
 
1643 mario79 564
	mov	eax,[x]
565
	add	eax,[Dx_]
566
	mov	[x],eax
255 heavyiron 567
 
1643 mario79 568
	cmp	eax,[rectangular_shade_x]
569
	jl	loop_fill_rectangle_x
255 heavyiron 570
 
1643 mario79 571
	mov	eax,[y]
572
	add	eax,[Dy_]
573
	mov	[y],eax
255 heavyiron 574
 
1643 mario79 575
	cmp	eax,[rectangular_shade_y]
576
	jl	loop_fill_rectangle_y
255 heavyiron 577
 
1643 mario79 578
	call	MovePictureToWorkScreen
6362 IgorA 579
	jmp	end_menu
1643 mario79 580
;---------------------------------------------------------------------
581
no_cut:
6359 IgorA 582
; <<< Cleare all >>>
583
	cmp	[number_menu],6
1643 mario79 584
	jne	no_cleare_all
255 heavyiron 585
 
1643 mario79 586
	call	cleare_work_arrea
587
	call	MovePictureToWorkScreen
6362 IgorA 588
	jmp	end_menu
1643 mario79 589
;---------------------------------------------------------------------
590
no_cleare_all:
6359 IgorA 591
; <<< To allocate all >>>
592
	cmp	[number_menu],7
6385 IgorA 593
	jne	end_menu
255 heavyiron 594
 
6385 IgorA 595
	mov	[crossing_old_x],0
596
	mov	[crossing_old_y],0
1643 mario79 597
	mov	eax,[Picture_SizeX]
598
	mov	ebx,[Picture_SizeY]
6385 IgorA 599
	dec eax
600
	dec ebx
1643 mario79 601
	mov	[rectangular_shade_x],eax
602
	mov	[rectangular_shade_y],ebx
603
	mov	[Current_instrument],30
6385 IgorA 604
	mov	[crossing],2
605
	;call MovePictureToWorkScreen
6362 IgorA 606
	jmp	end_menu
1643 mario79 607
;---------------------------------------------------------------------
6359 IgorA 608
no_edit:
609
;|||||||||||||||||||||||||INSTRUMENTS||||||||||||||||||||||
610
	cmp	[number_panel],5
611
	jne	no_instruments
612
 
6362 IgorA 613
	instrument_set  1,10 ; pensil
614
	instrument_set  2,11 ; draw brush
615
	instrument_set  3,12 ; spray
616
	instrument_set  4,13 ; lastik
617
	instrument_set  5,14 ; flood fill
618
	instrument_set  6,15 ; pipetka
619
	instrument_set  7,16 ; draw line
620
	instrument_set  8,17 ; draw rectangle
621
	instrument_set  9,18 ; draw circle
622
	instrument_set 10,19 ; draw ellips
623
	instrument_set 11,20 ; draw hard contour
6359 IgorA 624
 
6362 IgorA 625
no_instruments:
6371 IgorA 626
;|||||||||||||||||||||||||FILTERS||||||||||||||||||||||||||
627
	cmp	[number_panel],4
628
	jne	no_filters
6362 IgorA 629
 
6371 IgorA 630
	instrument_set  1,23 ; reflection from left to right
631
	instrument_set  2,24 ; reflection from up to down
632
 
633
no_filters:
634
 
6362 IgorA 635
end_menu:
6359 IgorA 636
	and	[number_panel],0
637
	and	[number_menu],0
638
	jmp	still
1643 mario79 639
;---------------------------------------------------------------------