diff options
author | Fire-Head <Fire-Head@users.noreply.github.com> | 2020-05-27 20:50:01 +0200 |
---|---|---|
committer | Fire-Head <Fire-Head@users.noreply.github.com> | 2020-05-27 20:50:01 +0200 |
commit | 63d0bdc863f76d018fc8cf3209a9210bc71f0421 (patch) | |
tree | bdaa4489e204cbad708a03f5d2dab991c8a7f41f /src/core | |
parent | fix linux build (diff) | |
download | re3-63d0bdc863f76d018fc8cf3209a9210bc71f0421.tar re3-63d0bdc863f76d018fc8cf3209a9210bc71f0421.tar.gz re3-63d0bdc863f76d018fc8cf3209a9210bc71f0421.tar.bz2 re3-63d0bdc863f76d018fc8cf3209a9210bc71f0421.tar.lz re3-63d0bdc863f76d018fc8cf3209a9210bc71f0421.tar.xz re3-63d0bdc863f76d018fc8cf3209a9210bc71f0421.tar.zst re3-63d0bdc863f76d018fc8cf3209a9210bc71f0421.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/Game.cpp | 9 | ||||
-rw-r--r-- | src/core/Game.h | 1 | ||||
-rw-r--r-- | src/core/ZoneCull.h | 3 | ||||
-rw-r--r-- | src/core/config.h | 2 | ||||
-rw-r--r-- | src/core/main.cpp | 5 |
5 files changed, 18 insertions, 2 deletions
diff --git a/src/core/Game.cpp b/src/core/Game.cpp index 72b09feb..9a1c00a7 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -306,7 +306,7 @@ bool CGame::Initialise(const char* datFile) CWorld::Players[0].LoadPlayerSkin(); TestModelIndices(); LoadingScreen("Loading the Game", "Setup water", nil); - CWaterLevel::Initialise("DATA\\WATER.DAT"); + WaterLevelInitialise("DATA\\WATER.DAT"); TheConsole.Init(); CDraw::SetFOV(120.0f); CDraw::ms_fLODDistance = 500.0f; @@ -686,6 +686,13 @@ CGame::InitAfterFocusLoss() } bool +CGame::CanSeeWaterFromCurrArea(void) +{ + return currArea == AREA_MAIN_MAP || currArea == AREA_MANSION + || currArea == AREA_HOTEL; +} + +bool CGame::CanSeeOutSideFromCurrArea(void) { return currArea == AREA_MAIN_MAP || currArea == AREA_MALL || diff --git a/src/core/Game.h b/src/core/Game.h index 7ad8d55e..49a3e67c 100644 --- a/src/core/Game.h +++ b/src/core/Game.h @@ -62,6 +62,7 @@ public: static void InitAfterFocusLoss(void); static bool IsInInterior(void) { return currArea != AREA_MAIN_MAP; } + static bool CanSeeWaterFromCurrArea(void); static bool CanSeeOutSideFromCurrArea(void); // NB: these do something on PS2 diff --git a/src/core/ZoneCull.h b/src/core/ZoneCull.h index e76b7a44..aae06ca0 100644 --- a/src/core/ZoneCull.h +++ b/src/core/ZoneCull.h @@ -10,6 +10,8 @@ enum eZoneAttribs ATTRZONE_NOTCULLZONE = 0x20, ATTRZONE_DOINEEDCOLLISION = 0x40, ATTRZONE_SUBWAYVISIBLE = 0x80, + + ATTRZONE_WATERFUDGE = 0x400, }; struct CAttributeZone @@ -53,6 +55,7 @@ public: static bool DoINeedToLoadCollision(void) { return (CurrentFlags_Player & ATTRZONE_DOINEEDCOLLISION) != 0; } static bool PlayerNoRain(void) { return (CurrentFlags_Player & ATTRZONE_NORAIN) != 0; } static bool CamNoRain(void) { return (CurrentFlags_Camera & ATTRZONE_NORAIN) != 0; } + static bool WaterFudge(void) { return (CurrentFlags_Camera & ATTRZONE_WATERFUDGE) != 0; } static int32 GetWantedLevelDrop(void) { return CurrentWantedLevelDrop_Player; } //--MIAMI: TODO diff --git a/src/core/config.h b/src/core/config.h index 42a9c5ff..8a327000 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -205,6 +205,8 @@ enum Config { #define RELOADABLES // some debug menu options to reload TXD files #endif +//#define PC_WATER + // Particle #define PC_PARTICLE //#define PS2_ALTERNATIVE_CARSPLASH // unused on PS2 diff --git a/src/core/main.cpp b/src/core/main.cpp index aefabfc7..d95e7404 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -821,7 +821,7 @@ RenderScene(void) CRenderer::RenderBoats(); CRenderer::RenderFadingInUnderwaterEntities(); RwRenderStateSet(rwRENDERSTATECULLMODE, (void*)rwCULLMODECULLNONE); - // CWaterLevel::RenderTransparentWater(); + CWaterLevel::RenderTransparentWater(); CRenderer::RenderFadingInEntities(); RwRenderStateSet(rwRENDERSTATECULLMODE, (void*)rwCULLMODECULLNONE); CWeather::RenderRainStreaks(); @@ -1009,6 +1009,9 @@ Idle(void *arg) #ifdef TIMEBARS tbStartTimer(0, "CnstrRenderList"); #endif +#ifdef PC_WATER + CWaterLevel::PreCalcWaterGeometry(); +#endif CRenderer::ConstructRenderList(); #ifdef TIMEBARS tbEndTimer("CnstrRenderList"); |