Rev 437 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
31 | halyavin | 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ; ; |
||
93 | diamond | 3 | ; MENUBAR for KolibriOS - Compile with fasm ; |
31 | halyavin | 4 | ; ; |
5 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
6 | |||
7 | use32 |
||
8 | org 0x0 |
||
9 | db 'MENUET01' ; 8 byte id |
||
93 | diamond | 10 | dd 0x01 ; header version |
51 | mikedld | 11 | dd START ; program start |
12 | dd I_END ; program image size |
||
93 | diamond | 13 | dd 0xA000 ; reguired amount of memory - 10 Kb |
51 | mikedld | 14 | dd 0xA000 ; esp |
15 | dd 0x0,0x0 ; param, icon |
||
31 | halyavin | 16 | |
17 | include 'lang.inc' |
||
18 | include 'macros.inc' |
||
19 | |||
51 | mikedld | 20 | width dd 305 |
21 | buttons dd 1 ; 0 no frames ; 1 frames |
||
22 | soften_up dd 1 ; 0 no ; 1 yes |
||
23 | soften_down dd 0 ; 0 no ; 1 yes |
||
24 | minimize_left dd 1 |
||
25 | minimize_right dd 1 |
||
26 | icons_position dd 95 |
||
27 | menu_enable dd 1 |
||
28 | setup_enable dd 0 |
||
29 | graph_text dd 1 |
||
30 | soften_middle dd 1 ; 0 no ; 1 yes |
||
31 | icons dd 1 ; 0 defaults ; 1 activate |
||
31 | halyavin | 32 | |
42 | mikedld | 33 | PANEL_HEIGHT = 18 |
31 | halyavin | 34 | |
93 | diamond | 35 | handle_key: |
31 | halyavin | 36 | |
37 | mcall 18, 7 |
||
38 | mov [active_process],eax |
||
39 | |||
93 | diamond | 40 | mcall 2 |
41 | cmp al, 2 |
||
42 | jnz begin_1.ret |
||
43 | mov ebx, exec_fileinfo |
||
44 | shr eax, 8 |
||
443 | diamond | 45 | cmp al, 15 |
46 | jz alt_tab_pressed |
||
93 | diamond | 47 | cmp al, 88 |
48 | jz start_end_application |
||
49 | cmp al, 91 |
||
50 | jz start_menu_application |
||
51 | cmp al, 92 |
||
52 | jz start_menu_application |
||
53 | cmp al, 62 |
||
54 | jz kill_active_application |
||
55 | cmp al, 71 |
||
56 | jz page_list_next |
||
57 | cmp al, 72 |
||
58 | jz page_list_prev |
||
443 | diamond | 59 | cmp [current_alt_tab_app], -1 |
60 | jz @f |
||
61 | test ah, 0x30 |
||
62 | jz alt_tab_released |
||
63 | @@: |
||
304 | diamond | 64 | ; this is hotkey Ctrl+Shift ;or LShift+RShift |
93 | diamond | 65 | mov ebx, setup_exec |
304 | diamond | 66 | ; test ah, 001100b |
67 | ; jz change_sys_lang |
||
68 | change_key_lang: |
||
69 | mov dword [ebx+8], chlang |
||
93 | diamond | 70 | mcall 70 |
304 | diamond | 71 | call chlang_music |
93 | diamond | 72 | ; mcall 5, 25 |
31 | halyavin | 73 | begin_1: |
74 | mov ecx,[active_process] |
||
75 | mcall 18, 3 |
||
76 | mcall 5, 25 |
||
93 | diamond | 77 | .ret: |
78 | ret |
||
79 | |||
304 | diamond | 80 | ;change_sys_lang: |
81 | ; mov dword [ebx+8], syslang |
||
82 | ; mcall 70 |
||
83 | ; call syslang_music |
||
84 | ;; mcall 5, 25 |
||
85 | ; jmp begin_1 |
||
93 | diamond | 86 | |
31 | halyavin | 87 | start_end_application: |
93 | diamond | 88 | mov dword [ebx+21], end_name |
89 | mcall 70 |
||
31 | halyavin | 90 | mcall 5 ,50 |
93 | diamond | 91 | jmp begin_1.ret |
31 | halyavin | 92 | |
93 | kill_active_application: |
||
94 | mcall 18, 7 |
||
95 | mov ecx,eax |
||
96 | ; mcall 9, area9 |
||
97 | ; mov eax,area9 |
||
98 | ; mov ecx,[eax+4] |
||
99 | mcall 18, 2 |
||
93 | diamond | 100 | jmp begin_1.ret |
101 | |||
31 | halyavin | 102 | start_menu_application: |
93 | diamond | 103 | mov [draw_window_1], 1 |
104 | mov dword [ebx+21], menu_name |
||
105 | mcall 70 |
||
106 | call menu_music |
||
31 | halyavin | 107 | mcall 5,50 |
93 | diamond | 108 | jmp begin_1.ret |
109 | |||
110 | page_list_next: |
||
51 | mikedld | 111 | cmp [page_list],15 |
112 | je @f |
||
113 | inc [page_list] |
||
114 | mov [draw_window_1],1 |
||
115 | @@: |
||
93 | diamond | 116 | jmp begin_1.ret |
51 | mikedld | 117 | |
93 | diamond | 118 | page_list_prev: |
51 | mikedld | 119 | cmp [page_list],0 |
120 | je @f |
||
121 | dec [page_list] |
||
122 | mov [draw_window_1],1 |
||
123 | @@: |
||
93 | diamond | 124 | jmp begin_1.ret |
51 | mikedld | 125 | |
443 | diamond | 126 | alt_tab_pressed: |
127 | ; handle Alt+Tab and Alt+Shift+Tab |
||
128 | mov ebp, eax |
||
129 | cmp [current_alt_tab_app], -1 |
||
130 | jnz has_alt_tab_app |
||
131 | ; заполняем таблицу приложений, подлежащих переключению |
||
132 | xor edx, edx |
||
133 | mov ebx, 0x8000 |
||
134 | mov ecx, 1 |
||
135 | mov eax, 9 |
||
136 | .fill: |
||
137 | inc ecx |
||
138 | int 0x40 |
||
139 | call need_window_tab |
||
140 | jz @f |
||
141 | cmp edx, 256 |
||
142 | jz @f |
||
143 | mov [alt_tab_list+edx*8], ecx |
||
144 | movzx esi, word [ebx+4] |
||
145 | mov [alt_tab_list+edx*8+4], esi |
||
146 | inc edx |
||
147 | @@: |
||
148 | cmp ecx, eax |
||
149 | mov eax, 9 |
||
150 | jb .fill |
||
151 | mov [alt_tab_list_size], edx |
||
152 | cmp edx, 2 |
||
153 | jb begin_1.ret |
||
154 | mcall 66,4,0,0 ; ловим момент отпускания всех управляющих клавиш |
||
155 | test eax, eax |
||
156 | jnz begin_1.ret |
||
157 | xor edx, edx |
||
158 | mov eax, [alt_tab_list+4] |
||
159 | xor ecx, ecx |
||
160 | inc ecx |
||
161 | .findmax: |
||
162 | cmp [alt_tab_list+ecx*8+4], eax |
||
163 | jb @f |
||
164 | mov edx, ecx |
||
165 | mov eax, [alt_tab_list+ecx*8+4] |
||
166 | @@: |
||
167 | inc ecx |
||
168 | cmp ecx, [alt_tab_list_size] |
||
169 | jb .findmax |
||
170 | mov [current_alt_tab_app], edx |
||
171 | has_alt_tab_app: |
||
172 | mov eax, [current_alt_tab_app] |
||
173 | mov edx, [alt_tab_list+eax*8+4] ; slot |
||
174 | xor ecx, ecx |
||
175 | or eax, -1 |
||
176 | test ebp, 300h |
||
177 | jz .notshift |
||
178 | or esi, -1 |
||
179 | .loop1: |
||
180 | cmp [alt_tab_list+ecx*8+4], edx |
||
181 | jbe @f |
||
182 | cmp [alt_tab_list+ecx*8+4], esi |
||
183 | jae @f |
||
184 | mov eax, ecx |
||
185 | mov esi, [alt_tab_list+ecx*8+4] |
||
186 | @@: |
||
187 | inc ecx |
||
188 | cmp ecx, [alt_tab_list_size] |
||
189 | jb .loop1 |
||
190 | cmp eax, -1 |
||
191 | jnz .found |
||
192 | xor edx, edx |
||
193 | xor ecx, ecx |
||
194 | jmp .loop1 |
||
195 | .notshift: |
||
196 | xor esi, esi |
||
197 | .loop2: |
||
198 | cmp [alt_tab_list+ecx*8+4], edx |
||
199 | jae @f |
||
200 | cmp [alt_tab_list+ecx*8+4], esi |
||
201 | jbe @f |
||
202 | mov eax, ecx |
||
203 | mov esi, [alt_tab_list+ecx*8+4] |
||
204 | @@: |
||
205 | inc ecx |
||
206 | cmp ecx, [alt_tab_list_size] |
||
207 | jb .loop2 |
||
208 | cmp eax, -1 |
||
209 | jnz .found |
||
210 | or edx, -1 |
||
211 | xor ecx, ecx |
||
212 | jmp .loop2 |
||
213 | .found: |
||
214 | mov [current_alt_tab_app], eax |
||
215 | push eax |
||
216 | xor edx, edx |
||
217 | div [max_applications] |
||
218 | mov [page_list], eax |
||
219 | mov [draw_window_1], 1 |
||
220 | mov edi, app_list |
||
221 | push edi |
||
222 | mov ecx, 20 |
||
223 | or eax, -1 |
||
224 | rep stosd |
||
225 | pop edi |
||
226 | pop ecx |
||
227 | sub ecx, edx |
||
228 | @@: |
||
229 | cmp ecx, [alt_tab_list_size] |
||
230 | jae redraw_window_tabs |
||
231 | mov eax, [alt_tab_list+ecx*8] |
||
232 | stosd |
||
233 | inc ecx |
||
234 | jmp @b |
||
235 | |||
236 | alt_tab_released: |
||
237 | mcall 66,5,0,0 ; уже поймали, хватит :) |
||
238 | or eax, -1 |
||
239 | xchg eax, [current_alt_tab_app] |
||
240 | mov ecx, [alt_tab_list+eax*8] |
||
241 | mov eax, 18 |
||
242 | mov ebx, 3 |
||
243 | int 0x40 |
||
244 | jmp redraw_window_tabs |
||
245 | |||
51 | mikedld | 246 | active_process dd 0 |
31 | halyavin | 247 | |
248 | calendar_music: |
||
249 | mcall 55, eax, , , calendarmusic |
||
250 | ret |
||
251 | setup_music: |
||
252 | mcall 55,eax, , ,setupmusic |
||
253 | ret |
||
254 | sysmeter_music: |
||
255 | mcall 55,eax, , ,sysmetermusic |
||
256 | ret |
||
257 | button_music: |
||
258 | mcall 55,eax, , ,buttonmusic |
||
259 | ret |
||
304 | diamond | 260 | ;syslang_music: |
261 | ; mcall 55, eax, , , syslangmusic |
||
262 | ; ret |
||
31 | halyavin | 263 | chlang_music: |
264 | mcall 55, eax, , , chlangmusic |
||
265 | ret |
||
266 | menu_music: |
||
267 | mcall 55,eax, , ,menumusic |
||
268 | ret |
||
269 | |||
51 | mikedld | 270 | chlangmusic: db 0x82,0x60,0x83,0x65,0x82,0x60,0 |
31 | halyavin | 271 | |
304 | diamond | 272 | ;syslangmusic: db 0x82,0x65,0x83,0x70,0x82,0x65,0 |
31 | halyavin | 273 | |
51 | mikedld | 274 | menumusic: db 0x82,0x50,0x84,0x48,0x82,0x50,0x84,0x53,0x82,0x51,0 |
31 | halyavin | 275 | |
51 | mikedld | 276 | activatemusic: db 0x83,0x30,0x85,0x60,0 |
31 | halyavin | 277 | |
51 | mikedld | 278 | buttonmusic: db 0x85,0x25,0x85,0x40,0 |
31 | halyavin | 279 | |
51 | mikedld | 280 | sysmetermusic: db 0x85,0x35,0x85,0x45,0 |
31 | halyavin | 281 | |
51 | mikedld | 282 | setupmusic: db 0x85,0x40,0x85,0x50,0 |
31 | halyavin | 283 | |
51 | mikedld | 284 | calendarmusic: db 0x85,0x37,0x85,0x48,0 |
31 | halyavin | 285 | |
286 | ; .exit: mcall -1 |
||
287 | |||
288 | |||
289 | START: |
||
93 | diamond | 290 | mcall 66,4,0,2 ; LShift+RShift |
291 | mcall 66, , ,11h ; Ctrl+Shift |
||
292 | mcall 66,,88,110h ; Alt+Ctrl+F12 |
||
293 | mcall 66,,91,100h ; Alt+LWin |
||
294 | mcall 66,,92 ; Alt+RWin |
||
295 | mcall 66,,62 ; Alt+F4 |
||
296 | mcall 66,,71 ; Alt+Home |
||
297 | mcall 66,,72 ; Alt+Up |
||
443 | diamond | 298 | mcall 66,,15 ; Alt+Tab |
299 | mcall 66,,,101h ; Alt+Shift+Tab |
||
93 | diamond | 300 | mcall 18, 8, 1 |
301 | test eax, eax |
||
302 | jne @f |
||
303 | mcall 18, 8, 2 |
||
304 | @@: |
||
305 | mov eax, 70 |
||
306 | mov ebx, dat_fileinfo |
||
307 | int 0x40 |
||
31 | halyavin | 308 | |
309 | mov edi,width |
||
310 | mov esi,I_END |
||
93 | diamond | 311 | xor eax,eax |
31 | halyavin | 312 | new_number: |
313 | cmp [esi],byte ';' |
||
51 | mikedld | 314 | je number_ready |
31 | halyavin | 315 | imul eax,10 |
316 | movzx ebx,byte [esi] |
||
317 | sub ebx,'0' |
||
318 | add eax,ebx |
||
319 | inc esi |
||
320 | jmp new_number |
||
321 | number_ready: |
||
93 | diamond | 322 | stosd |
323 | xor eax,eax |
||
31 | halyavin | 324 | inc esi |
325 | cmp [esi],byte 'x' |
||
326 | jne new_number |
||
327 | |||
51 | mikedld | 328 | mcall 14 |
329 | mov [screen_size],eax |
||
31 | halyavin | 330 | |
51 | mikedld | 331 | mcall 48,5 |
332 | mov ecx,eax |
||
333 | lea edx,[ebx-PANEL_HEIGHT-1] |
||
334 | mcall 48,6 |
||
335 | |||
31 | halyavin | 336 | call set_variables |
337 | |||
338 | start_after_minimize: |
||
339 | |||
340 | call draw_window |
||
341 | call draw_info |
||
342 | call draw_running_applications |
||
343 | |||
344 | mov eax, 23 |
||
345 | mov ebx, 30 |
||
346 | int 0x40 |
||
347 | |||
348 | still: |
||
349 | ; mcall 13,<390,70>,<3,11>,0xffffff |
||
350 | ; mov ecx,[button_presssed_alt] |
||
351 | ; mcall 47,0x80100,ecx ,400 shl 16+5,0 |
||
352 | |||
353 | call draw_info |
||
354 | call draw_running_applications |
||
355 | |||
356 | mov eax, 23 |
||
357 | mov ebx, 20 |
||
358 | int 0x40 |
||
359 | |||
51 | mikedld | 360 | cmp eax,1 ; redraw ? |
361 | jz red |
||
362 | cmp eax,3 ; button ? |
||
363 | jz button |
||
93 | diamond | 364 | call handle_key |
365 | jmp still |
||
31 | halyavin | 366 | |
51 | mikedld | 367 | red: ; redraw window |
368 | |||
369 | mcall 14 |
||
370 | movzx ecx,ax |
||
371 | mov edx,eax |
||
372 | shr edx,16 |
||
373 | cmp [screen_size.height],ax |
||
374 | jne @f |
||
375 | rol eax,16 |
||
376 | cmp [screen_size.width],ax |
||
377 | je .lp1 |
||
378 | rol eax,16 |
||
379 | @@: mov [screen_size],eax |
||
380 | sub ecx,PANEL_HEIGHT |
||
381 | mcall 67,0,,,PANEL_HEIGHT |
||
382 | |||
383 | .lp1: |
||
31 | halyavin | 384 | call draw_window |
385 | call draw_info |
||
386 | jmp still |
||
387 | |||
51 | mikedld | 388 | button: ; button |
31 | halyavin | 389 | mov eax,17 |
390 | int 0x40 |
||
391 | |||
392 | cmp ah,50 |
||
51 | mikedld | 393 | jb no_activate |
31 | halyavin | 394 | cmp ah,70 |
51 | mikedld | 395 | jg no_activate |
31 | halyavin | 396 | |
397 | movzx ecx,byte ah |
||
398 | sub ecx,52 |
||
399 | shl ecx,2 |
||
400 | |||
401 | mov eax,18 |
||
402 | mov ebx,3 |
||
403 | mov ecx,[app_list+ecx] |
||
404 | int 0x40 |
||
405 | ; cmp [music_type],0 |
||
406 | ; je still |
||
407 | mcall 55,eax, , ,activatemusic |
||
408 | jmp still |
||
409 | no_activate: |
||
410 | |||
411 | |||
51 | mikedld | 412 | cmp ah,101 ; minimize to left |
413 | je left_button |
||
31 | halyavin | 414 | |
51 | mikedld | 415 | cmp ah,102 ; minimize to right |
416 | je right_button |
||
31 | halyavin | 417 | |
51 | mikedld | 418 | cmp ah,byte 1 ; start/terminate menu |
31 | halyavin | 419 | jnz noselect |
420 | call menu_handler |
||
421 | ; cmp [music_type],0 |
||
422 | ; je still |
||
423 | call menu_music |
||
424 | jmp still |
||
425 | noselect: |
||
426 | |||
93 | diamond | 427 | mov ebx, exec_fileinfo |
51 | mikedld | 428 | cmp ah,byte 2 ; start calendar |
31 | halyavin | 429 | jnz noid15 ;noclock |
93 | diamond | 430 | mov dword [ebx+21], calendar_name |
431 | mov eax, 70 |
||
432 | int 0x40 |
||
31 | halyavin | 433 | call calendar_music |
434 | jmp still |
||
435 | |||
436 | noid15: |
||
437 | cmp ah,16 |
||
438 | jne noid16 |
||
93 | diamond | 439 | mov ebx, setup_exec |
440 | mov dword [ebx+8], chlang |
||
441 | mov eax, 70 |
||
442 | int 0x40 |
||
31 | halyavin | 443 | call chlang_music |
444 | mcall 5, 25 |
||
445 | jmp still |
||
446 | |||
447 | noid16: |
||
304 | diamond | 448 | ; cmp ah,17 |
449 | ; jne noid17 |
||
450 | ; mov ebx, setup_exec |
||
451 | ; mov dword [ebx+8], syslang |
||
452 | ; mov eax, 70 |
||
453 | ; int 0x40 |
||
454 | ; call syslang_music |
||
455 | ; mcall 5, 25 |
||
456 | ; jmp still |
||
457 | ; |
||
458 | ; noid17: |
||
31 | halyavin | 459 | cmp ah,18 |
460 | jne noid18 |
||
93 | diamond | 461 | mov dword [ebx+21], sysmeter_name |
462 | mov eax, 70 |
||
463 | int 0x40 |
||
31 | halyavin | 464 | call sysmeter_music |
465 | jmp still |
||
466 | |||
467 | noid18: |
||
468 | cmp ah,19 |
||
469 | jne noid19 |
||
470 | ; inc [music_type] |
||
471 | ; and [music_type],1 |
||
472 | mcall 18,8,2 |
||
473 | ; mcall 18,8 |
||
474 | ; mov [sound_flag],al |
||
475 | |||
476 | ; mcall 15,4,2 |
||
477 | mcall 15,3 |
||
478 | jmp red |
||
479 | |||
480 | noid19: |
||
51 | mikedld | 481 | cmp ah,20 ; start system setup |
31 | halyavin | 482 | jnz noid20 |
93 | diamond | 483 | mov ebx, setup_exec |
484 | and dword [ebx+8], 0 |
||
485 | mov eax, 70 |
||
486 | int 0x40 |
||
31 | halyavin | 487 | call setup_music |
93 | diamond | 488 | jmp still |
31 | halyavin | 489 | |
490 | noid20: |
||
51 | mikedld | 491 | cmp ah,21 |
492 | jnz noid21 |
||
493 | cmp [page_list],15 |
||
494 | je @f |
||
495 | inc [page_list] |
||
496 | jmp red |
||
497 | @@: |
||
498 | jmp still |
||
31 | halyavin | 499 | |
51 | mikedld | 500 | noid21: |
501 | cmp ah,22 |
||
502 | jnz noid22 |
||
503 | cmp [page_list],0 |
||
504 | je @f |
||
505 | dec [page_list] |
||
506 | jmp red |
||
507 | @@: |
||
31 | halyavin | 508 | jmp still |
509 | |||
51 | mikedld | 510 | noid22: |
31 | halyavin | 511 | |
51 | mikedld | 512 | jmp still |
31 | halyavin | 513 | |
51 | mikedld | 514 | |
515 | |||
31 | halyavin | 516 | draw_running_applications: |
517 | |||
518 | pusha |
||
519 | |||
520 | cmp [icons],1 |
||
521 | jne dr_ret |
||
522 | |||
523 | call calculate_applications |
||
524 | |||
525 | cmp edi,[running_applications] |
||
526 | jne noret |
||
527 | popa |
||
528 | ret |
||
529 | noret: |
||
530 | |||
531 | ; cmp edi,[running_applications] |
||
532 | ; jge no_application_decrease |
||
533 | call draw_window |
||
534 | ; no_application_decrease: |
||
535 | |||
536 | mov [running_applications],edi |
||
537 | |||
443 | diamond | 538 | call redraw_window_tabs |
31 | halyavin | 539 | |
443 | diamond | 540 | dr_ret: |
51 | mikedld | 541 | |
443 | diamond | 542 | popa |
31 | halyavin | 543 | |
443 | diamond | 544 | ret |
31 | halyavin | 545 | |
443 | diamond | 546 | need_window_tab: |
547 | ; in: ebx->process info |
||
548 | ; out: ZF set <=> do not draw |
||
549 | cmp byte [ebx+10], '@' |
||
550 | jz .nodraw |
||
551 | ; \begin{diamond}[29.03.2007] |
||
552 | ; do not draw undefined (zero-sized) windows |
||
553 | cmp dword [ebx+42], 0 |
||
554 | jnz @f |
||
555 | cmp dword [ebx+46], 0 |
||
556 | jz .nodraw |
||
557 | @@: |
||
558 | ; \end{diamond}[29.03.2007] |
||
559 | cmp dword [ebx+10], 'ICON' |
||
560 | jnz @f |
||
561 | cmp [ebx+42], dword 51 |
||
562 | jnz @f |
||
563 | cmp [ebx+46], dword 51 |
||
564 | jz .nodraw |
||
565 | @@: |
||
566 | cmp [ebx+10], dword ' ' |
||
567 | .nodraw: |
||
568 | ret |
||
31 | halyavin | 569 | |
443 | diamond | 570 | redraw_window_tabs: |
571 | xor edi, edi |
||
572 | mov [contrast], 0 |
||
573 | .loop: |
||
574 | mov ecx, [app_list+edi*4] |
||
575 | cmp ecx, -1 |
||
576 | jz .done |
||
31 | halyavin | 577 | |
443 | diamond | 578 | push ecx |
579 | mov eax, 9 |
||
580 | mov ebx, 0x8000 |
||
581 | int 0x40 |
||
31 | halyavin | 582 | |
443 | diamond | 583 | mov eax, 13 |
584 | imul ebx, edi, 6*10*10000h |
||
585 | add ebx, 6*10*10000h + 7*10000h + 54 |
||
586 | mov ecx, 3*10000h + 14 |
||
587 | xor edx, edx |
||
588 | int 0x40 |
||
589 | sub ebx, 10000h + 53 |
||
590 | mov ecx, 4*10000h + 12 |
||
591 | int 0x40 |
||
592 | sub ebx, 10000h |
||
593 | mov ecx, 5*10000h + 10 |
||
594 | int 0x40 |
||
595 | add ebx, 56*10000h |
||
596 | mov ecx, 4*10000h + 12 |
||
597 | int 0x40 |
||
598 | add ebx, 10000h |
||
599 | mov ecx, 5*10000h + 10 |
||
600 | int 0x40 |
||
31 | halyavin | 601 | |
443 | diamond | 602 | mov edx, 0x88FF |
603 | xor [contrast], 1 |
||
604 | jz @f |
||
605 | mov dh, 0x55 |
||
606 | @@: |
||
607 | pop ecx |
||
608 | mov esi, [current_alt_tab_app] |
||
609 | cmp esi, -1 |
||
610 | jz @f |
||
611 | cmp ecx, [alt_tab_list+esi*8] |
||
612 | jnz @f |
||
613 | ; xor edx, 0xFFFFFF |
||
614 | mov edx, 0xFF8000 |
||
615 | @@: |
||
616 | sub ebx, 55*10000h - 53 |
||
617 | mov ecx, 4*10000h + 12 |
||
618 | int 0x40 |
||
619 | sub ebx, 10000h + 53 |
||
620 | mov ecx, 5*10000h + 10 |
||
621 | int 0x40 |
||
622 | add ebx, 55*10000h |
||
623 | int 0x40 |
||
31 | halyavin | 624 | |
443 | diamond | 625 | mov eax, 4 |
626 | sub ebx, 51*10000h - 6 |
||
627 | mov ecx, 0xffffff ;[wcolor] |
||
628 | mov edx, 0x8000+10 |
||
629 | mov esi, 11 |
||
630 | int 0x40 |
||
31 | halyavin | 631 | |
443 | diamond | 632 | inc edi |
633 | cmp edi, [max_applications] |
||
634 | jb .loop |
||
635 | .done: |
||
636 | ret |
||
31 | halyavin | 637 | |
638 | calculate_applications: |
||
639 | |||
51 | mikedld | 640 | mov eax,[max_applications] |
93 | diamond | 641 | mul [page_list] |
642 | test eax,eax |
||
51 | mikedld | 643 | je @f |
644 | inc eax |
||
645 | @@: |
||
646 | mov [draw_start_position],eax |
||
647 | |||
31 | halyavin | 648 | mov edi,app_list |
649 | mov ecx,20 |
||
443 | diamond | 650 | mov eax,-1 |
31 | halyavin | 651 | cld |
652 | rep stosd |
||
653 | |||
654 | mov edi,0 |
||
655 | mov ecx,2 |
||
656 | |||
657 | cnewpr: |
||
658 | |||
659 | mov eax,9 |
||
660 | mov ebx,0x8000 |
||
661 | int 0x40 |
||
662 | |||
443 | diamond | 663 | call need_window_tab |
437 | diamond | 664 | jz cnorpl |
443 | diamond | 665 | sub [draw_start_position], 1 |
666 | jg cnorpl |
||
31 | halyavin | 667 | |
668 | mov [app_list+edi*4],ecx |
||
669 | |||
670 | inc edi |
||
671 | |||
672 | cnorpl: |
||
673 | inc ecx |
||
674 | |||
675 | cmp eax,ecx |
||
676 | jge cnewpr |
||
677 | |||
678 | ret |
||
679 | |||
680 | |||
681 | draw_application_buttons: |
||
682 | |||
683 | pusha |
||
684 | |||
685 | cmp [icons],1 |
||
686 | jne da_ret |
||
687 | |||
688 | mov eax,14 |
||
689 | int 0x40 |
||
690 | |||
691 | shr eax,16 |
||
692 | |||
693 | cmp eax,639 |
||
694 | jne now1 |
||
51 | mikedld | 695 | mov [max_applications],7 ;6 |
31 | halyavin | 696 | now1: |
697 | cmp eax,799 |
||
698 | jne now2 |
||
51 | mikedld | 699 | mov [max_applications],9 ;10 ;8 |
31 | halyavin | 700 | now2: |
701 | cmp eax,1023 |
||
702 | jne now3 |
||
51 | mikedld | 703 | mov [max_applications],12 ;13 ;8 |
31 | halyavin | 704 | now3: |
705 | cmp eax,1279 |
||
706 | jne now4 |
||
51 | mikedld | 707 | mov [max_applications],17 ;18 ;8 |
31 | halyavin | 708 | now4: |
709 | mov edi,1 |
||
710 | |||
711 | nb: |
||
712 | |||
713 | mov eax,8 |
||
714 | mov ebx,edi |
||
715 | shl ebx,16 |
||
51 | mikedld | 716 | imul ebx,6*10 ;13 |
31 | halyavin | 717 | add ebx,15*65536+10*6-1 ;13 |
718 | mov ecx,1*65536+17 |
||
719 | mov edx,edi |
||
720 | add edx,51 |
||
721 | cmp [buttons],1 |
||
51 | mikedld | 722 | je bufr |
723 | or edx,0x60000000 |
||
31 | halyavin | 724 | bufr: |
725 | mov esi,[wcolor] |
||
726 | sub ebx,11 shl 16 |
||
727 | int 0x40 |
||
728 | |||
729 | inc edi |
||
730 | cmp edi,[max_applications] |
||
731 | jbe nb |
||
732 | |||
733 | da_ret: |
||
734 | |||
735 | popa |
||
736 | |||
737 | ret |
||
738 | |||
739 | |||
740 | menu_handler: |
||
93 | diamond | 741 | mov eax, 70 |
742 | mov ebx, exec_fileinfo |
||
743 | mov dword [ebx+21], menu_name |
||
744 | int 0x40 |
||
745 | ret |
||
31 | halyavin | 746 | |
747 | draw_small_right: |
||
748 | |||
749 | pusha |
||
750 | |||
751 | mov eax,12 |
||
752 | mov ebx,1 |
||
753 | int 0x40 |
||
754 | |||
755 | mov eax,0 |
||
756 | mov edx,[wcolor] |
||
757 | mov esi,edx |
||
758 | mov edi,edx |
||
51 | mikedld | 759 | or edx, 0x01000000 |
31 | halyavin | 760 | int 0x40 |
761 | |||
762 | mov eax,8 |
||
763 | mov ebx,0*65536+9 |
||
764 | mov ecx,0*65536 |
||
765 | mov cx,[b_size_y] |
||
766 | mov edx,1 |
||
767 | mov esi,[wcolor] |
||
768 | int 0x40 |
||
769 | |||
770 | mov eax,4 |
||
771 | mov ebx,2*65536+16 |
||
772 | cmp [graph_text],1 |
||
773 | jne nos3 |
||
774 | mov ebx,2*65536+7 |
||
775 | nos3: |
||
776 | mov ecx,[wcolor] |
||
777 | add ecx,0x303030 |
||
778 | mov edx,hidetext |
||
779 | mov esi,1 |
||
780 | int 0x40 |
||
781 | |||
782 | mov eax,12 |
||
783 | mov ebx,2 |
||
784 | int 0x40 |
||
785 | |||
786 | popa |
||
787 | |||
788 | ret |
||
789 | |||
790 | |||
791 | |||
792 | draw_small_left: |
||
793 | |||
794 | pusha |
||
795 | |||
796 | mov eax,12 |
||
797 | mov ebx,1 |
||
798 | int 0x40 |
||
799 | |||
800 | mov eax,0 |
||
801 | mov edx,[wcolor] |
||
802 | mov esi,edx |
||
803 | mov edi,edx |
||
51 | mikedld | 804 | or edx, 0x01000000 |
31 | halyavin | 805 | int 0x40 |
806 | |||
807 | cmp [graph_text],1 |
||
51 | mikedld | 808 | je nos4 |
31 | halyavin | 809 | |
810 | mov eax,8 |
||
811 | mov ebx,0*65536+9 |
||
812 | mov ecx,0*65536+18-6 |
||
813 | mov edx,2 |
||
814 | mov esi,[wcolor] |
||
815 | int 0x40 |
||
816 | |||
817 | mov eax,4 |
||
818 | mov ebx,2*65536+4 |
||
819 | mov ecx,[wcolor] |
||
820 | add ecx,0x303030 |
||
821 | mov edx,hidetext+2 |
||
822 | mov esi,1 |
||
823 | int 0x40 |
||
824 | |||
825 | nos4: |
||
826 | |||
827 | mov eax,8 |
||
828 | mov ebx,0*65536+9 |
||
829 | mov ecx,13*65536+25 |
||
830 | cmp [graph_text],1 |
||
831 | jne nos6 |
||
832 | mov ecx,0*65536 |
||
833 | mov cx,word [b_size_y] |
||
834 | nos6: |
||
835 | mov edx,1 |
||
836 | mov esi,[wcolor] |
||
837 | int 0x40 |
||
838 | |||
839 | mov eax,4 |
||
840 | mov ebx,3*65536+22 |
||
841 | cmp [graph_text],1 |
||
842 | jne nos7 |
||
843 | mov ebx,3*65536+7 |
||
844 | nos7: |
||
845 | mov ecx,[wcolor] |
||
846 | add ecx,0x303030 |
||
847 | mov edx,hidetext+1 |
||
848 | mov esi,1 |
||
849 | int 0x40 |
||
850 | |||
851 | mov eax,12 |
||
852 | mov ebx,2 |
||
853 | int 0x40 |
||
854 | |||
855 | popa |
||
856 | ret |
||
857 | |||
858 | |||
859 | ;------------------------------------------------- |
||
860 | |||
861 | right_button: |
||
862 | |||
863 | call button_music |
||
864 | |||
865 | mov [small_draw],dword draw_small_right |
||
866 | |||
867 | mcall 14 |
||
868 | shr eax, 16 |
||
869 | mov ebx, eax |
||
870 | mov ecx, -1 |
||
871 | mov edx, 9 |
||
872 | sub ebx, edx |
||
873 | mov esi, -1 |
||
874 | mcall 67 |
||
875 | |||
876 | call draw_small_right |
||
877 | |||
878 | jmp small_wait |
||
879 | |||
880 | ;------------------------------------------------- |
||
881 | |||
882 | left_button: |
||
883 | |||
884 | call button_music |
||
885 | |||
886 | mov [small_draw],dword draw_small_left |
||
887 | |||
888 | mov ebx, 0 |
||
889 | mov edx, 9 |
||
890 | mov ecx, -1 |
||
891 | mov esi, -1 |
||
892 | mcall 67 |
||
893 | |||
894 | call draw_small_left |
||
895 | |||
896 | ;------------------------------------------------- |
||
897 | |||
898 | small_wait: |
||
899 | |||
900 | mov eax, 10 |
||
901 | int 0x40 |
||
902 | |||
903 | cmp eax,1 |
||
904 | jne no_win |
||
905 | call [small_draw] |
||
906 | jmp small_wait |
||
907 | no_win: |
||
93 | diamond | 908 | cmp eax,2 |
909 | jne no_key |
||
910 | call handle_key |
||
911 | jmp small_wait |
||
912 | no_key: |
||
31 | halyavin | 913 | |
914 | mov eax,17 |
||
915 | int 0x40 |
||
916 | |||
917 | cmp ah,1 |
||
918 | jne no_full |
||
919 | |||
51 | mikedld | 920 | mov eax, 14 ; get screen max x & max y |
31 | halyavin | 921 | int 0x40 |
922 | mov edx, eax |
||
923 | shr edx, 16 |
||
50 | halyavin | 924 | xor ebx, ebx |
31 | halyavin | 925 | mov ecx, -1 |
926 | mov esi, -1 |
||
927 | mcall 67 ; x0 y0 xs ys |
||
928 | |||
929 | call button_music |
||
930 | |||
931 | jmp still |
||
932 | |||
933 | |||
934 | no_full: |
||
935 | |||
936 | call menu_handler |
||
937 | |||
938 | jmp small_wait |
||
939 | |||
940 | |||
941 | |||
942 | set_variables: |
||
943 | |||
944 | pusha |
||
945 | |||
946 | mov [b_size_y],dword 38 |
||
947 | cmp [graph_text],1 |
||
948 | jne noy2 |
||
949 | mov [b_size_y],dword 18 |
||
950 | noy2: |
||
951 | |||
952 | mov [button_frames],0x0 |
||
953 | cmp [buttons],0 |
||
954 | jne no_frames |
||
955 | mov [button_frames],0x40000000 |
||
956 | no_frames: |
||
957 | |||
958 | |||
51 | mikedld | 959 | mov eax,48 ; 3d button look |
31 | halyavin | 960 | mov ebx,1 |
961 | mov ecx,1 |
||
962 | int 0x40 |
||
963 | |||
964 | mov eax,0x40404040 ; dividers for processes |
||
965 | mov edi,pros |
||
966 | mov ecx,10 |
||
967 | cld |
||
968 | rep stosd |
||
969 | |||
970 | popa |
||
971 | ret |
||
972 | |||
973 | |||
974 | |||
975 | ; eax = number (1 or 2) |
||
976 | ; ebx = language id |
||
977 | draw_flag: |
||
978 | pusha |
||
979 | |||
980 | ; cmp [graph_text],0 |
||
981 | ; je mini_flag |
||
982 | |||
983 | ; eax = 2 BIG |
||
984 | ; eax = 1 small |
||
985 | |||
986 | mov edx,ebx |
||
987 | |||
988 | mov ebx,[maxx] |
||
989 | and eax,1 |
||
990 | imul eax,17 ;17 |
||
991 | sub ebx,eax |
||
992 | sub ebx,76 ;79 ;28 |
||
993 | |||
994 | pushad |
||
995 | ; dec ebx |
||
996 | sub ebx,2 |
||
997 | shl ebx, 16 |
||
998 | add ebx, 15 ;25 |
||
999 | mov ecx, 4*65536+13 |
||
1000 | mov edx,0 |
||
1001 | mov eax,13 |
||
1002 | int 0x40 |
||
1003 | add ebx,1 shl 16 |
||
1004 | sub ebx,2 |
||
1005 | mov ecx, 5 shl 16+11 |
||
1006 | cmp [type_lang],1 |
||
51 | mikedld | 1007 | je label_1 |
31 | halyavin | 1008 | mov edx,0xff ;[wcolor] |
1009 | jmp label_2 |
||
1010 | label_1: |
||
1011 | mov edx,0x7700 |
||
1012 | label_2: |
||
1013 | mov eax, 13 |
||
1014 | int 0x40 |
||
1015 | popad |
||
1016 | |||
1017 | shl ebx,16 |
||
51 | mikedld | 1018 | add ebx,7 ;24 |
31 | halyavin | 1019 | |
1020 | mov ecx,[bte] ; color |
||
1021 | |||
1022 | dec edx |
||
1023 | shl edx,1 |
||
1024 | add edx,flag_text |
||
1025 | mov esi,2 |
||
1026 | mov eax,4 |
||
1027 | int 0x40 |
||
1028 | |||
1029 | mov ebx,[maxx] |
||
1030 | sub ebx,48 |
||
1031 | shl ebx,16 |
||
1032 | mov bx,34 |
||
1033 | mov ecx,3 shl 16+14 |
||
1034 | xor edx,edx |
||
1035 | mov eax,13 |
||
1036 | int 0x40 |
||
1037 | add ebx,1 shl 16 |
||
1038 | sub ebx,2 |
||
1039 | mov ecx,4 shl 16+12 |
||
1040 | mov edx,0x66cc |
||
1041 | int 0x40 |
||
1042 | |||
1043 | popa |
||
1044 | ret |
||
1045 | |||
1046 | ;mini_flag: |
||
1047 | ; popa |
||
1048 | ; ret |
||
1049 | |||
1050 | |||
1051 | |||
1052 | |||
1053 | ; *************************************************** |
||
1054 | ; ********* WINDOW DEFINITIONS AND DRAW ************* |
||
1055 | ; *************************************************** |
||
1056 | |||
1057 | |||
1058 | draw_window: |
||
1059 | |||
1060 | pusha |
||
1061 | |||
1062 | mov [running_applications],-1 |
||
1063 | mov [checks],-1 |
||
1064 | |||
51 | mikedld | 1065 | mov eax, 12 ; tell os about redraw |
31 | halyavin | 1066 | mov ebx, 1 |
1067 | int 0x40 |
||
1068 | |||
1069 | mov eax, 48 |
||
1070 | mov ebx, 3 |
||
1071 | mov ecx, system_colours |
||
1072 | mov edx, 10*4 |
||
1073 | int 0x40 |
||
1074 | |||
1075 | mov eax, [system_colours+4*6] |
||
318 | heavyiron | 1076 | sub eax, 0x101010 |
31 | halyavin | 1077 | mov [wcolor], eax |
1078 | |||
51 | mikedld | 1079 | mov eax,14 ; get screen max x & max y |
31 | halyavin | 1080 | int 0x40 |
1081 | |||
1082 | cmp [width],0 |
||
51 | mikedld | 1083 | je no_def_width |
31 | halyavin | 1084 | and eax,0xffff |
1085 | mov ebx,[width] |
||
1086 | shl ebx,16 |
||
1087 | add eax,ebx |
||
1088 | no_def_width: |
||
1089 | |||
1090 | mov ebx,eax |
||
1091 | mov [screenxy],ebx |
||
1092 | shr ebx,16 |
||
1093 | sub ax,38 |
||
1094 | shl eax,16 |
||
1095 | mov ecx,eax |
||
1096 | add ecx,0*65536+38 |
||
1097 | cmp [graph_text],1 |
||
1098 | jne no_text_1 |
||
42 | mikedld | 1099 | mov cx,PANEL_HEIGHT |
31 | halyavin | 1100 | add ecx,20*65536 |
1101 | no_text_1: |
||
51 | mikedld | 1102 | mov eax, 0 ; DEFINE AND DRAW WINDOW |
31 | halyavin | 1103 | mov edx, [wcolor] |
51 | mikedld | 1104 | or edx, 0x01000000 ; do not draw the window |
31 | halyavin | 1105 | mov esi, [wcolor] |
51 | mikedld | 1106 | or esi, 0x01000000 ; unmovable window |
31 | halyavin | 1107 | mov edi, [wcolor] |
1108 | int 0x40 |
||
1109 | |||
1110 | movzx ebx,word [screenxy+2] |
||
1111 | mov ecx,0*65536+0 |
||
1112 | mov edx,[wcolor] |
||
1113 | add edx,0x161616 |
||
1114 | newline: |
||
1115 | sub edx,0x040404 |
||
1116 | mov eax,38 |
||
1117 | cmp [soften_up],1 |
||
1118 | jne no_su |
||
51 | mikedld | 1119 | and edx,0x00FFFFFF |
31 | halyavin | 1120 | int 0x40 |
1121 | no_su: |
||
1122 | |||
1123 | pusha |
||
1124 | cmp [soften_down],1 |
||
1125 | jne no_sd |
||
1126 | sub edx,0x141414 |
||
1127 | mov edi,[b_size_y] |
||
1128 | shl edi,16 |
||
1129 | add edi,[b_size_y] |
||
1130 | add ecx,edi |
||
1131 | sub ecx,3*65536+3 |
||
51 | mikedld | 1132 | and edx,0x00FFFFFF |
31 | halyavin | 1133 | int 0x40 |
1134 | no_sd: |
||
1135 | popa |
||
1136 | |||
1137 | add ecx,1*65536+1 |
||
1138 | cmp cx,5 |
||
51 | mikedld | 1139 | jb newline |
31 | halyavin | 1140 | |
1141 | cmp [soften_middle],1 |
||
1142 | jne no_sm |
||
1143 | |||
1144 | movzx ebx,word [screenxy+2] |
||
1145 | mov ecx,5*65536+5 |
||
1146 | mov esi,stripe |
||
1147 | mov edx,[wcolor] |
||
1148 | newline3: |
||
1149 | add edx,[esi] |
||
1150 | add esi,4 |
||
1151 | |||
1152 | mov eax,38 |
||
51 | mikedld | 1153 | and edx,0x00FFFFFF |
31 | halyavin | 1154 | int 0x40 |
1155 | add ecx,1*65536+1 |
||
1156 | cmp cx,15 |
||
51 | mikedld | 1157 | jb newline3 |
31 | halyavin | 1158 | |
1159 | no_sm: |
||
1160 | |||
1161 | cmp [minimize_left],1 |
||
1162 | jne no_mleft |
||
51 | mikedld | 1163 | mov eax,8 ; ABS LEFT |
31 | halyavin | 1164 | mov ebx,0 *65536+9 |
1165 | mov ecx,1 *65536 |
||
1166 | add ecx,[b_size_y] |
||
1167 | dec ecx |
||
1168 | mov edx,101 |
||
1169 | add edx,[button_frames] |
||
1170 | mov esi,[wcolor] |
||
1171 | int 0x40 |
||
51 | mikedld | 1172 | mov eax,4 ; HIDE TEXT |
31 | halyavin | 1173 | mov ebx,2*65536+17 |
1174 | cmp [graph_text],1 |
||
1175 | jne no_y1 |
||
1176 | mov bx,7 |
||
1177 | no_y1: |
||
1178 | mov ecx,[wcolor] |
||
1179 | add ecx,0x303030 |
||
1180 | mov edx,hidetext |
||
1181 | mov esi,1 |
||
1182 | int 0x40 |
||
1183 | no_mleft: |
||
1184 | |||
1185 | movzx eax,word [screenxy+2] |
||
1186 | mov [maxx],eax |
||
1187 | |||
1188 | cmp [minimize_right],1 |
||
1189 | jne no_mright |
||
1190 | mov eax,[maxx] |
||
1191 | sub eax,77 |
||
1192 | shl eax,16 |
||
1193 | mov ebx,eax |
||
1194 | add ebx,67 |
||
51 | mikedld | 1195 | mov eax,8 ; ABS RIGHT |
31 | halyavin | 1196 | mov ecx,1 *65536 |
1197 | add ecx,[b_size_y] |
||
1198 | dec ecx |
||
1199 | add ebx,68*65536 |
||
1200 | mov bx,9 |
||
1201 | mov edx,102 |
||
1202 | add edx,[button_frames] |
||
1203 | mov esi,[wcolor] |
||
1204 | int 0x40 |
||
1205 | mov edx,hidetext+1 |
||
1206 | mov eax,4 |
||
1207 | mov ebx,[maxx] |
||
1208 | sub ebx,6 |
||
1209 | shl ebx,16 |
||
1210 | mov bx,17 |
||
1211 | cmp [graph_text],1 |
||
1212 | jne no_y2 |
||
1213 | mov bx,7 |
||
1214 | no_y2: |
||
1215 | mov ecx,[wcolor] |
||
1216 | add ecx,0x303030 |
||
1217 | mov esi,1 |
||
1218 | int 0x40 |
||
1219 | no_mright: |
||
1220 | |||
1221 | call draw_menuet_icon |
||
1222 | |||
1223 | call draw_program_icons |
||
1224 | |||
1225 | mov [ptime],0 |
||
1226 | call draw_info |
||
1227 | |||
1228 | call draw_application_buttons |
||
1229 | |||
1230 | ; mov ecx,[button_presssed_alt] |
||
1231 | ; mcall 47,0x80100,ecx ,400 shl 16+5,0 |
||
1232 | |||
1233 | mov eax,12 |
||
1234 | mov ebx,2 |
||
1235 | int 0x40 |
||
1236 | |||
1237 | popa |
||
1238 | ret |
||
1239 | |||
1240 | |||
1241 | |||
1242 | draw_menuet_icon: |
||
1243 | |||
1244 | pusha |
||
1245 | |||
1246 | cmp [menu_enable],1 |
||
1247 | jne no_menu |
||
1248 | |||
1249 | |||
51 | mikedld | 1250 | mov eax, 8 ; M BUTTON |
31 | halyavin | 1251 | mov ebx, 10*65536 + 47 |
1252 | cmp [minimize_left], 0 |
||
1253 | jne @f |
||
1254 | sub ebx, 10*65536 |
||
1255 | @@: |
||
1256 | mov ecx, 1*65536 |
||
1257 | add ecx, [b_size_y] |
||
1258 | dec ecx |
||
1259 | mov edx, 0x20000001 |
||
1260 | add edx, [button_frames] |
||
1261 | mov esi, [wcolor] |
||
1262 | int 0x40 |
||
1263 | |||
1264 | cmp [graph_text], 1 |
||
1265 | jne no_mtext |
||
1266 | |||
1267 | push ebx |
||
1268 | mov eax,13 |
||
1269 | mov ebx,12 shl 16+44 ;51 |
||
1270 | mov ecx,1 shl 16+17 |
||
1271 | xor edx,edx |
||
1272 | int 0x40 |
||
1273 | ; mov ebx,63 shl 16+1 |
||
1274 | mov ebx,56 shl 16+1 |
||
1275 | mov ecx,2 shl 16+15 |
||
1276 | int 0x40 |
||
1277 | mov ebx,57 shl 16+1 |
||
1278 | mov ecx,4 shl 16+11 |
||
1279 | int 0x40 |
||
1280 | mov ebx,58 shl 16+1 |
||
51 | mikedld | 1281 | mov ecx,6 shl 16+7 |
31 | halyavin | 1282 | int 0x40 |
1283 | ; mov ebx,66 shl 16+1 |
||
1284 | ; mov ecx,9 shl 16+1 |
||
1285 | ; int 0x40 |
||
1286 | mov ebx,13 shl 16+43 ;50 |
||
1287 | mov ecx,2 shl 16+15 |
||
1288 | mov edx,0x7700 |
||
1289 | int 0x40 |
||
1290 | ; mov ebx,62 shl 16+1 |
||
1291 | ; mov ecx,3 shl 16+14 |
||
1292 | ; int 0x40 |
||
1293 | mov ebx,56 shl 16+1 |
||
1294 | mov ecx,4 shl 16+11 |
||
1295 | int 0x40 |
||
1296 | mov ebx,57 shl 16+1 |
||
1297 | mov ecx,6 shl 16+7 |
||
1298 | int 0x40 |
||
1299 | pop ebx |
||
1300 | |||
1301 | mov eax, 4 |
||
1302 | mov bx, 7 |
||
1303 | add ebx, 8*65536 |
||
1304 | mov ecx, 0x10ffffff |
||
1305 | mov edx, m_text |
||
1306 | mov esi, 4 |
||
1307 | int 0x40 |
||
1308 | |||
1309 | popa |
||
1310 | ret |
||
1311 | |||
1312 | no_mtext: |
||
1313 | |||
1314 | |||
1315 | |||
1316 | mov eax,[wcolor] |
||
1317 | mov [m_icon+4],eax |
||
1318 | |||
93 | diamond | 1319 | ; load & display menuet.bmp |
1320 | mov eax, 70 |
||
1321 | mov ebx, m_bmp_fileinfo |
||
1322 | int 0x40 |
||
31 | halyavin | 1323 | |
1324 | mov eax,40 |
||
1325 | mov ebx,0 |
||
1326 | mov edi,image+53 |
||
1327 | |||
1328 | new_m_pix: |
||
1329 | |||
1330 | ; movzx ecx,byte [edi] |
||
1331 | ; shr ecx,5 |
||
1332 | |||
93 | diamond | 1333 | cmp byte [edi], 10 |
51 | mikedld | 1334 | jb nopix |
93 | diamond | 1335 | cmp byte [edi+1], 10 |
51 | mikedld | 1336 | jb nopix |
93 | diamond | 1337 | cmp byte [edi+2], 10 |
51 | mikedld | 1338 | jb nopix |
31 | halyavin | 1339 | |
1340 | pusha |
||
1341 | cmp [minimize_left],0 |
||
1342 | jne no_m_s2 |
||
1343 | sub ebx,10 |
||
1344 | no_m_s2: |
||
1345 | ; mov edx,[ecx*4+m_icon] |
||
1346 | mov edx,[edi+1] |
||
1347 | |||
1348 | mov ecx,eax |
||
1349 | mov eax,1 |
||
1350 | add ebx,12 |
||
1351 | int 0x40 |
||
1352 | popa |
||
1353 | |||
1354 | nopix: |
||
1355 | |||
1356 | add edi,3 |
||
1357 | add ebx,1 |
||
1358 | cmp ebx,40 |
||
1359 | jnz new_m_pix |
||
1360 | |||
1361 | mov ebx,0 |
||
1362 | dec eax |
||
1363 | jnz new_m_pix |
||
1364 | |||
1365 | no_menu: |
||
1366 | |||
1367 | popa |
||
1368 | ret |
||
1369 | |||
1370 | |||
1371 | draw_program_icons: |
||
1372 | |||
1373 | pusha |
||
1374 | |||
1375 | cmp [icons],0 |
||
1376 | jne dp_ret |
||
1377 | |||
1378 | mov edi,1 |
||
1379 | push edi |
||
1380 | |||
1381 | new_icon_file: |
||
1382 | |||
1383 | pusha |
||
1384 | mov edx,[esp+32] |
||
1385 | add edx,10 |
||
1386 | push edx |
||
1387 | mov esi,[wcolor] |
||
1388 | mov ecx,1*65536 |
||
1389 | add ecx,[b_size_y] |
||
1390 | dec ecx |
||
1391 | mov eax,edi |
||
1392 | dec eax |
||
1393 | imul eax,40 |
||
1394 | mov ebx,eax |
||
1395 | add ebx,[icons_position] |
||
1396 | shl ebx,16 |
||
1397 | mov bx,39 |
||
1398 | pop edx |
||
1399 | add edx,[button_frames] |
||
51 | mikedld | 1400 | or edx, 0x20000000 |
31 | halyavin | 1401 | mov eax,8 |
1402 | int 0x40 |
||
1403 | popa |
||
1404 | |||
1405 | mov ecx,[esp] |
||
1406 | add ecx,48 |
||
1407 | mov [iconf+6],cl |
||
1408 | |||
93 | diamond | 1409 | mov eax, 70 |
1410 | mov ebx, iconf_fileinfo |
||
1411 | int 0x40 |
||
31 | halyavin | 1412 | |
1413 | mov eax,0 |
||
1414 | mov ebx,32 |
||
1415 | mov edi,image+51+32*33*3 |
||
1416 | |||
51 | mikedld | 1417 | np2: ; new pixel of file |
31 | halyavin | 1418 | |
1419 | mov edx,[edi] |
||
1420 | and edx,0xffffff |
||
1421 | |||
51 | mikedld | 1422 | cmp eax,3 ; Y draw limits |
1423 | jb nopix2 |
||
31 | halyavin | 1424 | cmp eax,36 |
51 | mikedld | 1425 | jg nopix2 |
1426 | cmp ebx,38 ; X draw limits |
||
1427 | jg nopix2 |
||
31 | halyavin | 1428 | cmp ebx,2 |
51 | mikedld | 1429 | jb nopix2 |
31 | halyavin | 1430 | |
1431 | cmp edx,0 |
||
51 | mikedld | 1432 | jz nopix2 |
31 | halyavin | 1433 | |
1434 | cmp [graph_text],1 |
||
1435 | jne no_icon_text |
||
1436 | |||
1437 | pusha |
||
1438 | |||
1439 | mov ebx,[esp+32] |
||
1440 | dec ebx |
||
1441 | imul ebx,40 |
||
1442 | add ebx,8 |
||
1443 | add ebx,[icons_position] |
||
1444 | shl ebx,16 |
||
1445 | mov bx,7 |
||
1446 | |||
1447 | mov eax,4 |
||
1448 | mov ecx,0xffffff |
||
1449 | mov edx,[esp+32] |
||
1450 | dec edx |
||
1451 | imul edx,4 |
||
1452 | add edx,mi_text |
||
1453 | mov esi,4 |
||
1454 | int 0x40 |
||
1455 | |||
1456 | popa |
||
1457 | |||
1458 | jmp nopix2 |
||
1459 | |||
1460 | no_icon_text: |
||
1461 | |||
1462 | mov esi,[esp] |
||
1463 | pusha |
||
1464 | push edx |
||
1465 | mov ecx,eax |
||
1466 | add ecx,2 |
||
1467 | mov eax,esi |
||
1468 | dec eax |
||
1469 | imul eax,40 |
||
1470 | add ebx,eax |
||
1471 | add ebx,3 |
||
1472 | add ebx,[icons_position] |
||
1473 | pop edx |
||
1474 | mov eax,1 |
||
1475 | int 0x40 |
||
1476 | popa |
||
1477 | |||
1478 | nopix2: |
||
1479 | |||
1480 | sub edi,3 |
||
1481 | dec ebx |
||
1482 | jnz np2 |
||
1483 | |||
1484 | mov ebx,32 |
||
1485 | add eax,1 |
||
1486 | cmp eax,32 |
||
1487 | jnz np2 |
||
1488 | |||
1489 | add dword [esp],1 |
||
1490 | mov edi,[esp] |
||
1491 | cmp dword [esp],4 |
||
1492 | jbe new_icon_file |
||
1493 | add esp,4 |
||
1494 | |||
1495 | mov eax,4 |
||
1496 | mov ebx,40 |
||
1497 | imul ebx,3 |
||
1498 | add ebx,[icons_position] |
||
1499 | add ebx,10 |
||
1500 | shl ebx,16 |
||
1501 | mov bx,23 |
||
1502 | mov ecx,[wcolor] |
||
1503 | mov edx,gpl |
||
1504 | mov esi,3 |
||
1505 | int 0x40 |
||
1506 | |||
1507 | dp_ret: |
||
1508 | |||
1509 | popa |
||
1510 | ret |
||
1511 | |||
1512 | |||
1513 | |||
1514 | draw_info: ; draw cpu usage, time, date |
||
1515 | |||
1516 | pusha |
||
1517 | |||
1518 | cmp [setup_enable],1 |
||
1519 | jne no_setup |
||
1520 | |||
1521 | cmp [minimize_right],0 |
||
1522 | jne no_m_r |
||
1523 | add [maxx],10 |
||
1524 | |||
1525 | no_m_r: |
||
1526 | |||
1527 | mov eax,3 |
||
1528 | int 0x40 |
||
1529 | cmp eax,[ptime] |
||
51 | mikedld | 1530 | jz _ret |
31 | halyavin | 1531 | mov [ptime],eax |
1532 | |||
1533 | call draw_cpu_usage |
||
1534 | |||
1535 | mov eax,[maxx] ; blink sec |
||
1536 | sub eax,33 |
||
1537 | shl eax,16 |
||
1538 | mov ebx,eax |
||
1539 | add ebx,9 |
||
1540 | mov eax,3 |
||
1541 | int 0x40 |
||
1542 | cmp [graph_text],1 |
||
1543 | jne no_y4 |
||
1544 | sub bx,2 |
||
1545 | no_y4: |
||
1546 | mov ecx,eax |
||
1547 | shr ecx,16 |
||
1548 | and ecx,1 |
||
1549 | mov edx,[bte] |
||
1550 | sub edx,[wcolor] |
||
1551 | imul ecx,edx |
||
1552 | add ecx,[wcolor] |
||
1553 | mov edx,sec |
||
1554 | mov eax,4 |
||
1555 | mov esi,1 |
||
1556 | int 0x40 |
||
1557 | |||
1558 | |||
304 | diamond | 1559 | ; mov eax,26 ; check for change in time or country |
1560 | ; mov ebx,5 |
||
1561 | ; int 0x40 |
||
1562 | ; mov edx,eax |
||
31 | halyavin | 1563 | mov eax,26 |
1564 | mov ebx,2 |
||
1565 | mov ecx,9 |
||
1566 | int 0x40 |
||
304 | diamond | 1567 | ; add edx,eax |
1568 | mov edx,eax |
||
31 | halyavin | 1569 | mov eax,3 |
1570 | int 0x40 |
||
1571 | and eax,0xffff |
||
1572 | add edx,eax |
||
1573 | cmp edx,[checks] |
||
51 | mikedld | 1574 | je _ret |
31 | halyavin | 1575 | mov [checks],edx |
1576 | |||
1577 | mov ebx,[maxx] |
||
1578 | sub ebx,48 ;;94 ;;74 |
||
1579 | shl ebx,16 |
||
1580 | add ebx,33 ;;84 ;;64 |
||
1581 | |||
51 | mikedld | 1582 | mov eax,8 ; time/date button |
31 | halyavin | 1583 | mov ecx,3 *65536 |
1584 | add ecx,[b_size_y] |
||
1585 | ; dec ecx |
||
1586 | sub cx,5 |
||
1587 | mov edx,2+0x20000000 |
||
1588 | mov esi,[wcolor] |
||
1589 | int 0x40 |
||
1590 | pusha |
||
1591 | mov eax,13 |
||
1592 | add ebx,10*65536-16 |
||
1593 | add ecx,5*65536-8 |
||
1594 | mov edx,[wcolor] |
||
1595 | int 0x40 |
||
1596 | popa |
||
1597 | and edx,0xffff |
||
1598 | add edx,[button_frames] |
||
1599 | int 0x40 |
||
1600 | |||
1601 | mov eax,8 |
||
1602 | mov ebx,[maxx] |
||
1603 | sub ebx,77 ;80 |
||
1604 | shl ebx,16 |
||
1605 | add ebx,12 |
||
1606 | mov ecx,5 shl 16+10 |
||
1607 | mov edx,16+0x20000000 ;button 16 |
||
1608 | mov esi,[wcolor] |
||
1609 | int 0x40 |
||
1610 | sub ebx,17 shl 16 |
||
51 | mikedld | 1611 | inc edx ;button 17 |
304 | diamond | 1612 | ; int 0x40 |
31 | halyavin | 1613 | add ebx,33 shl 16 |
1614 | mov bx,8 |
||
51 | mikedld | 1615 | inc edx ;button 18 |
31 | halyavin | 1616 | int 0x40 |
304 | diamond | 1617 | sub ebx,30 shl 16 |
31 | halyavin | 1618 | mov bx,10 |
51 | mikedld | 1619 | inc edx ;button 19 |
31 | halyavin | 1620 | int 0x40 |
1621 | sub ebx,14 shl 16 |
||
51 | mikedld | 1622 | inc edx ;button 20 |
31 | halyavin | 1623 | int 0x40 |
51 | mikedld | 1624 | sub ebx,12 shl 16 |
1625 | mov bx,8 |
||
1626 | mov ecx,6 shl 16+10 |
||
1627 | inc edx ;button 21 |
||
1628 | int 0x40 |
||
1629 | sub ebx,18 shl 16 |
||
1630 | inc edx ;button 22 |
||
1631 | int 0x40 |
||
1632 | |||
31 | halyavin | 1633 | ; flags |
1634 | |||
304 | diamond | 1635 | ; mov eax,26 |
1636 | ; mov ebx,5 |
||
1637 | ; int 0x40 |
||
1638 | ; mov ebx,eax |
||
1639 | ; |
||
1640 | ; mov eax,1 |
||
1641 | ; mov [type_lang],al |
||
1642 | ; call draw_flag |
||
31 | halyavin | 1643 | |
1644 | mov eax,26 |
||
1645 | mov ebx,2 |
||
1646 | mov ecx,9 |
||
1647 | int 0x40 |
||
1648 | mov ebx,eax |
||
1649 | |||
1650 | mov eax,2 |
||
1651 | mov [type_lang],al |
||
1652 | call draw_flag |
||
1653 | |||
1654 | mcall 18,8,1 |
||
1655 | mov [sound_flag],al |
||
1656 | |||
1657 | mov ebx,[maxx] |
||
304 | diamond | 1658 | sub ebx,92 ;109 ;112 ;28 |
31 | halyavin | 1659 | shl ebx,16 |
1660 | mov bx,12 |
||
1661 | mov ecx, 4*65536+13 |
||
1662 | mov edx,0 |
||
1663 | mov eax,13 |
||
1664 | int 0x40 |
||
1665 | add ebx,1 shl 16 |
||
1666 | sub bx,2 |
||
1667 | mov ecx,5 shl 16+11 |
||
1668 | mov edx,0xcc |
||
1669 | int 0x40 |
||
1670 | add ebx,1 shl 16 |
||
1671 | mov bx,5 |
||
1672 | mov ecx,8 shl 16+5 |
||
1673 | mov edx,0xdddd00 |
||
1674 | int 0x40 |
||
1675 | add ebx,5 shl 16 |
||
1676 | mov bx,1 |
||
1677 | mov ecx,7 shl 16+7 |
||
1678 | int 0x40 |
||
1679 | add ebx,1 shl 16 |
||
1680 | mov ecx,6 shl 16+9 |
||
1681 | int 0x40 |
||
1682 | add ebx,1 shl 16 |
||
1683 | mov ecx,5 shl 16+11 |
||
1684 | int 0x40 |
||
1685 | |||
1686 | ; cmp [music_type],0 |
||
1687 | ; jne dalshe |
||
1688 | cmp [sound_flag],0 |
||
51 | mikedld | 1689 | je dalshe |
31 | halyavin | 1690 | |
1691 | sub ebx,8 shl 16 |
||
1692 | ror ebx,16 |
||
1693 | mov cx,bx |
||
1694 | rol ebx,16 |
||
1695 | mov bx,cx |
||
1696 | add bx,8 |
||
1697 | mov ecx,5 shl 16+15 |
||
1698 | mov edx,0xff0000 |
||
1699 | mov eax,38 |
||
1700 | int 0x40 |
||
1701 | add ebx,1 shl 16 |
||
1702 | inc bx |
||
1703 | int 0x40 |
||
1704 | rol ecx,16 |
||
1705 | int 0x40 |
||
1706 | sub ebx,1 shl 16 |
||
1707 | dec bx |
||
1708 | int 0x40 |
||
1709 | |||
1710 | dalshe: |
||
1711 | |||
1712 | mov ebx,[maxx] |
||
304 | diamond | 1713 | sub ebx,106;123 |
31 | halyavin | 1714 | shl ebx,16 |
1715 | mov bx,12 |
||
1716 | mov ecx, 4*65536+13 |
||
1717 | mov edx,0 |
||
1718 | mov eax,13 |
||
1719 | int 0x40 |
||
1720 | add ebx,1 shl 16 |
||
1721 | sub bx,2 |
||
1722 | mov ecx,5 shl 16+11 |
||
1723 | mov edx,0xffcc00 |
||
1724 | int 0x40 |
||
1725 | mov eax,4 |
||
1726 | mov ebx,[maxx] |
||
304 | diamond | 1727 | sub ebx,104;121 |
31 | halyavin | 1728 | shl ebx,16 |
1729 | mov bx,7 |
||
1730 | mov ecx,0x10000000 |
||
1731 | mov edx,file_sys |
||
1732 | mov esi,1 |
||
1733 | int 0x40 |
||
1734 | add ebx,1 shl 16 |
||
1735 | int 0x40 |
||
1736 | |||
51 | mikedld | 1737 | mov edx,0 |
1738 | mov eax,13 |
||
1739 | mov ebx,[maxx] |
||
304 | diamond | 1740 | sub ebx,117;134 |
51 | mikedld | 1741 | shl ebx,16 |
1742 | mov bx,9 |
||
1743 | mov ecx,6 shl 16+11 |
||
1744 | int 0x40 |
||
1745 | sub ebx,18 shl 16 |
||
1746 | int 0x40 |
||
1747 | add ebx,19 shl 16 |
||
1748 | sub bx,2 |
||
1749 | mov ecx,7 shl 16+9 |
||
1750 | mov edx,0xffffff |
||
1751 | int 0x40 |
||
1752 | sub ebx,18 shl 16 |
||
1753 | int 0x40 |
||
1754 | |||
1755 | mov eax,4 |
||
1756 | mov edx,page_a1 |
||
1757 | mov ebx,[maxx] |
||
304 | diamond | 1758 | sub ebx,133;150 |
51 | mikedld | 1759 | shl ebx,16 |
1760 | mov bx,8 |
||
1761 | mov esi,4 |
||
1762 | int 0x40 |
||
1763 | add ebx,1 shl 16 |
||
1764 | int 0x40 |
||
1765 | |||
1766 | mov eax,47 |
||
1767 | mov ebx,0x10100 |
||
1768 | mov ecx,[page_list] |
||
1769 | mov edx,[maxx] |
||
304 | diamond | 1770 | sub edx,124;141 |
51 | mikedld | 1771 | shl edx,16 |
1772 | mov dx,7 |
||
1773 | mov esi,0xffffff |
||
1774 | int 0x40 |
||
1775 | |||
31 | halyavin | 1776 | ; sub ebx,14 shl 16 |
1777 | ; mov bx,7 |
||
1778 | ; mov edx,turn_text |
||
1779 | ; mov esi,1 |
||
1780 | |||
1781 | ; mov ecx,0x60a060 ;[wcolor] |
||
1782 | ; add ecx,0x303030 |
||
1783 | ; mov eax,4 |
||
1784 | ; int 0x40 |
||
1785 | ; add ebx,1 shl 16 |
||
1786 | ; int 0x40 |
||
1787 | ; add ebx,1 shl 16 |
||
1788 | ; int 0x40 |
||
1789 | ; add ebx,1 shl 16 |
||
1790 | ; int 0x40 |
||
1791 | |||
1792 | ; add ebx,1 shl 16 |
||
1793 | ; mov ecx,0x60a060 ;[wcolor] |
||
1794 | ; int 0x40 |
||
1795 | ; add ebx,1 shl 16 |
||
1796 | ; int 0x40 |
||
1797 | ; add ebx,1 shl 16 |
||
1798 | ; sub ecx,0x303030 |
||
1799 | ; int 0x40 |
||
1800 | |||
1801 | ; sub ebx,6 shl 16 |
||
1802 | ; mov bx,1 |
||
1803 | ; mov ecx,2 shl 16+15 |
||
1804 | ; mov edx,0x60a060 ;[wcolor] |
||
1805 | ; add edx,0x303030 |
||
1806 | ; mov eax,13 |
||
1807 | ; int 0x40 |
||
1808 | ; add ebx,1 shl 16 |
||
1809 | ; mov bx,1 |
||
1810 | ; mov edx,0x60a060 ;[wcolor] |
||
1811 | ; int 0x40 |
||
1812 | ; add ebx,1 shl 16 |
||
1813 | ; mov bx,1 |
||
1814 | ; sub edx,0x303030 |
||
1815 | ; int 0x40 |
||
1816 | ; add ebx,1 shl 16 |
||
1817 | ; mov edx,[wcolor] |
||
1818 | ; int 0x40 |
||
1819 | |||
51 | mikedld | 1820 | mov eax,3 ; get time |
31 | halyavin | 1821 | int 0x40 |
1822 | |||
1823 | movzx ebx,al |
||
1824 | shr eax,8 |
||
1825 | movzx ecx,al |
||
1826 | shr eax,8 |
||
1827 | movzx edx,al |
||
1828 | |||
1829 | ; ebx ecx edx h m s |
||
1830 | |||
1831 | push ebx |
||
1832 | push ecx |
||
1833 | |||
1834 | mov eax,[maxx] |
||
1835 | sub eax,32 |
||
1836 | shl eax,16 |
||
1837 | mov ebx,eax |
||
1838 | add ebx,9 |
||
1839 | |||
1840 | mov ecx,[bte] |
||
1841 | |||
1842 | cmp [graph_text],1 |
||
1843 | jne no_y3 |
||
1844 | sub bx,2 |
||
1845 | mov ecx,0xffffff |
||
1846 | no_y3: |
||
1847 | |||
1848 | |||
51 | mikedld | 1849 | mov edx,[esp] ; __:_X |
31 | halyavin | 1850 | and edx,15 |
1851 | mov eax,4 |
||
1852 | add ebx,10*65536 |
||
1853 | add edx,text |
||
1854 | mov esi,1 |
||
1855 | int 0x40 |
||
1856 | |||
51 | mikedld | 1857 | pop edx ; __:X_ |
31 | halyavin | 1858 | shr edx,4 |
1859 | and edx,15 |
||
1860 | mov eax,4 |
||
1861 | sub ebx,6*65536 |
||
1862 | add edx,text |
||
1863 | mov esi,1 |
||
1864 | int 0x40 |
||
1865 | |||
51 | mikedld | 1866 | mov edx,[esp] ; _X:__ |
31 | halyavin | 1867 | and edx,15 |
1868 | mov eax,4 |
||
1869 | sub ebx,11*65536 |
||
1870 | add edx,text |
||
1871 | mov esi,1 |
||
1872 | int 0x40 |
||
1873 | |||
51 | mikedld | 1874 | pop edx ; X_:__ |
31 | halyavin | 1875 | shr edx,4 |
1876 | and edx,15 |
||
1877 | mov eax,4 |
||
1878 | sub ebx,6*65536 |
||
1879 | add edx,text |
||
1880 | mov esi,1 |
||
1881 | int 0x40 |
||
1882 | |||
1883 | call draw_cpu_usage |
||
1884 | |||
1885 | _ret: |
||
1886 | |||
1887 | cmp [minimize_right],0 |
||
1888 | jne no_m_r2 |
||
1889 | sub [maxx],10 |
||
1890 | no_m_r2: |
||
1891 | |||
1892 | no_setup: |
||
1893 | |||
1894 | popa |
||
1895 | ret |
||
1896 | |||
1897 | |||
1898 | |||
1899 | draw_cpu_usage: |
||
1900 | |||
318 | heavyiron | 1901 | pushad |
31 | halyavin | 1902 | |
1903 | mov [ysi],30 |
||
1904 | cmp [graph_text],1 |
||
1905 | jne @f |
||
318 | heavyiron | 1906 | mov [ysi],12 |
31 | halyavin | 1907 | @@: |
1908 | |||
1909 | |||
1910 | mov eax,18 ; TSC / SEC |
||
1911 | mov ebx,5 |
||
1912 | int 0x40 |
||
1913 | shr eax,20 |
||
1914 | push eax |
||
1915 | mov eax,18 ; IDLE / SEC |
||
1916 | mov ebx,4 |
||
1917 | int 0x40 |
||
1918 | shr eax,20 |
||
1919 | xor edx,edx |
||
1920 | imul eax,[ysi] |
||
1921 | |||
1922 | cdq |
||
1923 | pop ebx |
||
1924 | inc ebx |
||
1925 | div ebx |
||
318 | heavyiron | 1926 | cmp eax,[ysi] |
1927 | jng no_bug |
||
1928 | mov eax,[ysi] |
||
1929 | no_bug: |
||
31 | halyavin | 1930 | push eax |
1931 | |||
1932 | mov eax,13 |
||
1933 | mov ebx,[maxx] |
||
372 | heavyiron | 1934 | sub ebx,60 |
31 | halyavin | 1935 | shl ebx,16 |
372 | heavyiron | 1936 | add ebx,8 |
1937 | mov ecx,5 shl 16 |
||
318 | heavyiron | 1938 | add ecx,[ysi] |
372 | heavyiron | 1939 | mov edx,0xdd2222 |
31 | halyavin | 1940 | int 0x40 |
372 | heavyiron | 1941 | |
31 | halyavin | 1942 | pop eax |
372 | heavyiron | 1943 | mov ecx,5 shl 16 |
1944 | add ecx,eax |
||
31 | halyavin | 1945 | mov eax,13 |
372 | heavyiron | 1946 | mov edx,0x44aa44 |
31 | halyavin | 1947 | int 0x40 |
1948 | |||
318 | heavyiron | 1949 | popad |
31 | halyavin | 1950 | ret |
1951 | |||
1952 | ; DATA |
||
1953 | |||
1954 | stripe: |
||
51 | mikedld | 1955 | dd -0x010101 |
1956 | dd -0x010101 |
||
1957 | dd -0x020202 |
||
1958 | dd -0x010101 |
||
1959 | dd -0x000000 |
||
31 | halyavin | 1960 | |
51 | mikedld | 1961 | dd 0x000000 |
1962 | dd 0x010101 |
||
1963 | dd 0x020202 |
||
1964 | dd 0x010101 |
||
1965 | dd 0x010101 |
||
31 | halyavin | 1966 | |
1967 | m_icon: |
||
51 | mikedld | 1968 | dd 0x0 |
1969 | dd 0x808080 |
||
1970 | dd 0x000000 |
||
1971 | dd 0x000000 |
||
1972 | dd 0xffffff |
||
31 | halyavin | 1973 | |
1974 | |||
1975 | lsz m_text,\ |
||
1976 | ru, "МЕНЮ",\ |
||
275 | kaitz | 1977 | en, "MENU",\ |
1978 | et, "MEN▄▄" |
||
31 | halyavin | 1979 | |
1980 | mi_text db 'WAVETETRBGRDGPL ' |
||
1981 | |||
275 | kaitz | 1982 | flag_text db 'EnFiGeRuFrEt' |
31 | halyavin | 1983 | |
1984 | type_lang db 0 |
||
1985 | ;music_type db 1 |
||
1986 | sound_flag db 0 |
||
1987 | button_frames dd 0x0 |
||
1988 | |||
51 | mikedld | 1989 | checks dd -1 |
31 | halyavin | 1990 | hidetext db 0x11,0x10,0x1e |
1991 | |||
1992 | turn_text db '><' |
||
51 | mikedld | 1993 | gpl db 'GPL' |
31 | halyavin | 1994 | |
1995 | chlang db 'LANG',0 |
||
304 | diamond | 1996 | ;syslang db 'SLAN',0 |
31 | halyavin | 1997 | |
1998 | contrast db 0 |
||
1999 | |||
2000 | running_applications dd 0x100 |
||
2001 | max_applications dd 11 |
||
2002 | |||
443 | diamond | 2003 | current_alt_tab_app dd -1 |
2004 | |||
51 | mikedld | 2005 | page_list dd 0 |
2006 | draw_start_position dd 0 |
||
2007 | draw_window_1 db 0 |
||
2008 | |||
31 | halyavin | 2009 | b_size_y: dd 0x0 |
2010 | ysi dd 0 |
||
2011 | small_draw dd 0x0 |
||
2012 | |||
51 | mikedld | 2013 | ptime dd 0x0 |
2014 | maxx dd 0x0 |
||
2015 | text db '0123456789' |
||
2016 | page_a1 db '< >' |
||
2017 | bte dd 0xccddee |
||
31 | halyavin | 2018 | |
51 | mikedld | 2019 | wcolor dd 0x506070 |
31 | halyavin | 2020 | |
51 | mikedld | 2021 | sec db ': ' |
2022 | pros db ' ' |
||
2023 | db ' ' |
||
31 | halyavin | 2024 | |
51 | mikedld | 2025 | screenxy dd 0x0 |
2026 | stcount dd 0x0 |
||
31 | halyavin | 2027 | |
93 | diamond | 2028 | setup_exec: |
2029 | dd 7 |
||
2030 | dd 0 |
||
2031 | .cmdline dd ? |
||
2032 | dd 0 |
||
2033 | dd 0 |
||
2034 | db '/RD/1/' |
||
2035 | file_sys db 'SETUP',0 |
||
2036 | |||
2037 | exec_fileinfo: |
||
2038 | dd 7 |
||
2039 | dd 0 |
||
2040 | dd 0 |
||
2041 | dd 0 |
||
2042 | dd 0 |
||
2043 | db 0 |
||
2044 | .name dd ? |
||
2045 | |||
2046 | end_name db '/RD/1/END',0 |
||
372 | heavyiron | 2047 | menu_name db '/RD/1/@MENU',0 |
93 | diamond | 2048 | calendar_name db '/RD/1/CALENDAR',0 |
131 | diamond | 2049 | sysmeter_name db '/RD/1/GMON',0 |
93 | diamond | 2050 | |
2051 | dat_fileinfo: |
||
2052 | dd 0 |
||
2053 | dd 0 |
||
2054 | dd 0 |
||
2055 | dd 1024 |
||
2056 | dd I_END |
||
2057 | db '/RD/1/PANEL.DAT',0 |
||
2058 | |||
2059 | m_bmp_fileinfo: |
||
2060 | dd 0 |
||
2061 | dd 0 |
||
2062 | dd 0 |
||
2063 | dd 8192 |
||
2064 | dd image |
||
2065 | db '/RD/1/MENUET.BMP',0 |
||
2066 | |||
2067 | iconf_fileinfo: |
||
2068 | dd 0 |
||
2069 | dd 0 |
||
2070 | dd 0 |
||
2071 | dd 8192 |
||
2072 | dd image |
||
2073 | db '/RD/1/' |
||
2074 | iconf db 'MBAR_IX.BMP',0 |
||
2075 | |||
31 | halyavin | 2076 | I_END: |
51 | mikedld | 2077 | |
2078 | screen_size: |
||
2079 | .height dw ? |
||
2080 | .width dw ? |
||
2081 | |||
31 | halyavin | 2082 | area9 rb 100 |
2083 | system_colours rd 10 |
||
2084 | app_list rd 50 |
||
443 | diamond | 2085 | alt_tab_list rd 256*2 |
2086 | alt_tab_list_size dd ? |
||
31 | halyavin | 2087 | tictable: |
2088 | rd 256 |
||
2089 | image:>' |