Subversion Repositories Kolibri OS

Rev

Rev 6355 | Rev 6362 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6355 Rev 6359
Line 4... Line 4...
4
TakeInstruments:
4
TakeInstruments:
5
;|||||||||||||||||||FILE||||||||||||||||||||||
5
;|||||||||||||||||||FILE||||||||||||||||||||||
6
	cmp	[number_panel],7
6
	cmp	[number_panel],7
7
	jne	no_file
7
	jne	no_file
Line 8... Line 8...
8
 
8
 
9
;<<<<>>>>>>
9
; <<< New >>>
10
	cmp	[number_menu],1
10
	cmp	[number_menu],1
Line 11... Line -...
11
	jne	no_new
-
 
12
 
-
 
13
	mov	eax,80
-
 
14
	mov	ebx,100
-
 
15
	mov	ecx,150
-
 
16
	mov	edx,90
-
 
17
	mov	 esi,1
-
 
18
	call	draw_volume_rectangle
-
 
19
 
-
 
20
	mov	eax,177
-
 
21
	mov	ebx,115
-
 
22
	mov	ecx,40
-
 
23
	mov	edx,14
-
 
24
	mov	 esi,4
-
 
25
	call	draw_volume_rectangle
-
 
26
 
-
 
27
	mov	eax,177
-
 
28
	mov	ebx,115+24
-
 
29
	mov	ecx,40
-
 
30
	mov	edx,14
-
 
31
	mov	 esi,4
-
 
32
	call	draw_volume_rectangle
-
 
33
 
-
 
34
	mov	eax,175
-
 
35
	mov	ebx,170
-
 
36
	mov	ecx,40
-
 
37
	mov	edx,15
-
 
38
	mov	esi,1
-
 
39
	call	draw_volume_rectangle
-
 
40
 
-
 
41
	mov	eax,90
-
 
42
	mov	ebx,118
-
 
43
	mov	ecx,0xffffff
-
 
44
	mov	edx,new_text1
-
 
45
	mov	esi,14
-
 
46
	call	print_text
-
 
47
 
-
 
48
	mov	eax,90
-
 
49
	mov	ebx,118+24
-
 
50
	mov	ecx,0xffffff
-
 
51
	mov	edx,new_text2
-
 
52
	mov	esi,14
-
 
53
	call	print_text
-
 
54
 
-
 
55
	mov	eax,185
-
 
56
	mov	ebx,175
-
 
57
	mov	ecx,0xffffff
-
 
58
	mov	edx,ok_text
11
	jne	no_new
Line 59... Line 12...
59
	mov	esi,2
12
 
60
	call	print_text
13
	call dialog2_draw
Line 61... Line 14...
61
 
14
 
62
	mov	edx,1000000000000000000000000000000b+1000
15
	mov	edx,1000000000000000000000000000000b+1000
Line 63... Line 16...
63
	mcall SF_DEFINE_BUTTON,<177,40>,<115,14>,
16
	mcall SF_DEFINE_BUTTON,<177,40>,<115,14>,
64
 
17
 
Line 65... Line 18...
65
	mov	edx,1000000000000000000000000000000b+1001
18
	mov	edx,1000000000000000000000000000000b+1001
-
 
19
	mcall ,,<139,14>,
66
	mcall	,,<139,14>,
20
 
Line 67... Line 21...
67
 
21
	mov	edx,1000000000000000000000000000000b+1002
68
	mov	edx,1000000000000000000000000000000b+1002
22
	mcall ,,<170,15>
-
 
23
 
-
 
24
no_activate_space:
-
 
25
	mcall SF_SLEEP, 5 ;fix cpu use 100%
Line 69... Line 26...
69
	mcall	,<175,40>,<170,15>
26
	mcall SF_WAIT_EVENT
70
 
27
 
Line 71... Line 28...
71
no_activate_space:
28
	cmp eax,1 ;redraw window
72
	mcall SF_WAIT_EVENT
29
	jne @f
Line 96... Line 53...
96
	call	find_symvol
53
	call	find_symvol
Line 97... Line 54...
97
 
54
 
98
	dec	eax
55
	dec	eax
99
	mov	[length_number],eax
56
	mov	[length_number],eax
100
	mov	eax,string_
57
	mov	eax,string_
Line 101... Line 58...
101
	call	value
58
	call str_to_int
102
 
59
 
103
	mov	[Picture_SizeX],eax
60
	mov	[Picture_SizeX],eax
104
	jmp	no_activate_space
61
	jmp	no_activate_space
Line 117... Line 74...
117
	call	find_symvol
74
	call	find_symvol
Line 118... Line 75...
118
 
75
 
119
	dec	eax
76
	dec	eax
120
	mov	[length_number],eax
77
	mov	[length_number],eax
121
	mov	eax,string_
78
	mov	eax,string_
Line 122... Line 79...
122
	call	value
79
	call str_to_int
123
 
80
 
124
	mov	[Picture_SizeY],eax
81
	mov	[Picture_SizeY],eax
125
	jmp	no_activate_space
82
	jmp	no_activate_space
126
;---------------------------------------------------------------------
83
;---------------------------------------------------------------------
127
no_picture_size_y:
84
no_picture_size_y:
Line 128... Line 85...
128
	cmp	eax,1002
85
	cmp	eax,1002
129
	jne	no_activate_space
86
	jne	no_activate_space
130
 
87
 
Line 131... Line 88...
131
exit_new:
88
exit_new:
132
	mov	edx,11100000000000000000000000000000b+1002
89
	mov	edx,11100000000000000000000000000000b+1002
Line 133... Line 90...
133
	mcall SF_DEFINE_BUTTON,<175,40>,<170,15>
90
	mcall SF_DEFINE_BUTTON,<177,40>,<170,15>
134
 
91
 
Line 135... Line 92...
135
	mov	edx,11100000000000000000000000000000b+1001
92
	mov	edx,11100000000000000000000000000000b+1001
Line 148... Line 105...
148
	call	cleare_work_arrea
105
	call cleare_work_arrea
149
	call	drawwin
106
	call drawwin
150
	jmp	still
107
	jmp	still
151
;---------------------------------------------------------------------
108
;---------------------------------------------------------------------
152
no_new:
109
no_new:
153
;<<<<>>>>>>
110
; <<< Open >>>
154
	cmp	[number_menu],2
111
	cmp	[number_menu],2
155
	jne	no_open
112
	jne	no_open
Line 156... Line 113...
156
 
113
 
157
;---------------------------------------------------------------------
114
;---------------------------------------------------------------------
Line 171... Line 128...
171
	and	[number_panel],0
128
	and	[number_panel],0
172
	and	[number_menu],0
129
	and	[number_menu],0
173
	jmp	still
130
	jmp	still
174
;---------------------------------------------------------------------
131
;---------------------------------------------------------------------
175
no_open:
132
no_open:
176
 ;<<<<<<<<<<>>>>>>>>>>>
133
; <<< Save >>>
177
	cmp	[number_menu],3
134
	cmp	[number_menu],3
178
	jne	no_save_
135
	jne	no_save_
Line 179... Line 136...
179
 
136
 
180
	mov	al,[save_flag]
137
	mov	al,[save_flag]
Line 186... Line 143...
186
	and	[number_panel],0
143
	and	[number_panel],0
187
	and	[number_menu],0
144
	and	[number_menu],0
188
	jmp	still
145
	jmp	still
189
;---------------------------------------------------------------------
146
;---------------------------------------------------------------------
190
no_save_:
147
no_save_:
191
 ;<<<<<<<<>>>>>>>>>>
148
; <<< Save as >>>
192
	cmp	[number_menu],4
149
	cmp	[number_menu],4
193
	jne	no_save
150
	jne	no_save
Line 194... Line 151...
194
 
151
 
195
; savedialog drawwin,save1,save2,file_path
152
; savedialog drawwin,save1,save2,file_path
Line 209... Line 166...
209
	mov	[esi],dword '.bmp'
166
	mov	[esi],dword '.bmp'
210
@@:
167
@@:
211
	pop	esi eax
168
	pop	esi eax
212
;---------------------------------------------------------------------
169
;---------------------------------------------------------------------
213
	mov	[OpenDialog_data.type],1 ; save
170
	mov	[OpenDialog_data.type],1 ; save
214
	
-
 
215
	push    dword OpenDialog_data
-
 
216
	call    [OpenDialog_Start]
171
	stdcall [OpenDialog_Start],OpenDialog_data
Line 217... Line 172...
217
 
172
 
218
	cmp	[OpenDialog_data.status],1
173
	cmp	[OpenDialog_data.status],1
219
	jne	still
174
	jne	still
220
;---------------------------------------------------------------------
175
;---------------------------------------------------------------------
Line 249... Line 204...
249
;	and	[number_panel],0
204
;	and	[number_panel],0
250
;	and	[number_menu],0
205
;	and	[number_menu],0
251
;	jmp	still
206
;	jmp	still
252
;---------------------------------------------------------------------
207
;---------------------------------------------------------------------
253
no_save:
208
no_save:
254
 ;<<<<<>>>>>>
209
; <<< Exit >>>
255
	cmp	[number_menu],5
210
	cmp	[number_menu],5
256
	jne	no_exit_program
211
	jne	no_exit_program
Line 257... Line 212...
257
 
212
 
258
	mcall SF_TERMINATE_PROCESS
213
	mcall SF_TERMINATE_PROCESS
259
;---------------------------------------------------------------------
214
;---------------------------------------------------------------------
260
no_exit_program:
215
no_exit_program:
261
no_file:
216
no_file:
262
;|||||||||||||||||||||||||||||EDIT|||||||||||||||||||||||||
-
 
263
;<<<<<<<<<>>>>>>>>>
217
;|||||||||||||||||||||||||||||EDIT|||||||||||||||||||||||||
264
	cmp	[number_panel],6
218
	cmp	[number_panel],6
Line -... Line 219...
-
 
219
	jne	no_edit
265
	jne	still ;no_edit
220
 
266
 
221
; <<< Undo >>>
Line 267... Line 222...
267
	cmp	[number_menu],1
222
	cmp	[number_menu],1
268
	jne	no_undo
223
	jne	no_undo
Line 283... Line 238...
283
	and	[number_panel],0
238
	and [number_panel],0
284
	and	[number_menu],0
239
	and [number_menu],0
285
	jmp	still
240
	jmp still
286
;---------------------------------------------------------------------
241
;---------------------------------------------------------------------
287
no_undo:
242
no_undo:
288
;<<<<<<<<<>>>>>>>>>
243
; <<< Redo >>>
289
	cmp	[number_menu],2
244
	cmp [number_menu],2
-
 
245
	jne no_redo
-
 
246
 
-
 
247
	cmp [number_undo],0
-
 
248
	je no_redo
-
 
249
 
-
 
250
;rotate bufers +1
-
 
251
	dec [number_undo]
-
 
252
	mov eax,[PointerToPicture]
-
 
253
	mov ebx,[PointerToCopyPicture]
-
 
254
	mov ecx,[PointerToCopyPicture2]
-
 
255
	mov [PointerToPicture],ecx
-
 
256
	mov [PointerToCopyPicture],eax
-
 
257
	mov [PointerToCopyPicture2],ebx
-
 
258
 
-
 
259
	call MovePictureToWorkScreen
-
 
260
	and [number_panel],0
-
 
261
	and [number_menu],0
-
 
262
	jmp still
-
 
263
;---------------------------------------------------------------------
-
 
264
no_redo:
-
 
265
; <<< Copy >>>
-
 
266
	cmp	[number_menu],3
290
	jne	no_copy
267
	jne	no_copy
Line 291... Line 268...
291
 
268
 
292
	cmp	[instrument_used],1
269
	cmp	[instrument_used],1
293
	jne	no_copy
270
	jne	no_copy
Line 383... Line 360...
383
	and	[number_menu],0
360
	and	[number_menu],0
384
	mov	[DrawSprite_flag],1
361
	mov	[DrawSprite_flag],1
385
	jmp	still
362
	jmp	still
386
;---------------------------------------------------------------------
363
;---------------------------------------------------------------------
387
no_copy:
364
no_copy:
388
;<<<<<<<<<>>>>>>>
365
; <<< Paste >>>
389
	cmp	[number_menu],3
366
	cmp	[number_menu],4
390
	jne	no_paste
367
	jne	no_paste
Line 391... Line 368...
391
 
368
 
392
	cmp	[instrument_used],1
369
	cmp	[instrument_used],1
Line 478... Line 455...
478
	and	[number_menu],0
455
	and	[number_menu],0
479
	mov	[Paste_flag],1
456
	mov	[Paste_flag],1
480
	jmp	still
457
	jmp	still
481
;---------------------------------------------------------------------
458
;---------------------------------------------------------------------
482
no_paste:
459
no_paste:
483
;<<<<<<<<<>>>>>>>>>
460
; <<< Cut >>>
484
	cmp	[number_menu],4
461
	cmp	[number_menu],5
485
	jne	no_cut
462
	jne	no_cut
Line 486... Line 463...
486
 
463
 
487
	cmp	[instrument_used],1
464
	cmp	[instrument_used],1
Line 571... Line 548...
571
	and	[number_panel],0
548
	and	[number_panel],0
572
	and	[number_menu],0
549
	and	[number_menu],0
573
	jmp	still
550
	jmp	still
574
;---------------------------------------------------------------------
551
;---------------------------------------------------------------------
575
no_cut:
552
no_cut:
576
;<<<<<>>>>>
553
; <<< Cleare all >>>
577
	cmp	[number_menu],5
554
	cmp	[number_menu],6
578
	jne	no_cleare_all
555
	jne	no_cleare_all
Line 579... Line 556...
579
 
556
 
580
	call	cleare_work_arrea
557
	call	cleare_work_arrea
Line 581... Line 558...
581
	call	MovePictureToWorkScreen
558
	call	MovePictureToWorkScreen
582
 
559
 
583
	and	[number_panel],0
560
	and	[number_panel],0
584
	and	[number_menu],0
561
	and	[number_menu],0
585
	jmp	still
562
	jmp	still
586
;---------------------------------------------------------------------
563
;---------------------------------------------------------------------
587
no_cleare_all:
564
no_cleare_all:
588
;<<<<<>>>>>
565
; <<< To allocate all >>>
Line 589... Line 566...
589
	cmp	[number_menu],6
566
	cmp	[number_menu],7
590
	jne	still	;no_to_allocate_all
567
	jne	still ;no_to_allocate_all
591
 
568
 
Line 606... Line 583...
606
;	call	TakeButtonInstruments
583
;	call	TakeButtonInstruments
607
;	call	MovePictureToWorkScreen
584
;	call	MovePictureToWorkScreen
608
	jmp	still
585
	jmp	still
609
;---------------------------------------------------------------------
586
;---------------------------------------------------------------------
610
;no_to_allocate_all:
587
;no_to_allocate_all:
611
;no_edit:
588
no_edit:
-
 
589
;|||||||||||||||||||||||||INSTRUMENTS||||||||||||||||||||||
-
 
590
	cmp	[number_panel],5
-
 
591
	jne	no_instruments
-
 
592
; <<< Pencil >>>
-
 
593
	cmp	[number_menu],1
-
 
594
	jne	no_pencil
-
 
595
 
-
 
596
	; ... todo ...
-
 
597
 
-
 
598
	and	[number_panel],0
-
 
599
	and	[number_menu],0
-
 
600
no_pencil:
-
 
601
no_instruments:
612
;	jmp	still
602
	jmp	still
613
;---------------------------------------------------------------------
603
;---------------------------------------------------------------------
614
604