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:
parent
81fb2ae584
commit
b7ed11f582
@ -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" />
|
||||
|
@ -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")
|
||||
|
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user