1 /* 2 * This file is part of Dune Legacy. 3 * 4 * Dune Legacy is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation, either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * Dune Legacy is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with Dune Legacy. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #ifndef INIMAPLOADER_H 19 #define INIMAPLOADER_H 20 21 #include <FileClasses/INIFile.h> 22 #include <DataTypes.h> 23 24 #include <INIMap/INIMap.h> 25 26 #include <SDL.h> 27 28 #include <string> 29 #include <map> 30 #include <memory> 31 32 33 // forward declarations 34 class Game; 35 class House; 36 37 class INIMapLoader : public INIMap { 38 public: 39 INIMapLoader(Game* pGame, const std::string& mapname, const std::string& mapdata = ""); 40 ~INIMapLoader(); 41 42 private: 43 void load(); 44 void loadMap(); 45 void loadHouses(); 46 void loadChoam(); 47 void loadUnits(); 48 void loadStructures(); 49 void loadReinforcements(); 50 void loadView(); 51 52 House* getOrCreateHouse(int house); 53 HOUSETYPE getHouseID(const std::string& name); 54 55 Game* pGame; 56 std::map<std::string, HOUSETYPE> housename2house; 57 }; 58 59 #endif //INIMAPLOADER_H 60