New graphics fix for mode 4, 8bit.

This commit is contained in:
zsknight
2001-06-26 00:15:56 +00:00
parent e6bebfce44
commit e3256beff5
2 changed files with 18 additions and 10 deletions

View File

@@ -47,6 +47,8 @@ EXTSYM winlogicb
EXTSYM ngwinptr,objwlrpos,objwen,objclineptr,CSprWinPtr EXTSYM ngwinptr,objwlrpos,objwen,objclineptr,CSprWinPtr
EXTSYM WindowRedraw EXTSYM WindowRedraw
NEWSYM BGPT3B, times 256 dw 0
NEWSYM NewGfxAsmStart NEWSYM NewGfxAsmStart
%include "video/vidmacro.mac" %include "video/vidmacro.mac"
@@ -185,8 +187,11 @@ NEWSYM newengine8b
mov bl,[bgmode] mov bl,[bgmode]
and ebx,07h and ebx,07h
mov [BGMA+eax],bl mov [BGMA+eax],bl
cmp bl,4
je .changedmode4
cmp [BGMA+eax-1],bl cmp [BGMA+eax-1],bl
je .nobgma je .nobgma
.changedmode4
mov byte[bgallchange+eax],1 mov byte[bgallchange+eax],1
.nobgma .nobgma

View File

@@ -2611,15 +2611,17 @@ EXTSYM drawmode7ngextbg,drawmode7ngextbg2
add ecx,ebx add ecx,ebx
jmp %%yesmosaic jmp %%yesmosaic
%%nomosaic %%nomosaic
cmp byte[BGMA+ebx],5 cmp byte[BGMA+ebx],5
jae near .tiles16x8 jae near .tiles16x8
%%yesmosaic %%yesmosaic
cmp byte[t16x161+ebx+%1*256],1 cmp byte[t16x161+ebx+%1*256],1
je near .tiles16x16 je near .tiles16x16
cmp byte[BGMA+ebx],2 cmp byte[BGMA+ebx],2
je near .offsetm je near .offsetm
; cmp byte[BGMA+ebx],4 cmp byte[BGMA+ebx],4
; je near .offsetm je near .offsetm
mov eax,[BGPT1+ebx*2+%1*512] mov eax,[BGPT1+ebx*2+%1*512]
test ecx,100h test ecx,100h
jz .noyinc jz .noyinc
@@ -2901,12 +2903,13 @@ EXTSYM drawmode7ngextbg,drawmode7ngextbg2
shr dx,5 shr dx,5
add ax,dx add ax,dx
.nooma .nooma
cmp byte[BGMA+ebx],4 ; cmp byte[BGMA+ebx],4
je .offsetm4 ; je .offsetm4
add eax,40h add eax,40h
.offsetm4 ;.offsetm4
mov edx,eax mov edx,eax
and edx,0FFFFFFC0h and edx,0FFFFFFC0h
mov word[BGPT3B+ebx*2],dx
add edx,[vram] add edx,[vram]
mov [ofsmcptr],edx mov [ofsmcptr],edx
and eax,3Fh and eax,3Fh
@@ -3063,8 +3066,8 @@ EXTSYM drawmode7ngextbg,drawmode7ngextbg2
je near .tiles16x16 je near .tiles16x16
cmp byte[BGMA+ebx],2 cmp byte[BGMA+ebx],2
je near .offsetm je near .offsetm
; cmp byte[BGMA+ebx],4 cmp byte[BGMA+ebx],4
; je near .offsetm je near .offsetm
mov eax,[BG1SYl+ebx*2+%1*512] mov eax,[BG1SYl+ebx*2+%1*512]
and eax,0FFFFh and eax,0FFFFh
add eax,ebx add eax,ebx
@@ -3251,10 +3254,10 @@ EXTSYM drawmode7ngextbg,drawmode7ngextbg2
add ax,dx add ax,dx
.nooma .nooma
mov edx,eax mov edx,eax
cmp byte[BGMA+ebx],4 ; cmp byte[BGMA+ebx],4
je .offsetm4 ; je .offsetm4
add edx,40h add edx,40h
.offsetm4 ;.offsetm4
and edx,0FFC0h and edx,0FFC0h
add edx,[vram] add edx,[vram]
mov [ofsmcptr],edx mov [ofsmcptr],edx