[Scummvm-git-logs] scummvm master -> 7b2c6f8e7ca88beb252ad8822778a3e8e453e807
dreammaster
noreply at scummvm.org
Mon Apr 10 04:22:09 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:
e8177fbe31 MM: MM1: Added map 29 Og interaction
7b2c6f8e7c MM: MM1: Added map 30 giant statue interaction
Commit: e8177fbe31dfabaaf4b350caa86fbba1e45b667b
https://github.com/scummvm/scummvm/commit/e8177fbe31dfabaaf4b350caa86fbba1e45b667b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-04-09T20:58:43-07:00
Commit Message:
MM: MM1: Added map 29 Og interaction
Changed paths:
A engines/mm/mm1/views_enh/interactions/chess.cpp
A engines/mm/mm1/views_enh/interactions/chess.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/module.mk
diff --git a/devtools/create_mm/files/mm1/strings_en.yml b/devtools/create_mm/files/mm1/strings_en.yml
index a80896de089..467619f3cf3 100644
--- a/devtools/create_mm/files/mm1/strings_en.yml
+++ b/devtools/create_mm/files/mm1/strings_en.yml
@@ -1408,6 +1408,9 @@ maps:
begone: "Og says, \"Begone!\""
chess: "Painted on these grounds is a black &\nwhite checkered motif covered with\nidols similar to the ones you carry.\na large being approaches...\nOg speaks, \"Queen to queens level 3\"\n\nResponse: "
restored_sight: "You have restored my sight! (+25000 exp)\nI see an important prisoner in a castle\non Mt. Doom! he has your sight.\n\nOg curses as the idols vanish!"
+ emap29:
+ og_title: "Og"
+ og: "Painted on these grounds is a black &\nwhite checkered motif covered with idols similar to the ones you carry. A large being approaches... Og speaks, \"Queen to queens level 3\""
map30:
passage: "Passage to Dusk, enter (Y/N)?"
diff --git a/engines/mm/mm1/views_enh/dialogs.h b/engines/mm/mm1/views_enh/dialogs.h
index 27df486f91a..9f1d987b551 100644
--- a/engines/mm/mm1/views_enh/dialogs.h
+++ b/engines/mm/mm1/views_enh/dialogs.h
@@ -56,6 +56,7 @@
#include "mm/mm1/views_enh/interactions/access_code.h"
#include "mm/mm1/views_enh/interactions/arenko.h"
#include "mm/mm1/views_enh/interactions/arrested.h"
+#include "mm/mm1/views_enh/interactions/chess.h"
#include "mm/mm1/views_enh/interactions/gypsy.h"
#include "mm/mm1/views_enh/interactions/ice_princess.h"
#include "mm/mm1/views_enh/interactions/prisoners.h"
@@ -82,6 +83,7 @@ private:
ViewsEnh::Interactions::AccessCode _accessCode;
ViewsEnh::Interactions::Arenko _arenko;
ViewsEnh::Interactions::Arrested _arrested;
+ ViewsEnh::Interactions::Chess _chess;
ViewsEnh::Interactions::Gypsy _gypsy;
ViewsEnh::Interactions::IcePrincess _icePrincess;
ViewsEnh::Interactions::Resistances _resistances;
diff --git a/engines/mm/mm1/views_enh/interactions/chess.cpp b/engines/mm/mm1/views_enh/interactions/chess.cpp
new file mode 100644
index 00000000000..666affd47f0
--- /dev/null
+++ b/engines/mm/mm1/views_enh/interactions/chess.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/chess.h"
+#include "mm/mm1/maps/map29.h"
+#include "mm/mm1/globals.h"
+
+namespace MM {
+namespace MM1 {
+namespace ViewsEnh {
+namespace Interactions {
+
+Chess::Chess() : InteractionQuery("Chess", 23, 13) {
+ _title = STRING["maps.emap29.og_title"];
+ addText(STRING["maps.map29.og"]);
+}
+
+void Chess::answerEntered() {
+ MM1::Maps::Map29 &map = *static_cast<MM1::Maps::Map29 *>(g_maps->_currentMap);
+ map.chessAnswer(_answer);
+}
+
+} // namespace Interactions
+} // namespace ViewsEnh
+} // namespace MM1
+} // namespace MM
diff --git a/engines/mm/mm1/views_enh/interactions/chess.h b/engines/mm/mm1/views_enh/interactions/chess.h
new file mode 100644
index 00000000000..1f5b75466cf
--- /dev/null
+++ b/engines/mm/mm1/views_enh/interactions/chess.h
@@ -0,0 +1,49 @@
+/* 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_CHESS_H
+#define MM1_VIEWS_ENH_INTERACTIONS_CHESS_H
+
+#include "mm/mm1/views_enh/interactions/interaction_query.h"
+
+namespace MM {
+namespace MM1 {
+namespace ViewsEnh {
+namespace Interactions {
+
+class Chess : public InteractionQuery {
+protected:
+ /**
+ * Answer entered
+ */
+ void answerEntered() override;
+
+public:
+ Chess();
+ virtual ~Chess() {}
+};
+
+} // namespace Interactions
+} // namespace ViewsEnh
+} // namespace MM1
+} // namespace MM
+
+#endif
diff --git a/engines/mm/mm1/views_enh/interactions/interaction_query.cpp b/engines/mm/mm1/views_enh/interactions/interaction_query.cpp
index 8a305a36fc8..79fffa7b64d 100644
--- a/engines/mm/mm1/views_enh/interactions/interaction_query.cpp
+++ b/engines/mm/mm1/views_enh/interactions/interaction_query.cpp
@@ -44,7 +44,7 @@ void InteractionQuery::draw() {
return;
assert(_buttons.empty());
- int xp = (_innerBounds.width() / 2) - (_maxChars * 8 / 2);
+ int xp = 30; // (_innerBounds.width() / 2) - (_maxChars * 8 / 2);
int yp = (8 + _lines.size()) * 9 - 5;
_textEntry.display(xp, yp, _maxChars, false,
diff --git a/engines/mm/module.mk b/engines/mm/module.mk
index cd6c3c00d34..9cc9f86d299 100644
--- a/engines/mm/module.mk
+++ b/engines/mm/module.mk
@@ -181,6 +181,7 @@ MODULE_OBJS += \
mm1/views_enh/interactions/access_code.o \
mm1/views_enh/interactions/arenko.o \
mm1/views_enh/interactions/arrested.o \
+ mm1/views_enh/interactions/chess.o \
mm1/views_enh/interactions/gypsy.o \
mm1/views_enh/interactions/ice_princess.o \
mm1/views_enh/interactions/interaction.o \
Commit: 7b2c6f8e7ca88beb252ad8822778a3e8e453e807
https://github.com/scummvm/scummvm/commit/7b2c6f8e7ca88beb252ad8822778a3e8e453e807
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-04-09T21:21:46-07:00
Commit Message:
MM: MM1: Added map 30 giant statue interaction
Changed paths:
A engines/mm/mm1/views_enh/interactions/giant.cpp
A engines/mm/mm1/views_enh/interactions/giant.h
devtools/create_mm/files/mm1/strings_en.yml
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 467619f3cf3..e516e5cd341 100644
--- a/devtools/create_mm/files/mm1/strings_en.yml
+++ b/devtools/create_mm/files/mm1/strings_en.yml
@@ -1418,7 +1418,7 @@ maps:
hourglass: "At the center of the land that time\nforgot stands an hourglass,turn it(Y/N)?"
unworthy: "Not worthy!"
worthy: "Your actions reflect your views %d of 6\n+"
- giant: "Statue of a giant holding the scale of\njudgement. who will climb on (1-6)?"
+ giant: "Statue of a giant holding the Scale of\nJudgement. Who will climb on (1-6)?"
experience: "experience"
attributes:
0: "intellect"
@@ -1428,6 +1428,9 @@ maps:
4: "speed"
5: "accuracy"
6: "luck"
+ emap30:
+ hourglass: "At the center of the land that time forgot stands an hourglass, turn it (Y/N)?"
+ giant_title: "Giant"
map31:
device: "Strange alien device grants those who\nare worthy +4 intellect!"
diff --git a/engines/mm/mm1/views_enh/dialogs.h b/engines/mm/mm1/views_enh/dialogs.h
index 9f1d987b551..278167714fa 100644
--- a/engines/mm/mm1/views_enh/dialogs.h
+++ b/engines/mm/mm1/views_enh/dialogs.h
@@ -57,6 +57,7 @@
#include "mm/mm1/views_enh/interactions/arenko.h"
#include "mm/mm1/views_enh/interactions/arrested.h"
#include "mm/mm1/views_enh/interactions/chess.h"
+#include "mm/mm1/views_enh/interactions/giant.h"
#include "mm/mm1/views_enh/interactions/gypsy.h"
#include "mm/mm1/views_enh/interactions/ice_princess.h"
#include "mm/mm1/views_enh/interactions/prisoners.h"
@@ -84,6 +85,7 @@ private:
ViewsEnh::Interactions::Arenko _arenko;
ViewsEnh::Interactions::Arrested _arrested;
ViewsEnh::Interactions::Chess _chess;
+ ViewsEnh::Interactions::Giant _giant;
ViewsEnh::Interactions::Gypsy _gypsy;
ViewsEnh::Interactions::IcePrincess _icePrincess;
ViewsEnh::Interactions::Resistances _resistances;
diff --git a/engines/mm/mm1/views_enh/interactions/giant.cpp b/engines/mm/mm1/views_enh/interactions/giant.cpp
new file mode 100644
index 00000000000..53d899a739e
--- /dev/null
+++ b/engines/mm/mm1/views_enh/interactions/giant.cpp
@@ -0,0 +1,68 @@
+/* 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/giant.h"
+#include "mm/mm1/maps/map30.h"
+#include "mm/mm1/globals.h"
+#include "mm/mm1/sound.h"
+
+
+namespace MM {
+namespace MM1 {
+namespace ViewsEnh {
+namespace Interactions {
+
+Giant::Giant() : Interaction("Giant", 8) {
+ _title = STRING["maps.emap30.giant_title"];
+ _animated = false;
+}
+
+bool Giant::msgFocus(const FocusMessage &msg) {
+ PartyView::msgFocus(msg);
+
+ _charSelected = false;
+ addText(STRING["maps.map30.giant"]);
+ return true;
+}
+
+void Giant::charSwitched(Character *priorChar) {
+ Interaction::charSwitched(priorChar);
+ if (_charSelected)
+ return;
+ _charSelected = true;
+
+ MM1::Maps::Map30 &map = *static_cast<MM1::Maps::Map30 *>(g_maps->_currentMap);
+ Common::String line = map.worthiness();
+ addText(line);
+ Sound::sound(SOUND_2);
+
+ delaySeconds(5);
+ redraw();
+}
+
+void Giant::timeout() {
+ close();
+}
+
+} // namespace Interactions
+} // namespace ViewsEnh
+} // namespace MM1
+} // namespace MM
diff --git a/engines/mm/mm1/views_enh/interactions/giant.h b/engines/mm/mm1/views_enh/interactions/giant.h
new file mode 100644
index 00000000000..939f2895b74
--- /dev/null
+++ b/engines/mm/mm1/views_enh/interactions/giant.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_GIANT_H
+#define MM1_VIEWS_ENH_INTERACTIONS_GIANT_H
+
+#include "mm/mm1/views_enh/interactions/interaction.h"
+
+namespace MM {
+namespace MM1 {
+namespace ViewsEnh {
+namespace Interactions {
+
+class Giant : public Interaction {
+private:
+ bool _charSelected = false;
+
+protected:
+ /**
+ * Called when the selected character has been switched
+ */
+ void charSwitched(Character *priorChar) override;
+
+ /**
+ * Only allow a character to be selected once
+ */
+ bool canSwitchToChar(Character *dst) override {
+ return !_charSelected;
+ }
+
+public:
+ Giant();
+
+ /**
+ * Handles focus
+ */
+ bool msgFocus(const FocusMessage &msg) override;
+
+ void timeout();
+};
+
+} // namespace Interactions
+} // namespace ViewsEnh
+} // namespace MM1
+} // namespace MM
+
+#endif
diff --git a/engines/mm/module.mk b/engines/mm/module.mk
index 9cc9f86d299..1726d964979 100644
--- a/engines/mm/module.mk
+++ b/engines/mm/module.mk
@@ -182,6 +182,7 @@ MODULE_OBJS += \
mm1/views_enh/interactions/arenko.o \
mm1/views_enh/interactions/arrested.o \
mm1/views_enh/interactions/chess.o \
+ mm1/views_enh/interactions/giant.o \
mm1/views_enh/interactions/gypsy.o \
mm1/views_enh/interactions/ice_princess.o \
mm1/views_enh/interactions/interaction.o \
More information about the Scummvm-git-logs
mailing list