Subversion Repositories Kolibri OS

Rev

Rev 255 | Rev 6359 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 255 Rev 485
1
;---------------------------------------------
1
;---------------------------------------------
2
;-----------panel BUTTONS---------------------
2
;-----------panel BUTTONS---------------------
3
;---------------------------------------------
3
;---------------------------------------------
4
buttons:
4
buttons:
5
 
5
 
6
	cmp [Current_instrument],21
6
	cmp [Current_instrument],21
7
	jne no_finish_instrument_button
7
	jne no_finish_instrument_button
8
 
8
 
9
	cmp [instrument_used],1
9
	cmp [instrument_used],1
10
	jne no_finish_instrument_button
10
	jne no_finish_instrument_button
11
 
11
 
12
	cmp [Activate_instrument],0
12
	cmp [Activate_instrument],0
13
	jne no_finish_instrument_button
13
	jne no_finish_instrument_button
14
 
14
 
15
	cmp [crossing],1
15
	cmp [crossing],1
16
	jne no_finish_instrument_button
16
	jne no_finish_instrument_button
17
 
17
 
18
	mov [finishing_crossing],1
18
	mov [finishing_crossing],1
19
	call TakeButtonInstruments
19
	call TakeButtonInstruments
20
 
20
 
21
	no_finish_instrument_button:
21
	no_finish_instrument_button:
22
 
22
 
23
	mov eax,17
23
	mov eax,17
24
	int 0x40
24
	mcall
25
 
25
 
26
	shr eax,8
26
	shr eax,8
27
 
27
 
28
	cmp eax,1
28
	cmp eax,1
29
	jne no_exit
29
	jne no_exit
30
 
30
 
31
	mov eax,CursorsID
31
	mov eax,CursorsID
32
	call delete_cursors
32
	call delete_cursors
33
 
33
 
34
	mov eax,-1
34
	or eax,-1
35
	int 0x40
35
	mcall
36
 
36
 
37
	no_exit:
37
	no_exit:
38
 
38
 
39
 
39
 
40
	mov [Current_instrument],eax
40
	mov [Current_instrument],eax
41
 
41
 
42
	; set cursor for current instrument
42
	; set cursor for current instrument
43
	pushad
43
	pushad
44
 
44
 
45
	mov eax,CursorsID
45
	mov eax,CursorsID
46
	mov ebx,[Current_instrument]
46
	mov ebx,[Current_instrument]
47
 
47
 
48
	call set_cursor
48
	call set_cursor
49
	popad
49
	popad
50
 
50
 
51
 
51
 
52
 
52
 
53
	cmp eax,10
53
	cmp eax,10
54
	jl still
54
	jl still
55
 
55
 
56
	;save instrumnets 10-40
56
	;save instrumnets 10-40
57
	cmp eax,40
57
	cmp eax,40
58
	jae no_save_last_instrument
58
	jae no_save_last_instrument
59
 
59
 
60
	 mov [Last_instrument],eax
60
	 mov [Last_instrument],eax
61
 
61
 
62
	no_save_last_instrument:
62
	no_save_last_instrument:
63
 
63
 
64
	cmp eax,10
64
	cmp eax,10
65
	je still
65
	je still
66
 
66
 
67
	cmp eax,14
67
	cmp eax,14
68
	je still
68
	je still
69
 
69
 
70
	cmp eax,11
70
	cmp eax,11
71
	je still
71
	je still
72
 
72
 
73
	cmp eax,13
73
	cmp eax,13
74
	je still
74
	je still
75
 
75
 
76
	cmp eax,12
76
	cmp eax,12
77
	je still
77
	je still
78
 
78
 
79
	cmp eax,51
79
	cmp eax,51
80
	jne no_palette_
80
	jne no_palette_
81
 
81
 
82
	call TakeButtonInstruments
82
	call TakeButtonInstruments
83
	jmp still
83
	jmp still
84
 
84
 
85
	no_palette_:
85
	no_palette_:
86
 
86
 
87
	cmp eax,17
87
	cmp eax,17
88
	je still
88
	je still
89
 
89
 
90
	cmp eax,21
90
	cmp eax,21
91
	jne no_allocation__
91
	jne no_allocation__
92
 
92
 
93
	and [Activate_instrument],0
93
	and [Activate_instrument],0
94
	jmp still
94
	jmp still
95
 
95
 
96
	no_allocation__:
96
	no_allocation__:
97
 
97
 
98
	cmp eax,20
98
	cmp eax,20
99
	jne no_kontur__
99
	jne no_kontur__
100
 
100
 
101
	and [instrument_used],0
101
	and [instrument_used],0
102
	jmp still
102
	jmp still
103
 
103
 
104
	no_kontur__:
104
	no_kontur__:
105
 
105
 
106
	call TakeButtonInstruments
106
	call TakeButtonInstruments
107
 
107
 
108
	jmp still
108
	jmp still