444,11 → 444,13 |
mov [_display.width], eax |
mov [display_width_standard], eax |
dec eax |
mov [Screen_Max_X], eax |
mov [screen_workarea.right], eax |
movzx eax, word [BOOT_VARS+BOOT_Y_RES]; Y max |
mov [_display.height], eax |
mov [display_height_standard], eax |
dec eax |
mov [Screen_Max_Y], eax |
mov [screen_workarea.bottom], eax |
movzx eax, word [BOOT_VARS+BOOT_VESA_MODE] ; screen mode |
mov dword [SCR_MODE], eax |
2404,10 → 2406,10 |
;* mouse centered - start code- Mario79 |
;mouse_centered: |
; push eax |
mov eax, [_display.width] |
mov eax, [Screen_Max_X] |
shr eax, 1 |
mov [MOUSE_X], ax |
mov eax, [_display.height] |
mov eax, [Screen_Max_Y] |
shr eax, 1 |
mov [MOUSE_Y], ax |
call wakeup_osloop |
2449,11 → 2451,11 |
; cmp ecx,4 ; set mouse pointer position |
dec ecx |
jnz .set_mouse_button |
cmp dx, word[_display.height] |
jae .end |
cmp dx, word[Screen_Max_Y] |
ja .end |
rol edx, 16 |
cmp dx, word[_display.width] |
jae .end |
cmp dx, word[Screen_Max_X] |
ja .end |
mov [MOUSE_X], edx |
mov [mouse_active], 1 |
call wakeup_osloop |
2880,10 → 2882,8 |
jnz nosb9 |
; ecx = [left]*65536 + [right] |
; edx = [top]*65536 + [bottom] |
mov eax, [_display.width] |
mov ebx, [_display.height] |
dec eax |
dec ebx |
mov eax, [Screen_Max_X] |
mov ebx, [Screen_Max_Y] |
; check [right] |
cmp cx, ax |
ja .exit |
2935,10 → 2935,8 |
and [draw_data+32 + RECT.left], 0 |
and [draw_data+32 + RECT.top], 0 |
push eax ebx |
mov eax, [_display.width] |
mov ebx, [_display.height] |
dec eax |
dec ebx |
mov eax, [Screen_Max_X] |
mov ebx, [Screen_Max_Y] |
mov [draw_data+32 + RECT.right], eax |
mov [draw_data+32 + RECT.bottom], ebx |
pop ebx eax |
3300,11 → 3298,9 |
add edx, draw_data - CURRENT_TASK |
mov [edx + RECT.left], 0 |
mov [edx + RECT.top], 0 |
mov eax, [_display.width] |
dec eax |
mov eax, [Screen_Max_X] |
mov [edx + RECT.right], eax |
mov eax, [_display.height] |
dec eax |
mov eax, [Screen_Max_Y] |
mov [edx + RECT.bottom], eax |
|
srl1: |
4797,9 → 4793,9 |
jnz @f |
mov word [msg_board_pos+2], (42*6) |
add word [msg_board_pos], 10 |
mov ax, word [_display.width] |
mov ax, word [Screen_Max_Y] |
cmp word [msg_board_pos], ax |
jb @f |
jbe @f |
mov word [msg_board_pos], 10 |
@@: |
; // end if |
5016,9 → 5012,10 |
|
|
.1: ; resolution |
mov eax, [_display.width] |
mov eax, [Screen_Max_X] |
shl eax, 16 |
mov ax, word [_display.height] |
mov ax, word [Screen_Max_Y] |
add eax, 0x00010001 |
mov [esp+32], eax |
ret |
.2: ; bits per pixel |
5103,11 → 5100,9 |
|
align 4 |
syscall_getscreensize: ; GetScreenSize |
mov ax, word [_display.width] |
dec ax |
mov ax, word [Screen_Max_X] |
shl eax, 16 |
mov ax, word [_display.height] |
dec ax |
mov ax, word [Screen_Max_Y] |
mov [esp + 32], eax |
ret |
;----------------------------------------------------------------------------- |
5183,10 → 5178,10 |
;----------------------------------------------------------------------------- |
align 4 |
syscall_getpixel_WinMap: ; GetPixel WinMap |
cmp ebx, [_display.width] |
jb @f |
cmp ecx, [_display.height] |
jb @f |
cmp ebx, [Screen_Max_X] |
jbe @f |
cmp ecx, [Screen_Max_Y] |
jbe @f |
xor eax, eax |
jmp .store |
;-------------------------------------- |
5203,7 → 5198,8 |
;----------------------------------------------------------------------------- |
align 4 |
syscall_getpixel: ; GetPixel |
mov ecx, [_display.width] |
mov ecx, [Screen_Max_X] |
inc ecx |
xor edx, edx |
mov eax, ebx |
div ecx |
5448,6 → 5444,8 |
pushfd |
cli |
|
mov [Screen_Max_X], eax |
mov [Screen_Max_Y], edx |
mov [_display.pitch], ecx |
|
mov [screen_workarea.right], eax |
5489,10 → 5487,8 |
call repos_windows |
xor eax, eax |
xor ebx, ebx |
mov ecx, [_display.width] |
mov edx, [_display.height] |
dec ecx |
dec edx |
mov ecx, [Screen_Max_X] |
mov edx, [Screen_Max_Y] |
call calculatescreen |
pop edi |
pop esi |