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