mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-06 10:44:08 +00:00
chore: Speed up and cleanup level and zone loading; Add safer asset buffer reading (#1314)
* Remove std::couts littered throughout the base * working End of optimizations for now going faster * Remove extraneous compare function std::less<LWOSCENEID> already does this in a map. * gaming * Update Zone.cpp * dlu is moving to bitbucket again * Update Level.cpp --------- Co-authored-by: Jettford <mrjettbradford@gmail.com>
This commit is contained in:
@@ -210,7 +210,6 @@ public:
|
||||
void AddRevision(LWOSCENEID sceneID, uint32_t revision);
|
||||
const LWOZONEID& GetZoneID() const { return m_ZoneID; }
|
||||
const uint32_t GetChecksum() const { return m_CheckSum; }
|
||||
const void PrintAllGameObjects();
|
||||
LUTriggers::Trigger* GetTrigger(uint32_t sceneID, uint32_t triggerID);
|
||||
const Path* GetPath(std::string name) const;
|
||||
|
||||
@@ -228,7 +227,6 @@ public:
|
||||
private:
|
||||
LWOZONEID m_ZoneID;
|
||||
std::string m_ZoneFilePath;
|
||||
uint32_t m_NumberOfScenesLoaded;
|
||||
uint32_t m_NumberOfObjectsLoaded;
|
||||
uint32_t m_NumberOfSceneTransitionsLoaded;
|
||||
FileFormatVersion m_FileFormatVersion;
|
||||
@@ -243,18 +241,17 @@ private:
|
||||
std::string m_ZoneDesc; //Description of the zone by a level designer
|
||||
std::string m_ZoneRawPath; //Path to the .raw file of this zone.
|
||||
|
||||
std::map<LWOSCENEID, SceneRef, mapCompareLwoSceneIDs> m_Scenes;
|
||||
std::map<LWOSCENEID, SceneRef> m_Scenes;
|
||||
std::vector<SceneTransition> m_SceneTransitions;
|
||||
|
||||
uint32_t m_PathDataLength;
|
||||
uint32_t m_PathChunkVersion;
|
||||
std::vector<Path> m_Paths;
|
||||
|
||||
std::map<LWOSCENEID, uint32_t, mapCompareLwoSceneIDs> m_MapRevisions; //rhs is the revision!
|
||||
|
||||
std::map<LWOSCENEID, uint32_t> m_MapRevisions; //rhs is the revision!
|
||||
//private ("helper") functions:
|
||||
void LoadScene(std::istream& file);
|
||||
std::vector<LUTriggers::Trigger*> LoadLUTriggers(std::string triggerFile, LWOSCENEID sceneID);
|
||||
void LoadLUTriggers(std::string triggerFile, SceneRef& scene);
|
||||
void LoadSceneTransition(std::istream& file);
|
||||
SceneTransitionInfo LoadSceneTransitionInfo(std::istream& file);
|
||||
void LoadPath(std::istream& file);
|
||||
|
Reference in New Issue
Block a user