kernel: BytesPerScanLine removed, use _display.pitch instead

git-svn-id: svn://kolibrios.org@3606 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2013-06-05 09:29:50 +00:00
parent b892f7e281
commit a678afc6ad
7 changed files with 42 additions and 42 deletions

View File

@ -230,10 +230,6 @@ Y_UNDER equ (OS_BASE+0x000FB4C)
;unused ? only one reference
MOUSE_BUFF_COUNT equ (OS_BASE+0x000FCFF)
Screen_Max_X equ (OS_BASE+0x000FE00)
Screen_Max_Y equ (OS_BASE+0x000FE04)
BytesPerScanLine equ (OS_BASE+0x000FE08)
SCR_MODE equ (OS_BASE+0x000FE0C)
LFBAddress equ (OS_BASE+0x000FE80)
BTN_ADDR equ (OS_BASE+0x000FE88)
@ -281,10 +277,6 @@ BOOT_VAR equ (OS_BASE+0x02E0000)
draw_data equ (OS_BASE+0x0320000)
BgrDrawMode equ (OS_BASE+0x0323FF4)
BgrDataWidth equ (OS_BASE+0x0323FF8)
BgrDataHeight equ (OS_BASE+0x0323FFC)
sys_pgmap equ (OS_BASE+0x0324000)
UPPER_KERNEL_PAGES equ (OS_BASE+0x0400000)

View File

@ -364,6 +364,11 @@ _display display_t
_WinMapAddress rd 1
_WinMapSize rd 1
Screen_Max_X rd 1
Screen_Max_Y rd 1
SCR_MODE rw 2
def_cursor rd 1
def_cursor_clock rd 1
current_cursor rd 1
@ -438,6 +443,10 @@ img_background rd 1
mem_BACKGROUND rd 1
static_background_data rd 1
BgrDrawMode rd 1
BgrDataWidth rd 1
BgrDataHeight rd 1
skin_data rd 1
cache_ide0:

View File

@ -494,9 +494,9 @@ proc set_mouse_data stdcall, BtnState:dword, XMoving:dword, YMoving:dword, VScro
;--------------------------------------
align 4
@@M1:
cmp ax, [Screen_Max_X];ScreenLength
cmp ax, word [Screen_Max_X];ScreenLength
jl @@M2
mov ax, [Screen_Max_X];ScreenLength-1
mov ax, word [Screen_Max_X];ScreenLength-1
;--------------------------------------
align 4
@@M2:
@ -514,9 +514,9 @@ align 4
;--------------------------------------
align 4
@@M3:
cmp ax, [Screen_Max_Y];ScreenHeigth
cmp ax, word [Screen_Max_Y];ScreenHeigth
jl @@M4
mov ax, [Screen_Max_Y];ScreenHeigth-1
mov ax, word [Screen_Max_Y];ScreenHeigth-1
;--------------------------------------
align 4
@@M4:

View File

@ -406,18 +406,17 @@ high_code:
mov [Screen_Max_Y], eax
mov [screen_workarea.bottom], eax
movzx eax, word [BOOT_VAR+BOOT_VESA_MODE] ; screen mode
mov [SCR_MODE], eax
mov dword [SCR_MODE], eax
; mov eax, [BOOT_VAR+0x9014] ; Vesa 1.2 bnk sw add
; mov [BANK_SWITCH], eax
mov [BytesPerScanLine], word 640*4 ; Bytes PerScanLine
mov eax, 640 *4 ; Bytes PerScanLine
cmp [SCR_MODE], word 0x13 ; 320x200
je @f
cmp [SCR_MODE], word 0x12 ; VGA 640x480
je @f
movzx eax, word[BOOT_VAR+BOOT_PITCH] ; for other modes
mov [BytesPerScanLine], ax
mov [_display.pitch], eax
@@:
mov [_display.pitch], eax
mov eax, [_display.width]
mul [_display.height]
mov [_WinMapSize], eax
@ -2492,7 +2491,7 @@ sysfn_set_screen_sizes:
pushfd
cli
mov eax, ecx
mov ecx, [BytesPerScanLine]
mov ecx, [_display.pitch]
mov [_display.width], eax
dec eax
mov [_display.height], edx
@ -4998,7 +4997,7 @@ sys_gs: ; direct screen access
.1: ; resolution
mov eax, [Screen_Max_X]
shl eax, 16
mov ax, [Screen_Max_Y]
mov ax, word [Screen_Max_Y]
add eax, 0x00010001
mov [esp+32], eax
ret
@ -5007,7 +5006,7 @@ sys_gs: ; direct screen access
mov [esp+32], eax
ret
.3: ; bytes per scanline
mov eax, [BytesPerScanLine]
mov eax, [_display.pitch]
mov [esp+32], eax
ret
@ -5097,9 +5096,9 @@ syscall_drawrect: ; DrawRect
align 4
syscall_getscreensize: ; GetScreenSize
mov ax, [Screen_Max_X]
mov ax, word [Screen_Max_X]
shl eax, 16
mov ax, [Screen_Max_Y]
mov ax, word [Screen_Max_Y]
mov [esp + 32], eax
ret
@ -5418,7 +5417,7 @@ calculate_fast_getting_offset_for_LFB:
cld
@@:
stosd
add eax, [BytesPerScanLine]
add eax, [_display.pitch]
dec ecx
jnz @r
ret
@ -5441,7 +5440,7 @@ set_screen:
mov [Screen_Max_X], eax
mov [Screen_Max_Y], edx
mov [BytesPerScanLine], ecx
mov [_display.pitch], ecx
mov [screen_workarea.right], eax
mov [screen_workarea.bottom], edx

View File

@ -524,7 +524,7 @@ proc restore_24 stdcall, x:dword, y:dword
align 4
@@:
mov edi, ebx
add ebx, [BytesPerScanLine]
add ebx, [_display.pitch]
mov ecx, [esp]
rep movsb
@ -559,7 +559,7 @@ proc restore_32 stdcall, x:dword, y:dword
align 4
@@:
mov edi, ebx
add ebx, [BytesPerScanLine]
add ebx, [_display.pitch]
mov ecx, [cur.w]
rep movsd
@ -650,7 +650,7 @@ align 4
align 4
@@:
mov esi, edx
add edx, [BytesPerScanLine]
add edx, [_display.pitch]
mov ecx, [cur.w]
lea ecx, [ecx+ecx*2]
rep movsb
@ -673,7 +673,7 @@ align 4
mov esi, edx
mov edi, ebx
add edx, 32*4
add ebx, [BytesPerScanLine]
add ebx, [_display.pitch]
;--------------------------------------
align 4
.pix:
@ -768,7 +768,7 @@ align 4
align 4
@@:
mov esi, edx
add edx, [BytesPerScanLine]
add edx, [_display.pitch]
mov ecx, [cur.w]
rep movsd
dec eax
@ -790,7 +790,7 @@ align 4
mov esi, edx
mov edi, ebx
add edx, 32*4
add ebx, [BytesPerScanLine]
add ebx, [_display.pitch]
;--------------------------------------
align 4
.pix:

View File

@ -230,7 +230,7 @@ align 4
sub eax, [putimg.real_sx]
mov [putimg.winmap_newline], eax
; screen new line increment
mov eax, [BytesPerScanLine]
mov eax, [_display.pitch]
mov ebx, [_display.bpp]
shr ebx, 3
imul ecx, ebx
@ -534,7 +534,7 @@ align 4
.finish:
add esp, putimg.stack_data
popad
cmp [SCR_MODE], dword 0x12
cmp [SCR_MODE], 0x12
jne @f
call VGA__putimage
;--------------------------------------
@ -1233,7 +1233,7 @@ align 4
shr ebx, 3
imul eax, ebx
neg eax
add eax, [BytesPerScanLine]
add eax, [_display.pitch]
mov [drbar.line_inc_scr], eax
; pointer to screen
mov edx, [drbar.abs_cy]
@ -1508,7 +1508,7 @@ align 4
.end:
add esp, drbar.stack_data
popad
cmp [SCR_MODE], dword 0x12
cmp [SCR_MODE], 0x12
jne @f
call VGA_draw_bar
;--------------------------------------
@ -1757,7 +1757,7 @@ dp4:
jbe dp2
popad
mov [EGA_counter], 1
cmp [SCR_MODE], dword 0x12
cmp [SCR_MODE], 0x12
jne @f
call VGA_drawbackground
;--------------------------------------
@ -1950,7 +1950,7 @@ sdp4:
;--------------------------------------
align 4
@@:
add edi, [BytesPerScanLine]
add edi, [_display.pitch]
; restore ecx,edx; advance esi to next background line
mov eax, [esp+28]
mov ebx, [esp+32]
@ -1981,7 +1981,7 @@ sdpdone:
add esp, 44
popad
mov [EGA_counter], 1
cmp [SCR_MODE], dword 0x12
cmp [SCR_MODE], 0x12
jne @f
call VGA_drawbackground
;--------------------------------------

View File

@ -150,7 +150,7 @@ endg
;------------------------------------------------------------------------------
align 4
checkVga_N13:
cmp [SCR_MODE], dword 0x13
cmp [SCR_MODE], 0x13
jne @f
pushad