aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/features.cpp3
-rw-r--r--engines/sci/engine/features.h3
-rw-r--r--engines/sci/engine/gc.cpp3
-rw-r--r--engines/sci/engine/gc.h3
-rw-r--r--engines/sci/engine/kernel.cpp3
-rw-r--r--engines/sci/engine/kernel.h3
-rw-r--r--engines/sci/engine/kernel_tables.h3
-rw-r--r--engines/sci/engine/kevent.cpp3
-rw-r--r--engines/sci/engine/kfile.cpp5
-rw-r--r--engines/sci/engine/kgraphics.cpp24
-rw-r--r--engines/sci/engine/klists.cpp3
-rw-r--r--engines/sci/engine/kmath.cpp3
-rw-r--r--engines/sci/engine/kmenu.cpp3
-rw-r--r--engines/sci/engine/kmisc.cpp3
-rw-r--r--engines/sci/engine/kmovement.cpp3
-rw-r--r--engines/sci/engine/kparse.cpp3
-rw-r--r--engines/sci/engine/kpathing.cpp97
-rw-r--r--engines/sci/engine/kscripts.cpp9
-rw-r--r--engines/sci/engine/ksound.cpp3
-rw-r--r--engines/sci/engine/kstring.cpp6
-rw-r--r--engines/sci/engine/kvideo.cpp3
-rw-r--r--engines/sci/engine/message.cpp3
-rw-r--r--engines/sci/engine/message.h3
-rw-r--r--engines/sci/engine/object.cpp7
-rw-r--r--engines/sci/engine/object.h5
-rw-r--r--engines/sci/engine/savegame.cpp3
-rw-r--r--engines/sci/engine/savegame.h3
-rw-r--r--engines/sci/engine/script.cpp23
-rw-r--r--engines/sci/engine/script.h15
-rw-r--r--engines/sci/engine/script_patches.cpp45
-rw-r--r--engines/sci/engine/scriptdebug.cpp10
-rw-r--r--engines/sci/engine/seg_manager.cpp11
-rw-r--r--engines/sci/engine/seg_manager.h5
-rw-r--r--engines/sci/engine/segment.cpp3
-rw-r--r--engines/sci/engine/segment.h5
-rw-r--r--engines/sci/engine/selector.cpp3
-rw-r--r--engines/sci/engine/selector.h5
-rw-r--r--engines/sci/engine/state.cpp3
-rw-r--r--engines/sci/engine/state.h3
-rw-r--r--engines/sci/engine/static_selectors.cpp3
-rw-r--r--engines/sci/engine/vm.cpp5
-rw-r--r--engines/sci/engine/vm.h3
-rw-r--r--engines/sci/engine/vm_types.cpp3
-rw-r--r--engines/sci/engine/vm_types.h3
-rw-r--r--engines/sci/engine/workarounds.cpp8
-rw-r--r--engines/sci/engine/workarounds.h3
46 files changed, 116 insertions, 256 deletions
diff --git a/engines/sci/engine/features.cpp b/engines/sci/engine/features.cpp
index 964097f57d..a5c1b970f1 100644
--- a/engines/sci/engine/features.cpp
+++ b/engines/sci/engine/features.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/engine/features.h"
diff --git a/engines/sci/engine/features.h b/engines/sci/engine/features.h
index 8237d43714..07ba626d15 100644
--- a/engines/sci/engine/features.h
+++ b/engines/sci/engine/features.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_INCLUDE_FEATURES_H
diff --git a/engines/sci/engine/gc.cpp b/engines/sci/engine/gc.cpp
index e395eeab94..2d71878bda 100644
--- a/engines/sci/engine/gc.cpp
+++ b/engines/sci/engine/gc.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/engine/gc.h"
diff --git a/engines/sci/engine/gc.h b/engines/sci/engine/gc.h
index 48e1c6b482..97aa6513b6 100644
--- a/engines/sci/engine/gc.h
+++ b/engines/sci/engine/gc.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index ea6fa31d05..8fb6322f55 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 9a55ef630b..68b1601580 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_KERNEL_H
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index 16d56d10a8..31ef64d109 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_KERNEL_TABLES_H
diff --git a/engines/sci/engine/kevent.cpp b/engines/sci/engine/kevent.cpp
index 725b78341b..2cd6b198de 100644
--- a/engines/sci/engine/kevent.cpp
+++ b/engines/sci/engine/kevent.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index 0e2f64257a..ee88d8af15 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/archive.h"
@@ -466,7 +463,7 @@ static int findSavegame(Common::Array<SavegameDesc> &saves, int16 savegameId) {
// The scripts get IDs ranging from 100->199, because the scripts require us to assign unique ids THAT EVEN STAY BETWEEN
// SAVES and the scripts also use "saves-count + 1" to create a new savedgame slot.
// SCI1.1 actually recycles ids, in that case we will currently get "0".
-// This behaviour is required especially for LSL6. In this game, it's possible to quick save. The scripts will use
+// This behavior is required especially for LSL6. In this game, it's possible to quick save. The scripts will use
// the last-used id for that feature. If we don't assign sticky ids, the feature will overwrite different saves all the
// time. And sadly we can't just use the actual filename ids directly, because of the creation method for new slots.
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index c7a2a26c3d..6c96266922 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
@@ -363,10 +360,29 @@ reg_t kTextSize(EngineState *s, int argc, reg_t *argv) {
} else
#endif
g_sci->_gfxText16->kernelTextSize(g_sci->strSplit(text.c_str(), sep).c_str(), font_nr, maxwidth, &textWidth, &textHeight);
-
+
+ // One of the game texts in LB2 German contains loads of spaces in
+ // its end. We trim the text here, otherwise the graphics code will
+ // attempt to draw a very large window (larger than the screen) to
+ // show the text, and crash.
+ // Fixes bug #3306417.
+ if (textWidth >= g_sci->_gfxScreen->getDisplayWidth() ||
+ textHeight >= g_sci->_gfxScreen->getDisplayHeight()) {
+ // TODO: Is this needed for SCI32 as well?
+ if (g_sci->_gfxText16) {
+ warning("kTextSize: string would be too big to fit on screen. Trimming it");
+ text.trim();
+ // Copy over the trimmed string...
+ s->_segMan->strcpy(argv[1], text.c_str());
+ // ...and recalculate bounding box dimensions
+ g_sci->_gfxText16->kernelTextSize(g_sci->strSplit(text.c_str(), sep).c_str(), font_nr, maxwidth, &textWidth, &textHeight);
+ }
+ }
+
debugC(kDebugLevelStrings, "GetTextSize '%s' -> %dx%d", text.c_str(), textWidth, textHeight);
dest[2] = make_reg(0, textHeight);
dest[3] = make_reg(0, textWidth);
+
return s->r_acc;
}
diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp
index 38cd6ef023..68469f5c9a 100644
--- a/engines/sci/engine/klists.cpp
+++ b/engines/sci/engine/klists.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/engine/features.h"
diff --git a/engines/sci/engine/kmath.cpp b/engines/sci/engine/kmath.cpp
index 9baf9f5a54..ef795d7e2f 100644
--- a/engines/sci/engine/kmath.cpp
+++ b/engines/sci/engine/kmath.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/engine/state.h"
diff --git a/engines/sci/engine/kmenu.cpp b/engines/sci/engine/kmenu.cpp
index 3986966a71..02aa1d3ece 100644
--- a/engines/sci/engine/kmenu.cpp
+++ b/engines/sci/engine/kmenu.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index 80425224bf..daed248db1 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp
index f4392df8f2..31715f19d3 100644
--- a/engines/sci/engine/kmovement.cpp
+++ b/engines/sci/engine/kmovement.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
diff --git a/engines/sci/engine/kparse.cpp b/engines/sci/engine/kparse.cpp
index 09cf7744b2..59694cb6ee 100644
--- a/engines/sci/engine/kparse.cpp
+++ b/engines/sci/engine/kparse.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/* String and parser handling */
diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp
index 7786f9b093..8904a48978 100644
--- a/engines/sci/engine/kpathing.cpp
+++ b/engines/sci/engine/kpathing.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
@@ -37,6 +34,8 @@
namespace Sci {
+// TODO: Code cleanup
+
#define AVOIDPATH_DYNMEM_STRING "AvoidPath polyline"
#define POLY_LAST_POINT 0x7777
@@ -1177,7 +1176,6 @@ static void change_polygons_opt_0(PathfindingState *s) {
static PathfindingState *convert_polygon_set(EngineState *s, reg_t poly_list, Common::Point start, Common::Point end, int width, int height, int opt) {
SegManager *segMan = s->_segMan;
Polygon *polygon;
- int err;
int count = 0;
PathfindingState *pf_s = new PathfindingState(width, height);
@@ -1200,50 +1198,53 @@ static PathfindingState *convert_polygon_set(EngineState *s, reg_t poly_list, Co
}
}
- if (opt == 0) {
- Common::Point intersection;
-
- // Keyboard support
- // FIXME: We don't need to dijkstra for keyboard support as we currently do
+ if (opt == 0)
change_polygons_opt_0(pf_s);
- // Find nearest intersection
- err = nearest_intersection(pf_s, start, end, &intersection);
-
- if (err == PF_FATAL) {
- warning("AvoidPath: fatal error finding nearest intersection");
- delete pf_s;
- return NULL;
- }
-
- if (err == PF_OK) {
- // Intersection was found, prepend original start position after pathfinding
- pf_s->_prependPoint = new Common::Point(start);
- // Merge new start point into polygon set
- pf_s->vertex_start = merge_point(pf_s, intersection);
- } else {
- // Otherwise we proceed with the original start point
- pf_s->vertex_start = merge_point(pf_s, start);
- }
- // Merge end point into polygon set
- pf_s->vertex_end = merge_point(pf_s, end);
- } else {
- Common::Point *new_start = fixup_start_point(pf_s, start);
+ Common::Point *new_start = fixup_start_point(pf_s, start);
+
+ if (!new_start) {
+ warning("AvoidPath: Couldn't fixup start position for pathfinding");
+ delete pf_s;
+ return NULL;
+ }
- if (!new_start) {
- warning("AvoidPath: Couldn't fixup start position for pathfinding");
- delete pf_s;
- return NULL;
- }
+ Common::Point *new_end = fixup_end_point(pf_s, end);
+
+ if (!new_end) {
+ warning("AvoidPath: Couldn't fixup end position for pathfinding");
+ delete new_start;
+ delete pf_s;
+ return NULL;
+ }
- Common::Point *new_end = fixup_end_point(pf_s, end);
+ if (opt == 0) {
+ // Keyboard support. Only the first edge of the path we compute
+ // here matches the path returned by SSCI. This is assumed to be
+ // sufficient as all known use cases only use the first two
+ // vertices of the returned path.
+ // Pharkas uses this mode for a secondary polygon set containing
+ // rectangular polygons used to block an actor's path.
+
+ // If we have a prepended point, we do nothing here as the
+ // actor is in barred territory and should be moved outside of
+ // it ASAP. This matches the behavior of SSCI.
+ if (!pf_s->_prependPoint) {
+ // Actor position is OK, find nearest obstacle.
+ int err = nearest_intersection(pf_s, start, *new_end, new_start);
+
+ if (err == PF_FATAL) {
+ warning("AvoidPath: error finding nearest intersection");
+ delete new_start;
+ delete new_end;
+ delete pf_s;
+ return NULL;
+ }
- if (!new_end) {
- warning("AvoidPath: Couldn't fixup end position for pathfinding");
- delete pf_s;
- return NULL;
+ if (err == PF_OK)
+ pf_s->_prependPoint = new Common::Point(start);
}
-
+ } else {
// WORKAROUND LSL5 room 660. Priority glitch due to us choosing a different path
// than SSCI. Happens when Patti walks to the control room.
if (g_sci->getGameId() == GID_LSL5 && (s->currentRoomNumber() == 660) && (Common::Point(67, 131) == *new_start) && (Common::Point(229, 101) == *new_end)) {
@@ -1251,14 +1252,14 @@ static PathfindingState *convert_polygon_set(EngineState *s, reg_t poly_list, Co
pf_s->_prependPoint = new_start;
new_start = new Common::Point(77, 107);
}
+ }
- // Merge start and end points into polygon set
- pf_s->vertex_start = merge_point(pf_s, *new_start);
- pf_s->vertex_end = merge_point(pf_s, *new_end);
+ // Merge start and end points into polygon set
+ pf_s->vertex_start = merge_point(pf_s, *new_start);
+ pf_s->vertex_end = merge_point(pf_s, *new_end);
- delete new_start;
- delete new_end;
- }
+ delete new_start;
+ delete new_end;
// Allocate and build vertex index
pf_s->vertex_index = (Vertex**)malloc(sizeof(Vertex *) * (count + 2));
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp
index b9baa3540a..d83254b2c4 100644
--- a/engines/sci/engine/kscripts.cpp
+++ b/engines/sci/engine/kscripts.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
@@ -49,7 +46,7 @@ reg_t kLoad(EngineState *s, int argc, reg_t *argv) {
}
// Unloads an arbitrary resource of type 'restype' with resource numbber 'resnr'
-// behaviour of this call didn't change between sci0->sci1.1 parameter wise, which means getting called with
+// behavior of this call didn't change between sci0->sci1.1 parameter wise, which means getting called with
// 1 or 3+ parameters is not right according to sierra sci
reg_t kUnLoad(EngineState *s, int argc, reg_t *argv) {
if (argc >= 2) {
@@ -195,7 +192,7 @@ reg_t kDisposeClone(EngineState *s, int argc, reg_t *argv) {
}
// SCI uses this technique to find out, if it's a clone and if it's supposed to get freed
- // At least kq4early relies on this behaviour. The scripts clone "Sound", then set bit 1 manually
+ // At least kq4early relies on this behavior. The scripts clone "Sound", then set bit 1 manually
// and call kDisposeClone later. In that case we may not free it, otherwise we will run into issues
// later, because kIsObject would then return false and Sound object wouldn't get checked.
uint16 infoSelector = object->getInfoSelector().offset;
@@ -262,7 +259,7 @@ reg_t kDisposeScript(EngineState *s, int argc, reg_t *argv) {
SegmentId id = s->_segMan->getScriptSegment(script);
Script *scr = s->_segMan->getScriptIfLoaded(id);
- if (scr) {
+ if (scr && !scr->isMarkedAsDeleted()) {
if (s->_executionStack.back().addr.pc.segment != id)
scr->setLockers(1);
}
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index 7fb6ac296e..33bef58e52 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index e79af70158..c3c10bd2a2 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/* String and parser handling */
@@ -69,8 +66,9 @@ reg_t kStrCpy(EngineState *s, int argc, reg_t *argv) {
s->_segMan->strncpy(argv[0], argv[1], length);
else
s->_segMan->memcpy(argv[0], argv[1], -length);
- } else
+ } else {
s->_segMan->strcpy(argv[0], argv[1]);
+ }
return argv[0];
}
diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp
index a8d4437148..9a60f39c85 100644
--- a/engines/sci/engine/kvideo.cpp
+++ b/engines/sci/engine/kvideo.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "engines/util.h"
diff --git a/engines/sci/engine/message.cpp b/engines/sci/engine/message.cpp
index ff2d96e804..f30f4e923e 100644
--- a/engines/sci/engine/message.cpp
+++ b/engines/sci/engine/message.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sci/engine/message.h b/engines/sci/engine/message.h
index 43ddb29d78..4444ede3bb 100644
--- a/engines/sci/engine/message.h
+++ b/engines/sci/engine/message.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_MESSAGE_H
diff --git a/engines/sci/engine/object.cpp b/engines/sci/engine/object.cpp
index 267ba35e3c..f09f18298a 100644
--- a/engines/sci/engine/object.cpp
+++ b/engines/sci/engine/object.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -61,14 +58,14 @@ void Object::init(byte *buf, reg_t obj_pos, bool initVariables) {
if (getSciVersion() <= SCI_VERSION_1_LATE) {
_variables.resize(READ_LE_UINT16(data + kOffsetSelectorCounter));
- _baseVars = (uint16 *)(_baseObj + _variables.size() * 2);
+ _baseVars = (const uint16 *)(_baseObj + _variables.size() * 2);
_methodCount = READ_LE_UINT16(data + READ_LE_UINT16(data + kOffsetFunctionArea) - 2);
for (int i = 0; i < _methodCount * 2 + 2; ++i) {
_baseMethod.push_back(READ_SCI11ENDIAN_UINT16(data + READ_LE_UINT16(data + kOffsetFunctionArea) + i * 2));
}
} else if (getSciVersion() >= SCI_VERSION_1_1 && getSciVersion() <= SCI_VERSION_2_1) {
_variables.resize(READ_SCI11ENDIAN_UINT16(data + 2));
- _baseVars = (uint16 *)(buf + READ_SCI11ENDIAN_UINT16(data + 4));
+ _baseVars = (const uint16 *)(buf + READ_SCI11ENDIAN_UINT16(data + 4));
_methodCount = READ_SCI11ENDIAN_UINT16(buf + READ_SCI11ENDIAN_UINT16(data + 6));
for (int i = 0; i < _methodCount * 2 + 3; ++i) {
_baseMethod.push_back(READ_SCI11ENDIAN_UINT16(buf + READ_SCI11ENDIAN_UINT16(data + 6) + i * 2));
diff --git a/engines/sci/engine/object.h b/engines/sci/engine/object.h
index 8ae06f2707..80c8e9e83d 100644
--- a/engines/sci/engine/object.h
+++ b/engines/sci/engine/object.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_OBJECT_H
@@ -239,7 +236,7 @@ private:
void initSelectorsSci3(const byte *buf);
const byte *_baseObj; /**< base + object offset within base */
- uint16 *_baseVars; /**< Pointer to the varselector area for this object */
+ const uint16 *_baseVars; /**< Pointer to the varselector area for this object */
Common::Array<uint16> _baseMethod; /**< Pointer to the method selector area for this object */
uint16 *_propertyOffsetsSci3; /**< This is used to enable relocation of property valuesa in SCI3 */
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 43d00ebc15..65b5e602ff 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/stream.h"
diff --git a/engines/sci/engine/savegame.h b/engines/sci/engine/savegame.h
index 778b0bf137..ff5bc5204b 100644
--- a/engines/sci/engine/savegame.h
+++ b/engines/sci/engine/savegame.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_SAVEGAME_H
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp
index 25bf91c3ad..a38aa06bc4 100644
--- a/engines/sci/engine/script.cpp
+++ b/engines/sci/engine/script.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
@@ -383,6 +380,7 @@ void Script::relocateSci3(reg_t block) {
}
void Script::incrementLockers() {
+ assert(!_markedAsDeleted);
_lockers++;
}
@@ -396,6 +394,7 @@ int Script::getLockers() const {
}
void Script::setLockers(int lockers) {
+ assert(lockers == 0 || !_markedAsDeleted);
_lockers = lockers;
}
@@ -493,7 +492,7 @@ SegmentRef Script::dereference(reg_t pointer) {
return ret;
}
-void Script::initialiseLocals(SegManager *segMan) {
+void Script::initializeLocals(SegManager *segMan) {
LocalVariables *locals = segMan->allocLocalsSegment(this);
if (locals) {
if (getSciVersion() > SCI_VERSION_0_EARLY) {
@@ -509,7 +508,7 @@ void Script::initialiseLocals(SegManager *segMan) {
}
}
-void Script::initialiseClasses(SegManager *segMan) {
+void Script::initializeClasses(SegManager *segMan) {
const byte *seeker = 0;
uint16 mult = 0;
@@ -581,7 +580,7 @@ void Script::initialiseClasses(SegManager *segMan) {
}
}
-void Script::initialiseObjectsSci0(SegManager *segMan, SegmentId segmentId) {
+void Script::initializeObjectsSci0(SegManager *segMan, SegmentId segmentId) {
bool oldScriptHeader = (getSciVersion() == SCI_VERSION_0_EARLY);
// We need to make two passes, as the objects in the script might be in the
@@ -633,7 +632,7 @@ void Script::initialiseObjectsSci0(SegManager *segMan, SegmentId segmentId) {
relocateSci0Sci21(make_reg(segmentId, relocationBlock - getBuf() + 4));
}
-void Script::initialiseObjectsSci11(SegManager *segMan, SegmentId segmentId) {
+void Script::initializeObjectsSci11(SegManager *segMan, SegmentId segmentId) {
const byte *seeker = _heapStart + 4 + READ_SCI11ENDIAN_UINT16(_heapStart + 2) * 2;
while (READ_SCI11ENDIAN_UINT16(seeker) == SCRIPT_OBJECT_MAGIC_NUMBER) {
@@ -668,7 +667,7 @@ void Script::initialiseObjectsSci11(SegManager *segMan, SegmentId segmentId) {
relocateSci0Sci21(make_reg(segmentId, READ_SCI11ENDIAN_UINT16(_heapStart)));
}
-void Script::initialiseObjectsSci3(SegManager *segMan, SegmentId segmentId) {
+void Script::initializeObjectsSci3(SegManager *segMan, SegmentId segmentId) {
const byte *seeker = getSci3ObjectsPointer();
while (READ_SCI11ENDIAN_UINT16(seeker) == SCRIPT_OBJECT_MAGIC_NUMBER) {
@@ -682,13 +681,13 @@ void Script::initialiseObjectsSci3(SegManager *segMan, SegmentId segmentId) {
relocateSci3(make_reg(segmentId, 0));
}
-void Script::initialiseObjects(SegManager *segMan, SegmentId segmentId) {
+void Script::initializeObjects(SegManager *segMan, SegmentId segmentId) {
if (getSciVersion() <= SCI_VERSION_1_LATE)
- initialiseObjectsSci0(segMan, segmentId);
+ initializeObjectsSci0(segMan, segmentId);
else if (getSciVersion() >= SCI_VERSION_1_1 && getSciVersion() <= SCI_VERSION_2_1)
- initialiseObjectsSci11(segMan, segmentId);
+ initializeObjectsSci11(segMan, segmentId);
else if (getSciVersion() == SCI_VERSION_3)
- initialiseObjectsSci3(segMan, segmentId);
+ initializeObjectsSci3(segMan, segmentId);
}
reg_t Script::findCanonicAddress(SegManager *segMan, reg_t addr) const {
diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h
index 18d7157747..ff061e0e36 100644
--- a/engines/sci/engine/script.h
+++ b/engines/sci/engine/script.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_SCRIPT_H
@@ -140,20 +137,20 @@ public:
* Initializes the script's local variables
* @param segMan A reference to the segment manager
*/
- void initialiseLocals(SegManager *segMan);
+ void initializeLocals(SegManager *segMan);
/**
* Adds the script's classes to the segment manager's class table
* @param segMan A reference to the segment manager
*/
- void initialiseClasses(SegManager *segMan);
+ void initializeClasses(SegManager *segMan);
/**
* Initializes the script's objects (SCI0)
* @param segMan A reference to the segment manager
* @param segmentId The script's segment id
*/
- void initialiseObjects(SegManager *segMan, SegmentId segmentId);
+ void initializeObjects(SegManager *segMan, SegmentId segmentId);
// script lock operations
@@ -283,21 +280,21 @@ private:
* @param segMan A reference to the segment manager
* @param segmentId The script's segment id
*/
- void initialiseObjectsSci0(SegManager *segMan, SegmentId segmentId);
+ void initializeObjectsSci0(SegManager *segMan, SegmentId segmentId);
/**
* Initializes the script's objects (SCI1.1 - SCI2.1)
* @param segMan A reference to the segment manager
* @param segmentId The script's segment id
*/
- void initialiseObjectsSci11(SegManager *segMan, SegmentId segmentId);
+ void initializeObjectsSci11(SegManager *segMan, SegmentId segmentId);
/**
* Initializes the script's objects (SCI3)
* @param segMan A reference to the segment manager
* @param segmentId The script's segment id
*/
- void initialiseObjectsSci3(SegManager *segMan, SegmentId segmentId);
+ void initializeObjectsSci3(SegManager *segMan, SegmentId segmentId);
};
} // End of namespace Sci
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 06540e6f43..2d3d8f6155 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
@@ -865,6 +862,7 @@ const byte qfg3DialogCrash[] = {
0x34, 0xe7, 0x03, // ldi 3e7 (999)
0x22, // lt?
0x33, // jmp [back] ---> BUG! Infinite loop
+ 0
};
const uint16 qfg3PatchDialogCrash[] = {
@@ -874,50 +872,9 @@ const uint16 qfg3PatchDialogCrash[] = {
PATCH_END
};
-// Part of script 47 that handles the barter icon checks for the wrong local.
-// The local is supposed to contain the value returned by a previous kDisplay
-// call, but since the wrong one is checked, it contains junk instead. We
-// remove that check here (this doesn't affect the game at all). This occurs
-// when attempting to purchase something from a vendor and the barter button is
-// available (e.g. when buying the robe or meat from the associated vendors).
-// Fixes bug #3292251.
-const byte qfg3BarterCrash[] = {
- 22,
- 0x83, 0x10, // lal 10 ---> BUG! Wrong local
- 0x30, 0x11, 0x00, // bnt 0011 ---> the accumulator will now contain garbage, so this check fails
- 0x35, 0x00, // ldi 00
- 0xa5, 0x00, // sat 00
- 0x39, 0x03, // pushi 03
- 0x5b, 0x04, 0x00, // lea 04 00
- 0x36, // push
- 0x39, 0x6c, // pushi 6c
- 0x8b, 0x10, // lsl 10 ---> local 10 contains garbage, so the call below will fail
- 0x43, 0x1b, 0x06 // callk Display[1b] 06
-};
-
-// Same as above, but for local 0x11
-const byte qfg3BarterCrash2[] = {
- 18,
- 0x83, 0x11, // lal 11 ---> BUG! Wrong local
- 0x30, 0x0d, 0x00, // bnt 000d ---> the accumulator will now contain garbage, so this check fails
- 0x39, 0x03, // pushi 03
- 0x5b, 0x04, 0x00, // lea 04 00
- 0x36, // push
- 0x39, 0x6c, // pushi 6c
- 0x8b, 0x11, // lsl 11 ---> local 11 contains garbage, so the call below will fail
- 0x43, 0x1b, 0x06 // callk Display[1b] 06
-};
-
-const uint16 qfg3PatchBarterCrash[] = {
- 0x35, 0x00, // ldi 00 ---> the accumulator will always be zero, so the problematic code won't run
- PATCH_END
-};
-
// script, description, magic DWORD, adjust
const SciScriptSignature qfg3Signatures[] = {
{ 23, "dialog crash", 1, PATCH_MAGICDWORD(0xe7, 0x03, 0x22, 0x33), -1, qfg3DialogCrash, qfg3PatchDialogCrash },
- { 47, "barter crash", 1, PATCH_MAGICDWORD(0x83, 0x10, 0x30, 0x11), 0, qfg3BarterCrash, qfg3PatchBarterCrash },
- { 47, "barter crash 2", 1, PATCH_MAGICDWORD(0x83, 0x11, 0x30, 0x0d), 0, qfg3BarterCrash2, qfg3PatchBarterCrash },
{ 944, "import dialog continuous calls", 1, PATCH_MAGICDWORD(0x2a, 0x31, 0x0b, 0x7a), -1, qfg3SignatureImportDialog, qfg3PatchImportDialog },
SCI_SIGNATUREENTRY_TERMINATOR
};
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index 596494d61b..16098ab275 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Script debugger functionality. Absolutely not threadsafe.
@@ -34,6 +31,10 @@
namespace Sci {
+// This table is only used for debugging. Don't include it for devices
+// with not enough available memory (e.g. phones), where REDUCE_MEMORY_USAGE
+// is defined
+#ifndef REDUCE_MEMORY_USAGE
const char *opcodeNames[] = {
"bnot", "add", "sub", "mul", "div",
"mod", "shr", "shl", "xor", "and",
@@ -62,6 +63,7 @@ const char *opcodeNames[] = {
"-agi", "-ali", "-ati", "-api", "-sgi",
"-sli", "-sti", "-spi"
};
+#endif // REDUCE_MEMORY_USAGE
// Disassembles one command from the heap, returns address of next command or 0 if a ret was encountered.
reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode) {
@@ -113,7 +115,9 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode
if (printBWTag)
debugN("[%c] ", opsize ? 'B' : 'W');
+#ifndef REDUCE_MEMORY_USAGE
debugN("%s", opcodeNames[opcode]);
+#endif
i = 0;
while (g_opcode_formats[opcode][i]) {
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp
index 0dc245a991..ab67da32db 100644
--- a/engines/sci/engine/seg_manager.cpp
+++ b/engines/sci/engine/seg_manager.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
@@ -1010,9 +1007,9 @@ int SegManager::instantiateScript(int scriptNum) {
scr->init(scriptNum, _resMan);
scr->load(_resMan);
- scr->initialiseLocals(this);
- scr->initialiseClasses(this);
- scr->initialiseObjects(this, segmentId);
+ scr->initializeLocals(this);
+ scr->initializeClasses(this);
+ scr->initializeObjects(this, segmentId);
return segmentId;
}
@@ -1023,7 +1020,7 @@ void SegManager::uninstantiateScript(int script_nr) {
if (!scr || scr->isMarkedAsDeleted()) { // Is it already unloaded?
//warning("unloading script 0x%x requested although not loaded", script_nr);
- // This is perfectly valid SCI behaviour
+ // This is perfectly valid SCI behavior
return;
}
diff --git a/engines/sci/engine/seg_manager.h b/engines/sci/engine/seg_manager.h
index d402afbf1a..ab5aeacabf 100644
--- a/engines/sci/engine/seg_manager.h
+++ b/engines/sci/engine/seg_manager.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_SEGMAN_H
@@ -74,7 +71,7 @@ public:
*/
Script *allocateScript(int script_nr, SegmentId *seg_id);
- // The script must then be initialised; see section (1b.), below.
+ // The script must then be initialized; see section (1b.), below.
/**
* Forcefully deallocate a previously allocated script.
diff --git a/engines/sci/engine/segment.cpp b/engines/sci/engine/segment.cpp
index 2bb77c707a..5d8a81a7f1 100644
--- a/engines/sci/engine/segment.cpp
+++ b/engines/sci/engine/segment.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h
index 947953e8c3..009a2558ce 100644
--- a/engines/sci/engine/segment.h
+++ b/engines/sci/engine/segment.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_SEGMENT_H
@@ -134,7 +131,7 @@ public:
/**
* Iterates over all references reachable from the specified object.
* Used by the garbage collector.
- * @param object object (within the current segment) to analyse
+ * @param object object (within the current segment) to analyze
* @return a list of outgoing references within the object
*
* @note This function may also choose to report numbers (segment 0) as adresses
diff --git a/engines/sci/engine/selector.cpp b/engines/sci/engine/selector.cpp
index 957a836e3e..2edbea9676 100644
--- a/engines/sci/engine/selector.cpp
+++ b/engines/sci/engine/selector.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
diff --git a/engines/sci/engine/selector.h b/engines/sci/engine/selector.h
index 8a47984204..f13c13e00c 100644
--- a/engines/sci/engine/selector.h
+++ b/engines/sci/engine/selector.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_SELECTOR_H
@@ -47,7 +44,7 @@ struct SelectorCache {
Selector underBits; ///< Used by the graphics subroutines to store backupped BG pic data
Selector nsTop, nsLeft, nsBottom, nsRight; ///< View boundaries ('now seen')
Selector lsTop, lsLeft, lsBottom, lsRight; ///< Used by Animate() subfunctions and scroll list controls
- Selector signal; ///< Used by Animate() to control a view's behaviour
+ Selector signal; ///< Used by Animate() to control a view's behavior
Selector illegalBits; ///< Used by CanBeHere
Selector brTop, brLeft, brBottom, brRight; ///< Bounding Rectangle
// name, key, time
diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp
index f9d6c70389..e094ed3bd7 100644
--- a/engines/sci/engine/state.cpp
+++ b/engines/sci/engine/state.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index cd6d56500a..dcffe6dbb3 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_INCLUDE_ENGINE_H
diff --git a/engines/sci/engine/static_selectors.cpp b/engines/sci/engine/static_selectors.cpp
index 23241de330..6526eff2db 100644
--- a/engines/sci/engine/static_selectors.cpp
+++ b/engines/sci/engine/static_selectors.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// We place selector vocab name tables here for any game that doesn't have
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index b441815014..499574957e 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug.h"
@@ -117,7 +114,9 @@ static bool validate_variable(reg_t *r, reg_t *stack_base, int type, int max, in
return true;
}
+#ifndef REDUCE_MEMORY_USAGE
extern const char *opcodeNames[]; // from scriptdebug.cpp
+#endif
static reg_t read_var(EngineState *s, int type, int index) {
if (validate_variable(s->variables[type], s->stack_base, type, s->variablesMax[type], index)) {
diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h
index 5947579aa3..36eadfa1c2 100644
--- a/engines/sci/engine/vm.h
+++ b/engines/sci/engine/vm.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_VM_H
diff --git a/engines/sci/engine/vm_types.cpp b/engines/sci/engine/vm_types.cpp
index e606fa1f86..71a28a9761 100644
--- a/engines/sci/engine/vm_types.cpp
+++ b/engines/sci/engine/vm_types.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
diff --git a/engines/sci/engine/vm_types.h b/engines/sci/engine/vm_types.h
index b927df339e..dc87cf758a 100644
--- a/engines/sci/engine/vm_types.h
+++ b/engines/sci/engine/vm_types.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_VM_TYPES_H
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 20d6cd0dd0..fa25b02a8f 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/engine/kernel.h"
@@ -213,7 +210,10 @@ const SciWorkaroundEntry kDisplay_workarounds[] = {
{ GID_PQ2, 23, 23, 0, "rm23Script", "elements", 0x4ae, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the 2nd page of pate's file - 0x75 as id
{ GID_PQ2, 23, 23, 0, "rm23Script", "elements", 0x4c1, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the 2nd page of pate's file - 0x75 as id (another pq2 version, bug #3043904)
{ GID_QFG1, 11, 11, 0, "battle", "<noname90>", -1, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: When entering battle, 0x75 as id
+ { GID_QFG3, -1, 47, 0, "barterWin", "open", 0x1426, 0, { WORKAROUND_IGNORE, 0 } }, // sometimes when talking with a vendor that can be bartered with, the wrong local variable is checked and the variable contents are wrong - bug #3292251
+ { GID_QFG3, -1, 47, 0, "barterIcon", "show", 0x135c, 0, { WORKAROUND_IGNORE, 0 } }, // sometimes when talking with a vendor that can be bartered with, the wrong local variable is checked and the variable contents are wrong - bug #3292251
{ GID_SQ1, -1, 700, 0, "arcadaRegion", "doit", -1, 0, { WORKAROUND_IGNORE, 0 } }, // restoring in some rooms of the arcada (right at the start)
+ { GID_SQ1, 44, 44, 0, "spinDone", "changeState",0x13b0, 0, { WORKAROUND_IGNORE, 0 } }, // restoring a game at the slot machine in Ulence Flats (bug #3308087)
{ GID_SQ4, 397, 0, 0, "", "export 12", -1, 0, { WORKAROUND_IGNORE, 0 } }, // FLOPPY: when going into the computer store (bug #3044044)
{ GID_SQ4, 391, 391, 0, "doCatalog", "mode", 0x84, 0, { WORKAROUND_IGNORE, 0 } }, // CD: clicking on catalog in roboter sale - a parameter is an object
{ GID_SQ4, 391, 391, 0, "choosePlug", "changeState", -1, 0, { WORKAROUND_IGNORE, 0 } }, // CD: ordering connector in roboter sale - a parameter is an object
@@ -230,7 +230,7 @@ const SciWorkaroundEntry kDirLoop_workarounds[] = {
const SciWorkaroundEntry kDisposeScript_workarounds[] = {
{ GID_LAURABOW, 777, 777, 0, "myStab", "changeState", -1, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: after the will is signed, parameter 0 is an object - bug #3034907
{ GID_QFG1, -1, 64, 0, "rm64", "dispose", -1, 0, { WORKAROUND_IGNORE, 0 } }, // when leaving graveyard, parameter 0 is an object
- { GID_SQ4, 150, 151, 0, "fightScript", "dispose", -1, 0, { WORKAROUND_IGNORE, 0 } }, // during fight with vohaul, parameter 0 is an object
+ { GID_SQ4, 150, 151, 0, "fightScript", "dispose", -1, 0, { WORKAROUND_IGNORE, 0 } }, // during fight with Vohaul, parameter 0 is an object
{ GID_SQ4, 150, 152, 0, "driveCloseUp", "dispose", -1, 0, { WORKAROUND_IGNORE, 0 } }, // when choosing "beam download", parameter 0 is an object
SCI_WORKAROUNDENTRY_TERMINATOR
};
diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h
index c7721aa787..59054ae552 100644
--- a/engines/sci/engine/workarounds.h
+++ b/engines/sci/engine/workarounds.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_WORKAROUNDS_H