mirror of
https://github.com/JaCzekanski/Avocado.git
synced 2024-05-20 04:50:32 -04:00
gpu: copy bits from textured polygon commands to e1
Fixes Tekken 3 Health bar and Worms Armageddon menu and player names
This commit is contained in:
parent
c7d1d21d49
commit
f50c582124
|
@ -288,6 +288,18 @@ void GPU::cmdPolygon(PolygonArgs arg) {
|
|||
triangle.clut.x = tex.getClutX();
|
||||
triangle.clut.y = tex.getClutY();
|
||||
triangle.transparency = tex.semiTransparencyBlending();
|
||||
|
||||
// Copy texture bits from Polygon draw command to E1 register
|
||||
// texpagex, texpagey, semi-transparency, texture disable bits
|
||||
const uint32_t E1_MASK = 0b00001001'11111111;
|
||||
|
||||
uint16_t newBits = (tex.texpage >> 16) & E1_MASK;
|
||||
if (!textureDisableAllowed) {
|
||||
newBits &= ~(1 << 11);
|
||||
}
|
||||
|
||||
gp0_e1._reg &= ~E1_MASK;
|
||||
gp0_e1._reg |= newBits;
|
||||
}
|
||||
|
||||
triangle.assureCcw();
|
||||
|
@ -617,6 +629,9 @@ void GPU::writeGP0(uint32_t data) {
|
|||
} else if (command == 0xe1) {
|
||||
// Draw mode setting
|
||||
gp0_e1._reg = arguments[0];
|
||||
if (!textureDisableAllowed) {
|
||||
gp0_e1.textureDisable = false;
|
||||
}
|
||||
} else if (command == 0xe2) {
|
||||
// Texture window setting
|
||||
gp0_e2._reg = arguments[0];
|
||||
|
|
Loading…
Reference in a new issue