Rev 2532 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2532 | Rev 2619 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ; ; |
2 | ; ; |
3 | ; MENUBAR for KolibriOS - Compile with fasm ; |
3 | ; TASK PANEL for KolibriOS - Compile with fasm ; |
4 | ; ; |
4 | ; ; |
5 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
5 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;------------------------------------------------------------------------------ |
6 | ;------------------------------------------------------------------------------ |
- | 7 | ; version: 2.0 |
|
- | 8 | ; last update: 17/04/2012 |
|
- | 9 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
|
- | 10 | ; changes: New logic of switching windows (turnoff/restore) |
|
- | 11 | ; New logic of button "clear desktop". |
|
- | 12 | ; Win+D (restore/clear desktop), Win+R (start RUN application). |
|
- | 13 | ; Using the library LibINI to set the parameters. |
|
- | 14 | ; New style of panel. Start application Menu with boot options. |
|
- | 15 | ; two versions of the location of the panel - |
|
- | 16 | ; the bottom of the desktop and on top of the desktop. |
|
- | 17 | ;------------------------------------------------------------------------------ |
|
7 | ; last update: 31/03/2012 |
18 | ; last update: 31/03/2012 |
8 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
19 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
9 | ; changes: The program uses only 20 Kb memory is now. |
20 | ; changes: The program uses only 20 Kb memory is now. |
10 | ; Code optimizing and refactoring. |
21 | ; Code optimizing and refactoring. |
11 | ;------------------------------------------------------------------------------ |
22 | ;------------------------------------------------------------------------------ |
12 | use32 |
23 | use32 |
13 | org 0x0 |
24 | org 0x0 |
14 | db 'MENUET01' ; 8 byte id |
25 | db 'MENUET01' ; 8 byte id |
15 | dd 0x01 ; header version |
26 | dd 0x01 ; header version |
16 | dd START ; program start |
27 | dd START ; program start |
17 | dd IM_END ;I_END ; program image size |
28 | dd IM_END ; program image size |
18 | dd I_END ;0xA000 ; reguired amount of memory - 10 Kb |
29 | dd I_END ; reguired amount of memory - 10 Kb |
19 | dd stack_top ;0xA000 ; esp |
30 | dd stack_top ; esp |
20 | dd 0x0 ; boot parameters |
31 | dd 0x0 ; boot parameters |
21 | dd 0x0 ; path |
32 | dd path ; application pach |
22 | ;------------------------------------------------------------------------------ |
33 | ;------------------------------------------------------------------------------ |
23 | include 'lang.inc' |
34 | include 'lang.inc' |
24 | include '..\..\..\macros.inc' |
35 | include '../../../macros.inc' |
- | 36 | include '../../../proc32.inc' |
|
- | 37 | ;include 'debug.inc' |
|
25 | include 'MOI.INC' ;à ᪫ ¤ª¨ ª« ¢¨ âãàë |
38 | include 'MOI.INC' ;à ᪫ ¤ª¨ ª« ¢¨ âãàë |
26 | - | ||
- | 39 | include '../../../develop/libraries/box_lib/load_lib.mac' |
|
- | 40 | @use_library ;use load lib macros |
|
- | 41 | ;------------------------------------------------------------------------------ |
|
27 | caps_lock_check fix 0 |
42 | caps_lock_check fix 1 |
28 | - | ||
- | 43 | ;------------------------------------------------------------------------------ |
|
29 | time_bgr_color = 0x66cc |
44 | time_bgr_color = 0x66cc |
30 | - | ||
31 | width dd 305 |
45 | ;PANEL_HEIGHT = 18 |
32 | buttons dd 1 ; 0 no frames ; 1 frames |
- | |
33 | soften_up dd 1 ; 0 no ; 1 yes |
- | |
34 | soften_down dd 0 ; 0 no ; 1 yes |
- | |
35 | minimize_left dd 1 |
46 | ML_SIZE = 10 |
36 | minimize_right dd 1 |
47 | MR_SIZE = 10 |
37 | icons_position dd 95 |
48 | MENU_SIZE = 50 |
38 | menu_enable dd 1 |
49 | CLD_SIZE = 20 |
39 | setup_enable dd 0 |
50 | TAB_SIZE = 60 |
40 | graph_text dd 1 |
51 | TRAY_SIZE = 140 |
41 | soften_middle dd 1 ; 0 no ; 1 yes |
- | |
42 | icons dd 1 ; 0 defaults ; 1 activate |
- | |
43 | 52 | ||
- | 53 | CLOCK_SIZE = 40 |
|
- | 54 | CPU_USAGE_SIZE = 10 |
|
- | 55 | CHLANG_SIZE = 20 |
|
44 | PANEL_HEIGHT = 18 |
56 | PAGE_LIST_SIZE = 36 |
45 | ;------------------------------------------------------------------------------ |
57 | ;------------------------------------------------------------------------------ |
46 | align 4 |
58 | align 4 |
47 | handle_key: |
59 | handle_key: |
48 | mcall 18, 7 |
60 | mcall 18,7 |
49 | mov [active_process],eax |
61 | mov [active_process],eax |
Line 50... | Line 62... | ||
50 | 62 | ||
- | 63 | mcall 2 |
|
- | 64 | ||
- | 65 | ; dps "panel key: " |
|
- | 66 | ; dph eax |
|
- | 67 | ; newline |
|
51 | mcall 2 |
68 | |
52 | cmp al, 2 |
69 | cmp al, 2 |
Line 53... | Line 70... | ||
53 | jnz begin_1.ret |
70 | jnz begin_1.ret |
54 | 71 | ||
Line 78... | Line 95... | ||
78 | jz alter |
95 | jz alter |
Line 79... | Line 96... | ||
79 | 96 | ||
80 | cmp al, 8 |
97 | cmp al, 8 |
81 | jz alter |
98 | jz alter |
82 | ;-------------------------------------- |
99 | ;-------------------------------------- |
83 | align 4 |
100 | ;align 4 |
84 | prod: |
101 | ;prod: |
85 | if caps_lock_check |
102 | if caps_lock_check |
86 | cmp al,58 |
103 | cmp al,58 ;CAPS LOCK DOWN |
Line 87... | Line 104... | ||
87 | jne @f |
104 | jne @f |
88 | 105 | ||
89 | pusha |
106 | pusha |
90 | mcall 26,2,9 |
107 | mcall 26,2,9 |
91 | mov ebx,eax |
108 | mov ebx,eax |
- | 109 | mov eax,2 |
|
- | 110 | ; call draw_window ;;;??? |
|
92 | mov eax,2 |
111 | mov [draw_flag_certainly],1 |
93 | call draw_window ;;;??? |
112 | call draw_flag ; language |
94 | popa |
113 | popa |
95 | ret |
114 | ret |
96 | @@: |
115 | @@: |
97 | end if |
116 | end if |
Line 98... | Line 117... | ||
98 | cmp al, 15 |
117 | cmp al, 15 ; Alt+Tab DOWN |
99 | jz alt_tab_pressed |
118 | jz alt_tab_pressed |
Line 100... | Line -... | ||
100 | - | ||
101 | cmp al, 88 |
- | |
Line 102... | Line -... | ||
102 | jz start_end_application |
- | |
103 | - | ||
Line -... | Line 119... | ||
- | 119 | ||
- | 120 | cmp al, 88 ; Ctrl+Alt+F12 |
|
- | 121 | jz start_end_application |
|
- | 122 | ||
- | 123 | ||
- | 124 | ||
- | 125 | cmp al, 91 ; RWin DOWN |
|
- | 126 | jz set_win_key_flag |
|
- | 127 | ||
- | 128 | cmp al, 92 ; LWin DOWN |
|
- | 129 | jz set_win_key_flag |
|
- | 130 | ||
- | 131 | ||
- | 132 | cmp al, 219 ; RWin UP |
|
104 | cmp al, 91 |
133 | jz cut_win_key_flag ;start_menu_application |
105 | jz start_menu_application |
134 | |
Line 106... | Line 135... | ||
106 | 135 | cmp al, 220 ; LWin UP |
|
107 | cmp al, 92 |
136 | jz cut_win_key_flag ;start_menu_application |
Line 108... | Line 137... | ||
108 | jz start_menu_application |
137 | |
109 | 138 | ||
Line 110... | Line 139... | ||
110 | cmp al, 62 |
139 | cmp al, 62 ; Alt+F4 |
111 | jz kill_active_application |
140 | jz kill_active_application |
Line -... | Line 141... | ||
- | 141 | ||
- | 142 | ; cmp al, 71 |
|
- | 143 | ; jz page_list_next |
|
- | 144 | ||
- | 145 | ; cmp al, 72 |
|
- | 146 | ; jz page_list_prev |
|
- | 147 | ||
- | 148 | cmp al, 69 ; Alt+Shift+NumLock |
|
- | 149 | jz start_mousemul_application |
|
- | 150 | ||
- | 151 | cmp al, 19 ; Win+R |
|
- | 152 | jz start_run_application |
|
- | 153 | ||
- | 154 | cmp al, 32 ; Win+D |
|
112 | 155 | jz minimize_all_windows |
|
113 | ; cmp al, 71 |
156 | ;-------------------------------------- |
Line 114... | Line 157... | ||
114 | ; jz page_list_next |
157 | align 4 |
115 | 158 | prod: |
|
116 | ; cmp al, 72 |
159 | ; cmp eax,0x20000 |
117 | ; jz page_list_prev |
160 | ; je start_menu_application |
118 | 161 | ||
119 | cmp al, 69 |
162 | ; cmp eax,0x40000 |
Line 132... | Line 175... | ||
132 | ; mov ebx, setup_exec |
175 | ; mov ebx, setup_exec |
133 | ; test ah, 001100b |
176 | ; test ah, 001100b |
134 | ; jz change_sys_lang |
177 | ; jz change_sys_lang |
135 | ;------------------------------------------------------------------------------ |
178 | ;------------------------------------------------------------------------------ |
136 | align 4 |
179 | align 4 |
- | 180 | set_win_key_flag: |
|
- | 181 | mov [win_key_flag],1 |
|
- | 182 | ret |
|
- | 183 | ;------------------------------------------------------------------------------ |
|
- | 184 | align 4 |
|
- | 185 | cut_win_key_flag: |
|
- | 186 | xor eax,eax |
|
- | 187 | mov [win_key_flag],al |
|
- | 188 | xchg [start_menu_flag],al |
|
- | 189 | test al,al |
|
- | 190 | jz start_menu_application |
|
- | 191 | ret |
|
- | 192 | ;------------------------------------------------------------------------------ |
|
- | 193 | align 4 |
|
137 | change_key_lang: |
194 | change_key_lang: |
138 | mov dword [ebx+8], chlang |
195 | mov dword [ebx+8], chlang |
139 | mcall 70 |
196 | mcall 70 |
140 | ;-------------------------------------- |
197 | ;-------------------------------------- |
141 | align 4 |
198 | align 4 |
Line 169... | Line 226... | ||
169 | align 4 |
226 | align 4 |
170 | kill_active_application: |
227 | kill_active_application: |
171 | mcall 72,1,3,1 |
228 | mcall 72,1,3,1 |
172 | jmp begin_1.ret |
229 | jmp begin_1.ret |
173 | ;------------------------------------------------------------------------------ |
230 | ;------------------------------------------------------------------------------ |
- | 231 | ||
174 | align 4 |
232 | align 4 |
175 | start_menu_application: |
233 | start_menu_application: |
176 | mov [draw_window_1], 1 |
234 | mov [draw_window_1], 1 |
- | 235 | call menu_handler |
|
- | 236 | jmp begin_1.ret |
|
- | 237 | ;------------------------------------------------------------------------------ |
|
- | 238 | align 4 |
|
- | 239 | start_run_application: |
|
- | 240 | cmp [win_key_flag],1 |
|
- | 241 | je @f |
|
- | 242 | ret |
|
- | 243 | @@: |
|
- | 244 | mov [start_menu_flag],1 |
|
- | 245 | mov [draw_window_1], 1 |
|
177 | mov dword [ebx+21], menu_name |
246 | mov dword [ebx+21], run_name |
178 | mcall 70 |
247 | mcall 70 |
179 | jmp begin_1.ret |
248 | jmp begin_1.ret |
180 | ;------------------------------------------------------------------------------ |
249 | ;------------------------------------------------------------------------------ |
- | 250 | align 4 |
|
- | 251 | minimize_all_windows: |
|
- | 252 | cmp [win_key_flag],1 |
|
- | 253 | je @f |
|
- | 254 | ret |
|
- | 255 | @@: |
|
- | 256 | mov [start_menu_flag],1 |
|
- | 257 | call clean_desktop |
|
- | 258 | ret |
|
- | 259 | ;------------------------------------------------------------------------------ |
|
181 | ;align 4 |
260 | ;align 4 |
182 | ;page_list_next: |
261 | ;page_list_next: |
183 | ; cmp [page_list],15 |
262 | ; cmp [page_list],15 |
184 | ; je @f |
263 | ; je @f |
185 | ; |
264 | ; |
Line 204... | Line 283... | ||
204 | mov ebp, eax |
283 | mov ebp, eax |
205 | cmp [current_alt_tab_app], -1 |
284 | cmp [current_alt_tab_app], -1 |
206 | jnz has_alt_tab_app |
285 | jnz has_alt_tab_app |
207 | ; § ¯®«ï¥¬ â ¡«¨æ㠯ਫ®¦¥¨©, ¯®¤«¥¦ é¨å ¯¥à¥ª«î票î |
286 | ; § ¯®«ï¥¬ â ¡«¨æ㠯ਫ®¦¥¨©, ¯®¤«¥¦ é¨å ¯¥à¥ª«î票î |
208 | xor edx, edx |
287 | xor edx, edx |
209 | mov ebx, procinfo_window_tabs ;0x8000 ; WTF???!!! |
288 | mov ebx, procinfo_window_tabs |
210 | mov ecx, 1 |
289 | mov ecx, 1 |
211 | .fill: |
290 | .fill: |
212 | inc ecx |
291 | inc ecx |
213 | mcall 9 |
292 | mcall 9 |
214 | call need_window_tab |
293 | call need_window_tab |
Line 347... | Line 426... | ||
347 | jmp @b |
426 | jmp @b |
348 | ;-------------------------------------- |
427 | ;-------------------------------------- |
349 | align 4 |
428 | align 4 |
350 | alt_tab_released: |
429 | alt_tab_released: |
351 | mcall 66,5,0,0 ; 㦥 ¯®©¬ «¨, å¢ â¨â :) |
430 | mcall 66,5,0,0 ; 㦥 ¯®©¬ «¨, å¢ â¨â :) |
- | 431 | ||
352 | or eax, -1 |
432 | or eax, -1 |
353 | xchg eax, [current_alt_tab_app] |
433 | xchg eax, [current_alt_tab_app] |
354 | mov ecx, [alt_tab_list+eax*8] |
434 | mov ecx, [alt_tab_list+eax*8] |
355 | mcall 18,3 |
435 | mcall 18,3 |
- | 436 | ||
356 | jmp redraw_window_tabs |
437 | jmp redraw_window_tabs |
357 | ;------------------------------------------------------------------------------ |
438 | ;------------------------------------------------------------------------------ |
358 | align 4 |
439 | align 4 |
359 | active_process dd 0 |
440 | active_process dd 0 |
Line -... | Line 441... | ||
- | 441 | ||
360 | 442 | exit: |
|
- | 443 | mcall -1 |
|
- | 444 | ;------------------------------------------------------------------------------ |
|
- | 445 | START: |
|
- | 446 | mcall 68,11 |
|
- | 447 | mcall 66,1,1 |
|
- | 448 | ||
- | 449 | mcall 9,process_info_buffer,-1 |
|
- | 450 | mov ecx,[ebx+30] ; PID |
|
- | 451 | mcall 18,21 |
|
Line -... | Line 452... | ||
- | 452 | mov [my_active_slot],eax ; WINDOW SLOT |
|
- | 453 | ||
- | 454 | ||
361 | ; .exit: mcall -1 |
455 | load_libraries l_libs_start,end_l_libs |
- | 456 | ||
- | 457 | test eax,eax |
|
- | 458 | jnz exit |
|
- | 459 | ||
- | 460 | call Get_ini |
|
362 | 461 | ||
363 | 462 | mcall 48,1,[button_style] |
|
364 | START: |
463 | |
365 | mcall 66,4,0,2 ; LShift+RShift |
464 | mcall 66,4,0,2 ; LShift+RShift |
366 | mcall 66,,,11h ; Ctrl+Shift |
465 | mcall 66,,,11h ; Ctrl+Shift |
- | 466 | mcall 66,,88,110h ; Alt+Ctrl+F12 |
|
- | 467 | mcall 66,,91,0h ; RWin DOWN |
|
- | 468 | mcall 66,,92 ; LWin DOWN |
|
- | 469 | mcall 66,,219 ; RWin UP |
|
- | 470 | mcall 66,,220 ; LWin UP |
|
- | 471 | ||
- | 472 | ; mcall 66,,147,0h ; Win+R UP |
|
- | 473 | mcall 66,,19,0h ; Win+R DOWN |
|
- | 474 | ||
- | 475 | ; mcall 66,,23,0h ; Win+I DOWN |
|
- | 476 | ||
- | 477 | mcall 66,,32,0h ; Win+D DOWN |
|
367 | mcall 66,,88,110h ; Alt+Ctrl+F12 |
478 | ; mcall 66,,160,0h ; Win+D UP |
368 | mcall 66,,91,0h ; LWin |
479 | |
369 | mcall 66,,92 ; RWin |
480 | |
370 | ; mcall 66,,91,100h ; Alt+LWin |
481 | ; mcall 66,,91,100h ; Alt+LWin |
371 | ; mcall 66,,92 ; Alt+RWin |
482 | ; mcall 66,,92 ; Alt+RWin |
Line 385... | Line 496... | ||
385 | 496 | ||
386 | if caps_lock_check |
497 | if caps_lock_check |
387 | xor edx,edx |
498 | xor edx,edx |
388 | mcall 66,4,58 |
499 | mcall 66,4,58 |
389 | end if |
- | |
390 | mcall 18,8,1 |
- | |
391 | test eax,eax |
- | |
392 | jne @f |
- | |
393 | mcall 18,8,2 |
- | |
394 | ;-------------------------------------- |
- | |
395 | align 4 |
- | |
396 | @@: |
- | |
397 | mcall 70,dat_fileinfo |
- | |
398 | - | ||
399 | mov edi,width |
- | |
400 | mov esi,I_END |
- | |
401 | xor eax,eax |
- | |
402 | ;-------------------------------------- |
- | |
403 | align 4 |
- | |
404 | new_number: |
- | |
405 | cmp [esi],byte ';' |
- | |
406 | je number_ready |
- | |
407 | - | ||
408 | imul eax,10 |
- | |
409 | movzx ebx,byte [esi] |
- | |
410 | sub ebx,'0' |
- | |
411 | add eax,ebx |
- | |
412 | inc esi |
- | |
413 | jmp new_number |
- | |
414 | ;-------------------------------------- |
- | |
415 | align 4 |
- | |
416 | number_ready: |
- | |
417 | stosd |
- | |
418 | xor eax,eax |
- | |
419 | inc esi |
- | |
420 | cmp [esi],byte 'x' |
- | |
421 | jne new_number |
- | |
422 | 500 | end if |
|
423 | mcall 14 |
501 | mcall 14 |
Line -... | Line 502... | ||
- | 502 | mov [screen_size],eax |
|
424 | mov [screen_size],eax |
503 | |
425 | 504 | ||
426 | mov ecx,eax |
505 | mov ecx,eax |
427 | ;eax = [xsize]*65536 + [ysize], £¤¥ |
506 | ;eax = [xsize]*65536 + [ysize], £¤¥ |
428 | shr ecx,16 |
- | |
Line -... | Line 507... | ||
- | 507 | shr ecx,16 |
|
- | 508 | and eax,0xFFFF |
|
- | 509 | ||
- | 510 | cmp [place_attachment],1 |
|
- | 511 | je @f |
|
- | 512 | ror eax,16 |
|
- | 513 | add eax,[height] |
|
- | 514 | rol eax,16 |
|
- | 515 | mov edx,eax |
|
- | 516 | jmp .selected |
|
- | 517 | ;-------------------------------------- |
|
- | 518 | align 4 |
|
- | 519 | @@: |
|
- | 520 | sub eax,[height] |
|
- | 521 | lea edx,[eax-1] |
|
429 | and eax,0xFFFF |
522 | ;-------------------------------------- |
Line 430... | Line 523... | ||
430 | lea edx,[eax-PANEL_HEIGHT-1] |
523 | align 4 |
431 | 524 | .selected: |
|
432 | mcall 48,6 |
525 | mcall 48,6 |
433 | 526 | ||
434 | mcall 9,process_info_buffer,-1 |
527 | mcall 9,process_info_buffer,-1 |
435 | mov ecx,[process_info_buffer+30] |
- | |
436 | mcall 18,21 |
- | |
437 | mov [this_slot],eax |
528 | mov ecx,[process_info_buffer+30] |
438 | mov [max_slot],255 |
529 | mcall 18,21 |
439 | 530 | mov [this_slot],eax |
|
440 | call set_variables |
531 | mov [max_slot],255 |
441 | ;-------------------------------------- |
532 | ;-------------------------------------- |
442 | align 4 |
533 | align 4 |
Line 443... | Line 534... | ||
443 | start_after_minimize: |
534 | start_after_minimize: |
444 | call draw_window |
535 | call draw_window |
445 | call draw_info |
536 | ; call draw_tray |
446 | call draw_running_applications |
537 | call draw_running_applications |
447 | 538 | ||
448 | mcall 23,30 |
539 | mcall 23,30 |
- | 540 | call load_ini |
|
449 | call load_ini |
541 | call fir_lng |
- | 542 | ;------------------------------------------------------------------------------ |
|
450 | call fir_lng |
543 | align 4 |
Line 451... | Line 544... | ||
451 | ;------------------------------------------------------------------------------ |
544 | still: |
452 | align 4 |
545 | ; call draw_tray |
453 | still: |
546 | call draw_time |
Line 479... | Line 572... | ||
479 | mov dword [active_window_changed], 1 |
572 | mov dword [active_window_changed], 1 |
480 | ;-------------------------------------- |
573 | ;-------------------------------------- |
481 | align 4 |
574 | align 4 |
482 | @@: |
575 | @@: |
483 | mcall 23,20 |
576 | mcall 23,20 |
- | 577 | ||
- | 578 | push eax |
|
- | 579 | mcall 18,7 |
|
- | 580 | cmp [my_active_slot],eax |
|
- | 581 | je @f |
|
- | 582 | mov [current_active_slot],eax |
|
- | 583 | @@: |
|
- | 584 | pop eax |
|
- | 585 | ||
484 | cmp eax,1 ; redraw ? |
586 | cmp eax,1 ; redraw ? |
485 | jz red |
587 | jz red |
Line -... | Line 588... | ||
- | 588 | ||
- | 589 | cmp eax,2 |
|
- | 590 | jnz @f |
|
- | 591 | call handle_key |
|
- | 592 | jmp .key |
|
486 | 593 | @@: |
|
487 | cmp eax,3 ; button ? |
594 | cmp eax,3 ; button ? |
Line 488... | Line 595... | ||
488 | jz button |
595 | jz button |
- | 596 | ||
489 | 597 | ; call handle_key |
|
490 | call handle_key |
598 | .key: |
Line -... | Line 599... | ||
- | 599 | cmp dword [active_window_changed], 0 |
|
491 | cmp dword [active_window_changed], 0 |
600 | jnz red_active |
492 | jnz red_active |
601 | |
493 | 602 | call draw_flag ; language |
|
494 | jmp still |
603 | jmp still |
495 | ;------------------------------------------------------------------------------ |
604 | ;------------------------------------------------------------------------------ |
Line 509... | Line 618... | ||
509 | cmp [screen_size.width],ax |
618 | cmp [screen_size.width],ax |
510 | je .lp1 |
619 | je .lp1 |
511 | rol eax,16 |
620 | rol eax,16 |
512 | @@: |
621 | @@: |
513 | mov [screen_size],eax |
622 | mov [screen_size],eax |
514 | sub ecx,PANEL_HEIGHT |
623 | sub ecx,[height] |
515 | mcall 67,0,,,PANEL_HEIGHT |
624 | mcall 67,0,,,[height] |
516 | ;-------------------------------------- |
625 | ;-------------------------------------- |
517 | align 4 |
626 | align 4 |
518 | .lp1: |
627 | .lp1: |
519 | call draw_window |
628 | call draw_window |
520 | call draw_info |
629 | ; call draw_tray |
521 | jmp still |
630 | jmp still |
522 | ;------------------------------------------------------------------------------ |
631 | ;------------------------------------------------------------------------------ |
523 | align 4 |
632 | align 4 |
524 | button: |
633 | button: |
525 | mcall 17 |
634 | mcall 17 |
Line 537... | Line 646... | ||
537 | movzx ecx,byte ah |
646 | movzx ecx,byte ah |
538 | sub ecx,52 |
647 | sub ecx,52 |
539 | shl ecx,2 |
648 | shl ecx,2 |
Line 540... | Line 649... | ||
540 | 649 | ||
541 | mov ecx,[app_list+ecx] |
- | |
Line 542... | Line 650... | ||
542 | mcall 18,3, |
650 | mov ecx,[app_list+ecx] |
- | 651 | ||
- | 652 | mcall 9,process_info_buffer |
|
- | 653 | ||
- | 654 | test [ebx+70],dword 10b ; window is minimized to panel |
|
- | 655 | jnz @f |
|
- | 656 | ||
- | 657 | cmp ecx,[current_active_slot] |
|
- | 658 | je .turn_off |
|
- | 659 | @@: |
|
- | 660 | mcall 18,3, |
|
- | 661 | jmp .task_switching |
|
- | 662 | ;-------------------------------------- |
|
- | 663 | align 4 |
|
- | 664 | .turn_off: |
|
- | 665 | mov edx,ecx |
|
- | 666 | mcall 18,22,0 |
|
543 | 667 | .task_switching: |
|
544 | ; mcall 55,eax,,,activatemusic |
668 | mcall 68,1 |
545 | jmp still |
669 | jmp still |
546 | ;------------------------------------------------------------------------------ |
670 | ;------------------------------------------------------------------------------ |
547 | align 4 |
671 | align 4 |
Line 582... | Line 706... | ||
582 | 706 | ||
583 | cmp ah,102 ; minimize to right |
707 | cmp ah,102 ; minimize to right |
Line 584... | Line 708... | ||
584 | je right_button |
708 | je right_button |
585 | 709 | ||
Line 586... | Line 710... | ||
586 | cmp ah, 103 |
710 | cmp ah, 103 |
587 | je clean_desktop ; minimize all windows |
711 | je clean_desktop_1 ; minimize all windows |
Line 588... | Line 712... | ||
588 | 712 | ||
589 | cmp ah, 104 |
713 | ; cmp ah, 104 |
Line 590... | Line 714... | ||
590 | je restore_desktop ; restore minimized windows |
714 | ; je restore_desktop ; restore minimized windows |
591 | 715 | ||
Line 592... | Line 716... | ||
592 | cmp ah, 105 |
716 | ; cmp ah, 105 |
Line 593... | Line 717... | ||
593 | je swap_minimized_desktop ; minimize normal windows, and restore minimized windows |
717 | ; je swap_minimized_desktop ; minimize normal windows, and restore minimized windows |
594 | 718 | ||
595 | cmp ah,byte 1 ; start/terminate menu |
719 | cmp ah,byte 1 ; start/terminate menu |
- | 720 | jnz noselect |
|
- | 721 | ||
- | 722 | call menu_handler |
|
- | 723 | ||
- | 724 | jmp still |
|
- | 725 | ;-------------------------------------- |
|
- | 726 | align 4 |
|
- | 727 | clean_desktop_1: |
|
- | 728 | ||
596 | jnz noselect |
729 | |
597 | 730 | call clean_desktop |
|
598 | call menu_handler |
731 | |
599 | 732 | ||
Line 612... | Line 745... | ||
612 | align 4 |
745 | align 4 |
613 | noid15: |
746 | noid15: |
614 | cmp ah,16 |
747 | cmp ah,16 |
615 | jne noid16 |
748 | jne noid16 |
Line 616... | Line 749... | ||
616 | 749 | ||
617 | mov ebx, setup_exec |
750 | ; mov ebx, setup_exec |
618 | mov dword [ebx+8], chlang |
751 | ; mov dword [ebx+8], chlang |
- | 752 | ; mcall 70 |
|
- | 753 | call karu |
|
619 | mcall 70 |
754 | call draw_flag ; language |
620 | jmp still |
755 | jmp still |
621 | ;-------------------------------------- |
756 | ;-------------------------------------- |
622 | align 4 |
757 | align 4 |
623 | noid16: |
758 | noid16: |
Line 638... | Line 773... | ||
638 | mcall 70 |
773 | mcall 70 |
639 | jmp still |
774 | jmp still |
640 | ;-------------------------------------- |
775 | ;-------------------------------------- |
641 | align 4 |
776 | align 4 |
642 | noid18: |
777 | noid18: |
643 | cmp ah,19 |
778 | ; cmp ah,19 ; speaker |
644 | jne noid19 |
779 | ; jne noid19 |
Line 645... | Line 780... | ||
645 | 780 | ||
646 | mcall 18,8,2 |
781 | ; mcall 18,8,2 |
647 | mcall 15,3 |
782 | ; mcall 15,3 |
648 | jmp red |
783 | ; jmp red |
649 | ;-------------------------------------- |
784 | ;-------------------------------------- |
650 | align 4 |
785 | ;align 4 |
651 | noid19: |
786 | ;noid19: |
652 | cmp ah,20 ; start system setup |
787 | ; cmp ah,20 ; start system setup |
653 | jnz noid20 |
788 | ; jnz noid20 |
654 | 789 | ; |
|
655 | mov ebx, setup_exec |
790 | ; mov ebx, setup_exec |
656 | and dword [ebx+8], 0 |
791 | ; and dword [ebx+8], 0 |
657 | mcall 70 |
792 | ; mcall 70 |
658 | jmp still |
793 | ; jmp still |
659 | ;-------------------------------------- |
794 | ;-------------------------------------- |
660 | align 4 |
795 | ;align 4 |
661 | noid20: |
796 | ;noid20: |
662 | cmp ah,21 |
797 | cmp ah,21 |
Line 663... | Line 798... | ||
663 | jnz noid21 |
798 | jnz noid21 |
664 | 799 | ||
Line 689... | Line 824... | ||
689 | @@: |
824 | @@: |
690 | mcall 18, 22 |
825 | mcall 18, 22 |
691 | inc edx |
826 | inc edx |
692 | cmp edx, [max_slot] |
827 | cmp edx, [max_slot] |
693 | jbe @b |
828 | jbe @b |
694 | jmp still |
829 | ; jmp still |
- | 830 | ret |
|
695 | ;------------------------------------------------------------------------------ |
831 | ;------------------------------------------------------------------------------ |
696 | align 4 |
832 | ;align 4 |
697 | swap_minimized_desktop: |
833 | ;swap_minimized_desktop: |
698 | xor esi, esi |
834 | ; xor esi, esi |
699 | inc esi |
835 | ; inc esi |
700 | jmp min_swap_desktop |
836 | ; jmp min_swap_desktop |
701 | ;------------------------------------------------------------------------------ |
837 | ;------------------------------------------------------------------------------ |
702 | align 4 |
838 | align 4 |
703 | clean_desktop: |
839 | clean_desktop: |
- | 840 | mov [clean_desktop_minimize],0 |
|
704 | xor esi,esi |
841 | ; xor esi,esi |
705 | ;-------------------------------------- |
842 | ;-------------------------------------- |
706 | align 4 |
843 | ;align 4 |
707 | min_swap_desktop: ; input esi 0 - min, <>0 swap |
844 | ;min_swap_desktop: ; input esi 0 - min, <>0 swap |
708 | mov ecx, 2 ; ç «ìë© ®¬¥à ᫮⠯à®æ¥áá |
845 | mov ecx, 2 ; ç «ìë© ®¬¥à ᫮⠯à®æ¥áá |
709 | mov ebx, process_info_buffer |
846 | mov ebx, process_info_buffer |
710 | ;-------------------------------------- |
847 | ;-------------------------------------- |
711 | align 4 |
848 | align 4 |
712 | .loop1: |
849 | .loop1: |
Line 735... | Line 872... | ||
735 | align 4 |
872 | align 4 |
736 | @@: |
873 | @@: |
737 | cmp [ebx+10], dword ' ' |
874 | cmp [ebx+10], dword ' ' |
738 | jz .loop1xx |
875 | jz .loop1xx |
Line 739... | Line 876... | ||
739 | 876 | ||
740 | pushad |
877 | pusha |
741 | mov edx, ecx |
878 | mov edx, ecx |
742 | xor ecx, ecx |
879 | xor ecx, ecx |
743 | or esi, esi |
880 | ; or esi, esi |
Line 744... | Line 881... | ||
744 | jz @f |
881 | ; jz @f |
745 | 882 | ||
746 | movzx eax, byte [process_info_buffer+70] |
883 | movzx eax, byte [process_info_buffer+70] |
Line -... | Line 884... | ||
- | 884 | and eax, 2 ; mask minimize |
|
747 | and eax, 2 ; mask minimize |
885 | jnz @f |
- | 886 | ||
748 | jz @f |
887 | mov [clean_desktop_minimize],1 |
749 | 888 | ; mov ecx, 2 ; restore |
|
750 | mov ecx, 2 ; restore |
889 | mcall 18, 22 |
751 | ;-------------------------------------- |
- | |
752 | align 4 |
890 | ;-------------------------------------- |
753 | @@: |
891 | align 4 |
754 | mcall 18, 22 |
892 | @@: |
755 | popad |
893 | popa |
756 | ;-------------------------------------- |
894 | ;-------------------------------------- |
757 | align 4 |
895 | align 4 |
758 | .loop1xx: |
896 | .loop1xx: |
759 | inc ecx |
- | |
760 | cmp ecx, [max_slot] |
- | |
761 | jbe .loop1 |
- | |
762 | jmp still |
- | |
763 | ;------------------------------------------------------------------------------ |
- | |
764 | align 4 |
- | |
765 | draw_running_applications: |
- | |
766 | pusha |
- | |
767 | - | ||
768 | cmp [icons],1 |
- | |
Line 769... | Line 897... | ||
769 | jne dr_ret |
897 | inc ecx |
770 | - | ||
771 | call calculate_applications |
- | |
772 | - | ||
773 | cmp edi,[running_applications] |
- | |
774 | jne noret |
- | |
775 | popa |
- | |
776 | ret |
- | |
777 | ;-------------------------------------- |
- | |
778 | align 4 |
- | |
779 | noret: |
- | |
780 | call draw_window |
- | |
781 | mov [running_applications],edi |
- | |
782 | call redraw_window_tabs |
- | |
783 | ;-------------------------------------- |
- | |
784 | align 4 |
- | |
785 | dr_ret: |
- | |
786 | popa |
- | |
787 | ret |
- | |
788 | ;------------------------------------------------------------------------------ |
- | |
789 | align 4 |
- | |
790 | need_window_tab: |
- | |
791 | ; in: ebx->process info |
- | |
792 | ; out: ZF set <=> do not draw |
- | |
793 | cmp byte [ebx+10], '@' |
- | |
794 | jz .nodraw |
- | |
795 | ; do not draw undefined (zero-sized) windows |
- | |
796 | cmp dword [ebx+42], 0 |
- | |
797 | jnz @f |
- | |
798 | cmp dword [ebx+46], 0 |
- | |
799 | jz .nodraw |
- | |
800 | ;-------------------------------------- |
- | |
801 | align 4 |
- | |
802 | @@: |
- | |
803 | ; do not draw OpenDialog windows |
- | |
804 | push edi |
- | |
805 | mov edi, dword [ebx+10] |
- | |
806 | or edi, 0x20202020 |
- | |
807 | cmp edi, 'open' |
- | |
808 | jne @f |
- | |
809 | 898 | cmp ecx, [max_slot] |
|
810 | mov edi, dword [ebx+14] |
- | |
811 | or edi, 0x20202020 |
- | |
812 | cmp dword [ebx+14], 'dial' |
- | |
813 | jne @f |
- | |
814 | - | ||
815 | pop edi |
- | |
816 | jmp .nodraw |
- | |
817 | ;-------------------------------------- |
- | |
818 | align 4 |
- | |
819 | @@: |
- | |
820 | pop edi |
- | |
821 | cmp dword [ebx+10], 'ICON' |
- | |
822 | jnz @f |
- | |
823 | 899 | jbe .loop1 |
|
824 | cmp [ebx+42], dword 51 |
- | |
825 | jnz @f |
- | |
826 | - | ||
827 | cmp [ebx+46], dword 51 |
900 | |
828 | jz .nodraw |
- | |
829 | ;-------------------------------------- |
- | |
830 | align 4 |
- | |
831 | @@: |
- | |
832 | cmp [ebx+10], dword ' ' |
901 | cmp [clean_desktop_minimize],1 |
- | 902 | je @f |
|
833 | ;-------------------------------------- |
903 | call restore_desktop |
834 | align 4 |
904 | @@: |
835 | .nodraw: |
905 | ret |
836 | ret |
906 | ; jmp still |
837 | ;------------------------------------------------------------------------------ |
- | |
838 | align 4 |
- | |
839 | redraw_window_tabs: |
- | |
840 | xor edi, edi |
- | |
841 | mov [contrast], 0 |
907 | ;------------------------------------------------------------------------------ |
842 | 908 | align 4 |
|
843 | push ebp |
909 | conversion_HEX_to_ASCII: |
844 | mcall 18,7 |
910 | ror eax,12 |
845 | mov ebp,eax |
- | |
846 | ;-------------------------------------- |
911 | mov ecx,4 |
847 | align 4 |
- | |
848 | .loop: |
- | |
849 | mov ecx,[app_list+edi*4] |
912 | ;-------------------------------------- |
850 | cmp ecx,-1 |
- | |
851 | jz .done |
- | |
852 | - | ||
853 | push ecx |
- | |
854 | mcall 9,procinfo_window_tabs ;0x8000 ; WTF???!!! |
- | |
855 | - | ||
856 | imul ebx, edi, 6*10*10000h |
- | |
857 | add ebx, 12*10*10000h + 7*10000h + 54 |
- | |
858 | - | ||
859 | mcall 13,,<3,14>,0x383838 |
- | |
860 | - | ||
861 | sub ebx, 10000h + 53 |
- | |
862 | mcall ,,<4,12> |
- | |
863 | - | ||
864 | sub ebx, 10000h |
- | |
865 | mcall ,,<5,10> |
- | |
866 | 913 | align 4 |
|
867 | add ebx, 56*10000h |
- | |
868 | mcall ,,<4,12> |
- | |
869 | - | ||
870 | add ebx, 10000h |
- | |
871 | mcall ,,<5,10> |
914 | .loop: |
872 | 915 | mov bl,al |
|
Line 873... | Line 916... | ||
873 | mov edx, [wcolor] ; barsuk |
916 | rol eax,4 |
- | 917 | and bl,0xf |
|
874 | pop ecx |
918 | cmp bl,0xA ; check for ABCDEF |
875 | cmp ebp, ecx ; ecx=active slot number |
919 | jae @f |
876 | jnz @f |
920 | |
877 | - | ||
878 | mov edx, [system_colours.work_button] |
- | |
879 | ;-------------------------------------- |
- | |
880 | align 4 |
- | |
881 | @@: |
- | |
882 | mov esi, [current_alt_tab_app] |
- | |
883 | cmp esi, -1 |
- | |
884 | jz @f |
921 | add bl,0x30 ; 0-9 |
885 | 922 | jmp .store |
|
886 | cmp ecx, [alt_tab_list+esi*8] |
923 | ;-------------------------------------- |
887 | jnz @f |
924 | align 4 |
888 | - | ||
889 | mov edx, 0xFF8000 |
- | |
890 | ;-------------------------------------- |
- | |
891 | align 4 |
925 | @@: |
892 | @@: |
926 | add bl,0x57 ; A-F |
893 | sub ebx, 55*10000h - 53 |
- | |
894 | mcall ,,<4,12> |
- | |
895 | - | ||
896 | sub ebx, 10000h + 53 |
- | |
897 | mcall ,,<5,10> |
- | |
898 | - | ||
899 | add ebx, 55*10000h |
- | |
900 | mcall |
- | |
901 | - | ||
902 | sub ebx, 51*10000h - 6 |
- | |
903 | mov edx, procinfo_window_tabs+10 ;0x8000+10 ; WTF???!!! |
927 | ;-------------------------------------- |
904 | mcall 4,,[system_colours.work_button_text],,11 |
- | |
905 | ;-------------------------------------- |
- | |
906 | align 4 |
- | |
907 | .nodraw: |
- | |
908 | inc edi |
928 | align 4 |
909 | cmp edi, [max_applications] |
929 | .store: |
910 | jb .loop |
930 | ; dps "param_store: " |
911 | ;-------------------------------------- |
931 | mov [edi],bl |
912 | align 4 |
932 | inc edi |
913 | .done: |
- | |
914 | pop ebp |
- | |
915 | ret |
- | |
916 | ;------------------------------------------------------------------------------ |
933 | dec ecx |
917 | align 4 |
- | |
918 | calculate_applications: |
- | |
919 | mov eax,[max_applications] |
- | |
920 | mul [page_list] |
- | |
921 | test eax,eax |
- | |
922 | je @f |
- | |
923 | - | ||
924 | inc eax |
- | |
925 | ;-------------------------------------- |
934 | jnz .loop |
926 | align 4 |
- | |
927 | @@: |
- | |
928 | mov [draw_start_position],eax |
- | |
929 | - | ||
Line 930... | Line -... | ||
930 | mov edi,app_list |
- | |
931 | mov ecx,20 |
935 | ret |
932 | mov eax,-1 |
- | |
933 | cld |
- | |
934 | rep stosd |
- | |
935 | 936 | ;------------------------------------------------------------------------------ |
|
Line 936... | Line 937... | ||
936 | mov edi,0 |
937 | align 4 |
937 | mov ecx,2 |
938 | menu_handler: |
Line 938... | Line 939... | ||
938 | ;-------------------------------------- |
939 | mov edi,bootparam |
939 | align 4 |
940 | |
Line 940... | Line 941... | ||
940 | cnewpr: |
941 | mov eax,[menu_button_x.start] |
941 | mcall 9,procinfo_window_tabs ;0x8000 ; WTF???!!! |
- | |
942 | 942 | call conversion_HEX_to_ASCII |
|
943 | call need_window_tab |
- | |
944 | jz cnorpl |
- | |
945 | - | ||
946 | sub [draw_start_position], 1 |
- | |
947 | jg cnorpl |
- | |
Line 948... | Line 943... | ||
948 | 943 | ||
949 | mov [app_list+edi*4],ecx |
- | |
950 | inc edi |
- | |
951 | ;-------------------------------------- |
- | |
952 | align 4 |
944 | mov eax,[menu_button_x.size] |
953 | cnorpl: |
- | |
Line 954... | Line 945... | ||
954 | inc ecx |
945 | call conversion_HEX_to_ASCII |
955 | cmp eax,ecx |
946 | |
Line 956... | Line -... | ||
956 | jge cnewpr |
- | |
957 | - | ||
958 | mov [app_tab_count], edi |
- | |
959 | ret |
- | |
960 | ;------------------------------------------------------------------------------ |
- | |
961 | align 4 |
- | |
962 | draw_application_buttons: |
- | |
963 | pusha |
- | |
964 | - | ||
965 | cmp [icons],1 |
- | |
966 | jne da_ret |
- | |
967 | - | ||
968 | mcall 14 |
- | |
969 | shr eax,16 |
- | |
970 | - | ||
971 | sub eax, 281 |
- | |
972 | jnc ._01 |
- | |
973 | xor eax, eax |
- | |
974 | ;-------------------------------------- |
- | |
975 | align 4 |
- | |
976 | ._01: |
947 | mov eax,[menu_button_y.start] |
977 | mov bl, 60 |
- | |
978 | div bl |
- | |
979 | xor ah, ah ; eax - ª®«¨ç¥á⢮ 㬥é îè¨åáï ¯¨ªâ®¢ |
- | |
980 | mov [max_applications], eax |
948 | call conversion_HEX_to_ASCII |
981 | mov edi,1 |
- | |
982 | ;-------------------------------------- |
- | |
983 | align 4 |
- | |
984 | nb: |
- | |
985 | mov ebx,edi |
- | |
986 | shl ebx,16 |
- | |
987 | imul ebx,6*10 ;13 |
- | |
988 | add ebx,75*65536+10*6-1 ; << Alver 25.08.2007 >> 15*65536+10*6-1 ;13 |
- | |
Line 989... | Line -... | ||
989 | mov edx,edi |
- | |
990 | add edx,51 |
- | |
991 | cmp [buttons],1 |
- | |
992 | je bufr |
- | |
993 | - | ||
994 | or edx,0x60000000 |
- | |
995 | ;-------------------------------------- |
- | |
996 | align 4 |
- | |
997 | bufr: |
- | |
998 | mov esi,[wcolor] |
- | |
999 | sub ebx,11 shl 16 |
- | |
1000 | mcall 8,,<1,17> |
949 | |
1001 | 950 | mov eax,[menu_button_y.size] |
|
- | 951 | call conversion_HEX_to_ASCII |
|
1002 | inc edi |
952 | |
- | 953 | mov eax,[height] |
|
1003 | cmp edi,[max_applications] |
954 | call conversion_HEX_to_ASCII |
1004 | jbe nb |
955 | |
1005 | ;-------------------------------------- |
956 | mov eax,[place_attachment] |
1006 | align 4 |
957 | call conversion_HEX_to_ASCII |
1007 | da_ret: |
958 | |
Line 1026... | Line 977... | ||
1026 | mov edi,edx |
977 | mov edi,edx |
1027 | or edx, 0x01000000 |
978 | or edx, 0x01000000 |
1028 | mcall |
979 | mcall |
Line 1029... | Line 980... | ||
1029 | 980 | ||
1030 | xor ecx,ecx |
981 | xor ecx,ecx |
1031 | mov cx,[b_size_y] |
982 | mov cx,[height] |
Line 1032... | Line 983... | ||
1032 | mcall 8,<0,9>,,1,[wcolor] |
983 | mcall 8,<0,9>,,1,[wcolor] |
1033 | 984 | ||
1034 | mov ebx,2*65536+16 |
985 | mov ebx,2*65536 ;+6 |
1035 | cmp [graph_text],1 |
- | |
1036 | jne nos3 |
986 | mov bx,[height] |
1037 | - | ||
1038 | mov ebx,2*65536+7 |
- | |
1039 | ;-------------------------------------- |
- | |
1040 | align 4 |
987 | shr bx,1 |
1041 | nos3: |
988 | sub bx,3 |
1042 | mov ecx,[wcolor] |
989 | mov ecx,[wcolor] |
Line 1043... | Line 990... | ||
1043 | add ecx,0x303030 |
990 | add ecx,0x303030 |
Line 1057... | Line 1004... | ||
1057 | mov esi,edx |
1004 | mov esi,edx |
1058 | mov edi,edx |
1005 | mov edi,edx |
1059 | or edx, 0x01000000 |
1006 | or edx, 0x01000000 |
1060 | mcall |
1007 | mcall |
Line 1061... | Line -... | ||
1061 | - | ||
1062 | cmp [graph_text],1 |
- | |
1063 | je nos4 |
- | |
1064 | - | ||
1065 | mcall 8,<0,9>,<0,12>,2,[wcolor] |
- | |
1066 | - | ||
1067 | mov ecx,[wcolor] |
- | |
1068 | add ecx,0x303030 |
- | |
1069 | mcall 4,<2,4>,,hidetext+2,1 |
- | |
1070 | ;-------------------------------------- |
- | |
1071 | align 4 |
- | |
1072 | nos4: |
- | |
1073 | mov ecx,13*65536+25 |
- | |
1074 | cmp [graph_text],1 |
- | |
1075 | jne nos6 |
- | |
1076 | 1008 | ||
1077 | xor ecx,ecx |
1009 | xor ecx,ecx |
1078 | mov cx,word [b_size_y] |
- | |
1079 | ;-------------------------------------- |
- | |
1080 | align 4 |
- | |
1081 | nos6: |
1010 | mov cx,[height] |
Line 1082... | Line 1011... | ||
1082 | mcall 8,<0,9>,,1,[wcolor] |
1011 | mcall 8,<0,9>,,1,[wcolor] |
1083 | 1012 | ||
1084 | mov ebx,3*65536+22 |
1013 | mov ebx,3*65536 ;+6 |
1085 | cmp [graph_text],1 |
- | |
1086 | jne nos7 |
1014 | mov bx,[height] |
1087 | - | ||
1088 | mov ebx,3*65536+7 |
- | |
1089 | ;-------------------------------------- |
- | |
1090 | align 4 |
1015 | shr bx,1 |
1091 | nos7: |
1016 | sub bx,3 |
1092 | mov ecx,[wcolor] |
1017 | mov ecx,[wcolor] |
Line 1093... | Line 1018... | ||
1093 | add ecx,0x303030 |
1018 | add ecx,0x303030 |
Line 1158... | Line 1083... | ||
1158 | align 4 |
1083 | align 4 |
1159 | no_full: |
1084 | no_full: |
1160 | call menu_handler |
1085 | call menu_handler |
1161 | jmp small_wait |
1086 | jmp small_wait |
1162 | ;------------------------------------------------------------------------------ |
1087 | ;------------------------------------------------------------------------------ |
1163 | align 4 |
- | |
1164 | set_variables: |
- | |
1165 | pusha |
- | |
1166 | mov [b_size_y],dword 38 |
- | |
1167 | cmp [graph_text],1 |
- | |
1168 | jne noy2 |
- | |
1169 | - | ||
1170 | mov [b_size_y],dword 18 |
- | |
1171 | ;-------------------------------------- |
- | |
1172 | align 4 |
- | |
1173 | noy2: |
- | |
1174 | mov [button_frames],0x0 |
- | |
1175 | cmp [buttons],0 |
- | |
1176 | jne no_frames |
- | |
1177 | - | ||
1178 | mov [button_frames],0x40000000 |
- | |
1179 | ;-------------------------------------- |
- | |
1180 | align 4 |
- | |
1181 | no_frames: |
- | |
1182 | mcall 48,1,1 ; 3d button look |
- | |
1183 | - | ||
1184 | mov eax,0x40404040 ; dividers for processes |
- | |
1185 | mov edi,pros |
- | |
1186 | mov ecx,10 |
- | |
1187 | cld |
- | |
1188 | rep stosd |
- | |
1189 | - | ||
1190 | popa |
- | |
1191 | ret |
- | |
1192 | ;------------------------------------------------------------------------------ |
- | |
1193 | align 4 |
- | |
1194 | ; eax = number (1 or 2) |
- | |
1195 | ; ebx = language id |
- | |
1196 | draw_flag: |
- | |
1197 | pusha |
- | |
1198 | ; eax = 2 BIG |
- | |
1199 | ; eax = 1 small |
- | |
1200 | mov edx,ebx |
- | |
1201 | - | ||
1202 | mov ebx,[maxx] |
- | |
1203 | and eax,1 |
- | |
1204 | imul eax,17 ;17 |
- | |
1205 | sub ebx,eax |
- | |
1206 | sub ebx,76 ;79 ;28 |
- | |
1207 | - | ||
1208 | pushad |
- | |
1209 | ; dec ebx |
- | |
1210 | sub ebx,2 |
- | |
1211 | shl ebx, 16 |
- | |
1212 | add ebx, 15 ;25 |
- | |
1213 | xor edx,edx |
- | |
1214 | mcall 13,,<4,13> |
- | |
1215 | - | ||
1216 | add ebx,1 shl 16 |
- | |
1217 | sub ebx,2 |
- | |
1218 | mov ecx, 5 shl 16+11 |
- | |
1219 | cmp [type_lang],1 |
- | |
1220 | je label_1 |
- | |
1221 | - | ||
1222 | mov edx,0xff ;[wcolor] |
- | |
1223 | jmp label_2 |
- | |
1224 | ;-------------------------------------- |
- | |
1225 | align 4 |
- | |
1226 | label_1: |
- | |
1227 | mov edx,0x7700 |
- | |
1228 | ;-------------------------------------- |
- | |
1229 | align 4 |
- | |
1230 | label_2: |
- | |
1231 | mcall |
- | |
1232 | popad |
- | |
1233 | - | ||
1234 | shl ebx,16 |
- | |
1235 | add ebx,7 ;24 |
- | |
1236 | - | ||
1237 | mov ecx,[bte] ; color |
- | |
1238 | - | ||
1239 | if caps_lock_check |
- | |
1240 | ; make flag_text 'enfigerufretua' or 'ENFIGERUFRETUA' depending on CapsLock state. |
- | |
1241 | call flag_text_setup |
- | |
1242 | end if |
- | |
1243 | dec edx |
- | |
1244 | shl edx,1 |
- | |
1245 | add edx,flag_text |
- | |
1246 | mcall 4,,,,2 |
- | |
1247 | - | ||
1248 | mov ebx,[maxx] |
- | |
1249 | sub ebx,48 |
- | |
1250 | shl ebx,16 |
- | |
1251 | mov bx,34 |
- | |
1252 | xor edx,edx |
- | |
1253 | mcall 13,,<3,14> |
- | |
1254 | - | ||
1255 | add ebx,1 shl 16 |
- | |
1256 | sub ebx,2 |
- | |
1257 | mov ecx,4 shl 16+12 |
- | |
1258 | mov edx,time_bgr_color |
- | |
1259 | mcall |
- | |
1260 | - | ||
1261 | popa |
- | |
1262 | ret |
- | |
1263 | ;------------------------------------------------------------------------------ |
- | |
1264 | align 4 |
- | |
1265 | if caps_lock_check |
- | |
1266 | flag_text_setup: |
- | |
1267 | pusha |
- | |
1268 | mcall 66,3 |
- | |
1269 | mov edi, flag_text |
- | |
1270 | mov esi, flag_text_caps_off |
- | |
1271 | test eax, 0x40 |
- | |
1272 | jz @f |
- | |
1273 | - | ||
1274 | add esi, 14 |
- | |
1275 | ;-------------------------------------- |
- | |
1276 | align 4 |
- | |
1277 | @@: |
- | |
1278 | mov ecx, 14 |
- | |
1279 | rep movsb |
- | |
1280 | - | ||
1281 | popa |
- | |
1282 | ret |
- | |
1283 | - | ||
1284 | flag_text_caps_off db 'enfigerufretua' |
- | |
1285 | db 'ENFIGERUFRETUA' |
- | |
1286 | end if |
- | |
1287 | ;------------------------------------------------------------------------------ |
- | |
1288 | ; *************************************************** |
- | |
1289 | ; ********* WINDOW DEFINITIONS AND DRAW ************* |
- | |
1290 | ; *************************************************** |
- | |
1291 | align 4 |
- | |
1292 | draw_window: |
- | |
1293 | pusha |
- | |
1294 | mov [running_applications],-1 |
- | |
1295 | mov [checks],-1 |
- | |
1296 | mcall 12,1 |
- | |
1297 | - | ||
1298 | mcall 48,3,system_colours,10*4 |
- | |
1299 | - | ||
1300 | mov eax, [system_colours+4*6] |
- | |
1301 | sub eax, 0x101010 |
- | |
1302 | mov [wcolor], eax |
- | |
1303 | - | ||
1304 | mcall 14 ; get screen max x & max y |
- | |
1305 | - | ||
1306 | cmp [width],0 |
- | |
1307 | je no_def_width |
- | |
1308 | - | ||
1309 | and eax,0xffff |
- | |
1310 | mov ebx,[width] |
- | |
1311 | shl ebx,16 |
- | |
1312 | add eax,ebx |
- | |
1313 | ;-------------------------------------- |
- | |
1314 | align 4 |
- | |
1315 | no_def_width: |
- | |
1316 | mov ebx,eax |
- | |
1317 | mov [screenxy],ebx |
- | |
1318 | shr ebx,16 |
- | |
1319 | sub ax,38 |
- | |
1320 | shl eax,16 |
- | |
1321 | mov ecx,eax |
- | |
1322 | add ecx,0*65536+38 |
- | |
1323 | cmp [graph_text],1 |
- | |
1324 | jne no_text_1 |
- | |
1325 | mov cx,PANEL_HEIGHT |
- | |
1326 | add ecx,20*65536 |
- | |
1327 | ;-------------------------------------- |
- | |
1328 | align 4 |
- | |
1329 | no_text_1: |
- | |
1330 | xor eax,eax ; DEFINE AND DRAW WINDOW |
- | |
1331 | mov edx, [wcolor] |
- | |
1332 | or edx, 0x01000000 ; do not draw the window |
- | |
1333 | mov esi, [wcolor] |
- | |
1334 | or esi, 0x01000000 ; unmovable window |
- | |
1335 | mov edi, [wcolor] |
- | |
1336 | mov [panel_x_pos], ebx |
- | |
1337 | mov [panel_y_pos], ecx ; ®ª çâ® â ª. |
- | |
1338 | mcall |
- | |
1339 | - | ||
1340 | movzx ebx,word [screenxy+2] |
- | |
1341 | mov ecx,0*65536+0 |
- | |
1342 | mov edx,[wcolor] |
- | |
1343 | add edx,0x161616 |
- | |
1344 | ;-------------------------------------- |
- | |
1345 | align 4 |
- | |
1346 | newline_: ; debug.inc has macros with the same name |
- | |
1347 | sub edx,0x040404 |
- | |
1348 | mov eax,38 |
- | |
1349 | cmp [soften_up],1 |
- | |
1350 | jne no_su |
- | |
1351 | - | ||
1352 | and edx,0x00FFFFFF |
- | |
1353 | mcall |
- | |
1354 | ;-------------------------------------- |
- | |
1355 | align 4 |
- | |
1356 | no_su: |
- | |
1357 | pusha |
- | |
1358 | cmp [soften_down],1 |
- | |
1359 | jne no_sd |
- | |
1360 | - | ||
1361 | sub edx,0x141414 |
- | |
1362 | mov edi,[b_size_y] |
- | |
1363 | shl edi,16 |
- | |
1364 | add edi,[b_size_y] |
- | |
1365 | add ecx,edi |
- | |
1366 | sub ecx,3*65536+3 |
- | |
1367 | and edx,0x00FFFFFF |
- | |
1368 | mcall |
- | |
1369 | ;-------------------------------------- |
- | |
1370 | align 4 |
- | |
1371 | no_sd: |
- | |
1372 | popa |
- | |
1373 | - | ||
1374 | add ecx,1*65536+1 |
- | |
1375 | cmp cx,5 |
- | |
1376 | jb newline_ |
- | |
1377 | - | ||
1378 | cmp [soften_middle],1 |
- | |
1379 | jne no_sm |
- | |
1380 | - | ||
1381 | movzx ebx,word [screenxy+2] |
- | |
1382 | mov ecx,5*65536+5 |
- | |
1383 | mov esi,stripe |
- | |
1384 | mov edx,[wcolor] |
- | |
1385 | ;-------------------------------------- |
- | |
1386 | align 4 |
- | |
1387 | newline3: |
- | |
1388 | add edx,[esi] |
- | |
1389 | add esi,4 |
- | |
1390 | - | ||
1391 | and edx,0x00FFFFFF |
- | |
1392 | mcall 38 |
- | |
1393 | add ecx,1*65536+1 |
- | |
1394 | cmp cx,15 |
- | |
1395 | jb newline3 |
- | |
1396 | ;-------------------------------------- |
- | |
1397 | align 4 |
- | |
1398 | no_sm: |
- | |
1399 | cmp [minimize_left],1 |
- | |
1400 | jne no_mleft |
- | |
1401 | - | ||
1402 | mov ecx,1 *65536 |
- | |
1403 | add ecx,[b_size_y] |
- | |
1404 | dec ecx |
- | |
1405 | mov edx,101 |
- | |
1406 | add edx,[button_frames] |
- | |
1407 | mcall 8,<0,9>,,,[wcolor] ; ABS LEFT |
- | |
1408 | - | ||
1409 | mov ebx,2*65536+17 |
- | |
1410 | cmp [graph_text],1 |
- | |
1411 | jne no_y1 |
- | |
1412 | - | ||
1413 | mov bx,7 |
- | |
1414 | ;-------------------------------------- |
- | |
1415 | align 4 |
- | |
1416 | no_y1: |
- | |
1417 | mov ecx,[wcolor] |
- | |
1418 | add ecx,0x303030 |
- | |
1419 | mcall 4,,,hidetext,1 ; HIDE TEXT |
- | |
1420 | ;-------------------------------------- |
- | |
1421 | align 4 |
- | |
1422 | no_mleft: |
- | |
1423 | movzx eax,word [screenxy+2] |
- | |
1424 | mov [maxx],eax |
- | |
1425 | cmp [minimize_right],1 |
- | |
1426 | jne no_mright |
- | |
1427 | mov eax,[maxx] |
- | |
1428 | sub eax,77 |
- | |
1429 | shl eax,16 |
- | |
1430 | mov ebx,eax |
- | |
1431 | add ebx,67 |
- | |
1432 | - | ||
1433 | mov ecx,1 *65536 |
- | |
1434 | add ecx,[b_size_y] |
- | |
1435 | dec ecx |
- | |
1436 | add ebx,68*65536 |
- | |
1437 | mov bx,9 |
- | |
1438 | mov edx,102 |
- | |
1439 | add edx,[button_frames] |
- | |
1440 | mcall 8,,,,[wcolor] ; ABS RIGHT |
- | |
1441 | - | ||
1442 | mov edx,hidetext+1 |
- | |
1443 | mov eax,4 |
- | |
1444 | mov ebx,[maxx] |
- | |
1445 | sub ebx,6 |
- | |
1446 | shl ebx,16 |
- | |
1447 | mov bx,17 |
- | |
1448 | cmp [graph_text],1 |
- | |
1449 | jne no_y2 |
- | |
1450 | - | ||
1451 | mov bx,7 |
- | |
1452 | ;-------------------------------------- |
- | |
1453 | align 4 |
- | |
1454 | no_y2: |
- | |
1455 | mov ecx,[wcolor] |
- | |
1456 | add ecx,0x303030 |
- | |
1457 | mov esi,1 |
- | |
1458 | mcall |
- | |
1459 | ;-------------------------------------- |
- | |
1460 | align 4 |
- | |
1461 | no_mright: |
- | |
1462 | call draw_menuet_icon |
- | |
1463 | ; call draw_program_icons |
- | |
1464 | mov [ptime],0 |
- | |
1465 | call draw_info |
- | |
1466 | call draw_application_buttons |
- | |
1467 | - | ||
1468 | mcall 12,2 |
- | |
1469 | popa |
- | |
1470 | ret |
- | |
1471 | ;------------------------------------------------------------------------------ |
- | |
1472 | align 4 |
- | |
1473 | dr_button_clean: |
- | |
1474 | mcall 8,,<3,13> |
- | |
1475 | ret |
- | |
1476 | ;------------------------------------------------------------------------------ |
- | |
1477 | align 4 |
- | |
1478 | draw_menuet_icon: |
- | |
1479 | pusha |
- | |
1480 | ; Inserted code for drawing buttons 103, 104, 105 (Clean, Restore, Exchange windows) |
- | |
1481 | mov esi, dword [system_colours+24] ; drawing buttons |
- | |
1482 | and esi, 0x00ffffff |
- | |
1483 | mov edx, 103 |
- | |
1484 | mov ebx, 67*65536+13 |
- | |
1485 | call dr_button_clean |
- | |
1486 | - | ||
1487 | inc edx |
- | |
1488 | mov ebx, 86*65536+13 |
- | |
1489 | call dr_button_clean |
- | |
1490 | - | ||
1491 | inc edx |
- | |
1492 | mov ebx, 105*65536+13 |
- | |
1493 | call dr_button_clean |
- | |
1494 | - | ||
1495 | mov ecx, dword [system_colours+28] |
- | |
1496 | and ecx, 0x00ffffff |
- | |
1497 | mcall 4,<71,6>,,page_clean_but,1 |
- | |
1498 | - | ||
1499 | inc edx |
- | |
1500 | mcall ,<90,6> |
- | |
1501 | - | ||
1502 | inc edx |
- | |
1503 | mcall ,<109,6> |
- | |
1504 | - | ||
1505 | cmp [menu_enable],1 |
- | |
1506 | jne no_menu |
- | |
1507 | - | ||
1508 | mov ebx, 10*65536 + 47 |
- | |
1509 | cmp [minimize_left], 0 |
- | |
1510 | jne @f |
- | |
1511 | - | ||
1512 | sub ebx, 10*65536 |
- | |
1513 | ;-------------------------------------- |
- | |
1514 | align 4 |
- | |
1515 | @@: |
- | |
1516 | mov ecx, 1*65536 |
- | |
1517 | add ecx, [b_size_y] |
- | |
1518 | dec ecx |
- | |
1519 | mov edx, 0x20d1ff01 |
- | |
1520 | add edx, [button_frames] |
- | |
1521 | mcall 8,,,,[wcolor] ; M BUTTON |
- | |
1522 | - | ||
1523 | ; cmp [graph_text], 1 |
- | |
1524 | ; jne no_mtext |
- | |
1525 | - | ||
1526 | push ebx |
- | |
1527 | mcall 13,<12,44>,<1,17>,0x383838 |
- | |
1528 | - | ||
1529 | mcall ,<56,1>,<2,15> |
- | |
1530 | - | ||
1531 | mcall ,<57,1>,<4,11> |
- | |
1532 | - | ||
1533 | mcall ,<58,1>,<6,7> |
- | |
1534 | - | ||
1535 | mcall ,<13,43>,<2,15>,0x7700 |
- | |
1536 | - | ||
1537 | mcall ,<56,1>,<4,11> |
- | |
1538 | - | ||
1539 | mcall ,<57,1>,<6,7> |
- | |
1540 | pop ebx |
- | |
1541 | - | ||
1542 | mov bx, 7 |
- | |
1543 | add ebx, 8*65536 |
- | |
1544 | - | ||
1545 | mcall 4,,0x10ffffff,m_text,4 |
- | |
1546 | - | ||
1547 | popa |
- | |
1548 | ret |
- | |
1549 | ;-------------------------------------- |
- | |
1550 | ;align 4 |
- | |
1551 | ;no_mtext: |
- | |
1552 | ; mov eax,[wcolor] |
- | |
1553 | ; mov [m_icon+4],eax |
- | |
1554 | ;; load & display menuet.bmp |
- | |
1555 | ; mcall 70,m_bmp_fileinfo |
- | |
1556 | - | ||
1557 | ; mov eax,40 |
- | |
1558 | ; mov ebx,0 |
- | |
1559 | ; mov edi,image+53 |
- | |
1560 | ;-------------------------------------- |
- | |
1561 | ;align 4 |
- | |
1562 | ;new_m_pix: |
- | |
1563 | ; cmp byte [edi], 10 |
- | |
1564 | ; jb nopix |
- | |
1565 | - | ||
1566 | ; cmp byte [edi+1], 10 |
- | |
1567 | ; jb nopix |
- | |
1568 | - | ||
1569 | ; cmp byte [edi+2], 10 |
- | |
1570 | ; jb nopix |
- | |
1571 | - | ||
1572 | ; pusha |
- | |
1573 | ; cmp [minimize_left],0 |
- | |
1574 | ; jne no_m_s2 |
- | |
1575 | - | ||
1576 | ; sub ebx,10 |
- | |
1577 | ;-------------------------------------- |
- | |
1578 | ;align 4 |
- | |
1579 | ;no_m_s2: |
- | |
1580 | ; mov edx,[edi+1] |
- | |
1581 | ; mov ecx,eax |
- | |
1582 | ; add ebx,12 |
- | |
1583 | ; mcall 1 ; point - WTF???!!! |
- | |
1584 | - | ||
1585 | ; popa |
- | |
1586 | ;-------------------------------------- |
- | |
1587 | ;align 4 |
- | |
1588 | ;nopix: |
- | |
1589 | ; add edi,3 |
- | |
1590 | ; add ebx,1 |
- | |
1591 | ; cmp ebx,40 |
- | |
1592 | ; jnz new_m_pix |
- | |
1593 | - | ||
1594 | ; mov ebx,0 |
- | |
1595 | ; dec eax |
- | |
1596 | ; jnz new_m_pix |
- | |
1597 | ;-------------------------------------- |
- | |
1598 | align 4 |
- | |
1599 | no_menu: |
- | |
1600 | popa |
- | |
1601 | ret |
- | |
1602 | ;------------------------------------------------------------------------------ |
- | |
1603 | ;align 4 |
1088 | ;align 4 |
1604 | ;draw_program_icons: |
1089 | ;set_variables: |
1605 | ; pusha |
1090 | ; pusha |
- | 1091 | ; mov [button_frames],0x0 |
|
- | 1092 | ; cmp [buttons],0 |
|
- | 1093 | ; jne no_frames |
|
Line 1606... | Line 1094... | ||
1606 | 1094 | ||
1607 | ; cmp [icons],0 |
- | |
1608 | ; jne dp_ret |
- | |
1609 | - | ||
1610 | ; mov edi,1 |
- | |
1611 | ; push edi |
1095 | ; mov [button_frames],0x40000000 |
1612 | ;-------------------------------------- |
1096 | ;-------------------------------------- |
1613 | ;align 4 |
- | |
1614 | ;new_icon_file: |
- | |
1615 | ; pusha |
- | |
1616 | ; mov edx,[esp+32] |
- | |
1617 | ; add edx,10 |
- | |
1618 | - | ||
1619 | ; push edx |
- | |
1620 | ; mov ecx,1*65536 |
- | |
1621 | ; add ecx,[b_size_y] |
- | |
1622 | ; dec ecx |
- | |
1623 | ; mov eax,edi |
- | |
1624 | ; dec eax |
- | |
1625 | ; imul eax,40 |
- | |
1626 | ; mov ebx,eax |
- | |
1627 | ; add ebx,[icons_position] |
- | |
1628 | ; shl ebx,16 |
- | |
1629 | ; mov bx,39 |
- | |
1630 | ; pop edx |
- | |
1631 | - | ||
1632 | ; add edx,[button_frames] |
- | |
1633 | ; or edx, 0x20000000 |
- | |
1634 | ; mcall 8,,,,[wcolor] |
- | |
1635 | ; popa |
- | |
1636 | - | ||
1637 | ; mov ecx,[esp] |
- | |
1638 | ; add ecx,48 |
- | |
1639 | ; mov [iconf+6],cl |
- | |
1640 | - | ||
1641 | ; mcall 70,iconf_fileinfo |
- | |
1642 | - | ||
1643 | ; mov eax,0 |
- | |
1644 | ; mov ebx,32 |
- | |
1645 | ; mov edi,image+51+32*33*3 |
- | |
1646 | ;-------------------------------------- |
- | |
1647 | ;align 4 |
- | |
1648 | ;np2: ; new pixel of file |
- | |
1649 | ; mov edx,[edi] |
- | |
1650 | ; and edx,0xffffff |
- | |
1651 | - | ||
1652 | ; cmp eax,3 ; Y draw limits |
- | |
1653 | ; jb nopix2 |
- | |
1654 | - | ||
1655 | ; cmp eax,36 |
- | |
1656 | ; jg nopix2 |
- | |
1657 | - | ||
1658 | ; cmp ebx,38 ; X draw limits |
- | |
1659 | ; jg nopix2 |
- | |
1660 | - | ||
1661 | ; cmp ebx,2 |
- | |
1662 | ; jb nopix2 |
- | |
1663 | - | ||
1664 | ; cmp edx,0 |
- | |
1665 | ; jz nopix2 |
- | |
1666 | - | ||
1667 | ; cmp [graph_text],1 |
- | |
1668 | ; jne no_icon_text |
- | |
1669 | - | ||
1670 | ; pusha |
- | |
1671 | ; mov ebx,[esp+32] |
- | |
1672 | ; dec ebx |
- | |
1673 | ; imul ebx,40 |
- | |
1674 | ; add ebx,8 |
- | |
1675 | ; add ebx,[icons_position] |
- | |
1676 | ; shl ebx,16 |
- | |
1677 | ; mov bx,7 |
- | |
1678 | - | ||
1679 | ; mov edx,[esp+32] |
- | |
1680 | ; dec edx |
- | |
1681 | ; imul edx,4 |
- | |
1682 | ; add edx,mi_text |
- | |
1683 | ; mcall 4,,0xffffff,,4 |
- | |
1684 | ; popa |
- | |
1685 | ; jmp nopix2 |
- | |
1686 | ;-------------------------------------- |
- | |
1687 | ;align 4 |
1097 | ;align 4 |
1688 | ;no_icon_text: |
- | |
1689 | ; mov esi,[esp] |
- | |
1690 | ; pusha |
- | |
1691 | - | ||
1692 | ; push edx |
- | |
1693 | ; mov ecx,eax |
- | |
1694 | ; add ecx,2 |
- | |
1695 | ; mov eax,esi |
- | |
1696 | ; dec eax |
- | |
1697 | ; imul eax,40 |
- | |
1698 | ; add ebx,eax |
- | |
1699 | ; add ebx,3 |
- | |
1700 | ; add ebx,[icons_position] |
- | |
1701 | ; pop edx |
- | |
1702 | - | ||
1703 | ; mcall 1 ; WTF???!!! |
- | |
1704 | ; popa |
- | |
1705 | ;-------------------------------------- |
- | |
1706 | ;align 4 |
- | |
1707 | ;nopix2: |
- | |
1708 | ; sub edi,3 |
- | |
1709 | ; dec ebx |
- | |
1710 | ; jnz np2 |
- | |
1711 | - | ||
1712 | ; mov ebx,32 |
- | |
1713 | ; add eax,1 |
- | |
1714 | ; cmp eax,32 |
- | |
1715 | ; jnz np2 |
- | |
1716 | - | ||
1717 | ; add dword [esp],1 |
- | |
1718 | ; mov edi,[esp] |
- | |
1719 | ; cmp dword [esp],4 |
- | |
1720 | ; jbe new_icon_file |
- | |
1721 | - | ||
1722 | ; add esp,4 |
- | |
1723 | - | ||
1724 | ; mov ebx,40 |
- | |
1725 | ; imul ebx,3 |
- | |
1726 | ; add ebx,[icons_position] |
- | |
1727 | ; add ebx,10 |
- | |
1728 | ; shl ebx,16 |
- | |
1729 | ; mov bx,23 |
1098 | ;no_frames: |
1730 | ; mcall 4,,[wcolor],gpl,3 |
- | |
1731 | ;-------------------------------------- |
- | |
1732 | ;align 4 |
- | |
1733 | ;dp_ret: |
1099 | ; mcall 48,1,1 ; 3d button look |
1734 | ; popa |
1100 | ; popa |
1735 | ; ret |
1101 | ; ret |
1736 | ;------------------------------------------------------------------------------ |
- | |
1737 | align 4 |
- | |
1738 | draw_info: ; draw cpu usage, time, date |
- | |
1739 | pusha |
- | |
1740 | cmp [setup_enable],1 |
- | |
1741 | jne no_setup |
- | |
1742 | - | ||
1743 | cmp [minimize_right],0 |
- | |
1744 | jne no_m_r |
- | |
1745 | add [maxx],10 |
- | |
1746 | ;-------------------------------------- |
- | |
1747 | align 4 |
- | |
1748 | no_m_r: |
- | |
1749 | mov eax,3 |
- | |
1750 | mcall |
- | |
1751 | cmp eax,[ptime] |
- | |
1752 | jz _ret |
- | |
1753 | - | ||
1754 | mov [ptime],eax |
- | |
1755 | - | ||
1756 | call draw_cpu_usage |
- | |
1757 | - | ||
1758 | mov eax,[maxx] ; blink sec |
- | |
1759 | sub eax,33 |
- | |
1760 | shl eax,16 |
- | |
1761 | mov ebx,eax |
- | |
1762 | add ebx,9 |
- | |
1763 | mcall 3 |
- | |
1764 | - | ||
1765 | cmp [graph_text],1 |
- | |
1766 | jne no_y4 |
- | |
1767 | - | ||
1768 | sub bx,2 |
- | |
1769 | ;-------------------------------------- |
- | |
1770 | align 4 |
- | |
1771 | no_y4: |
- | |
1772 | mov ecx,eax |
- | |
1773 | shr ecx,16 |
- | |
1774 | and ecx,1 |
- | |
1775 | mov edx,[bte] |
- | |
1776 | sub edx,time_bgr_color;[wcolor] |
- | |
1777 | imul ecx,edx |
- | |
1778 | add ecx,time_bgr_color;[wcolor] |
- | |
1779 | - | ||
1780 | mcall 4,,,sec,1 |
- | |
1781 | - | ||
1782 | mcall 26,2,9 |
- | |
1783 | - | ||
1784 | mov edx,eax |
- | |
1785 | mcall 3 |
- | |
1786 | - | ||
1787 | and eax,0xffff |
- | |
1788 | add edx,eax |
- | |
1789 | cmp edx,[checks] |
- | |
1790 | je _ret |
- | |
1791 | - | ||
1792 | mov [checks],edx |
- | |
1793 | - | ||
1794 | mov ebx,[maxx] |
- | |
1795 | sub ebx,48 ;;94 ;;74 |
- | |
1796 | shl ebx,16 |
- | |
1797 | add ebx,33 ;;84 ;;64 |
- | |
1798 | - | ||
1799 | mov ecx,3 *65536 |
- | |
1800 | add ecx,[b_size_y] |
- | |
1801 | sub cx,5 |
- | |
1802 | mcall 8,,,0x40000002,[wcolor] ; time/date button |
- | |
1803 | - | ||
1804 | and edx,0xffff |
- | |
1805 | add edx,[button_frames] |
- | |
1806 | mcall |
- | |
1807 | - | ||
1808 | mov ebx,[maxx] |
- | |
1809 | sub ebx,77 ;80 |
- | |
1810 | shl ebx,16 |
- | |
1811 | add ebx,14 |
- | |
1812 | - | ||
1813 | mcall ,,<4,12>,0x60000010,[wcolor] ;button 16 |
- | |
1814 | - | ||
1815 | sub ebx,17 shl 16 |
- | |
1816 | inc edx ;button 17 |
- | |
1817 | - | ||
1818 | add ebx,33 shl 16 |
- | |
1819 | mov bx,8 |
- | |
1820 | inc edx ;button 18 |
- | |
1821 | mcall |
- | |
1822 | - | ||
1823 | sub ebx,30 shl 16 |
- | |
1824 | mov bx,10 |
- | |
1825 | inc edx ;button 19 |
- | |
1826 | mcall |
- | |
1827 | - | ||
1828 | sub ebx,14 shl 16 |
- | |
1829 | inc edx ;button 20 |
- | |
1830 | mcall |
- | |
1831 | - | ||
1832 | sub ebx,12 shl 16 |
- | |
1833 | mov bx,8 |
- | |
1834 | mov ecx,6 shl 16+10 |
- | |
1835 | inc edx ;button 21 |
- | |
1836 | mcall |
- | |
1837 | - | ||
1838 | sub ebx,24 shl 16 |
- | |
1839 | inc edx ;button 22 |
- | |
1840 | mcall |
- | |
1841 | - | ||
1842 | mcall 26,2,9 |
- | |
1843 | - | ||
1844 | mov ebx,eax |
- | |
1845 | - | ||
1846 | mov eax,2 |
- | |
1847 | mov [type_lang],al |
- | |
1848 | call draw_flag |
- | |
1849 | - | ||
1850 | mcall 18,8,1 |
- | |
1851 | - | ||
1852 | mov [sound_flag],al |
- | |
1853 | - | ||
1854 | mov ebx,[maxx] |
- | |
1855 | sub ebx,92 ;109 ;112 ;28 |
- | |
1856 | shl ebx,16 |
- | |
1857 | mov bx,12 |
- | |
1858 | xor edx,edx |
- | |
1859 | mcall 13,,<4,13> |
- | |
1860 | - | ||
1861 | add ebx,1 shl 16 |
- | |
1862 | sub bx,2 |
- | |
1863 | mcall ,,<5,11>,0xcc |
- | |
1864 | - | ||
1865 | add ebx,1 shl 16 |
- | |
1866 | mov bx,5 |
- | |
1867 | mcall ,,<8,5>,0xdddd00 |
- | |
1868 | - | ||
1869 | add ebx,5 shl 16 |
- | |
1870 | mov bx,1 |
- | |
1871 | mcall ,,<7,7> |
- | |
1872 | - | ||
1873 | add ebx,1 shl 16 |
- | |
1874 | mcall ,,<6,9> |
- | |
1875 | - | ||
1876 | add ebx,1 shl 16 |
- | |
1877 | mcall ,,<5,11> |
- | |
1878 | - | ||
1879 | cmp [sound_flag],0 |
- | |
1880 | je dalshe |
- | |
1881 | - | ||
1882 | sub ebx,8 shl 16 |
- | |
1883 | ror ebx,16 |
- | |
1884 | mov cx,bx |
- | |
1885 | rol ebx,16 |
- | |
1886 | mov bx,cx |
- | |
1887 | add bx,8 |
- | |
1888 | mcall 38,,<5,15>,0xff0000 |
- | |
1889 | - | ||
1890 | add ebx,1 shl 16 |
- | |
1891 | inc bx |
- | |
1892 | mcall |
- | |
1893 | - | ||
1894 | rol ecx,16 |
- | |
1895 | mcall |
- | |
1896 | - | ||
1897 | sub ebx,1 shl 16 |
- | |
1898 | dec bx |
- | |
1899 | mcall |
- | |
1900 | ;-------------------------------------- |
- | |
1901 | align 4 |
- | |
1902 | dalshe: |
- | |
1903 | mov ebx,[maxx] |
- | |
1904 | sub ebx,106;123 |
- | |
1905 | shl ebx,16 |
- | |
1906 | mov bx,12 |
- | |
1907 | xor edx,edx |
- | |
1908 | mcall 13,,<4,13> |
- | |
1909 | - | ||
1910 | add ebx,1 shl 16 |
- | |
1911 | sub bx,2 |
- | |
1912 | mcall ,,<5,11>,0xffcc00 |
- | |
1913 | - | ||
1914 | mov ebx,[maxx] |
- | |
1915 | sub ebx,104;121 |
- | |
1916 | shl ebx,16 |
- | |
1917 | mov bx,7 |
- | |
1918 | - | ||
1919 | mcall 4,,0x10000000,file_sys,1 |
- | |
1920 | - | ||
1921 | add ebx,1 shl 16 |
- | |
1922 | mcall |
- | |
1923 | - | ||
1924 | mov ebx,[maxx] |
- | |
1925 | sub ebx,117;134 |
- | |
1926 | shl ebx,16 |
- | |
1927 | mov bx,9 |
- | |
1928 | xor edx,edx |
- | |
1929 | mcall 13,,<6,11> |
- | |
1930 | - | ||
1931 | sub ebx,24 shl 16 ; 18 shl 16 |
- | |
1932 | mcall |
- | |
1933 | - | ||
1934 | add ebx,25 shl 16 ; 19 shl 16 |
- | |
1935 | sub bx,2 |
- | |
1936 | mcall ,,<7,9>,0xffffff |
- | |
1937 | - | ||
1938 | sub ebx,24 shl 16 |
- | |
1939 | mcall |
- | |
1940 | - | ||
1941 | mov ebx,[maxx] |
- | |
1942 | sub ebx, 139 |
- | |
1943 | shl ebx,16 |
- | |
1944 | mov bx,8 |
- | |
1945 | mcall 4,,,page_a1,5 |
- | |
1946 | - | ||
1947 | add ebx,1 shl 16 |
- | |
1948 | mcall |
- | |
1949 | - | ||
1950 | mov edx,[maxx] |
- | |
1951 | sub edx,130 |
- | |
1952 | shl edx,16 |
- | |
1953 | mov dx,7 |
- | |
1954 | mcall 47,0x20000,[page_list],,0xffffff |
- | |
1955 | - | ||
1956 | mcall 3 ; get time |
- | |
1957 | - | ||
1958 | movzx ebx,al |
- | |
1959 | shr eax,8 |
- | |
1960 | movzx ecx,al |
- | |
1961 | shr eax,8 |
- | |
1962 | movzx edx,al |
- | |
1963 | ; ebx ecx edx h m s |
- | |
1964 | push ebx |
- | |
1965 | push ecx |
- | |
1966 | - | ||
1967 | mov eax,[maxx] |
- | |
1968 | sub eax,32 |
- | |
1969 | shl eax,16 |
- | |
1970 | mov ebx,eax |
- | |
1971 | add ebx,9 |
- | |
1972 | - | ||
1973 | mov ecx,[bte] |
- | |
1974 | - | ||
1975 | cmp [graph_text],1 |
- | |
1976 | jne no_y3 |
- | |
1977 | - | ||
1978 | sub bx,2 |
- | |
1979 | ;-------------------------------------- |
- | |
1980 | align 4 |
- | |
1981 | no_y3: |
- | |
1982 | mov edx,[esp] ; __:_X |
- | |
1983 | and edx,15 |
- | |
1984 | add ebx,10*65536 |
- | |
1985 | add edx,text |
- | |
1986 | mcall 4,,0xffffff,,1 |
- | |
1987 | - | ||
1988 | pop edx ; __:X_ |
- | |
1989 | shr edx,4 |
- | |
1990 | and edx,15 |
- | |
1991 | sub ebx,6*65536 |
- | |
1992 | add edx,text |
- | |
1993 | mcall |
- | |
1994 | - | ||
1995 | mov edx,[esp] ; _X:__ |
- | |
1996 | and edx,15 |
- | |
1997 | sub ebx,11*65536 |
- | |
1998 | add edx,text |
- | |
1999 | mcall |
- | |
2000 | - | ||
2001 | pop edx ; X_:__ |
- | |
2002 | shr edx,4 |
- | |
2003 | and edx,15 |
- | |
2004 | sub ebx,6*65536 |
- | |
2005 | add edx,text |
- | |
2006 | mcall |
- | |
2007 | - | ||
2008 | call draw_cpu_usage |
- | |
2009 | ;-------------------------------------- |
- | |
2010 | align 4 |
- | |
2011 | _ret: |
- | |
2012 | cmp [minimize_right],0 |
- | |
2013 | jne no_m_r2 |
- | |
2014 | - | ||
2015 | sub [maxx],10 |
- | |
2016 | ;-------------------------------------- |
- | |
2017 | align 4 |
- | |
2018 | no_m_r2: |
- | |
2019 | no_setup: |
- | |
2020 | popa |
- | |
2021 | ret |
- | |
2022 | ;------------------------------------------------------------------------------ |
- | |
2023 | align 4 |
- | |
2024 | draw_cpu_usage: |
- | |
2025 | pushad |
- | |
2026 | mov [ysi],30 |
- | |
2027 | cmp [graph_text],1 |
- | |
2028 | jne @f |
- | |
2029 | - | ||
2030 | mov [ysi],12 |
- | |
2031 | ;-------------------------------------- |
- | |
2032 | align 4 |
- | |
2033 | @@: |
- | |
2034 | mcall 18,5 ; TSC / SEC |
- | |
2035 | - | ||
2036 | shr eax,20 |
- | |
2037 | push eax |
- | |
2038 | mcall 18,4 ; IDLE / SEC |
- | |
2039 | - | ||
2040 | shr eax,20 |
- | |
2041 | xor edx,edx |
- | |
2042 | imul eax,[ysi] |
- | |
2043 | cdq |
- | |
2044 | pop ebx |
- | |
2045 | inc ebx |
- | |
2046 | div ebx |
- | |
2047 | cmp eax,[ysi] |
- | |
2048 | jng no_bug |
- | |
2049 | - | ||
2050 | mov eax,[ysi] |
- | |
2051 | ;-------------------------------------- |
- | |
2052 | align 4 |
- | |
2053 | no_bug: |
- | |
2054 | push eax |
- | |
2055 | - | ||
2056 | mov ebx,[maxx] |
- | |
2057 | sub ebx,60 |
- | |
2058 | shl ebx,16 |
- | |
2059 | add ebx,8 |
- | |
2060 | mov ecx,5 shl 16 |
- | |
2061 | add ecx,[ysi] |
- | |
2062 | mcall 13,,,0xdd2222 |
- | |
2063 | - | ||
2064 | pop eax |
- | |
2065 | mov ecx,5 shl 16 |
- | |
2066 | add ecx,eax |
- | |
2067 | mov eax,13 |
- | |
2068 | mcall 13,,,0x44aa44 |
- | |
2069 | - | ||
2070 | popad |
- | |
2071 | ret |
- | |
2072 | ;------------------------------------------------------------------------------ |
- | |
2073 | align 4 |
1102 | ;------------------------------------------------------------------------------ |
2074 | include 'ctx_menu.asm' |
- | |
2075 | ;------------------------------------------------------------------------------ |
- | |
2076 | align 4 |
- | |
2077 | ; DATA |
- | |
2078 | stripe: |
- | |
2079 | dd -0x010101 |
- | |
2080 | dd -0x010101 |
- | |
2081 | dd -0x020202 |
- | |
2082 | dd -0x010101 |
- | |
2083 | dd -0x000000 |
- | |
2084 | - | ||
2085 | dd 0x000000 |
- | |
2086 | dd 0x010101 |
- | |
2087 | dd 0x020202 |
- | |
2088 | dd 0x010101 |
- | |
2089 | dd 0x010101 |
- | |
2090 | - | ||
2091 | m_icon: |
- | |
2092 | dd 0x0 |
- | |
2093 | dd 0x808080 |
- | |
2094 | dd 0x000000 |
- | |
2095 | dd 0x000000 |
- | |
2096 | dd 0xffffff |
- | |
2097 | - | ||
2098 | - | ||
2099 | lsz m_text,\ |
- | |
2100 | ru, " ",\ |
- | |
2101 | en, "MENU",\ |
- | |
2102 | et, "MEN--" |
- | |
2103 | - | ||
2104 | mi_text db 'WAVETETRBGRDGPL ' |
- | |
2105 | - | ||
2106 | flag_text db 'EnFiGeRuFrEtUa' |
- | |
2107 | - | ||
2108 | type_lang db 0 |
- | |
2109 | - | ||
2110 | sound_flag db 0 |
- | |
2111 | button_frames dd 0x0 |
- | |
2112 | - | ||
2113 | checks dd -1 |
- | |
2114 | hidetext db 0x11,0x10,0x1e |
- | |
2115 | - | ||
2116 | turn_text db '><' |
- | |
2117 | gpl db 'GPL' |
- | |
2118 | - | ||
2119 | chlang db 'LANG',0 |
- | |
2120 | ;syslang db 'SLAN',0 |
- | |
2121 | - | ||
2122 | contrast db 0 |
- | |
2123 | - | ||
2124 | running_applications dd 0x100 |
- | |
2125 | max_applications dd 11 |
- | |
2126 | - | ||
2127 | current_alt_tab_app dd -1 |
- | |
2128 | - | ||
2129 | page_list dd 0 |
- | |
2130 | draw_start_position dd 0 |
- | |
2131 | draw_window_1 db 0 |
- | |
2132 | - | ||
2133 | b_size_y: dd 0x0 |
- | |
2134 | ysi dd 0 |
- | |
2135 | small_draw dd 0x0 |
- | |
2136 | - | ||
2137 | ptime dd 0x0 |
- | |
2138 | maxx dd 0x0 |
- | |
2139 | text db '0123456789' |
- | |
2140 | - | ||
2141 | page_a1 db '< >' |
- | |
2142 | page_clean_but db 25,24,18 |
- | |
2143 | - | ||
2144 | bte dd 0xccddee |
- | |
2145 | - | ||
2146 | wcolor dd 0x506070 |
- | |
2147 | - | ||
2148 | sec db ': ' |
- | |
2149 | pros db ' ' |
- | |
2150 | db ' ' |
- | |
2151 | - | ||
2152 | screenxy dd 0x0 |
- | |
2153 | stcount dd 0x0 |
- | |
2154 | - | ||
2155 | setup_exec: |
- | |
2156 | dd 7 |
- | |
2157 | dd 0 |
- | |
2158 | .cmdline dd 0 |
- | |
2159 | dd 0 |
- | |
2160 | dd 0 |
- | |
2161 | db '/sys/' |
- | |
2162 | file_sys db 'SETUP',0 |
- | |
2163 | - | ||
2164 | exec_fileinfo: |
- | |
2165 | dd 7 |
- | |
2166 | dd 0 |
- | |
2167 | dd 0 |
- | |
2168 | dd 0 |
- | |
2169 | dd 0 |
- | |
2170 | db 0 |
- | |
2171 | .name dd 0 |
- | |
2172 | - | ||
2173 | end_name db '/sys/END',0 |
- | |
2174 | menu_name db '/sys/@MENU',0 |
- | |
2175 | calendar_name db '/sys/CALENDAR',0 |
- | |
2176 | sysmeter_name db '/sys/GMON',0 |
- | |
2177 | mousemul_name db '/sys/MOUSEMUL',0 |
- | |
2178 | - | ||
2179 | dat_fileinfo: |
- | |
2180 | dd 0 |
- | |
2181 | dd 0 |
- | |
2182 | dd 0 |
- | |
2183 | dd 1024 |
- | |
2184 | dd I_END |
- | |
2185 | db '/sys/PANEL.DAT',0 |
- | |
2186 | - | ||
2187 | ;m_bmp_fileinfo: |
- | |
2188 | ; dd 0 |
- | |
2189 | ; dd 0 |
- | |
2190 | ; dd 0 |
- | |
2191 | ; dd 8192 |
- | |
2192 | ; dd image |
- | |
2193 | ; db '/sys/MENUET.BMP',0 |
- | |
2194 | - | ||
2195 | ;iconf_fileinfo: |
- | |
2196 | ; dd 0 |
- | |
2197 | ; dd 0 |
- | |
2198 | ; dd 0 |
- | |
2199 | ; dd 8192 |
- | |
2200 | ; dd image |
- | |
2201 | ; db '/sys/' |
- | |
2202 | ;iconf db 'MBAR_IX.BMP',0 |
- | |
2203 | - | ||
2204 | this_slot dd 0 ; Slot of this process |
- | |
2205 | max_slot dd 255 |
- | |
2206 | ;------------------------------------------------------------------------------ |
- | |
2207 | IM_END: |
- | |
2208 | ;------------------------------------------------------------------------------ |
- | |
2209 | align 4 |
- | |
2210 | last_active_window rd 1 |
- | |
2211 | prev_active_window rd 1 |
- | |
2212 | active_window_changed rd 1 |
- | |
2213 | app_tab_count rd 1 |
- | |
2214 | - | ||
2215 | alt_tab_list_size rd 1 |
- | |
2216 | - | ||
2217 | panel_x_pos rd 1 |
- | |
2218 | panel_y_pos rd 1 |
- | |
2219 | - | ||
2220 | screen_size: |
- | |
2221 | .height rw 1 |
- | |
2222 | .width rw 1 |
1103 | include 'libini.inc' |
2223 | ;------------------------------------------------------------------------------ |
1104 | ;------------------------------------------------------------------------------ |
2224 | align 4 |
- | |
2225 | system_colours system_colors ; rd 10 |
1105 | include 'dll.inc' |
2226 | ;------------------------------------------------------------------------------ |
- | |
2227 | align 4 |
1106 | ;------------------------------------------------------------------------------ |
2228 | app_list rd 50 |
1107 | include 'drawappl.inc' |
2229 | ;------------------------------------------------------------------------------ |
- | |
2230 | align 4 |
1108 | ;------------------------------------------------------------------------------ |
2231 | alt_tab_list rd 256*2 |
1109 | include 'drawbutt.inc' |
2232 | ;------------------------------------------------------------------------------ |
- | |
2233 | align 4 |
1110 | ;------------------------------------------------------------------------------ |
2234 | process_info_buffer: |
- | |
2235 | rb 1024 |
1111 | include 'drawwind.inc' |
2236 | ;------------------------------------------------------------------------------ |
- | |
2237 | align 4 |
1112 | ;------------------------------------------------------------------------------ |
2238 | procinfo_for_detect: |
- | |
2239 | rb 1024 |
1113 | include 'drawtray.inc' |
2240 | ;------------------------------------------------------------------------------ |
- | |
2241 | align 4 |
- | |
2242 | procinfo_window_tabs: |
- | |
2243 | rb 1024 |
- | |
2244 | ;----------------------------------------------------------------------------- |
- | |
2245 | align 4 |
- | |
2246 | tictable: |
- | |
2247 | rd 256 |
- | |
2248 | ;------------------------------------------------------------------------------ |
- | |
2249 | align 4 |
- | |
2250 | rb 256 |
1114 | ;------------------------------------------------------------------------------ |
2251 | detect_stack: |
1115 | include 'ctx_menu.asm' |
2252 | ;------------------------------------------------------------------------------ |
- | |
2253 | align 4 |
- | |
2254 | rb 256 |
1116 | ;------------------------------------------------------------------------------ |
2255 | ctx_menu_stack: |
1117 | include 'i_data.inc' |
2256 | ;------------------------------------------------------------------------------ |
- | |
2257 | align 4 |
- | |
2258 | rb 0x1000 |
1118 | ;------------------------------------------------------------------------------ |
2259 | stack_top: |
1119 | IM_END: |
2260 | ;------------------------------------------------------------------------------ |
1120 | ;------------------------------------------------------------------------------ |
2261 | ;align 4 |
- | |
2262 | ;image: |
1121 | include 'u_data.inc' |
2263 | ;------------------------------------------------------------------------------ |
1122 | ;------------------------------------------------------------------------------ |
2264 | I_END:>' |
1123 | I_END: |
- | 1124 | ;------------------------------------------------------------------------------0,9>0,9>>=> |