Redone mode 4 fix
This commit is contained in:
@@ -2625,6 +2625,8 @@ EXTSYM drawmode7ngextbg,drawmode7ngextbg2
|
|||||||
mov eax,[BGPT1+ebx*2+%1*512]
|
mov eax,[BGPT1+ebx*2+%1*512]
|
||||||
test ecx,100h
|
test ecx,100h
|
||||||
jz .noyinc
|
jz .noyinc
|
||||||
|
cmp byte[BGMA+ebx],4
|
||||||
|
je near .offsetm
|
||||||
add eax,[BGPT1Y+ebx*2+%1*512]
|
add eax,[BGPT1Y+ebx*2+%1*512]
|
||||||
.noyinc
|
.noyinc
|
||||||
lea ecx,[ecx*8]
|
lea ecx,[ecx*8]
|
||||||
@@ -2888,10 +2890,7 @@ EXTSYM drawmode7ngextbg,drawmode7ngextbg2
|
|||||||
shl edx,6
|
shl edx,6
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov ax,[BGPT3+ebx*2]
|
mov ax,[BGPT3+ebx*2]
|
||||||
cmp dx,0
|
|
||||||
jl .isneg
|
|
||||||
add ax,dx
|
add ax,dx
|
||||||
.isneg
|
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
mov dx,[BG3SXl+ebx*2]
|
mov dx,[BG3SXl+ebx*2]
|
||||||
and dx,0F8h
|
and dx,0F8h
|
||||||
@@ -2955,6 +2954,21 @@ EXTSYM drawmode7ngextbg,drawmode7ngextbg2
|
|||||||
add eax,ecx
|
add eax,ecx
|
||||||
add [ofsmtptr],ecx
|
add [ofsmtptr],ecx
|
||||||
mov [ofsmmptr],eax
|
mov [ofsmmptr],eax
|
||||||
|
|
||||||
|
mov word[bgtxadd2],0
|
||||||
|
cmp word[BGPT3X+ebx*2],0
|
||||||
|
je .yesoverfl
|
||||||
|
mov cx,word[BG3SXl+ebx*2]
|
||||||
|
add cx,16
|
||||||
|
test cx,100h
|
||||||
|
jz .notoverfl
|
||||||
|
add dword[ofsmcptr],800h
|
||||||
|
sub word[bgtxadd2],800h
|
||||||
|
jmp .yesoverfl
|
||||||
|
.notoverfl
|
||||||
|
add word[bgtxadd2],800h
|
||||||
|
.yesoverfl
|
||||||
|
|
||||||
mov dword[ofshvaladd],0
|
mov dword[ofshvaladd],0
|
||||||
mov ecx,[BGOPT1+ebx*2+%1*512]
|
mov ecx,[BGOPT1+ebx*2+%1*512]
|
||||||
mov edx,[BGMA+ebx]
|
mov edx,[BGMA+ebx]
|
||||||
@@ -3240,10 +3254,7 @@ EXTSYM drawmode7ngextbg,drawmode7ngextbg2
|
|||||||
shl edx,6
|
shl edx,6
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov ax,[BGPT3+ebx*2]
|
mov ax,[BGPT3+ebx*2]
|
||||||
cmp dx,0
|
|
||||||
jl .isneg
|
|
||||||
add ax,dx
|
add ax,dx
|
||||||
.isneg
|
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
mov dx,[BG3SXl+ebx*2]
|
mov dx,[BG3SXl+ebx*2]
|
||||||
and dx,0F8h
|
and dx,0F8h
|
||||||
@@ -3275,6 +3286,21 @@ EXTSYM drawmode7ngextbg,drawmode7ngextbg2
|
|||||||
mov eax,[BGPT1+ebx*2+%1*512]
|
mov eax,[BGPT1+ebx*2+%1*512]
|
||||||
mov [ofsmtptr],eax
|
mov [ofsmtptr],eax
|
||||||
mov [ofsmtptrs],eax
|
mov [ofsmtptrs],eax
|
||||||
|
|
||||||
|
mov word[bgtxadd2],0
|
||||||
|
cmp word[BGPT3X+ebx*2],0
|
||||||
|
je .yesoverfl
|
||||||
|
mov cx,word[BG3SXl+ebx*2]
|
||||||
|
add cx,16
|
||||||
|
test cx,100h
|
||||||
|
jz .notoverfl
|
||||||
|
add dword[ofsmcptr],800h
|
||||||
|
sub word[bgtxadd2],800h
|
||||||
|
jmp .yesoverfl
|
||||||
|
.notoverfl
|
||||||
|
add word[bgtxadd2],800h
|
||||||
|
.yesoverfl
|
||||||
|
|
||||||
mov ecx,[BG1SXl+ebx*2+%1*512]
|
mov ecx,[BG1SXl+ebx*2+%1*512]
|
||||||
mov edx,[BGPT1X+ebx*2+%1*512]
|
mov edx,[BGPT1X+ebx*2+%1*512]
|
||||||
test ecx,100h
|
test ecx,100h
|
||||||
|
|||||||
@@ -2832,12 +2832,15 @@ EXTSYM osm2dis
|
|||||||
je near .offsetm
|
je near .offsetm
|
||||||
cmp byte[t16x161+ebx+%1*256],1
|
cmp byte[t16x161+ebx+%1*256],1
|
||||||
je near .tiles16x16
|
je near .tiles16x16
|
||||||
cmp byte[BGMA+ebx],4
|
|
||||||
je near .offsetm
|
|
||||||
.nooffsetm
|
.nooffsetm
|
||||||
mov eax,[BGPT1+ebx*2+%1*512]
|
mov eax,[BGPT1+ebx*2+%1*512]
|
||||||
test ecx,100h
|
test ecx,100h
|
||||||
jz .noyinc
|
jz .noyinc
|
||||||
|
cmp byte[osm2dis],1
|
||||||
|
je .nooffsetm2
|
||||||
|
cmp byte[BGMA+ebx],4
|
||||||
|
je near .offsetm
|
||||||
|
.nooffsetm2
|
||||||
add eax,[BGPT1Y+ebx*2+%1*512]
|
add eax,[BGPT1Y+ebx*2+%1*512]
|
||||||
.noyinc
|
.noyinc
|
||||||
lea ecx,[ecx*8]
|
lea ecx,[ecx*8]
|
||||||
@@ -3131,10 +3134,7 @@ EXTSYM osm2dis
|
|||||||
shl edx,6
|
shl edx,6
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov ax,[BGPT3+ebx*2]
|
mov ax,[BGPT3+ebx*2]
|
||||||
cmp dx,0
|
|
||||||
jl .isneg1
|
|
||||||
add ax,dx
|
add ax,dx
|
||||||
.isneg1
|
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
mov dx,[BG3SXl+ebx*2]
|
mov dx,[BG3SXl+ebx*2]
|
||||||
and dx,0F8h
|
and dx,0F8h
|
||||||
@@ -3303,10 +3303,7 @@ EXTSYM osm2dis
|
|||||||
shl edx,6
|
shl edx,6
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov ax,[BGPT3+ebx*2]
|
mov ax,[BGPT3+ebx*2]
|
||||||
cmp dx,0
|
|
||||||
jl .isneg2
|
|
||||||
add ax,dx
|
add ax,dx
|
||||||
.isneg2
|
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
mov dx,[BG3SXl+ebx*2]
|
mov dx,[BG3SXl+ebx*2]
|
||||||
and dx,0F8h
|
and dx,0F8h
|
||||||
@@ -3709,10 +3706,7 @@ EXTSYM osm2dis
|
|||||||
shl edx,6
|
shl edx,6
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov ax,[BGPT3+ebx*2]
|
mov ax,[BGPT3+ebx*2]
|
||||||
cmp dx,0
|
|
||||||
jl .isneg3
|
|
||||||
add ax,dx
|
add ax,dx
|
||||||
.isneg3
|
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
mov dx,[BG3SXl+ebx*2]
|
mov dx,[BG3SXl+ebx*2]
|
||||||
and dx,0F8h
|
and dx,0F8h
|
||||||
|
|||||||
Reference in New Issue
Block a user