SCUMM: _resultVarNumber and related methods are specific to v0-v5
svn-id: r51974
This commit is contained in:
parent
aa9f9c7e7e
commit
b8ee574e40
4 changed files with 12 additions and 6 deletions
|
@ -708,7 +708,7 @@ void ScummEngine::writeVar(uint var, int value) {
|
|||
error("Illegal varbits (w)");
|
||||
}
|
||||
|
||||
void ScummEngine::getResultPos() {
|
||||
void ScummEngine_v5::getResultPos() {
|
||||
int a;
|
||||
|
||||
_resultVarNumber = fetchScriptWord();
|
||||
|
@ -723,7 +723,7 @@ void ScummEngine::getResultPos() {
|
|||
}
|
||||
}
|
||||
|
||||
void ScummEngine::setResult(int value) {
|
||||
void ScummEngine_v5::setResult(int value) {
|
||||
writeVar(_resultVarNumber, value);
|
||||
}
|
||||
|
||||
|
|
|
@ -214,7 +214,6 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
|
|||
_opcode = 0;
|
||||
vm.numNestedScripts = 0;
|
||||
_lastCodePtr = NULL;
|
||||
_resultVarNumber = 0;
|
||||
_scummStackPos = 0;
|
||||
memset(_vmStack, 0, sizeof(_vmStack));
|
||||
_fileOffset = 0;
|
||||
|
@ -631,6 +630,10 @@ ScummEngine_v5::ScummEngine_v5(OSystem *syst, const DetectorResult &dr)
|
|||
_flashlight.xStrips = 7;
|
||||
_flashlight.yStrips = 7;
|
||||
_flashlight.buffer = NULL;
|
||||
|
||||
memset(_saveLoadVarsFilename, 0, sizeof(_saveLoadVarsFilename));
|
||||
|
||||
_resultVarNumber = 0;
|
||||
}
|
||||
|
||||
ScummEngine_v4::ScummEngine_v4(OSystem *syst, const DetectorResult &dr)
|
||||
|
|
|
@ -689,7 +689,7 @@ protected:
|
|||
const byte *_scriptPointer, *_scriptOrgPointer;
|
||||
byte _opcode, _currentScript;
|
||||
const byte * const *_lastCodePtr;
|
||||
int _resultVarNumber, _scummStackPos;
|
||||
int _scummStackPos;
|
||||
int _vmStack[150];
|
||||
|
||||
OpcodeEntry _opcodes[256];
|
||||
|
@ -745,8 +745,6 @@ protected:
|
|||
int fetchScriptDWordSigned();
|
||||
void ignoreScriptWord() { fetchScriptWord(); }
|
||||
void ignoreScriptByte() { fetchScriptByte(); }
|
||||
virtual void getResultPos();
|
||||
void setResult(int result);
|
||||
void push(int a);
|
||||
int pop();
|
||||
virtual int readVar(uint var);
|
||||
|
|
|
@ -50,6 +50,8 @@ protected:
|
|||
PARAM_3 = 0x20
|
||||
};
|
||||
|
||||
int _resultVarNumber;
|
||||
|
||||
public:
|
||||
ScummEngine_v5(OSystem *syst, const DetectorResult &dr);
|
||||
|
||||
|
@ -77,6 +79,9 @@ protected:
|
|||
virtual int getVarOrDirectByte(byte mask);
|
||||
virtual int getVarOrDirectWord(byte mask);
|
||||
|
||||
virtual void getResultPos();
|
||||
void setResult(int result);
|
||||
|
||||
virtual void animateCursor();
|
||||
|
||||
virtual void setBuiltinCursor(int index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue