summaryrefslogtreecommitdiffstats
path: root/src/core/Game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/Game.cpp')
-rw-r--r--src/core/Game.cpp38
1 files changed, 21 insertions, 17 deletions
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index bffc620c..8dee29e2 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -322,7 +322,7 @@ bool CGame::InitialiseOnceAfterRW(void)
{
TheText.Load();
CTimer::Initialise();
- CTempColModels::Initialise();
+ gpTempColModels->Initialise();
mod_HandlingManager.Initialise();
CSurfaceTable::Initialise("DATA\\SURFACE.DAT");
CPedStats::Initialise();
@@ -372,13 +372,16 @@ bool CGame::Initialise(const char* datFile)
CPools::Initialise();
+ if(gMakeResources)
+ CVehicleModelInfo::Load(nil);
+
#ifndef GTA_PS2
CIniFile::LoadIniFile();
#endif
#ifdef USE_TEXTURE_POOL
_TexturePoolsUnknown(false);
#endif
- currLevel = LEVEL_BEACH;
+ currLevel = LEVEL_INDUSTRIAL;
currArea = AREA_MAIN_MAP;
PUSH_MEMID(MEMID_TEXTURES);
@@ -449,7 +452,7 @@ bool CGame::Initialise(const char* datFile)
CdStreamAddImage("MODELS\\GTA3.IMG");
- CFileLoader::LoadLevel("DATA\\DEFAULT.DAT");
+// CFileLoader::LoadLevel("DATA\\DEFAULT.DAT");
CFileLoader::LoadLevel(datFile);
LoadingScreen("Loading the Game", "Add Particles", nil);
@@ -592,7 +595,7 @@ bool CGame::ShutDown(void)
CPlane::Shutdown();
CTrain::Shutdown();
CScriptPaths::Shutdown();
- CWaterCreatures::RemoveAll();
+ //CWaterCreatures::RemoveAll();
CSpecialFX::Shutdown();
CGarages::Shutdown();
CMovingThings::Shutdown();
@@ -666,8 +669,9 @@ void CGame::ReInitGameObjectVariables(void)
CDraw::SetFOV(120.0f);
CDraw::ms_fLODDistance = 500.0f;
CStreaming::RequestBigBuildings(LEVEL_GENERIC);
- CStreaming::RemoveIslandsNotUsed(LEVEL_BEACH);
- CStreaming::RemoveIslandsNotUsed(LEVEL_MAINLAND);
+ CStreaming::RemoveIslandsNotUsed(LEVEL_INDUSTRIAL);
+ CStreaming::RemoveIslandsNotUsed(LEVEL_COMMERCIAL);
+ CStreaming::RemoveIslandsNotUsed(LEVEL_SUBURBAN);
CStreaming::LoadAllRequestedModels(false);
currArea = AREA_MAIN_MAP;
CPed::Initialise();
@@ -753,7 +757,7 @@ void CGame::ShutDownForRestart(void)
CRadar::RemoveRadarSections();
FrontEndMenuManager.UnloadTextures();
CParticleObject::RemoveAllExpireableParticleObjects();
- CWaterCreatures::RemoveAll();
+ //CWaterCreatures::RemoveAll();
CSetPieces::Init();
CPedType::Shutdown();
CSpecialFX::Shutdown();
@@ -858,9 +862,9 @@ void CGame::Process(void)
gameProcessPirateCheck = 2;
}
#endif
- uint32 startTime = CTimer::GetCurrentTimeInCycles() / CTimer::GetCyclesPerMillisecond();
+ //uint32 startTime = CTimer::GetCurrentTimeInCycles() / CTimer::GetCyclesPerMillisecond();
CStreaming::Update();
- uint32 processTime = CTimer::GetCurrentTimeInCycles() / CTimer::GetCyclesPerMillisecond() - startTime;
+ //uint32 processTime = CTimer::GetCurrentTimeInCycles() / CTimer::GetCyclesPerMillisecond() - startTime;
CWindModifiers::Number = 0;
if (!CTimer::GetIsPaused())
{
@@ -899,20 +903,20 @@ void CGame::Process(void)
CEventList::Update();
CParticle::Update();
gFireManager.Update();
- if (processTime >= 2) {
- CPopulation::Update(false);
- } else {
- uint32 startTime = CTimer::GetCurrentTimeInCycles() / CTimer::GetCyclesPerMillisecond();
+ //if (processTime >= 2) {
+ // CPopulation::Update(false);
+ //} else {
+ // uint32 startTime = CTimer::GetCurrentTimeInCycles() / CTimer::GetCyclesPerMillisecond();
CPopulation::Update(true);
- processTime = CTimer::GetCurrentTimeInCycles() / CTimer::GetCyclesPerMillisecond() - startTime;
- }
+ // processTime = CTimer::GetCurrentTimeInCycles() / CTimer::GetCyclesPerMillisecond() - startTime;
+ //}
CWeapon::UpdateWeapons();
if (!CCutsceneMgr::IsRunning())
CTheCarGenerators::Process();
if (!CReplay::IsPlayingBack())
CCranes::UpdateCranes();
CClouds::Update();
- CMovingThings::Update();
+ //CMovingThings::Update(); // TODO
CWaterCannons::Update();
CUserDisplay::Process();
CReplay::Update();
@@ -943,7 +947,7 @@ void CGame::Process(void)
if (!CReplay::IsPlayingBack())
{
PUSH_MEMID(MEMID_CARS);
- if (processTime < 2)
+ //if (processTime < 2)
CCarCtrl::GenerateRandomCars();
CRoadBlocks::GenerateRoadBlocks();
CCarCtrl::RemoveDistantCars();