Browse Source

- Compile fix - unique_ptr can't be serialized
- Linking fix - now MapGenOptions have DLL-interface (but probably shouldn't be called directly from client anyway)

DjWarmonger 13 years ago
parent
commit
f5ddc44827
4 changed files with 5 additions and 3 deletions
  1. 1 1
      client/CPreGame.cpp
  2. 2 0
      client/CPreGame.h
  3. 1 1
      lib/CModHandler.h
  4. 1 1
      lib/RMG/CMapGenOptions.h

+ 1 - 1
client/CPreGame.cpp

@@ -596,7 +596,7 @@ CSelectionScreen::CSelectionScreen(CMenuScreen::EState Type, CMenuScreen::EMulti
 		opt = new OptionsTab(); //scenario options tab
 		opt = new OptionsTab(); //scenario options tab
 		opt->recActions = DISPOSE;
 		opt->recActions = DISPOSE;
 
 
-		randMapTab = new RandomMapTab;
+		randMapTab = new RandomMapTab();
 		randMapTab->recActions = DISPOSE;
 		randMapTab->recActions = DISPOSE;
 	}
 	}
 	sel = new SelectionTab(screenType, bind(&CSelectionScreen::changeSelection, this, _1), multiPlayer); //scenario selection tab
 	sel = new SelectionTab(screenType, bind(&CSelectionScreen::changeSelection, this, _1), multiPlayer); //scenario selection tab

+ 2 - 0
client/CPreGame.h

@@ -28,6 +28,8 @@ class CTextBox;
 class CCampaignState;
 class CCampaignState;
 class CConnection;
 class CConnection;
 class JsonNode;
 class JsonNode;
+class CMapGenOptions;
+class RandomMapTab;
 struct CPackForSelectionScreen;
 struct CPackForSelectionScreen;
 struct PlayerInfo;
 struct PlayerInfo;
 
 

+ 1 - 1
lib/CModHandler.h

@@ -31,7 +31,7 @@ public:
 	std::vector <TModID> requirements;
 	std::vector <TModID> requirements;
 
 
 	/// mod configuration (mod.json).
 	/// mod configuration (mod.json).
-	std::unique_ptr<JsonNode> config;
+	std::shared_ptr<JsonNode> config; //TODO: unique_ptr can't be serialized
 
 
 	template <typename Handler> void serialize(Handler &h, const int version)
 	template <typename Handler> void serialize(Handler &h, const int version)
 	{
 	{

+ 1 - 1
lib/RMG/CMapGenOptions.h

@@ -48,7 +48,7 @@ namespace EMonsterStrength
  * The map gen options class holds values about general map
  * The map gen options class holds values about general map
  * generation settings e.g. the size of the map, the count of players,...
  * generation settings e.g. the size of the map, the count of players,...
  */
  */
-class CMapGenOptions
+class DLL_LINKAGE CMapGenOptions
 {
 {
 public:
 public:
 	/**
 	/**