forked from KolibriOS/kolibrios
kernel: remove ScreenBPP variable
git-svn-id: svn://kolibrios.org@3537 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
f427028551
commit
8119f00711
@ -237,7 +237,6 @@ BTN_DOWN equ (OS_BASE+0x000FB40)
|
|||||||
MOUSE_DOWN equ (OS_BASE+0x000FB44)
|
MOUSE_DOWN equ (OS_BASE+0x000FB44)
|
||||||
X_UNDER equ (OS_BASE+0x000FB4A)
|
X_UNDER equ (OS_BASE+0x000FB4A)
|
||||||
Y_UNDER equ (OS_BASE+0x000FB4C)
|
Y_UNDER equ (OS_BASE+0x000FB4C)
|
||||||
ScreenBPP equ (OS_BASE+0x000FBF1)
|
|
||||||
|
|
||||||
;unused ? only one reference
|
;unused ? only one reference
|
||||||
MOUSE_BUFF_COUNT equ (OS_BASE+0x000FCFF)
|
MOUSE_BUFF_COUNT equ (OS_BASE+0x000FCFF)
|
||||||
|
@ -389,8 +389,6 @@ high_code:
|
|||||||
mov al, [BOOT_VAR+BOOT_DMA] ; DMA access
|
mov al, [BOOT_VAR+BOOT_DMA] ; DMA access
|
||||||
mov [allow_dma_access], al
|
mov [allow_dma_access], al
|
||||||
movzx eax, byte [BOOT_VAR+BOOT_BPP] ; bpp
|
movzx eax, byte [BOOT_VAR+BOOT_BPP] ; bpp
|
||||||
mov [ScreenBPP], al
|
|
||||||
|
|
||||||
mov [_display.bpp], eax
|
mov [_display.bpp], eax
|
||||||
mov [_display.vrefresh], 60
|
mov [_display.vrefresh], 60
|
||||||
|
|
||||||
@ -449,7 +447,7 @@ high_code:
|
|||||||
setvesa20:
|
setvesa20:
|
||||||
mov [PUTPIXEL], dword Vesa20_putpixel24 ; Vesa 2.0
|
mov [PUTPIXEL], dword Vesa20_putpixel24 ; Vesa 2.0
|
||||||
mov [GETPIXEL], dword Vesa20_getpixel24
|
mov [GETPIXEL], dword Vesa20_getpixel24
|
||||||
cmp [ScreenBPP], byte 24
|
cmp byte [_display.bpp], 24
|
||||||
jz v20ga24
|
jz v20ga24
|
||||||
v20ga32:
|
v20ga32:
|
||||||
mov [PUTPIXEL], dword Vesa20_putpixel32
|
mov [PUTPIXEL], dword Vesa20_putpixel32
|
||||||
@ -4980,7 +4978,7 @@ sys_gs: ; direct screen access
|
|||||||
mov [esp+32], eax
|
mov [esp+32], eax
|
||||||
ret
|
ret
|
||||||
.2: ; bits per pixel
|
.2: ; bits per pixel
|
||||||
movzx eax, byte [ScreenBPP]
|
mov eax, [_display.bpp]
|
||||||
mov [esp+32], eax
|
mov [esp+32], eax
|
||||||
ret
|
ret
|
||||||
.3: ; bytes per scanline
|
.3: ; bytes per scanline
|
||||||
|
@ -846,7 +846,7 @@ check_mouse_area_for_getpixel_new:
|
|||||||
add eax, ebx
|
add eax, ebx
|
||||||
mov ebx, eax
|
mov ebx, eax
|
||||||
shl eax, 2
|
shl eax, 2
|
||||||
cmp [ScreenBPP], byte 32
|
cmp byte [_display.bpp], 32
|
||||||
je @f
|
je @f
|
||||||
sub eax, ebx
|
sub eax, ebx
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -921,7 +921,7 @@ align 4
|
|||||||
add ecx, ebx
|
add ecx, ebx
|
||||||
mov ebx, ecx
|
mov ebx, ecx
|
||||||
shl ecx, 2
|
shl ecx, 2
|
||||||
cmp [ScreenBPP], byte 24
|
cmp byte [_display.bpp], 24
|
||||||
je .24
|
je .24
|
||||||
and eax, 0xFFFFFF
|
and eax, 0xFFFFFF
|
||||||
mov [ecx + cur_saved_data], eax ;store new color to
|
mov [ecx + cur_saved_data], eax ;store new color to
|
||||||
@ -991,21 +991,15 @@ init_display:
|
|||||||
|
|
||||||
test word [SCR_MODE], 0x4000
|
test word [SCR_MODE], 0x4000
|
||||||
jz .fail
|
jz .fail
|
||||||
; jmp .fail
|
|
||||||
|
|
||||||
mov ebx, restore_32
|
mov ebx, restore_32
|
||||||
mov ecx, move_cursor_32
|
mov ecx, move_cursor_32
|
||||||
movzx eax, byte [ScreenBPP]
|
mov edx, Vesa20_putpixel32_new
|
||||||
cmp eax, 32
|
mov eax, [_display.bpp]
|
||||||
je @F
|
cmp al, 32
|
||||||
|
jne .24
|
||||||
|
|
||||||
mov ebx, restore_24
|
.set:
|
||||||
mov ecx, move_cursor_24
|
|
||||||
cmp eax, 24
|
|
||||||
jne .fail
|
|
||||||
;--------------------------------------
|
|
||||||
align 4
|
|
||||||
@@:
|
|
||||||
mov [_display.select_cursor], select_cursor
|
mov [_display.select_cursor], select_cursor
|
||||||
mov [_display.move_cursor], ecx
|
mov [_display.move_cursor], ecx
|
||||||
mov [_display.restore_cursor], ebx
|
mov [_display.restore_cursor], ebx
|
||||||
@ -1014,24 +1008,21 @@ align 4
|
|||||||
|
|
||||||
cmp [PUTPIXEL], dword VGA_putpixel
|
cmp [PUTPIXEL], dword VGA_putpixel
|
||||||
je @f
|
je @f
|
||||||
cmp [ScreenBPP], byte 32
|
mov [PUTPIXEL], edx
|
||||||
je .32
|
|
||||||
mov [PUTPIXEL], dword Vesa20_putpixel24_new
|
|
||||||
jmp @f
|
|
||||||
;--------------------------------------
|
|
||||||
align 4
|
|
||||||
.32:
|
|
||||||
mov [PUTPIXEL], dword Vesa20_putpixel32_new
|
|
||||||
;--------------------------------------
|
|
||||||
align 4
|
|
||||||
@@:
|
@@:
|
||||||
stdcall load_cursor, clock_arrow, dword LOAD_FROM_MEM
|
stdcall load_cursor, clock_arrow, dword LOAD_FROM_MEM
|
||||||
mov [def_cursor_clock], eax
|
mov [def_cursor_clock], eax
|
||||||
stdcall load_cursor, def_arrow, dword LOAD_FROM_MEM
|
stdcall load_cursor, def_arrow, dword LOAD_FROM_MEM
|
||||||
mov [def_cursor], eax
|
mov [def_cursor], eax
|
||||||
ret
|
ret
|
||||||
;--------------------------------------
|
|
||||||
align 4
|
.24:
|
||||||
|
mov ebx, restore_24
|
||||||
|
mov ecx, move_cursor_24
|
||||||
|
mov edx, Vesa20_putpixel24_new
|
||||||
|
cmp al, 24
|
||||||
|
je .set
|
||||||
|
|
||||||
.fail:
|
.fail:
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov [_display.select_cursor], eax
|
mov [_display.select_cursor], eax
|
||||||
|
@ -231,7 +231,7 @@ align 4
|
|||||||
mov [putimg.winmap_newline], eax
|
mov [putimg.winmap_newline], eax
|
||||||
; screen new line increment
|
; screen new line increment
|
||||||
mov eax, [BytesPerScanLine]
|
mov eax, [BytesPerScanLine]
|
||||||
movzx ebx, byte [ScreenBPP]
|
mov ebx, [_display.bpp]
|
||||||
shr ebx, 3
|
shr ebx, 3
|
||||||
imul ecx, ebx
|
imul ecx, ebx
|
||||||
sub eax, ecx
|
sub eax, ecx
|
||||||
@ -266,7 +266,7 @@ align 4
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; get process number
|
; get process number
|
||||||
mov ebx, [CURRENT_TASK]
|
mov ebx, [CURRENT_TASK]
|
||||||
cmp byte [ScreenBPP], 32
|
cmp byte [_display.bpp], 32
|
||||||
je put_image_end_32
|
je put_image_end_32
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
put_image_end_24:
|
put_image_end_24:
|
||||||
@ -1229,7 +1229,7 @@ align 4
|
|||||||
mov [drbar.line_inc_map], eax
|
mov [drbar.line_inc_map], eax
|
||||||
; line_inc_scr
|
; line_inc_scr
|
||||||
mov eax, [drbar.real_sx]
|
mov eax, [drbar.real_sx]
|
||||||
movzx ebx, byte [ScreenBPP]
|
mov ebx, [_display.bpp]
|
||||||
shr ebx, 3
|
shr ebx, 3
|
||||||
imul eax, ebx
|
imul eax, ebx
|
||||||
neg eax
|
neg eax
|
||||||
@ -1268,7 +1268,7 @@ align 4
|
|||||||
rol eax, 8
|
rol eax, 8
|
||||||
mov bh, al ; 0x80 drawing gradient bars
|
mov bh, al ; 0x80 drawing gradient bars
|
||||||
ror eax, 8
|
ror eax, 8
|
||||||
cmp byte [ScreenBPP], 24
|
cmp byte [_display.bpp], 24
|
||||||
jne draw_bar_end_32
|
jne draw_bar_end_32
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@ -1653,7 +1653,7 @@ dp2:
|
|||||||
add ebp, eax
|
add ebp, eax
|
||||||
add ebp, eax
|
add ebp, eax
|
||||||
add ebp, eax
|
add ebp, eax
|
||||||
cmp [ScreenBPP], byte 24 ; 24 or 32 bpp ? - x size
|
cmp byte [_display.bpp], 24 ; 24 or 32 bpp ? - x size
|
||||||
jz @f
|
jz @f
|
||||||
add ebp, eax
|
add ebp, eax
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -1733,7 +1733,7 @@ nbgp:
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@:
|
@@:
|
||||||
cmp [ScreenBPP], byte 25 ; 24 or 32 bpp?
|
cmp byte [_display.bpp], 25 ; 24 or 32 bpp?
|
||||||
sbb edi, -1 ; +1 for 32 bpp
|
sbb edi, -1 ; +1 for 32 bpp
|
||||||
; I do not use 'inc eax' because this is slightly slower then 'add eax,1'
|
; I do not use 'inc eax' because this is slightly slower then 'add eax,1'
|
||||||
add ebp, edx
|
add ebp, edx
|
||||||
@ -1799,7 +1799,7 @@ vesa20_drawbackground_stretch:
|
|||||||
add ebp, eax
|
add ebp, eax
|
||||||
add ebp, eax
|
add ebp, eax
|
||||||
add ebp, eax
|
add ebp, eax
|
||||||
cmp [ScreenBPP], byte 24 ; 24 or 32 bpp ? - x size
|
cmp byte [_display.bpp], 24 ; 24 or 32 bpp ? - x size
|
||||||
jz @f
|
jz @f
|
||||||
add ebp, eax
|
add ebp, eax
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -1918,7 +1918,7 @@ align 4
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
snbgp:
|
snbgp:
|
||||||
cmp [ScreenBPP], byte 25
|
cmp byte [_display.bpp], 25
|
||||||
sbb edi, -4
|
sbb edi, -4
|
||||||
add ebp, 1
|
add ebp, 1
|
||||||
mov eax, [esp+20]
|
mov eax, [esp+20]
|
||||||
@ -1944,7 +1944,7 @@ sdp4:
|
|||||||
sub edi, eax
|
sub edi, eax
|
||||||
sub edi, eax
|
sub edi, eax
|
||||||
sub edi, eax
|
sub edi, eax
|
||||||
cmp [ScreenBPP], byte 24
|
cmp byte [_display.bpp], 24
|
||||||
jz @f
|
jz @f
|
||||||
sub edi, eax
|
sub edi, eax
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user