mirror of
https://github.com/halpz/re3.git
synced 2025-07-15 23:28:15 +00:00
Rename LEVEL_NONE to LEVEL_GENERIC
This commit is contained in:
@ -38,7 +38,7 @@ void
|
||||
CCollision::Init(void)
|
||||
{
|
||||
ms_colModelCache.Init(NUMCOLCACHELINKS);
|
||||
ms_collisionInMemory = LEVEL_NONE;
|
||||
ms_collisionInMemory = LEVEL_GENERIC;
|
||||
}
|
||||
|
||||
void
|
||||
@ -59,7 +59,7 @@ CCollision::Update(void)
|
||||
return;
|
||||
|
||||
// hardcode a level if there are no zones
|
||||
if(level == LEVEL_NONE){
|
||||
if(level == LEVEL_GENERIC){
|
||||
if(CGame::currLevel == LEVEL_INDUSTRIAL &&
|
||||
playerCoors.x < 400.0f){
|
||||
level = LEVEL_COMMERCIAL;
|
||||
@ -78,7 +78,7 @@ CCollision::Update(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
if(level != LEVEL_NONE && level != CGame::currLevel)
|
||||
if(level != LEVEL_GENERIC && level != CGame::currLevel)
|
||||
CGame::currLevel = level;
|
||||
if(ms_collisionInMemory != CGame::currLevel)
|
||||
LoadCollisionWhenINeedIt(forceLevelChange);
|
||||
@ -95,10 +95,10 @@ GetCollisionInSectorList(CPtrList &list)
|
||||
for(node = list.first; node; node = node->next){
|
||||
e = (CEntity*)node->item;
|
||||
level = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel()->level;
|
||||
if(level != LEVEL_NONE)
|
||||
if(level != LEVEL_GENERIC)
|
||||
return (eLevelName)level;
|
||||
}
|
||||
return LEVEL_NONE;
|
||||
return LEVEL_GENERIC;
|
||||
}
|
||||
|
||||
// Get a level this sector is in based on collision models
|
||||
@ -108,15 +108,15 @@ GetCollisionInSector(CSector §)
|
||||
int level;
|
||||
|
||||
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_BUILDINGS]);
|
||||
if(level == LEVEL_NONE)
|
||||
if(level == LEVEL_GENERIC)
|
||||
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_BUILDINGS_OVERLAP]);
|
||||
if(level == LEVEL_NONE)
|
||||
if(level == LEVEL_GENERIC)
|
||||
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_OBJECTS]);
|
||||
if(level == LEVEL_NONE)
|
||||
if(level == LEVEL_GENERIC)
|
||||
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_OBJECTS_OVERLAP]);
|
||||
if(level == LEVEL_NONE)
|
||||
if(level == LEVEL_GENERIC)
|
||||
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_DUMMIES]);
|
||||
if(level == LEVEL_NONE)
|
||||
if(level == LEVEL_GENERIC)
|
||||
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_DUMMIES_OVERLAP]);
|
||||
return (eLevelName)level;
|
||||
}
|
||||
@ -133,7 +133,7 @@ CCollision::LoadCollisionWhenINeedIt(bool forceChange)
|
||||
int xmin, xmax, ymin, ymax;
|
||||
int x, y;
|
||||
|
||||
level = LEVEL_NONE;
|
||||
level = LEVEL_GENERIC;
|
||||
|
||||
playerCoors = FindPlayerCoors();
|
||||
sx = CWorld::GetSectorIndexX(playerCoors.x);
|
||||
@ -161,8 +161,8 @@ CCollision::LoadCollisionWhenINeedIt(bool forceChange)
|
||||
for(x = xmin; x <= xmax; x++)
|
||||
for(y = ymin; y <= ymax; y++){
|
||||
l = GetCollisionInSector(*CWorld::GetSector(x, y));
|
||||
if(l != LEVEL_NONE){
|
||||
if(level == LEVEL_NONE)
|
||||
if(l != LEVEL_GENERIC){
|
||||
if(level == LEVEL_GENERIC)
|
||||
level = l;
|
||||
if(level != l)
|
||||
multipleLevels = true;
|
||||
@ -173,7 +173,7 @@ CCollision::LoadCollisionWhenINeedIt(bool forceChange)
|
||||
if(multipleLevels && veh && veh->IsBoat())
|
||||
for(ei = veh->m_entryInfoList.first; ei; ei = ei->next){
|
||||
level = GetCollisionInSector(*ei->sector);
|
||||
if(level != LEVEL_NONE)
|
||||
if(level != LEVEL_GENERIC)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -205,7 +205,7 @@ CCollision::LoadCollisionWhenINeedIt(bool forceChange)
|
||||
ms_collisionInMemory = CGame::currLevel;
|
||||
CReplay::EmptyReplayBuffer();
|
||||
#ifndef NO_ISLAND_LOADING
|
||||
if(CGame::currLevel != LEVEL_NONE)
|
||||
if(CGame::currLevel != LEVEL_GENERIC)
|
||||
LoadSplash(GetLevelSplashScreen(CGame::currLevel));
|
||||
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
|
||||
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
|
||||
@ -232,7 +232,7 @@ CCollision::SortOutCollisionAfterLoad(void)
|
||||
#ifndef NO_ISLAND_LOADING
|
||||
CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
|
||||
#endif
|
||||
if (CGame::currLevel != LEVEL_NONE) {
|
||||
if (CGame::currLevel != LEVEL_GENERIC) {
|
||||
#ifdef NO_ISLAND_LOADING
|
||||
static bool bAlreadyLoaded = false;
|
||||
if (bAlreadyLoaded) {
|
||||
|
@ -357,7 +357,7 @@ bool CGame::Initialise(const char* datFile)
|
||||
CStreaming::Init();
|
||||
CStreaming::LoadInitialVehicles();
|
||||
CStreaming::LoadInitialPeds();
|
||||
CStreaming::RequestBigBuildings(LEVEL_NONE);
|
||||
CStreaming::RequestBigBuildings(LEVEL_GENERIC);
|
||||
CStreaming::LoadAllRequestedModels(false);
|
||||
printf("Streaming uses %dK of its memory", CStreaming::ms_memoryUsed / 1024);
|
||||
LoadingScreen("Loading the Game", "Load animations", GetRandomSplashScreen());
|
||||
@ -511,7 +511,7 @@ void CGame::ReInitGameObjectVariables(void)
|
||||
CTimeCycle::Initialise();
|
||||
CDraw::SetFOV(120.0f);
|
||||
CDraw::ms_fLODDistance = 500.0f;
|
||||
CStreaming::RequestBigBuildings(LEVEL_NONE);
|
||||
CStreaming::RequestBigBuildings(LEVEL_GENERIC);
|
||||
CStreaming::LoadAllRequestedModels(false);
|
||||
CPed::Initialise();
|
||||
CEventList::Initialise();
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
enum eLevelName {
|
||||
LEVEL_IGNORE = -1, // beware, this is only used in CPhysical's m_nZoneLevel
|
||||
LEVEL_NONE = 0,
|
||||
LEVEL_GENERIC = 0,
|
||||
LEVEL_INDUSTRIAL,
|
||||
LEVEL_COMMERCIAL,
|
||||
LEVEL_SUBURBAN
|
||||
|
@ -553,7 +553,7 @@ CPlayerInfo::Process(void)
|
||||
veh->m_nZoneLevel = LEVEL_IGNORE;
|
||||
for (int i = 0; i < ARRAY_SIZE(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;
|
||||
} else {
|
||||
|
@ -36,19 +36,19 @@ CTempColModels::Initialise(void)
|
||||
#define SET_COLMODEL_SPHERES(colmodel, sphrs)\
|
||||
colmodel.numSpheres = ARRAY_SIZE(sphrs);\
|
||||
colmodel.spheres = sphrs;\
|
||||
colmodel.level = LEVEL_NONE;\
|
||||
colmodel.level = LEVEL_GENERIC;\
|
||||
colmodel.ownsCollisionVolumes = false;\
|
||||
|
||||
int i;
|
||||
|
||||
ms_colModelBBox.boundingSphere.Set(2.0f, CVector(0.0f, 0.0f, 0.0f), SURFACE_DEFAULT, 0);
|
||||
ms_colModelBBox.boundingBox.Set(CVector(-2.0f, -2.0f, -2.0f), CVector(2.0f, 2.0f, 2.0f), SURFACE_DEFAULT, 0);
|
||||
ms_colModelBBox.level = LEVEL_NONE;
|
||||
ms_colModelBBox.level = LEVEL_GENERIC;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(ms_colModelCutObj); i++) {
|
||||
ms_colModelCutObj[i].boundingSphere.Set(2.0f, CVector(0.0f, 0.0f, 0.0f), SURFACE_DEFAULT, 0);
|
||||
ms_colModelCutObj[i].boundingBox.Set(CVector(-2.0f, -2.0f, -2.0f), CVector(2.0f, 2.0f, 2.0f), SURFACE_DEFAULT, 0);
|
||||
ms_colModelCutObj[i].level = LEVEL_NONE;
|
||||
ms_colModelCutObj[i].level = LEVEL_GENERIC;
|
||||
}
|
||||
|
||||
// Ped Spheres
|
||||
|
@ -1797,7 +1797,7 @@ CWorld::ClearForRestart(void)
|
||||
CWorld::Remove(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;
|
||||
if(pVehicle && pVehicle->IsVehicle() && pVehicle->IsPlane()) {
|
||||
CWorld::Remove(pVehicle);
|
||||
|
@ -90,7 +90,7 @@ CTheZones::Init(void)
|
||||
TotalNumberOfZoneInfos = 1; // why 1?
|
||||
TotalNumberOfZones = 1;
|
||||
|
||||
m_CurrLevel = LEVEL_NONE;
|
||||
m_CurrLevel = LEVEL_GENERIC;
|
||||
m_pPlayersZone = &ZoneArray[0];
|
||||
|
||||
strcpy(ZoneArray[0].name, "CITYZON");
|
||||
@ -100,7 +100,7 @@ CTheZones::Init(void)
|
||||
ZoneArray[0].maxx = 4000.0f;
|
||||
ZoneArray[0].maxy = 4000.0f;
|
||||
ZoneArray[0].maxz = 500.0f;
|
||||
ZoneArray[0].level = LEVEL_NONE;
|
||||
ZoneArray[0].level = LEVEL_GENERIC;
|
||||
|
||||
for(i = 0; i < NUMMAPZONES; i++){
|
||||
memset(&MapZoneArray[i], 0, sizeof(CZone));
|
||||
@ -116,7 +116,7 @@ CTheZones::Init(void)
|
||||
MapZoneArray[0].maxx = 4000.0f;
|
||||
MapZoneArray[0].maxy = 4000.0f;
|
||||
MapZoneArray[0].maxz = 500.0f;
|
||||
MapZoneArray[0].level = LEVEL_NONE;
|
||||
MapZoneArray[0].level = LEVEL_GENERIC;
|
||||
}
|
||||
|
||||
void
|
||||
@ -577,7 +577,7 @@ CTheZones::FindZoneForPoint(const CVector &pos)
|
||||
return LEVEL_COMMERCIAL;
|
||||
if(PointLiesWithinZone(&pos, GetZone(FindZoneByLabelAndReturnIndex("SUB_ZON"))))
|
||||
return LEVEL_SUBURBAN;
|
||||
return LEVEL_NONE;
|
||||
return LEVEL_GENERIC;
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user