1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fix ERM build

(-) there is one regression, but ERM is unused yet
This commit is contained in:
AlexVinS 2014-11-14 07:45:44 +03:00
parent 81fb2ae584
commit b7ed11f582
3 changed files with 13 additions and 13 deletions

View File

@ -6,7 +6,7 @@
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Target title="Debug-win32-SDL2">
<Option output="../ERM" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="3" />
@ -16,7 +16,7 @@
<Add option="-ggdb" />
</Compiler>
</Target>
<Target title="Release">
<Target title="Release-win32-SDL2">
<Option output="../ERM" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="3" />

View File

@ -23,9 +23,9 @@
namespace spirit = boost::spirit;
using namespace VERMInterpreter;
using namespace boost::assign;
typedef int TUnusedType;
using namespace boost::assign;
ERMInterpreter *erm;
Environment *topDyn;
@ -1339,10 +1339,10 @@ struct ERMExpDispatch : boost::static_visitor<>
std::vector<int> params(FunctionLocalVars::NUM_PARAMETERS, 0);
params.back() = it;
//owner->getFuncVars(funNum)->getParam(16) = it;
ERMInterpreter::TIDPattern tip;
std::vector<int> v1;
v1 += funNum;
insert(tip) (v1.size(), v1);
v1.push_back(funNum);
ERMInterpreter::TIDPattern tip = {{v1.size(), v1}};
erm->executeTriggerType(TriggerType("FU"), true, tip, params);
it = erm->getFuncVars(funNum)->getParam(16);
}
@ -1394,7 +1394,7 @@ struct ERMExpDispatch : boost::static_visitor<>
{
int heroNum = erm->getIexp(tid[0]).getInt();
if(heroNum == -1)
hero = icb->getSelectedHero();
assert(false); //FIXME: use new hero selection mechanics
else
hero = icb->getHeroWithSubid(heroNum);
@ -2509,9 +2509,11 @@ struct VNodeEvaluator : boost::static_visitor<VOption>
}
VOption operator()(VSymbol const& opt) const
{
std::map<std::string, VFunc::Eopt> symToFunc = boost::assign::map_list_of
("<", VFunc::LT)("<=", VFunc::LE)(">", VFunc::GT)(">=", VFunc::GE)("=", VFunc::EQ)("+", VFunc::ADD)("-", VFunc::SUB)
("*", VFunc::MULT)("/", VFunc::DIV)("%", VFunc::MOD);
std::map<std::string, VFunc::Eopt> symToFunc =
{
{"<", VFunc::LT},{"<=", VFunc::LE},{">", VFunc::GT},{">=", VFunc::GE},{"=", VFunc::EQ},{"+", VFunc::ADD},{"-", VFunc::SUB},
{"*", VFunc::MULT},{"/", VFunc::DIV},{"%", VFunc::MOD}
};
//check keywords
if(opt.text == "quote")

View File

@ -5,6 +5,4 @@
// This header should be treated as a pre compiled header file(PCH) in the compiler building settings.
// Here you can add specific libraries and macros which are specific to this project.
#include <boost/variant.hpp>
#include <boost/optional.hpp>