Rev 2548 | Rev 9570 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2548 | Rev 2697 | ||
---|---|---|---|
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.11 |
|
- | 9 | ; last update: 28/05/2012 |
|
- | 10 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
|
- | 11 | ; changes: Fixed crash when trying to select some of the icons. |
|
- | 12 | ; (bug 000013) |
|
- | 13 | ;--------------------------------------------------------------------- |
|
8 | ; version: 3.10 |
14 | ; version: 3.10 |
9 | ; last update: 03/04/2012 |
15 | ; last update: 03/04/2012 |
10 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
16 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
11 | ; changes: Drawing selection rectangle. |
17 | ; changes: Drawing selection rectangle. |
12 | ; Using new kernel function: 15.9 |
18 | ; Using new kernel function: 15.9 |
Line 89... | Line 95... | ||
89 | 95 | ||
90 | ; unpack deflate |
96 | ; unpack deflate |
91 | mov eax,[unpack_DeflateUnpack2] |
97 | mov eax,[unpack_DeflateUnpack2] |
92 | mov [deflate_unpack],eax |
98 | mov [deflate_unpack],eax |
93 | ;--------------------------------------------------------------------- |
99 | ;--------------------------------------------------------------------- |
94 | ; get size of file ICONSTRP.GIF |
100 | ; get size of file ICONSTRP.PNG |
95 | mcall 70,finfo |
101 | mcall 70,finfo |
96 | test eax,eax |
102 | test eax,eax |
97 | jnz close |
103 | jnz close |
98 | ; get memory for ICONSTRP.GIF |
104 | ; get memory for ICONSTRP.PNG |
99 | mov ecx,[procinfo+32] |
105 | mov ecx,[procinfo+32] |
100 | mov [finfo.size],ecx |
106 | mov [finfo.size],ecx |
101 | mov [img_size],ecx |
107 | mov [img_size],ecx |
102 | mcall 68,12 |
108 | mcall 68,12 |
103 | mov [finfo.point],eax |
109 | mov [finfo.point],eax |
104 | mov [image_file],eax |
110 | mov [image_file],eax |
105 | ; load ICONSTRP.GIF |
111 | ; load ICONSTRP.PNG |
106 | mov [finfo],dword 0 |
112 | mov [finfo],dword 0 |
107 | mcall 70,finfo |
113 | mcall 70,finfo |
108 | test eax,eax |
114 | test eax,eax |
109 | jnz close |
115 | jnz close |
Line 113... | Line 119... | ||
113 | 119 | ||
114 | push image_file |
120 | push image_file |
Line 115... | Line 121... | ||
115 | call [cnv_png_import.Start] |
121 | call [cnv_png_import.Start] |
- | 122 | ||
- | 123 | mov eax,[raw_pointer] |
|
116 | 124 | mov ebx,[eax+32] |
|
117 | mov eax,[raw_pointer] |
125 | mov [strip_file_size],ebx |
118 | mov eax,[eax+28] |
126 | mov eax,[eax+28] |
119 | add eax,[raw_pointer] |
127 | add eax,[raw_pointer] |
120 | mov [strip_file],eax |
128 | mov [strip_file],eax |
Line 121... | Line 129... | ||
121 | ; back memeory to system |
129 | ; back memeory to system |
122 | mcall 68,13,[finfo.point] |
130 | mcall 68,13,[finfo.point] |
123 | 131 | ||
124 | mov eax,[raw_pointer] |
132 | mov eax,[raw_pointer] |
- | 133 | mov eax,[eax+8] |
|
- | 134 | shr eax,5 |
|
- | 135 | mov [icon_count],eax |
|
125 | mov eax,[eax+8] |
136 | |
126 | shr eax,5 |
137 | and eax,0x7 |
127 | mov [icon_count],eax |
138 | mov [cur_band_compensation],eax |
128 | ; load ICON.DAT |
139 | ; load ICON.DAT |
129 | call load_ic |
140 | call load_ic |
Line 468... | Line 479... | ||
468 | ;-------------------------------------- |
479 | ;-------------------------------------- |
469 | align 4 |
480 | align 4 |
470 | band: |
481 | band: |
471 | add esi,12 |
482 | add esi,12 |
472 | call ASCII_to_icon_number |
483 | call ASCII_to_icon_number |
473 | and eax,0xfffff8 |
484 | ; and eax,0xfffff8 |
- | 485 | cmp eax,[cur_band_compensation] |
|
- | 486 | jb @f |
|
- | 487 | ||
- | 488 | sub eax,[cur_band_compensation] |
|
- | 489 | ;-------------------------------------- |
|
- | 490 | align 4 |
|
- | 491 | @@: |
|
474 | mov [cur_band],eax |
492 | mov [cur_band],eax |
475 | call draw_btns |
493 | call draw_btns |
476 | jmp still |
494 | jmp still |
477 | ;------------------------------------------------------------------------------ |
495 | ;------------------------------------------------------------------------------ |
478 | align 4 |
496 | align 4 |
Line 789... | Line 807... | ||
789 | align 4 |
807 | align 4 |
790 | .nxt: |
808 | .nxt: |
791 | push ecx |
809 | push ecx |
792 | pusha |
810 | pusha |
793 | mov ebp,0 |
811 | mov ebp,0 |
- | 812 | ||
- | 813 | mov eax,[strip_file_size] |
|
- | 814 | add eax,[strip_file] |
|
- | 815 | cmp eax,ebx |
|
- | 816 | ja @f |
|
- | 817 | ; draw a rectangle if icon does not exist |
|
- | 818 | mov ebx,edx ; X |
|
- | 819 | mov ecx,edx ; Y |
|
- | 820 | shl ecx,16 |
|
- | 821 | mov bx,32 |
|
- | 822 | mov cx,bx |
|
- | 823 | xor edx,edx |
|
- | 824 | mcall 13 |
|
- | 825 | jmp .draw_pict_end |
|
- | 826 | ;-------------------------------------- |
|
- | 827 | align 4 |
|
- | 828 | @@: |
|
794 | mcall 65,,<32,32>,,32 |
829 | mcall 65,,<32,32>,,32 |
- | 830 | ;-------------------------------------- |
|
- | 831 | align 4 |
|
- | 832 | .draw_pict_end: |
|
795 | popa |
833 | popa |
796 | pop ecx |
834 | pop ecx |
797 | add ebx,ICON_SIZE |
835 | add ebx,ICON_SIZE |
798 | add edx,34 shl 16 |
836 | add edx,34 shl 16 |
- | 837 | ||
- | 838 | dec ecx |
|
799 | loop .nxt |
839 | jnz .nxt |
Line 800... | Line 840... | ||
800 | 840 | ||
801 | mcall 4,<45,280-2>,0,rep_text,rep_text_len-rep_text |
841 | mcall 4,<45,280-2>,0,rep_text,rep_text_len-rep_text |
802 | lea edx,[ebx+(8*5)shl 16] |
842 | lea edx,[ebx+(8*5)shl 16] |
803 | pop ecx |
843 | pop ecx |