Fix an OB1 and typecast. Need to find out cause of invalid object index to begin with..
svn-id: r3738
This commit is contained in:
parent
7d360dde50
commit
4d0c43520f
4 changed files with 8 additions and 12 deletions
|
@ -1294,7 +1294,7 @@ void Scumm::o5_getObjectOwner() {
|
|||
|
||||
void Scumm::o5_getObjectState() {
|
||||
if(_features & GF_SMALL_HEADER) {
|
||||
if((getState(getVarOrDirectWord(0x80)) &0x0F >>4) != getVarOrDirectByte(0x40))
|
||||
if((getState(getVarOrDirectWord(0x80)) &0x0F >>4) != (int)getVarOrDirectByte(0x40))
|
||||
o5_jumpRelative();
|
||||
else
|
||||
ignoreScriptWord();
|
||||
|
@ -1319,6 +1319,7 @@ void Scumm::o5_getVerbEntrypoint() {
|
|||
getResultPos();
|
||||
a = getVarOrDirectWord(0x80);
|
||||
b = getVarOrDirectWord(0x40);
|
||||
|
||||
setResult(getVerbEntrypoint(a, b));
|
||||
}
|
||||
|
||||
|
@ -2377,13 +2378,13 @@ int Scumm::getWordVararg(int16 *ptr) {
|
|||
return i;
|
||||
}
|
||||
|
||||
int Scumm::getVarOrDirectWord(byte mask) {
|
||||
uint Scumm::getVarOrDirectWord(byte mask) {
|
||||
if (_opcode&mask)
|
||||
return readVar(fetchScriptWord());
|
||||
return (int16)fetchScriptWord();
|
||||
return (uint16)fetchScriptWord();
|
||||
}
|
||||
|
||||
int Scumm::getVarOrDirectByte(byte mask) {
|
||||
uint Scumm::getVarOrDirectByte(byte mask) {
|
||||
if (_opcode&mask)
|
||||
return readVar(fetchScriptWord());
|
||||
return fetchScriptByte();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue