Level loading modularized. Levels auto-load/cache tilesets that are already loaded and shared between maps.

This commit is contained in:
2023-06-21 22:59:06 -07:00
parent 9247ecb528
commit 8d5d509c7c
4 changed files with 23 additions and 5 deletions
+2
View File
@@ -21,6 +21,7 @@ class Crawler : public olc::PixelGameEngine
GFX_Battlecry_Effect,GFX_Mana,GFX_SonicSlash;
std::vector<Effect>foregroundEffects,backgroundEffects;
std::map<MapName,Map>MAP_DATA;
std::map<std::string,Renderable*>MAP_TILESETS;
vf2d worldShake={};
float worldShakeTime=0;
float lastWorldShakeAdjust=0;
@@ -36,6 +37,7 @@ public:
bool OnUserCreate() override;
bool OnUserUpdate(float fElapsedTime) override;
void InitializeAnimations();
void InitializeLevel(std::string mapFile,MapName map);
void HandleUserInput(float fElapsedTime);
void UpdateCamera(float fElapsedTime);
void UpdateEffects(float fElapsedTime);