1
This commit is contained in:
parent
22d1394332
commit
4c1e181ca6
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
#include "lispenv.h"
|
#include "lispenv.h"
|
||||||
|
|
||||||
|
#include "mt/Skill.h"
|
||||||
|
#include "mt/SkillNumber.h"
|
||||||
|
|
||||||
class SkillScope : public a8::lisp::GlobalScope
|
class SkillScope : public a8::lisp::GlobalScope
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -14,6 +17,7 @@ public:
|
|||||||
[this] (const a8::lisp::List& params) -> std::shared_ptr<a8::lisp::Value>
|
[this] (const a8::lisp::List& params) -> std::shared_ptr<a8::lisp::Value>
|
||||||
{
|
{
|
||||||
a8::lisp::Atom result;
|
a8::lisp::Atom result;
|
||||||
|
result.val = context_.skill_meta->_number_meta->_float_speed;
|
||||||
return std::make_shared<a8::lisp::Value>(result);
|
return std::make_shared<a8::lisp::Value>(result);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -24,6 +28,14 @@ public:
|
|||||||
{
|
{
|
||||||
context_.c = c;
|
context_.c = c;
|
||||||
context_.skill_meta = skill_meta;
|
context_.skill_meta = skill_meta;
|
||||||
|
|
||||||
|
context_.c = nullptr;
|
||||||
|
context_.skill_meta = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<a8::lisp::Value> Compile(const std::string& script)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -47,7 +59,7 @@ void LispEnv::UnInit()
|
|||||||
|
|
||||||
std::shared_ptr<a8::lisp::Value> LispEnv::CompileSkillNumberExpr(const std::string& script)
|
std::shared_ptr<a8::lisp::Value> LispEnv::CompileSkillNumberExpr(const std::string& script)
|
||||||
{
|
{
|
||||||
|
return skill_env_->Compile(script);
|
||||||
}
|
}
|
||||||
|
|
||||||
float LispEnv::EvalSkillNumberExpr(std::shared_ptr<a8::lisp::Value> expr,
|
float LispEnv::EvalSkillNumberExpr(std::shared_ptr<a8::lisp::Value> expr,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user