From 77915e0186f4fc0788054eb34651c726b80d981c Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Sun, 14 Oct 2012 17:06:33 +0200 Subject: [PATCH] added script assembler --- src/loader/Interpreter.cpp | 260 ++++++++++++++++++++++++++++++++++++- src/loader/Interpreter.h | 5 + 2 files changed, 263 insertions(+), 2 deletions(-) diff --git a/src/loader/Interpreter.cpp b/src/loader/Interpreter.cpp index 8b9b56a..c2ce0d4 100644 --- a/src/loader/Interpreter.cpp +++ b/src/loader/Interpreter.cpp @@ -14,6 +14,7 @@ #include "../battle/Resources.h" #include "../common/Ikari.h" #include "../common/Item.h" +#include "../common/Script.h" #include "../common/Spell.h" #include "../common/Stats.h" #include "../common/TargetingMode.h" @@ -34,6 +35,7 @@ using battle::Monster; using battle::PartyLayout; using common::Ikari; using common::Item; +using common::Script; using common::Spell; using common::Stats; using common::TargetingMode; @@ -143,7 +145,9 @@ void Interpreter::ReadLiteral(int typeId, int id, char *object, const Literal &l object[literal.GetString().size()] = '\0'; break; case Literal::SCRIPT: - throw Error("script compiler not implemented"); + new (object) Script; + ReadScript(literal.GetScript(), reinterpret_cast