diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2021-01-09 15:35:52 +0100 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2021-01-09 15:35:52 +0100 |
commit | b32301592fc6ae44b3a201b8d1569e70ce045b45 (patch) | |
tree | a4402d2442ed2f3efe01ea8b8ce28885d0f41aea /src/core | |
parent | fix (diff) | |
parent | Change window name (diff) | |
download | re3-b32301592fc6ae44b3a201b8d1569e70ce045b45.tar re3-b32301592fc6ae44b3a201b8d1569e70ce045b45.tar.gz re3-b32301592fc6ae44b3a201b8d1569e70ce045b45.tar.bz2 re3-b32301592fc6ae44b3a201b8d1569e70ce045b45.tar.lz re3-b32301592fc6ae44b3a201b8d1569e70ce045b45.tar.xz re3-b32301592fc6ae44b3a201b8d1569e70ce045b45.tar.zst re3-b32301592fc6ae44b3a201b8d1569e70ce045b45.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/Cam.cpp | 12 | ||||
-rw-r--r-- | src/core/KeyGen.cpp | 6 | ||||
-rw-r--r-- | src/core/Streaming.cpp | 25 | ||||
-rw-r--r-- | src/core/Streaming.h | 7 | ||||
-rw-r--r-- | src/core/World.h | 12 |
5 files changed, 31 insertions, 31 deletions
diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp index d4188299..731537ef 100644 --- a/src/core/Cam.cpp +++ b/src/core/Cam.cpp @@ -3947,11 +3947,11 @@ CCam::Process_Debug(const CVector&, float, float, float) } // stay inside sectors - while(CWorld::GetSectorX(Source.x) > 75.0f) + while(CWorld::GetSectorX(Source.x) > NUMSECTORS_X-5.0f) Source.x -= 1.0f; while(CWorld::GetSectorX(Source.x) < 5.0f) Source.x += 1.0f; - while(CWorld::GetSectorY(Source.y) > 75.0f) + while(CWorld::GetSectorY(Source.y) > NUMSECTORS_X-5.0f) Source.y -= 1.0f; while(CWorld::GetSectorY(Source.y) < 5.0f) Source.y += 1.0f; @@ -4018,11 +4018,11 @@ CCam::Process_Debug(const CVector&, float, float, float) } // stay inside sectors - while(CWorld::GetSectorX(Source.x) > 75.0f) + while(CWorld::GetSectorX(Source.x) > NUMSECTORS_X-5.0f) Source.x -= 1.0f; while(CWorld::GetSectorX(Source.x) < 5.0f) Source.x += 1.0f; - while(CWorld::GetSectorY(Source.y) > 75.0f) + while(CWorld::GetSectorY(Source.y) > NUMSECTORS_X-5.0f) Source.y -= 1.0f; while(CWorld::GetSectorY(Source.y) < 5.0f) Source.y += 1.0f; @@ -4099,11 +4099,11 @@ CCam::Process_Editor(const CVector&, float, float, float) } // stay inside sectors - while(CWorld::GetSectorX(Source.x) > 75.0f) + while(CWorld::GetSectorX(Source.x) > NUMSECTORS_X-5.0f) Source.x -= 1.0f; while(CWorld::GetSectorX(Source.x) < 5.0f) Source.x += 1.0f; - while(CWorld::GetSectorY(Source.y) > 75.0f) + while(CWorld::GetSectorY(Source.y) > NUMSECTORS_X-5.0f) Source.y -= 1.0f; while(CWorld::GetSectorY(Source.y) < 5.0f) Source.y += 1.0f; diff --git a/src/core/KeyGen.cpp b/src/core/KeyGen.cpp index c54e390c..c95ab4b1 100644 --- a/src/core/KeyGen.cpp +++ b/src/core/KeyGen.cpp @@ -1,10 +1,6 @@ #include "common.h" #include "KeyGen.h" -#if defined _WIN32 && !defined __MINGW32__ -#include "ctype.h" -#else -#include <cwctype> -#endif +#include <ctype.h> uint32 CKeyGen::keyTable[256] = { diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp index 3a6fdc2a..4fff2367 100644 --- a/src/core/Streaming.cpp +++ b/src/core/Streaming.cpp @@ -1151,12 +1151,9 @@ CStreaming::RemoveModel(int32 id) void CStreaming::RemoveUnusedBuildings(eLevelName level) { - if(level != LEVEL_INDUSTRIAL) - RemoveBuildings(LEVEL_INDUSTRIAL); - if(level != LEVEL_COMMERCIAL) - RemoveBuildings(LEVEL_COMMERCIAL); - if(level != LEVEL_SUBURBAN) - RemoveBuildings(LEVEL_SUBURBAN); + for(int i = LEVEL_INDUSTRIAL; i < NUM_LEVELS; i++) + if(level != i) + RemoveBuildings((eLevelName)i); } void @@ -1279,12 +1276,9 @@ CStreaming::RemoveUnusedBigBuildings(eLevelName level) { ISLAND_LOADING_IS(LOW) { - if(level != LEVEL_INDUSTRIAL) - RemoveBigBuildings(LEVEL_INDUSTRIAL); - if(level != LEVEL_COMMERCIAL) - RemoveBigBuildings(LEVEL_COMMERCIAL); - if(level != LEVEL_SUBURBAN) - RemoveBigBuildings(LEVEL_SUBURBAN); + for(int i = LEVEL_INDUSTRIAL; i < NUM_LEVELS; i++) + if(level != i) + RemoveBuildings((eLevelName)i); } RemoveIslandsNotUsed(level); } @@ -1324,8 +1318,11 @@ CStreaming::RemoveIslandsNotUsed(eLevelName level) } #ifdef NO_ISLAND_LOADING if(FrontEndMenuManager.m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_HIGH) { - DeleteIsland(pIslandLODmainlandEntity); - DeleteIsland(pIslandLODbeachEntity); + DeleteIsland(pIslandLODindustEntity); + DeleteIsland(pIslandLODcomIndEntity); + DeleteIsland(pIslandLODcomSubEntity); + DeleteIsland(pIslandLODsubIndEntity); + DeleteIsland(pIslandLODsubComEntity); } else #endif switch(level){ diff --git a/src/core/Streaming.h b/src/core/Streaming.h index f294a7c5..31786dfb 100644 --- a/src/core/Streaming.h +++ b/src/core/Streaming.h @@ -214,3 +214,10 @@ public: static void PrintStreamingBufferState(); }; + +// LCS(TODO): put them into CStreaming::mspInst +extern int32 islandLODindust; +extern int32 islandLODcomInd; +extern int32 islandLODcomSub; +extern int32 islandLODsubInd; +extern int32 islandLODsubCom; diff --git a/src/core/World.h b/src/core/World.h index b0e77193..4cc9398e 100644 --- a/src/core/World.h +++ b/src/core/World.h @@ -4,14 +4,14 @@ #include "Lists.h" #include "PlayerInfo.h" -/* Sectors span from -2400 to 1600 in x and -2000 to 2000 y. - * With 80x80 sectors, each is 50x50 units. */ +/* Sectors span from -2000 to 2000 in x and y. + * With 100x100 sectors, each is 40x40 units. */ -#define SECTOR_SIZE_X (50.0f) -#define SECTOR_SIZE_Y (50.0f) +#define SECTOR_SIZE_X (40.0f) +#define SECTOR_SIZE_Y (40.0f) -#define NUMSECTORS_X (80) -#define NUMSECTORS_Y (80) +#define NUMSECTORS_X (100) +#define NUMSECTORS_Y (100) #define WORLD_SIZE_X (NUMSECTORS_X * SECTOR_SIZE_X) #define WORLD_SIZE_Y (NUMSECTORS_Y * SECTOR_SIZE_Y) |