diff options
Diffstat (limited to 'engines/tsage/converse.cpp')
-rw-r--r-- | engines/tsage/converse.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp index 753a835389..9828ca71d4 100644 --- a/engines/tsage/converse.cpp +++ b/engines/tsage/converse.cpp @@ -707,7 +707,7 @@ void StripManager::synchronize(Serializer &s) { for (int i = 0; i < arrSize; ++i) _obj44List[i].synchronize(s); - // Synhcronise script data + // Synchronize script data int scriptSize = _script.size(); s.syncAsUint16LE(scriptSize); if (s.isLoading()) @@ -754,6 +754,9 @@ void StripManager::remove() { if (_onEnd) _onEnd(); + if (g_vm->getGameID() == GType_Ringworld2) + _endHandler = NULL; + Action::remove(); } @@ -855,6 +858,11 @@ void StripManager::signal() { ++obj44Idx; if (_obj44List[obj44Idx]._field16[0]) { + // WORKAROUND: The _lookupList isn't always correctly initialized. But it always + // seems to be set to the R2_GLOBALS._stripManager_lookupList, so manually set it + if (!_lookupList) + _lookupList = R2_GLOBALS._stripManager_lookupList; + int f16Index = _lookupList[_obj44List[obj44Idx]._field16[0] - 1]; listId = _obj44List[obj44Idx]._field16[f16Index]; @@ -865,13 +873,16 @@ void StripManager::signal() { choiceStr = (const char *)&_script[0] + _obj44List[obj44Idx]._list[listIdx]._scriptOffset; } else { - for (int listIdx = 0; listIdx < OBJ0A_LIST_SIZE; ++listIdx) { + for (int listIdx = idx; listIdx < (OBJ0A_LIST_SIZE - 1); ++listIdx) { obj44._list[listIdx]._id = obj44._list[listIdx + 1]._id; obj44._list[listIdx]._scriptOffset = obj44._list[listIdx + 1]._scriptOffset; if (!obj44._list[listIdx + 1]._id) obj44._list[listIdx]._id = 0; } + + --idx; + continue; } } } |