implemented most of streamed collisions and big buildings

This commit is contained in:
aap 2020-05-05 13:02:42 +02:00
parent 84c9484e55
commit b44df26d3e
41 changed files with 1346 additions and 95 deletions

View file

@ -89,6 +89,9 @@
eLevelName CGame::currLevel;
#ifdef MIAMI
int32 CGame::currArea;
#endif
bool CGame::bDemoMode = true;
bool CGame::nastyGame = true;
bool CGame::frenchGame;
@ -319,22 +322,7 @@ bool CGame::Initialise(const char* datFile)
CDraw::SetFOV(120.0f);
CDraw::ms_fLODDistance = 500.0f;
LoadingScreen("Loading the Game", "Setup streaming", nil);
#ifdef USE_TXD_CDIMAGE
int txdHandle = CFileMgr::OpenFile("MODELS\\TXD.IMG", "r");
if (txdHandle)
CFileMgr::CloseFile(txdHandle);
if (!CheckVideoCardCaps() && txdHandle) {
CdStreamAddImage("MODELS\\TXD.IMG");
CStreaming::Init();
} else {
CStreaming::Init();
if (CreateTxdImageForVideoCard()) {
CStreaming::Shutdown();
CdStreamAddImage("MODELS\\TXD.IMG");
CStreaming::Init();
}
}
#else
#ifndef MIAMI
CStreaming::Init();
#endif
CStreaming::LoadInitialVehicles();
@ -384,8 +372,10 @@ bool CGame::Initialise(const char* datFile)
CWaterCannons::Init();
CBridge::Init();
CGarages::Init();
#ifndef MIAMI
LoadingScreen("Loading the Game", "Position dynamic objects", nil);
CWorld::RepositionCertainDynamicObjects();
#endif
LoadingScreen("Loading the Game", "Initialise vehicle paths", nil);
#ifdef GTA_ZONECULL
CCullZones::ResolveVisibilities();
@ -400,7 +390,9 @@ bool CGame::Initialise(const char* datFile)
CTheScripts::Process();
TheCamera.Process();
LoadingScreen("Loading the Game", "Load scene", nil);
#ifndef MIAMI
CModelInfo::RemoveColModelsFromOtherLevels(currLevel);
#endif
CCollision::ms_collisionInMemory = currLevel;
for (int i = 0; i < MAX_PADS; i++)
CPad::GetPad(i)->Clear(true);
@ -540,7 +532,9 @@ void CGame::ReloadIPLs(void)
CRoadBlocks::Init();
CCranes::InitCranes();
CGarages::Init();
#ifndef MIAMI
CWorld::RepositionCertainDynamicObjects();
#endif
#ifdef GTA_ZONECULL
CCullZones::ResolveVisibilities();
#endif