Rev 2542 | Rev 2697 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2542 | Rev 2548 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;* DESKTOP ICON MANAGER * |
3 | ;* DESKTOP ICON MANAGER * |
4 | ;* * |
4 | ;* * |
5 | ;* Compile with flat assembler * |
5 | ;* Compile with flat assembler * |
6 | ;* * |
6 | ;* * |
7 | ;******************************** |
7 | ;******************************** |
- | 8 | ; version: 3.10 |
|
- | 9 | ; last update: 03/04/2012 |
|
- | 10 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
|
- | 11 | ; changes: Drawing selection rectangle. |
|
- | 12 | ; Using new kernel function: 15.9 |
|
- | 13 | ;--------------------------------------------------------------------- |
|
8 | ; version: 3.01 |
14 | ; version: 3.01 |
9 | ; last update: 02/04/2012 |
15 | ; last update: 02/04/2012 |
10 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
16 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
11 | ; changes: Fix for previous revision - not drawed icons after |
17 | ; changes: Fix for previous revision - not drawed icons after |
12 | ; startup in certain cases. |
18 | ; startup in certain cases. |
13 | ;--------------------------------------------------------------------- |
19 | ;--------------------------------------------------------------------- |
14 | ; version: 3.00 |
20 | ; version: 3.00 |
15 | ; last update: 02/04/2012 |
21 | ; last update: 02/04/2012 |
16 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
22 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
17 | ; changes: Program used only 2 threads: draw and mouse |
23 | ; changes: Program use only 2 threads: draw and mouse |
18 | ; Used new kernel functions: 25, 34, 15.8, 4 (redirect). |
24 | ; Using new kernel functions: 25, 34, 15.8, 4 (redirect). |
19 | ; Used PNG icons with transparent. |
25 | ; Using PNG icons with transparent. |
20 | ;--------------------------------------------------------------------- |
26 | ;--------------------------------------------------------------------- |
21 | ; version: 2.11 |
27 | ; version: 2.11 |
22 | ; last update: 19/03/2012 |
28 | ; last update: 19/03/2012 |
23 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
29 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
24 | ; changes: The program uses only 140 Kb memory is now. |
30 | ; changes: The program uses only 140 Kb memory is now. |
Line 51... | Line 57... | ||
51 | ; changes: modified for work with new multi-thread ICON. |
57 | ; changes: modified for work with new multi-thread ICON. |
52 | ;****************************************************************************** |
58 | ;****************************************************************************** |
53 | ICON_SIZE equ 32*32*4 |
59 | ICON_SIZE equ 32*32*4 |
54 | REC_SIZE equ 80 |
60 | REC_SIZE equ 80 |
55 | ICONS_DAT equ '/sys/icons.dat' |
61 | ICONS_DAT equ '/sys/icons.dat' |
56 | ICON_APP equ '/sys/icon' |
62 | ICON_APP equ '/sys/ICON' |
57 | ICON_STRIP equ '/rd/1/iconstrp.png' |
63 | ICON_STRIP equ '/rd/1/iconstrp.png' |
58 | ;------------------------------------------------------------------------------ |
64 | ;------------------------------------------------------------------------------ |
59 | use32 |
65 | use32 |
60 | org 0x0 |
66 | org 0x0 |
61 | db 'MENUET01' ; 8 byte id |
67 | db 'MENUET01' ; 8 byte id |
Line 68... | Line 74... | ||
68 | dd path ; path |
74 | dd path ; path |
69 | ;------------------------------------------------------------------------------ |
75 | ;------------------------------------------------------------------------------ |
70 | include 'lang.inc' |
76 | include 'lang.inc' |
71 | include '../../../macros.inc' |
77 | include '../../../macros.inc' |
72 | include '../../../develop/libraries/box_lib/load_lib.mac' |
78 | include '../../../develop/libraries/box_lib/load_lib.mac' |
73 | COLOR_ORDER equ MENUETOS |
- | |
74 | ;include 'debug.inc' |
79 | ;include 'debug.inc' |
75 | ;------------------------------------------------------------------------------ |
80 | ;------------------------------------------------------------------------------ |
76 | @use_library ;use load lib macros |
81 | @use_library ;use load lib macros |
77 | ;------------------------------------------------------------------------------ |
82 | ;------------------------------------------------------------------------------ |
78 | START: ; start of execution |
83 | START: ; start of execution |
Line 898... | Line 903... | ||
898 | cmp eax,[y_top] |
903 | cmp eax,[y_top] |
899 | jb .exit |
904 | jb .exit |
900 | ;-------------------------------------- |
905 | ;-------------------------------------- |
901 | align 4 |
906 | align 4 |
902 | @@: |
907 | @@: |
903 | mov edi,[adress_of_icon_data] ;[ebp+8] |
908 | mov edi,[adress_of_icon_data] |
904 | lea esi,[edi+12] |
909 | lea esi,[edi+12] |
905 | call ASCII_to_icon_number |
910 | call ASCII_to_icon_number |
906 | ; protect for icon area RAW size limit |
911 | ; protect for icon area RAW size limit |
907 | cmp eax,[icon_count] |
912 | cmp eax,[icon_count] |
908 | jbe @f |
913 | jbe @f |
Line 939... | Line 944... | ||
939 | dec ebx |
944 | dec ebx |
940 | jnz .y |
945 | jnz .y |
Line 941... | Line 946... | ||
941 | 946 | ||
Line 942... | Line 947... | ||
942 | call draw_text |
947 | call draw_text |
943 | 948 | ||
944 | mov edx,[current_X] ;[ebp+0] |
949 | mov edx,[current_X] |
945 | shl edx,16 |
950 | shl edx,16 |
946 | add edx,[current_Y] ;[ebp+4] |
951 | add edx,[current_Y] |
947 | mov ebx,[draw_area] |
952 | mov ebx,[draw_area] |
948 | add ebx,8 |
953 | add ebx,8 |
949 | mcall 25,,<52,52> |
954 | mcall 25,,<52,52> |
950 | mcall 68,13,[draw_area] |
955 | mcall 68,13,[draw_area] |
951 | ret |
956 | ret |
952 | ;------------------------------------------------------------------------------ |
957 | ;------------------------------------------------------------------------------ |
953 | align 4 |
958 | align 4 |
954 | draw_text: |
959 | draw_text: |
955 | mov esi,[adress_of_icon_data] ;[ebp+8] |
960 | mov esi,[adress_of_icon_data] |
956 | add esi,3 |
961 | add esi,3 |
957 | push edi |
962 | push edi |
958 | mov edi,title |
963 | mov edi,title |