1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 06:50:00 +00:00

some more little ps2 fixes

This commit is contained in:
aap 2020-12-20 19:13:58 +01:00
parent 84a9ca0524
commit 43b4c8dd33
3 changed files with 19 additions and 4 deletions

View file

@ -371,7 +371,11 @@ CGame::FinalShutdown(void)
CdStreamShutdown(); CdStreamShutdown();
} }
#if GTA_VERSION <= GTA3_PS2_160
bool CGame::Initialise(void)
#else
bool CGame::Initialise(const char* datFile) bool CGame::Initialise(const char* datFile)
#endif
{ {
#ifdef GTA_PS2 #ifdef GTA_PS2
// TODO: upload VU0 collision code here // TODO: upload VU0 collision code here

View file

@ -30,7 +30,11 @@ public:
static void ShutdownRenderWare(void); static void ShutdownRenderWare(void);
static bool InitialiseOnceAfterRW(void); static bool InitialiseOnceAfterRW(void);
static void FinalShutdown(void); static void FinalShutdown(void);
#if GTA_VERSION <= GTA3_PS2_160
static bool Initialise(void);
#else
static bool Initialise(const char *datFile); static bool Initialise(const char *datFile);
#endif
static bool ShutDown(void); static bool ShutDown(void);
static void ReInitGameObjectVariables(void); static void ReInitGameObjectVariables(void);
static void ReloadIPLs(void); static void ReloadIPLs(void);

View file

@ -1688,7 +1688,7 @@ void TheGame(void)
CTimer::Initialise(); CTimer::Initialise();
#ifdef GTA_PS2 #if GTA_VERSION <= GTA3_PS2_160
CGame::Initialise(); CGame::Initialise();
#else #else
CGame::Initialise("DATA\\GTA3.DAT"); CGame::Initialise("DATA\\GTA3.DAT");
@ -1758,7 +1758,7 @@ void TheGame(void)
PUSH_MEMID(MEMID_RENDER); PUSH_MEMID(MEMID_RENDER);
if (!FrontEndMenuManager.m_bMenuActive || FrontEndMenuManager.m_bRenderGameInMenu == true && TheCamera.GetScreenFadeStatus() != FADE_2 ) if ((!FrontEndMenuManager.m_bMenuActive || FrontEndMenuManager.m_bRenderGameInMenu == true) && TheCamera.GetScreenFadeStatus() != FADE_2 )
{ {
PUSH_MEMID(MEMID_RENDERLIST); PUSH_MEMID(MEMID_RENDERLIST);
@ -1766,14 +1766,22 @@ void TheGame(void)
CRenderer::PreRender(); CRenderer::PreRender();
POP_MEMID(); POP_MEMID();
#ifdef FIX_BUGS
// This has to be done BEFORE RwCameraBeginUpdate
RwCameraSetFarClipPlane(Scene.camera, CTimeCycle::GetFarClip());
RwCameraSetFogDistance(Scene.camera, CTimeCycle::GetFogStart());
#endif
if (CWeather::LightningFlash && !CCullZones::CamNoRain()) if (CWeather::LightningFlash && !CCullZones::CamNoRain())
DoRWStuffStartOfFrame_Horizon(255, 255, 255, 255, 255, 255, 255); DoRWStuffStartOfFrame_Horizon(255, 255, 255, 255, 255, 255, 255);
else else
DoRWStuffStartOfFrame_Horizon(CTimeCycle::GetSkyTopRed(), CTimeCycle::GetSkyTopGreen(), CTimeCycle::GetSkyTopBlue(), CTimeCycle::GetSkyBottomRed(), CTimeCycle::GetSkyBottomGreen(), CTimeCycle::GetSkyBottomBlue(), 255); DoRWStuffStartOfFrame_Horizon(CTimeCycle::GetSkyTopRed(), CTimeCycle::GetSkyTopGreen(), CTimeCycle::GetSkyTopBlue(), CTimeCycle::GetSkyBottomRed(), CTimeCycle::GetSkyBottomGreen(), CTimeCycle::GetSkyBottomBlue(), 255);
DefinedState(); DefinedState();
#ifndef FIX_BUGS
RwCameraSetFarClipPlane(Scene.camera, CTimeCycle::GetFarClip()); RwCameraSetFarClipPlane(Scene.camera, CTimeCycle::GetFarClip());
RwCameraSetFogDistance(Scene.camera, CTimeCycle::GetFogStart()); RwCameraSetFogDistance(Scene.camera, CTimeCycle::GetFogStart());
#endif
RenderScene(); RenderScene();
RenderDebugShit(); RenderDebugShit();
@ -1794,8 +1802,7 @@ void TheGame(void)
#endif #endif
CVisibilityPlugins::SetRenderWareCamera(Scene.camera); CVisibilityPlugins::SetRenderWareCamera(Scene.camera);
RwCameraClear(Scene.camera, &gColourTop, rwCAMERACLEARZ); RwCameraClear(Scene.camera, &gColourTop, rwCAMERACLEARZ);
if (!RsCameraBeginUpdate(Scene.camera)) RsCameraBeginUpdate(Scene.camera);
break;
} }
RenderMenus(); RenderMenus();