Rev 4213 | Rev 4250 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4213 | Rev 4215 | ||
---|---|---|---|
Line 40... | Line 40... | ||
40 | 40 | ||
Line 41... | Line 41... | ||
41 | stdcall dll.Init,[init_lib] |
41 | stdcall dll.Init,[init_lib] |
42 | 42 | ||
43 | invoke ini_get_int,ini_file,asettings,aautosave,0 |
43 | invoke ini_get_int,ini_file,asettings,aautosave,0 |
44 | mov [autosave],eax |
44 | mov [autosave],eax |
45 | cmp eax,1 |
45 | dec eax |
46 | jne @f |
46 | jnz @f |
47 | bts dword [check1.flags],1 |
47 | bts dword [check1.flags],1 |
48 | @@: |
48 | @@: |
49 | mcall 40,0x00000027 |
49 | mcall 40,0x80000027 |
50 | redraw: |
50 | redraw: |
51 | call draw_window |
51 | call draw_window |
52 | still: |
52 | still: |
Line 72... | Line 72... | ||
72 | key: |
72 | key: |
73 | mov al,2 |
73 | mov al,2 |
74 | mcall ;eax=2 - get key code |
74 | mcall ;eax=2 - get key code |
75 | mov al,ah |
75 | mov al,ah |
76 | cmp al,13 |
76 | cmp al,13 |
77 | jz restart |
77 | je restart |
78 | cmp al,19 |
78 | cmp al,19 |
79 | jz checkbox |
79 | je checkbox |
80 | cmp al,27 |
- | |
81 | jz close |
- | |
82 | cmp al,180 |
80 | cmp al,180 |
83 | jz restart_kernel |
81 | je restart_kernel |
84 | cmp al,181 |
82 | cmp al,181 |
85 | jz power_off |
83 | je power_off |
- | 84 | cmp al,27 |
|
86 | jmp still |
85 | jne still |
- | 86 | ||
- | 87 | close: |
|
- | 88 | mcall -1 |
|
Line 87... | Line 89... | ||
87 | 89 | ||
88 | button: |
90 | button: |
89 | mcall 17 ;eax=17 - get pressed button id |
91 | mcall 17 ;eax=17 - get pressed button id |
90 | xchg al,ah |
92 | xchg al,ah |
Line 118... | Line 120... | ||
118 | mov ecx,eax |
120 | mov ecx,eax |
119 | mcall 18,21 |
121 | mcall 18,21 |
120 | mov ecx,eax |
122 | mov ecx,eax |
121 | @@: |
123 | @@: |
122 | push ecx |
124 | push ecx |
123 | mcall 23,50 |
125 | mcall 23,100 |
124 | dec eax |
126 | dec eax |
125 | jnz no_red |
127 | jnz no_red |
126 | call draw_window |
128 | call draw_window |
127 | no_red: |
129 | no_red: |
128 | pop ecx |
130 | pop ecx |
Line 132... | Line 134... | ||
132 | jmp @b |
134 | jmp @b |
133 | no_save: |
135 | no_save: |
134 | pop ecx |
136 | pop ecx |
135 | mcall 18,9 |
137 | mcall 18,9 |
Line 136... | Line -... | ||
136 | - | ||
137 | close: |
- | |
138 | mcall -1 |
- | |
139 | 138 | ||
140 | checkbox: |
139 | checkbox: |
141 | btc dword [check1.flags],1 |
140 | btc dword [check1.flags],1 |
142 | jc .1 |
141 | jc .1 |
143 | mov [autosave],1 |
142 | mov [autosave],1 |
Line 151... | Line 150... | ||
151 | 150 | ||
152 | draw_window: |
151 | draw_window: |
153 | mov al,12 |
152 | mov al,12 |
Line -... | Line 153... | ||
- | 153 | mcall ,1 |
|
154 | mcall ,1 |
154 | |
155 | 155 | mov al,14 |
|
156 | mcall 14 ;eax=14 - get screen max x & max y |
156 | mcall ;eax=14 - get screen max x & max y |
157 | movzx ecx,ax |
157 | movzx ecx,ax |
158 | shr eax,17 |
158 | shr eax,17 |
159 | shl eax,16 |
159 | shl eax,16 |
Line 174... | Line 174... | ||
174 | mcall ,<16,90> ,<20,27>,4,0x990022 ;eax=8 - draw buttons |
174 | mcall ,<16,90> ,<20,27>,4,0x990022 ;eax=8 - draw buttons |
175 | mcall ,<113,90>, ,2,0xaa7700 |
175 | mcall ,<113,90>, ,2,0xaa7700 |
176 | mcall , ,<54,27>,1,0x777777 |
176 | mcall , ,<54,27>,1,0x777777 |
177 | mcall ,<16,90> , ,3,0x007700 |
177 | mcall ,<16,90> , ,3,0x007700 |
Line -... | Line 178... | ||
- | 178 | ||
- | 179 | mov al,4 |
|
- | 180 | mcall ,<27,24> ,0x90ffffff,label2 ;eax=4 - write text |
|
- | 181 | mcall ,<23,58> , ,label3 |
|
- | 182 | mcall ,<47,37> , ,label5 |
|
- | 183 | mcall ,<41,71> , ,label6 |
|
178 | 184 | ||
179 | push dword check1 |
185 | push dword check1 |
Line 180... | Line -... | ||
180 | call [check_box_draw2] |
- | |
181 | - | ||
182 | mcall 4,<27,24> ,0x90ffffff,label2 ;eax=4 - write text |
- | |
183 | mcall ,<23,58> , ,label3 |
- | |
184 | mcall ,<47,37> ,0x90ffffff,label5 |
- | |
185 | mcall ,<44,71> , ,label6 |
186 | call [check_box_draw2] |
186 | 187 | ||
187 | mov al,12 |
188 | mov al,12 |
188 | mcall ,2 |
- | |
- | 189 | mcall ,2 |
|
189 | ret |
190 | ret |
190 | 191 | ;--------------------------------------------------------------------- |
|
Line 191... | Line 192... | ||
191 | data |
192 | ;data |
192 | include 'data.inc' |
193 | include 'data.inc' |
193 | 194 |