Rev 4129 | Rev 4140 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4129 | Rev 4134 | ||
---|---|---|---|
Line 1... | Line -... | ||
1 | ;;; Docky v0.4.3 by eAndrew |
- | |
2 | - | ||
3 | use32 |
1 | use32 |
4 | org 0x0 |
2 | org 0x0 |
5 | ;------------------------------------------------------------------------------- |
3 | ;------------------------------------------------------------------------------- |
6 | db "MENUET01" |
4 | db "MENUET01" |
7 | dd 1, main, __dataend, __memend, __stackend, 0, sys_path |
5 | dd 1, main, __dataend, __memend, __stackend, 0, sys_path |
8 | ;------------------------------------------------------------------------------- |
6 | ;------------------------------------------------------------------------------- |
9 | include "../../../macros.inc" |
7 | include "../../../macros.inc" |
10 | include "../../../proc32.inc" |
8 | include "../../../proc32.inc" |
11 | include "../../../dll.inc" |
9 | include "../../../dll.inc" |
12 | include "../../../develop/libraries/box_lib/load_lib.mac" |
10 | include "../../../develop/libraries/box_lib/load_lib.mac" |
- | 11 | ;include "../../../debug.inc" |
|
Line 13... | Line 12... | ||
13 | 12 | ||
14 | @use_library_mem \ |
13 | @use_library_mem \ |
15 | mem.Alloc, \ |
14 | mem.Alloc, \ |
16 | mem.Free, \ |
15 | mem.Free, \ |
Line 37... | Line 36... | ||
37 | invoke ini.get_int, ini_data.file_name, ini_data.settings_name, ini_data.location_name, -1 |
36 | invoke ini.get_int, ini_data.file_name, ini_data.settings_name, ini_data.location_name, -1 |
38 | mov [dock_items.location], eax |
37 | mov [dock_items.location], eax |
Line 39... | Line 38... | ||
39 | 38 | ||
40 | invoke ini.get_color, ini_data.file_name, ini_data.settings_name, ini_data.color_bg, 0x0 |
39 | invoke ini.get_color, ini_data.file_name, ini_data.settings_name, ini_data.color_bg, 0x0 |
- | 40 | mov [color.bg], eax |
|
- | 41 | invoke ini.get_color, ini_data.file_name, ini_data.settings_name, ini_data.color_bg_line, 0x080808 |
|
41 | mov [color.bg], eax |
42 | mov [color.bg_line], eax |
42 | invoke ini.get_color, ini_data.file_name, ini_data.settings_name, ini_data.color_frame, 0xFFFFFF |
43 | invoke ini.get_color, ini_data.file_name, ini_data.settings_name, ini_data.color_frame, 0xFFFFFF |
43 | mov [color.frame], eax |
44 | mov [color.frame], eax |
44 | invoke ini.get_color, ini_data.file_name, ini_data.settings_name, ini_data.color_framein, 0x888888 |
45 | invoke ini.get_color, ini_data.file_name, ini_data.settings_name, ini_data.color_framein, 0x888888 |
45 | mov [color.framein], eax |
46 | mov [color.framein], eax |
Line 70... | Line 71... | ||
70 | 71 | ||
71 | ; === ALPHA === |
72 | ; === ALPHA === |
72 | mov edi, 0 |
73 | mov edi, 0 |
73 | add eax, 24 |
74 | add eax, 24 |
74 | mov eax, [eax] |
- | |
75 | mov ecx, [color.bg] |
75 | mov eax, [eax] |
76 | .setalpha: |
76 | .setalpha: |
77 | mov ebx, [eax + edi] |
77 | mov ebx, [eax + edi] |
78 | shr ebx, 24 |
78 | shr ebx, 24 |
79 | cmp ebx, 0 |
79 | cmp ebx, 0 |
- | 80 | jne .nonalpha |
|
- | 81 | ||
- | 82 | pushad |
|
- | 83 | mov eax, edi |
|
- | 84 | mov edx, 0 |
|
- | 85 | mov ebx, 128 |
|
- | 86 | div ebx |
|
- | 87 | ||
- | 88 | mov edx, 0 |
|
- | 89 | mov ebx, 2 |
|
- | 90 | div ebx |
|
- | 91 | ||
- | 92 | mov edx, 0 |
|
- | 93 | div ebx |
|
- | 94 | ||
- | 95 | cmp edx, 1 |
|
- | 96 | je .set_bg_line |
|
- | 97 | .set_bg: |
|
- | 98 | popad |
|
- | 99 | mov ecx, [color.bg] |
|
- | 100 | jmp .set_ecx |
|
- | 101 | .set_bg_line: |
|
- | 102 | popad |
|
- | 103 | mov ecx, [color.bg_line] |
|
80 | jne .nonalpha |
104 | .set_ecx: |
81 | mov [eax + edi], ecx |
105 | mov [eax + edi], ecx |
82 | .nonalpha: |
106 | .nonalpha: |
83 | add edi, 4 |
107 | add edi, 4 |
84 | cmp edi, IMAGE_DATA_SIZE |
108 | cmp edi, IMAGE_DATA_SIZE |
Line 132... | Line 156... | ||
132 | .setleft: |
156 | .setleft: |
133 | call .VERT_X_LEFT |
157 | call .VERT_X_LEFT |
134 | jmp .SETDEF |
158 | jmp .SETDEF |
Line 135... | Line 159... | ||
135 | 159 | ||
136 | .HORZ_WIDTH: |
160 | .HORZ_WIDTH: |
137 | mov eax, 42 |
161 | mov eax, 40 |
138 | mov ebx, [dock_items.count] |
162 | mov ebx, [dock_items.count] |
139 | imul eax, ebx |
163 | imul eax, ebx |
140 | dec eax |
164 | dec eax |
141 | mov [win.width_opn], eax |
165 | mov [win.width_opn], eax |
Line 159... | Line 183... | ||
159 | mov [win.x_hdn], ecx |
183 | mov [win.x_hdn], ecx |
Line 160... | Line 184... | ||
160 | 184 | ||
Line 161... | Line 185... | ||
161 | ret |
185 | ret |
162 | 186 | ||
163 | .HORZ_HEIGHT: |
187 | .HORZ_HEIGHT: |
Line 164... | Line 188... | ||
164 | mov dword[win.height_opn], 42 |
188 | mov dword[win.height_opn], 40 |
Line 165... | Line 189... | ||
165 | mov dword[win.height_hdn], 0 |
189 | mov dword[win.height_hdn], 0 |
166 | 190 | ||
167 | ret |
191 | ret |
168 | 192 | ||
169 | .HORZ_Y_BOTTOM: |
193 | .HORZ_Y_BOTTOM: |
170 | mcall 14 |
194 | mcall 14 |
171 | and eax, 0xFFFF |
195 | and eax, 0xFFFF |
Line 172... | Line 196... | ||
172 | dec eax |
196 | dec eax |
Line 173... | Line 197... | ||
173 | mov [win.y_hdn], eax |
197 | mov [win.y_hdn], eax |
Line 181... | Line 205... | ||
181 | mov dword[win.y_hdn], 0 |
205 | mov dword[win.y_hdn], 0 |
Line 182... | Line 206... | ||
182 | 206 | ||
Line 183... | Line 207... | ||
183 | ret |
207 | ret |
184 | 208 | ||
185 | .VERT_WIDTH: |
209 | .VERT_WIDTH: |
Line 186... | Line 210... | ||
186 | mov dword[win.width_opn], 42 |
210 | mov dword[win.width_opn], 40 |
Line 187... | Line 211... | ||
187 | mov dword[win.width_hdn], 0 |
211 | mov dword[win.width_hdn], 0 |
Line 198... | Line 222... | ||
198 | .VERT_X_RIGHT: |
222 | .VERT_X_RIGHT: |
199 | mcall 14 |
223 | mcall 14 |
200 | and eax, 0xFFFF0000 |
224 | and eax, 0xFFFF0000 |
201 | shr eax, 16 |
225 | shr eax, 16 |
202 | mov [win.x_hdn], eax |
226 | mov [win.x_hdn], eax |
203 | sub eax, 42 |
227 | sub eax, 40 |
204 | mov [win.x_opn], eax |
228 | mov [win.x_opn], eax |
Line 205... | Line 229... | ||
205 | 229 | ||
Line 206... | Line 230... | ||
206 | ret |
230 | ret |
207 | 231 | ||
208 | .VERT_HEIGHT: |
232 | .VERT_HEIGHT: |
209 | mov eax, 42 |
233 | mov eax, 40 |
210 | mov ebx, [dock_items.count] |
234 | mov ebx, [dock_items.count] |
211 | imul eax, ebx |
235 | imul eax, ebx |
212 | dec eax |
236 | dec eax |
Line 304... | Line 328... | ||
304 | add ecx, 0x00010000 |
328 | add ecx, 0x00010000 |
305 | sub ecx, 0x00000002 |
329 | sub ecx, 0x00000002 |
Line 306... | Line 330... | ||
306 | 330 | ||
Line -... | Line 331... | ||
- | 331 | mcall , , , [color.bg] |
|
- | 332 | ||
- | 333 | mov edi, 2 |
|
- | 334 | mov eax, 13 |
|
- | 335 | mov ebx, 2 shl 16 |
|
- | 336 | add ebx, [win.width] |
|
- | 337 | sub ebx, 3 |
|
- | 338 | mov ecx, 2 shl 16 + 2 |
|
- | 339 | mov edx, [color.bg_line] |
|
- | 340 | @@: |
|
- | 341 | mcall |
|
- | 342 | add ecx, 4 shl 16 |
|
- | 343 | add edi, 4 |
|
- | 344 | cmp edi, [win.height] |
|
307 | mcall , , , [color.bg] |
345 | jl @b |
308 | 346 | ||
309 | mov edi, 0 |
347 | mov edi, 0 |
310 | @@: |
348 | @@: |
Line 311... | Line 349... | ||
311 | cmp edi, [dock_items.count] |
349 | cmp edi, [dock_items.count] |
312 | je @f |
350 | je @f |
313 | 351 | ||
314 | push edi |
352 | push edi |
315 | mov eax, 8 |
353 | mov eax, 8 |
316 | mov edx, 0x60000002 |
354 | mov edx, 0x60000002 |
317 | mov esi, [color.bg] |
355 | mov esi, [color.bg] |
318 | imul edi, 42 |
356 | imul edi, 40 |
319 | shl edi, 16 |
357 | shl edi, 16 |
320 | add edi, 41 |
358 | add edi, 39 |
321 | cmp byte[win.isvert], 1 |
359 | cmp byte[win.isvert], 1 |
322 | je .vert_btn |
360 | je .vert_btn |
323 | mcall , edi, <0, 42> |
361 | mcall , edi, <0, 40> |
324 | jmp .endbtn |
362 | jmp .endbtn |
325 | .vert_btn: |
363 | .vert_btn: |
Line -... | Line 364... | ||
- | 364 | mcall , <0, 40>, edi |
|
- | 365 | .endbtn: |
|
- | 366 | pop edi |
|
- | 367 | ||
- | 368 | .draw_Sseparator: |
|
- | 369 | push ebx |
|
- | 370 | push ecx |
|
- | 371 | mov eax, 13 |
|
- | 372 | mov ebx, edi |
|
- | 373 | imul ebx, 40 |
|
- | 374 | add ebx, 40 |
|
- | 375 | shl ebx, 16 |
|
- | 376 | add ebx, 1 |
|
- | 377 | cmp byte[win.isvert], 1 |
|
- | 378 | je .vert_Sdraw_sep |
|
- | 379 | mcall , , <6, 29>, [color.framein] |
|
- | 380 | jmp .end_Sinner_sep |
|
- | 381 | .vert_Sdraw_sep: |
|
- | 382 | mov ecx, ebx |
|
- | 383 | mcall , <6, 29>, , [color.framein] |
|
- | 384 | .end_Sinner_sep: |
|
326 | mcall , <0, 42>, edi |
385 | pop ecx |
327 | .endbtn: |
- | |
328 | pop edi |
386 | pop ebx |
Line 329... | Line 387... | ||
329 | 387 | .end_Sseparator: |
|
330 | cmp byte[dock_items.separator + edi], 1 |
388 | |
331 | je .draw_separator |
389 | cmp byte[dock_items.separator + edi], 1 |
332 | jmp .end_separator |
390 | jne .end_separator |
333 | 391 | ||
334 | .draw_separator: |
392 | .draw_separator: |
335 | push ebx |
393 | push ebx |
336 | push ecx |
394 | push ecx |
337 | mov eax, 13 |
395 | mov eax, 13 |
338 | mov ebx, edi |
396 | mov ebx, edi |
339 | imul ebx, 42 |
397 | imul ebx, 40 |
340 | add ebx, 41 |
398 | add ebx, 39 |
341 | shl ebx, 16 |
399 | shl ebx, 16 |
342 | add ebx, 1 |
400 | add ebx, 1 |
343 | cmp byte[win.isvert], 1 |
401 | cmp byte[win.isvert], 1 |
344 | je .vert_draw_sep |
402 | je .vert_draw_sep |
345 | mcall , , <0, 43>, [color.frame] |
403 | mcall , , <0, 41>, [color.frame] |
346 | sub ebx, 0x00010000 |
404 | sub ebx, 0x00010000 |
347 | mov edx, [color.framein] |
405 | mov edx, [color.framein] |
348 | mcall , , <1, 41> |
406 | mcall , , <1, 39> |
349 | add ebx, 0x00020000 |
407 | add ebx, 0x00020000 |
350 | mcall , , <1, 41> |
408 | mcall , , <1, 39> |
351 | jmp .end_inner_sep |
409 | jmp .end_inner_sep |
352 | .vert_draw_sep: |
410 | .vert_draw_sep: |
353 | mov ecx, ebx |
411 | mov ecx, ebx |
354 | mcall , <0, 43>, , [color.frame] |
412 | mcall , <0, 41>, , [color.frame] |
355 | sub ecx, 0x00010000 |
413 | sub ecx, 0x00010000 |
356 | mov edx, [color.framein] |
414 | mov edx, [color.framein] |
357 | mcall , <1, 41> |
415 | mcall , <1, 39> |
358 | add ecx, 0x00020000 |
416 | add ecx, 0x00020000 |
Line 359... | Line 417... | ||
359 | mcall , <1, 41> |
417 | mcall , <1, 39> |
360 | .end_inner_sep: |
418 | .end_inner_sep: |
361 | pop ecx |
419 | pop ecx |
362 | pop ebx |
420 | pop ebx |
363 | .end_separator: |
421 | .end_separator: |
364 | 422 | ||
365 | cmp byte[win.isvert], 1 |
423 | cmp byte[win.isvert], 1 |
366 | je .vert_dig |
424 | je .vert_dig |
367 | mov edx, ebx |
425 | mov edx, ebx |
368 | and edx, 0xFFFF0000 |
426 | and edx, 0xFFFF0000 |
369 | add edx, 0x00050005 |
427 | add edx, 0x00040004 |
370 | jmp .digend |
428 | jmp .digend |
Line 371... | Line 429... | ||
371 | .vert_dig: |
429 | .vert_dig: |
372 | mov edx, ecx |
430 | mov edx, ecx |
373 | and edx, 0xFFFF0000 |
431 | and edx, 0xFFFF0000 |
Line 418... | Line 476... | ||
418 | add esi, dock_items.param |
476 | add esi, dock_items.param |
419 | mov dword[file_exec.param], esi |
477 | mov dword[file_exec.param], esi |
Line 420... | Line 478... | ||
420 | 478 | ||
Line -... | Line 479... | ||
- | 479 | mcall 70, file_exec |
|
- | 480 | ||
- | 481 | mov ecx, eax |
|
- | 482 | mcall 18, 21 |
|
- | 483 | and eax, 0xFFFF |
|
421 | mcall 70, file_exec |
484 | mov [win.psid], eax |
422 | 485 | ||
423 | @@: |
486 | @@: |
424 | jmp main_loop |
487 | jmp main_loop |
425 | endp |
488 | endp |
Line 452... | Line 515... | ||
452 | .vert: |
515 | .vert: |
453 | mov eax, esi |
516 | mov eax, esi |
Line 454... | Line 517... | ||
454 | 517 | ||
455 | .nxt: |
518 | .nxt: |
456 | mov edx, 0 |
519 | mov edx, 0 |
457 | mov ebx, 42 |
520 | mov ebx, 40 |
Line 458... | Line 521... | ||
458 | div ebx |
521 | div ebx |
459 | 522 | ||
460 | cmp eax, [dock_items.count] |
523 | cmp eax, [dock_items.count] |
Line 470... | Line 533... | ||
470 | 533 | ||
Line 471... | Line 534... | ||
471 | mov [win.button_index], eax |
534 | mov [win.button_index], eax |
472 | 535 | ||
473 | .nxt2: |
536 | .nxt2: |
474 | mov eax, [win.button_index] |
537 | mov eax, [win.button_index] |
475 | imul eax, 42 |
538 | imul eax, 40 |
476 | cmp byte[win.isvert], 1 |
539 | cmp byte[win.isvert], 1 |
477 | je .vert_name |
540 | je .vert_name |
478 | sub eax, 13 |
541 | sub eax, 15 |
479 | add eax, [win.x] |
542 | add eax, [win.x] |
480 | mov [nwin.x], eax |
543 | mov [nwin.x], eax |
481 | jmp .vert_end |
544 | jmp .vert_end |
482 | .vert_name: |
545 | .vert_name: |
483 | add eax, 13 |
546 | add eax, 12 |
484 | add eax, [win.y] |
547 | add eax, [win.y] |
485 | mov [nwin.y], eax |
548 | mov [nwin.y], eax |
Line 617... | Line 680... | ||
617 | cmp dword[dock_items.location], 3 |
680 | cmp dword[dock_items.location], 3 |
618 | je .bottom |
681 | je .bottom |
619 | jmp .left |
682 | jmp .left |
620 | .top: |
683 | .top: |
621 | mov eax, [win.height_opn] |
684 | mov eax, [win.height_opn] |
622 | add eax, 5 |
685 | add eax, 4 |
623 | mov [nwin.y], eax |
686 | mov [nwin.y], eax |
624 | jmp @f |
687 | jmp @f |
625 | .right: |
688 | .right: |
626 | mov eax, [win.x_opn] |
689 | mov eax, [win.x_opn] |
627 | sub eax, 73 |
690 | sub eax, 72 |
628 | mov [nwin.x], eax |
691 | mov [nwin.x], eax |
629 | jmp @f |
692 | jmp @f |
630 | .bottom: |
693 | .bottom: |
631 | mov eax, [win.y_opn] |
694 | mov eax, [win.y_opn] |
632 | sub eax, 21 |
695 | sub eax, 20 |
633 | mov [nwin.y], eax |
696 | mov [nwin.y], eax |
634 | jmp @f |
697 | jmp @f |
635 | .left: |
698 | .left: |
636 | mov eax, [win.width_opn] |
699 | mov eax, [win.width_opn] |
637 | add eax, 5 |
700 | add eax, 4 |
638 | mov [nwin.x], eax |
701 | mov [nwin.x], eax |
639 | @@: |
702 | @@: |
640 | mov dword[nwin.width], 68 |
703 | mov dword[nwin.width], 68 |
641 | mov dword[nwin.height], 16 |
704 | mov dword[nwin.height], 16 |
Line 706... | Line 769... | ||
706 | add ecx, 0x00010000 |
769 | add ecx, 0x00010000 |
707 | sub ecx, 0x00000002 |
770 | sub ecx, 0x00000002 |
Line 708... | Line 771... | ||
708 | 771 | ||
Line -... | Line 772... | ||
- | 772 | mcall , , , [color.bg] |
|
- | 773 | ||
- | 774 | mov edi, 0 |
|
- | 775 | mov eax, 13 |
|
- | 776 | mov ebx, 2 shl 16 |
|
- | 777 | add ebx, [nwin.width] |
|
- | 778 | sub ebx, 3 |
|
- | 779 | mov ecx, 2 shl 16 + 2 |
|
- | 780 | mov edx, [color.bg_line] |
|
- | 781 | @@: |
|
- | 782 | mcall |
|
- | 783 | add ecx, 4 shl 16 |
|
- | 784 | add edi, 4 |
|
- | 785 | cmp edi, 16 |
|
709 | mcall , , , [color.bg] |
786 | jne @b |
710 | 787 | ||
711 | mov edx, [win.button_index] |
788 | mov edx, [win.button_index] |
Line 712... | Line 789... | ||
712 | imul edx, 16 |
789 | imul edx, 16 |
Line 755... | Line 832... | ||
755 | db "@SETTINGS", 0 |
832 | db "@SETTINGS", 0 |
756 | .location_name: |
833 | .location_name: |
757 | db "location", 0 |
834 | db "location", 0 |
758 | .color_bg: |
835 | .color_bg: |
759 | db "bg", 0 |
836 | db "bg", 0 |
- | 837 | .color_bg_line: |
|
- | 838 | db "bg_line", 0 |
|
760 | .color_frame: |
839 | .color_frame: |
761 | db "frame", 0 |
840 | db "frame", 0 |
762 | .color_framein: |
841 | .color_framein: |
763 | db "framein", 0 |
842 | db "framein", 0 |
764 | .color_text: |
843 | .color_text: |
Line 851... | Line 930... | ||
851 | __stackend: |
930 | __stackend: |
852 | ;================================================================================ |
931 | ;================================================================================ |
853 | color: |
932 | color: |
854 | .bg: |
933 | .bg: |
855 | rd 1 |
934 | rd 1 |
- | 935 | .bg_line: |
|
- | 936 | rd 1 |
|
856 | .frame: |
937 | .frame: |
857 | rd 1 |
938 | rd 1 |
858 | .framein: |
939 | .framein: |
859 | rd 1 |
940 | rd 1 |
860 | .text: |
941 | .text: |