Rev 7181 | Rev 8427 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
31 | halyavin | 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
5872 | pathoswith | 2 | ; ; |
2619 | mario79 | 3 | ; TASK PANEL for KolibriOS - Compile with fasm ; |
5872 | pathoswith | 4 | ; ; |
31 | halyavin | 5 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2619 | mario79 | 6 | ;------------------------------------------------------------------------------ |
5872 | pathoswith | 7 | ; version: 2.25 |
8 | ; last update: 14/07/2013 |
||
9 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
||
10 | ; changes: Reinstall screen work area after change screen resolution |
||
3823 | mario79 | 11 | ;------------------------------------------------------------------------------ |
5872 | pathoswith | 12 | ; version: 2.24 |
13 | ; last update: 16/06/2013 |
||
14 | ; changed by: hidnplayr |
||
15 | ; changes: Changed keymap hotkeys to only use left alt |
||
16 | ; (Right alt has special function on some keyboards) |
||
3672 | hidnplayr | 17 | ;------------------------------------------------------------------------------ |
5872 | pathoswith | 18 | ; version: 2.23 |
19 | ; last update: 26/04/2012 |
||
20 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
||
21 | ; changes: Using new f18.23 - minimize all windows |
||
2649 | mario79 | 22 | ;------------------------------------------------------------------------------ |
5872 | pathoswith | 23 | ; version: 2.22 |
24 | ; last update: 20/04/2012 |
||
25 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
||
26 | ; changes: Activation mechanism when trying to run an existing appl. |
||
27 | ; Forced redrawing the background after the clean desktop (Win+D) |
||
2638 | mario79 | 28 | ;------------------------------------------------------------------------------ |
5872 | pathoswith | 29 | ; version: 2.2 |
30 | ; last update: 19/04/2012 |
||
31 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
||
32 | ; changes: Support PrintScreen for SCRSHOOT. |
||
33 | ; Path to run applications from the INI file. |
||
34 | ; Algorithm anti-duplication of applications for run with hotkey. |
||
35 | ; Added color selection for the Alt+Tab. |
||
36 | ; Alt+Ctrl+ArrowLeft - Page list next |
||
37 | ; Alt+Ctrl+ArrowRight - Page list previous |
||
2630 | mario79 | 38 | ;------------------------------------------------------------------------------ |
5872 | pathoswith | 39 | ; version: 2.1 |
40 | ; last update: 18/04/2012 |
||
41 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
||
42 | ; changes: Added color selection for the text. |
||
43 | ; Show "change page list" only if the applications |
||
44 | ; does not fit in the panel. |
||
45 | ; Display file names up to 11 char previously displ. only 8 char. |
||
2626 | mario79 | 46 | ;------------------------------------------------------------------------------ |
5872 | pathoswith | 47 | ; version: 2.0 |
48 | ; last update: 17/04/2012 |
||
49 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
||
50 | ; changes: New logic of switching windows (turnoff/restore) |
||
51 | ; New logic of button "clear desktop". |
||
52 | ; Win+D (restore/clear desktop), Win+R (start RUN application). |
||
53 | ; Using the library LibINI to set the parameters. |
||
54 | ; New style of panel. Start application Menu with boot options. |
||
55 | ; two versions of the location of the panel - |
||
56 | ; the bottom of the desktop and on top of the desktop. |
||
2619 | mario79 | 57 | ;------------------------------------------------------------------------------ |
5872 | pathoswith | 58 | ; last update: 31/03/2012 |
59 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
||
60 | ; changes: The program uses only 20 Kb memory is now. |
||
61 | ; Code optimizing and refactoring. |
||
2532 | mario79 | 62 | ;------------------------------------------------------------------------------ |
3670 | hidnplayr | 63 | format binary as "" |
64 | |||
3672 | hidnplayr | 65 | use32 |
66 | org 0x0 |
||
67 | db 'MENUET01' ; 8 byte id |
||
68 | dd 0x01 ; header version |
||
69 | dd START ; program start |
||
70 | dd IM_END ; program image size |
||
71 | dd I_END ; reguired amount of memory - 10 Kb |
||
72 | dd stack_top ; esp |
||
73 | dd 0x0 ; boot parameters |
||
74 | dd path ; application pach |
||
2619 | mario79 | 75 | ;------------------------------------------------------------------------------ |
31 | halyavin | 76 | include 'lang.inc' |
2619 | mario79 | 77 | include '../../../macros.inc' |
78 | include '../../../proc32.inc' |
||
3013 | dunkaist | 79 | ;include '../../../debug.inc' |
3672 | hidnplayr | 80 | include 'MOI.INC' ;раскладки клавиатуры |
2619 | mario79 | 81 | include '../../../develop/libraries/box_lib/load_lib.mac' |
3672 | hidnplayr | 82 | @use_library ;use load lib macros |
2619 | mario79 | 83 | ;------------------------------------------------------------------------------ |
84 | caps_lock_check fix 1 |
||
85 | ;------------------------------------------------------------------------------ |
||
1440 | diamond | 86 | time_bgr_color = 0x66cc |
2619 | mario79 | 87 | ;PANEL_HEIGHT = 18 |
88 | ML_SIZE = 10 |
||
89 | MR_SIZE = 10 |
||
3927 | kaitz | 90 | if lang eq et |
91 | MENU_SIZE = 60 |
||
92 | else |
||
2619 | mario79 | 93 | MENU_SIZE = 50 |
3927 | kaitz | 94 | end if |
2619 | mario79 | 95 | CLD_SIZE = 20 |
3672 | hidnplayr | 96 | TAB_SIZE = 75 ;60 |
2619 | mario79 | 97 | TRAY_SIZE = 140 |
1440 | diamond | 98 | |
2619 | mario79 | 99 | CLOCK_SIZE = 40 |
100 | CPU_USAGE_SIZE = 10 |
||
101 | CHLANG_SIZE = 20 |
||
102 | PAGE_LIST_SIZE = 36 |
||
103 | ;------------------------------------------------------------------------------ |
||
2532 | mario79 | 104 | align 4 |
93 | diamond | 105 | handle_key: |
3672 | hidnplayr | 106 | mcall 18,7 |
107 | mov [active_process],eax |
||
31 | halyavin | 108 | |
3672 | hidnplayr | 109 | mcall 2 |
5432 | eAndrew | 110 | |
5872 | pathoswith | 111 | ; dps "panel key: " |
112 | ; dph eax |
||
113 | ; newline |
||
2619 | mario79 | 114 | |
3672 | hidnplayr | 115 | cmp al, 2 |
116 | jnz begin_1.ret |
||
2532 | mario79 | 117 | |
3672 | hidnplayr | 118 | mov ebx, exec_fileinfo |
119 | shr eax, 8 |
||
120 | cmp al, 0 |
||
121 | je prod |
||
2532 | mario79 | 122 | |
3672 | hidnplayr | 123 | mov [key_r],al |
124 | sub [key_r],2 |
||
5872 | pathoswith | 125 | cmp [key_r],9 |
126 | jc alter |
||
2532 | mario79 | 127 | |
128 | if caps_lock_check |
||
3672 | hidnplayr | 129 | cmp al,58 ;CAPS LOCK DOWN |
130 | jne @f |
||
2532 | mario79 | 131 | |
3672 | hidnplayr | 132 | pusha |
133 | mcall 26,2,9 |
||
134 | mov ebx,eax |
||
135 | mov eax,2 |
||
136 | mov [draw_flag_certainly],1 |
||
137 | call draw_flag ; language |
||
138 | popa |
||
139 | ret |
||
2532 | mario79 | 140 | @@: |
141 | end if |
||
5872 | pathoswith | 142 | |
3672 | hidnplayr | 143 | cmp al, 15 ; Alt+Tab DOWN |
144 | jz alt_tab_pressed |
||
2532 | mario79 | 145 | |
3672 | hidnplayr | 146 | cmp al, 88 ; Ctrl+Alt+F12 |
147 | jz start_end_application |
||
2532 | mario79 | 148 | |
3672 | hidnplayr | 149 | cmp al, 91 ; RWin DOWN |
150 | jz set_win_key_flag |
||
2532 | mario79 | 151 | |
3672 | hidnplayr | 152 | cmp al, 92 ; LWin DOWN |
153 | jz set_win_key_flag |
||
5432 | eAndrew | 154 | |
3672 | hidnplayr | 155 | cmp al, 219 ; RWin UP |
156 | jz cut_win_key_flag ;start_menu_application |
||
2532 | mario79 | 157 | |
3672 | hidnplayr | 158 | cmp al, 220 ; LWin UP |
159 | jz cut_win_key_flag ;start_menu_application |
||
2619 | mario79 | 160 | |
5432 | eAndrew | 161 | cmp al, 62 ; Alt+F4 |
3672 | hidnplayr | 162 | jz kill_active_application |
2532 | mario79 | 163 | |
3672 | hidnplayr | 164 | cmp al, 205 |
165 | jz page_list_next |
||
2532 | mario79 | 166 | |
3672 | hidnplayr | 167 | cmp al, 203 |
168 | jz page_list_prev |
||
2532 | mario79 | 169 | |
3672 | hidnplayr | 170 | cmp al, 69 ; Alt+Shift+NumLock |
171 | jz start_mousemul_application |
||
5432 | eAndrew | 172 | |
3672 | hidnplayr | 173 | cmp al, 19 ; Win+R |
174 | jz start_run_application |
||
1920 | Albom | 175 | |
3672 | hidnplayr | 176 | cmp al, 32 ; Win+D |
177 | jz minimize_all_windows |
||
5432 | eAndrew | 178 | |
3672 | hidnplayr | 179 | cmp al, 55 ; PrintScreen DOWN |
180 | jz start_PrintScreen_application |
||
2619 | mario79 | 181 | ;-------------------------------------- |
182 | align 4 |
||
183 | prod: |
||
3672 | hidnplayr | 184 | cmp [current_alt_tab_app], -1 |
185 | jz @f |
||
2532 | mario79 | 186 | |
3672 | hidnplayr | 187 | test ah, 0x30 ; Alt+Tab UP |
188 | jz alt_tab_released |
||
2532 | mario79 | 189 | ;-------------------------------------- |
190 | align 4 |
||
443 | diamond | 191 | @@: |
7181 | 0CodErr | 192 | ; this is hotkey LCtrl+LShift ;or LShift+RShift |
3672 | hidnplayr | 193 | jmp karu |
2619 | mario79 | 194 | ;------------------------------------------------------------------------------ |
2532 | mario79 | 195 | align 4 |
2619 | mario79 | 196 | set_win_key_flag: |
3672 | hidnplayr | 197 | mov [win_key_flag],1 |
198 | ret |
||
2619 | mario79 | 199 | ;------------------------------------------------------------------------------ |
200 | align 4 |
||
201 | cut_win_key_flag: |
||
3672 | hidnplayr | 202 | xor eax,eax |
203 | mov [win_key_flag],al |
||
204 | xchg [start_menu_flag],al |
||
205 | test al,al |
||
206 | jz start_menu_application |
||
207 | ret |
||
2619 | mario79 | 208 | ;------------------------------------------------------------------------------ |
209 | align 4 |
||
304 | diamond | 210 | change_key_lang: |
3672 | hidnplayr | 211 | mov dword [ebx+8], chlang |
212 | mcall 70 |
||
2532 | mario79 | 213 | ;-------------------------------------- |
214 | align 4 |
||
31 | halyavin | 215 | begin_1: |
3672 | hidnplayr | 216 | mov ecx,[active_process] |
217 | mcall 18, 3 |
||
218 | mcall 5, 25 |
||
2532 | mario79 | 219 | ;-------------------------------------- |
220 | align 4 |
||
93 | diamond | 221 | .ret: |
3672 | hidnplayr | 222 | ret |
2619 | mario79 | 223 | ;------------------------------------------------------------------------------ |
2532 | mario79 | 224 | align 4 |
225 | start_end_application: |
||
3672 | hidnplayr | 226 | mov esi,end_name |
227 | call algorithm_anti_duplication |
||
228 | test eax,eax |
||
229 | jz @f |
||
2638 | mario79 | 230 | |
3672 | hidnplayr | 231 | mcall 18,3,edi |
232 | ret |
||
2630 | mario79 | 233 | ;-------------------------------------- |
234 | align 4 |
||
235 | @@: |
||
3672 | hidnplayr | 236 | mov ebx, exec_fileinfo |
237 | mov dword [ebx+21],end_name |
||
238 | mcall 70 |
||
239 | ret |
||
2619 | mario79 | 240 | ;------------------------------------------------------------------------------ |
2532 | mario79 | 241 | align 4 |
242 | start_mousemul_application: |
||
3672 | hidnplayr | 243 | mov esi,mousemul_name |
244 | call algorithm_anti_duplication |
||
245 | test eax,eax |
||
246 | jz @f |
||
247 | ret |
||
2630 | mario79 | 248 | ;-------------------------------------- |
249 | align 4 |
||
250 | @@: |
||
3672 | hidnplayr | 251 | mov ebx, exec_fileinfo |
252 | mov dword [ebx+21],mousemul_name |
||
253 | mcall 70 |
||
254 | ret |
||
2619 | mario79 | 255 | ;------------------------------------------------------------------------------ |
2532 | mario79 | 256 | align 4 |
257 | kill_active_application: |
||
3672 | hidnplayr | 258 | mcall 72,1,3,1 |
259 | jmp begin_1.ret |
||
2619 | mario79 | 260 | ;------------------------------------------------------------------------------ |
261 | |||
2532 | mario79 | 262 | align 4 |
263 | start_menu_application: |
||
3672 | hidnplayr | 264 | call menu_handler |
265 | jmp begin_1.ret |
||
2619 | mario79 | 266 | ;------------------------------------------------------------------------------ |
267 | align 4 |
||
268 | start_run_application: |
||
3672 | hidnplayr | 269 | cmp [win_key_flag],1 |
270 | je @f |
||
271 | ret |
||
2626 | mario79 | 272 | ;-------------------------------------- |
273 | align 4 |
||
2619 | mario79 | 274 | @@: |
3672 | hidnplayr | 275 | mov [start_menu_flag],1 |
5432 | eAndrew | 276 | |
3672 | hidnplayr | 277 | mov esi,run_name |
278 | call algorithm_anti_duplication |
||
279 | test eax,eax |
||
280 | jz @f |
||
2638 | mario79 | 281 | |
3672 | hidnplayr | 282 | mcall 18,3,edi |
283 | ret |
||
2630 | mario79 | 284 | ;-------------------------------------- |
285 | align 4 |
||
286 | @@: |
||
3672 | hidnplayr | 287 | mov ebx, exec_fileinfo |
288 | mov dword [ebx+21], run_name |
||
289 | mcall 70 |
||
290 | jmp begin_1.ret |
||
2619 | mario79 | 291 | ;------------------------------------------------------------------------------ |
292 | align 4 |
||
2630 | mario79 | 293 | start_PrintScreen_application: |
3672 | hidnplayr | 294 | mov esi,printscreen_name |
295 | call algorithm_anti_duplication |
||
296 | test eax,eax |
||
297 | jz @f |
||
298 | mcall 18,3,edi |
||
299 | ret |
||
2630 | mario79 | 300 | ;-------------------------------------- |
301 | align 4 |
||
302 | @@: |
||
3672 | hidnplayr | 303 | mov ebx, exec_fileinfo |
304 | mov dword [ebx+21],printscreen_name |
||
305 | mov [ebx+8],dword bootparam_printscreen |
||
306 | mcall 70 |
||
307 | jmp begin_1.ret |
||
2630 | mario79 | 308 | ;------------------------------------------------------------------------------ |
309 | align 4 |
||
2619 | mario79 | 310 | minimize_all_windows: |
3672 | hidnplayr | 311 | cmp [win_key_flag],1 |
312 | je @f |
||
313 | ret |
||
2626 | mario79 | 314 | ;-------------------------------------- |
315 | align 4 |
||
2619 | mario79 | 316 | @@: |
3672 | hidnplayr | 317 | mov [start_menu_flag],1 |
318 | call clean_desktop |
||
319 | ret |
||
2619 | mario79 | 320 | ;------------------------------------------------------------------------------ |
2630 | mario79 | 321 | align 4 |
322 | algorithm_anti_duplication: |
||
3672 | hidnplayr | 323 | cld |
2630 | mario79 | 324 | ;-------------------------------------- |
325 | align 4 |
||
326 | @@: |
||
3672 | hidnplayr | 327 | lodsb |
328 | test al,al |
||
329 | jnz @r |
||
2630 | mario79 | 330 | ;-------------------------------------- |
331 | align 4 |
||
332 | @@: |
||
3672 | hidnplayr | 333 | std |
334 | lodsb |
||
335 | cmp al,'/' |
||
336 | jnz @r |
||
337 | add esi,2 |
||
338 | mov edx,esi |
||
5432 | eAndrew | 339 | |
3672 | hidnplayr | 340 | mov edi,1 |
2630 | mario79 | 341 | ;-------------------------------------- |
342 | align 4 |
||
343 | @@: |
||
3672 | hidnplayr | 344 | inc edi |
345 | mov ecx,edi |
||
346 | mcall 9,procinfo_window_tabs |
||
2630 | mario79 | 347 | |
3672 | hidnplayr | 348 | cmp edi,eax |
349 | jg .apply_changes |
||
2630 | mario79 | 350 | |
3672 | hidnplayr | 351 | mov esi,edx |
352 | mov ecx,11 |
||
353 | add ebx,9 |
||
354 | cld |
||
2630 | mario79 | 355 | ;-------------------------------------- |
356 | align 4 |
||
357 | .loop: |
||
3672 | hidnplayr | 358 | lodsb |
359 | inc ebx |
||
360 | cmp al,[ebx] |
||
361 | jne @r |
||
2630 | mario79 | 362 | |
3672 | hidnplayr | 363 | loop .loop |
2630 | mario79 | 364 | |
3672 | hidnplayr | 365 | mov eax,1 |
366 | ret |
||
2630 | mario79 | 367 | ;-------------------------------------- |
368 | align 4 |
||
369 | .apply_changes: |
||
3672 | hidnplayr | 370 | xor eax,eax |
371 | ret |
||
2619 | mario79 | 372 | ;------------------------------------------------------------------------------ |
2630 | mario79 | 373 | align 4 |
374 | page_list_next: |
||
3672 | hidnplayr | 375 | cmp [page_list],50 |
376 | je @f |
||
2630 | mario79 | 377 | |
3672 | hidnplayr | 378 | xor eax,eax |
379 | cmp [page_list_enable],eax |
||
380 | je @f |
||
2630 | mario79 | 381 | |
3672 | hidnplayr | 382 | inc [page_list] |
383 | mov [redraw_window_flag],1 |
||
2630 | mario79 | 384 | ;-------------------------------------- |
385 | align 4 |
||
386 | @@: |
||
3672 | hidnplayr | 387 | jmp begin_1.ret |
2619 | mario79 | 388 | ;------------------------------------------------------------------------------ |
2532 | mario79 | 389 | align 4 |
2630 | mario79 | 390 | page_list_prev: |
3672 | hidnplayr | 391 | xor eax,eax |
392 | cmp [page_list],eax |
||
393 | je @f |
||
2630 | mario79 | 394 | |
3672 | hidnplayr | 395 | cmp [page_list_enable],eax |
396 | je @f |
||
2630 | mario79 | 397 | |
3672 | hidnplayr | 398 | dec [page_list] |
399 | mov [redraw_window_flag],1 |
||
2630 | mario79 | 400 | ;-------------------------------------- |
401 | align 4 |
||
402 | @@: |
||
3672 | hidnplayr | 403 | jmp begin_1.ret |
2630 | mario79 | 404 | ;------------------------------------------------------------------------------ |
405 | align 4 |
||
443 | diamond | 406 | alt_tab_pressed: |
407 | ; handle Alt+Tab and Alt+Shift+Tab |
||
3672 | hidnplayr | 408 | mov ebp, eax |
409 | cmp [current_alt_tab_app], -1 |
||
410 | jnz has_alt_tab_app |
||
443 | diamond | 411 | ; заполняем таблицу приложений, подлежащих переключению |
3672 | hidnplayr | 412 | xor edx, edx |
413 | mov ebx, procinfo_window_tabs |
||
414 | mov ecx, 1 |
||
2626 | mario79 | 415 | ;-------------------------------------- |
416 | align 4 |
||
443 | diamond | 417 | .fill: |
3672 | hidnplayr | 418 | inc ecx |
419 | mcall 9 |
||
420 | call need_window_tab |
||
421 | jz @f |
||
2532 | mario79 | 422 | |
3672 | hidnplayr | 423 | cmp edx, 256 |
424 | jz @f |
||
2532 | mario79 | 425 | |
3672 | hidnplayr | 426 | mov [alt_tab_list+edx*8], ecx |
427 | movzx esi, word [ebx+4] |
||
428 | mov [alt_tab_list+edx*8+4], esi |
||
429 | inc edx |
||
2532 | mario79 | 430 | ;-------------------------------------- |
431 | align 4 |
||
443 | diamond | 432 | @@: |
3672 | hidnplayr | 433 | cmp ecx,eax |
434 | jb .fill |
||
2532 | mario79 | 435 | |
3672 | hidnplayr | 436 | mov [alt_tab_list_size], edx |
437 | test edx, edx |
||
438 | jz begin_1.ret |
||
2532 | mario79 | 439 | |
3672 | hidnplayr | 440 | mcall 66,4,0,0 ; ловим момент отпускания всех управляющих клавиш |
441 | test eax, eax |
||
442 | jnz begin_1.ret |
||
2532 | mario79 | 443 | |
3672 | hidnplayr | 444 | xor edx, edx |
445 | mov eax, [alt_tab_list+4] |
||
446 | xor ecx, ecx |
||
447 | inc ecx |
||
2532 | mario79 | 448 | ;-------------------------------------- |
449 | align 4 |
||
443 | diamond | 450 | .findmax: |
3672 | hidnplayr | 451 | cmp [alt_tab_list+ecx*8+4], eax |
452 | jb @f |
||
2532 | mario79 | 453 | |
3672 | hidnplayr | 454 | mov edx, ecx |
455 | mov eax, [alt_tab_list+ecx*8+4] |
||
2532 | mario79 | 456 | ;-------------------------------------- |
457 | align 4 |
||
443 | diamond | 458 | @@: |
3672 | hidnplayr | 459 | inc ecx |
460 | cmp ecx, [alt_tab_list_size] |
||
461 | jb .findmax |
||
2532 | mario79 | 462 | |
3672 | hidnplayr | 463 | mov [current_alt_tab_app], edx |
2532 | mario79 | 464 | ;-------------------------------------- |
465 | align 4 |
||
443 | diamond | 466 | has_alt_tab_app: |
3672 | hidnplayr | 467 | mov eax, [current_alt_tab_app] |
468 | mov edx, [alt_tab_list+eax*8+4] ; slot |
||
469 | xor ecx, ecx |
||
470 | or eax, -1 |
||
471 | test ebp, 300h |
||
472 | jz .notshift |
||
2532 | mario79 | 473 | |
3672 | hidnplayr | 474 | or esi, -1 |
2532 | mario79 | 475 | ;-------------------------------------- |
476 | align 4 |
||
443 | diamond | 477 | .loop1: |
3672 | hidnplayr | 478 | cmp [alt_tab_list+ecx*8+4], edx |
479 | jbe @f |
||
2532 | mario79 | 480 | |
3672 | hidnplayr | 481 | cmp [alt_tab_list+ecx*8+4], esi |
482 | jae @f |
||
2532 | mario79 | 483 | |
3672 | hidnplayr | 484 | mov eax, ecx |
485 | mov esi, [alt_tab_list+ecx*8+4] |
||
2532 | mario79 | 486 | ;-------------------------------------- |
487 | align 4 |
||
443 | diamond | 488 | @@: |
3672 | hidnplayr | 489 | inc ecx |
490 | cmp ecx, [alt_tab_list_size] |
||
491 | jb .loop1 |
||
2532 | mario79 | 492 | |
3672 | hidnplayr | 493 | cmp eax, -1 |
494 | jnz .found |
||
2532 | mario79 | 495 | |
3672 | hidnplayr | 496 | xor edx, edx |
497 | xor ecx, ecx |
||
498 | jmp .loop1 |
||
2532 | mario79 | 499 | ;-------------------------------------- |
500 | align 4 |
||
443 | diamond | 501 | .notshift: |
3672 | hidnplayr | 502 | xor esi, esi |
2532 | mario79 | 503 | ;-------------------------------------- |
504 | align 4 |
||
443 | diamond | 505 | .loop2: |
3672 | hidnplayr | 506 | cmp [alt_tab_list+ecx*8+4], edx |
507 | jae @f |
||
2532 | mario79 | 508 | |
3672 | hidnplayr | 509 | cmp [alt_tab_list+ecx*8+4], esi |
510 | jbe @f |
||
2532 | mario79 | 511 | |
3672 | hidnplayr | 512 | mov eax, ecx |
513 | mov esi, [alt_tab_list+ecx*8+4] |
||
2532 | mario79 | 514 | ;-------------------------------------- |
515 | align 4 |
||
443 | diamond | 516 | @@: |
3672 | hidnplayr | 517 | inc ecx |
518 | cmp ecx, [alt_tab_list_size] |
||
519 | jb .loop2 |
||
2532 | mario79 | 520 | |
3672 | hidnplayr | 521 | cmp eax, -1 |
522 | jnz .found |
||
2532 | mario79 | 523 | |
3672 | hidnplayr | 524 | or edx, -1 |
525 | xor ecx, ecx |
||
526 | jmp .loop2 |
||
2532 | mario79 | 527 | ;-------------------------------------- |
528 | align 4 |
||
443 | diamond | 529 | .found: |
3672 | hidnplayr | 530 | mov [current_alt_tab_app], eax |
531 | push eax |
||
532 | xor edx, edx |
||
533 | div [max_applications] |
||
534 | mov [page_list], eax |
||
535 | mov edi, app_list |
||
536 | push edi |
||
537 | mov ecx, 20 |
||
538 | or eax, -1 |
||
539 | rep stosd |
||
540 | pop edi |
||
541 | pop ecx |
||
542 | sub ecx, edx |
||
2532 | mario79 | 543 | ;-------------------------------------- |
544 | align 4 |
||
443 | diamond | 545 | @@: |
3672 | hidnplayr | 546 | cmp ecx, [alt_tab_list_size] |
547 | jae redraw_window_tabs |
||
2532 | mario79 | 548 | |
3672 | hidnplayr | 549 | mov eax, [alt_tab_list+ecx*8] |
550 | stosd |
||
551 | inc ecx |
||
552 | jmp @b |
||
2532 | mario79 | 553 | ;-------------------------------------- |
554 | align 4 |
||
443 | diamond | 555 | alt_tab_released: |
3672 | hidnplayr | 556 | mcall 66,5,0,0 ; уже поймали, хватит :) |
2619 | mario79 | 557 | |
3672 | hidnplayr | 558 | or eax, -1 |
559 | xchg eax, [current_alt_tab_app] |
||
560 | mov ecx, [alt_tab_list+eax*8] |
||
561 | mcall 18,3 |
||
2619 | mario79 | 562 | |
3672 | hidnplayr | 563 | jmp redraw_window_tabs |
2619 | mario79 | 564 | ;------------------------------------------------------------------------------ |
2532 | mario79 | 565 | align 4 |
3672 | hidnplayr | 566 | active_process dd 0 |
31 | halyavin | 567 | |
2619 | mario79 | 568 | exit: |
3672 | hidnplayr | 569 | mcall -1 |
2619 | mario79 | 570 | ;------------------------------------------------------------------------------ |
571 | START: |
||
3672 | hidnplayr | 572 | mcall 68,11 |
573 | mcall 66,1,1 |
||
5432 | eAndrew | 574 | |
3672 | hidnplayr | 575 | mcall 9,process_info_buffer,-1 |
576 | mov ecx,[ebx+30] ; PID |
||
577 | mcall 18,21 |
||
578 | mov [my_active_slot],eax ; WINDOW SLOT |
||
5432 | eAndrew | 579 | |
580 | |||
2619 | mario79 | 581 | load_libraries l_libs_start,end_l_libs |
31 | halyavin | 582 | |
3672 | hidnplayr | 583 | test eax,eax |
584 | jnz exit |
||
31 | halyavin | 585 | |
3672 | hidnplayr | 586 | call Get_ini |
2619 | mario79 | 587 | |
3672 | hidnplayr | 588 | mcall 66,4,0,2 ; LShift+RShift |
7181 | 0CodErr | 589 | mcall 66,,,33h ; LCtrl+LShift |
3672 | hidnplayr | 590 | mcall 66,,88,110h ; Alt+Ctrl+F12 |
591 | mcall 66,,91,0h ; RWin DOWN |
||
592 | mcall 66,,92 ; LWin DOWN |
||
593 | mcall 66,,219 ; RWin UP |
||
594 | mcall 66,,220 ; LWin UP |
||
595 | mcall 66,,19,0h ; Win+R DOWN |
||
596 | mcall 66,,32,0h ; Win+D DOWN |
||
3713 | mario79 | 597 | mcall 66,,55,10h ; Ctrl+PrintScreen DOWN |
3672 | hidnplayr | 598 | mcall 66,,62,300h ; Alt+F4 |
599 | mcall 66,,2 ; Alt+1 |
||
600 | mcall 66,,3 ; Alt+2 |
||
601 | mcall 66,,4 ; Alt+3 |
||
602 | mcall 66,,5 ; Alt+4 |
||
603 | mcall 66,,6 ; Alt+5 |
||
604 | mcall 66,,7 ; Alt+6 |
||
605 | mcall 66,,8 ; Alt+7 |
||
5872 | pathoswith | 606 | mcall 66,,9 ; Alt+8 |
607 | mcall 66,,10 ; Alt+9 |
||
3672 | hidnplayr | 608 | mcall 66,,15 ; Alt+Tab DOWN |
609 | mcall 66,,15,301h ; Alt+Shift+Tab DOWN |
||
610 | mcall 66,,69 ; Alt+Shift+NumLock |
||
870 | barsuk | 611 | |
2532 | mario79 | 612 | if caps_lock_check |
3672 | hidnplayr | 613 | xor edx,edx |
614 | mcall 66,4,58 |
||
2532 | mario79 | 615 | end if |
3672 | hidnplayr | 616 | mcall 14 |
617 | mov [screen_size],eax |
||
31 | halyavin | 618 | |
3823 | mario79 | 619 | call set_work_ares_pf_screen |
51 | mikedld | 620 | |
3672 | hidnplayr | 621 | mcall 9,process_info_buffer,-1 |
622 | mov ecx,[process_info_buffer+30] |
||
623 | mcall 18,21 |
||
624 | mov [this_slot],eax |
||
625 | mov [max_slot],255 |
||
2532 | mario79 | 626 | ;-------------------------------------- |
627 | align 4 |
||
31 | halyavin | 628 | start_after_minimize: |
3672 | hidnplayr | 629 | call draw_window |
630 | call draw_running_applications |
||
31 | halyavin | 631 | |
3672 | hidnplayr | 632 | mcall 23,30 |
633 | call load_ini |
||
2532 | mario79 | 634 | ;------------------------------------------------------------------------------ |
635 | align 4 |
||
31 | halyavin | 636 | still: |
3672 | hidnplayr | 637 | call draw_time |
638 | call draw_cpu_usage |
||
639 | call draw_running_applications |
||
31 | halyavin | 640 | |
3672 | hidnplayr | 641 | mcall 18,7 ; check if active window changed |
642 | cmp eax, [last_active_window] |
||
643 | jz @f |
||
870 | barsuk | 644 | ; need_window_tab: |
645 | ; in: ebx->process info |
||
646 | ; out: ZF set <=> do not draw |
||
3672 | hidnplayr | 647 | mov ebx,[last_active_window] |
648 | mov [prev_active_window], ebx |
||
649 | mov [last_active_window], eax |
||
870 | barsuk | 650 | |
3672 | hidnplayr | 651 | mov ecx, eax |
652 | mcall 9,process_info_buffer |
||
870 | barsuk | 653 | |
3672 | hidnplayr | 654 | call need_window_tab |
655 | jnz .need_repaint |
||
870 | barsuk | 656 | |
3672 | hidnplayr | 657 | mcall 9,process_info_buffer,[prev_active_window] |
658 | call need_window_tab |
||
659 | jz @f |
||
2532 | mario79 | 660 | ;-------------------------------------- |
661 | align 4 |
||
870 | barsuk | 662 | .need_repaint: |
3672 | hidnplayr | 663 | mov dword [active_window_changed], 1 |
2532 | mario79 | 664 | ;-------------------------------------- |
665 | align 4 |
||
870 | barsuk | 666 | @@: |
3672 | hidnplayr | 667 | mcall 23,20 |
5432 | eAndrew | 668 | |
3672 | hidnplayr | 669 | push eax |
670 | mcall 18,7 |
||
671 | cmp [my_active_slot],eax |
||
672 | je @f |
||
2630 | mario79 | 673 | |
3672 | hidnplayr | 674 | mov [current_active_slot],eax |
2630 | mario79 | 675 | ;-------------------------------------- |
676 | align 4 |
||
2619 | mario79 | 677 | @@: |
3672 | hidnplayr | 678 | pop eax |
5432 | eAndrew | 679 | |
3672 | hidnplayr | 680 | cmp eax,1 ; redraw ? |
681 | jz red |
||
870 | barsuk | 682 | |
3672 | hidnplayr | 683 | push eax |
684 | mov eax,[redraw_window_flag] |
||
685 | test eax,eax |
||
686 | jz @f |
||
2630 | mario79 | 687 | |
3672 | hidnplayr | 688 | call draw_window |
2630 | mario79 | 689 | ;-------------------------------------- |
690 | align 4 |
||
2626 | mario79 | 691 | @@: |
3672 | hidnplayr | 692 | pop eax |
5432 | eAndrew | 693 | |
3672 | hidnplayr | 694 | cmp eax,2 |
695 | jnz @f |
||
696 | call handle_key |
||
697 | jmp .key |
||
2630 | mario79 | 698 | ;-------------------------------------- |
699 | align 4 |
||
2619 | mario79 | 700 | @@: |
3672 | hidnplayr | 701 | cmp eax,3 ; button ? |
702 | jz button |
||
2630 | mario79 | 703 | ;-------------------------------------- |
704 | align 4 |
||
2619 | mario79 | 705 | .key: |
3672 | hidnplayr | 706 | cmp dword [active_window_changed], 0 |
707 | jnz red_active |
||
870 | barsuk | 708 | |
3672 | hidnplayr | 709 | call draw_flag ; language |
710 | jmp still |
||
2619 | mario79 | 711 | ;------------------------------------------------------------------------------ |
2532 | mario79 | 712 | align 4 |
3823 | mario79 | 713 | set_work_ares_pf_screen: |
714 | ;eax = [xsize]*65536 + [ysize] |
||
715 | mov ecx,eax |
||
716 | shr ecx,16 |
||
717 | and eax,0xFFFF |
||
718 | cmp [place_attachment],1 |
||
719 | je @f |
||
720 | |||
721 | ror eax,16 |
||
722 | add eax,[height] |
||
723 | rol eax,16 |
||
724 | mov edx,eax |
||
725 | jmp .selected |
||
726 | ;-------------------------------------- |
||
727 | align 4 |
||
728 | @@: |
||
729 | sub eax,[height] |
||
730 | mov edx, eax |
||
731 | ;-------------------------------------- |
||
732 | align 4 |
||
5432 | eAndrew | 733 | .selected: |
3823 | mario79 | 734 | mcall 48,6 |
735 | ret |
||
736 | ;------------------------------------------------------------------------------ |
||
737 | align 4 |
||
2532 | mario79 | 738 | red_active: |
739 | red: |
||
3672 | hidnplayr | 740 | mov dword [active_window_changed], 0 |
870 | barsuk | 741 | |
3672 | hidnplayr | 742 | mcall 14 |
743 | movzx ecx,ax |
||
744 | mov edx,eax |
||
745 | shr edx,16 |
||
746 | cmp [screen_size.height],ax |
||
747 | jne @f |
||
2532 | mario79 | 748 | |
3672 | hidnplayr | 749 | rol eax,16 |
750 | cmp [screen_size.width],ax |
||
751 | je .lp1 |
||
2630 | mario79 | 752 | |
3672 | hidnplayr | 753 | rol eax,16 |
2630 | mario79 | 754 | ;-------------------------------------- |
755 | align 4 |
||
2532 | mario79 | 756 | @@: |
3672 | hidnplayr | 757 | mov [screen_size],eax |
3823 | mario79 | 758 | |
759 | push ecx edx |
||
760 | call set_work_ares_pf_screen |
||
761 | pop edx ecx |
||
762 | |||
3672 | hidnplayr | 763 | sub ecx,[height] |
764 | mcall 67,0,,,[height] |
||
2532 | mario79 | 765 | ;-------------------------------------- |
766 | align 4 |
||
767 | .lp1: |
||
3672 | hidnplayr | 768 | call draw_window |
769 | jmp still |
||
2619 | mario79 | 770 | ;------------------------------------------------------------------------------ |
2532 | mario79 | 771 | align 4 |
772 | button: |
||
3672 | hidnplayr | 773 | mcall 17 |
5452 | leency | 774 | test eax,0xfffffe00 ; is it close button? (signal from @taskbar) |
775 | jz still ; if so - wait for another event, because @taskbar shouldn't be closed |
||
51 | mikedld | 776 | |
3672 | hidnplayr | 777 | cmp al, 0 |
778 | jnz right_mouse |
||
870 | barsuk | 779 | |
3672 | hidnplayr | 780 | cmp ah,50 |
781 | jb no_activate |
||
782 | cmp ah,70 |
||
783 | jg no_activate |
||
31 | halyavin | 784 | |
3672 | hidnplayr | 785 | movzx ecx,byte ah |
786 | sub ecx,52 |
||
787 | shl ecx,2 |
||
870 | barsuk | 788 | |
3672 | hidnplayr | 789 | mov ecx,[app_list+ecx] |
5432 | eAndrew | 790 | |
3672 | hidnplayr | 791 | mcall 9,process_info_buffer |
2619 | mario79 | 792 | |
3672 | hidnplayr | 793 | test [ebx+70],dword 10b ; window is minimized to panel |
794 | jnz @f |
||
2619 | mario79 | 795 | |
3672 | hidnplayr | 796 | cmp ecx,[current_active_slot] |
797 | je .turn_off |
||
2630 | mario79 | 798 | ;-------------------------------------- |
799 | align 4 |
||
2619 | mario79 | 800 | @@: |
3672 | hidnplayr | 801 | mcall 18,3, |
802 | jmp .task_switching |
||
2619 | mario79 | 803 | ;-------------------------------------- |
2532 | mario79 | 804 | align 4 |
2619 | mario79 | 805 | .turn_off: |
3672 | hidnplayr | 806 | mov edx,ecx |
807 | mcall 18,22,0 |
||
2630 | mario79 | 808 | ;-------------------------------------- |
809 | align 4 |
||
2619 | mario79 | 810 | .task_switching: |
3672 | hidnplayr | 811 | mcall 68,1 |
5432 | eAndrew | 812 | jmp still |
2619 | mario79 | 813 | ;------------------------------------------------------------------------------ |
814 | align 4 |
||
2532 | mario79 | 815 | right_mouse: |
3672 | hidnplayr | 816 | cmp ah,50 |
817 | jb still |
||
31 | halyavin | 818 | |
3672 | hidnplayr | 819 | cmp ah,70 |
820 | jg still |
||
870 | barsuk | 821 | |
3672 | hidnplayr | 822 | movzx ecx,byte ah |
823 | sub ecx,52 |
||
870 | barsuk | 824 | |
3672 | hidnplayr | 825 | cmp ecx, [app_tab_count] |
826 | jge still |
||
870 | barsuk | 827 | |
3672 | hidnplayr | 828 | shl ecx,2 |
829 | mcall 37,0 |
||
830 | mov ebx, eax |
||
831 | shr eax, 16 |
||
832 | mov [x_coord], ax |
||
833 | and ebx, 0xFFFF |
||
834 | mov [y_coord], bx |
||
870 | barsuk | 835 | |
3672 | hidnplayr | 836 | mov ecx,[app_list+ecx] ; ecx->selected app.slot |
837 | mov [n_slot], ecx |
||
838 | mcall 9,procinfo_for_detect |
||
870 | barsuk | 839 | |
3672 | hidnplayr | 840 | mcall 51,1,context_menu_start,ctx_menu_stack |
870 | barsuk | 841 | |
3672 | hidnplayr | 842 | mov [ctx_menu_PID], eax |
843 | jmp still |
||
2619 | mario79 | 844 | ;------------------------------------------------------------------------------ |
2532 | mario79 | 845 | align 4 |
846 | no_activate: |
||
3672 | hidnplayr | 847 | cmp ah,101 ; minimize to left |
848 | je left_button |
||
870 | barsuk | 849 | |
3672 | hidnplayr | 850 | cmp ah,102 ; minimize to right |
851 | je right_button |
||
870 | barsuk | 852 | |
3672 | hidnplayr | 853 | cmp ah, 103 |
854 | je clean_desktop_1 ; minimize all windows |
||
870 | barsuk | 855 | |
3672 | hidnplayr | 856 | cmp ah,byte 1 ; start/terminate menu |
857 | jnz noselect |
||
31 | halyavin | 858 | |
3672 | hidnplayr | 859 | call menu_handler |
31 | halyavin | 860 | |
3672 | hidnplayr | 861 | jmp still |
2532 | mario79 | 862 | ;-------------------------------------- |
2619 | mario79 | 863 | align 4 |
864 | clean_desktop_1: |
||
5432 | eAndrew | 865 | call clean_desktop |
3672 | hidnplayr | 866 | jmp still |
2619 | mario79 | 867 | ;-------------------------------------- |
5432 | eAndrew | 868 | align 4 |
2532 | mario79 | 869 | noselect: |
3672 | hidnplayr | 870 | mov ebx, exec_fileinfo |
871 | cmp ah,byte 2 ; start calendar |
||
872 | jnz noid15 ;noclock |
||
633 | diamond | 873 | |
3672 | hidnplayr | 874 | mov esi,calendar_name |
875 | call algorithm_anti_duplication |
||
876 | test eax,eax |
||
877 | jz @f |
||
2630 | mario79 | 878 | |
5432 | eAndrew | 879 | mcall 18,2,edi |
3672 | hidnplayr | 880 | jmp still |
2638 | mario79 | 881 | ;-------------------------------------- |
882 | align 4 |
||
883 | @@: |
||
3672 | hidnplayr | 884 | mov ebx, exec_fileinfo |
885 | mov dword [ebx+21], calendar_name |
||
886 | mcall 70 |
||
887 | jmp still |
||
2532 | mario79 | 888 | ;-------------------------------------- |
5432 | eAndrew | 889 | align 4 |
2532 | mario79 | 890 | noid15: |
3672 | hidnplayr | 891 | cmp ah,16 |
892 | jne noid16 |
||
31 | halyavin | 893 | |
3672 | hidnplayr | 894 | call karu |
895 | call draw_flag ; language |
||
896 | jmp still |
||
2532 | mario79 | 897 | ;-------------------------------------- |
5432 | eAndrew | 898 | align 4 |
2532 | mario79 | 899 | noid16: |
3672 | hidnplayr | 900 | cmp ah,18 |
901 | jne noid18 |
||
2532 | mario79 | 902 | |
3672 | hidnplayr | 903 | mov esi,sysmeter_name |
904 | call algorithm_anti_duplication |
||
905 | test eax,eax |
||
906 | jz @f |
||
2630 | mario79 | 907 | |
4031 | heavyiron | 908 | mcall 18,2,edi |
3672 | hidnplayr | 909 | jmp still |
2638 | mario79 | 910 | ;-------------------------------------- |
5432 | eAndrew | 911 | align 4 |
2638 | mario79 | 912 | @@: |
3672 | hidnplayr | 913 | mov ebx, exec_fileinfo |
914 | mov dword [ebx+21], sysmeter_name |
||
915 | mcall 70 |
||
916 | jmp still |
||
2532 | mario79 | 917 | ;-------------------------------------- |
5432 | eAndrew | 918 | align 4 |
2532 | mario79 | 919 | noid18: |
3672 | hidnplayr | 920 | cmp ah,21 |
921 | jnz noid21 |
||
31 | halyavin | 922 | |
3672 | hidnplayr | 923 | cmp [page_list],50 |
924 | jnc still |
||
925 | inc [page_list] |
||
926 | jmp red |
||
2532 | mario79 | 927 | ;-------------------------------------- |
5432 | eAndrew | 928 | align 4 |
2532 | mario79 | 929 | noid21: |
3672 | hidnplayr | 930 | cmp ah,22 |
931 | jnz still |
||
31 | halyavin | 932 | |
3672 | hidnplayr | 933 | cmp [page_list],0 |
934 | je still |
||
31 | halyavin | 935 | |
3672 | hidnplayr | 936 | dec [page_list] |
937 | jmp red |
||
2619 | mario79 | 938 | ;------------------------------------------------------------------------------ |
2532 | mario79 | 939 | align 4 |
633 | diamond | 940 | restore_desktop: |
3672 | hidnplayr | 941 | mcall 9,process_info_buffer,-1 |
942 | mov [max_slot], eax |
||
943 | mov ecx, 2 |
||
944 | mov edx, 2 |
||
2532 | mario79 | 945 | ;-------------------------------------- |
5432 | eAndrew | 946 | align 4 |
633 | diamond | 947 | @@: |
3672 | hidnplayr | 948 | mcall 18, 22 |
949 | inc edx |
||
950 | cmp edx, [max_slot] |
||
951 | jbe @b |
||
952 | ret |
||
2619 | mario79 | 953 | ;------------------------------------------------------------------------------ |
2532 | mario79 | 954 | align 4 |
633 | diamond | 955 | clean_desktop: |
3672 | hidnplayr | 956 | mcall 18,23 |
957 | test eax,eax |
||
958 | jnz @f |
||
959 | call restore_desktop |
||
2630 | mario79 | 960 | ;-------------------------------------- |
961 | align 4 |
||
443 | diamond | 962 | @@: |
3672 | hidnplayr | 963 | ret |
2619 | mario79 | 964 | ;------------------------------------------------------------------------------ |
2532 | mario79 | 965 | align 4 |
2619 | mario79 | 966 | conversion_HEX_to_ASCII: |
3672 | hidnplayr | 967 | ror eax,12 |
968 | mov ecx,4 |
||
2532 | mario79 | 969 | ;-------------------------------------- |
970 | align 4 |
||
443 | diamond | 971 | .loop: |
3672 | hidnplayr | 972 | mov bl,al |
973 | rol eax,4 |
||
974 | and bl,0xf |
||
975 | cmp bl,0xA ; check for ABCDEF |
||
976 | jae @f |
||
31 | halyavin | 977 | |
3672 | hidnplayr | 978 | add bl,0x30 ; 0-9 |
979 | jmp .store |
||
2532 | mario79 | 980 | ;-------------------------------------- |
981 | align 4 |
||
443 | diamond | 982 | @@: |
3672 | hidnplayr | 983 | add bl,0x57 ; A-F |
2532 | mario79 | 984 | ;-------------------------------------- |
985 | align 4 |
||
2619 | mario79 | 986 | .store: |
5872 | pathoswith | 987 | ; dps "param_store: " |
3672 | hidnplayr | 988 | mov [edi],bl |
989 | inc edi |
||
990 | dec ecx |
||
991 | jnz .loop |
||
992 | ret |
||
2619 | mario79 | 993 | ;------------------------------------------------------------------------------ |
2532 | mario79 | 994 | align 4 |
2619 | mario79 | 995 | menu_handler: |
3672 | hidnplayr | 996 | mov edi,bootparam |
5432 | eAndrew | 997 | |
3672 | hidnplayr | 998 | mov eax,[menu_button_x.start] |
999 | call conversion_HEX_to_ASCII |
||
31 | halyavin | 1000 | |
3672 | hidnplayr | 1001 | mov eax,[menu_button_x.size] |
1002 | call conversion_HEX_to_ASCII |
||
5432 | eAndrew | 1003 | |
3672 | hidnplayr | 1004 | mov eax,[menu_button_y.start] |
1005 | call conversion_HEX_to_ASCII |
||
5432 | eAndrew | 1006 | |
3672 | hidnplayr | 1007 | mov eax,[menu_button_y.size] |
1008 | call conversion_HEX_to_ASCII |
||
5432 | eAndrew | 1009 | |
3672 | hidnplayr | 1010 | mov eax,[height] |
1011 | call conversion_HEX_to_ASCII |
||
5432 | eAndrew | 1012 | |
3672 | hidnplayr | 1013 | mov eax,[place_attachment] |
1014 | call conversion_HEX_to_ASCII |
||
5432 | eAndrew | 1015 | |
3672 | hidnplayr | 1016 | xor eax,eax ; terminator for boot parameters string |
1017 | stosd |
||
5432 | eAndrew | 1018 | |
3672 | hidnplayr | 1019 | mov ebx, exec_fileinfo |
1020 | mov [ebx+21],dword menu_name |
||
1021 | mov [ebx+8],dword bootparam |
||
1022 | mcall 70 |
||
1023 | mov [ebx+8],dword 0 |
||
1024 | ret |
||
2619 | mario79 | 1025 | ;------------------------------------------------------------------------------ |
2532 | mario79 | 1026 | align 4 |
31 | halyavin | 1027 | draw_small_right: |
3672 | hidnplayr | 1028 | pusha |
1029 | mcall 12,1 |
||
31 | halyavin | 1030 | |
3672 | hidnplayr | 1031 | xor eax,eax |
1032 | mov edx,[wcolor] |
||
1033 | mov esi,edx |
||
1034 | mov edi,edx |
||
1035 | or edx, 0x01000000 |
||
1036 | mcall |
||
31 | halyavin | 1037 | |
3672 | hidnplayr | 1038 | xor ecx,ecx |
1039 | mov cx,[height] |
||
1040 | mcall 8,<0,10>,,1,[wcolor] |
||
31 | halyavin | 1041 | |
3672 | hidnplayr | 1042 | mov ebx,2*65536 ;+6 |
1043 | mov bx,[height] |
||
1044 | shr bx,1 |
||
1045 | sub bx,3 |
||
1046 | mov edx,[wcolor] |
||
1047 | mov eax,COLOR_CHANGE_MAGNITUDE_2 |
||
1048 | call add_color_change_magnitude |
||
1049 | mov ecx,edx |
||
1050 | mcall 4,,,hidetext,1 |
||
31 | halyavin | 1051 | |
3672 | hidnplayr | 1052 | mcall 12,2 |
1053 | popa |
||
1054 | ret |
||
2619 | mario79 | 1055 | ;------------------------------------------------------------------------------ |
2532 | mario79 | 1056 | align 4 |
31 | halyavin | 1057 | draw_small_left: |
3672 | hidnplayr | 1058 | pusha |
1059 | mcall 12,1 |
||
31 | halyavin | 1060 | |
3672 | hidnplayr | 1061 | xor eax,eax |
1062 | mov edx,[wcolor] |
||
1063 | mov esi,edx |
||
1064 | mov edi,edx |
||
1065 | or edx, 0x01000000 |
||
1066 | mcall |
||
31 | halyavin | 1067 | |
3672 | hidnplayr | 1068 | xor ecx,ecx |
1069 | mov cx,[height] |
||
1070 | mcall 8,<0,9>,,1,[wcolor] |
||
31 | halyavin | 1071 | |
3672 | hidnplayr | 1072 | mov ebx,3*65536 ;+6 |
1073 | mov bx,[height] |
||
1074 | shr bx,1 |
||
1075 | sub bx,3 |
||
1076 | mov edx,[wcolor] |
||
1077 | mov eax,COLOR_CHANGE_MAGNITUDE_2 |
||
1078 | call add_color_change_magnitude |
||
1079 | mov ecx,edx |
||
1080 | mcall 4,,,hidetext+1,1 |
||
31 | halyavin | 1081 | |
3672 | hidnplayr | 1082 | mcall 12,2 |
1083 | popa |
||
1084 | ret |
||
2619 | mario79 | 1085 | ;------------------------------------------------------------------------------ |
2532 | mario79 | 1086 | align 4 |
31 | halyavin | 1087 | right_button: |
3672 | hidnplayr | 1088 | mov [small_draw],dword draw_small_right |
31 | halyavin | 1089 | |
3672 | hidnplayr | 1090 | mcall 14 |
31 | halyavin | 1091 | |
3672 | hidnplayr | 1092 | shr eax, 16 |
1093 | mov ebx, eax |
||
1094 | mov ecx, -1 |
||
1095 | mov edx, 9 |
||
1096 | sub ebx, edx |
||
1097 | mov esi, -1 |
||
1098 | mcall 67 |
||
31 | halyavin | 1099 | |
3672 | hidnplayr | 1100 | call draw_small_right |
1101 | jmp small_wait |
||
2619 | mario79 | 1102 | ;------------------------------------------------------------------------------ |
2532 | mario79 | 1103 | align 4 |
31 | halyavin | 1104 | left_button: |
3672 | hidnplayr | 1105 | mov [small_draw],dword draw_small_left |
31 | halyavin | 1106 | |
3672 | hidnplayr | 1107 | xor ebx,ebx |
1108 | mcall 67,,-1,9,-1 |
||
31 | halyavin | 1109 | |
3672 | hidnplayr | 1110 | call draw_small_left |
2532 | mario79 | 1111 | ;-------------------------------------- |
1112 | align 4 |
||
1113 | small_wait: |
||
3672 | hidnplayr | 1114 | mcall 10 |
1115 | cmp eax,1 |
||
1116 | jne no_win |
||
31 | halyavin | 1117 | |
3672 | hidnplayr | 1118 | call [small_draw] |
1119 | jmp small_wait |
||
2532 | mario79 | 1120 | ;-------------------------------------- |
1121 | align 4 |
||
1122 | no_win: |
||
3672 | hidnplayr | 1123 | cmp eax,2 |
1124 | jne no_key |
||
31 | halyavin | 1125 | |
3672 | hidnplayr | 1126 | call handle_key |
1127 | jmp small_wait |
||
2532 | mario79 | 1128 | ;-------------------------------------- |
1129 | align 4 |
||
93 | diamond | 1130 | no_key: |
3672 | hidnplayr | 1131 | mcall 17 |
1132 | cmp ah,1 |
||
1133 | jne no_full |
||
31 | halyavin | 1134 | |
3672 | hidnplayr | 1135 | mcall 14 ; get screen max x & max y |
31 | halyavin | 1136 | |
3672 | hidnplayr | 1137 | mov edx, eax |
1138 | shr edx, 16 |
||
1139 | xor ebx, ebx |
||
1140 | mcall 67,,-1,,-1 ; x0 y0 xs ys |
||
31 | halyavin | 1141 | |
3672 | hidnplayr | 1142 | jmp still |
2532 | mario79 | 1143 | ;-------------------------------------- |
1144 | align 4 |
||
1145 | no_full: |
||
3672 | hidnplayr | 1146 | call menu_handler |
1147 | jmp small_wait |
||
2619 | mario79 | 1148 | ;------------------------------------------------------------------------------ |
1149 | include 'libini.inc' |
||
1150 | ;------------------------------------------------------------------------------ |
||
3014 | dunkaist | 1151 | include '../../../dll.inc' |
2619 | mario79 | 1152 | ;------------------------------------------------------------------------------ |
1153 | include 'drawappl.inc' |
||
1154 | ;------------------------------------------------------------------------------ |
||
1155 | include 'drawbutt.inc' |
||
1156 | ;------------------------------------------------------------------------------ |
||
1157 | include 'drawwind.inc' |
||
1158 | ;------------------------------------------------------------------------------ |
||
1159 | include 'drawtray.inc' |
||
1160 | ;------------------------------------------------------------------------------ |
||
601 | Rus | 1161 | include 'ctx_menu.asm' |
2619 | mario79 | 1162 | ;------------------------------------------------------------------------------ |
1163 | include 'i_data.inc' |
||
1164 | ;------------------------------------------------------------------------------ |
||
2532 | mario79 | 1165 | IM_END: |
1166 | ;------------------------------------------------------------------------------ |
||
2619 | mario79 | 1167 | include 'u_data.inc' |
1168 | ;------------------------------------------------------------------------------ |
||
1169 | I_END: |
||
1170 | ;------------------------------------------------------------------------------0,9>0,10>=> |