mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
- build system update
- compile\warning fixes
This commit is contained in:
parent
f8a27a9fdb
commit
a602d7e9da
@ -1 +1 @@
|
||||
SUBDIRS = FuzzyLite StupidAI EmptyAI VCAI
|
||||
SUBDIRS = FuzzyLite StupidAI EmptyAI VCAI BattleAI
|
||||
|
@ -237,7 +237,7 @@ target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
SUBDIRS = FuzzyLite StupidAI EmptyAI VCAI
|
||||
SUBDIRS = FuzzyLite StupidAI EmptyAI VCAI BattleAI
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
|
@ -22,7 +22,6 @@ set(client_SRCS
|
||||
CAnimation.cpp
|
||||
CBitmapHandler.cpp
|
||||
CCastleInterface.cpp
|
||||
CConfigHandler.cpp
|
||||
CCreatureWindow.cpp
|
||||
CDefHandler.cpp
|
||||
CGameInfo.cpp
|
||||
|
@ -435,7 +435,7 @@ void CMessage::drawIWindow(CInfoWindow * ret, std::string text, int player)
|
||||
if (ret->components.size())
|
||||
{
|
||||
curh += BEFORE_COMPONENTS;
|
||||
comps.blitCompsOnSur (_or, 10, curh, ret->bitmap);
|
||||
comps.blitCompsOnSur (_or, 40, curh, ret->bitmap);
|
||||
}
|
||||
if(ret->buttons.size())
|
||||
{
|
||||
|
@ -1795,7 +1795,7 @@ void CObjectListWindow::init(CPicture * titlePic, std::string _title, std::strin
|
||||
titleImage->pos.y =75 + pos.y - titleImage->pos.h/2;
|
||||
}
|
||||
list = new CListBox(boost::bind(&CObjectListWindow::genItem, this, _1), CListBox::DestroyFunc(),
|
||||
Point(15, 152), Point(0, 25), 9, items.size(), 0, 1, Rect(262, -32, 256, 256) );
|
||||
Point(14, 151), Point(0, 25), 9, items.size(), 0, 1, Rect(262, -32, 256, 256) );
|
||||
list->type |= REDRAW_PARENT;
|
||||
}
|
||||
|
||||
|
@ -51,8 +51,6 @@ vcmiclient_SOURCES = \
|
||||
CBitmapHandler.h \
|
||||
CCastleInterface.cpp \
|
||||
CCastleInterface.h \
|
||||
CConfigHandler.cpp \
|
||||
CConfigHandler.h \
|
||||
CCreatureWindow.cpp \
|
||||
CCreatureWindow.h \
|
||||
CDefHandler.cpp \
|
||||
|
@ -77,7 +77,6 @@ am_vcmiclient_OBJECTS = vcmiclient-CCallback.$(OBJEXT) \
|
||||
vcmiclient-CAnimation.$(OBJEXT) \
|
||||
vcmiclient-CBitmapHandler.$(OBJEXT) \
|
||||
vcmiclient-CCastleInterface.$(OBJEXT) \
|
||||
vcmiclient-CConfigHandler.$(OBJEXT) \
|
||||
vcmiclient-CCreatureWindow.$(OBJEXT) \
|
||||
vcmiclient-CDefHandler.$(OBJEXT) \
|
||||
vcmiclient-CGameInfo.$(OBJEXT) \
|
||||
@ -356,8 +355,6 @@ vcmiclient_SOURCES = \
|
||||
CBitmapHandler.h \
|
||||
CCastleInterface.cpp \
|
||||
CCastleInterface.h \
|
||||
CConfigHandler.cpp \
|
||||
CConfigHandler.h \
|
||||
CCreatureWindow.cpp \
|
||||
CCreatureWindow.h \
|
||||
CDefHandler.cpp \
|
||||
@ -494,7 +491,6 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CBitmapHandler.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CCallback.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CCastleInterface.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CConfigHandler.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CCreatureAnimation.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CCreatureWindow.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CCursorHandler.Po@am__quote@
|
||||
@ -766,20 +762,6 @@ vcmiclient-CCastleInterface.obj: CCastleInterface.cpp
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CCastleInterface.obj `if test -f 'CCastleInterface.cpp'; then $(CYGPATH_W) 'CCastleInterface.cpp'; else $(CYGPATH_W) '$(srcdir)/CCastleInterface.cpp'; fi`
|
||||
|
||||
vcmiclient-CConfigHandler.o: CConfigHandler.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CConfigHandler.o -MD -MP -MF $(DEPDIR)/vcmiclient-CConfigHandler.Tpo -c -o vcmiclient-CConfigHandler.o `test -f 'CConfigHandler.cpp' || echo '$(srcdir)/'`CConfigHandler.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CConfigHandler.Tpo $(DEPDIR)/vcmiclient-CConfigHandler.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CConfigHandler.cpp' object='vcmiclient-CConfigHandler.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CConfigHandler.o `test -f 'CConfigHandler.cpp' || echo '$(srcdir)/'`CConfigHandler.cpp
|
||||
|
||||
vcmiclient-CConfigHandler.obj: CConfigHandler.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CConfigHandler.obj -MD -MP -MF $(DEPDIR)/vcmiclient-CConfigHandler.Tpo -c -o vcmiclient-CConfigHandler.obj `if test -f 'CConfigHandler.cpp'; then $(CYGPATH_W) 'CConfigHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/CConfigHandler.cpp'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CConfigHandler.Tpo $(DEPDIR)/vcmiclient-CConfigHandler.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CConfigHandler.cpp' object='vcmiclient-CConfigHandler.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CConfigHandler.obj `if test -f 'CConfigHandler.cpp'; then $(CYGPATH_W) 'CConfigHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/CConfigHandler.cpp'; fi`
|
||||
|
||||
vcmiclient-CCreatureWindow.o: CCreatureWindow.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CCreatureWindow.o -MD -MP -MF $(DEPDIR)/vcmiclient-CCreatureWindow.Tpo -c -o vcmiclient-CCreatureWindow.o `test -f 'CCreatureWindow.cpp' || echo '$(srcdir)/'`CCreatureWindow.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CCreatureWindow.Tpo $(DEPDIR)/vcmiclient-CCreatureWindow.Po
|
||||
|
@ -913,7 +913,6 @@ void CArtHandler::addBonuses()
|
||||
JsonNode cfg;
|
||||
BOOST_FOREACH(auto art, artifacts)
|
||||
{
|
||||
art->id;
|
||||
JsonNode jn;
|
||||
jn["id"].Float() = art->id;
|
||||
BOOST_FOREACH (auto b, art->getBonusList())
|
||||
|
@ -285,3 +285,8 @@ void config::CConfigHandler::init()
|
||||
|
||||
SetResolution(screenRes["width"].Float(), screenRes["height"].Float());
|
||||
}
|
||||
|
||||
// Force instantiation of the SettingsStorage::NodeAccessor class template.
|
||||
// That way method definitions can sit in the cpp file
|
||||
template struct SettingsStorage::NodeAccessor<SettingsListener>;
|
||||
template struct SettingsStorage::NodeAccessor<Settings>;
|
@ -178,8 +178,3 @@ namespace config
|
||||
|
||||
extern DLL_LINKAGE SettingsStorage settings;
|
||||
extern DLL_LINKAGE config::CConfigHandler conf;
|
||||
|
||||
// Force instantiation of the SettingsStorage::NodeAccessor class template.
|
||||
// That way method definitions can sit in the cpp file
|
||||
template struct SettingsStorage::NodeAccessor<SettingsListener>;
|
||||
template struct SettingsStorage::NodeAccessor<Settings>;
|
||||
|
@ -20,6 +20,7 @@ set(lib_SRCS
|
||||
CBattleCallback.cpp
|
||||
CBuildingHandler.cpp
|
||||
CCampaignHandler.cpp
|
||||
CConfigHandler.cpp
|
||||
CConsoleHandler.cpp
|
||||
CCreatureHandler.cpp
|
||||
CCreatureSet.cpp
|
||||
|
@ -928,6 +928,7 @@ Bonus * ParseBonus (const JsonVector &ability_vec) //TODO: merge with AddAbility
|
||||
template <typename T>
|
||||
const T & parseByMap(const std::map<std::string, T> & map, const JsonNode * val, std::string err)
|
||||
{
|
||||
static T defaultValue;
|
||||
if (!val->isNull())
|
||||
{
|
||||
std::string type = val->String();
|
||||
@ -935,7 +936,7 @@ const T & parseByMap(const std::map<std::string, T> & map, const JsonNode * val,
|
||||
if (it == map.end())
|
||||
{
|
||||
tlog1 << "Error: invalid " << err << type << std::endl;
|
||||
return T();
|
||||
return defaultValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -943,7 +944,7 @@ const T & parseByMap(const std::map<std::string, T> & map, const JsonNode * val,
|
||||
}
|
||||
}
|
||||
else
|
||||
return T();
|
||||
return defaultValue;
|
||||
};
|
||||
|
||||
Bonus * ParseBonus (const JsonNode &ability)
|
||||
@ -1022,6 +1023,8 @@ DLL_LINKAGE void UnparseBonus( JsonNode &node, const Bonus * bonus )
|
||||
return it.first;
|
||||
}
|
||||
}
|
||||
assert(0);
|
||||
return "";
|
||||
};
|
||||
|
||||
node["type"].String() = reverseMap(bonus->type, bonusNameMap);
|
||||
|
@ -27,6 +27,8 @@ libvcmi_la_SOURCES = \
|
||||
CBuildingHandler.h \
|
||||
CCampaignHandler.cpp \
|
||||
CCampaignHandler.h \
|
||||
CConfigHandler.cpp \
|
||||
CConfigHandler.h \
|
||||
CConsoleHandler.cpp \
|
||||
CConsoleHandler.h \
|
||||
CCreatureHandler.cpp \
|
||||
|
@ -92,19 +92,20 @@ am_libvcmi_la_OBJECTS = libvcmi_la-CBinaryReader.lo \
|
||||
libvcmi_la-CResourceLoader.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-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-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-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-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_OBJECTS = $(am_libvcmi_la_OBJECTS)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
@ -319,6 +320,8 @@ libvcmi_la_SOURCES = \
|
||||
CBuildingHandler.h \
|
||||
CCampaignHandler.cpp \
|
||||
CCampaignHandler.h \
|
||||
CConfigHandler.cpp \
|
||||
CConfigHandler.h \
|
||||
CConsoleHandler.cpp \
|
||||
CConsoleHandler.h \
|
||||
CCreatureHandler.cpp \
|
||||
@ -461,6 +464,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CBuildingHandler.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CCampaignHandler.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CCompressedStream.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CConfigHandler.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CConsoleHandler.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CCreatureHandler.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CCreatureSet.Plo@am__quote@
|
||||
@ -611,6 +615,13 @@ libvcmi_la-CCampaignHandler.lo: CCampaignHandler.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-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
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CConfigHandler.cpp' object='libvcmi_la-CConfigHandler.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-CConfigHandler.lo `test -f 'CConfigHandler.cpp' || echo '$(srcdir)/'`CConfigHandler.cpp
|
||||
|
||||
libvcmi_la-CConsoleHandler.lo: CConsoleHandler.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-CConsoleHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CConsoleHandler.Tpo -c -o libvcmi_la-CConsoleHandler.lo `test -f 'CConsoleHandler.cpp' || echo '$(srcdir)/'`CConsoleHandler.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CConsoleHandler.Tpo $(DEPDIR)/libvcmi_la-CConsoleHandler.Plo
|
||||
|
Loading…
Reference in New Issue
Block a user