[Scummvm-git-logs] scummvm master -> 6190bc48700870764e17eae3b93fcb0b404e7804
dreammaster
noreply at scummvm.org
Thu May 18 03:46:21 UTC 2023
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
071e118197 MM: MM1: Fixes for map 38 and 39
6190bc4870 GLK: ZCODE: Added Desert Adventure detection
Commit: 071e11819707edd4a76b6af089b196f3995ed86a
https://github.com/scummvm/scummvm/commit/071e11819707edd4a76b6af089b196f3995ed86a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-05-17T20:01:42-07:00
Commit Message:
MM: MM1: Fixes for map 38 and 39
Changed paths:
A engines/mm/mm1/views_enh/interactions/ruby.cpp
A engines/mm/mm1/views_enh/interactions/ruby.h
devtools/create_mm/files/mm1/strings_en.yml
engines/mm/mm1/maps/map38.cpp
engines/mm/mm1/maps/map39.cpp
engines/mm/mm1/maps/map39.h
engines/mm/mm1/views/maps/ruby.cpp
engines/mm/mm1/views_enh/dialogs.h
engines/mm/module.mk
diff --git a/devtools/create_mm/files/mm1/strings_en.yml b/devtools/create_mm/files/mm1/strings_en.yml
index 0490dd90ff9..c270a299a21 100644
--- a/devtools/create_mm/files/mm1/strings_en.yml
+++ b/devtools/create_mm/files/mm1/strings_en.yml
@@ -1572,16 +1572,22 @@ maps:
face1: "Inset in the wall, a stone face\nyells: \"My brain hurts!\""
face2: "Inset in the wall, a stone face\nspeaks: \"I would pay highly for a green\nhandled, pearl encrusted abelnuski.\""
face3: "Inset in the wall, a stone face\nspeaks: \"I see all, hear all,\nknow nothing...\""
- face4: "Inset in the wall, a stone face\nproclaims: \"Okrim is watching.\nhe studies your weaknesses!\""
+ face4: "Inset in the wall, a stone face\nproclaims: \"Okrim is watching.\nHe studies your weaknesses!\""
ringing: "A strange ringing sound startles\nthe party. You are teleported!"
+ emap38:
+ message4: "Etched in gold, message 4 reads:\n"Of-be-has-true-knowledge-plane-\na-level-to-reality-it\""
map39:
message6: "Etched in gold, message 6 reads:\nbook-done.-a-self-that-from-key-you-\nbe-to-seems"
ruby1: "In the center of the room, a huge ruby\nstands atop a pedestal. hexagonally\nshaped, it glows rhythmically!\nMesmerized by its light, you hear:\nGlass that glitters, rubies that glow\nWhen i twinkle, I cast a rainbow\nWhat am i? :> ..............."
- ruby2: "Wrong! a bright flash..."
+ ruby2: "Wrong! A bright flash..."
door_repels: "A silver door repels you!"
door_glows: "A silver door, your silver key glows!"
stairs_up: "Stairs to surface, take them (Y/N)?"
+ emap39:
+ message6: "Etched in gold, message 6 reads:\n\"Book-done.-A-self-that-from-\nkey-you-be-to-seems\""
+ title: "Ruby"
+ ruby1: "In the center of the room, a huge hexagonal ruby stands glowing atop a pedestal. You hear: Glass that glitters, rubies that glow when i twinkle, I cast a rainbow.\nWhat am i?"
map40:
message2: "Etched in gold, message 2 reads:\nOne,-riddles-value-you-you-5-card-must-\nclaimed.-dreams,-..."
diff --git a/engines/mm/mm1/maps/map38.cpp b/engines/mm/mm1/maps/map38.cpp
index 38ad7244a11..6d6c4c0725e 100644
--- a/engines/mm/mm1/maps/map38.cpp
+++ b/engines/mm/mm1/maps/map38.cpp
@@ -44,10 +44,9 @@ void Map38::special() {
}
}
- send(SoundMessage(STRING["maps.map38.ringing"]));
g_maps->_mapPos = Common::Point(getRandomNumber(16) - 1,
getRandomNumber(16) - 1);
- updateGame();
+ send(SoundMessage(STRING["maps.map38.ringing"]));
}
void Map38::special00() {
diff --git a/engines/mm/mm1/maps/map39.cpp b/engines/mm/mm1/maps/map39.cpp
index 2e3b2dc3aa4..3e1d733e067 100644
--- a/engines/mm/mm1/maps/map39.cpp
+++ b/engines/mm/mm1/maps/map39.cpp
@@ -29,6 +29,8 @@ namespace MM {
namespace MM1 {
namespace Maps {
+#define ANSWER_OFFSET 477
+
void Map39::special() {
// Scan for special actions on the map cell
for (uint i = 0; i < 19; ++i) {
@@ -139,6 +141,32 @@ void Map39::special18() {
send(SoundMessage(STRING["maps.wall_painted"]));
}
+void Map39::riddleAnswered(const Common::String &answer) {
+ Common::String properAnswer;
+
+ for (int i = 0; i < 12 && _data[ANSWER_OFFSET + i]; ++i)
+ properAnswer += _data[ANSWER_OFFSET + i] - 64;
+
+ if (answer.equalsIgnoreCase(properAnswer)) {
+ g_maps->clearSpecial();
+ Sound::sound(SOUND_3);
+ redrawGame();
+
+ for (uint i = 0; i < g_globals->_party.size(); ++i) {
+ g_globals->_party[i]._flags[5] |= CHARFLAG5_20;
+ }
+
+ g_globals->_treasure._items[2] = CRYSTAL_KEY_ID;
+ g_events->addAction(KEYBIND_SEARCH);
+
+ } else {
+ g_maps->_mapPos.x = 9;
+ updateGame();
+
+ send(InfoMessage(STRING["maps.map39.ruby2"]));
+ }
+}
+
} // namespace Maps
} // namespace MM1
} // namespace MM
diff --git a/engines/mm/mm1/maps/map39.h b/engines/mm/mm1/maps/map39.h
index 66892d4cf9b..f86204c6202 100644
--- a/engines/mm/mm1/maps/map39.h
+++ b/engines/mm/mm1/maps/map39.h
@@ -76,6 +76,8 @@ public:
* Handles all special stuff that happens on the map
*/
void special() override;
+
+ void riddleAnswered(const Common::String &answer);
};
} // namespace Maps
diff --git a/engines/mm/mm1/views/maps/ruby.cpp b/engines/mm/mm1/views/maps/ruby.cpp
index 2489644905a..f33e188299e 100644
--- a/engines/mm/mm1/views/maps/ruby.cpp
+++ b/engines/mm/mm1/views/maps/ruby.cpp
@@ -29,8 +29,6 @@ namespace MM1 {
namespace Views {
namespace Maps {
-#define ANSWER_OFFSET 477
-
Ruby::Ruby() : AnswerEntry("Ruby", Common::Point(14, 7), 12) {
_bounds = getLineBounds(17, 24);
}
@@ -42,31 +40,9 @@ void Ruby::draw() {
}
void Ruby::answerEntered() {
- MM1::Maps::Map &map = *g_maps->_currentMap;
- Common::String properAnswer;
+ MM1::Maps::Map39 &map = *static_cast<MM1::Maps::Map39 *>(g_maps->_currentMap);
close();
-
- for (int i = 0; i < 12 && map[ANSWER_OFFSET + i]; ++i)
- properAnswer += map[ANSWER_OFFSET + i] - 64;
-
- if (_answer.equalsIgnoreCase(properAnswer)) {
- g_maps->clearSpecial();
- Sound::sound(SOUND_3);
- map.redrawGame();
-
- for (uint i = 0; i < g_globals->_party.size(); ++i) {
- g_globals->_party[i]._flags[5] |= CHARFLAG5_20;
- }
-
- g_globals->_treasure._items[2] = CRYSTAL_KEY_ID;
- g_events->addAction(KEYBIND_SEARCH);
-
- } else {
- g_maps->_mapPos.x = 9;
- map.updateGame();
-
- send(InfoMessage(STRING["maps.map39.ruby2"]));
- }
+ map.riddleAnswered(_answer);
}
} // namespace Maps
diff --git a/engines/mm/mm1/views_enh/dialogs.h b/engines/mm/mm1/views_enh/dialogs.h
index 32c5d8d71cc..a0321b312d4 100644
--- a/engines/mm/mm1/views_enh/dialogs.h
+++ b/engines/mm/mm1/views_enh/dialogs.h
@@ -68,6 +68,7 @@
#include "mm/mm1/views_enh/interactions/lion.h"
#include "mm/mm1/views_enh/interactions/prisoners.h"
#include "mm/mm1/views_enh/interactions/resistances.h"
+#include "mm/mm1/views_enh/interactions/ruby.h"
#include "mm/mm1/views_enh/interactions/statue.h"
#include "mm/mm1/views_enh/interactions/trivia.h"
#include "mm/mm1/views_enh/interactions/volcano_god.h"
@@ -101,6 +102,7 @@ private:
ViewsEnh::Interactions::Leprechaun _leprechaun;
ViewsEnh::Interactions::Lion _lion;
ViewsEnh::Interactions::Resistances _resistances;
+ ViewsEnh::Interactions::Ruby _ruby;
ViewsEnh::Interactions::Statue _statue;
ViewsEnh::Interactions::Trivia _trivia;
ViewsEnh::Interactions::VolcanoGod _volcanoGod;
diff --git a/engines/mm/mm1/views_enh/interactions/ruby.cpp b/engines/mm/mm1/views_enh/interactions/ruby.cpp
new file mode 100644
index 00000000000..7e68e626718
--- /dev/null
+++ b/engines/mm/mm1/views_enh/interactions/ruby.cpp
@@ -0,0 +1,44 @@
+/* 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 "mm/mm1/views_enh/interactions/ruby.h"
+#include "mm/mm1/maps/map39.h"
+#include "mm/mm1/globals.h"
+
+namespace MM {
+namespace MM1 {
+namespace ViewsEnh {
+namespace Interactions {
+
+Ruby::Ruby() : InteractionQuery("Ruby", 12) {
+ _title = STRING["maps.emap39.title"];
+ addText(STRING["maps.emap39.ruby1"]);
+}
+
+void Ruby::answerEntered() {
+ MM1::Maps::Map39 &map = *static_cast<MM1::Maps::Map39 *>(g_maps->_currentMap);
+ map.riddleAnswered(_answer);
+}
+
+} // namespace Interactions
+} // namespace ViewsEnh
+} // namespace MM1
+} // namespace MM
diff --git a/engines/mm/mm1/views_enh/interactions/ruby.h b/engines/mm/mm1/views_enh/interactions/ruby.h
new file mode 100644
index 00000000000..2a21b81fc5f
--- /dev/null
+++ b/engines/mm/mm1/views_enh/interactions/ruby.h
@@ -0,0 +1,50 @@
+/* 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 MM1_VIEWS_ENH_INTERACTIONS_RUBY_H
+#define MM1_VIEWS_ENH_INTERACTIONS_RUBY_H
+
+#include "mm/mm1/views_enh/interactions/interaction_query.h"
+#include "mm/mm1/data/character.h"
+
+namespace MM {
+namespace MM1 {
+namespace ViewsEnh {
+namespace Interactions {
+
+class Ruby : public InteractionQuery {
+protected:
+ /**
+ * Answer entered
+ */
+ void answerEntered() override;
+
+public:
+ Ruby();
+ virtual ~Ruby() {}
+};
+
+} // namespace Interactions
+} // namespace ViewsEnh
+} // namespace MM1
+} // namespace MM
+
+#endif
diff --git a/engines/mm/module.mk b/engines/mm/module.mk
index fcdffc5499a..b016f25b2f4 100644
--- a/engines/mm/module.mk
+++ b/engines/mm/module.mk
@@ -197,6 +197,7 @@ MODULE_OBJS += \
mm1/views_enh/interactions/lion.o \
mm1/views_enh/interactions/prisoners.o \
mm1/views_enh/interactions/resistances.o \
+ mm1/views_enh/interactions/ruby.o \
mm1/views_enh/interactions/statue.o \
mm1/views_enh/interactions/trivia.o \
mm1/views_enh/interactions/volcano_god.o \
Commit: 6190bc48700870764e17eae3b93fcb0b404e7804
https://github.com/scummvm/scummvm/commit/6190bc48700870764e17eae3b93fcb0b404e7804
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-05-17T20:44:28-07:00
Commit Message:
GLK: ZCODE: Added Desert Adventure detection
Changed paths:
engines/glk/zcode/detection_tables.h
diff --git a/engines/glk/zcode/detection_tables.h b/engines/glk/zcode/detection_tables.h
index 9f5a03ac073..963ed54af11 100644
--- a/engines/glk/zcode/detection_tables.h
+++ b/engines/glk/zcode/detection_tables.h
@@ -310,6 +310,7 @@ const PlainGameDescriptor ZCODE_GAME_LIST[] = {
{ "deliciousbreakfast","Delicious Breakfast" },
{ "delightfulwallpaper","Delightful Wallpaper" },
{ "delusions", "Delusions" },
+ { "desertz", "Desert Adventure" },
{ "detective", "Detective" },
{ "detention", "Detention, an attempt to escape from school" },
{ "devildoit", "The Devil Made Me Do It" },
@@ -1526,6 +1527,7 @@ const FrotzGameDescription FROTZ_GAMES[] = {
ENTRY0("deliciousbreakfast", "111015", "393e71995dbb13c23a1b5dd5403341d7", 152852),
ENTRY0("delusions", "971121", "8e78eef73d07048d99514bab624fb9aa", 193024),
ENTRY0("detective", "000715", "c09fde6c6777c2c422de18668cf986a2", 108032),
+ ENTRY0("desertz", "070909", "3e23d39ba4cec9f14fb8b5c63396259b", 23040),
ENTRY0("detention", "130827", "c2361faf8bbc8996fc0db8e71ef001da", 244684),
ENTRY0("devildoit", "000724", "c4c97ca9af421dc9a14849355e7f7a1f", 60416),
ENTRY0("devours", "050325", "f9be89a5a26be53b52c08b6cea0ed3d1", 160768),
More information about the Scummvm-git-logs
mailing list