aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/script.h
diff options
context:
space:
mode:
authorJohannes Schickel2009-09-30 10:45:14 +0000
committerJohannes Schickel2009-09-30 10:45:14 +0000
commitc9ca057ae2d8d3994aba86bb1ded05e0db008188 (patch)
tree55ec41d9c13bd108b41e28f9642ef24d78e6897b /engines/draci/script.h
parent4477f419034b7c606aef7eb7038337b7229cec33 (diff)
downloadscummvm-rg350-c9ca057ae2d8d3994aba86bb1ded05e0db008188.tar.gz
scummvm-rg350-c9ca057ae2d8d3994aba86bb1ded05e0db008188.tar.bz2
scummvm-rg350-c9ca057ae2d8d3994aba86bb1ded05e0db008188.zip
- Adapt parts of the Draci code to match our code formatting guidelines
- Remove use of tabs for formatting, now in nearly all cases tabs are only used for indentation - Use "uint" instead of "unsigned int" in the whole engine for consistency's sake - Strip some trailing tabs and leading whitespaces svn-id: r44478
Diffstat (limited to 'engines/draci/script.h')
-rw-r--r--engines/draci/script.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/engines/draci/script.h b/engines/draci/script.h
index c594c6241c..fc0dc0cd74 100644
--- a/engines/draci/script.h
+++ b/engines/draci/script.h
@@ -43,14 +43,14 @@ enum {
};
// TODO(spalek): shouldn't modify params passed by reference. Either make it const or copy the parameter.
-typedef void (Script::* GPLHandler)(Common::Queue<int> &);
-typedef int (Script::* GPLOperatorHandler)(int, int) const;
-typedef int (Script::* GPLFunctionHandler)(int) const;
+typedef void (Script::*GPLHandler)(Common::Queue<int> &);
+typedef int (Script::*GPLOperatorHandler)(int, int) const;
+typedef int (Script::*GPLFunctionHandler)(int) const;
/**
* Represents a single command in the GPL scripting language bytecode.
- * Each command is represented in the bytecode by a command number and a
- * subnumber.
+ * Each command is represented in the bytecode by a command number and a
+ * subnumber.
*/
struct GPL2Command {
@@ -76,10 +76,9 @@ struct GPL2Function {
* A convenience data type that holds both the actual bytecode and the
* length of the bytecode. Passed to Script::run().
*/
-
struct GPL2Program {
GPL2Program() : _bytecode(NULL), _length(0) {}
-
+
byte *_bytecode;
uint16 _length;
};
@@ -87,14 +86,13 @@ struct GPL2Program {
class Script {
public:
- Script(DraciEngine *vm) : _vm(vm), _jump(0) { setupCommandList(); };
+ Script(DraciEngine *vm) : _vm(vm), _jump(0) { setupCommandList(); };
int run(const GPL2Program &program, uint16 offset);
bool testExpression(const GPL2Program &program, uint16 offset) const;
void endCurrentProgram();
private:
-
int _jump;
bool _endProgram;
@@ -110,7 +108,7 @@ private:
void start(Common::Queue<int> &params);
void mark(Common::Queue<int> &params);
void release(Common::Queue<int> &params);
- void icoStat(Common::Queue<int> &params);
+ void icoStat(Common::Queue<int> &params);
void objStat(Common::Queue<int> &params);
void objStatOn(Common::Queue<int> &params);
void execInit(Common::Queue<int> &params);
@@ -172,6 +170,6 @@ private:
DraciEngine *_vm;
};
-}
+} // end of namespace Draci
#endif // DRACI_SCRIPT_H