Rev 105 | Rev 114 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 105 | Rev 112 | ||
---|---|---|---|
Line 45... | Line 45... | ||
45 | ; eax = cx |
45 | ; eax = cx |
46 | ; ebx = cy |
46 | ; ebx = cy |
47 | ; ecx = ex |
47 | ; ecx = ex |
48 | ; edx = ey |
48 | ; edx = ey |
49 | ; èäåÿ: ïåðåáðàòü âñå îêíà, íà÷èíàÿ ñ ñàìîãî íèæíåãî, |
49 | ; èäåÿ: ïåðåáðàòü âñå îêíà, íà÷èíàÿ ñ ñàìîãî íèæíåãî, |
- | 50 | ; è äëÿ ïîïàâøèõ â çàäàííóþ îáëàñòü |
|
50 | ; è äëÿ êàæäîãî âûçâàòü setscreen |
51 | ; ÷àñòåé îêîí âûçâàòü setscreen |
51 | align 4 |
52 | align 4 |
52 | calculatescreen: |
53 | calculatescreen: |
53 | pushad |
54 | pushad |
54 | pushfd |
55 | pushfd |
55 | cli |
56 | cli |
Line -... | Line 57... | ||
- | 57 | ||
- | 58 | push edx ecx ebx eax |
|
56 | 59 | ||
57 | mov esi, 1 |
- | |
58 | xor eax, eax |
- | |
59 | xor ebx, ebx |
- | |
60 | mov ecx, [0xFE00] |
- | |
61 | mov edx, [0xFE04] |
60 | mov esi, 1 |
Line 62... | Line 61... | ||
62 | call setscreen |
61 | call setscreen |
63 | 62 | ||
64 | mov ebp, [0x3004] ; number of processes |
63 | mov ebp, [0x3004] ; number of processes |
Line 73... | Line 72... | ||
73 | je .not_wnd |
72 | je .not_wnd |
Line 74... | Line 73... | ||
74 | 73 | ||
75 | add edi, window_data |
74 | add edi, window_data |
76 | test [edi+WDATA.fl_wstate],WSTATE_MINIMIZED |
75 | test [edi+WDATA.fl_wstate], WSTATE_MINIMIZED |
- | 76 | jnz .not_wnd |
|
77 | jnz .not_wnd |
77 | |
- | 78 | mov eax, [edi+WDATA.left] |
|
- | 79 | cmp eax, [esp+RECT.right] |
|
78 | mov eax,[edi+WDATA.left] |
80 | ja .out_of_bounds |
- | 81 | mov ebx, [edi+WDATA.top] |
|
- | 82 | cmp ebx, [esp+RECT.bottom] |
|
79 | mov ebx,[edi+WDATA.top] |
83 | ja .out_of_bounds |
80 | mov ecx,[edi+WDATA.width] |
84 | mov ecx, [edi+WDATA.width] |
- | 85 | add ecx, eax |
|
- | 86 | cmp ecx, [esp+RECT.left] |
|
81 | add ecx,eax |
87 | jb .out_of_bounds |
82 | mov edx,[edi+WDATA.height] |
88 | mov edx, [edi+WDATA.height] |
- | 89 | add edx, ebx |
|
- | 90 | cmp edx, [esp+RECT.top] |
|
- | 91 | jb .out_of_bounds |
|
- | 92 | ||
- | 93 | cmp eax, [esp+RECT.left] |
|
- | 94 | jae @f |
|
- | 95 | mov eax, [esp+RECT.left] |
|
- | 96 | @@: |
|
- | 97 | cmp ebx, [esp+RECT.top] |
|
- | 98 | jae @f |
|
- | 99 | mov ebx, [esp+RECT.top] |
|
- | 100 | @@: |
|
- | 101 | cmp ecx, [esp+RECT.right] |
|
- | 102 | jbe @f |
|
- | 103 | mov ecx, [esp+RECT.right] |
|
- | 104 | @@: |
|
- | 105 | cmp edx, [esp+RECT.bottom] |
|
- | 106 | jbe @f |
|
- | 107 | mov edx, [esp+RECT.bottom] |
|
- | 108 | @@: |
|
83 | add edx,ebx |
109 | |
84 | push esi |
110 | push esi |
85 | movzx esi, word [0xC400 + esi * 2] |
111 | movzx esi, word [0xC400 + esi * 2] |
86 | call setscreen |
112 | call setscreen |
- | 113 | pop esi |
|
87 | pop esi |
114 | |
- | 115 | .not_wnd: |
|
88 | .not_wnd: |
116 | .out_of_bounds: |
89 | inc esi |
117 | inc esi |
90 | dec ebp |
118 | dec ebp |
91 | jnz .new_wnd |
119 | jnz .new_wnd |
- | 120 | .finish: |
|
- | 121 | ||
- | 122 | pop eax ebx ecx edx |
|
92 | .finish: |
123 | |
93 | popfd |
124 | popfd |
94 | popad |
125 | popad |
Line 95... | Line 126... | ||
95 | ret |
126 | ret |
- | 127 | ||
- | 128 | ||
- | 129 | ||
96 | 130 | virtual at esp |
|
97 | 131 | ff_x dd ? |
|
98 | 132 | ff_y dd ? |
|
99 | virtual at esp |
133 | ff_width dd ? |
Line 184... | Line 218... | ||
184 | 218 | ||
185 | ; get WinMap start -> ebp |
219 | ; get WinMap start -> ebp |
186 | push eax |
220 | push eax |
187 | mov eax, [0xFE00] ; screen_sx |
221 | mov eax, [0xFE00] ; screen_sx |
188 | inc eax |
222 | inc eax |
189 | imul eax, ebx ;ebx |
223 | imul eax, ebx |
190 | add eax, [esp] ;eax |
224 | add eax, [esp] |
191 | add eax, WinMapAddress |
225 | add eax, WinMapAddress |
Line 192... | Line 226... | ||
192 | mov ebp, eax |
226 | mov ebp, eax |
193 | - | ||
194 | mov edi, [edi] |
- | |
195 | ; mov eax, esi |
- | |
196 | ; shl eax, 5 |
227 | |
Line 197... | Line 228... | ||
197 | ; add edi, [eax+0x3000+0x10] |
228 | mov edi, [edi] |
198 | pop eax |
229 | pop eax |
199 | 230 | ||
200 | ; eax = x_start |
231 | ; eax = x_start |
201 | ; ebx = y_start |
232 | ; ebx = y_start |
202 | ; ecx = x_size |
233 | ; ecx = x_size |
203 | ; edx = y_size |
234 | ; edx = y_size |
204 | ; esi = process_number |
235 | ; esi = process_number |
- | 236 | ; edi = &shape |
|
205 | ; edi = &shape |
237 | ; [scale] |
206 | ; [scale] |
238 | push edx ecx ; for loop - x,y size |
- | 239 | ||
- | 240 | mov ecx, esi |
|
- | 241 | shl ecx, 5 |
|
- | 242 | mov edx, [window_data+ecx+WDATA.top] |
|
- | 243 | push [window_data+ecx+WDATA.width] ; for loop - width |
|
- | 244 | mov ecx, [window_data+ecx+WDATA.left] |
|
- | 245 | sub ebx, edx |
|
- | 246 | sub eax, ecx |
|
- | 247 | push ebx eax ; for loop - x,y |
|
- | 248 | ||
- | 249 | add [ff_xsz], eax |
|
- | 250 | add [ff_ysz], ebx |
|
207 | push edx ecx ;ebx eax |
251 | |
208 | xor ebx, ebx |
252 | mov ebx, [ff_y] |
209 | align 4 |
253 | |
210 | .ff_new_y: |
254 | .ff_new_y: |
211 | xor edx, edx |
255 | mov edx, [ff_x] |
212 | align 4 |
256 | |
213 | .ff_new_x: |
257 | .ff_new_x: |
- | 258 | ; -- body -- |
|
214 | ; -- body -- |
259 | mov ecx, [ff_scale] |
215 | mov ecx, [ff_scale] |
260 | mov eax, [ff_width] |
216 | mov eax, [ff_xsz] |
261 | inc eax |
217 | shr eax, cl |
262 | shr eax, cl |
218 | push ebx edx |
263 | push ebx edx |
219 | shr ebx, cl |
264 | shr ebx, cl |
220 | shr edx, cl |
265 | shr edx, cl |
221 | imul eax, ebx |
266 | imul eax, ebx |
222 | add eax, edx |
267 | add eax, edx |
223 | pop edx ebx |
- | |
224 | add eax, edi ;[ff_shape] |
- | |
225 | call .read_byte |
268 | pop edx ebx |
226 | ; cmp byte [eax], 1 |
269 | add eax, edi |
227 | ; jne @f |
270 | call .read_byte |
228 | test al,al |
271 | test al,al |
229 | jz @f |
272 | jz @f |
230 | mov eax, esi ; [ff_proc] |
273 | mov eax, esi |
231 | mov [ebp], al |
274 | mov [ebp], al |
232 | @@: |
275 | @@: |
233 | ; -- end body -- |
276 | ; -- end body -- |
234 | inc ebp |
277 | inc ebp |
235 | inc edx |
278 | inc edx |
- | 279 | cmp edx, [ff_xsz] |
|
236 | cmp edx, [ff_xsz] |
280 | jb .ff_new_x |
237 | jb .ff_new_x |
281 | sub ebp, [ff_xsz] |
238 | sub ebp, [ff_xsz] |
282 | add ebp, [ff_x] |
239 | add ebp, [0xFE00] ; screen.x |
283 | add ebp, [0xFE00] ; screen.x |
240 | inc ebp |
284 | inc ebp |
Line 241... | Line -... | ||
241 | inc ebx |
- | |
242 | cmp ebx, [ff_ysz] |
285 | inc ebx |
243 | jb .ff_new_y |
286 | cmp ebx, [ff_ysz] |
244 | 287 | jb .ff_new_y |
|
Line 245... | Line 288... | ||
245 | pop ecx edx ; eax ebx first |
288 | |
Line 387... | Line 430... | ||
387 | mov [screen_workarea.top],eax |
430 | mov [screen_workarea.top],eax |
388 | @@: cmp ebx,[0xFE04] |
431 | @@: cmp ebx,[0xFE04] |
389 | jg .lp2 |
432 | jg .lp2 |
390 | mov [screen_workarea.bottom],ebx |
433 | mov [screen_workarea.bottom],ebx |
391 | .lp2: call repos_windows |
434 | .lp2: call repos_windows |
- | 435 | mov eax, 0 |
|
- | 436 | mov ebx, 0 |
|
- | 437 | mov ecx, [0xfe00] |
|
- | 438 | mov edx, [0xfe04] |
|
392 | call calculatescreen |
439 | call calculatescreen |
393 | ; jmp redraw_screen_direct |
440 | ; jmp redraw_screen_direct |
394 | .exit: |
441 | .exit: |
395 | popad |
442 | popad |
396 | ret |
443 | ret |
Line 434... | Line 481... | ||
434 | mov esi,skin_data+64*512 |
481 | mov esi,skin_data+64*512 |
435 | mov edi,skin_data |
482 | mov edi,skin_data |
436 | mov ecx,(64*512)/4 |
483 | mov ecx,(64*512)/4 |
437 | rep movsd |
484 | rep movsd |
438 | call parse_skin_data |
485 | call parse_skin_data |
- | 486 | pushad |
|
- | 487 | mov eax, 0 |
|
- | 488 | mov ebx, 0 |
|
- | 489 | mov ecx, [0xfe00] |
|
- | 490 | mov edx, [0xfe04] |
|
439 | call calculatescreen |
491 | call calculatescreen |
- | 492 | popad |
|
440 | mov dword[esp+32+36],0 |
493 | mov dword[esp+32+36],0 |
441 | jmp redraw_screen_direct |
494 | jmp redraw_screen_direct |
442 | .exit: |
495 | .exit: |
443 | mov [esp+32+36],eax |
496 | mov [esp+32+36],eax |
444 | popad |
497 | popad |
Line 1004... | Line 1057... | ||
1004 | jnz .skip_redrawings |
1057 | jnz .skip_redrawings |
1005 | pushfd |
1058 | pushfd |
1006 | cli |
1059 | cli |
1007 | or [eax+WDATA.fl_wstate], WSTATE_MINIMIZED |
1060 | or [eax+WDATA.fl_wstate], WSTATE_MINIMIZED |
1008 | mov edi, eax |
1061 | mov edi, eax |
1009 | call calculatescreen |
1062 | ;call calculatescreen |
1010 | mov eax, [edi+WDATA.left] |
1063 | mov eax, [edi+WDATA.left] |
1011 | mov [dlx], eax |
1064 | mov [dlx], eax |
- | 1065 | mov ecx, eax |
|
1012 | add eax, [edi+WDATA.width] |
1066 | add ecx, [edi+WDATA.width] |
1013 | mov [dlxe], eax |
1067 | mov [dlxe], ecx |
1014 | mov eax, [edi+WDATA.top] |
1068 | mov ebx, [edi+WDATA.top] |
1015 | mov [dly], eax |
1069 | mov [dly], ebx |
- | 1070 | mov edx, ebx |
|
1016 | add eax, [edi+WDATA.height] |
1071 | add edx, [edi+WDATA.height] |
1017 | mov [dlye], eax |
1072 | mo |