1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-21 17:17:06 +02:00

- clang and gcc 4.5 compatibility

- autotools update
- debian build system fixes
This commit is contained in:
Ivan Savenko 2012-11-03 19:31:16 +00:00
parent 7722682ccb
commit fc85e08a64
13 changed files with 104 additions and 91 deletions

View File

@ -9,7 +9,7 @@ if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
option(DISABLE_ERM "Disable compilation of ERM scripting module" OFF)
option(DISABLE_ERM "Disable compilation of ERM scripting module" ON)
############################################
# Building section #
@ -64,12 +64,7 @@ add_definitions(-DM_DATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_DIR}")
add_definitions(-DM_BIN_DIR="${CMAKE_INSTALL_PREFIX}/${BIN_DIR}")
add_definitions(-DM_LIB_DIR="${CMAKE_INSTALL_PREFIX}/${LIB_DIR}")
if (CMAKE_INSTALL_RPATH) # if RPATH is not empty - add separator for one more entry
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:")
endif()
# remain full RPATH when installing (needed to find shared libraries)
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/vcmi")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/vcmi")
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
add_subdirectory(lib)

View File

@ -31,6 +31,8 @@ class CCursorHandler;
class CGameState;
class IMainVideoPlayer;
class CMap;
//a class for non-mechanical client GUI classes
class CClientState
@ -44,8 +46,6 @@ public:
};
extern CClientState * CCS;
struct CMap;
/// CGameInfo class
/// for allowing different functions for accessing game informations
class CGameInfo

View File

@ -1044,16 +1044,16 @@ void SelectionTab::parseMaps(const std::vector<ResourceID> & files)
allItems.clear();
for(int i = 0; i < files.size(); ++i)
{
try
{
CMapInfo mapInfo;
mapInfo.mapInit(files[i].getName());
allItems.push_back(std::move(mapInfo));
}
catch(std::exception & e)
{
tlog2 << "Map " << files[i].getName() << " is invalid. Message: " << e.what() << std::endl;
}
try
{
CMapInfo mapInfo;
mapInfo.mapInit(files[i].getName());
allItems.push_back(mapInfo);
}
catch(std::exception & e)
{
tlog2 << "Map " << files[i].getName() << " is invalid. Message: " << e.what() << std::endl;
}
}
}
@ -1079,12 +1079,12 @@ void SelectionTab::parseGames(const std::vector<ResourceID> &files, bool multi)
if((allItems[i].actualHumanPlayers > 1) != multi) //if multi mode then only multi games, otherwise single
{
allItems[i].mapHeader.reset(nullptr);
allItems[i].mapHeader.reset();
}
}
catch(std::exception &e)
{
allItems[i].mapHeader.reset(nullptr);
allItems[i].mapHeader.reset();
tlog3 << "Failed to process " << files[i].getName() <<": " << e.what() << std::endl;
}
}
@ -2820,7 +2820,7 @@ void CBonusSelection::init()
}
//unlock if no bonuses -- it's acceptable
// //init campaign state if necessary
// if (ourCampaign->campaignName.size() == 0)
@ -3173,7 +3173,7 @@ void CBonusSelection::updateBonusSelection()
break;
case CScenarioTravel::STravelBonus::HERO:
desc = CGI->generaltexth->allTexts[718];
boost::algorithm::replace_first(desc, "%s", CGI->generaltexth->capColors[bonDescs[i].info1]); //hero's color
@ -3206,7 +3206,7 @@ void CBonusSelection::updateBonusSelection()
void CBonusSelection::startMap()
{
StartInfo *si = new StartInfo(sInfo);
if (ourCampaign->mapsConquered.size())
{
GH.popInts(1);
@ -3558,7 +3558,7 @@ CCampaignScreen::CCampaignButton::CCampaignButton(const JsonNode &config )
pos.y += config["y"].Float();
pos.w = 200;
pos.h = 116;
campFile = config["file"].String();
video = config["video"].String();
@ -3662,7 +3662,7 @@ CCampaignScreen::CCampaignScreen(const JsonNode &config)
back = createExitButton(config["exitbutton"]);
back->hoverable = true;
}
BOOST_FOREACH(const JsonNode& node, config["items"].Vector())
campButtons.push_back(new CCampaignButton(node));
}

View File

@ -15,7 +15,7 @@
class CGObjectInstance;
class CGHeroInstance;
struct CMap;
class CMap;
class CGDefInfo;
class CGObjectInstance;
class CDefHandler;

2
debian/compat vendored
View File

@ -1 +1 @@
8
9

2
debian/control vendored
View File

@ -2,7 +2,7 @@ Source: vcmi
Section: games
Priority: optional
Maintainer: frank zago <frank@zago.net>
Build-Depends: debhelper (>= 8), cdbs (>= 0.4.48), cmake, libsdl-image1.2-dev, libsdl-ttf2.0-dev, libsdl-mixer1.2-dev (>= 1.2.8), zlib1g-dev, libavformat-dev, libswscale-dev, libboost-dev (>=1.44), libboost-program-options-dev (>=1.44), libboost-filesystem-dev (>=1.44), libboost-system-dev (>=1.44), libboost-thread-dev (>=1.44)
Build-Depends: debhelper (>= 8), cmake, libsdl-image1.2-dev, libsdl-ttf2.0-dev, libsdl-mixer1.2-dev (>= 1.2.8), zlib1g-dev, libavformat-dev, libswscale-dev, libboost-dev (>=1.46), libboost-program-options-dev (>=1.46), libboost-filesystem-dev (>=1.46), libboost-system-dev (>=1.46), libboost-thread-dev (>=1.46)
Standards-Version: 3.9.1
Homepage: http://vcmi.eu

10
debian/rules vendored
View File

@ -1,4 +1,8 @@
#!/usr/bin/make -f
include /usr/share/cdbs/1/class/cmake.mk
include /usr/share/cdbs/1/rules/debhelper.mk
#! /usr/bin/make -f
%:
dh $@
# override disabled by default rpath - we need to find libvcmi.so with it:
override_dh_auto_configure:
dh_auto_configure -- -DCMAKE_SKIP_RPATH=OFF

View File

@ -44,7 +44,7 @@ class CGDefInfo;
class CObjectScript;
class CGObjectInstance;
class CCreature;
struct CMap;
class CMap;
struct StartInfo;
struct SDL_Surface;
class CMapHandler;
@ -71,7 +71,7 @@ namespace boost
//numbers of creatures are exact numbers if detailed else they are quantity ids (0 - a few, 1 - several and so on; additionally -1 - unknown)
struct ArmyDescriptor : public std::map<TSlot, CStackBasicDescriptor>
{
bool isDetailed;
bool isDetailed;
DLL_LINKAGE ArmyDescriptor(const CArmedInstance *army, bool detailed); //not detailed -> quantity ids as count
DLL_LINKAGE ArmyDescriptor();
@ -147,7 +147,7 @@ struct DLL_LINKAGE SThievesGuildInfo
std::vector< std::vector< TPlayerColor > > numOfTowns, numOfHeroes, gold, woodOre, mercSulfCrystGems, obelisks, artifacts, army, income; // [place] -> [colours of players]
std::map<TPlayerColor, InfoAboutHero> colorToBestHero; //maps player's color to his best heros'
std::map<TPlayerColor, InfoAboutHero> colorToBestHero; //maps player's color to his best heros'
std::map<TPlayerColor, si8> personality; // color to personality // -1 - human, AI -> (00 - random, 01 - warrior, 02 - builder, 03 - explorer)
std::map<TPlayerColor, si32> bestCreature; // color to ID // id or -1 if not known
@ -183,14 +183,14 @@ public:
std::string nodeName() const OVERRIDE;
//override
//void getParents(TCNodes &out, const CBonusSystemNode *root = NULL) const;
//void getParents(TCNodes &out, const CBonusSystemNode *root = NULL) const;
//void getBonuses(BonusList &out, const CSelector &selector, const CBonusSystemNode *root = NULL) const;
template <typename Handler> void serialize(Handler &h, const int version)
{
h & color & human & currentSelection & team & resources & status;
h & heroes & towns & availableHeroes & dwellings;
h & getBonusList(); //FIXME FIXME FIXME
h & getBonusList(); //FIXME FIXME FIXME
h & status & daysWithoutCastle;
h & enteredLosingCheatCode & enteredWinningCheatCode;
h & static_cast<CBonusSystemNode&>(*this);
@ -203,9 +203,9 @@ public:
ui8 id; //position in gameState::teams
std::set<TPlayerColor> players; // members of this team
std::vector<std::vector<std::vector<ui8> > > fogOfWarMap; //true - visible, false - hidden
TeamState();
template <typename Handler> void serialize(Handler &h, const int version)
{
h & id & players & fogOfWarMap;
@ -324,7 +324,7 @@ struct DLL_EXPORT DuelParameters
int id;
int attack, defense, dmg, HP, speed, shoots;
CusomCreature()
CusomCreature()
{
id = attack = defense = dmg = HP = speed = shoots = -1;
}
@ -466,7 +466,7 @@ public:
friend class CMapHandler;
friend class CGameHandler;
};
struct DLL_LINKAGE QuestInfo //universal interface for human and AI
{
const CQuest * quest;
@ -496,4 +496,4 @@ struct DLL_LINKAGE QuestInfo //universal interface for human and AI
{
h & quest & obj & tile;
}
};
};

View File

@ -15,6 +15,14 @@ libvcmi_la_SOURCES = \
Filesystem/CLodArchiveLoader.cpp \
Filesystem/CMemoryStream.cpp \
Filesystem/CResourceLoader.cpp \
Map/CCampaignHandler.cpp \
Map/CCampaignHandler.h \
Map/CMap.cpp \
Map/CMap.h \
Map/CMapInfo.cpp \
Map/CMapInfo.h \
Map/CMapService.cpp \
Map/CMapService.h \
BattleAction.cpp \
BattleAction.h \
BattleState.cpp \
@ -25,8 +33,6 @@ libvcmi_la_SOURCES = \
CBattleCallback.h \
CBuildingHandler.cpp \
CBuildingHandler.h \
CCampaignHandler.cpp \
CCampaignHandler.h \
CConfigHandler.cpp \
CConfigHandler.h \
CConsoleHandler.cpp \
@ -47,8 +53,6 @@ libvcmi_la_SOURCES = \
CHeroHandler.h \
CLogger.cpp \
CLogger.h \
CMapInfo.cpp \
CMapInfo.h \
CModHandler.cpp \
CModHandler.h \
CObjectHandler.cpp \
@ -83,6 +87,4 @@ libvcmi_la_SOURCES = \
BattleHex.h \
VCMIDirs.h \
VCMI_Lib.cpp \
VCMI_Lib.h \
map.cpp \
map.h
VCMI_Lib.h

View File

@ -88,23 +88,23 @@ am_libvcmi_la_OBJECTS = libvcmi_la-CBinaryReader.lo \
libvcmi_la-CCompressedStream.lo libvcmi_la-CFileInfo.lo \
libvcmi_la-CFileInputStream.lo libvcmi_la-CFilesystemLoader.lo \
libvcmi_la-CLodArchiveLoader.lo libvcmi_la-CMemoryStream.lo \
libvcmi_la-CResourceLoader.lo libvcmi_la-BattleAction.lo \
libvcmi_la-CResourceLoader.lo libvcmi_la-CCampaignHandler.lo \
libvcmi_la-CMap.lo libvcmi_la-CMapInfo.lo \
libvcmi_la-CMapService.lo libvcmi_la-BattleAction.lo \
libvcmi_la-BattleState.lo libvcmi_la-CArtHandler.lo \
libvcmi_la-CBattleCallback.lo libvcmi_la-CBuildingHandler.lo \
libvcmi_la-CCampaignHandler.lo libvcmi_la-CConfigHandler.lo \
libvcmi_la-CConsoleHandler.lo libvcmi_la-CCreatureHandler.lo \
libvcmi_la-CCreatureSet.lo libvcmi_la-CDefObjInfoHandler.lo \
libvcmi_la-CGameInterface.lo libvcmi_la-CGameState.lo \
libvcmi_la-CGeneralTextHandler.lo libvcmi_la-CHeroHandler.lo \
libvcmi_la-CLogger.lo libvcmi_la-CMapInfo.lo \
libvcmi_la-CConfigHandler.lo libvcmi_la-CConsoleHandler.lo \
libvcmi_la-CCreatureHandler.lo libvcmi_la-CCreatureSet.lo \
libvcmi_la-CDefObjInfoHandler.lo libvcmi_la-CGameInterface.lo \
libvcmi_la-CGameState.lo libvcmi_la-CGeneralTextHandler.lo \
libvcmi_la-CHeroHandler.lo libvcmi_la-CLogger.lo \
libvcmi_la-CModHandler.lo libvcmi_la-CObjectHandler.lo \
libvcmi_la-CObstacleInstance.lo libvcmi_la-CSpellHandler.lo \
libvcmi_la-CTownHandler.lo libvcmi_la-CThreadHelper.lo \
libvcmi_la-Connection.lo libvcmi_la-HeroBonus.lo \
libvcmi_la-IGameCallback.lo libvcmi_la-JsonNode.lo \
libvcmi_la-NetPacksLib.lo libvcmi_la-ResourceSet.lo \
libvcmi_la-BattleHex.lo libvcmi_la-VCMI_Lib.lo \
libvcmi_la-map.lo
libvcmi_la-BattleHex.lo libvcmi_la-VCMI_Lib.lo
libvcmi_la_OBJECTS = $(am_libvcmi_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@ -306,6 +306,14 @@ libvcmi_la_SOURCES = \
Filesystem/CLodArchiveLoader.cpp \
Filesystem/CMemoryStream.cpp \
Filesystem/CResourceLoader.cpp \
Map/CCampaignHandler.cpp \
Map/CCampaignHandler.h \
Map/CMap.cpp \
Map/CMap.h \
Map/CMapInfo.cpp \
Map/CMapInfo.h \
Map/CMapService.cpp \
Map/CMapService.h \
BattleAction.cpp \
BattleAction.h \
BattleState.cpp \
@ -316,8 +324,6 @@ libvcmi_la_SOURCES = \
CBattleCallback.h \
CBuildingHandler.cpp \
CBuildingHandler.h \
CCampaignHandler.cpp \
CCampaignHandler.h \
CConfigHandler.cpp \
CConfigHandler.h \
CConsoleHandler.cpp \
@ -338,8 +344,6 @@ libvcmi_la_SOURCES = \
CHeroHandler.h \
CLogger.cpp \
CLogger.h \
CMapInfo.cpp \
CMapInfo.h \
CModHandler.cpp \
CModHandler.h \
CObjectHandler.cpp \
@ -374,9 +378,7 @@ libvcmi_la_SOURCES = \
BattleHex.h \
VCMIDirs.h \
VCMI_Lib.cpp \
VCMI_Lib.h \
map.cpp \
map.h
VCMI_Lib.h
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
@ -476,7 +478,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CHeroHandler.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CLodArchiveLoader.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CLogger.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CMap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CMapInfo.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CMapService.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CMemoryStream.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CModHandler.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CObjectHandler.Plo@am__quote@
@ -492,7 +496,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-NetPacksLib.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-ResourceSet.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-VCMI_Lib.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-map.Plo@am__quote@
.cpp.o:
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@ -571,6 +574,34 @@ libvcmi_la-CResourceLoader.lo: Filesystem/CResourceLoader.cpp
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CResourceLoader.lo `test -f 'Filesystem/CResourceLoader.cpp' || echo '$(srcdir)/'`Filesystem/CResourceLoader.cpp
libvcmi_la-CCampaignHandler.lo: Map/CCampaignHandler.cpp
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CCampaignHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CCampaignHandler.Tpo -c -o libvcmi_la-CCampaignHandler.lo `test -f 'Map/CCampaignHandler.cpp' || echo '$(srcdir)/'`Map/CCampaignHandler.cpp
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CCampaignHandler.Tpo $(DEPDIR)/libvcmi_la-CCampaignHandler.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Map/CCampaignHandler.cpp' object='libvcmi_la-CCampaignHandler.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CCampaignHandler.lo `test -f 'Map/CCampaignHandler.cpp' || echo '$(srcdir)/'`Map/CCampaignHandler.cpp
libvcmi_la-CMap.lo: Map/CMap.cpp
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CMap.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CMap.Tpo -c -o libvcmi_la-CMap.lo `test -f 'Map/CMap.cpp' || echo '$(srcdir)/'`Map/CMap.cpp
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CMap.Tpo $(DEPDIR)/libvcmi_la-CMap.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Map/CMap.cpp' object='libvcmi_la-CMap.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CMap.lo `test -f 'Map/CMap.cpp' || echo '$(srcdir)/'`Map/CMap.cpp
libvcmi_la-CMapInfo.lo: Map/CMapInfo.cpp
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CMapInfo.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CMapInfo.Tpo -c -o libvcmi_la-CMapInfo.lo `test -f 'Map/CMapInfo.cpp' || echo '$(srcdir)/'`Map/CMapInfo.cpp
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CMapInfo.Tpo $(DEPDIR)/libvcmi_la-CMapInfo.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Map/CMapInfo.cpp' object='libvcmi_la-CMapInfo.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CMapInfo.lo `test -f 'Map/CMapInfo.cpp' || echo '$(srcdir)/'`Map/CMapInfo.cpp
libvcmi_la-CMapService.lo: Map/CMapService.cpp
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CMapService.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CMapService.Tpo -c -o libvcmi_la-CMapService.lo `test -f 'Map/CMapService.cpp' || echo '$(srcdir)/'`Map/CMapService.cpp
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CMapService.Tpo $(DEPDIR)/libvcmi_la-CMapService.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Map/CMapService.cpp' object='libvcmi_la-CMapService.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CMapService.lo `test -f 'Map/CMapService.cpp' || echo '$(srcdir)/'`Map/CMapService.cpp
libvcmi_la-BattleAction.lo: BattleAction.cpp
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-BattleAction.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-BattleAction.Tpo -c -o libvcmi_la-BattleAction.lo `test -f 'BattleAction.cpp' || echo '$(srcdir)/'`BattleAction.cpp
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-BattleAction.Tpo $(DEPDIR)/libvcmi_la-BattleAction.Plo
@ -606,13 +637,6 @@ libvcmi_la-CBuildingHandler.lo: CBuildingHandler.cpp
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CBuildingHandler.lo `test -f 'CBuildingHandler.cpp' || echo '$(srcdir)/'`CBuildingHandler.cpp
libvcmi_la-CCampaignHandler.lo: CCampaignHandler.cpp
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CCampaignHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CCampaignHandler.Tpo -c -o libvcmi_la-CCampaignHandler.lo `test -f 'CCampaignHandler.cpp' || echo '$(srcdir)/'`CCampaignHandler.cpp
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CCampaignHandler.Tpo $(DEPDIR)/libvcmi_la-CCampaignHandler.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CCampaignHandler.cpp' object='libvcmi_la-CCampaignHandler.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CCampaignHandler.lo `test -f 'CCampaignHandler.cpp' || echo '$(srcdir)/'`CCampaignHandler.cpp
libvcmi_la-CConfigHandler.lo: CConfigHandler.cpp
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CConfigHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CConfigHandler.Tpo -c -o libvcmi_la-CConfigHandler.lo `test -f 'CConfigHandler.cpp' || echo '$(srcdir)/'`CConfigHandler.cpp
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CConfigHandler.Tpo $(DEPDIR)/libvcmi_la-CConfigHandler.Plo
@ -683,13 +707,6 @@ libvcmi_la-CLogger.lo: CLogger.cpp
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CLogger.lo `test -f 'CLogger.cpp' || echo '$(srcdir)/'`CLogger.cpp
libvcmi_la-CMapInfo.lo: CMapInfo.cpp
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CMapInfo.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CMapInfo.Tpo -c -o libvcmi_la-CMapInfo.lo `test -f 'CMapInfo.cpp' || echo '$(srcdir)/'`CMapInfo.cpp
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CMapInfo.Tpo $(DEPDIR)/libvcmi_la-CMapInfo.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CMapInfo.cpp' object='libvcmi_la-CMapInfo.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CMapInfo.lo `test -f 'CMapInfo.cpp' || echo '$(srcdir)/'`CMapInfo.cpp
libvcmi_la-CModHandler.lo: CModHandler.cpp
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CModHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CModHandler.Tpo -c -o libvcmi_la-CModHandler.lo `test -f 'CModHandler.cpp' || echo '$(srcdir)/'`CModHandler.cpp
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CModHandler.Tpo $(DEPDIR)/libvcmi_la-CModHandler.Plo
@ -788,13 +805,6 @@ libvcmi_la-VCMI_Lib.lo: VCMI_Lib.cpp
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-VCMI_Lib.lo `test -f 'VCMI_Lib.cpp' || echo '$(srcdir)/'`VCMI_Lib.cpp
libvcmi_la-map.lo: map.cpp
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-map.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-map.Tpo -c -o libvcmi_la-map.lo `test -f 'map.cpp' || echo '$(srcdir)/'`map.cpp
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-map.Tpo $(DEPDIR)/libvcmi_la-map.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='map.cpp' object='libvcmi_la-map.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-map.lo `test -f 'map.cpp' || echo '$(srcdir)/'`map.cpp
mostlyclean-libtool:
-rm -f *.lo

View File

@ -29,7 +29,7 @@ void CMapInfo::countPlayers()
actualHumanPlayers++;
}
CMapInfo::CMapInfo() : mapHeader(nullptr), campaignHeader(nullptr),
CMapInfo::CMapInfo() :
scenarioOpts(nullptr)
{

View File

@ -20,8 +20,10 @@ struct StartInfo;
class DLL_LINKAGE CMapInfo
{
public:
std::unique_ptr<CMapHeader> mapHeader; //may be nullptr if campaign
std::unique_ptr<CCampaignHeader> campaignHeader; //may be nullptr if scenario
//FIXME: unique_ptr won't work here with gcc-4.5. (can't move into vector at CPregame.cpp, SelectionTab::parseMaps() method)
//Needs some workaround or wait till there is no need to support 4.5
shared_ptr<CMapHeader> mapHeader; //may be nullptr if campaign
shared_ptr<CCampaignHeader> campaignHeader; //may be nullptr if scenario
StartInfo * scenarioOpts; //options with which scenario has been started (used only with saved games)
std::string fileURI;
std::string date;

View File

@ -75,7 +75,7 @@ std::unique_ptr<IMapLoader> CMapService::getMapLoader(std::unique_ptr<CInputStre
const bool CMapLoaderH3M::IS_PROFILING_ENABLED = false;
CMapLoaderH3M::CMapLoaderH3M(CInputStream * stream) : map(nullptr), mapHeader(nullptr), buffer(nullptr), pos(-1), size(-1)
CMapLoaderH3M::CMapLoaderH3M(CInputStream * stream) : map(nullptr), buffer(nullptr), pos(-1), size(-1)
{
initBuffer(stream);
}