O'Reilly logo

Mastering SFML Game Development by Raimondas Pupius

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the map editor state

Now we're finally ready to actually tackle the state, in which all of the map editing is going to take place. Let us take a gander at its header file:

class State_MapEditor : public BaseState { public: ... void ResetSavePath(); void SetMapRedraw(bool l_redraw); void MainMenu(EventDetails* l_details); void MapEditorNew(EventDetails* l_details); void MapEditorLoad(EventDetails* l_details); void MapEditorSave(EventDetails* l_details); void MapEditorSaveAs(EventDetails* l_details); void MapEditorExit(EventDetails* l_details); void MapAction(const std::string& l_name); private: void SaveMap(const std::string& l_path); void LoadMap(const std::string& l_path); GUI_FileManager m_files; MapControls m_mapControls; std::string ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required