Rev 2538 | Rev 2548 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2538 | Rev 2542 | ||
---|---|---|---|
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.01 |
|
- | 9 | ; last update: 02/04/2012 |
|
- | 10 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
|
- | 11 | ; changes: Fix for previous revision - not drawed icons after |
|
- | 12 | ; startup in certain cases. |
|
- | 13 | ;--------------------------------------------------------------------- |
|
8 | ; version: 3.00 |
14 | ; version: 3.00 |
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: Program used only 2 threads: draw and mouse |
17 | ; changes: Program used only 2 threads: draw and mouse |
12 | ; Used new kernel functions: 25, 34, 15.8, 4 (redirect). |
18 | ; Used new kernel functions: 25, 34, 15.8, 4 (redirect). |
Line 813... | Line 819... | ||
813 | ;------------------------------------------------------------------------------ |
819 | ;------------------------------------------------------------------------------ |
814 | align 4 |
820 | align 4 |
815 | START2: |
821 | START2: |
816 | mcall 40,10000b ; only Event 5 - draw background |
822 | mcall 40,10000b ; only Event 5 - draw background |
Line -... | Line 823... | ||
- | 823 | ||
- | 824 | mcall 48,5 |
|
- | 825 | mov [warea.by_x],eax |
|
- | 826 | mov [warea.by_y],ebx |
|
817 | 827 | ||
- | 828 | mcall 51,1,START_mouse_thread,stack_mouse_thread |
|
- | 829 | ||
- | 830 | xor eax,eax |
|
- | 831 | mov [x_left],eax |
|
- | 832 | mov [y_top],eax |
|
- | 833 | ||
- | 834 | mcall 14 |
|
- | 835 | mov ebx,eax |
|
- | 836 | shr eax,16 |
|
- | 837 | and ebx,0xffff |
|
- | 838 | mov [x_right],eax |
|
- | 839 | mov [y_bottom],ebx |
|
818 | mcall 51,1,START_mouse_thread,stack_mouse_thread |
840 | jmp still2.1 |
819 | ;------------------------------------------------------------------------------ |
841 | ;------------------------------------------------------------------------------ |
820 | align 4 |
842 | align 4 |
821 | still2: |
843 | still2: |
Line 833... | Line 855... | ||
833 | shr ecx,16 |
855 | shr ecx,16 |
834 | mov [y_top],ecx |
856 | mov [y_top],ecx |
835 | and ebx,0xffff |
857 | and ebx,0xffff |
836 | mov [y_bottom],ebx |
858 | mov [y_bottom],ebx |
Line 837... | Line 859... | ||
837 | 859 | ||
- | 860 | mcall 48,5 |
|
- | 861 | mov [warea.by_x],eax |
|
838 | call get_bg_info |
862 | mov [warea.by_y],ebx |
839 | 863 | .1: |
|
840 | mov ecx,[icons] |
864 | mov ecx,[icons] |
841 | mov ebx,icon_data |
865 | mov ebx,icon_data |
842 | ;-------------------------------------- |
866 | ;-------------------------------------- |
843 | align 4 |
867 | align 4 |
Line 1043... | Line 1067... | ||
1043 | dec esi |
1067 | dec esi |
1044 | loop .l0 |
1068 | loop .l0 |
1045 | ret |
1069 | ret |
1046 | ;------------------------------------------------------------------------------ |
1070 | ;------------------------------------------------------------------------------ |
1047 | align 4 |
1071 | align 4 |
1048 | get_bg_info: |
- | |
1049 | mcall 39,1 ; get background size |
- | |
1050 | mov [bgrxy],eax |
- | |
1051 | - | ||
1052 | mov ebx,eax |
- | |
1053 | shr eax,16 |
- | |
1054 | and ebx,0xffff |
- | |
1055 | mov [bgrx],eax |
- | |
1056 | mov [bgry],ebx |
- | |
1057 | - | ||
1058 | mcall 48,5 |
- | |
1059 | mov [warea.by_x],eax |
- | |
1060 | mov [warea.by_y],ebx |
- | |
1061 | - | ||
1062 | mcall 14 |
- | |
1063 | add eax,0x00010001 |
- | |
1064 | mov [scrxy],eax |
- | |
1065 | ret |
- | |
1066 | ;------------------------------------------------------------------------------ |
- | |
1067 | align 4 |
- | |
1068 | calc_icon_pos: |
1072 | calc_icon_pos: |
1069 | ; in: |
1073 | ; in: |
1070 | ; eax - dword [icon_position] |
1074 | ; eax - dword [icon_position] |
1071 | ; out: |
1075 | ; out: |
1072 | ; eax - current Y |
1076 | ; eax - current Y |