mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-02 09:03:37 +00:00
Disable texgen for F3DF microcodes.
Fixed textures on vehicles in F-Zero.
This commit is contained in:
parent
4599527921
commit
37334807d9
5
GBI.cpp
5
GBI.cpp
|
@ -182,6 +182,7 @@ void GBIInfo::_makeCurrent(MicrocodeInfo * _pCurrent)
|
|||
glDisable(GL_CLIP_DISTANCE0);
|
||||
}
|
||||
}
|
||||
m_pCurrent = _pCurrent;
|
||||
}
|
||||
|
||||
inline
|
||||
|
@ -206,6 +207,7 @@ void GBIInfo::loadMicrocode(u32 uc_start, u32 uc_dstart, u16 uc_dsize)
|
|||
current.dataAddress = uc_dstart;
|
||||
current.dataSize = uc_dsize;
|
||||
current.NoN = false;
|
||||
current.textureGen = true;
|
||||
current.type = NONE;
|
||||
|
||||
// See if we can identify it by CRC
|
||||
|
@ -214,6 +216,7 @@ void GBIInfo::loadMicrocode(u32 uc_start, u32 uc_dstart, u16 uc_dsize)
|
|||
for (u32 i = 0; i < numSpecialMicrocodes; ++i) {
|
||||
if (uc_crc == specialMicrocodes[i].crc) {
|
||||
current.type = specialMicrocodes[i].type;
|
||||
current.NoN = specialMicrocodes[i].NoN;
|
||||
_makeCurrent(¤t);
|
||||
return;
|
||||
}
|
||||
|
@ -247,6 +250,8 @@ void GBIInfo::loadMicrocode(u32 uc_start, u32 uc_dstart, u16 uc_dsize)
|
|||
type = F3DEX;
|
||||
else if (uc_str[31] == '2')
|
||||
type = F3DEX2;
|
||||
if (strncmp(&uc_str[14], "F3DF", 4) == 0)
|
||||
current.textureGen = false;
|
||||
}
|
||||
else if (strncmp( &uc_str[14], "L3D", 3 ) == 0) {
|
||||
u32 t = 22;
|
||||
|
|
4
GBI.h
4
GBI.h
|
@ -678,6 +678,7 @@ struct MicrocodeInfo
|
|||
u32 type;
|
||||
u32 crc;
|
||||
bool NoN;
|
||||
bool textureGen;
|
||||
};
|
||||
|
||||
struct GBIInfo
|
||||
|
@ -691,7 +692,8 @@ struct GBIInfo
|
|||
void loadMicrocode(u32 uc_start, u32 uc_dstart, u16 uc_dsize);
|
||||
u32 getMicrocodeType() const {return m_pCurrent != NULL ? m_pCurrent->type : NONE;}
|
||||
bool isHWLSupported() const;
|
||||
bool isNoN() const { return m_pCurrent != NULL ? m_pCurrent->NoN != 0 : false; }
|
||||
bool isNoN() const { return m_pCurrent != NULL ? m_pCurrent->NoN : false; }
|
||||
bool isTextureGen() const { return m_pCurrent != NULL ? m_pCurrent->textureGen: true; }
|
||||
|
||||
private:
|
||||
void _makeCurrent(MicrocodeInfo * _pCurrent);
|
||||
|
|
4
gSP.cpp
4
gSP.cpp
|
@ -342,7 +342,7 @@ void gSPProcessVertex4(u32 v)
|
|||
else
|
||||
gSPLightVertex4(v);
|
||||
|
||||
if (gSP.geometryMode & G_TEXTURE_GEN) {
|
||||
if (GBI.isTextureGen() && gSP.geometryMode & G_TEXTURE_GEN) {
|
||||
for(int i = 0; i < 4; ++i) {
|
||||
SPVertex & vtx = render.getVertex(v+i);
|
||||
f32 fLightDir[3] = {vtx.nx, vtx.ny, vtx.nz};
|
||||
|
@ -570,7 +570,7 @@ void gSPProcessVertex(u32 v)
|
|||
else
|
||||
gSPLightVertex(vtx);
|
||||
|
||||
if (gSP.geometryMode & G_TEXTURE_GEN) {
|
||||
if (GBI.isTextureGen() && gSP.geometryMode & G_TEXTURE_GEN) {
|
||||
f32 fLightDir[3] = {vtx.nx, vtx.ny, vtx.nz};
|
||||
f32 x, y;
|
||||
if (gSP.lookatEnable) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user