added two V8 opcodes; more meaningful error message
svn-id: r6269
This commit is contained in:
parent
f167eafee6
commit
2a1e07f3e5
2 changed files with 11 additions and 11 deletions
|
@ -169,7 +169,7 @@ Box *Scumm::getBoxBaseAddr(int box)
|
||||||
return (Box *)(ptr + box * SIZEOF_BOX + 2);
|
return (Box *)(ptr + box * SIZEOF_BOX + 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Scumm::getSpecialBox(int param1, int param2)
|
int Scumm::getSpecialBox(int x, int y)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int numOfBoxes;
|
int numOfBoxes;
|
||||||
|
@ -183,7 +183,7 @@ int Scumm::getSpecialBox(int param1, int param2)
|
||||||
if (!(flag & kBoxInvisible) && (flag & kBoxPlayerOnly))
|
if (!(flag & kBoxInvisible) && (flag & kBoxPlayerOnly))
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
if (checkXYInBoxBounds(i, param1, param2))
|
if (checkXYInBoxBounds(i, x, y))
|
||||||
return (i);
|
return (i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -572,7 +572,7 @@ void Scumm_v8::decodeParseString(int m, int n)
|
||||||
error("decodeParseString: SO_PRINT_MUMBLE");
|
error("decodeParseString: SO_PRINT_MUMBLE");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
error("decodeParseString: default case");
|
error("decodeParseString: default case %d", b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1385,12 +1385,6 @@ void Scumm_v8::o6_kernelSetFunctions()
|
||||||
case 109: // setPaletteShadow
|
case 109: // setPaletteShadow
|
||||||
setupShadowPalette(0, args[1], args[2], args[3], args[4], args[5]);
|
setupShadowPalette(0, args[1], args[2], args[3], args[4], args[5]);
|
||||||
break;
|
break;
|
||||||
case 115: // getWalkBoxAt
|
|
||||||
warning("o6_kernelSetFunctions: getWalkBoxAt (len = %d)", len);
|
|
||||||
break;
|
|
||||||
case 116: // isPointInBox
|
|
||||||
warning("o6_kernelSetFunctions: isPointInBox (len = %d)", len);
|
|
||||||
break;
|
|
||||||
case 118: // blastShadowObject
|
case 118: // blastShadowObject
|
||||||
enqueueObject(args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], 3);
|
enqueueObject(args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], 3);
|
||||||
break;
|
break;
|
||||||
|
@ -1399,7 +1393,7 @@ void Scumm_v8::o6_kernelSetFunctions()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
warning("o6_kernelSetFunctions: default case (len = %d)", len);
|
warning("o6_kernelSetFunctions: default case %d (len = %d)", args[0], len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1410,6 +1404,12 @@ void Scumm_v8::o6_kernelGetFunctions()
|
||||||
int len = getStackList(args, sizeof(args) / sizeof(args[0]));
|
int len = getStackList(args, sizeof(args) / sizeof(args[0]));
|
||||||
|
|
||||||
switch (args[0]) {
|
switch (args[0]) {
|
||||||
|
case 0x73: // getWalkBoxAt
|
||||||
|
push(getSpecialBox(args[1], args[2]));
|
||||||
|
break;
|
||||||
|
case 0x74: // isPointInBox
|
||||||
|
push(checkXYInBoxBounds(args[3], args[1], args[2]));
|
||||||
|
break;
|
||||||
case 0xCE: // getRGBSlot
|
case 0xCE: // getRGBSlot
|
||||||
case 0xD3: // getKeyState
|
case 0xD3: // getKeyState
|
||||||
case 0xD7: // getBox
|
case 0xD7: // getBox
|
||||||
|
@ -1453,7 +1453,7 @@ void Scumm_v8::o6_kernelGetFunctions()
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
error("o6_kernelGetFunctions: default case (len = %d)", len);
|
error("o6_kernelGetFunctions: default case %d (len = %d)", args[0], len);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue