aboutsummaryrefslogtreecommitdiff
path: root/sky/logic.cpp
diff options
context:
space:
mode:
authorRobert Göffringmann2003-06-09 20:41:08 +0000
committerRobert Göffringmann2003-06-09 20:41:08 +0000
commit1f6a8b4fb8f4b6a2ecaec0785684dd3c75feed30 (patch)
tree0c68050c08d1bddcc755e88cca3bfccd68657a9f /sky/logic.cpp
parentd899de98ba7e61337058f19d8dbc5fa8f9bb3326 (diff)
downloadscummvm-rg350-1f6a8b4fb8f4b6a2ecaec0785684dd3c75feed30.tar.gz
scummvm-rg350-1f6a8b4fb8f4b6a2ecaec0785684dd3c75feed30.tar.bz2
scummvm-rg350-1f6a8b4fb8f4b6a2ecaec0785684dd3c75feed30.zip
fixed issue about file decompression.
svn-id: r8421
Diffstat (limited to 'sky/logic.cpp')
-rw-r--r--sky/logic.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/sky/logic.cpp b/sky/logic.cpp
index 1f32ef5dc9..4acc3af93b 100644
--- a/sky/logic.cpp
+++ b/sky/logic.cpp
@@ -1403,6 +1403,11 @@ bool SkyLogic::fnGetTo(uint32 targetPlaceId, uint32 mode, uint32 c) {
return false;
}
uint16 *getToTable = cpt->getToTable;
+ if (!getToTable) {
+ // FIXME: This should never happen
+ warning("Place compact's getToTable is NULL!");
+ return false;
+ }
while (*getToTable != targetPlaceId)
getToTable += 2;
@@ -1500,7 +1505,8 @@ bool SkyLogic::fnAddHuman(uint32 a, uint32 b, uint32 c) {
}
bool SkyLogic::fnAddButtons(uint32 a, uint32 b, uint32 c) {
- error("Stub: fnAddButtons");
+ _scriptVariables[MOUSE_STATUS] |= 4;
+ return true;
}
bool SkyLogic::fnNoButtons(uint32 a, uint32 b, uint32 c) {
@@ -1871,6 +1877,15 @@ bool SkyLogic::fnResetId(uint32 id, uint32 resetBlock, uint32 c) {
Compact *cpt = SkyState::fetchCompact(id);
uint16 *rst = (uint16 *)SkyState::fetchCompact(resetBlock);
+ SkyCompact::jobsworth;
+ if (!cpt) {
+ warning("fnResetId(): Compact %d (id) == NULL\n",id);
+ return true;
+ }
+ if (!rst) {
+ warning("fnResetId(): Compact %d (resetBlock) == NULL\n",resetBlock);
+ return true;
+ }
uint16 off;
while ((off = *rst++) != 0xffff)