Rev 5872 | Rev 6219 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5872 | Rev 6218 | ||
---|---|---|---|
1 | ;------------------------------------------------------------------------------ |
1 | ;------------------------------------------------------------------------------ |
2 | ; *************************************************** |
2 | ; *************************************************** |
3 | ; ********* WINDOW DEFINITIONS AND DRAW ************* |
3 | ; ********* WINDOW DEFINITIONS AND DRAW ************* |
4 | ; *************************************************** |
4 | ; *************************************************** |
5 | align 4 |
5 | align 4 |
6 | draw_window: |
6 | draw_window: |
7 | pusha |
7 | pusha |
8 | mov [running_applications],-1 |
8 | mov [running_applications],-1 |
9 | mcall 12,1 |
9 | mcall 12,1 |
10 | 10 | ||
11 | mcall 48,3,system_colours,10*4 |
11 | mcall 48,3,system_colours,10*4 |
12 | 12 | ||
13 | mov eax, [system_colours+4*6] |
13 | mov eax, [system_colours.taskbar] |
14 | mov edx,[system_colours+4*6] |
14 | mov edx,[system_colours.taskbar] |
15 | mov eax,COLOR_CHANGE_MAGNITUDE |
15 | mov eax,COLOR_CHANGE_MAGNITUDE |
16 | call subtract_color_change_magnitude |
16 | call subtract_color_change_magnitude |
17 | mov [wcolor], edx |
17 | mov [wcolor], edx |
18 | 18 | ||
19 | mcall 14 ; get screen max x & max y |
19 | mcall 14 ; get screen max x & max y |
20 | 20 | ||
21 | cmp [width],dword 0 |
21 | cmp [width],dword 0 |
22 | je no_def_width |
22 | je no_def_width |
23 | 23 | ||
24 | and eax,0xffff |
24 | and eax,0xffff |
25 | mov ebx,[width] |
25 | mov ebx,[width] |
26 | shl ebx,16 |
26 | shl ebx,16 |
27 | add eax,ebx |
27 | add eax,ebx |
28 | ;-------------------------------------- |
28 | ;-------------------------------------- |
29 | align 4 |
29 | align 4 |
30 | no_def_width: |
30 | no_def_width: |
31 | mov ebx,eax |
31 | mov ebx,eax |
32 | mov [screenxy],ebx |
32 | mov [screenxy],ebx |
33 | shr ebx,16 |
33 | shr ebx,16 |
34 | mov ecx,eax |
34 | mov ecx,eax |
35 | 35 | ||
36 | cmp [place_attachment],1 |
36 | cmp [place_attachment],1 |
37 | je @f |
37 | je @f |
38 | 38 | ||
39 | xor ecx,ecx |
39 | xor ecx,ecx |
40 | mov cx,[height] |
40 | mov cx,[height] |
41 | dec cx |
41 | dec cx |
42 | jmp .attachment_selected |
42 | jmp .attachment_selected |
43 | ;-------------------------------------- |
43 | ;-------------------------------------- |
44 | align 4 |
44 | align 4 |
45 | @@: |
45 | @@: |
46 | sub ecx,[height] |
46 | sub ecx,[height] |
47 | inc ecx |
47 | inc ecx |
48 | shl ecx,16 |
48 | shl ecx,16 |
49 | mov cx,[height] |
49 | mov cx,[height] |
50 | dec cx |
50 | dec cx |
51 | ;-------------------------------------- |
51 | ;-------------------------------------- |
52 | align 4 |
52 | align 4 |
53 | .attachment_selected: |
53 | .attachment_selected: |
54 | xor eax,eax ; DEFINE AND DRAW WINDOW |
54 | xor eax,eax ; DEFINE AND DRAW WINDOW |
55 | mov edx, [wcolor] |
55 | mov edx, [wcolor] |
56 | or edx, 0x01000000 ; do not draw the window |
56 | or edx, 0x01000000 ; do not draw the window |
57 | mov esi, [wcolor] |
57 | mov esi, [wcolor] |
58 | or esi, 0x01000000 ; unmovable window |
58 | or esi, 0x01000000 ; unmovable window |
59 | mov edi, [wcolor] |
59 | mov edi, [wcolor] |
60 | mov [panel_x_pos], ebx |
60 | mov [panel_x_pos], ebx |
61 | mov [panel_y_pos], ecx ; Ïîêà ÷òî òàê. |
61 | mov [panel_y_pos], ecx ; Ïîêà ÷òî òàê. |
62 | mcall |
62 | mcall |
63 | 63 | ||
64 | movzx eax,word [screenxy+2] |
64 | movzx eax,word [screenxy+2] |
65 | mov [max_x],eax |
65 | mov [max_x],eax |
66 | 66 | ||
67 | call fill_window |
67 | call fill_window |
68 | call minimize_left_button |
68 | call minimize_left_button |
69 | call minimize_right_button |
69 | call minimize_right_button |
70 | call draw_menu_and_clean_desktop |
70 | call draw_menu_and_clean_desktop |
71 | mov [ptime],0 |
71 | mov [ptime],0 |
72 | call draw_tray |
72 | call draw_tray |
73 | call draw_application_buttons |
73 | call draw_application_buttons |
74 | 74 | ||
75 | mov [redraw_window_flag],0 |
75 | mov [redraw_window_flag],0 |
76 | mcall 12,2 |
76 | mcall 12,2 |
77 | popa |
77 | popa |
78 | ret |
78 | ret |
79 | ;------------------------------------------------------------------------------ |
79 | ;------------------------------------------------------------------------------ |
80 | align 4 |
80 | align 4 |
81 | fill_window: |
81 | fill_window: |
82 | movzx ebx,word [screenxy+2] |
82 | movzx ebx,word [screenxy+2] |
83 | xor ecx,ecx |
83 | xor ecx,ecx |
84 | mov edx,[wcolor] |
84 | mov edx,[wcolor] |
85 | mov eax,COLOR_CHANGE_MAGNITUDE_0 |
85 | mov eax,COLOR_CHANGE_MAGNITUDE_0 |
86 | imul eax,dword [soften_height] |
86 | imul eax,dword [soften_height] |
87 | call subtract_color_change_magnitude |
87 | call subtract_color_change_magnitude |
88 | cmp [soften_up],dword 0 |
88 | cmp [soften_up],dword 0 |
89 | je no_su |
89 | je no_su |
90 | ;-------------------------------------- |
90 | ;-------------------------------------- |
91 | align 4 |
91 | align 4 |
92 | @@: |
92 | @@: |
93 | mov eax,COLOR_CHANGE_MAGNITUDE_0 |
93 | mov eax,COLOR_CHANGE_MAGNITUDE_0 |
94 | call add_color_change_magnitude |
94 | call add_color_change_magnitude |
95 | ; draw soften_up - the width of 5 pixels |
95 | ; draw soften_up - the width of 5 pixels |
96 | and edx,0x00FFFFFF |
96 | and edx,0x00FFFFFF |
97 | mcall 38 |
97 | mcall 38 |
98 | 98 | ||
99 | add ecx,1*65536+1 |
99 | add ecx,1*65536+1 |
100 | cmp cx,[soften_height] ;5 |
100 | cmp cx,[soften_height] ;5 |
101 | jb @r |
101 | jb @r |
102 | ;-------------------------------------- |
102 | ;-------------------------------------- |
103 | align 4 |
103 | align 4 |
104 | no_su: |
104 | no_su: |
105 | cmp [soften_down],dword 0 |
105 | cmp [soften_down],dword 0 |
106 | je no_sd |
106 | je no_sd |
107 | ; draw soften_down - the width of 5 pixels |
107 | ; draw soften_down - the width of 5 pixels |
108 | pusha |
108 | pusha |
109 | mov esi,[soften_height] |
109 | mov esi,[soften_height] |
110 | mov ecx,[height] |
110 | mov ecx,[height] |
111 | dec ecx |
111 | dec ecx |
112 | shl ecx,16 |
112 | shl ecx,16 |
113 | add ecx,[height] |
113 | add ecx,[height] |
114 | dec ecx |
114 | dec ecx |
115 | mov edx,[wcolor] |
115 | mov edx,[wcolor] |
116 | mov eax,COLOR_CHANGE_MAGNITUDE_0 |
116 | mov eax,COLOR_CHANGE_MAGNITUDE_0 |
117 | imul eax,dword [soften_height] |
117 | imul eax,dword [soften_height] |
118 | call subtract_color_change_magnitude |
118 | call subtract_color_change_magnitude |
119 | ;-------------------------------------- |
119 | ;-------------------------------------- |
120 | align 4 |
120 | align 4 |
121 | @@: |
121 | @@: |
122 | mov eax,COLOR_CHANGE_MAGNITUDE_0 |
122 | mov eax,COLOR_CHANGE_MAGNITUDE_0 |
123 | call add_color_change_magnitude |
123 | call add_color_change_magnitude |
124 | and edx,0x00FFFFFF |
124 | and edx,0x00FFFFFF |
125 | mcall 38 |
125 | mcall 38 |
126 | sub ecx,1*65536+1 |
126 | sub ecx,1*65536+1 |
127 | dec esi |
127 | dec esi |
128 | jnz @r |
128 | jnz @r |
129 | popa |
129 | popa |
130 | ;-------------------------------------- |
130 | ;-------------------------------------- |
131 | align 4 |
131 | align 4 |
132 | no_sd: |
132 | no_sd: |
133 | movzx ebx,word [screenxy+2] |
133 | movzx ebx,word [screenxy+2] |
134 | xor ecx,ecx |
134 | xor ecx,ecx |
135 | cmp [soften_up],dword 0 |
135 | cmp [soften_up],dword 0 |
136 | je @f |
136 | je @f |
137 | 137 | ||
138 | add ecx,[soften_height] |
138 | add ecx,[soften_height] |
139 | rol ecx,16 |
139 | rol ecx,16 |
140 | add ecx,[soften_height] |
140 | add ecx,[soften_height] |
141 | ;-------------------------------------- |
141 | ;-------------------------------------- |
142 | align 4 |
142 | align 4 |
143 | @@: |
143 | @@: |
144 | mov edx,[wcolor] |
144 | mov edx,[wcolor] |
145 | ;-------------------------------------- |
145 | ;-------------------------------------- |
146 | align 4 |
146 | align 4 |
147 | newline3: |
147 | newline3: |
148 | and edx,0x00FFFFFF |
148 | and edx,0x00FFFFFF |
149 | mov eax,[height] |
149 | mov eax,[height] |
150 | cmp [soften_up],dword 0 |
150 | cmp [soften_up],dword 0 |
151 | je @f |
151 | je @f |
152 | 152 | ||
153 | sub eax,[soften_height] |
153 | sub eax,[soften_height] |
154 | ;-------------------------------------- |
154 | ;-------------------------------------- |
155 | align 4 |
155 | align 4 |
156 | @@: |
156 | @@: |
157 | cmp [soften_down],dword 0 |
157 | cmp [soften_down],dword 0 |
158 | je @f |
158 | je @f |
159 | 159 | ||
160 | sub eax,[soften_height] |
160 | sub eax,[soften_height] |
161 | ;-------------------------------------- |
161 | ;-------------------------------------- |
162 | align 4 |
162 | align 4 |
163 | @@: |
163 | @@: |
164 | mov cx,ax |
164 | mov cx,ax |
165 | inc ebx |
165 | inc ebx |
166 | mcall 13 |
166 | mcall 13 |
167 | ret |
167 | ret |
168 | ;------------------------------------------------------------------------------ |
168 | ;------------------------------------------------------------------------------ |
169 | align 4 |
169 | align 4 |
170 | minimize_left_button: |
170 | minimize_left_button: |
171 | cmp [minimize_left],dword 0 |
171 | cmp [minimize_left],dword 0 |
172 | je .exit |
172 | je .exit |
173 | 173 | ||
174 | mov ecx,1 *65536 |
174 | mov ecx,1 *65536 |
175 | add ecx,[height] |
175 | add ecx,[height] |
176 | dec ecx |
176 | dec ecx |
177 | mov edx,101 |
177 | mov edx,101 |
178 | or edx,0x40000000 |
178 | or edx,0x40000000 |
179 | mcall 8,<0,9>,,,[wcolor] ; ABS LEFT |
179 | mcall 8,<0,9>,,,[wcolor] ; ABS LEFT |
180 | 180 | ||
181 | mov ebx,2*65536 ;+6 |
181 | mov ebx,2*65536 ;+6 |
182 | mov bx,[height] |
182 | mov bx,[height] |
183 | shr bx,1 |
183 | shr bx,1 |
184 | sub bx,3 |
184 | sub bx,3 |
185 | mov edx,[wcolor] |
185 | mov edx,[wcolor] |
186 | mov eax,COLOR_CHANGE_MAGNITUDE_2 |
186 | mov eax,COLOR_CHANGE_MAGNITUDE_2 |
187 | call add_color_change_magnitude |
187 | call add_color_change_magnitude |
188 | mov ecx,edx |
188 | mov ecx,edx |
189 | mcall 4,,,hidetext,1 ; HIDE TEXT |
189 | mcall 4,,,hidetext,1 ; HIDE TEXT |
190 | ;-------------------------------------- |
190 | ;-------------------------------------- |
191 | align 4 |
191 | align 4 |
192 | .exit: |
192 | .exit: |
193 | ret |
193 | ret |
194 | ;------------------------------------------------------------------------------ |
194 | ;------------------------------------------------------------------------------ |
195 | align 4 |
195 | align 4 |
196 | minimize_right_button: |
196 | minimize_right_button: |
197 | cmp [minimize_right],dword 0 |
197 | cmp [minimize_right],dword 0 |
198 | je .exit |
198 | je .exit |
199 | mov eax,[max_x] |
199 | mov eax,[max_x] |
200 | sub eax,77 |
200 | sub eax,77 |
201 | shl eax,16 |
201 | shl eax,16 |
202 | mov ebx,eax |
202 | mov ebx,eax |
203 | add ebx,67 |
203 | add ebx,67 |
204 | 204 | ||
205 | mov ecx,1 *65536 |
205 | mov ecx,1 *65536 |
206 | add ecx,[height] |
206 | add ecx,[height] |
207 | dec ecx |
207 | dec ecx |
208 | add ebx,68*65536 |
208 | add ebx,68*65536 |
209 | mov bx,10 ;9 |
209 | mov bx,10 ;9 |
210 | mov edx,102 |
210 | mov edx,102 |
211 | or edx,0x40000000 |
211 | or edx,0x40000000 |
212 | mcall 8,,,,[wcolor] ; ABS RIGHT |
212 | mcall 8,,,,[wcolor] ; ABS RIGHT |
213 | 213 | ||
214 | mov ebx,[max_x] |
214 | mov ebx,[max_x] |
215 | sub ebx,6 |
215 | sub ebx,6 |
216 | shl ebx,16 |
216 | shl ebx,16 |
217 | mov bx,[height] |
217 | mov bx,[height] |
218 | shr bx,1 |
218 | shr bx,1 |
219 | sub bx,3 |
219 | sub bx,3 |
220 | mov edx,[wcolor] |
220 | mov edx,[wcolor] |
221 | mov eax,COLOR_CHANGE_MAGNITUDE_2 |
221 | mov eax,COLOR_CHANGE_MAGNITUDE_2 |
222 | call add_color_change_magnitude |
222 | call add_color_change_magnitude |
223 | mov ecx,edx |
223 | mov ecx,edx |
224 | mov esi,1 |
224 | mov esi,1 |
225 | mcall 4,,,hidetext+1 |
225 | mcall 4,,,hidetext+1 |
226 | ;-------------------------------------- |
226 | ;-------------------------------------- |
227 | align 4 |
227 | align 4 |
228 | .exit: |
228 | .exit: |
229 | ret |
229 | ret |
230 | ;------------------------------------------------------------------------------ |
230 | ;------------------------------------------------------------------------------ |
231 | align 4 |
231 | align 4 |
232 | draw_menu_and_clean_desktop: |
232 | draw_menu_and_clean_desktop: |
233 | pusha |
233 | pusha |
234 | ; check draw for menu |
234 | ; check draw for menu |
235 | cmp [menu_enable],dword 0 |
235 | cmp [menu_enable],dword 0 |
236 | je no_menu |
236 | je no_menu |
237 | ; calculate and draw menu |
237 | ; calculate and draw menu |
238 | mov ebx, (0 shl 16) + MENU_SIZE-3 |
238 | mov ebx, (0 shl 16) + MENU_SIZE-3 |
239 | ; check for left minimize button enabled |
239 | ; check for left minimize button enabled |
240 | cmp [minimize_left],dword 0 |
240 | cmp [minimize_left],dword 0 |
241 | je @f |
241 | je @f |
242 | 242 | ||
243 | add ebx, ML_SIZE shl 16 |
243 | add ebx, ML_SIZE shl 16 |
244 | ;-------------------------------------- |
244 | ;-------------------------------------- |
245 | align 4 |
245 | align 4 |
246 | @@: |
246 | @@: |
247 | mov ecx, [height] |
247 | mov ecx, [height] |
248 | mov edx, 0x60d1ff01 |
248 | mov edx, 0x60d1ff01 |
249 | mcall 8,,,,[wcolor] ; MENU BUTTON |
249 | mcall 8,,,,[wcolor] ; MENU BUTTON |
250 | 250 | ||
251 | mov eax,ebx |
251 | mov eax,ebx |
252 | shr eax,16 |
252 | shr eax,16 |
253 | mov [menu_button_x.start],eax |
253 | mov [menu_button_x.start],eax |
254 | 254 | ||
255 | mov eax,ebx |
255 | mov eax,ebx |
256 | and eax,0xffff |
256 | and eax,0xffff |
257 | mov [menu_button_x.size],eax |
257 | mov [menu_button_x.size],eax |
258 | 258 | ||
259 | mov eax,ecx |
259 | mov eax,ecx |
260 | shr eax,16 |
260 | shr eax,16 |
261 | mov [menu_button_y.start],eax |
261 | mov [menu_button_y.start],eax |
262 | 262 | ||
263 | mov eax,ecx |
263 | mov eax,ecx |
264 | and eax,0xffff |
264 | and eax,0xffff |
265 | mov [menu_button_y.size],eax |
265 | mov [menu_button_y.size],eax |
266 | 266 | ||
267 | call calculate_button_y_coordinate_and_size |
267 | call calculate_button_y_coordinate_and_size |
268 | mov edx,[MenuButton_color] ;0x44aa44 |
268 | mov edx,[MenuButton_color] ;0x44aa44 |
269 | mov esi,[wcolor] |
269 | mov esi,[wcolor] |
270 | add ebx,3 shl 16 - 5 |
270 | add ebx,3 shl 16 - 5 |
271 | call draw_appl_button |
271 | call draw_appl_button |
272 | 272 | ||
273 | add ebx, 4*65536 |
273 | add ebx, 4*65536 |
274 | mov bx,[height] |
274 | mov bx,[height] |
275 | shr bx,1 |
275 | shr bx,1 |
276 | sub bx,7 |
276 | sub bx,7 |
277 | mov ecx,[PanelText_color] |
277 | mov ecx,[PanelText_color] |
278 | or ecx,0x10000000 |
278 | or ecx,0x10000000 |
279 | if lang eq et |
279 | if lang eq et |
280 | mcall 4,,,m_text,5 |
280 | mcall 4,,,m_text,5 |
281 | else |
281 | else |
282 | mcall 4,,,m_text,4 |
282 | mcall 4,,,m_text,4 |
283 | end if |
283 | end if |
284 | ;-------------------------------------- |
284 | ;-------------------------------------- |
285 | align 4 |
285 | align 4 |
286 | no_menu: |
286 | no_menu: |
287 | ; check draw for clean desktop button |
287 | ; check draw for clean desktop button |
288 | cmp [clean_desktop_enable],dword 0 |
288 | cmp [clean_desktop_enable],dword 0 |
289 | je .exit |
289 | je .exit |
290 | ; calculate and draw clean desktop button |
290 | ; calculate and draw clean desktop button |
291 | mov ebx, (0 shl 16) + CLD_SIZE-5 |
291 | mov ebx, (0 shl 16) + CLD_SIZE-5 |
292 | ; check for left minimize button enabled |
292 | ; check for left minimize button enabled |
293 | cmp [minimize_left],dword 0 |
293 | cmp [minimize_left],dword 0 |
294 | je @f |
294 | je @f |
295 | 295 | ||
296 | add ebx, ML_SIZE shl 16 |
296 | add ebx, ML_SIZE shl 16 |
297 | ;-------------------------------------- |
297 | ;-------------------------------------- |
298 | align 4 |
298 | align 4 |
299 | @@: |
299 | @@: |
300 | ; check for menu button enabled |
300 | ; check for menu button enabled |
301 | cmp [menu_enable],dword 0 |
301 | cmp [menu_enable],dword 0 |
302 | je @f |
302 | je @f |
303 | 303 | ||
304 | add ebx, MENU_SIZE shl 16 |
304 | add ebx, MENU_SIZE shl 16 |
305 | ;-------------------------------------- |
305 | ;-------------------------------------- |
306 | align 4 |
306 | align 4 |
307 | @@: |
307 | @@: |
308 | ; Inserted code for drawing buttons 103, 104, 105 (Clean, Restore, Exchange windows) |
308 | ; Inserted code for drawing buttons 103, 104, 105 (Clean, Restore, Exchange windows) |
309 | mov esi, dword [system_colours+24] ; drawing buttons |
309 | mov esi, dword [system_colours+24] ; drawing buttons |
310 | and esi, 0x00ffffff |
310 | and esi, 0x00ffffff |
311 | mov edx, 0x60000000 + 103 |
311 | mov edx, 0x60000000 + 103 |
312 | mov ecx, [height] |
312 | mov ecx, [height] |
313 | mcall 8 ;,,<3,13> |
313 | mcall 8 ;,,<3,13> |
314 | 314 | ||
315 | call calculate_button_y_coordinate_and_size |
315 | call calculate_button_y_coordinate_and_size |
316 | mov edx,[CleanDesktopButton_color] ;time_bgr_color |
316 | mov edx,[CleanDesktopButton_color] ;time_bgr_color |
317 | mov esi,[wcolor] |
317 | mov esi,[wcolor] |
318 | call draw_appl_button |
318 | call draw_appl_button |
319 | 319 | ||
320 | mov ecx,[PanelText_color] |
320 | mov ecx,[PanelText_color] |
321 | add ebx,5 shl 16 |
321 | add ebx,5 shl 16 |
322 | mov bx,[height] |
322 | mov bx,[height] |
323 | shr bx,1 |
323 | shr bx,1 |
324 | sub bx,2 |
324 | sub bx,2 |
325 | mcall 4,,,page_clean_but,1 |
325 | mcall 4,,,page_clean_but,1 |
326 | sub bx,2 |
326 | sub bx,2 |
327 | mcall ,,,page_clean_but+1 |
327 | mcall ,,,page_clean_but+1 |
328 | ;-------------------------------------- |
328 | ;-------------------------------------- |
329 | align 4 |
329 | align 4 |
330 | .exit: |
330 | .exit: |
331 | popa |
331 | popa |
332 | ret |
332 | ret |
333 | ;------------------------------------------------------------------------------ |
333 | ;------------------------------------------------------------------------------ |
334 | align 4 |
334 | align 4 |
335 | draw_application_buttons: |
335 | draw_application_buttons: |
336 | pusha |
336 | pusha |
337 | 337 | ||
338 | cmp [run_appl],dword 0 ; do not draw application buttons |
338 | cmp [run_appl],dword 0 ; do not draw application buttons |
339 | je .exit |
339 | je .exit |
340 | 340 | ||
341 | call calculate_offset_X |
341 | call calculate_offset_X |
342 | 342 | ||
343 | mov eax,[screenxy] |
343 | mov eax,[screenxy] |
344 | shr eax,16 |
344 | shr eax,16 |
345 | 345 | ||
346 | sub eax,[offset_X] |
346 | sub eax,[offset_X] |
347 | ; check for left minimize button enabled |
347 | ; check for left minimize button enabled |
348 | cmp [minimize_right],dword 0 |
348 | cmp [minimize_right],dword 0 |
349 | je @f |
349 | je @f |
350 | 350 | ||
351 | sub eax, MR_SIZE |
351 | sub eax, MR_SIZE |
352 | ;-------------------------------------- |
352 | ;-------------------------------------- |
353 | align 4 |
353 | align 4 |
354 | @@: |
354 | @@: |
355 | cmp [clock_enable],dword 0 |
355 | cmp [clock_enable],dword 0 |
356 | je @f |
356 | je @f |
357 | 357 | ||
358 | sub eax,CLOCK_SIZE |
358 | sub eax,CLOCK_SIZE |
359 | ;-------------------------------------- |
359 | ;-------------------------------------- |
360 | align 4 |
360 | align 4 |
361 | @@: |
361 | @@: |
362 | cmp [cpu_usage_enable],dword 0 |
362 | cmp [cpu_usage_enable],dword 0 |
363 | je @f |
363 | je @f |
364 | 364 | ||
365 | sub eax,CPU_USAGE_SIZE |
365 | sub eax,CPU_USAGE_SIZE |
366 | ;-------------------------------------- |
366 | ;-------------------------------------- |
367 | align 4 |
367 | align 4 |
368 | @@: |
368 | @@: |
369 | cmp [chlang_enable],dword 0 |
369 | cmp [chlang_enable],dword 0 |
370 | je @f |
370 | je @f |
371 | 371 | ||
372 | sub eax,CHLANG_SIZE |
372 | sub eax,CHLANG_SIZE |
373 | ;-------------------------------------- |
373 | ;-------------------------------------- |
374 | align 4 |
374 | align 4 |
375 | @@: |
375 | @@: |
376 | cmp [page_list_enable],dword 0 |
376 | cmp [page_list_enable],dword 0 |
377 | je @f |
377 | je @f |
378 | 378 | ||
379 | sub eax,PAGE_LIST_SIZE |
379 | sub eax,PAGE_LIST_SIZE |
380 | ;-------------------------------------- |
380 | ;-------------------------------------- |
381 | align 4 |
381 | align 4 |
382 | @@: |
382 | @@: |
383 | mov ebx, TAB_SIZE |
383 | mov ebx, TAB_SIZE |
384 | xor edx,edx |
384 | xor edx,edx |
385 | div ebx |
385 | div ebx |
386 | mov [max_applications], eax |
386 | mov [max_applications], eax |
387 | xor edi,edi |
387 | xor edi,edi |
388 | ;-------------------------------------- |
388 | ;-------------------------------------- |
389 | align 4 |
389 | align 4 |
390 | .nb: |
390 | .nb: |
391 | mov ebx,edi |
391 | mov ebx,edi |
392 | imul ebx,TAB_SIZE |
392 | imul ebx,TAB_SIZE |
393 | add ebx,[offset_X] |
393 | add ebx,[offset_X] |
394 | shl ebx,16 |
394 | shl ebx,16 |
395 | mov bx, TAB_SIZE-1 |
395 | mov bx, TAB_SIZE-1 |
396 | mov edx,edi |
396 | mov edx,edi |
397 | add edx,52 |
397 | add edx,52 |
398 | or edx,0x60000000 |
398 | or edx,0x60000000 |
399 | mov ecx, [height] |
399 | mov ecx, [height] |
400 | mcall 8,,,,[wcolor] |
400 | mcall 8,,,,[wcolor] |
401 | 401 | ||
402 | inc edi |
402 | inc edi |
403 | cmp edi,[max_applications] |
403 | cmp edi,[max_applications] |
404 | jb .nb |
404 | jb .nb |
405 | ;-------------------------------------- |
405 | ;-------------------------------------- |
406 | align 4 |
406 | align 4 |
407 | .exit: |
407 | .exit: |
408 | popa |
408 | popa |
409 | ret |
409 | ret |
410 | ;------------------------------------------------------------------------------ |
410 | ;------------------------------------------------------------------------------ |
411 | align 4 |
411 | align 4 |
412 | calculate_offset_X: |
412 | calculate_offset_X: |
413 | push eax |
413 | push eax |
414 | xor eax,eax |
414 | xor eax,eax |
415 | ; check for left minimize button enabled |
415 | ; check for left minimize button enabled |
416 | cmp [minimize_left],dword 0 |
416 | cmp [minimize_left],dword 0 |
417 | je @f |
417 | je @f |
418 | 418 | ||
419 | add eax, ML_SIZE |
419 | add eax, ML_SIZE |
420 | ;-------------------------------------- |
420 | ;-------------------------------------- |
421 | align 4 |
421 | align 4 |
422 | @@: |
422 | @@: |
423 | ; check for menu button enabled |
423 | ; check for menu button enabled |
424 | cmp [menu_enable],dword 0 |
424 | cmp [menu_enable],dword 0 |
425 | je @f |
425 | je @f |
426 | 426 | ||
427 | add eax, MENU_SIZE |
427 | add eax, MENU_SIZE |
428 | ;-------------------------------------- |
428 | ;-------------------------------------- |
429 | align 4 |
429 | align 4 |
430 | @@: |
430 | @@: |
431 | ; check for clean desktop button enabled |
431 | ; check for clean desktop button enabled |
432 | cmp [clean_desktop_enable],dword 0 |
432 | cmp [clean_desktop_enable],dword 0 |
433 | je @f |
433 | je @f |
434 | 434 | ||
435 | add eax, CLD_SIZE |
435 | add eax, CLD_SIZE |
436 | ;-------------------------------------- |
436 | ;-------------------------------------- |
437 | align 4 |
437 | align 4 |
438 | @@: |
438 | @@: |
439 | mov [offset_X],eax |
439 | mov [offset_X],eax |
440 | pop eax |
440 | pop eax |
441 | ret |
441 | ret |
442 | ;------------------------------------------------------------------------------3,13>0,9> |
442 | ;------------------------------------------------------------------------------3,13>0,9> |