SCUMM: Move setResult/getResultPos to script_v5.cpp
svn-id: r52129
This commit is contained in:
parent
eff2623f10
commit
5602b2cf81
2 changed files with 19 additions and 19 deletions
|
@ -377,6 +377,25 @@ int ScummEngine_v5::getVarOrDirectWord(byte mask) {
|
|||
return fetchScriptWordSigned();
|
||||
}
|
||||
|
||||
void ScummEngine_v5::getResultPos() {
|
||||
int a;
|
||||
|
||||
_resultVarNumber = fetchScriptWord();
|
||||
if (_resultVarNumber & 0x2000) {
|
||||
a = fetchScriptWord();
|
||||
if (a & 0x2000) {
|
||||
_resultVarNumber += readVar(a & ~0x2000);
|
||||
} else {
|
||||
_resultVarNumber += a & 0xFFF;
|
||||
}
|
||||
_resultVarNumber &= ~0x2000;
|
||||
}
|
||||
}
|
||||
|
||||
void ScummEngine_v5::setResult(int value) {
|
||||
writeVar(_resultVarNumber, value);
|
||||
}
|
||||
|
||||
void ScummEngine_v5::jumpRelative(bool cond) {
|
||||
// We explicitly call ScummEngine::fetchScriptWord()
|
||||
// to make this method work also in v0, which overloads
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue