Rev 1792 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1792 | Rev 3840 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;--------------------------------------------------------------------- |
1 | ;------------------------------------------------------------------------------ |
2 | confirmation_action: |
2 | confirmation_action: |
3 | mov [work_confirmation],0 |
3 | mov [work_confirmation],0 |
4 | mov [work_confirmation_yes],0 |
4 | mov [work_confirmation_yes],0 |
5 | jmp .red |
5 | jmp .red |
- | 6 | ;-------------------------------------- |
|
6 | .red_1: |
7 | .red_1: |
7 | call draw_window |
8 | call draw_window |
- | 9 | ;-------------------------------------- |
|
8 | .red: |
10 | .red: |
9 | call draw_confirmation_button |
11 | call draw_confirmation_button |
10 | call draw_confirmation_menu |
12 | call draw_confirmation_menu |
- | 13 | ;-------------------------------------- |
|
11 | .still: |
14 | .still: |
12 | mcall 10 |
15 | mcall 10 |
13 | cmp eax,1 |
16 | cmp eax,1 |
14 | je .red_1 |
17 | je .red_1 |
- | 18 | ||
15 | cmp eax,2 |
19 | cmp eax,2 |
16 | je key_menu_confirmation |
20 | je key_menu_confirmation |
- | 21 | ||
17 | cmp eax,3 |
22 | cmp eax,3 |
18 | jne .still |
23 | jne .still |
- | 24 | ||
19 | mcall 17 |
25 | mcall 17 |
20 | cmp ah,161 |
26 | cmp ah,161 |
21 | je .no_del |
27 | je .no_del |
- | 28 | ||
22 | cmp ah,160 |
29 | cmp ah,160 |
23 | je .del |
30 | je .del |
- | 31 | ||
24 | cmp ah,1 |
32 | cmp ah,1 |
25 | jne .still |
33 | jne .still |
- | 34 | ||
26 | mcall -1 |
35 | mcall -1 |
- | 36 | ;-------------------------------------- |
|
27 | .del: |
37 | .del: |
28 | mov [work_confirmation_yes],1 |
38 | mov [work_confirmation_yes],1 |
- | 39 | ;-------------------------------------- |
|
29 | .no_del: |
40 | .no_del: |
30 | call draw_window |
41 | call draw_window |
- | 42 | ;-------------------------------------- |
|
31 | .ret: |
43 | .ret: |
32 | ret |
44 | ret |
33 | ;--------------------------------------------------------------------- |
45 | ;------------------------------------------------------------------------------ |
34 | draw_confirmation_button: |
46 | draw_confirmation_button: |
35 | mov ecx,[window_high] |
47 | mov ecx,[window_high] |
36 | mov ebx,[window_width] |
48 | mov ebx,[window_width] |
37 | shr ecx,1 |
49 | shr ecx,1 |
38 | shr ebx,1 |
50 | shr ebx,1 |
39 | sub ebx,45 |
51 | sub ebx,45 |
40 | shl ecx,16 |
52 | shl ecx,16 |
41 | shl ebx,16 |
53 | shl ebx,16 |
42 | mov cx,15 |
54 | mov cx,15 |
43 | mov bx,40 |
55 | mov bx,40 |
44 | mov esi,0xffffff |
- | |
45 | mov edx,0x40000000+160 |
56 | mcall 8,,,0x40000000+160,0xffffff |
46 | mov eax,8 |
- | |
47 | int 0x40 |
- | |
48 | add ebx,50 shl 16 |
57 | add ebx,50 shl 16 |
49 | inc edx |
58 | inc edx |
50 | int 0x40 |
59 | mcall |
51 | ret |
60 | ret |
52 | ;--------------------------------------------------------------------- |
61 | ;------------------------------------------------------------------------------ |
53 | draw_confirmation_menu: |
62 | draw_confirmation_menu: |
54 | mov ecx,[window_high] |
63 | mov ecx,[window_high] |
55 | mov ebx,[window_width] |
64 | mov ebx,[window_width] |
56 | shr ecx,1 |
65 | shr ecx,1 |
57 | shr ebx,1 |
66 | shr ebx,1 |
Line 59... | Line 68... | ||
59 | sub ebx,60 |
68 | sub ebx,60 |
60 | shl ecx,16 |
69 | shl ecx,16 |
61 | shl ebx,16 |
70 | shl ebx,16 |
62 | mov cx,44 |
71 | mov cx,44 |
63 | mov bx,120 |
72 | mov bx,120 |
64 | mcall 13, , ,0x6060ff ;0xff |
73 | mcall 13,,,0x6060ff |
65 | push ebx ecx |
74 | push ebx ecx |
66 | add ebx,15 shl 16 |
75 | add ebx,15 shl 16 |
67 | add ecx,22 shl 16 |
76 | add ecx,22 shl 16 |
68 | mov bx,40 |
77 | mov bx,40 |
69 | mov cx,15 |
78 | mov cx,15 |
70 | mov edx,0 |
79 | mov edx,0 |
71 | push ebx ecx |
80 | push ebx ecx |
72 | cmp [work_confirmation],0 |
81 | cmp [work_confirmation],0 |
73 | jne @f |
82 | jne @f |
- | 83 | ||
74 | add ebx,50 shl 16 |
84 | add ebx,50 shl 16 |
- | 85 | ;-------------------------------------- |
|
75 | @@: |
86 | @@: |
76 | int 0x40 |
87 | mcall |
77 | add ecx,1 shl 16 |
88 | add ecx,1 shl 16 |
78 | add ebx,1 shl 16 |
89 | add ebx,1 shl 16 |
79 | mov bx,38 |
90 | mov bx,38 |
80 | mov cx,13 |
91 | mov cx,13 |
81 | mov edx,0x6060ff |
92 | mcall ,,,0x6060ff |
82 | int 0x40 |
- | |
83 | pop ecx ebx |
93 | pop ecx ebx |
84 | mov edx,0xff0000 |
94 | mov edx,0xff0000 |
85 | cmp [work_confirmation],0 |
95 | cmp [work_confirmation],0 |
86 | je @f |
96 | je @f |
- | 97 | ||
87 | add ebx,50 shl 16 |
98 | add ebx,50 shl 16 |
88 | mov edx,0xaa00 |
99 | mov edx,0xaa00 |
- | 100 | ;-------------------------------------- |
|
89 | @@: |
101 | @@: |
90 | int 0x40 |
102 | mcall |
91 | pop ecx ebx |
103 | pop ecx ebx |
92 | shr ecx,16 |
104 | shr ecx,16 |
93 | mov bx,cx |
105 | mov bx,cx |
94 | add ebx,15 shl 16+5 |
106 | add ebx,15 shl 16+5 |
95 | mcall 4, ,0x90ffffff,[confirmation_type] |
107 | mcall 4,,0x90ffffff,[confirmation_type] |
96 | add ebx,7 shl 16+20 |
108 | add ebx,7 shl 16+20 |
97 | mov edx,type_yes |
109 | mcall ,,,type_yes |
98 | int 0x40 |
- | |
99 | add ebx,56 shl 16 |
110 | add ebx,56 shl 16 |
100 | mov edx,type_no |
111 | mcall ,,,type_no |
101 | int 0x40 |
- | |
102 | ret |
112 | ret |
103 | ;--------------------------------------------------------------------- |
113 | ;------------------------------------------------------------------------------ |
104 | key_menu_confirmation: |
114 | key_menu_confirmation: |
105 | mcall 2 |
115 | mcall 2 |
106 | cmp [extended_key],1 |
116 | cmp [extended_key],1 |
107 | je .extended_key |
117 | je .extended_key |
- | 118 | ||
108 | test al, al |
119 | test al,al |
109 | jnz .end_1 |
120 | jnz .end_1 |
- | 121 | ||
110 | cmp ah, 0xE0 |
122 | cmp ah,0xE0 |
111 | jne @f |
123 | jne @f |
- | 124 | ;-------------------------------------- |
|
112 | .end_1: |
125 | .end_1: |
113 | jmp confirmation_action.still |
126 | jmp confirmation_action.still |
- | 127 | ;-------------------------------------- |
|
114 | @@: |
128 | @@: |
115 | cmp ah,75 |
129 | cmp ah,75 |
116 | je confirmation_key_75.1 |
130 | je confirmation_key_75.1 |
- | 131 | ||
117 | cmp ah,77 |
132 | cmp ah,77 |
118 | je confirmation_key_75.1 |
133 | je confirmation_key_75.1 |
- | 134 | ||
119 | cmp ah,28 |
135 | cmp ah,28 |
120 | je confirmation_key_28.1 |
136 | je confirmation_key_28.1 |
- | 137 | ;-------------------------------------- |
|
121 | .end: |
138 | .end: |
122 | cmp ah,1 |
139 | cmp ah,1 |
123 | jne confirmation_action.still |
140 | jne confirmation_action.still |
- | 141 | ||
124 | ret |
142 | ret |
125 | ;--------------------------------------------------------------------- |
143 | ;------------------------------------------------------------------------------ |
126 | .extended_key: |
144 | .extended_key: |
127 | mov [extended_key],0 |
145 | mov [extended_key],0 |
- | 146 | ;------------------------------------------------------------------------------ |
|
128 | confirmation_key_75: |
147 | confirmation_key_75: |
129 | cmp ah,75 ;arrow left |
148 | cmp ah,75 ; arrow left |
130 | je .1 |
149 | je .1 |
- | 150 | ||
131 | cmp ah,77 ; arrow right |
151 | cmp ah,77 ; arrow right |
132 | jne confirmation_key_28 |
152 | jne confirmation_key_28 |
- | 153 | ;-------------------------------------- |
|
133 | .1: |
154 | .1: |
134 | dec [work_confirmation] |
155 | dec [work_confirmation] |
135 | and [work_confirmation],1 |
156 | and [work_confirmation],1 |
136 | jmp confirmation_action.red |
157 | jmp confirmation_action.red |
- | 158 | ;------------------------------------------------------------------------------ |
|
137 | confirmation_key_28: |
159 | confirmation_key_28: |
138 | cmp ah,28 ; Enter |
160 | cmp ah,28 ; Enter |
139 | jne confirmation_action.still |
161 | jne confirmation_action.still |
- | 162 | ;-------------------------------------- |
|
140 | .1: |
163 | .1: |
141 | cmp [work_confirmation],0 |
164 | cmp [work_confirmation],0 |
142 | jne @f |
165 | jne @f |
- | 166 | ||
143 | mov [work_confirmation_yes],1 |
167 | mov [work_confirmation_yes],1 |
- | 168 | ;-------------------------------------- |
|
144 | @@: |
169 | @@: |
145 | ret |
170 | ret |
146 | ;--------------------------------------------------------------------- |
- | |
147 | 171 | ;------------------------------------------------------------------------------ |
|
- | 172 | ||
148 | 173 |