[Scummvm-git-logs] scummvm master -> 583b8b2a4bb6df6eede0633bd91176335c903810
dreammaster
noreply at scummvm.org
Fri Apr 7 04:46:13 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:
8b7cf52873 MM: MM1: Volcano god interaction for map 11
583b8b2a4b MM: MM1: Map 14, 15 text fixes
Commit: 8b7cf528732ad5d93f77192ae497e098cd14e67e
https://github.com/scummvm/scummvm/commit/8b7cf528732ad5d93f77192ae497e098cd14e67e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-04-06T21:31:59-07:00
Commit Message:
MM: MM1: Volcano god interaction for map 11
Changed paths:
A engines/mm/mm1/views_enh/interactions/volcano_god.cpp
A engines/mm/mm1/views_enh/interactions/volcano_god.h
devtools/create_mm/files/mm1/strings_en.yml
engines/mm/mm1/views_enh/dialogs.h
engines/mm/mm1/views_enh/interactions/interaction_query.cpp
engines/mm/mm1/views_enh/interactions/interaction_query.h
engines/mm/mm1/views_enh/interactions/prisoners.cpp
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 a5b1924ce3f..d0231120df6 100644
--- a/devtools/create_mm/files/mm1/strings_en.yml
+++ b/devtools/create_mm/files/mm1/strings_en.yml
@@ -1172,10 +1172,16 @@ maps:
ladder: "A ladder going up, take it (Y/N)?"
emap11:
virgin: "A luscious virgin shackled to the wall!"
- option_a: "Kiss her"
- option_b: "Release her"
- option_c: "Leave"
-
+ virgin_a: "Kiss her"
+ virgin_b: "Release her"
+ virgin_c: "Leave"
+ god_a: "Challenge"
+ god_b: "A Riddle"
+ god_c: "A Clue"
+ volcano_god: "Volcano God"
+ god_text: "The volcano god bellows,\n\"What do you seek here?\""
+ question: "Who was brave yet failed?""
+
map12:
ladder_up: "Ladder up, climb (Y/N)?"
polyhedron1: "Atop a crystal pyramid spins a glowing\npolyhedron. Stop it on side (1-9)?"
diff --git a/engines/mm/mm1/views_enh/dialogs.h b/engines/mm/mm1/views_enh/dialogs.h
index 75dbc043f21..4dea21aceb0 100644
--- a/engines/mm/mm1/views_enh/dialogs.h
+++ b/engines/mm/mm1/views_enh/dialogs.h
@@ -54,6 +54,7 @@
#include "mm/mm1/views_enh/interactions/prisoners.h"
#include "mm/mm1/views_enh/interactions/resistances.h"
#include "mm/mm1/views_enh/interactions/statue.h"
+#include "mm/mm1/views_enh/interactions/volcano_god.h"
#include "mm/mm1/views_enh/locations/blacksmith_items.h"
#include "mm/mm1/views_enh/locations/blacksmith.h"
#include "mm/mm1/views_enh/locations/inn.h"
@@ -74,6 +75,8 @@ private:
ViewsEnh::Interactions::Arrested _arrested;
ViewsEnh::Interactions::Resistances _resistances;
ViewsEnh::Interactions::Statue _statue;
+ ViewsEnh::Interactions::VolcanoGod _volcanoGod;
+
ViewsEnh::Interactions::ChildPrisoner _childPrisoner;
ViewsEnh::Interactions::CloakedPrisoner _cloakedPrisoner;
ViewsEnh::Interactions::DemonPrisoner _demonPrisoner;
diff --git a/engines/mm/mm1/views_enh/interactions/interaction_query.cpp b/engines/mm/mm1/views_enh/interactions/interaction_query.cpp
index 486f96b3102..e94c9c0c7ed 100644
--- a/engines/mm/mm1/views_enh/interactions/interaction_query.cpp
+++ b/engines/mm/mm1/views_enh/interactions/interaction_query.cpp
@@ -43,6 +43,7 @@ void InteractionQuery::draw() {
if (!_showEntry)
return;
+ assert(_buttons.empty());
int xp = (_innerBounds.width() / 2) - (_maxChars * 8 / 2);
int yp = (8 + _lines.size()) * 8;
diff --git a/engines/mm/mm1/views_enh/interactions/interaction_query.h b/engines/mm/mm1/views_enh/interactions/interaction_query.h
index b1c01f80e4c..90887026195 100644
--- a/engines/mm/mm1/views_enh/interactions/interaction_query.h
+++ b/engines/mm/mm1/views_enh/interactions/interaction_query.h
@@ -34,9 +34,9 @@ class InteractionQuery : public Interaction {
private:
TextEntry _textEntry;
int _maxChars = 0;
- bool _showEntry = false;
protected:
+ bool _showEntry = false;
Common::String _answer;
/**
diff --git a/engines/mm/mm1/views_enh/interactions/prisoners.cpp b/engines/mm/mm1/views_enh/interactions/prisoners.cpp
index 0eefbe952e4..bdb8e43ed46 100644
--- a/engines/mm/mm1/views_enh/interactions/prisoners.cpp
+++ b/engines/mm/mm1/views_enh/interactions/prisoners.cpp
@@ -134,9 +134,9 @@ void MaidenPrisoner::flee() {
VirginPrisoner::VirginPrisoner() : Interaction("VirginPrisoner", 2) {
addText(STRING["maps.emap11.virgin"]);
- addButton(STRING["maps.emap11.option_a"], 'A');
- addButton(STRING["maps.emap11.option_b"], 'B');
- addButton(STRING["maps.emap11.option_c"], 'C');
+ addButton(STRING["maps.emap11.virgin_a"], 'A');
+ addButton(STRING["maps.emap11.virgin_b"], 'B');
+ addButton(STRING["maps.emap11.virgin_c"], 'C');
}
bool VirginPrisoner::msgKeypress(const KeypressMessage &msg) {
diff --git a/engines/mm/mm1/views_enh/interactions/volcano_god.cpp b/engines/mm/mm1/views_enh/interactions/volcano_god.cpp
new file mode 100644
index 00000000000..6bf33addcf6
--- /dev/null
+++ b/engines/mm/mm1/views_enh/interactions/volcano_god.cpp
@@ -0,0 +1,117 @@
+/* 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/volcano_god.h"
+#include "mm/mm1/maps/map11.h"
+#include "mm/mm1/globals.h"
+#include "mm/mm1/sound.h"
+
+namespace MM {
+namespace MM1 {
+namespace ViewsEnh {
+namespace Interactions {
+
+VolcanoGod::VolcanoGod() : InteractionQuery("VolcanoGod", 8, 10) {
+ _title = STRING["maps.emap11.volcano_god"];
+}
+
+bool VolcanoGod::msgFocus(const FocusMessage &msg) {
+ InteractionQuery::msgFocus(msg);
+ _showEntry = false;
+ setMode(CHOOSE_OPTION);
+ return true;
+}
+
+bool VolcanoGod::msgKeypress(const KeypressMessage &msg) {
+ switch (msg.keycode) {
+ case Common::KEYCODE_a:
+ challenge();
+ break;
+ case Common::KEYCODE_b:
+ riddle();
+ break;
+ case Common::KEYCODE_c:
+ clue();
+ break;
+ default:
+ return InteractionQuery::msgKeypress(msg);
+ }
+
+ return true;
+}
+
+bool VolcanoGod::msgAction(const ActionMessage &msg) {
+ if (msg._action == KEYBIND_ESCAPE) {
+ g_events->close();
+ return true;
+ } else {
+ return InteractionQuery::msgAction(msg);
+ }
+}
+
+void VolcanoGod::setMode(Mode newMode) {
+ clearButtons();
+ _mode = newMode;
+
+ switch (_mode) {
+ case CHOOSE_OPTION:
+ addText(STRING["maps.emap11.god_text"]);
+ addButton(STRING["maps.emap11.god_a"], 'A');
+ addButton(STRING["maps.emap11.god_b"], 'B');
+ addButton(STRING["maps.emap11.god_c"], 'C');
+ break;
+ case ENTER_RESPONSE:
+ addText(STRING["maps.emap11.question"]);
+ _showEntry = true;
+ break;
+ }
+
+ redraw();
+}
+
+
+void VolcanoGod::challenge() {
+ MM1::Maps::Map11 &map = *static_cast<MM1::Maps::Map11 *>(g_maps->_currentMap);
+ close();
+ map.challenge();
+}
+
+void VolcanoGod::riddle() {
+ Sound::sound(SOUND_2);
+ setMode(ENTER_RESPONSE);
+ redraw();
+}
+
+void VolcanoGod::clue() {
+ MM1::Maps::Map11 &map = *static_cast<MM1::Maps::Map11 *>(g_maps->_currentMap);
+ close();
+ map.clue();
+}
+
+void VolcanoGod::answerEntered() {
+ MM1::Maps::Map11 &map = *static_cast<MM1::Maps::Map11 *>(g_maps->_currentMap);
+ map.riddleAnswer(_answer);
+}
+
+} // namespace Interactions
+} // namespace ViewsEnh
+} // namespace MM1
+} // namespace MM
diff --git a/engines/mm/mm1/views_enh/interactions/volcano_god.h b/engines/mm/mm1/views_enh/interactions/volcano_god.h
new file mode 100644
index 00000000000..3b39e044253
--- /dev/null
+++ b/engines/mm/mm1/views_enh/interactions/volcano_god.h
@@ -0,0 +1,65 @@
+/* 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_VOLCANO_GOD_H
+#define MM1_VIEWS_ENH_INTERACTIONS_VOLCANO_GOD_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 VolcanoGod : public InteractionQuery {
+private:
+ enum Mode {
+ CHOOSE_OPTION, ENTER_RESPONSE
+ };
+ Mode _mode = CHOOSE_OPTION;
+
+ void setMode(Mode newMode);
+ void challenge();
+ void riddle();
+ void clue();
+
+protected:
+ /**
+ * Answer entered
+ */
+ void answerEntered() override;
+
+public:
+ VolcanoGod();
+ virtual ~VolcanoGod() {
+ }
+ bool msgFocus(const FocusMessage &msg) override;
+ bool msgKeypress(const KeypressMessage &msg) override;
+ bool msgAction(const ActionMessage &msg) override;
+};
+
+} // namespace Interactions
+} // namespace ViewsEnh
+} // namespace MM1
+} // namespace MM
+
+#endif
diff --git a/engines/mm/module.mk b/engines/mm/module.mk
index 2a4866e2eb8..33ac255182d 100644
--- a/engines/mm/module.mk
+++ b/engines/mm/module.mk
@@ -176,6 +176,7 @@ MODULE_OBJS += \
mm1/views_enh/interactions/prisoners.o \
mm1/views_enh/interactions/resistances.o \
mm1/views_enh/interactions/statue.o \
+ mm1/views_enh/interactions/volcano_god.o \
mm1/views_enh/locations/blacksmith.o \
mm1/views_enh/locations/blacksmith_items.o \
mm1/views_enh/locations/inn.o \
Commit: 583b8b2a4bb6df6eede0633bd91176335c903810
https://github.com/scummvm/scummvm/commit/583b8b2a4bb6df6eede0633bd91176335c903810
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-04-06T21:46:00-07:00
Commit Message:
MM: MM1: Map 14, 15 text fixes
Changed paths:
devtools/create_mm/files/mm1/strings_en.yml
diff --git a/devtools/create_mm/files/mm1/strings_en.yml b/devtools/create_mm/files/mm1/strings_en.yml
index d0231120df6..9b90c3252ff 100644
--- a/devtools/create_mm/files/mm1/strings_en.yml
+++ b/devtools/create_mm/files/mm1/strings_en.yml
@@ -1205,7 +1205,7 @@ maps:
map14:
words: "Carved on a block of ice are the words:\nStart at 15-7 and walk to Doom!"
- passage: "A secret passage to Ddoom, take it (Y/N)?"
+ passage: "A secret passage to Doom, take it (Y/N)?"
pool: "The pool of health grants those who are\nworthy +4 endurance!"
surrounded: "You've been surrounded by the Dark Riderand his men! He challenges you to a duel...accept (Y/N)?"
castle: "The fabeled Castle Doom!\nWill you enter (Y/N)?"
@@ -1217,6 +1217,8 @@ maps:
percella1: "I am Percella the druid and i have what\nyou need. But promise me that you won't\nhelp that demonic menace. Accept (Y/N)?"
percella2: "Then meet my pets!"
its_hot: "It's hot!"
+ emap15:
+ body: "The dragon's body disappears, except for a shiny tooth!"
map16:
loser: "Loser!\n"
More information about the Scummvm-git-logs
mailing list