mirror of
https://github.com/GTAmodding/re3.git
synced 2025-07-14 13:54:09 +00:00
The real pickup reflection fix
This commit is contained in:
parent
2f40c3dc8b
commit
581cb5edfa
6 changed files with 59 additions and 32 deletions
|
@ -611,3 +611,37 @@ CameraCreate(RwInt32 width, RwInt32 height, RwBool zBuffer)
|
|||
WRAPPER void _TexturePoolsInitialise() { EAXJMP(0x598B10); }
|
||||
WRAPPER void _TexturePoolsShutdown() { EAXJMP(0x598B30); }
|
||||
#endif
|
||||
|
||||
#if defined(FIX_BUGS) && defined(GTA_PC)
|
||||
RwUInt32 saved_alphafunc, saved_alpharef;
|
||||
|
||||
void
|
||||
SetAlphaTest(RwUInt32 alpharef)
|
||||
{
|
||||
#ifdef LIBRW
|
||||
saved_alphafunc = rw::GetRenderState(rw::ALPHATESTFUNC);
|
||||
saved_alpharef = rw::GetRenderState(rw::ALPHATESTREF);
|
||||
|
||||
rw::SetRenderState(rw::ALPHATESTFUNC, rw::ALPHAGREATEREQUAL);
|
||||
rw::SetRenderState(rw::ALPHATESTREF, 0);
|
||||
#else
|
||||
RwD3D8GetRenderState(D3DRS_ALPHAFUNC, &saved_alphafunc);
|
||||
RwD3D8GetRenderState(D3DRS_ALPHAREF, &saved_alpharef);
|
||||
|
||||
RwD3D8SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL);
|
||||
RwD3D8SetRenderState(D3DRS_ALPHAREF, alpharef);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
RestoreAlphaTest()
|
||||
{
|
||||
#ifdef LIBRW
|
||||
rw::SetRenderState(rw::ALPHATESTFUNC, saved_alphafunc);
|
||||
rw::SetRenderState(rw::ALPHATESTREF, saved_alpharef);
|
||||
#else
|
||||
RwD3D8SetRenderState(D3DRS_ALPHAFUNC, saved_alphafunc);
|
||||
RwD3D8SetRenderState(D3DRS_ALPHAREF, saved_alpharef);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue