aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actor.cpp2
-rw-r--r--script_v1.cpp5
-rw-r--r--simon/simon.cpp3
3 files changed, 8 insertions, 2 deletions
diff --git a/actor.cpp b/actor.cpp
index 902425b9e9..7bdf8230da 100644
--- a/actor.cpp
+++ b/actor.cpp
@@ -1306,7 +1306,7 @@ void Scumm::setupShadowPalette(int slot, int rfact, int gfact, int bfact,
curpal = _currentPalette + from * 3;
num = to - from + 1;
do {
- *table++ = remapPaletteColor(curpal[0] * rfact >> 8,
+ *table++ = remapPaletteColor((curpal[0] * rfact) >> 8,
curpal[1] * gfact >> 8,
curpal[2] * bfact >> 8, (uint) - 1);
curpal += 3;
diff --git a/script_v1.cpp b/script_v1.cpp
index 70a594b6c8..ceb35f3e6a 100644
--- a/script_v1.cpp
+++ b/script_v1.cpp
@@ -1445,7 +1445,7 @@ void Scumm::o5_getVerbEntrypoint()
void Scumm::o5_ifClassOfIs()
{
- int act, cls, b;
+ int act, cls, b = 0;
bool cond = true;
act = getVarOrDirectWord(0x80);
@@ -1454,6 +1454,8 @@ void Scumm::o5_ifClassOfIs()
cls = getVarOrDirectWord(0x80);
if (cls)
b = getClass(act, cls);
+ else
+ error("FIXME! Ender forgot why he added this.");
if (cls & 0x80 && !b || !(cls & 0x80) && b)
cond = false;
@@ -1984,6 +1986,7 @@ void Scumm::o5_roomOps()
_opcode = fetchScriptByte();
e = getVarOrDirectByte(0x40);
setScaleItem(e - 1, b, a, d, c);
+ break;
case 8: /* room scale? */
if (_features & GF_SMALL_HEADER) {
if (!(_features & GF_OLD256)) {
diff --git a/simon/simon.cpp b/simon/simon.cpp
index add8f42bb5..ce05f73b66 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -427,6 +427,9 @@ byte *SimonState::readSingleOpcode(FILE *in, byte *ptr) {
i = 0;
string_ptr = table[*ptr++];
+ if (!string_ptr)
+ error("Unable to locate opcode table. Perhaps you are using the wrong game target?");
+
for(;;) {
if (string_ptr[i] == ' ')
return ptr;