Merge branch 'master' into miami

# Conflicts:
#	src/control/CarAI.cpp
#	src/control/Phones.cpp
#	src/control/Phones.h
#	src/control/Record.cpp
#	src/control/Restart.cpp
#	src/control/Script.cpp
#	src/core/Collision.cpp
#	src/core/Frontend.cpp
#	src/core/Frontend.h
#	src/core/Game.h
#	src/core/Streaming.cpp
#	src/core/TempColModels.cpp
#	src/core/Wanted.cpp
#	src/core/Zones.cpp
#	src/core/config.h
#	src/core/main.cpp
#	src/core/re3.cpp
#	src/entities/Entity.cpp
#	src/entities/Physical.cpp
#	src/extras/frontendoption.cpp
#	src/modelinfo/ModelInfo.cpp
#	src/modelinfo/PedModelInfo.cpp
#	src/peds/CivilianPed.cpp
#	src/peds/CopPed.cpp
#	src/peds/EmergencyPed.cpp
#	src/peds/Ped.cpp
#	src/peds/Ped.h
#	src/peds/Population.cpp
#	src/render/Renderer.cpp
#	src/save/GenericGameStorage.cpp
#	src/skel/win/win.cpp
#	src/vehicles/Automobile.cpp
#	src/vehicles/Boat.cpp
#	src/vehicles/Boat.h
#	src/vehicles/Vehicle.cpp
This commit is contained in:
Sergeanur 2020-07-13 18:10:17 +03:00
commit d0f5464200
30 changed files with 140 additions and 60 deletions

View File

@ -155,8 +155,8 @@ CGameLogic::Update()
CCarCtrl::ClearInterestingVehicleList(); CCarCtrl::ClearInterestingVehicleList();
CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1); CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1);
CRestart::FindClosestHospitalRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat); CRestart::FindClosestHospitalRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat);
CRestart::OverrideHospitalLevel = LEVEL_NONE; CRestart::OverrideHospitalLevel = LEVEL_GENERIC;
CRestart::OverridePoliceStationLevel = LEVEL_NONE; CRestart::OverridePoliceStationLevel = LEVEL_GENERIC;
PassTime(720); PassTime(720);
RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat); RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat);
AfterDeathArrestSetUpShortCutTaxi(); AfterDeathArrestSetUpShortCutTaxi();
@ -261,8 +261,8 @@ CGameLogic::Update()
CCarCtrl::ClearInterestingVehicleList(); CCarCtrl::ClearInterestingVehicleList();
CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1); CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1);
CRestart::FindClosestPoliceRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat); CRestart::FindClosestPoliceRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat);
CRestart::OverrideHospitalLevel = LEVEL_NONE; CRestart::OverrideHospitalLevel = LEVEL_GENERIC;
CRestart::OverridePoliceStationLevel = LEVEL_NONE; CRestart::OverridePoliceStationLevel = LEVEL_GENERIC;
PassTime(720); PassTime(720);
RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat); RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat);
AfterDeathArrestSetUpShortCutTaxi(); AfterDeathArrestSetUpShortCutTaxi();
@ -313,8 +313,8 @@ CGameLogic::Update()
CCarCtrl::ClearInterestingVehicleList(); CCarCtrl::ClearInterestingVehicleList();
CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1); CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1);
CRestart::FindClosestPoliceRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat); CRestart::FindClosestPoliceRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat);
CRestart::OverridePoliceStationLevel = LEVEL_NONE; CRestart::OverridePoliceStationLevel = LEVEL_GENERIC;
CRestart::OverrideHospitalLevel = LEVEL_NONE; CRestart::OverrideHospitalLevel = LEVEL_GENERIC;
RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat); RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat);
SortOutStreamingAndMemory(pPlayerInfo.GetPos()); SortOutStreamingAndMemory(pPlayerInfo.GetPos());
TheCamera.m_fCamShakeForce = 0.0f; TheCamera.m_fCamShakeForce = 0.0f;

View File

@ -284,6 +284,7 @@ CPhoneInfo::Initialise(void)
CBuilding *building = pool->GetSlot(i); CBuilding *building = pool->GetSlot(i);
if (building) { if (building) {
if (building->GetModelIndex() == MI_PHONEBOOTH1) { if (building->GetModelIndex() == MI_PHONEBOOTH1) {
assert(m_nMax < ARRAY_SIZE(m_aPhones) && "NUMPHONES should be increased");
CPhone *maxPhone = &m_aPhones[m_nMax]; CPhone *maxPhone = &m_aPhones[m_nMax];
maxPhone->m_nState = PHONE_STATE_FREE; maxPhone->m_nState = PHONE_STATE_FREE;
maxPhone->m_vecPos = building->GetPosition(); maxPhone->m_vecPos = building->GetPosition();

View File

@ -170,7 +170,7 @@ static void ApplyPanelDamageToCar(uint32 panels, CAutomobile* vehicle, bool flyi
void PrintElementsInPtrList(void) void PrintElementsInPtrList(void)
{ {
for (CPtrNode* node = CWorld::GetBigBuildingList(LEVEL_NONE).first; node; node = node->next) { for (CPtrNode* node = CWorld::GetBigBuildingList(LEVEL_GENERIC).first; node; node = node->next) {
/* Most likely debug print was present here */ /* Most likely debug print was present here */
} }
} }
@ -1143,7 +1143,7 @@ void CReplay::StoreStuffInMem(void)
pWorld1 = new uint8[sizeof(CSector) * NUMSECTORS_X * NUMSECTORS_Y]; pWorld1 = new uint8[sizeof(CSector) * NUMSECTORS_X * NUMSECTORS_Y];
memcpy(pWorld1, CWorld::GetSector(0, 0), NUMSECTORS_X * NUMSECTORS_Y * sizeof(CSector)); memcpy(pWorld1, CWorld::GetSector(0, 0), NUMSECTORS_X * NUMSECTORS_Y * sizeof(CSector));
WorldPtrList = CWorld::GetMovingEntityList().first; // why WorldPtrList = CWorld::GetMovingEntityList().first; // why
BigBuildingPtrList = CWorld::GetBigBuildingList(LEVEL_NONE).first; BigBuildingPtrList = CWorld::GetBigBuildingList(LEVEL_GENERIC).first;
pPickups = new uint8[sizeof(CPickup) * NUMPICKUPS]; pPickups = new uint8[sizeof(CPickup) * NUMPICKUPS];
memcpy(pPickups, CPickups::aPickUps, NUMPICKUPS * sizeof(CPickup)); memcpy(pPickups, CPickups::aPickUps, NUMPICKUPS * sizeof(CPickup));
pReferences = new uint8[(sizeof(CReference) * NUMREFERENCES)]; pReferences = new uint8[(sizeof(CReference) * NUMREFERENCES)];
@ -1189,7 +1189,7 @@ void CReplay::RestoreStuffFromMem(void)
delete[] pWorld1; delete[] pWorld1;
pWorld1 = nil; pWorld1 = nil;
CWorld::GetMovingEntityList().first = WorldPtrList; CWorld::GetMovingEntityList().first = WorldPtrList;
CWorld::GetBigBuildingList(LEVEL_NONE).first = BigBuildingPtrList; CWorld::GetBigBuildingList(LEVEL_GENERIC).first = BigBuildingPtrList;
memcpy(CPickups::aPickUps, pPickups, sizeof(CPickup) * NUMPICKUPS); memcpy(CPickups::aPickUps, pPickups, sizeof(CPickup) * NUMPICKUPS);
delete[] pPickups; delete[] pPickups;
pPickups = nil; pPickups = nil;

View File

@ -24,8 +24,8 @@ uint16 CRestart::NumberOfPoliceRestarts;
void void
CRestart::Initialise() CRestart::Initialise()
{ {
OverridePoliceStationLevel = LEVEL_NONE; OverridePoliceStationLevel = LEVEL_GENERIC;
OverrideHospitalLevel = LEVEL_NONE; OverrideHospitalLevel = LEVEL_GENERIC;
bFadeInAfterNextArrest = true; bFadeInAfterNextArrest = true;
bFadeInAfterNextDeath = true; bFadeInAfterNextDeath = true;
OverrideHeading = 0.0f; OverrideHeading = 0.0f;
@ -86,7 +86,7 @@ CRestart::FindClosestHospitalRestartPoint(const CVector &pos, CVector *outPos, f
// find closest point on this level // find closest point on this level
for (int i = 0; i < NumberOfHospitalRestarts; i++) { for (int i = 0; i < NumberOfHospitalRestarts; i++) {
if (CTheZones::GetLevelFromPosition(&HospitalRestartPoints[i]) == (OverrideHospitalLevel != LEVEL_NONE ? OverrideHospitalLevel : curlevel)) { if (CTheZones::GetLevelFromPosition(&HospitalRestartPoints[i]) == (OverrideHospitalLevel != LEVEL_GENERIC ? OverrideHospitalLevel : curlevel)) {
float dist = (pos - HospitalRestartPoints[i]).MagnitudeSqr(); float dist = (pos - HospitalRestartPoints[i]).MagnitudeSqr();
if (fMinDist >= dist) { if (fMinDist >= dist) {
fMinDist = dist; fMinDist = dist;
@ -133,7 +133,7 @@ CRestart::FindClosestPoliceRestartPoint(const CVector &pos, CVector *outPos, flo
// find closest point on this level // find closest point on this level
for (int i = 0; i < NumberOfPoliceRestarts; i++) { for (int i = 0; i < NumberOfPoliceRestarts; i++) {
if (CTheZones::GetLevelFromPosition(&PoliceRestartPoints[i]) == (OverridePoliceStationLevel != LEVEL_NONE ? OverridePoliceStationLevel : curlevel)) { if (CTheZones::GetLevelFromPosition(&PoliceRestartPoints[i]) == (OverridePoliceStationLevel != LEVEL_GENERIC ? OverridePoliceStationLevel : curlevel)) {
float dist = (pos - PoliceRestartPoints[i]).MagnitudeSqr(); float dist = (pos - PoliceRestartPoints[i]).MagnitudeSqr();
if (fMinDist >= dist) { if (fMinDist >= dist) {
fMinDist = dist; fMinDist = dist;

View File

@ -9143,7 +9143,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
CEntity* apEntities[16]; CEntity* apEntities[16];
CWorld::FindObjectsOfTypeInRange(mi, pos, range, true, &total, 16, apEntities, true, false, false, true, true); CWorld::FindObjectsOfTypeInRange(mi, pos, range, true, &total, 16, apEntities, true, false, false, true, true);
if (total == 0) if (total == 0)
CWorld::FindObjectsOfTypeInRangeSectorList(mi, CWorld::GetBigBuildingList(LEVEL_NONE), pos, range, true, &total, 16, apEntities); CWorld::FindObjectsOfTypeInRangeSectorList(mi, CWorld::GetBigBuildingList(LEVEL_GENERIC), pos, range, true, &total, 16, apEntities);
if (total == 0) if (total == 0)
CWorld::FindObjectsOfTypeInRangeSectorList(mi, CWorld::GetBigBuildingList(CTheZones::GetLevelFromPosition(&pos)), pos, range, true, &total, 16, apEntities); CWorld::FindObjectsOfTypeInRangeSectorList(mi, CWorld::GetBigBuildingList(CTheZones::GetLevelFromPosition(&pos)), pos, range, true, &total, 16, apEntities);
CEntity* pClosestEntity = nil; CEntity* pClosestEntity = nil;
@ -9933,7 +9933,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
CEntity* apEntities[16]; CEntity* apEntities[16];
CWorld::FindObjectsOfTypeInRange(mi1, pos, radius, true, &total, 16, apEntities, true, false, false, false, false); CWorld::FindObjectsOfTypeInRange(mi1, pos, radius, true, &total, 16, apEntities, true, false, false, false, false);
if (total == 0) if (total == 0)
CWorld::FindObjectsOfTypeInRangeSectorList(mi1, CWorld::GetBigBuildingList(LEVEL_NONE), pos, radius, true, &total, 16, apEntities); CWorld::FindObjectsOfTypeInRangeSectorList(mi1, CWorld::GetBigBuildingList(LEVEL_GENERIC), pos, radius, true, &total, 16, apEntities);
if (total == 0) if (total == 0)
CWorld::FindObjectsOfTypeInRangeSectorList(mi1, CWorld::GetBigBuildingList(CTheZones::GetLevelFromPosition(&pos)), pos, radius, true, &total, 16, apEntities); CWorld::FindObjectsOfTypeInRangeSectorList(mi1, CWorld::GetBigBuildingList(CTheZones::GetLevelFromPosition(&pos)), pos, radius, true, &total, 16, apEntities);
CEntity* pClosestEntity = nil; CEntity* pClosestEntity = nil;
@ -10593,11 +10593,15 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
CollectParameters(&m_nIp, 1); CollectParameters(&m_nIp, 1);
CTimer::Stop(); CTimer::Stop();
CGame::currLevel = (eLevelName)ScriptParams[0]; CGame::currLevel = (eLevelName)ScriptParams[0];
#ifndef NO_ISLAND_LOADING
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel); CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
CStreaming::RemoveUnusedBuildings(CGame::currLevel); CStreaming::RemoveUnusedBuildings(CGame::currLevel);
#endif
CCollision::SortOutCollisionAfterLoad(); CCollision::SortOutCollisionAfterLoad();
#ifndef NO_ISLAND_LOADING
CStreaming::RequestIslands(CGame::currLevel); CStreaming::RequestIslands(CGame::currLevel);
CStreaming::LoadAllRequestedModels(true); CStreaming::LoadAllRequestedModels(true);
#endif
CTimer::Update(); CTimer::Update();
return 0; return 0;
} }
@ -10626,7 +10630,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
if (ScriptParams[1]) if (ScriptParams[1])
pVehicle->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pVehicle->GetPosition()); pVehicle->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pVehicle->GetPosition());
else else
pVehicle->m_nZoneLevel = LEVEL_NONE; pVehicle->m_nZoneLevel = LEVEL_GENERIC;
return 0; return 0;
} }
case COMMAND_SET_CHAR_STAYS_IN_CURRENT_LEVEL: case COMMAND_SET_CHAR_STAYS_IN_CURRENT_LEVEL:
@ -10637,7 +10641,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
if (ScriptParams[1]) if (ScriptParams[1])
pPed->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pPed->GetPosition()); pPed->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pPed->GetPosition());
else else
pPed->m_nZoneLevel = LEVEL_NONE; pPed->m_nZoneLevel = LEVEL_GENERIC;
return 0; return 0;
} }
*/ */
@ -11275,18 +11279,24 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
CTimer::Stop(); CTimer::Stop();
CGame::currLevel = (eLevelName)ScriptParams[0]; CGame::currLevel = (eLevelName)ScriptParams[0];
if (CGame::currLevel != CCollision::ms_collisionInMemory) { if (CGame::currLevel != CCollision::ms_collisionInMemory) {
#ifndef NO_ISLAND_LOADING
DMAudio.SetEffectsFadeVol(0); DMAudio.SetEffectsFadeVol(0);
CPad::StopPadsShaking(); CPad::StopPadsShaking();
CCollision::LoadCollisionScreen(CGame::currLevel); CCollision::LoadCollisionScreen(CGame::currLevel);
DMAudio.Service(); DMAudio.Service();
#endif
CPopulation::DealWithZoneChange(CCollision::ms_collisionInMemory, CGame::currLevel, false); CPopulation::DealWithZoneChange(CCollision::ms_collisionInMemory, CGame::currLevel, false);
#ifndef NO_ISLAND_LOADING
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel); CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
CStreaming::RemoveUnusedBuildings(CGame::currLevel); CStreaming::RemoveUnusedBuildings(CGame::currLevel);
#endif
CCollision::SortOutCollisionAfterLoad(); CCollision::SortOutCollisionAfterLoad();
#ifndef NO_ISLAND_LOADING
CStreaming::RequestIslands(CGame::currLevel); CStreaming::RequestIslands(CGame::currLevel);
CStreaming::RequestBigBuildings(CGame::currLevel); CStreaming::RequestBigBuildings(CGame::currLevel);
CStreaming::LoadAllRequestedModels(true); CStreaming::LoadAllRequestedModels(true);
DMAudio.SetEffectsFadeVol(127); DMAudio.SetEffectsFadeVol(127);
#endif
} }
CTimer::Update(); CTimer::Update();
return 0; return 0;

View File

@ -41,7 +41,7 @@ void
CCollision::Init(void) CCollision::Init(void)
{ {
ms_colModelCache.Init(NUMCOLCACHELINKS); ms_colModelCache.Init(NUMCOLCACHELINKS);
ms_collisionInMemory = LEVEL_NONE; ms_collisionInMemory = LEVEL_GENERIC;
CColStore::Initialise(); CColStore::Initialise();
} }
@ -70,10 +70,10 @@ GetCollisionInSectorList(CPtrList &list)
for(node = list.first; node; node = node->next){ for(node = list.first; node; node = node->next){
e = (CEntity*)node->item; e = (CEntity*)node->item;
level = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel()->level; level = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel()->level;
if(level != LEVEL_NONE) if(level != LEVEL_GENERIC)
return (eLevelName)level; return (eLevelName)level;
} }
return LEVEL_NONE; return LEVEL_GENERIC;
} }
//--MIAMI: unused //--MIAMI: unused
@ -84,15 +84,15 @@ GetCollisionInSector(CSector &sect)
int level; int level;
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_BUILDINGS]); level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_BUILDINGS]);
if(level == LEVEL_NONE) if(level == LEVEL_GENERIC)
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_BUILDINGS_OVERLAP]); level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_BUILDINGS_OVERLAP]);
if(level == LEVEL_NONE) if(level == LEVEL_GENERIC)
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_OBJECTS]); level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_OBJECTS]);
if(level == LEVEL_NONE) if(level == LEVEL_GENERIC)
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_OBJECTS_OVERLAP]); level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_OBJECTS_OVERLAP]);
if(level == LEVEL_NONE) if(level == LEVEL_GENERIC)
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_DUMMIES]); level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_DUMMIES]);
if(level == LEVEL_NONE) if(level == LEVEL_GENERIC)
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_DUMMIES_OVERLAP]); level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_DUMMIES_OVERLAP]);
return (eLevelName)level; return (eLevelName)level;
} }

View File

@ -91,6 +91,10 @@ int curBottomBarOption = -1;
int hoveredBottomBarOption = -1; int hoveredBottomBarOption = -1;
#endif #endif
#ifdef CUTSCENE_BORDERS_SWITCH
bool CMenuManager::m_PrefsCutsceneBorders = true;
#endif
// Originally that was PS2 option color, they forget it here and used in PrintBriefs once(but didn't use the output anyway) // Originally that was PS2 option color, they forget it here and used in PrintBriefs once(but didn't use the output anyway)
#ifdef PS2_LIKE_MENU #ifdef PS2_LIKE_MENU
const CRGBA TEXT_COLOR = CRGBA(150, 110, 30, 255); const CRGBA TEXT_COLOR = CRGBA(150, 110, 30, 255);
@ -3166,6 +3170,9 @@ CMenuManager::LoadSettings()
CFileMgr::Read(fileHandle, (char*)&m_PrefsShowHud, 1); CFileMgr::Read(fileHandle, (char*)&m_PrefsShowHud, 1);
CFileMgr::Read(fileHandle, (char*)&m_PrefsRadarMode, 1); CFileMgr::Read(fileHandle, (char*)&m_PrefsRadarMode, 1);
CFileMgr::Read(fileHandle, (char*)&m_PrefsShowLegends, 1); CFileMgr::Read(fileHandle, (char*)&m_PrefsShowLegends, 1);
#ifdef CUTSCENE_BORDERS_SWITCH
CFileMgr::Read(fileHandle, (char *)&CMenuManager::m_PrefsCutsceneBorders, 1);
#endif
} }
} }
@ -3275,6 +3282,9 @@ CMenuManager::SaveSettings()
CFileMgr::Write(fileHandle, (char*)&m_PrefsShowHud, 1); CFileMgr::Write(fileHandle, (char*)&m_PrefsShowHud, 1);
CFileMgr::Write(fileHandle, (char*)&m_PrefsRadarMode, 1); CFileMgr::Write(fileHandle, (char*)&m_PrefsRadarMode, 1);
CFileMgr::Write(fileHandle, (char*)&m_PrefsShowLegends, 1); CFileMgr::Write(fileHandle, (char*)&m_PrefsShowLegends, 1);
#ifdef CUTSCENE_BORDERS_SWITCH
CFileMgr::Write(fileHandle, (char *)&CMenuManager::m_PrefsCutsceneBorders, 1);
#endif
} }
m_lastWorking3DAudioProvider = m_nPrefsAudio3DProviderIndex; m_lastWorking3DAudioProvider = m_nPrefsAudio3DProviderIndex;

View File

@ -598,6 +598,10 @@ public:
}; };
bool GetIsMenuActive() {return !!m_bMenuActive;} bool GetIsMenuActive() {return !!m_bMenuActive;}
#ifdef CUTSCENE_BORDERS_SWITCH
static bool m_PrefsCutsceneBorders;
#endif
#ifndef MASTER #ifndef MASTER
static bool m_PrefsMarketing; static bool m_PrefsMarketing;
static bool m_PrefsDisableTutorials; static bool m_PrefsDisableTutorials;

View File

@ -354,7 +354,7 @@ bool CGame::Initialise(const char* datFile)
LoadingScreen("Loading the Game", "Setup streaming", nil); LoadingScreen("Loading the Game", "Setup streaming", nil);
CStreaming::LoadInitialVehicles(); CStreaming::LoadInitialVehicles();
CStreaming::LoadInitialPeds(); CStreaming::LoadInitialPeds();
CStreaming::RequestBigBuildings(LEVEL_NONE); CStreaming::RequestBigBuildings(LEVEL_GENERIC);
CStreaming::LoadAllRequestedModels(false); CStreaming::LoadAllRequestedModels(false);
printf("Streaming uses %dK of its memory", CStreaming::ms_memoryUsed / 1024); printf("Streaming uses %dK of its memory", CStreaming::ms_memoryUsed / 1024);
LoadingScreen("Loading the Game", "Load animations", GetRandomSplashScreen()); LoadingScreen("Loading the Game", "Load animations", GetRandomSplashScreen());
@ -505,7 +505,7 @@ void CGame::ReInitGameObjectVariables(void)
CTimeCycle::Initialise(); CTimeCycle::Initialise();
CDraw::SetFOV(120.0f); CDraw::SetFOV(120.0f);
CDraw::ms_fLODDistance = 500.0f; CDraw::ms_fLODDistance = 500.0f;
CStreaming::RequestBigBuildings(LEVEL_NONE); CStreaming::RequestBigBuildings(LEVEL_GENERIC);
CStreaming::LoadAllRequestedModels(false); CStreaming::LoadAllRequestedModels(false);
CPed::Initialise(); CPed::Initialise();
CEventList::Initialise(); CEventList::Initialise();
@ -643,7 +643,7 @@ void CGame::InitialiseWhenRestarting(void)
CTimer::Initialise(); CTimer::Initialise();
FrontEndMenuManager.m_bWantToLoad = false; FrontEndMenuManager.m_bWantToLoad = false;
ReInitGameObjectVariables(); ReInitGameObjectVariables();
currLevel = LEVEL_NONE; currLevel = LEVEL_GENERIC;
CCollision::SortOutCollisionAfterLoad(); CCollision::SortOutCollisionAfterLoad();
} }
} }

View File

@ -2,7 +2,7 @@
enum eLevelName { enum eLevelName {
LEVEL_IGNORE = -1, // beware, this is only used in CPhysical's m_nZoneLevel LEVEL_IGNORE = -1, // beware, this is only used in CPhysical's m_nZoneLevel
LEVEL_NONE = 0, LEVEL_GENERIC = 0,
LEVEL_BEACH, LEVEL_BEACH,
LEVEL_MAINLAND LEVEL_MAINLAND
}; };

View File

@ -560,7 +560,7 @@ CPlayerInfo::Process(void)
veh->m_nZoneLevel = LEVEL_IGNORE; veh->m_nZoneLevel = LEVEL_IGNORE;
for (int i = 0; i < ARRAY_SIZE(veh->pPassengers); i++) { for (int i = 0; i < ARRAY_SIZE(veh->pPassengers); i++) {
if (veh->pPassengers[i]) if (veh->pPassengers[i])
veh->pPassengers[i]->m_nZoneLevel = LEVEL_NONE; veh->pPassengers[i]->m_nZoneLevel = LEVEL_GENERIC;
} }
CStats::DistanceTravelledInVehicle += veh->m_fDistanceTravelled; CStats::DistanceTravelledInVehicle += veh->m_fDistanceTravelled;
} else { } else {

View File

@ -21,8 +21,8 @@ int32 CStats::PedsKilledOfThisType[NUM_PEDTYPES];
int32 CStats::TimesDied; int32 CStats::TimesDied;
int32 CStats::TimesArrested; int32 CStats::TimesArrested;
int32 CStats::KillsSinceLastCheckpoint; int32 CStats::KillsSinceLastCheckpoint;
int32 CStats::DistanceTravelledInVehicle; float CStats::DistanceTravelledInVehicle;
int32 CStats::DistanceTravelledOnFoot; float CStats::DistanceTravelledOnFoot;
int32 CStats::ProgressMade; int32 CStats::ProgressMade;
int32 CStats::TotalProgressInGame; int32 CStats::TotalProgressInGame;
int32 CStats::CarsExploded; int32 CStats::CarsExploded;

View File

@ -25,8 +25,8 @@ public:
static int32 TimesDied; static int32 TimesDied;
static int32 TimesArrested; static int32 TimesArrested;
static int32 KillsSinceLastCheckpoint; static int32 KillsSinceLastCheckpoint;
static int32 DistanceTravelledInVehicle; static float DistanceTravelledInVehicle;
static int32 DistanceTravelledOnFoot; static float DistanceTravelledOnFoot;
static int32 CarsExploded; static int32 CarsExploded;
static int32 PeopleKilledByPlayer; static int32 PeopleKilledByPlayer;
static int32 ProgressMade; static int32 ProgressMade;

View File

@ -723,7 +723,11 @@ CStreaming::RequestBigBuildings(eLevelName level, const CVector &pos)
n = CPools::GetBuildingPool()->GetSize()-1; n = CPools::GetBuildingPool()->GetSize()-1;
for(i = n; i >= 0; i--){ for(i = n; i >= 0; i--){
b = CPools::GetBuildingPool()->GetSlot(i); b = CPools::GetBuildingPool()->GetSlot(i);
if(b && b->bIsBIGBuilding && b->m_level == level) if(b && b->bIsBIGBuilding
#ifndef NO_ISLAND_LOADING
&& b->m_level == level
#endif
)
if(b->bStreamBIGBuilding){ if(b->bStreamBIGBuilding){
if(CRenderer::ShouldModelBeStreamed(b, pos)) if(CRenderer::ShouldModelBeStreamed(b, pos))
RequestModel(b->GetModelIndex(), 0); RequestModel(b->GetModelIndex(), 0);
@ -795,6 +799,7 @@ CStreaming::InstanceLoadedModels(const CVector &pos)
void void
CStreaming::RequestIslands(eLevelName level) CStreaming::RequestIslands(eLevelName level)
{ {
#ifndef NO_ISLAND_LOADING
switch(level){ switch(level){
case LEVEL_MAINLAND: case LEVEL_MAINLAND:
if(islandLODbeach != -1) if(islandLODbeach != -1)
@ -806,6 +811,7 @@ CStreaming::RequestIslands(eLevelName level)
break; break;
default: break; default: break;
} }
#endif
} }
//--MIAMI: TODO //--MIAMI: TODO
@ -1010,10 +1016,12 @@ CStreaming::RemoveBuildings(eLevelName level)
void void
CStreaming::RemoveUnusedBigBuildings(eLevelName level) CStreaming::RemoveUnusedBigBuildings(eLevelName level)
{ {
#ifndef NO_ISLAND_LOADING
if(level != LEVEL_BEACH) if(level != LEVEL_BEACH)
RemoveBigBuildings(LEVEL_BEACH); RemoveBigBuildings(LEVEL_BEACH);
if(level != LEVEL_MAINLAND) if(level != LEVEL_MAINLAND)
RemoveBigBuildings(LEVEL_MAINLAND); RemoveBigBuildings(LEVEL_MAINLAND);
#endif
RemoveIslandsNotUsed(level); RemoveIslandsNotUsed(level);
} }
@ -1035,6 +1043,7 @@ DeleteIsland(CEntity *island)
void void
CStreaming::RemoveIslandsNotUsed(eLevelName level) CStreaming::RemoveIslandsNotUsed(eLevelName level)
{ {
#ifndef NO_ISLAND_LOADING
int i; int i;
if(pIslandLODmainlandEntity == nil) if(pIslandLODmainlandEntity == nil)
for(i = CPools::GetBuildingPool()->GetSize()-1; i >= 0; i--){ for(i = CPools::GetBuildingPool()->GetSize()-1; i >= 0; i--){
@ -1053,8 +1062,10 @@ CStreaming::RemoveIslandsNotUsed(eLevelName level)
break; break;
case LEVEL_BEACH: case LEVEL_BEACH:
DeleteIsland(pIslandLODbeachEntity); DeleteIsland(pIslandLODbeachEntity);
break; break;
} }
#endif // !NO_ISLAND_LOADING
} }
//--MIAMI: done //--MIAMI: done
@ -1594,7 +1605,7 @@ CStreaming::LoadBigBuildingsWhenNeeded(void)
if(CCutsceneMgr::IsCutsceneProcessing()) if(CCutsceneMgr::IsCutsceneProcessing())
return; return;
if(CTheZones::m_CurrLevel == LEVEL_NONE || if(CTheZones::m_CurrLevel == LEVEL_GENERIC ||
CTheZones::m_CurrLevel == CGame::currLevel) CTheZones::m_CurrLevel == CGame::currLevel)
return; return;
@ -1612,7 +1623,7 @@ CStreaming::LoadBigBuildingsWhenNeeded(void)
CGame::TidyUpMemory(true, true); CGame::TidyUpMemory(true, true);
CReplay::EmptyReplayBuffer(); CReplay::EmptyReplayBuffer();
if(CGame::currLevel != LEVEL_NONE) if(CGame::currLevel != LEVEL_GENERIC)
LoadSplash(GetLevelSplashScreen(CGame::currLevel)); LoadSplash(GetLevelSplashScreen(CGame::currLevel));
CStreaming::RequestBigBuildings(CGame::currLevel, TheCamera.GetPosition()); CStreaming::RequestBigBuildings(CGame::currLevel, TheCamera.GetPosition());
@ -2620,16 +2631,16 @@ CStreaming::LoadScene(const CVector &pos)
} }
CRenderer::m_loadingPriority = false; CRenderer::m_loadingPriority = false;
DeleteAllRwObjects(); DeleteAllRwObjects();
if(level == LEVEL_NONE) if(level == LEVEL_GENERIC)
level = CGame::currLevel; level = CGame::currLevel;
CGame::currLevel = level; CGame::currLevel = level;
RemoveUnusedBigBuildings(level); RemoveUnusedBigBuildings(level);
RequestBigBuildings(level, pos); RequestBigBuildings(level, pos);
RequestBigBuildings(LEVEL_NONE, pos); RequestBigBuildings(LEVEL_GENERIC, pos);
RemoveIslandsNotUsed(level); RemoveIslandsNotUsed(level);
LoadAllRequestedModels(false); LoadAllRequestedModels(false);
InstanceBigBuildings(level, pos); InstanceBigBuildings(level, pos);
InstanceBigBuildings(LEVEL_NONE, pos); InstanceBigBuildings(LEVEL_GENERIC, pos);
AddModelsToRequestList(pos); AddModelsToRequestList(pos);
CRadar::StreamRadarSections(pos); CRadar::StreamRadarSections(pos);

View File

@ -37,19 +37,19 @@ CTempColModels::Initialise(void)
#define SET_COLMODEL_SPHERES(colmodel, sphrs)\ #define SET_COLMODEL_SPHERES(colmodel, sphrs)\
colmodel.numSpheres = ARRAY_SIZE(sphrs);\ colmodel.numSpheres = ARRAY_SIZE(sphrs);\
colmodel.spheres = sphrs;\ colmodel.spheres = sphrs;\
colmodel.level = LEVEL_NONE;\ colmodel.level = LEVEL_GENERIC;\
colmodel.ownsCollisionVolumes = false;\ colmodel.ownsCollisionVolumes = false;\
int i; int i;
ms_colModelBBox.boundingSphere.Set(2.0f, CVector(0.0f, 0.0f, 0.0f)); ms_colModelBBox.boundingSphere.Set(2.0f, CVector(0.0f, 0.0f, 0.0f));
ms_colModelBBox.boundingBox.Set(CVector(-2.0f, -2.0f, -2.0f), CVector(2.0f, 2.0f, 2.0f)); ms_colModelBBox.boundingBox.Set(CVector(-2.0f, -2.0f, -2.0f), CVector(2.0f, 2.0f, 2.0f));
ms_colModelBBox.level = LEVEL_NONE; ms_colModelBBox.level = LEVEL_GENERIC;
for (i = 0; i < ARRAY_SIZE(ms_colModelCutObj); i++) { for (i = 0; i < ARRAY_SIZE(ms_colModelCutObj); i++) {
ms_colModelCutObj[i].boundingSphere.Set(2.0f, CVector(0.0f, 0.0f, 0.0f)); ms_colModelCutObj[i].boundingSphere.Set(2.0f, CVector(0.0f, 0.0f, 0.0f));
ms_colModelCutObj[i].boundingBox.Set(CVector(-2.0f, -2.0f, -2.0f), CVector(2.0f, 2.0f, 2.0f)); ms_colModelCutObj[i].boundingBox.Set(CVector(-2.0f, -2.0f, -2.0f), CVector(2.0f, 2.0f, 2.0f));
ms_colModelCutObj[i].level = LEVEL_NONE; ms_colModelCutObj[i].level = LEVEL_GENERIC;
} }
// Ped Spheres // Ped Spheres

View File

@ -1785,7 +1785,7 @@ CWorld::ClearForRestart(void)
CWorld::Remove(pEntity); CWorld::Remove(pEntity);
delete pEntity; delete pEntity;
} }
for(CPtrNode *pNode = GetBigBuildingList(LEVEL_NONE).first; pNode; pNode = pNode->next) { for(CPtrNode *pNode = GetBigBuildingList(LEVEL_GENERIC).first; pNode; pNode = pNode->next) {
CVehicle *pVehicle = (CVehicle *)pNode->item; CVehicle *pVehicle = (CVehicle *)pNode->item;
if(pVehicle && pVehicle->IsVehicle() && pVehicle->IsPlane()) { if(pVehicle && pVehicle->IsVehicle() && pVehicle->IsPlane()) {
CWorld::Remove(pVehicle); CWorld::Remove(pVehicle);

View File

@ -93,7 +93,7 @@ CTheZones::Init(void)
InfoZoneArray[0].maxx = 1600.0f; InfoZoneArray[0].maxx = 1600.0f;
InfoZoneArray[0].maxy = 2000.0f; InfoZoneArray[0].maxy = 2000.0f;
InfoZoneArray[0].maxz = 500.0f; InfoZoneArray[0].maxz = 500.0f;
InfoZoneArray[0].level = LEVEL_NONE; InfoZoneArray[0].level = LEVEL_GENERIC;
InfoZoneArray[0].type = ZONE_INFO; InfoZoneArray[0].type = ZONE_INFO;
strcpy(NavigationZoneArray[0].name, "VICE_C"); strcpy(NavigationZoneArray[0].name, "VICE_C");
@ -103,10 +103,10 @@ CTheZones::Init(void)
NavigationZoneArray[0].maxx = 1600.0f; NavigationZoneArray[0].maxx = 1600.0f;
NavigationZoneArray[0].maxy = 2000.0f; NavigationZoneArray[0].maxy = 2000.0f;
NavigationZoneArray[0].maxz = 500.0f; NavigationZoneArray[0].maxz = 500.0f;
NavigationZoneArray[0].level = LEVEL_NONE; NavigationZoneArray[0].level = LEVEL_GENERIC;
NavigationZoneArray[0].type = ZONE_NAVIG; NavigationZoneArray[0].type = ZONE_NAVIG;
m_CurrLevel = LEVEL_NONE; m_CurrLevel = LEVEL_GENERIC;
for(i = 0; i < NUMMAPZONES; i++){ for(i = 0; i < NUMMAPZONES; i++){
memset(&MapZoneArray[i], 0, sizeof(CZone)); memset(&MapZoneArray[i], 0, sizeof(CZone));
@ -120,7 +120,7 @@ CTheZones::Init(void)
MapZoneArray[0].maxx = 1600.0f; MapZoneArray[0].maxx = 1600.0f;
MapZoneArray[0].maxy = 2000.0f; MapZoneArray[0].maxy = 2000.0f;
MapZoneArray[0].maxz = 500.0f; MapZoneArray[0].maxz = 500.0f;
MapZoneArray[0].level = LEVEL_NONE; MapZoneArray[0].level = LEVEL_GENERIC;
} }
//--MIAMI: done //--MIAMI: done

View File

@ -213,7 +213,10 @@ enum Config {
#define DEFAULT_NATIVE_RESOLUTION // Set default video mode to your native resolution (fixes Windows 10 launch) #define DEFAULT_NATIVE_RESOLUTION // Set default video mode to your native resolution (fixes Windows 10 launch)
#define USE_TXD_CDIMAGE // generate and load textures from txd.img #define USE_TXD_CDIMAGE // generate and load textures from txd.img
#define IMPROVED_VIDEOMODE // save and load videomode parameters instead of a magic number #define IMPROVED_VIDEOMODE // save and load videomode parameters instead of a magic number
//#define DISABLE_LOADING_SCREEN // disable the loading screen which vastly improves the loading time
//#define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU
//#define USE_TEXTURE_POOL //#define USE_TEXTURE_POOL
#define CUTSCENE_BORDERS_SWITCH
// Water & Particle // Water & Particle
#define PC_PARTICLE #define PC_PARTICLE
@ -281,6 +284,7 @@ enum Config {
#define VC_PED_PORTS // various ports from VC's CPed, mostly subtle #define VC_PED_PORTS // various ports from VC's CPed, mostly subtle
// #define NEW_WALK_AROUND_ALGORITHM // to make walking around vehicles/objects less awkward // #define NEW_WALK_AROUND_ALGORITHM // to make walking around vehicles/objects less awkward
#define CANCELLABLE_CAR_ENTER #define CANCELLABLE_CAR_ENTER
//#define PEDS_REPORT_CRIMES_ON_PHONE
// Camera // Camera
#define IMPROVED_CAMERA // Better Debug cam, and maybe more in the future #define IMPROVED_CAMERA // Better Debug cam, and maybe more in the future

View File

@ -249,7 +249,11 @@ DoFade(void)
} }
// This is CCamera::GetScreenRect in VC // This is CCamera::GetScreenRect in VC
if(TheCamera.m_WideScreenOn){ if(TheCamera.m_WideScreenOn
#ifdef CUTSCENE_BORDERS_SWITCH
&& CMenuManager::m_PrefsCutsceneBorders
#endif
){
float y = SCREEN_HEIGHT/2 * TheCamera.m_ScreenReductionPercentage/100.0f; float y = SCREEN_HEIGHT/2 * TheCamera.m_ScreenReductionPercentage/100.0f;
rect.left = 0.0f; rect.left = 0.0f;
rect.right = SCREEN_WIDTH; rect.right = SCREEN_WIDTH;
@ -464,6 +468,11 @@ LoadingScreen(const char *str1, const char *str2, const char *splashscreen)
{ {
CSprite2d *splash; CSprite2d *splash;
#ifdef DISABLE_LOADING_SCREEN
if (str1 && str2)
return;
#endif
#ifndef RANDOMSPLASH #ifndef RANDOMSPLASH
splashscreen = "LOADSC0"; splashscreen = "LOADSC0";
#endif #endif
@ -885,7 +894,11 @@ Render2dStuff(void)
CReplay::Display(); CReplay::Display();
CPickups::RenderPickUpText(); CPickups::RenderPickUpText();
if(TheCamera.m_WideScreenOn) if(TheCamera.m_WideScreenOn
#ifdef CUTSCENE_BORDERS_SWITCH
&& CMenuManager::m_PrefsCutsceneBorders
#endif
)
TheCamera.DrawBordersForWideScreen(); TheCamera.DrawBordersForWideScreen();
CPed *player = FindPlayerPed(); CPed *player = FindPlayerPed();

View File

@ -134,6 +134,14 @@ void ToggleFreeCam(int8 action)
} }
#endif #endif
#ifdef CUTSCENE_BORDERS_SWITCH
void BorderModeChange(int8 displayedValue)
{
CMenuManager::m_PrefsCutsceneBorders = !!displayedValue;
FrontEndMenuManager.SaveSettings();
}
#endif
// Reloaded on language change, so you can use hardcoded wchar* and TheText.Get with peace of mind // Reloaded on language change, so you can use hardcoded wchar* and TheText.Get with peace of mind
void void
CustomFrontendOptionsPopulate(void) CustomFrontendOptionsPopulate(void)
@ -158,6 +166,12 @@ CustomFrontendOptionsPopulate(void)
FrontendOptionSetPosition(MENUPAGE_CONTROLLER_PC, 1); FrontendOptionSetPosition(MENUPAGE_CONTROLLER_PC, 1);
FrontendOptionAddDynamic(text, nil, ToggleFreeCam, nil); FrontendOptionAddDynamic(text, nil, ToggleFreeCam, nil);
#endif #endif
#ifdef CUTSCENE_BORDERS_SWITCH
static const wchar *off_on[] = { TheText.Get("FEM_OFF"), TheText.Get("FEM_ON") };
FrontendOptionSetPosition(MENUPAGE_GRAPHICS_SETTINGS, 9);
FrontendOptionAddSelect((const wchar *)L"CUTSCENE BORDERS", off_on, 2, (int8 *)&CMenuManager::m_PrefsCutsceneBorders, false, BorderModeChange, nil);
#endif
} }
#endif #endif

View File

@ -17,7 +17,7 @@ CBuilding::ReplaceWithNewModel(int32 id)
m_modelIndex = id; m_modelIndex = id;
if(bIsBIGBuilding) if(bIsBIGBuilding)
if(m_level == LEVEL_NONE || m_level == CGame::currLevel) if(m_level == LEVEL_GENERIC || m_level == CGame::currLevel)
CStreaming::RequestModel(id, STREAMFLAGS_DONT_REMOVE); CStreaming::RequestModel(id, STREAMFLAGS_DONT_REMOVE);
} }

View File

@ -359,8 +359,8 @@ CEntity::SetupBigBuilding(void)
if(mi->m_lodDistances[0] <= 2000.0f) if(mi->m_lodDistances[0] <= 2000.0f)
bStreamBIGBuilding = true; bStreamBIGBuilding = true;
if(mi->m_lodDistances[0] > 2500.0f || mi->m_ignoreDrawDist) if(mi->m_lodDistances[0] > 2500.0f || mi->m_ignoreDrawDist)
m_level = LEVEL_NONE; m_level = LEVEL_GENERIC;
else if(m_level == LEVEL_NONE) else if(m_level == LEVEL_GENERIC)
printf("%s isn't in a level\n", mi->GetName()); printf("%s isn't in a level\n", mi->GetName());
} }

View File

@ -75,7 +75,7 @@ CPhysical::CPhysical(void)
#ifdef FIX_BUGS #ifdef FIX_BUGS
m_nSurfaceTouched = SURFACE_DEFAULT; m_nSurfaceTouched = SURFACE_DEFAULT;
#endif #endif
m_nZoneLevel = LEVEL_NONE; m_nZoneLevel = LEVEL_GENERIC;
bIsFrozen = false; bIsFrozen = false;
bDontLoadCollision = false; bDontLoadCollision = false;

View File

@ -110,7 +110,7 @@ CPedModelInfo::CreateHitColModelSkinned(RpClump *clump)
max.x = max.y = 0.5f; max.x = max.y = 0.5f;
max.z = 1.2f; max.z = 1.2f;
colmodel->boundingBox.Set(min, max); colmodel->boundingBox.Set(min, max);
colmodel->level = LEVEL_NONE; colmodel->level = LEVEL_GENERIC;
m_hitColModel = colmodel; m_hitColModel = colmodel;
} }

View File

@ -353,7 +353,7 @@ CPopulation::FindCollisionZoneForCoors(CVector *coors, int *safeZoneOut, eLevelN
} }
// Then it's transition area // Then it's transition area
if (*safeZoneOut >= 0) if (*safeZoneOut >= 0)
*levelOut = LEVEL_NONE; *levelOut = LEVEL_GENERIC;
else else
*levelOut = CTheZones::GetLevelFromPosition(coors); *levelOut = CTheZones::GetLevelFromPosition(coors);
} }

View File

@ -3,6 +3,7 @@
#include "Draw.h" #include "Draw.h"
#include "Frontend.h" #include "Frontend.h"
#include "Camera.h" #include "Camera.h"
#include "CutsceneMgr.h"
#ifdef ASPECT_RATIO_SCALE #ifdef ASPECT_RATIO_SCALE
float CDraw::ms_fAspectRatio = DEFAULT_ASPECT_RATIO; float CDraw::ms_fAspectRatio = DEFAULT_ASPECT_RATIO;
@ -61,7 +62,10 @@ void
CDraw::SetFOV(float fov) CDraw::SetFOV(float fov)
{ {
#ifdef ASPECT_RATIO_SCALE #ifdef ASPECT_RATIO_SCALE
ms_fScaledFOV = ConvertFOV(fov); if (!CCutsceneMgr::IsRunning())
ms_fScaledFOV = ConvertFOV(fov);
else
ms_fScaledFOV = fov;
#endif #endif
ms_fFOV = fov; ms_fFOV = fov;
} }

View File

@ -779,7 +779,7 @@ CRenderer::ScanWorld(void)
ScanSectorPoly(poly, 3, ScanSectorList); ScanSectorPoly(poly, 3, ScanSectorList);
ScanBigBuildingList(CWorld::GetBigBuildingList(CGame::currLevel)); ScanBigBuildingList(CWorld::GetBigBuildingList(CGame::currLevel));
ScanBigBuildingList(CWorld::GetBigBuildingList(LEVEL_NONE)); ScanBigBuildingList(CWorld::GetBigBuildingList(LEVEL_GENERIC));
} }
} }
} }

View File

@ -497,7 +497,7 @@ CheckDataNotCorrupt(int32 slot, char *name)
char filename[100]; char filename[100];
int32 blocknum = 0; int32 blocknum = 0;
eLevelName level = LEVEL_NONE; eLevelName level = LEVEL_GENERIC;
CheckSum = 0; CheckSum = 0;
uint32 bytes_processed = 0; uint32 bytes_processed = 0;
sprintf(filename, "%s%i%s", DefaultPCSaveFileName, slot + 1, ".b"); sprintf(filename, "%s%i%s", DefaultPCSaveFileName, slot + 1, ".b");

View File

@ -1370,6 +1370,15 @@ WinMain(HINSTANCE instance,
RwInt32 argc; RwInt32 argc;
RwChar** argv; RwChar** argv;
SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, nil, SPIF_SENDCHANGE); SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, nil, SPIF_SENDCHANGE);
#if 0
// TODO: make this an option somewhere
AllocConsole();
freopen("CONIN$", "r", stdin);
freopen("CONOUT$", "w", stdout);
freopen("CONOUT$", "w", stderr);
#endif
#else #else
int int
main(int argc, char *argv[]) main(int argc, char *argv[])

View File

@ -83,7 +83,7 @@ CPlane::CPlane(int32 id, uint8 CreatedBy)
SetStatus(STATUS_PLANE); SetStatus(STATUS_PLANE);
bIsBIGBuilding = true; bIsBIGBuilding = true;
m_level = LEVEL_NONE; m_level = LEVEL_GENERIC;
#ifdef FIX_BUGS #ifdef FIX_BUGS
m_isFarAway = true; m_isFarAway = true;