aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/script.h
diff options
context:
space:
mode:
authorDenis Kasak2009-07-06 18:49:51 +0000
committerDenis Kasak2009-07-06 18:49:51 +0000
commitedaaca97f95a26b235fadaf199d291c98d88d43a (patch)
treea28d5fa2ed1ce2bfebbb73156255ff0f4782e975 /engines/draci/script.h
parent237707dd6e0d07db130de9cdae5f7c9f5169ff71 (diff)
downloadscummvm-rg350-edaaca97f95a26b235fadaf199d291c98d88d43a.tar.gz
scummvm-rg350-edaaca97f95a26b235fadaf199d291c98d88d43a.tar.bz2
scummvm-rg350-edaaca97f95a26b235fadaf199d291c98d88d43a.zip
Set up GPL functions properly (the math evaluator now calls the handler if its implemented).
svn-id: r42188
Diffstat (limited to 'engines/draci/script.h')
-rw-r--r--engines/draci/script.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/draci/script.h b/engines/draci/script.h
index 3908b1b660..6259f675a5 100644
--- a/engines/draci/script.h
+++ b/engines/draci/script.h
@@ -44,6 +44,7 @@ enum {
typedef void (Script::* GPLHandler)(Common::Queue<int> &);
typedef int (Script::* GPLOperatorHandler)(int, int);
+typedef int (Script::* GPLFunctionHandler)(int);
/**
* Represents a single command in the GPL scripting language bytecode.
@@ -65,6 +66,11 @@ struct GPL2Operator {
GPLOperatorHandler _handler;
};
+struct GPL2Function {
+ Common::String _name;
+ GPLFunctionHandler _handler;
+};
+
/**
* A convenience data type that holds both the actual bytecode and the
* length of the bytecode. Passed to Script::run().
@@ -89,6 +95,7 @@ private:
/** List of all GPL commands. Initialised in the constructor. */
const GPL2Command *_commandList;
const GPL2Operator *_operatorList;
+ const GPL2Function *_functionList;
void load(Common::Queue<int> &params);
void start(Common::Queue<int> &params);