Game - ZenXChaos/MapleStorySDLCPP GitHub Wiki
Game
Game.h // Game.cpp
: Handles game logic and essentials.
private members:
std::map<std::string, Entity>* MobList = new std::map<std::string, Entity>();
std::map<std::string, Entity> MOBS_LIST;
std::map<int, std::string> MOBS_MAPPING;
std::map<std::string, int> MOBS_MAPPINGSTRING;
public members:
SpawnManager spawn_manager;
Entity* IdentifyMob(std::string mobname);
Entity* IdentifyMob(int mobid);
void LoadMobList(SDL_Renderer* gRenderer);
void LoadPlayerAnims(SDL_Renderer* gRenderer, std::map<std::string, AnimatedSprite>* animlist);
void InitSpawnManager();
void ManageMobPool();
MobList
: (pointer for referencing): List of all existing mobs within the game.
MOBS_LIST
: (variable for game logic): List of all existing mobs within the game.
MOBS_MAPPING
: int
index mapping of mobs.
MOBS_MAPPINGSTRING
: std::string
index mapping of mobs.
spawn_manager
: A spawn manager which handles all spawning.
Entity* IdentifyMob
: Identify a mobs properties from the MOBS_LIST by mob_name.
int IdentifyMob
: Identify a mobs properties from the MOBS_LIST by mob_id.
void LoadMobList
: Loads the mob_list. Sprites and Animations as well as entity data. (XML FORMAT) (data\mobs\mobs.zenx
)
void LoadPlayerAnims
: Loads the player animations (XML_FORMAT)(data\player_anims.xml
)
void InitSpawnManager
- Important: Sets proper references, etc...
void ManageMobPool
: Manages the MobPool // interact with SpawnManager.
`