diff options
author | Eugene Sandulenko | 2005-07-30 21:11:48 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2005-07-30 21:11:48 +0000 |
commit | 6b4484472b79dc7ea7d1ce545a28fba7d3b7696f (patch) | |
tree | c44c4e61f18ddd537f7082cb48869cf33d422fbd /kyra/script.h | |
parent | 86ab70b149e5cd00cf54f2e41896e2c4e16795e4 (diff) | |
download | scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.tar.gz scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.tar.bz2 scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.zip |
Remove trailing whitespaces.
svn-id: r18604
Diffstat (limited to 'kyra/script.h')
-rw-r--r-- | kyra/script.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/kyra/script.h b/kyra/script.h index 9cfdb48d21..5820a10a08 100644 --- a/kyra/script.h +++ b/kyra/script.h @@ -40,26 +40,26 @@ enum ScriptState { kScriptWaiting = 2, kScriptError = 3 }; - - + + class VMContext { public: VMContext(KyraEngine* engine); ~VMContext() { delete [] _scriptFile; } - + void loadScript(const char* file); - + const char* stringAtIndex(int32 index); - + // TODO: check for 'over'flow - void pushStack(int32 value) { _stack[_stackPos++] = value; } + void pushStack(int32 value) { _stack[_stackPos++] = value; } void registerValue(int32 reg, int32 value) { _registers[reg] = value; } int32 checkReg(int32 reg) { return _registers[reg]; } - + uint32 state(void) { return _scriptState; } - + bool startScript(int32 func); uint32 contScript(void); @@ -67,34 +67,34 @@ protected: KyraEngine* _engine; uint8* _scriptFile; uint32 _scriptFileSize; - + uint32 _scriptState; uint32 _delay; - + int32 _registers[32]; // registers of the interpreter int32 _stack[64]; // our stack - + // TODO: check for 'under'flow int32 popStack(void) { return _stack[--_stackPos]; } int32& topStack(void) { return _stack[_stackPos]; } - + uint32 _returnValue; - + int32 _nextScriptPos; int32 _instructionPos; int32 _stackPos; int32 _tempPos; - + // used by command & opcode procs uint16 _argument; uint8 _currentCommand; uint32 _currentOpcode; - + int32 param(int32 index); const char* paramString(int32 index) { return stringAtIndex(param(index)); } - + bool _error; // used by all command- and opcodefuncs - + enum ScriptChunkTypes { kForm = 0, kEmc2Ordr = 1, @@ -102,13 +102,13 @@ protected: kData = 3, kCountChunkTypes }; - + struct ScriptChunk { uint32 _size; uint8* _data; // by TEXT used for count of texts, by EMC2ODRD it is used for a count of somewhat uint8* _additional; // currently only used for TEXT }; - + ScriptChunk _chunks[kCountChunkTypes]; typedef void (VMContext::*CommandProc)(); @@ -116,18 +116,18 @@ protected: CommandProc proc; const char* desc; }; - + typedef void (VMContext::*OpcodeProc)(); struct OpcodeEntry { OpcodeProc proc; const char* desc; }; - + uint16 _numCommands; const CommandEntry* _commands; uint16 _numOpcodes; const OpcodeEntry* _opcodes; - + protected: // the command procs void c1_goToLine(void); // 0x00 @@ -148,7 +148,7 @@ protected: void c1_negate(void); // 0x10 void c1_evaluate(void); // 0x11 void c1_unknownCommand(void); - + // the opcode procs void o1_0x68(void); // 0x68 void o1_unknownOpcode(void); |