Rev 255 | Rev 552 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 255 | Rev 485 | ||
---|---|---|---|
1 | ;----------------------------------------------------------- |
1 | ;----------------------------------------------------------- |
2 | ;---load icons in memory and draw icons on panel----------- |
2 | ;---load icons in memory and draw icons on panel----------- |
3 | ;----------------------------------------------------------- |
3 | ;----------------------------------------------------------- |
4 | load_icons: |
4 | load_icons: |
5 | mov esi,panel_picture |
5 | mov esi,panel_picture |
6 | mov edi,[ScreenPointer] |
6 | mov edi,[ScreenPointer] |
7 | mov eax,edi |
7 | mov eax,edi |
8 | add edi,(1200*1000*3) |
8 | add edi,(1200*1000*3) |
9 | ;mov edi,[PointerToIcons] |
9 | ;mov edi,[PointerToIcons] |
10 | call ReadGIF |
10 | call ReadGIF |
11 | 11 | ||
12 | ret |
12 | ret |
13 | 13 | ||
14 | draw_icons: |
14 | draw_icons: |
15 | 15 | ||
16 | mov [Icon_X],7 |
16 | mov [Icon_X],7 |
17 | mov [Icon_Y],20+15+4 |
17 | mov [Icon_Y],20+15+4 |
18 | 18 | ||
19 | ;draw panel picture |
19 | ;draw panel picture |
20 | mov edx,[Icon_X] |
20 | mov edx,[Icon_X] |
21 | shl edx,16 |
21 | shl edx,16 |
22 | add edx,[Icon_Y] |
22 | add edx,[Icon_Y] |
23 | mov ebx,[ScreenPointer] |
23 | mov ebx,[ScreenPointer] |
24 | add ebx,(1200*1000*3)+12 |
24 | add ebx,(1200*1000*3)+12 |
25 | mov eax,7 |
25 | mov eax,7 |
26 | mov ecx,417*65536+46 |
26 | mov ecx,417*65536+46 |
27 | int 0x40 |
27 | mcall |
28 | 28 | ||
29 | 29 | ||
30 | ;main buttons of instrumnts |
30 | ;main buttons of instrumnts |
31 | 31 | ||
32 | and [counter],0 |
32 | and [counter],0 |
33 | mov [Icon_X],8 |
33 | mov [Icon_X],8 |
34 | mov [Icon_Y],20+15+4+1 |
34 | mov [Icon_Y],20+15+4+1 |
35 | 35 | ||
36 | main_buttons: |
36 | main_buttons: |
37 | 37 | ||
38 | mov eax,8 |
38 | mov eax,8 |
39 | mov ebx,[Icon_X] |
39 | mov ebx,[Icon_X] |
40 | mov ecx,[Icon_Y] |
40 | mov ecx,[Icon_Y] |
41 | dec ebx |
41 | dec ebx |
42 | dec ecx |
42 | dec ecx |
43 | shl ebx,16 |
43 | shl ebx,16 |
44 | shl ecx,16 |
44 | shl ecx,16 |
45 | add ebx,19 |
45 | add ebx,19 |
46 | add ecx,20 |
46 | add ecx,20 |
47 | mov edx,[counter] |
47 | mov edx,[counter] |
48 | add edx,10 |
48 | add edx,10 |
49 | add edx,1000000000000000000000000000000b |
49 | add edx,1000000000000000000000000000000b |
50 | int 0x40 |
50 | mcall |
51 | 51 | ||
52 | 52 | ||
53 | add [Icon_X],22 |
53 | add [Icon_X],22 |
54 | 54 | ||
55 | inc [counter] |
55 | inc [counter] |
56 | cmp [counter],19 |
56 | cmp [counter],19 |
57 | jne main_buttons |
57 | jne main_buttons |
58 | 58 | ||
59 | 59 | ||
60 | ;buttons of brushes(and lines width) |
60 | ;buttons of brushes(and lines width) |
61 | and [counter],0 |
61 | and [counter],0 |
62 | 62 | ||
63 | mov [Icon_X],7+1 |
63 | mov [Icon_X],7+1 |
64 | mov [Icon_Y],20+15+4+25+1 |
64 | mov [Icon_Y],20+15+4+25+1 |
65 | 65 | ||
66 | next_button_brush: |
66 | next_button_brush: |
67 | 67 | ||
68 | mov eax,8 |
68 | mov eax,8 |
69 | mov ebx,[Icon_X] |
69 | mov ebx,[Icon_X] |
70 | mov ecx,[Icon_Y] |
70 | mov ecx,[Icon_Y] |
71 | dec ebx |
71 | dec ebx |
72 | dec ecx |
72 | dec ecx |
73 | shl ebx,16 |
73 | shl ebx,16 |
74 | shl ecx,16 |
74 | shl ecx,16 |
75 | add ebx,19 |
75 | add ebx,19 |
76 | add ecx,20 |
76 | add ecx,20 |
77 | mov edx,[counter] |
77 | mov edx,[counter] |
78 | add edx,40 |
78 | add edx,40 |
79 | add edx,1000000000000000000000000000000b |
79 | add edx,1000000000000000000000000000000b |
80 | int 0x40 |
80 | mcall |
81 | 81 | ||
82 | add [Icon_X],19 |
82 | add [Icon_X],19 |
83 | 83 | ||
84 | inc [counter] |
84 | inc [counter] |
85 | cmp [counter],5 |
85 | cmp [counter],5 |
86 | jne next_button_brush |
86 | jne next_button_brush |
87 | 87 | ||
88 | 88 | ||
89 | ;buttons of zoom |
89 | ;buttons of zoom |
90 | and [counter],0 |
90 | and [counter],0 |
91 | 91 | ||
92 | mov [Icon_X],7+155+1 |
92 | mov [Icon_X],7+155+1 |
93 | mov [Icon_Y],20+15+4+25+1 |
93 | mov [Icon_Y],20+15+4+25+1 |
94 | 94 | ||
95 | next_button_zoom: |
95 | next_button_zoom: |
96 | 96 | ||
97 | mov eax,8 |
97 | mov eax,8 |
98 | mov ebx,[Icon_X] |
98 | mov ebx,[Icon_X] |
99 | mov ecx,[Icon_Y] |
99 | mov ecx,[Icon_Y] |
100 | dec ebx |
100 | dec ebx |
101 | dec ecx |
101 | dec ecx |
102 | shl ebx,16 |
102 | shl ebx,16 |
103 | shl ecx,16 |
103 | shl ecx,16 |
104 | add ebx,19 |
104 | add ebx,19 |
105 | add ecx,20 |
105 | add ecx,20 |
106 | mov edx,[counter] |
106 | mov edx,[counter] |
107 | add edx,45 |
107 | add edx,45 |
108 | add edx,1000000000000000000000000000000b |
108 | add edx,1000000000000000000000000000000b |
109 | int 0x40 |
109 | mcall |
110 | 110 | ||
111 | add [Icon_X],19 |
111 | add [Icon_X],19 |
112 | 112 | ||
113 | inc [counter] |
113 | inc [counter] |
114 | cmp [counter],6 |
114 | cmp [counter],6 |
115 | jne next_button_zoom |
115 | jne next_button_zoom |
116 | 116 | ||
117 | 117 | ||
118 | ; button of palette |
118 | ; button of palette |
119 | mov [Icon_X],7+105+1 |
119 | mov [Icon_X],7+105+1 |
120 | mov [Icon_Y],20+15+4+25+1 |
120 | mov [Icon_Y],20+15+4+25+1 |
121 | 121 | ||
122 | mov eax,8 |
122 | mov eax,8 |
123 | mov ebx,[Icon_X] |
123 | mov ebx,[Icon_X] |
124 | mov ecx,[Icon_Y] |
124 | mov ecx,[Icon_Y] |
125 | dec ebx |
125 | dec ebx |
126 | dec ecx |
126 | dec ecx |
127 | shl ebx,16 |
127 | shl ebx,16 |
128 | shl ecx,16 |
128 | shl ecx,16 |
129 | add ebx,20 |
129 | add ebx,20 |
130 | add ecx,21 |
130 | add ecx,21 |
131 | mov edx,51 |
131 | mov edx,51 |
132 | add edx,1000000000000000000000000000000b |
132 | add edx,1000000000000000000000000000000b |
133 | int 0x40 |
133 | mcall |
134 | 134 | ||
135 | ; button of color |
135 | ; button of color |
136 | mov [Icon_X],7+128+1 |
136 | mov [Icon_X],7+128+1 |
137 | mov [Icon_Y],20+15+4+25+1 |
137 | mov [Icon_Y],20+15+4+25+1 |
138 | 138 | ||
139 | mov eax,8 |
139 | mov eax,8 |
140 | mov ebx,[Icon_X] |
140 | mov ebx,[Icon_X] |
141 | mov ecx,[Icon_Y] |
141 | mov ecx,[Icon_Y] |
142 | dec ebx |
142 | dec ebx |
143 | dec ecx |
143 | dec ecx |
144 | shl ebx,16 |
144 | shl ebx,16 |
145 | shl ecx,16 |
145 | shl ecx,16 |
146 | add ebx,20 |
146 | add ebx,20 |
147 | add ecx,21 |
147 | add ecx,21 |
148 | mov edx,52 |
148 | mov edx,52 |
149 | add edx,1000000000000000000000000000000b |
149 | add edx,1000000000000000000000000000000b |
150 | int 0x40 |
150 | mcall |
151 | 151 | ||
152 | mov eax,13 |
152 | mov eax,13 |
153 | mov ebx,136*65536+20 |
153 | mov ebx,136*65536+20 |
154 | mov ecx,65*65536+20 |
154 | mov ecx,65*65536+20 |
155 | mov edx,[Color] |
155 | mov edx,[Color] |
156 | int 0x40 |
156 | mcall |
157 | 157 | ||
158 | ret |
158 | ret |