Rev 4287 | Rev 4423 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4287 | Rev 4288 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | ;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
4 | ;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
5 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; Distributed under terms of the GNU General Public License ;; |
6 | ;; ;; |
6 | ;; ;; |
7 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
7 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 8... | Line 8... | ||
8 | 8 | ||
Line 9... | Line 9... | ||
9 | $Revision: 4287 $ |
9 | $Revision: 4288 $ |
10 | 10 | ||
11 | ;============================================================================== |
11 | ;============================================================================== |
Line 207... | Line 207... | ||
207 | ;------------------------------------------------------------------------------ |
207 | ;------------------------------------------------------------------------------ |
208 | align 4 |
208 | align 4 |
209 | syscall_display_settings.06: |
209 | syscall_display_settings.06: |
210 | xor esi, esi |
210 | xor esi, esi |
Line 211... | Line 211... | ||
211 | 211 | ||
212 | mov edi, [Screen_Max_X] |
212 | mov edi, [_display.width] |
213 | mov eax, ecx |
213 | mov eax, ecx |
214 | movsx ebx, ax |
214 | movsx ebx, ax |
215 | sar eax, 16 |
215 | sar eax, 16 |
216 | cmp eax, ebx |
216 | cmp eax, ebx |
Line 231... | Line 231... | ||
231 | @@: |
231 | @@: |
232 | mov [screen_workarea.right], ebx |
232 | mov [screen_workarea.right], ebx |
233 | ;-------------------------------------- |
233 | ;-------------------------------------- |
234 | align 4 |
234 | align 4 |
235 | .check_horizontal: |
235 | .check_horizontal: |
236 | mov edi, [Screen_Max_Y] |
236 | mov edi, [_display.height] |
237 | mov eax, edx |
237 | mov eax, edx |
238 | movsx ebx, ax |
238 | movsx ebx, ax |
239 | sar eax, 16 |
239 | sar eax, 16 |
240 | cmp eax, ebx |
240 | cmp eax, ebx |
241 | jge .check_if_redraw_needed |
241 | jge .check_if_redraw_needed |
Line 292... | Line 292... | ||
292 | ;------------------------------------------------------------------------------ |
292 | ;------------------------------------------------------------------------------ |
293 | align 4 |
293 | align 4 |
294 | syscall_display_settings._.calculate_whole_screen: |
294 | syscall_display_settings._.calculate_whole_screen: |
295 | xor eax, eax |
295 | xor eax, eax |
296 | xor ebx, ebx |
296 | xor ebx, ebx |
297 | mov ecx, [Screen_Max_X] |
297 | mov ecx, [_display.width] |
298 | mov edx, [Screen_Max_Y] |
298 | mov edx, [_display.height] |
299 | jmp calculatescreen |
299 | jmp calculatescreen |
300 | ;------------------------------------------------------------------------------ |
300 | ;------------------------------------------------------------------------------ |
301 | align 4 |
301 | align 4 |
302 | syscall_display_settings._.redraw_whole_screen: |
302 | syscall_display_settings._.redraw_whole_screen: |
303 | xor eax, eax |
303 | xor eax, eax |
304 | mov [draw_limits.left], eax |
304 | mov [draw_limits.left], eax |
305 | mov [draw_limits.top], eax |
305 | mov [draw_limits.top], eax |
306 | mov eax, [Screen_Max_X] |
306 | mov eax, [_display.width] |
- | 307 | dec eax |
|
307 | mov [draw_limits.right], eax |
308 | mov [draw_limits.right], eax |
308 | mov eax, [Screen_Max_Y] |
309 | mov eax, [_display.height] |
- | 310 | dec eax |
|
309 | mov [draw_limits.bottom], eax |
311 | mov [draw_limits.bottom], eax |
310 | mov eax, window_data |
312 | mov eax, window_data |
311 | jmp redrawscreen |
313 | jmp redrawscreen |
312 | ;------------------------------------------------------------------------------ |
314 | ;------------------------------------------------------------------------------ |
313 | align 4 |
315 | align 4 |
Line 582... | Line 584... | ||
582 | test [edi + WDATA.fl_wstate], WSTATE_MAXIMIZED |
584 | test [edi + WDATA.fl_wstate], WSTATE_MAXIMIZED |
583 | jnz .fix_maximized |
585 | jnz .fix_maximized |
Line 584... | Line 586... | ||
584 | 586 | ||
585 | mov eax, [edi + WDATA.box.left] |
587 | mov eax, [edi + WDATA.box.left] |
586 | add eax, [edi + WDATA.box.width] |
588 | add eax, [edi + WDATA.box.width] |
587 | mov ebx, [Screen_Max_X] |
589 | mov ebx, [_display.width] |
588 | cmp eax, ebx |
590 | cmp eax, ebx |
589 | jle .fix_vertical |
591 | jl .fix_vertical |
590 | mov eax, [edi + WDATA.box.width] |
592 | mov eax, [edi + WDATA.box.width] |
591 | sub eax, ebx |
593 | sub eax, ebx |
592 | jle @f |
594 | jle @f |
593 | mov [edi + WDATA.box.width], ebx |
595 | mov [edi + WDATA.box.width], ebx |
Line 599... | Line 601... | ||
599 | ;-------------------------------------- |
601 | ;-------------------------------------- |
600 | align 4 |
602 | align 4 |
601 | .fix_vertical: |
603 | .fix_vertical: |
602 | mov eax, [edi + WDATA.box.top] |
604 | mov eax, [edi + WDATA.box.top] |
603 | add eax, [edi + WDATA.box.height] |
605 | add eax, [edi + WDATA.box.height] |
604 | mov ebx, [Screen_Max_Y] |
606 | mov ebx, [_display.height] |
605 | cmp eax, ebx |
607 | cmp eax, ebx |
606 | jle .fix_client_box |
608 | jl .fix_client_box |
607 | mov eax, [edi + WDATA.box.height] |
609 | mov eax, [edi + WDATA.box.height] |
608 | sub eax, ebx |
610 | sub eax, ebx |
609 | jle @f |
611 | jle @f |
610 | mov [edi + WDATA.box.height], ebx |
612 | mov [edi + WDATA.box.height], ebx |
611 | ;-------------------------------------- |
613 | ;-------------------------------------- |
Line 1714... | Line 1716... | ||
1714 | mov eax, [edi + WDATA.box.left] |
1716 | mov eax, [edi + WDATA.box.left] |
1715 | mov ebx, [edi + WDATA.box.top] |
1717 | mov ebx, [edi + WDATA.box.top] |
1716 | mov ecx, [edi + WDATA.box.width] |
1718 | mov ecx, [edi + WDATA.box.width] |
1717 | mov edx, [edi + WDATA.box.height] |
1719 | mov edx, [edi + WDATA.box.height] |
Line 1718... | Line 1720... | ||
1718 | 1720 | ||
1719 | mov esi, [Screen_Max_X] |
1721 | mov esi, [_display.width] |
1720 | cmp ecx, esi |
1722 | cmp ecx, esi |
1721 | ja .fix_width_high |
1723 | jae .fix_width_high |
1722 | ;-------------------------------------- |
1724 | ;-------------------------------------- |
1723 | align 4 |
1725 | align 4 |
1724 | .check_left: |
1726 | .check_left: |
1725 | or eax, eax |
1727 | or eax, eax |
Line 1728... | Line 1730... | ||
1728 | cmp eax, esi |
1730 | cmp eax, esi |
1729 | jg .fix_left_high |
1731 | jg .fix_left_high |
1730 | ;-------------------------------------- |
1732 | ;-------------------------------------- |
1731 | align 4 |
1733 | align 4 |
1732 | .check_height: |
1734 | .check_height: |
1733 | mov esi, [Screen_Max_Y] |
1735 | mov esi, [_display.height] |
1734 | cmp edx, esi |
1736 | cmp edx, esi |
1735 | ja .fix_height_high |
1737 | jae .fix_height_high |
1736 | ;-------------------------------------- |
1738 | ;-------------------------------------- |
1737 | align 4 |
1739 | align 4 |
1738 | .check_top: |
1740 | .check_top: |
1739 | or ebx, ebx |
1741 | or ebx, ebx |
1740 | jl .fix_top_low |
1742 | jl .fix_top_low |
Line 1879... | Line 1881... | ||
1879 | inc ecx |
1881 | inc ecx |
1880 | inc edx |
1882 | inc edx |
Line 1881... | Line 1883... | ||
1881 | 1883 | ||
1882 | ; get WinMap start |
1884 | ; get WinMap start |
1883 | push esi |
- | |
1884 | ; mov edi, [Screen_Max_X] |
- | |
1885 | ; inc edi |
- | |
1886 | ; mov esi, edi |
1885 | push esi |
1887 | mov esi, [Screen_Max_X] |
- | |
1888 | inc esi |
1886 | mov esi, [_display.width] |
1889 | ; imul edi, ebx |
1887 | ; imul edi, ebx |
Line 1890... | Line 1888... | ||
1890 | mov edi, [d_width_calc_area + ebx*4] |
1888 | mov edi, [d_width_calc_area + ebx*4] |
1891 | 1889 | ||
Line 1927... | Line 1925... | ||
1927 | 1925 | ||
Line 1928... | Line 1926... | ||
1928 | push [edi + APPDATA.wnd_shape_scale] ; push scale first -> for loop |
1926 | push [edi + APPDATA.wnd_shape_scale] ; push scale first -> for loop |
1929 | 1927 | ||
1930 | ; get WinMap start -> ebp |
- | |
1931 | push eax |
- | |
1932 | ; mov eax, [Screen_Max_X] ; screen_sx |
- | |
1933 | ; inc eax |
1928 | ; get WinMap start -> ebp |
Line 1934... | Line 1929... | ||
1934 | ; imul eax, ebx |
1929 | push eax |
1935 | mov eax, [d_width_calc_area + ebx*4] |
1930 | mov eax, [d_width_calc_area + ebx*4] |
1936 | 1931 | ||
Line 1996... | Line 1991... | ||
1996 | cmp edx, [ff_xsz] |
1991 | cmp edx, [ff_xsz] |
1997 | jb .ff_new_x |
1992 | jb .ff_new_x |
Line 1998... | Line 1993... | ||
1998 | 1993 | ||
1999 | sub ebp, [ff_xsz] |
1994 | sub ebp, [ff_xsz] |
2000 | add ebp, [ff_x] |
1995 | add ebp, [ff_x] |
2001 | add ebp, [Screen_Max_X] ; screen.x |
1996 | add ebp, [_display.width] ; screen.x |
2002 | inc ebp |
1997 | inc ebp |
2003 | inc ebx |
1998 | inc ebx |
2004 | cmp ebx, [ff_ysz] |
1999 | cmp ebx, [ff_ysz] |