[Scummvm-git-logs] scummvm master -> 6d2a8e0c8dee62492db96f782dbc225fbc374ecf
mgerhardy
noreply at scummvm.org
Wed Jul 15 18:03:58 UTC 2026
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
8af60c1316 MACS2: hotspot rendering
0aa6014788 MACS2: fixed duplicated assignment of the same value. PVS-Studio V519
0fd8363005 MACS2: init some struct members, PVS-Studio V730
7545b95ea2 MACS2: merge duplicate opcode decode case branches. PVS-Studio V1037
6d2a8e0c8d MACS2: fixed some missing initializations, PVS-Studio V730
Commit: 8af60c13164481e25308b0dd3b726a4f219e9b1f
https://github.com/scummvm/scummvm/commit/8af60c13164481e25308b0dd3b726a4f219e9b1f
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2026-07-15T20:02:28+02:00
Commit Message:
MACS2: hotspot rendering
the names are currently not translatable - they were constructed from the game
texts - but are not yet part of the po file (scummvm-tools)
Changed paths:
A engines/macs2/hotspot_names.cpp
A engines/macs2/hotspot_names.h
engines/macs2/gameobjects.cpp
engines/macs2/gameobjects.h
engines/macs2/macs2.cpp
engines/macs2/macs2.h
engines/macs2/metaengine.cpp
engines/macs2/module.mk
diff --git a/engines/macs2/gameobjects.cpp b/engines/macs2/gameobjects.cpp
index b902572c8d3..a7451b0a2f6 100644
--- a/engines/macs2/gameobjects.cpp
+++ b/engines/macs2/gameobjects.cpp
@@ -177,7 +177,46 @@ void Macs2::GameObjects::init() {
_objectNames[0x8C] = "Wolle"; // ball of wool
_objectNames[0x8E] = "Holzw\x81rfel";
_objectNames[0x8F] = "Brief";
+
+ // Characters/NPCs - from output-demo strings + Schatz-Demo RESOURCE.MCS dialogue
+ _objectNames[0x06] = "Tramp"; // strings_object006 [0]
+ _objectNames[0x0C] = "Droll"; // scene 28/30 dialogue (Tante Droll)
+ _objectNames[0x0F] = "Cornel"; // scene 5: Cornel Brinkley (obj_0xf)
+ _objectNames[0x13] = "Tramp"; // strings_object019 [0]; tramp henchman
+ _objectNames[0x45] = "Rafter"; // scene 30 dialogue
+ _objectNames[0x4D] = "Tramp"; // scene 5 tramp henchman
+ _objectNames[0x69] = "Wirt"; // scene 28 gatekeeper dialogue
+ _objectNames[0x6E] = "Mrs. Butler"; // strings_object110 [0]
} else {
+ // Characters/NPCs - labels from strings_object*.txt [0] and/or scene dialogue (demacs2)
+ _objectNames[0x01] = "Old Firehand"; // strings_object001 [0]
+ _objectNames[0x02] = "Kapit\xe4n"; // strings_object002 [0-1]
+ _objectNames[0x04] = "Bootsjunge"; // strings_object004 [0]
+ _objectNames[0x06] = "Tramp"; // strings_object006 [0]; tramp henchman
+ _objectNames[0x07] = "M\xe4""dchen"; // strings_object007 [0]
+ _objectNames[0x09] = "Panther"; // strings_object009 (panther scene)
+ _objectNames[0x0C] = "Droll"; // strings_object012 [0]
+ _objectNames[0x0D] = "Patterson"; // strings_object013 [0]
+ _objectNames[0x0F] = "Cornel"; // scene 9: Cornel Brinkley (obj_0xf)
+ _objectNames[0x12] = "Wachposten"; // scene 12 dialogue
+ _objectNames[0x13] = "Tramp"; // strings_object019 [0]; tramp henchman
+ _objectNames[0x16] = "Passagierin"; // scene 2 dialogue
+ _objectNames[0x21] = "Matrose"; // scene 10 dialogue
+ _objectNames[0x27] = "Branshky"; // strings_object039 [0]
+ _objectNames[0x35] = "Dieb"; // scene 24 dialogue
+ _objectNames[0x45] = "Rafter"; // scene 18: "wir sind Rafter"
+ _objectNames[0x4D] = "Tramp"; // tramp henchman, scenes 5/18
+ _objectNames[0x69] = "Wirt"; // scene 28 barkeeper dialogue
+ _objectNames[0x6E] = "Mrs. Butler"; // strings_object110 [0]
+ _objectNames[0x90] = "Bandit"; // scene 29
+ _objectNames[0x91] = "Bandit"; // scene 29
+ _objectNames[0x92] = "Bandit"; // scene 29
+ _objectNames[0x93] = "Winnetou"; // scene 29 dialogue
+ _objectNames[0x95] = "Grosser B\xe4""r"; // scene 45: greeted by Winnetou
+ _objectNames[0xA7] = "Winnetou"; // scene 45 dialogue
+ _objectNames[0xA8] = "Kleiner B\xe4""r"; // scene 45: greeted by Winnetou
+ _objectNames[0xB5] = "Winnetou"; // strings_object181; ending scenes
+
// Full game - verified against strings_object*.txt dumps
_objectNames[0x08] = "Brett"; // board
_objectNames[0x0E] = "Eimer"; // bucket, full of water
@@ -186,7 +225,7 @@ void Macs2::GameObjects::init() {
_objectNames[0x14] = "Eimer"; // bucket, full of water
_objectNames[0x17] = "Hutschachtel"; // hatbox, empty and open
_objectNames[0x18] = "Damenhut"; // lady's hat with veil
- _objectNames[0x19] = "Huzschachtel"; // hatbox, closed
+ _objectNames[0x19] = "Hutschachtel"; // strings_object025 [4]
_objectNames[0x1A] = "Metalleimer"; // metal bucket, empty
_objectNames[0x1B] = "Feuerhaken"; // fire poker
_objectNames[0x1C] = "Topflappen"; // pot holder
@@ -203,10 +242,11 @@ void Macs2::GameObjects::init() {
_objectNames[0x2A] = "Brot"; // bread, stale
_objectNames[0x2B] = "Kuvert"; // envelope, open
_objectNames[0x2C] = "Kuvert"; // envelope, sealed
- _objectNames[0x2D] = "Waschb\x84rfell"; // raccoon fur
+ _objectNames[0x2D] = "Waschb\x84rm\x81tze"; // strings_object045 [0]
_objectNames[0x2E] = "Whiskyglas"; // whisky glass
_objectNames[0x2F] = "Lederg\x81rtel"; // leather belt
_objectNames[0x30] = "Sch\x81rhaken"; // poker
+ _objectNames[0x31] = "Wachhund"; // strings_object049 [0]
_objectNames[0x34] = "Brett"; // board, solid
_objectNames[0x36] = "Vogelk\x84"
"fig"; // birdcage, with bird
@@ -219,10 +259,10 @@ void Macs2::GameObjects::init() {
_objectNames[0x3A] = "Landkarte"; // map
_objectNames[0x3B] = "Kerze"; // candle
_objectNames[0x3C] = "Kieselsteine"; // pebbles
- _objectNames[0x3D] = "Koffer"; // suitcase, full of dynamite
- _objectNames[0x3E] = "Geldscheine"; // banknotes, freshly printed
+ _objectNames[0x3D] = "Koffer"; // strings_object061 [0]
+ _objectNames[0x3E] = "Kleider"; // strings_object062 [0]
_objectNames[0x3F] = "Lederbeutel"; // leather pouch, empty
- _objectNames[0x40] = "Steinschleuder"; // slingshot
+ _objectNames[0x40] = "Knallfr\x94sche"; // strings_object064 [5]
_objectNames[0x41] = "Knallfr\x94sche"; // firecrackers
_objectNames[0x42] = "Koffer"; // suitcase, open
_objectNames[0x43] = "Koffer"; // suitcase, closed
@@ -230,7 +270,7 @@ void Macs2::GameObjects::init() {
_objectNames[0x47] = "Messer"; // knife, rusty
_objectNames[0x48] = "Kartonschachtel"; // cardboard box, open and empty
_objectNames[0x49] = "Kartonschachtel"; // cardboard box
- _objectNames[0x4A] = "Teppich"; // carpet, hand-knotted
+ _objectNames[0x4A] = "Schal"; // strings_object074 [0-1]
_objectNames[0x4B] = "Schilfrohr"; // reeds, dry
_objectNames[0x4C] = "Schilfrohr"; // reeds, straight
_objectNames[0x4F] = "Schnapsflasche"; // liquor bottle
@@ -323,6 +363,33 @@ void Macs2::GameObjects::init() {
}
}
+bool Macs2::GameObjects::isNpcIndex(uint16 objectIndex) {
+ if (objectIndex == 0)
+ return false;
+
+ if (g_engine->isDemo()) {
+ static const uint16 kDemoNpcIndices[] = {
+ 0x06, 0x0C, 0x0F, 0x13, 0x45, 0x4D, 0x69, 0x6E, 0
+ };
+ for (uint i = 0; kDemoNpcIndices[i] != 0; ++i) {
+ if (kDemoNpcIndices[i] == objectIndex)
+ return true;
+ }
+ return false;
+ }
+
+ static const uint16 kFullGameNpcIndices[] = {
+ 0x01, 0x02, 0x04, 0x06, 0x07, 0x09, 0x0C, 0x0D, 0x0F, 0x12, 0x13, 0x16,
+ 0x21, 0x27, 0x35, 0x45, 0x4D, 0x69, 0x6E, 0x90, 0x91, 0x92, 0x93, 0x95,
+ 0xA7, 0xA8, 0xB5, 0
+ };
+ for (uint i = 0; kFullGameNpcIndices[i] != 0; ++i) {
+ if (kFullGameNpcIndices[i] == objectIndex)
+ return true;
+ }
+ return false;
+}
+
Macs2::GameObject *Macs2::GameObjects::getProtagonistObject() {
return instance().getObjectByIndex(1);
}
diff --git a/engines/macs2/gameobjects.h b/engines/macs2/gameobjects.h
index d2c9e025048..6b7c6e6005a 100644
--- a/engines/macs2/gameobjects.h
+++ b/engines/macs2/gameobjects.h
@@ -222,6 +222,9 @@ public:
void init();
+ /** True for character/NPC object indices (not inventory items). */
+ static bool isNpcIndex(uint16 objectIndex);
+
static GameObject *getProtagonistObject();
static GameObject *getObjectByIndex(uint16 index);
diff --git a/engines/macs2/hotspot_names.cpp b/engines/macs2/hotspot_names.cpp
new file mode 100644
index 00000000000..955ca19a803
--- /dev/null
+++ b/engines/macs2/hotspot_names.cpp
@@ -0,0 +1,577 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "macs2/hotspot_names.h"
+#include "macs2/macs2.h"
+
+namespace Macs2 {
+
+struct SceneHotspotNameEntry {
+ uint16 sceneIndex;
+ uint16 hotspotIndex;
+ Graphics::HotspotType type;
+ const char *name;
+};
+
+const SceneHotspotNameEntry kSceneHotspotNames[] = {
+ { 2, 1, Graphics::kHotspotObject, "Wand" },
+ { 2, 2, Graphics::kHotspotObject, "Spiegel" },
+ { 2, 3, Graphics::kHotspotObject, "Schrank" },
+ { 2, 5, Graphics::kHotspotObject, "Tisch" },
+ { 2, 6, Graphics::kHotspotObject, "Bett" },
+ { 2, 7, Graphics::kHotspotObject, "Stuhl" },
+ { 2, 8, Graphics::kHotspotObject, "Raum" },
+ { 2, 9, Graphics::kHotspotObject, "Kaj" "\x81" "te" },
+ { 2, 10, Graphics::kHotspotExit, "T" "\x81" "r" },
+ { 6, 1, Graphics::kHotspotObject, "Wolken" },
+ { 6, 2, Graphics::kHotspotObject, "Berge" },
+ { 6, 4, Graphics::kHotspotObject, "Winde" },
+ { 6, 5, Graphics::kHotspotObject, "Planken" },
+ { 6, 6, Graphics::kHotspotObject, "Brett" },
+ { 6, 7, Graphics::kHotspotObject, "Witterung" },
+ { 6, 8, Graphics::kHotspotExit, "T" "\x81" "r" },
+ { 6, 9, Graphics::kHotspotObject, "Ladung" },
+ { 6, 10, Graphics::kHotspotObject, "Kiste" },
+ { 9, 1, Graphics::kHotspotObject, "Fracht" },
+ { 9, 2, Graphics::kHotspotObject, "Aufbauten" },
+ { 9, 3, Graphics::kHotspotExit, "T" "\x81" "r" },
+ { 9, 5, Graphics::kHotspotObject, "Fenster" },
+ { 9, 6, Graphics::kHotspotObject, "Kahn" },
+ { 10, 1, Graphics::kHotspotObject, "Tintenfass" },
+ { 10, 2, Graphics::kHotspotObject, "Tasse" },
+ { 10, 3, Graphics::kHotspotObject, "Barmann" },
+ { 10, 4, Graphics::kHotspotObject, "Bar" },
+ { 10, 5, Graphics::kHotspotObject, "Raum" },
+ { 10, 6, Graphics::kHotspotObject, "Fenster" },
+ { 10, 7, Graphics::kHotspotObject, "Tapete" },
+ { 10, 8, Graphics::kHotspotObject, "Wand" },
+ { 10, 9, Graphics::kHotspotObject, "Leuchter" },
+ { 10, 10, Graphics::kHotspotObject, "Spiegel" },
+ { 10, 11, Graphics::kHotspotObject, "Verkleidung" },
+ { 10, 12, Graphics::kHotspotObject, "Fenster" },
+ { 12, 1, Graphics::kHotspotObject, "Raum" },
+ { 12, 2, Graphics::kHotspotExit, "Leiter" },
+ { 12, 3, Graphics::kHotspotObject, "Sch" "\x84" "tze" },
+ { 12, 4, Graphics::kHotspotObject, "Heizkessel" },
+ { 12, 5, Graphics::kHotspotObject, "Kohlen" },
+ { 12, 6, Graphics::kHotspotObject, "Kohlen" },
+ { 12, 7, Graphics::kHotspotObject, "Kohlen" },
+ { 12, 8, Graphics::kHotspotObject, "Ofen" },
+ { 12, 10, Graphics::kHotspotExit, "T" "\x81" "r" },
+ { 12, 11, Graphics::kHotspotObject, "Boden" },
+ { 14, 1, Graphics::kHotspotExit, "Kaj" "\x81" "te" },
+ { 14, 2, Graphics::kHotspotExit, "Kabine" },
+ { 14, 3, Graphics::kHotspotObject, "Kabine" },
+ { 14, 4, Graphics::kHotspotObject, "Hund" },
+ { 14, 5, Graphics::kHotspotObject, "Kabine" },
+ { 14, 6, Graphics::kHotspotExit, "Treppe" },
+ { 14, 7, Graphics::kHotspotObject, "Aufbauten" },
+ { 14, 8, Graphics::kHotspotObject, "Bildrand" },
+ { 14, 9, Graphics::kHotspotObject, "Boden" },
+ { 14, 10, Graphics::kHotspotObject, "Gel" "\x84" "nder" },
+ { 14, 11, Graphics::kHotspotObject, "Seil" },
+ { 14, 13, Graphics::kHotspotObject, "Wolken" },
+ { 17, 1, Graphics::kHotspotObject, "Baum" },
+ { 17, 2, Graphics::kHotspotObject, "Felsen" },
+ { 17, 3, Graphics::kHotspotObject, "Kiselsteine" },
+ { 17, 4, Graphics::kHotspotObject, "Schilf" },
+ { 17, 5, Graphics::kHotspotObject, "Baum" },
+ { 17, 6, Graphics::kHotspotObject, "Felsen" },
+ { 17, 7, Graphics::kHotspotObject, "Ruhig" },
+ { 17, 8, Graphics::kHotspotObject, "Fluss" },
+ { 17, 10, Graphics::kHotspotObject, "Himmel" },
+ { 17, 11, Graphics::kHotspotObject, "Busch" },
+ { 17, 12, Graphics::kHotspotObject, "Busch" },
+ { 17, 13, Graphics::kHotspotObject, "Boden" },
+ { 17, 14, Graphics::kHotspotObject, "Weg" },
+ { 18, 2, Graphics::kHotspotObject, "Bl" "\x84" "tterdach" },
+ { 18, 3, Graphics::kHotspotObject, "Felsen" },
+ { 18, 5, Graphics::kHotspotObject, "Ufer" },
+ { 18, 6, Graphics::kHotspotObject, "Stelle" },
+ { 18, 7, Graphics::kHotspotObject, "Deckung" },
+ { 18, 8, Graphics::kHotspotObject, "Lagerfeuer" },
+ { 18, 10, Graphics::kHotspotObject, "Busch" },
+ { 19, 1, Graphics::kHotspotObject, "Wald" },
+ { 19, 2, Graphics::kHotspotObject, "Stein" },
+ { 19, 3, Graphics::kHotspotObject, "Weg" },
+ { 19, 4, Graphics::kHotspotObject, "Wand" },
+ { 19, 6, Graphics::kHotspotObject, "Weg" },
+ { 20, 1, Graphics::kHotspotObject, "Pfad" },
+ { 20, 2, Graphics::kHotspotObject, "Baum" },
+ { 20, 3, Graphics::kHotspotObject, "Rasen" },
+ { 20, 4, Graphics::kHotspotObject, "Pfad" },
+ { 20, 6, Graphics::kHotspotObject, "Fenster" },
+ { 20, 7, Graphics::kHotspotObject, "Holzt" "\x81" "r" },
+ { 20, 8, Graphics::kHotspotObject, "Berge" },
+ { 20, 9, Graphics::kHotspotObject, "W" "\x84" "sche" },
+ { 20, 10, Graphics::kHotspotObject, "Seil" },
+ { 20, 11, Graphics::kHotspotObject, "Baum" },
+ { 20, 12, Graphics::kHotspotObject, "Pfad" },
+ { 21, 1, Graphics::kHotspotObject, "Eichenfass" },
+ { 21, 2, Graphics::kHotspotObject, "Vogelk" "\x84" "fig" },
+ { 21, 3, Graphics::kHotspotObject, "Fenster" },
+ { 21, 4, Graphics::kHotspotObject, "Luke" },
+ { 21, 5, Graphics::kHotspotObject, "Mauer" },
+ { 21, 6, Graphics::kHotspotObject, "Flasche" },
+ { 21, 7, Graphics::kHotspotObject, "Lampe" },
+ { 21, 8, Graphics::kHotspotObject, "Whiskyglas" },
+ { 21, 9, Graphics::kHotspotObject, "Tisch" },
+ { 21, 10, Graphics::kHotspotObject, "Deckel" },
+ { 21, 11, Graphics::kHotspotObject, "Kiste" },
+ { 21, 12, Graphics::kHotspotObject, "Koffer" },
+ { 21, 13, Graphics::kHotspotObject, "Bett" },
+ { 21, 14, Graphics::kHotspotObject, "Raum" },
+ { 21, 15, Graphics::kHotspotObject, "Flasche" },
+ { 22, 1, Graphics::kHotspotObject, "Schrank" },
+ { 22, 2, Graphics::kHotspotObject, "Schrank" },
+ { 22, 3, Graphics::kHotspotObject, "Schrank" },
+ { 22, 4, Graphics::kHotspotExit, "Luke" },
+ { 22, 5, Graphics::kHotspotObject, "Fass" },
+ { 22, 6, Graphics::kHotspotObject, "B" "\x84" "renfell" },
+ { 22, 7, Graphics::kHotspotObject, "Kerze" },
+ { 22, 8, Graphics::kHotspotObject, "Wasserkrug" },
+ { 22, 9, Graphics::kHotspotObject, "Zeug" },
+ { 22, 10, Graphics::kHotspotObject, "Stofftasche" },
+ { 22, 11, Graphics::kHotspotObject, "Seekoffer" },
+ { 22, 12, Graphics::kHotspotObject, "Dach" },
+ { 22, 13, Graphics::kHotspotExit, "Treppe" },
+ { 22, 14, Graphics::kHotspotObject, "Flasche" },
+ { 22, 15, Graphics::kHotspotObject, "Schrank" },
+ { 23, 1, Graphics::kHotspotObject, "Pfad" },
+ { 23, 2, Graphics::kHotspotObject, "Gef" "\x84" "hrt" },
+ { 23, 4, Graphics::kHotspotObject, "Wald" },
+ { 23, 5, Graphics::kHotspotObject, "Lagerfeuer" },
+ { 23, 6, Graphics::kHotspotObject, "Zelt" },
+ { 24, 1, Graphics::kHotspotObject, "Asche" },
+ { 24, 2, Graphics::kHotspotObject, "Steg" },
+ { 24, 3, Graphics::kHotspotObject, "Himmel" },
+ { 24, 4, Graphics::kHotspotObject, "Gebirge" },
+ { 24, 5, Graphics::kHotspotObject, "Ufer" },
+ { 24, 6, Graphics::kHotspotObject, "Fluss" },
+ { 24, 7, Graphics::kHotspotObject, "Baum" },
+ { 24, 8, Graphics::kHotspotObject, "Busch" },
+ { 24, 9, Graphics::kHotspotObject, "Ufer" },
+ { 24, 10, Graphics::kHotspotObject, "Pfad" },
+ { 24, 11, Graphics::kHotspotObject, "Busch" },
+ { 24, 12, Graphics::kHotspotObject, "Pferd" },
+ { 24, 13, Graphics::kHotspotObject, "Stamm" },
+ { 26, 1, Graphics::kHotspotObject, "Busch" },
+ { 26, 2, Graphics::kHotspotObject, "Weg" },
+ { 26, 3, Graphics::kHotspotObject, "Dickicht" },
+ { 26, 4, Graphics::kHotspotObject, "Pfad" },
+ { 26, 6, Graphics::kHotspotObject, "Baum" },
+ { 30, 1, Graphics::kHotspotObject, "Landschaft" },
+ { 30, 2, Graphics::kHotspotObject, "Baum" },
+ { 30, 3, Graphics::kHotspotObject, "Fass" },
+ { 30, 4, Graphics::kHotspotObject, "Pumpe" },
+ { 30, 5, Graphics::kHotspotObject, "Holzscheite" },
+ { 30, 6, Graphics::kHotspotObject, "Mauer" },
+ { 30, 7, Graphics::kHotspotExit, "Treppe" },
+ { 30, 8, Graphics::kHotspotExit, "Leiter" },
+ { 30, 9, Graphics::kHotspotExit, "Holzt" "\x81" "r" },
+ { 30, 10, Graphics::kHotspotObject, "Farm" },
+ { 30, 11, Graphics::kHotspotObject, "Heuwagen" },
+ { 30, 14, Graphics::kHotspotExit, "T" "\x81" "r" },
+ { 30, 16, Graphics::kHotspotObject, "Vorplatz" },
+ { 31, 1, Graphics::kHotspotObject, "Wasser" },
+ { 31, 2, Graphics::kHotspotExit, "Leiter" },
+ { 31, 3, Graphics::kHotspotObject, "Mauer" },
+ { 31, 4, Graphics::kHotspotObject, "Himmel" },
+ { 31, 5, Graphics::kHotspotObject, "Baum" },
+ { 31, 6, Graphics::kHotspotObject, "Landschaft" },
+ { 31, 7, Graphics::kHotspotObject, "Busch" },
+ { 31, 8, Graphics::kHotspotObject, "Winde" },
+ { 31, 9, Graphics::kHotspotObject, "Angreifer" },
+ { 31, 10, Graphics::kHotspotObject, "Treppe" },
+ { 31, 11, Graphics::kHotspotObject, "Mauer" },
+ { 32, 1, Graphics::kHotspotObject, "Holz" },
+ { 32, 2, Graphics::kHotspotExit, "T" "\x81" "r" },
+ { 32, 3, Graphics::kHotspotObject, "Heuwagen" },
+ { 32, 4, Graphics::kHotspotObject, "Haus" },
+ { 32, 6, Graphics::kHotspotObject, "Boden" },
+ { 32, 7, Graphics::kHotspotObject, "Mauer" },
+ { 32, 8, Graphics::kHotspotObject, "Unkraut" },
+ { 32, 10, Graphics::kHotspotObject, "Farm" },
+ { 32, 11, Graphics::kHotspotObject, "Himmel" },
+ { 32, 12, Graphics::kHotspotObject, "Baum" },
+ { 32, 13, Graphics::kHotspotObject, "Fenster" },
+ { 33, 1, Graphics::kHotspotObject, "Mauer" },
+ { 33, 2, Graphics::kHotspotObject, "Eimer" },
+ { 33, 3, Graphics::kHotspotObject, "Pfahl" },
+ { 33, 4, Graphics::kHotspotObject, "Gel" "\x84" "nder" },
+ { 33, 9, Graphics::kHotspotObject, "Mist" },
+ { 33, 10, Graphics::kHotspotObject, "Boden" },
+ { 33, 11, Graphics::kHotspotObject, "Haus" },
+ { 33, 13, Graphics::kHotspotObject, "Mauer" },
+ { 33, 14, Graphics::kHotspotObject, "Unkraut" },
+ { 33, 15, Graphics::kHotspotObject, "Pferdekoppel" },
+ { 33, 16, Graphics::kHotspotObject, "Wolken" },
+ { 34, 1, Graphics::kHotspotObject, "Winde" },
+ { 34, 2, Graphics::kHotspotExit, "Luke" },
+ { 34, 3, Graphics::kHotspotObject, "Mauer" },
+ { 34, 4, Graphics::kHotspotObject, "Ufer" },
+ { 34, 5, Graphics::kHotspotObject, "Ufer" },
+ { 34, 6, Graphics::kHotspotObject, "Holzdach" },
+ { 34, 7, Graphics::kHotspotObject, "Haus" },
+ { 34, 8, Graphics::kHotspotObject, "Fenster" },
+ { 34, 9, Graphics::kHotspotObject, "Kanone" },
+ { 34, 10, Graphics::kHotspotObject, "Stahlkugeln" },
+ { 34, 11, Graphics::kHotspotObject, "Windlicht" },
+ { 35, 1, Graphics::kHotspotObject, "Kamin" },
+ { 35, 2, Graphics::kHotspotObject, "Musketen" },
+ { 35, 3, Graphics::kHotspotExit, "Holzt" "\x81" "r" },
+ { 35, 4, Graphics::kHotspotExit, "Treppe" },
+ { 35, 5, Graphics::kHotspotObject, "Raum" },
+ { 35, 6, Graphics::kHotspotObject, "Tisch" },
+ { 35, 7, Graphics::kHotspotObject, "Holzbank" },
+ { 35, 8, Graphics::kHotspotObject, "Brett" },
+ { 35, 10, Graphics::kHotspotObject, "Lampe" },
+ { 35, 11, Graphics::kHotspotObject, "Landschaft" },
+ { 35, 12, Graphics::kHotspotObject, "Tier" },
+ { 35, 13, Graphics::kHotspotObject, "Mauer" },
+ { 35, 15, Graphics::kHotspotObject, "Spiegel" },
+ { 35, 16, Graphics::kHotspotObject, "Lampe" },
+ { 36, 1, Graphics::kHotspotObject, "Holzt" "\x81" "r" },
+ { 36, 3, Graphics::kHotspotExit, "Treppe" },
+ { 36, 4, Graphics::kHotspotObject, "Schaufel" },
+ { 36, 6, Graphics::kHotspotObject, "Holzfass" },
+ { 36, 7, Graphics::kHotspotObject, "Holzfass" },
+ { 36, 8, Graphics::kHotspotObject, "Eichenfass" },
+ { 36, 10, Graphics::kHotspotObject, "Kiste" },
+ { 36, 11, Graphics::kHotspotObject, "Schleifspuren" },
+ { 36, 13, Graphics::kHotspotObject, "W" "\x84" "nde" },
+ { 36, 14, Graphics::kHotspotObject, "Decke" },
+ { 36, 15, Graphics::kHotspotObject, "Boden" },
+ { 37, 1, Graphics::kHotspotObject, "Planken" },
+ { 37, 2, Graphics::kHotspotObject, "Schrank" },
+ { 37, 3, Graphics::kHotspotObject, "Gusspfannen" },
+ { 37, 4, Graphics::kHotspotObject, "Holztisch" },
+ { 37, 5, Graphics::kHotspotObject, "W" "\x84" "nde" },
+ { 37, 6, Graphics::kHotspotObject, "Gussofen" },
+ { 37, 7, Graphics::kHotspotExit, "T" "\x81" "r" },
+ { 37, 8, Graphics::kHotspotObject, "Teppich" },
+ { 37, 9, Graphics::kHotspotObject, "Flasche" },
+ { 37, 10, Graphics::kHotspotObject, "Tonvase" },
+ { 37, 11, Graphics::kHotspotObject, "Brett" },
+ { 37, 12, Graphics::kHotspotObject, "Sch" "\x81" "ssel" },
+ { 37, 15, Graphics::kHotspotExit, "Holzt" "\x81" "r" },
+ { 38, 1, Graphics::kHotspotObject, "Schrank" },
+ { 38, 2, Graphics::kHotspotObject, "Kiste" },
+ { 38, 3, Graphics::kHotspotObject, "Schublade" },
+ { 38, 4, Graphics::kHotspotObject, "Bildrahmen" },
+ { 38, 5, Graphics::kHotspotObject, "Teddyb" "\x84" "r" },
+ { 38, 6, Graphics::kHotspotObject, "Bild" },
+ { 38, 7, Graphics::kHotspotObject, "Wand" },
+ { 38, 8, Graphics::kHotspotObject, "Stuhl" },
+ { 38, 9, Graphics::kHotspotObject, "Bett" },
+ { 38, 10, Graphics::kHotspotObject, "Schlange" },
+ { 38, 11, Graphics::kHotspotObject, "Holzpferd" },
+ { 38, 12, Graphics::kHotspotObject, "Spielkl" "\x94" "tze" },
+ { 38, 13, Graphics::kHotspotObject, "Holzeier" },
+ { 38, 14, Graphics::kHotspotObject, "Boden" },
+ { 38, 15, Graphics::kHotspotObject, "Holzt" "\x81" "r" },
+ { 39, 1, Graphics::kHotspotObject, "Luke" },
+ { 39, 3, Graphics::kHotspotObject, "Hackenspitze" },
+ { 39, 4, Graphics::kHotspotObject, "Boden" },
+ { 39, 5, Graphics::kHotspotExit, "Hanfseil" },
+ { 39, 6, Graphics::kHotspotObject, "Fluss" },
+ { 39, 7, Graphics::kHotspotObject, "Felsen" },
+ { 39, 8, Graphics::kHotspotObject, "Fluss" },
+ { 46, 1, Graphics::kHotspotObject, "Ger" "\x94" "ll" },
+ { 46, 2, Graphics::kHotspotObject, "Dynamit" },
+ { 46, 3, Graphics::kHotspotObject, "Wand" },
+ { 46, 4, Graphics::kHotspotObject, "Leiter" },
+ { 46, 5, Graphics::kHotspotObject, "Boden" },
+ { 46, 6, Graphics::kHotspotObject, "Felsbl" "\x94" "cke" },
+ { 46, 7, Graphics::kHotspotObject, "Steine" },
+ { 46, 8, Graphics::kHotspotObject, "Schienen" },
+ { 46, 9, Graphics::kHotspotObject, "Bohlen" },
+ { 46, 10, Graphics::kHotspotObject, "Konstruktion" },
+ { 46, 11, Graphics::kHotspotExit, "Eingang" },
+ { 46, 12, Graphics::kHotspotObject, "Gras" },
+ { 46, 13, Graphics::kHotspotObject, "Landschaft" },
+ { 47, 1, Graphics::kHotspotObject, "Beutel" },
+ { 47, 2, Graphics::kHotspotObject, "Boden" },
+ { 47, 3, Graphics::kHotspotObject, "Wand" },
+ { 47, 4, Graphics::kHotspotExit, "Felswand" },
+ { 47, 6, Graphics::kHotspotObject, "Felsbl" "\x94" "cke" },
+ { 47, 7, Graphics::kHotspotObject, "Schienen" },
+ { 47, 8, Graphics::kHotspotObject, "Bohlen" },
+ { 47, 9, Graphics::kHotspotExit, "Eingang" },
+ { 47, 10, Graphics::kHotspotExit, "Eingang" },
+ { 47, 11, Graphics::kHotspotObject, "Gras" },
+ { 47, 12, Graphics::kHotspotExit, "Eingang" },
+ { 47, 13, Graphics::kHotspotObject, "Landschaft" },
+ { 48, 1, Graphics::kHotspotObject, "Felsen" },
+ { 48, 2, Graphics::kHotspotObject, "St" "\x81" "tze" },
+ { 48, 3, Graphics::kHotspotObject, "St" "\x81" "tze" },
+ { 48, 5, Graphics::kHotspotObject, "Lore" },
+ { 48, 6, Graphics::kHotspotObject, "Schienen" },
+ { 48, 7, Graphics::kHotspotObject, "Bohlen" },
+ { 48, 8, Graphics::kHotspotObject, "Steine" },
+ { 48, 9, Graphics::kHotspotObject, "Boden" },
+ { 48, 11, Graphics::kHotspotObject, "Felswand" },
+ { 48, 13, Graphics::kHotspotObject, "Konstruktion" },
+ { 49, 1, Graphics::kHotspotObject, "St" "\x81" "tze" },
+ { 49, 2, Graphics::kHotspotObject, "Felsen" },
+ { 49, 3, Graphics::kHotspotObject, "H" "\x81" "tte" },
+ { 49, 4, Graphics::kHotspotObject, "Felsen" },
+ { 49, 6, Graphics::kHotspotObject, "Bohlen" },
+ { 49, 8, Graphics::kHotspotObject, "Boden" },
+ { 49, 9, Graphics::kHotspotObject, "Bohlen" },
+ { 49, 10, Graphics::kHotspotObject, "St" "\x81" "tze" },
+ { 49, 11, Graphics::kHotspotObject, "Brett" },
+ { 49, 12, Graphics::kHotspotObject, "H" "\x81" "tte" },
+ { 49, 13, Graphics::kHotspotObject, "Brecheisen" },
+ { 50, 1, Graphics::kHotspotObject, "St" "\x81" "tze" },
+ { 50, 2, Graphics::kHotspotObject, "Felsen" },
+ { 50, 3, Graphics::kHotspotObject, "H" "\x81" "tte" },
+ { 50, 4, Graphics::kHotspotObject, "Brett" },
+ { 50, 6, Graphics::kHotspotObject, "Brecheisen" },
+ { 50, 9, Graphics::kHotspotObject, "Bohlen" },
+ { 50, 10, Graphics::kHotspotObject, "Mauer" },
+ { 50, 12, Graphics::kHotspotObject, "Balken" },
+ { 50, 13, Graphics::kHotspotObject, "St" "\x81" "tze" },
+ { 50, 14, Graphics::kHotspotObject, "Boden" },
+ { 50, 15, Graphics::kHotspotObject, "St" "\x81" "ck" },
+ { 51, 1, Graphics::kHotspotObject, "Raum" },
+ { 51, 2, Graphics::kHotspotObject, "Kiste" },
+ { 51, 3, Graphics::kHotspotObject, "Dynamit" },
+ { 51, 4, Graphics::kHotspotObject, "Balken" },
+ { 51, 5, Graphics::kHotspotObject, "Ger" "\x94" "ll" },
+ { 51, 6, Graphics::kHotspotObject, "Mine" },
+ { 51, 8, Graphics::kHotspotObject, "Boden" },
+ { 52, 1, Graphics::kHotspotObject, "St" "\x81" "tze" },
+ { 52, 2, Graphics::kHotspotExit, "Eingang" },
+ { 52, 3, Graphics::kHotspotObject, "Balken" },
+ { 52, 4, Graphics::kHotspotObject, "Balken" },
+ { 52, 5, Graphics::kHotspotObject, "Balken" },
+ { 52, 6, Graphics::kHotspotObject, "Balken" },
+ { 52, 7, Graphics::kHotspotExit, "Ausgang" },
+ { 52, 9, Graphics::kHotspotObject, "Boden" },
+ { 52, 10, Graphics::kHotspotObject, "Raum" },
+ { 53, 1, Graphics::kHotspotExit, "Treppe" },
+ { 53, 2, Graphics::kHotspotObject, "Totempfahl" },
+ { 53, 3, Graphics::kHotspotObject, "Kopf" },
+ { 53, 4, Graphics::kHotspotObject, "Loch" },
+ { 53, 5, Graphics::kHotspotExit, "Gang" },
+ { 53, 6, Graphics::kHotspotObject, "Fackel" },
+ { 53, 7, Graphics::kHotspotObject, "Sch" "\x84" "del" },
+ { 53, 8, Graphics::kHotspotObject, "Raum" },
+ { 53, 9, Graphics::kHotspotExit, "Gang" },
+ { 54, 1, Graphics::kHotspotObject, "Kopf" },
+ { 54, 4, Graphics::kHotspotObject, "Totempfahl" },
+ { 54, 5, Graphics::kHotspotExit, "Loch" },
+ { 54, 6, Graphics::kHotspotExit, "Treppe" },
+ { 54, 7, Graphics::kHotspotObject, "Fackel" },
+ { 54, 8, Graphics::kHotspotObject, "Raum" },
+ { 54, 9, Graphics::kHotspotExit, "Gang" },
+ { 54, 10, Graphics::kHotspotObject, "Sch" "\x84" "del" },
+ { 54, 11, Graphics::kHotspotExit, "Gang" },
+ { 55, 1, Graphics::kHotspotObject, "Steinpyramide" },
+ { 55, 2, Graphics::kHotspotObject, "Emblem" },
+ { 55, 3, Graphics::kHotspotObject, "Gegenstand" },
+ { 55, 4, Graphics::kHotspotObject, "Gegenstand" },
+ { 55, 5, Graphics::kHotspotObject, "Steins" "\x84" "ule" },
+ { 55, 6, Graphics::kHotspotObject, "Steins" "\x84" "ule" },
+ { 55, 7, Graphics::kHotspotObject, "Kachel" },
+ { 55, 8, Graphics::kHotspotExit, "Treppe" },
+ { 55, 9, Graphics::kHotspotExit, "Treppe" },
+ { 55, 10, Graphics::kHotspotExit, "Treppe" },
+ { 55, 15, Graphics::kHotspotObject, "Vertiefungen" },
+ { 55, 16, Graphics::kHotspotExit, "Steins" "\x84" "ule" },
+ { 56, 2, Graphics::kHotspotExit, "Raum" },
+ { 57, 1, Graphics::kHotspotObject, "Gangsystem" },
+ { 57, 2, Graphics::kHotspotObject, "Boden" },
+ { 57, 3, Graphics::kHotspotObject, "Abgrund" },
+ { 57, 4, Graphics::kHotspotObject, "Pf" "\x81" "tze" },
+ { 57, 5, Graphics::kHotspotObject, "Plattform" },
+ { 57, 6, Graphics::kHotspotExit, "Treppe" },
+ { 57, 10, Graphics::kHotspotObject, "S" "\x84" "ulen" },
+ { 57, 11, Graphics::kHotspotObject, "Felsen" },
+ { 57, 12, Graphics::kHotspotObject, "Br" "\x81" "cke" },
+ { 58, 1, Graphics::kHotspotObject, "Gew" "\x94" "lbe" },
+ { 58, 2, Graphics::kHotspotExit, "Gang" },
+ { 58, 3, Graphics::kHotspotObject, "Boden" },
+ { 58, 4, Graphics::kHotspotObject, "Felsen" },
+ { 59, 2, Graphics::kHotspotObject, "Kiste" },
+ { 59, 4, Graphics::kHotspotExit, "Steint" "\x81" "r" },
+ { 59, 5, Graphics::kHotspotObject, "Kammer" },
+ { 59, 6, Graphics::kHotspotObject, "Boden" },
+ { 59, 7, Graphics::kHotspotObject, "Truhe" },
+ { 59, 8, Graphics::kHotspotObject, "Kiste" },
+ { 59, 11, Graphics::kHotspotObject, "Emblem" },
+ { 59, 12, Graphics::kHotspotObject, "Speer" },
+ { 60, 1, Graphics::kHotspotObject, "Winde" },
+ { 60, 2, Graphics::kHotspotObject, "H" "\x81" "tte" },
+ { 60, 3, Graphics::kHotspotObject, "See" },
+ { 60, 4, Graphics::kHotspotObject, "Plateau" },
+ { 60, 5, Graphics::kHotspotObject, "Steine" },
+ { 60, 6, Graphics::kHotspotObject, "Fr" "\x81" "chte" },
+ { 60, 7, Graphics::kHotspotObject, "M" "\x94" "glichkeit" },
+ { 60, 8, Graphics::kHotspotObject, "See" },
+ { 60, 9, Graphics::kHotspotObject, "Damm" },
+ { 60, 10, Graphics::kHotspotObject, "Berge" },
+ { 60, 11, Graphics::kHotspotObject, "Schleier" },
+ { 60, 12, Graphics::kHotspotObject, "Insel" },
+ { 60, 13, Graphics::kHotspotObject, "See" },
+};
+
+const SceneHotspotNameEntry kSceneHotspotNamesDemo[] = {
+ { 30, 1, Graphics::kHotspotObject, "Landschaft" },
+ { 30, 2, Graphics::kHotspotObject, "Baum" },
+ { 30, 3, Graphics::kHotspotObject, "Fass" },
+ { 30, 4, Graphics::kHotspotObject, "Pumpe" },
+ { 30, 5, Graphics::kHotspotObject, "Holzscheite" },
+ { 30, 6, Graphics::kHotspotObject, "Mauer" },
+ { 30, 7, Graphics::kHotspotExit, "Treppe" },
+ { 30, 8, Graphics::kHotspotExit, "Leiter" },
+ { 30, 9, Graphics::kHotspotExit, "Holzt" "\x81" "r" },
+ { 30, 10, Graphics::kHotspotObject, "Farm" },
+ { 30, 11, Graphics::kHotspotObject, "Heuwagen" },
+ { 30, 14, Graphics::kHotspotExit, "T" "\x81" "r" },
+ { 30, 16, Graphics::kHotspotObject, "Vorplatz" },
+ { 31, 1, Graphics::kHotspotObject, "Wasser" },
+ { 31, 2, Graphics::kHotspotExit, "Leiter" },
+ { 31, 3, Graphics::kHotspotObject, "Mauer" },
+ { 31, 4, Graphics::kHotspotObject, "Himmel" },
+ { 31, 5, Graphics::kHotspotObject, "Baum" },
+ { 31, 6, Graphics::kHotspotObject, "Landschaft" },
+ { 31, 7, Graphics::kHotspotObject, "Busch" },
+ { 31, 8, Graphics::kHotspotObject, "Winde" },
+ { 31, 9, Graphics::kHotspotObject, "Angreifer" },
+ { 31, 10, Graphics::kHotspotObject, "Treppe" },
+ { 31, 11, Graphics::kHotspotObject, "Mauer" },
+ { 32, 1, Graphics::kHotspotObject, "Holz" },
+ { 32, 2, Graphics::kHotspotExit, "T" "\x81" "r" },
+ { 32, 3, Graphics::kHotspotObject, "Heuwagen" },
+ { 32, 4, Graphics::kHotspotObject, "Haus" },
+ { 32, 6, Graphics::kHotspotObject, "Boden" },
+ { 32, 7, Graphics::kHotspotObject, "Mauer" },
+ { 32, 8, Graphics::kHotspotObject, "Unkraut" },
+ { 32, 10, Graphics::kHotspotObject, "Farm" },
+ { 32, 11, Graphics::kHotspotObject, "Himmel" },
+ { 32, 12, Graphics::kHotspotObject, "Baum" },
+ { 32, 13, Graphics::kHotspotObject, "Fenster" },
+ { 33, 1, Graphics::kHotspotObject, "Mauer" },
+ { 33, 2, Graphics::kHotspotObject, "Eimer" },
+ { 33, 3, Graphics::kHotspotObject, "Pfahl" },
+ { 33, 4, Graphics::kHotspotObject, "Gel" "\x84" "nder" },
+ { 33, 9, Graphics::kHotspotObject, "Mist" },
+ { 33, 10, Graphics::kHotspotObject, "Boden" },
+ { 33, 11, Graphics::kHotspotObject, "Haus" },
+ { 33, 13, Graphics::kHotspotObject, "Mauer" },
+ { 33, 14, Graphics::kHotspotObject, "Unkraut" },
+ { 33, 15, Graphics::kHotspotObject, "Pferdekoppel" },
+ { 33, 16, Graphics::kHotspotObject, "Wolken" },
+ { 35, 1, Graphics::kHotspotObject, "Kamin" },
+ { 35, 2, Graphics::kHotspotObject, "Musketen" },
+ { 35, 3, Graphics::kHotspotExit, "Holzt" "\x81" "r" },
+ { 35, 4, Graphics::kHotspotExit, "Treppe" },
+ { 35, 5, Graphics::kHotspotObject, "Raum" },
+ { 35, 6, Graphics::kHotspotObject, "Tisch" },
+ { 35, 7, Graphics::kHotspotObject, "Holzbank" },
+ { 35, 8, Graphics::kHotspotObject, "Brett" },
+ { 35, 10, Graphics::kHotspotObject, "Lampe" },
+ { 35, 11, Graphics::kHotspotObject, "Landschaft" },
+ { 35, 12, Graphics::kHotspotObject, "Tier" },
+ { 35, 13, Graphics::kHotspotObject, "Mauer" },
+ { 35, 15, Graphics::kHotspotObject, "Spiegel" },
+ { 35, 16, Graphics::kHotspotObject, "Lampe" },
+ { 36, 1, Graphics::kHotspotObject, "Holzt" "\x81" "r" },
+ { 36, 3, Graphics::kHotspotExit, "Treppe" },
+ { 36, 4, Graphics::kHotspotObject, "Schaufel" },
+ { 36, 6, Graphics::kHotspotObject, "Holzfass" },
+ { 36, 7, Graphics::kHotspotObject, "Holzfass" },
+ { 36, 8, Graphics::kHotspotObject, "Eichenfass" },
+ { 36, 10, Graphics::kHotspotObject, "Kiste" },
+ { 36, 11, Graphics::kHotspotObject, "Schleifspuren" },
+ { 36, 13, Graphics::kHotspotObject, "W" "\x84" "nde" },
+ { 36, 14, Graphics::kHotspotObject, "Decke" },
+ { 36, 15, Graphics::kHotspotObject, "Boden" },
+ { 37, 1, Graphics::kHotspotObject, "Planken" },
+ { 37, 2, Graphics::kHotspotObject, "Schrank" },
+ { 37, 3, Graphics::kHotspotObject, "Gusspfannen" },
+ { 37, 4, Graphics::kHotspotObject, "Holztisch" },
+ { 37, 5, Graphics::kHotspotObject, "W" "\x84" "nde" },
+ { 37, 6, Graphics::kHotspotObject, "Gussofen" },
+ { 37, 7, Graphics::kHotspotExit, "T" "\x81" "r" },
+ { 37, 8, Graphics::kHotspotObject, "Teppich" },
+ { 37, 9, Graphics::kHotspotObject, "Flasche" },
+ { 37, 10, Graphics::kHotspotObject, "Tonvase" },
+ { 37, 11, Graphics::kHotspotObject, "Brett" },
+ { 37, 12, Graphics::kHotspotObject, "Sch" "\x81" "ssel" },
+ { 37, 15, Graphics::kHotspotExit, "Holzt" "\x81" "r" },
+ { 38, 1, Graphics::kHotspotObject, "Schrank" },
+ { 38, 2, Graphics::kHotspotObject, "Kiste" },
+ { 38, 3, Graphics::kHotspotObject, "Schublade" },
+ { 38, 4, Graphics::kHotspotObject, "Bildrahmen" },
+ { 38, 5, Graphics::kHotspotObject, "Teddyb" "\x84" "r" },
+ { 38, 6, Graphics::kHotspotObject, "Bild" },
+ { 38, 7, Graphics::kHotspotObject, "Wand" },
+ { 38, 8, Graphics::kHotspotObject, "Stuhl" },
+ { 38, 9, Graphics::kHotspotObject, "Bett" },
+ { 38, 10, Graphics::kHotspotObject, "Schlange" },
+ { 38, 11, Graphics::kHotspotObject, "Holzpferd" },
+ { 38, 12, Graphics::kHotspotObject, "Spielkl" "\x94" "tze" },
+ { 38, 13, Graphics::kHotspotObject, "Holzeier" },
+ { 38, 14, Graphics::kHotspotObject, "Boden" },
+ { 38, 15, Graphics::kHotspotObject, "Holzt" "\x81" "r" },
+};
+
+static void activeHotspotTable(const SceneHotspotNameEntry *&table, uint &count) {
+ if (g_engine && g_engine->isDemo()) {
+ table = kSceneHotspotNamesDemo;
+ count = ARRAYSIZE(kSceneHotspotNamesDemo);
+ } else {
+ table = kSceneHotspotNames;
+ count = ARRAYSIZE(kSceneHotspotNames);
+ }
+}
+
+Common::String lookupSceneHotspotName(uint16 sceneIndex, uint16 hotspotIndex) {
+ const SceneHotspotNameEntry *table;
+ uint tableCount;
+ activeHotspotTable(table, tableCount);
+ for (uint i = 0; i < tableCount; ++i) {
+ const SceneHotspotNameEntry &e = table[i];
+ if (e.sceneIndex == sceneIndex && e.hotspotIndex == hotspotIndex) {
+ if (g_engine)
+ return g_engine->translateHotspotLabel(e.name);
+ return e.name;
+ }
+ }
+ return Common::String();
+}
+
+Graphics::HotspotType lookupSceneHotspotType(uint16 sceneIndex, uint16 hotspotIndex) {
+ const SceneHotspotNameEntry *table;
+ uint tableCount;
+ activeHotspotTable(table, tableCount);
+ for (uint i = 0; i < tableCount; ++i) {
+ const SceneHotspotNameEntry &e = table[i];
+ if (e.sceneIndex == sceneIndex && e.hotspotIndex == hotspotIndex)
+ return e.type;
+ }
+ return Graphics::kHotspotObject;
+}
+
+} // namespace Macs2
diff --git a/engines/macs2/hotspot_names.h b/engines/macs2/hotspot_names.h
new file mode 100644
index 00000000000..5d44c883aed
--- /dev/null
+++ b/engines/macs2/hotspot_names.h
@@ -0,0 +1,35 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef MACS2_HOTSPOT_NAMES_H
+#define MACS2_HOTSPOT_NAMES_H
+
+#include "common/str.h"
+#include "graphics/hotspot_renderer.h"
+
+namespace Macs2 {
+
+Common::String lookupSceneHotspotName(uint16 sceneIndex, uint16 hotspotIndex);
+Graphics::HotspotType lookupSceneHotspotType(uint16 sceneIndex, uint16 hotspotIndex);
+
+} // namespace Macs2
+
+#endif
diff --git a/engines/macs2/macs2.cpp b/engines/macs2/macs2.cpp
index bdfd2e59636..646af9a5f11 100644
--- a/engines/macs2/macs2.cpp
+++ b/engines/macs2/macs2.cpp
@@ -36,12 +36,14 @@
#include "engines/enhancements.h"
#include "gameobjects.h"
#include "graphics/cursorman.h"
+#include "graphics/hotspot_renderer.h"
#include "graphics/paletteman.h"
#include "graphics/pixelformat.h"
#include "graphics/surface.h"
#include "gui/debugger.h"
#include "macs2/debugtools.h"
#include "macs2/detection.h"
+#include "macs2/hotspot_names.h"
#include "macs2/music.h"
#include "macs2/view1.h"
@@ -1238,6 +1240,191 @@ uint16 Macs2Engine::getHotspotAtPoint(const Common::Point &p) {
return 0;
}
+namespace {
+
+static constexpr uint16 kMaxSceneObjects = 0x200;
+
+Common::String getObjectHotspotName(uint16 objectIndex) {
+ const GameObjects &objects = GameObjects::instance();
+ if (objectIndex > 0 && objectIndex < objects._objectNames.size() && !objects._objectNames[objectIndex].empty()) {
+ if (g_engine != nullptr)
+ return g_engine->translateHotspotLabel(objects._objectNames[objectIndex]);
+ return objects._objectNames[objectIndex];
+ }
+ return Common::String();
+}
+
+Common::U32String hotspotLabelToU32(const Common::String &name) {
+ if (name.empty())
+ return Common::U32String();
+ return Common::U32String(name.c_str(), Common::kDos850);
+}
+
+bool isMapModeActive() {
+ if (g_events == nullptr)
+ return false;
+ View1 *view = (View1 *)g_events->findView("View1");
+ return view != nullptr && view->_currentMode == ViewMode::VM_HELP;
+}
+
+Common::Point getSceneObjectHotspotPosition(View1 *view, GameObject *obj) {
+ if (view != nullptr) {
+ Character *character = view->getCharacterByIndex(obj->_index);
+ if (character != nullptr && !character->_markedForDeletion)
+ return character->getPosition();
+ }
+ return obj->_position;
+}
+
+} // namespace
+
+void Macs2Engine::rebuildHotspotSnapshot() const {
+ _hotspotSnapshot.currentSceneIndex = Scenes::instance()._currentSceneIndex;
+ _hotspotSnapshot.numHotspots = _numHotspots;
+ _hotspotSnapshot.hotspotColorTable = _hotspotColorTable;
+ _hotspotSnapshot.hotspotOverrides = _hotspotOverrides;
+ _hotspotSnapshot.mapModeActive = isMapModeActive();
+ _hotspotSnapshot.sceneHotspots.clear();
+ _hotspotSnapshot.sceneObjects.clear();
+
+ if (_hotspotMap.w > 0 && _numHotspots > 0) {
+ Common::Array<int32> sumX(_numHotspots, 0);
+ Common::Array<int32> sumY(_numHotspots, 0);
+ Common::Array<int32> count(_numHotspots, 0);
+
+ for (int y = 0; y < _hotspotMap.h; ++y) {
+ for (int x = 0; x < _hotspotMap.w; ++x) {
+ const uint8 pixel = _hotspotMap.getPixel(x, y);
+ if (pixel == 0)
+ continue;
+
+ for (uint16 i = 0; i < _numHotspots; ++i) {
+ if ((uint8)_hotspotColorTable[i] == pixel) {
+ sumX[i] += x;
+ sumY[i] += y;
+ count[i]++;
+ break;
+ }
+ }
+ }
+ }
+
+ for (uint16 i = 0; i < _numHotspots; ++i) {
+ if (count[i] == 0)
+ continue;
+
+ HotspotSnapshot::SceneHotspotEntry entry;
+ entry.index = i + 1;
+ if ((uint)(i + 1) < _hotspotOverrides.size() && _hotspotOverrides[i + 1] != 0xFFFF)
+ entry.index = _hotspotOverrides[i + 1];
+ entry.center = Common::Point(sumX[i] / count[i], sumY[i] / count[i]);
+ _hotspotSnapshot.sceneHotspots.push_back(entry);
+ }
+ }
+
+ View1 *view = g_events ? (View1 *)g_events->findView("View1") : nullptr;
+ const uint16 sceneIndex = (uint16)Scenes::instance()._currentSceneIndex;
+ for (uint16 objectIndex = 1; objectIndex <= kMaxSceneObjects; ++objectIndex) {
+ GameObject *obj = GameObjects::getObjectByIndex(objectIndex);
+ if (obj == nullptr || obj->_dataOffset == 0)
+ continue;
+ if ((int16)obj->_sceneIndex < 0 || obj->_sceneIndex != sceneIndex)
+ continue;
+
+ HotspotSnapshot::SceneObjectEntry entry;
+ entry.index = objectIndex;
+ entry.orientation = obj->_orientation;
+ entry.position = getSceneObjectHotspotPosition(view, obj);
+ _hotspotSnapshot.sceneObjects.push_back(entry);
+ }
+}
+
+bool Macs2Engine::hotspotDirty() const {
+ const bool mapMode = isMapModeActive();
+
+ if (Scenes::instance()._currentSceneIndex != _hotspotSnapshot.currentSceneIndex ||
+ _numHotspots != _hotspotSnapshot.numHotspots ||
+ _hotspotColorTable != _hotspotSnapshot.hotspotColorTable ||
+ _hotspotOverrides != _hotspotSnapshot.hotspotOverrides ||
+ mapMode != _hotspotSnapshot.mapModeActive) {
+ rebuildHotspotSnapshot();
+ return true;
+ }
+
+ if (mapMode)
+ return false;
+
+ View1 *view = g_events ? (View1 *)g_events->findView("View1") : nullptr;
+ const uint16 sceneIndex = (uint16)Scenes::instance()._currentSceneIndex;
+ uint snapshotIdx = 0;
+ for (uint16 objectIndex = 1; objectIndex <= kMaxSceneObjects; ++objectIndex) {
+ GameObject *obj = GameObjects::getObjectByIndex(objectIndex);
+ if (obj == nullptr || obj->_dataOffset == 0)
+ continue;
+ if ((int16)obj->_sceneIndex < 0 || obj->_sceneIndex != sceneIndex)
+ continue;
+
+ const Common::Point pos = getSceneObjectHotspotPosition(view, obj);
+ if (snapshotIdx >= _hotspotSnapshot.sceneObjects.size()) {
+ rebuildHotspotSnapshot();
+ return true;
+ }
+
+ const HotspotSnapshot::SceneObjectEntry &snap = _hotspotSnapshot.sceneObjects[snapshotIdx];
+ if (snap.index != objectIndex || snap.position != pos || snap.orientation != obj->_orientation) {
+ rebuildHotspotSnapshot();
+ return true;
+ }
+ snapshotIdx++;
+ }
+
+ if (snapshotIdx != _hotspotSnapshot.sceneObjects.size()) {
+ rebuildHotspotSnapshot();
+ return true;
+ }
+
+ return false;
+}
+
+void Macs2Engine::getHotspotPositions(Common::Array<Graphics::HotspotInfo> &hotspots) {
+ if (isMapModeActive())
+ return;
+
+ for (const HotspotSnapshot::SceneHotspotEntry &entry : _hotspotSnapshot.sceneHotspots) {
+ if (entry.index == 0)
+ continue;
+
+ const Common::Point ¢er = entry.center;
+ if (center.x < 0 || center.x >= kScreenWidth || center.y < 0 || center.y >= kGameHeight)
+ continue;
+
+ const uint16 sceneIndex = (uint16)Scenes::instance()._currentSceneIndex;
+ const Common::String name = lookupSceneHotspotName(sceneIndex, entry.index);
+ const Graphics::HotspotType type = lookupSceneHotspotType(sceneIndex, entry.index);
+ hotspots.push_back(Graphics::HotspotInfo(center, hotspotLabelToU32(name), type));
+ }
+
+ View1 *view = g_events ? (View1 *)g_events->findView("View1") : nullptr;
+ const uint16 currentActorIndex = (uint16)Scenes::instance()._currentActorIndex;
+ for (const HotspotSnapshot::SceneObjectEntry &entry : _hotspotSnapshot.sceneObjects) {
+ if (entry.index == currentActorIndex)
+ continue;
+
+ const Common::Point &screenPos = entry.position;
+ if (screenPos.x < 0 || screenPos.x >= kScreenWidth || screenPos.y < 0 || screenPos.y >= kGameHeight)
+ continue;
+
+ Character *character = view ? view->getCharacterByIndex(entry.index) : nullptr;
+ const bool isCharacter = character != nullptr && !character->_markedForDeletion;
+ Graphics::HotspotType hotspotType = Graphics::kHotspotObject;
+ if (isCharacter && GameObjects::isNpcIndex(entry.index))
+ hotspotType = Graphics::kHotspotNPC;
+
+ const Common::String name = getObjectHotspotName(entry.index);
+ hotspots.push_back(Graphics::HotspotInfo(screenPos, hotspotLabelToU32(name), hotspotType));
+ }
+}
+
void Macs2Engine::scheduleRun(bool initScene) {
_runScheduled = true;
_scheduledRunIsInitScene = initScene;
@@ -1385,7 +1572,7 @@ void Macs2Engine::loadTranslation() {
}
uint16 version = f->readUint16LE();
- if (version != 1) {
+ if (version != 1 && version != 2) {
warning("Unsupported macs2_translation.dat version %u", version);
delete f;
return;
@@ -1393,6 +1580,9 @@ void Macs2Engine::loadTranslation() {
uint16 numScenes = f->readUint16LE();
uint16 numObjects = f->readUint16LE();
+ uint16 numHotspotLabels = 0;
+ if (version >= 2)
+ numHotspotLabels = f->readUint16LE();
// Read index tables
struct IndexEntry {
@@ -1415,6 +1605,8 @@ void Macs2Engine::loadTranslation() {
objectIndex[i].dataOffset = f->readUint32LE();
}
+ uint32 stringDataEnd = 0;
+
// Read string data for scenes
for (uint16 i = 0; i < numScenes; i++) {
f->seek(sceneIndex[i].dataOffset);
@@ -1426,6 +1618,7 @@ void Macs2Engine::loadTranslation() {
s += (char)f->readByte();
entry.strings.push_back(s);
}
+ stringDataEnd = MAX(stringDataEnd, (uint32)f->pos());
_sceneTranslations[sceneIndex[i].id] = entry;
}
@@ -1440,11 +1633,38 @@ void Macs2Engine::loadTranslation() {
s += (char)f->readByte();
entry.strings.push_back(s);
}
+ stringDataEnd = MAX(stringDataEnd, (uint32)f->pos());
_objectTranslations[objectIndex[i].id] = entry;
}
+ _hotspotLabelTranslations.clear();
+ if (numHotspotLabels > 0)
+ f->seek(stringDataEnd);
+ for (uint16 i = 0; i < numHotspotLabels; i++) {
+ uint16 keyLen = f->readUint16LE();
+ Common::String key;
+ for (uint16 k = 0; k < keyLen; k++)
+ key += (char)f->readByte();
+ uint16 valLen = f->readUint16LE();
+ Common::String val;
+ for (uint16 k = 0; k < valLen; k++)
+ val += (char)f->readByte();
+ if (!key.empty() && !val.empty())
+ _hotspotLabelTranslations[key] = val;
+ }
+
delete f;
- debug("Loaded macs2_translation.dat: %u scenes, %u objects", numScenes, numObjects);
+ debug("Loaded macs2_translation.dat: %u scenes, %u objects, %u overlay labels",
+ numScenes, numObjects, (uint)_hotspotLabelTranslations.size());
+}
+
+Common::String Macs2Engine::translateHotspotLabel(const Common::String &cp850Name) const {
+ if (cp850Name.empty() || !(getFeatures() & GF_TRANSLATED))
+ return cp850Name;
+ auto it = _hotspotLabelTranslations.find(cp850Name);
+ if (it != _hotspotLabelTranslations.end())
+ return it->_value;
+ return cp850Name;
}
Common::StringArray Macs2Engine::decodeStrings(Common::MemoryReadStream *stream, int offset, int numStrings, int sceneId, int objectId) {
@@ -1865,7 +2085,9 @@ bool Macs2Engine::tick() {
_scriptExecutor->_isRepeatRun = true;
_scriptExecutor->run(shouldRunInit);
}
- return Events::tick();
+ const bool result = Events::tick();
+ drawHotspots();
+ return result;
}
void GlyphData::readFromeFile(Common::File &file) {
diff --git a/engines/macs2/macs2.h b/engines/macs2/macs2.h
index f8831e33f6a..9953fd186d7 100644
--- a/engines/macs2/macs2.h
+++ b/engines/macs2/macs2.h
@@ -495,7 +495,9 @@ public:
};
Common::HashMap<uint32, TranslationEntry> _sceneTranslations;
Common::HashMap<uint32, TranslationEntry> _objectTranslations;
+ Common::HashMap<Common::String, Common::String> _hotspotLabelTranslations;
void loadTranslation();
+ Common::String translateHotspotLabel(const Common::String &cp850Name) const;
// Compute the sequential string index at the given byte offset in a string blob
int computeStringIndex(Common::MemoryReadStream *stream, int targetOffset);
@@ -551,6 +553,31 @@ public:
bool tick() override;
void sayText(const Common::String &text, Common::TextToSpeechManager::Action action = Common::TextToSpeechManager::INTERRUPT_NO_REPEAT) const;
+
+ void getHotspotPositions(Common::Array<Graphics::HotspotInfo> &hotspots) override;
+ bool hotspotDirty() const override;
+ void rebuildHotspotSnapshot() const;
+
+ struct HotspotSnapshot {
+ struct SceneHotspotEntry {
+ uint16 index = 0;
+ Common::Point center;
+ };
+ struct SceneObjectEntry {
+ uint16 index = 0;
+ Common::Point position;
+ uint16 orientation = 0;
+ };
+
+ int currentSceneIndex = -1;
+ uint16 numHotspots = 0;
+ Common::Array<uint16> hotspotColorTable;
+ Common::Array<uint16> hotspotOverrides;
+ Common::Array<SceneHotspotEntry> sceneHotspots;
+ Common::Array<SceneObjectEntry> sceneObjects;
+ bool mapModeActive = false;
+ };
+ mutable HotspotSnapshot _hotspotSnapshot;
};
extern Macs2Engine *g_engine;
diff --git a/engines/macs2/metaengine.cpp b/engines/macs2/metaengine.cpp
index 3be0bda1883..148d9068d04 100644
--- a/engines/macs2/metaengine.cpp
+++ b/engines/macs2/metaengine.cpp
@@ -23,6 +23,7 @@
#include "backends/keymapper/action.h"
#include "backends/keymapper/keymapper.h"
#include "backends/keymapper/standard-actions.h"
+#include "common/events.h"
#include "common/savefile.h"
#include "common/translation.h"
#include "engines/enhancements.h"
@@ -87,6 +88,11 @@ Common::KeymapArray Macs2MetaEngine::initKeymaps(const char *target) const {
act->addDefaultInputMapping("F1");
engineKeyMap->addAction(act);
+ act = new Action(kStandardActionToggleHotspots, _("Show hotspots"));
+ act->setEvent(Common::EVENT_HOTSPOTS_SHOW);
+ act->addDefaultInputMapping("h");
+ engineKeyMap->addAction(act);
+
return Keymap::arrayOf(engineKeyMap);
}
diff --git a/engines/macs2/module.mk b/engines/macs2/module.mk
index 348110dc297..7611e9f2071 100644
--- a/engines/macs2/module.mk
+++ b/engines/macs2/module.mk
@@ -6,6 +6,7 @@ MODULE_OBJS = \
dialogs.o \
events.o \
gameobjects.o \
+ hotspot_names.o \
macs2.o \
messages.o \
metaengine.o \
Commit: 0aa6014788d0552fd700c9f818d7617292671955
https://github.com/scummvm/scummvm/commit/0aa6014788d0552fd700c9f818d7617292671955
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2026-07-15T20:02:28+02:00
Commit Message:
MACS2: fixed duplicated assignment of the same value. PVS-Studio V519
Changed paths:
engines/macs2/macs2.cpp
diff --git a/engines/macs2/macs2.cpp b/engines/macs2/macs2.cpp
index 646af9a5f11..39c187b1348 100644
--- a/engines/macs2/macs2.cpp
+++ b/engines/macs2/macs2.cpp
@@ -648,7 +648,6 @@ void Macs2Engine::changeScene(uint32 newSceneIndex, bool executeScript) {
currentView->_drawnStringBox.clear();
currentView->_continueScriptAfterUI = false;
currentView->currentSpeechActData = SpeechActData();
- currentView->_uiPanelState = View1::kUiPanelNone;
currentView->_pendingPanelRequest = View1::kPanelRequestNone;
currentView->_activeInventoryItem = nullptr;
currentView->_uiPanelState = View1::kUiPanelNone;
Commit: 0fd8363005107745292faa6d6927092e4275da16
https://github.com/scummvm/scummvm/commit/0fd8363005107745292faa6d6927092e4275da16
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2026-07-15T20:02:28+02:00
Commit Message:
MACS2: init some struct members, PVS-Studio V730
Changed paths:
engines/macs2/macs2.h
diff --git a/engines/macs2/macs2.h b/engines/macs2/macs2.h
index 9953fd186d7..936b62a4071 100644
--- a/engines/macs2/macs2.h
+++ b/engines/macs2/macs2.h
@@ -120,15 +120,15 @@ struct AnimFrame : public Sprite {
};
struct BackgroundAnimation {
- uint16 _x;
- uint16 _y;
+ uint16 _x = 0;
+ uint16 _y = 0;
Common::Array<AnimFrame> _frames;
- uint32 _frameIndex;
+ uint32 _frameIndex = 0;
};
struct BackgroundAnimationBlob {
- uint16 _x;
- uint16 _y;
+ uint16 _x = 0;
+ uint16 _y = 0;
Common::Array<uint8> _blob;
uint16 _unknown0C = 0; // +0x50F3: purpose unknown (word, read from file, not used at runtime)
uint8 _unknown0E = 0; // +0x50F5: purpose unknown (byte, read from file, not used at runtime)
Commit: 7545b95ea2ec50344464ca8d5ea155ae015c5e75
https://github.com/scummvm/scummvm/commit/7545b95ea2ec50344464ca8d5ea155ae015c5e75
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2026-07-15T20:02:28+02:00
Commit Message:
MACS2: merge duplicate opcode decode case branches. PVS-Studio V1037
Changed paths:
engines/macs2/debugtools.cpp
diff --git a/engines/macs2/debugtools.cpp b/engines/macs2/debugtools.cpp
index 7f2544e12e0..1854cdd4681 100644
--- a/engines/macs2/debugtools.cpp
+++ b/engines/macs2/debugtools.cpp
@@ -371,12 +371,15 @@ static Common::String decodeParams(Common::MemoryReadStream *script, uint8 opcod
result = Common::String::format(" %s", v.c_str());
break;
}
- case 0x10: {
+ case 0x10:
+ case 0x1F: {
Common::String o = decodeScriptValue(script), x = decodeScriptValue(script), y = decodeScriptValue(script);
result = Common::String::format(" obj=%s pos=(%s,%s)", o.c_str(), x.c_str(), y.c_str());
break;
}
case 0x11:
+ case 0x29:
+ case 0x2B:
case 0x47: {
Common::String o = decodeScriptValue(script);
result = Common::String::format(" obj=%s", o.c_str());
@@ -447,11 +450,6 @@ static Common::String decodeParams(Common::MemoryReadStream *script, uint8 opcod
result = Common::String::format(" obj=%s slot=%s frame=%s", o.c_str(), s.c_str(), f.c_str());
break;
}
- case 0x1F: {
- Common::String o = decodeScriptValue(script), x = decodeScriptValue(script), y = decodeScriptValue(script);
- result = Common::String::format(" obj=%s pos=(%s,%s)", o.c_str(), x.c_str(), y.c_str());
- break;
- }
case 0x20: {
Common::String o = decodeScriptValue(script), v = decodeScriptValue(script);
result = Common::String::format(" obj=%s offset=%s", o.c_str(), v.c_str());
@@ -492,22 +490,12 @@ static Common::String decodeParams(Common::MemoryReadStream *script, uint8 opcod
result = Common::String::format(" obj=%s maxFrame=%s", o.c_str(), v.c_str());
break;
}
- case 0x29: {
- Common::String o = decodeScriptValue(script);
- result = Common::String::format(" obj=%s", o.c_str());
- break;
- }
case 0x2A: {
Common::String o = decodeScriptValue(script), s = decodeScriptValue(script), d = decodeScriptValue(script);
uint8 ai = script->readByte();
result = Common::String::format(" obj=%s slot=%s decode=%s idx=%u", o.c_str(), s.c_str(), d.c_str(), ai);
break;
}
- case 0x2B: {
- Common::String o = decodeScriptValue(script);
- result = Common::String::format(" obj=%s", o.c_str());
- break;
- }
case 0x2C:
case 0x32:
case 0x33:
Commit: 6d2a8e0c8dee62492db96f782dbc225fbc374ecf
https://github.com/scummvm/scummvm/commit/6d2a8e0c8dee62492db96f782dbc225fbc374ecf
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2026-07-15T20:02:28+02:00
Commit Message:
MACS2: fixed some missing initializations, PVS-Studio V730
Changed paths:
engines/macs2/events.cpp
engines/macs2/gameobjects.h
engines/macs2/view1.cpp
engines/macs2/view1.h
diff --git a/engines/macs2/events.cpp b/engines/macs2/events.cpp
index 2641bc3126e..953b2adf458 100644
--- a/engines/macs2/events.cpp
+++ b/engines/macs2/events.cpp
@@ -31,7 +31,7 @@ namespace Macs2 {
Events *g_events;
-Events::Events() : UIElement("Root", nullptr) {
+Events::Events() : UIElement("Root", nullptr), currentMillis(0) {
g_events = this;
}
diff --git a/engines/macs2/gameobjects.h b/engines/macs2/gameobjects.h
index 6b7c6e6005a..0462f4e40b6 100644
--- a/engines/macs2/gameobjects.h
+++ b/engines/macs2/gameobjects.h
@@ -85,7 +85,7 @@ public:
class GameObject {
public:
// Index of the object, starting at 1
- uint16 _index;
+ uint16 _index = 0;
uint32 _dataOffset = 0;
Common::Array<uint8> _overloadAnimation;
@@ -99,7 +99,7 @@ public:
// These are the values read by the code around l0037_082D:
Common::Point _position;
- uint16 _sceneIndex;
+ uint16 _sceneIndex = 0;
// 8-directional movement system from walkAlongPath (1008:1b8f).
// Direction codes 1-8 are walking directions, 9-16 are standing (idle) variants.
// The direction is chosen based on the angle between current and target position:
@@ -115,12 +115,12 @@ public:
// 17 (0x11) = Pickup animation
// Each direction has a validity flag at runtime offset +0x43 + (dir-1)*0x20
// that indicates whether the object has animation data for that direction.
- uint16 _orientation;
+ uint16 _orientation = 0;
// Per-object percentage multiplier for ground-elevation vertical offset.
// Walkability map values < 0xC8 represent ground height at each pixel;
// this factor scales how much that height displaces the object upward
// when drawn. 0 = no vertical offset. 100 = full elevation offset.
- uint16 _verticalOffsetScale;
+ uint16 _verticalOffsetScale = 0;
// Runtime +0x217: frame index during pickup animation at which the item is grabbed
uint16 _pickupFrameStart = 0;
// Runtime +0x219: frame index at which pickup animation completes
diff --git a/engines/macs2/view1.cpp b/engines/macs2/view1.cpp
index 0b6f52c1589..e287a4bcb4a 100644
--- a/engines/macs2/view1.cpp
+++ b/engines/macs2/view1.cpp
@@ -3422,7 +3422,7 @@ bool Character::isWalkable(const Common::Point &p) const {
return Macs2Engine::isWalkabilityWalkable(lookupWalkability(p));
}
-Character::Character() {
+Character::Character() : _startTime(0), _duration(0) {
_pathfindingOverlay = Common::Array<uint8>(kScreenWidth * kGameHeight, 0);
}
diff --git a/engines/macs2/view1.h b/engines/macs2/view1.h
index 57981df30e8..e75ebedc758 100644
--- a/engines/macs2/view1.h
+++ b/engines/macs2/view1.h
@@ -172,7 +172,7 @@ struct SpeechActData {
Character *speaker = nullptr;
Common::Array<Common::String> strings;
Common::Point position;
- bool onRightSide;
+ bool onRightSide = false;
// Mouth animation counter from handleTimerCallback (1008:d38b).
// Decremented each frame. Controls which portrait frame is drawn:
// >1: draw frame 2 from primary portrait blob (+0x14C)
More information about the Scummvm-git-logs
mailing list