[Scummvm-git-logs] scummvm master -> 455e6d1779fd9754e447c73d353519f534693815
dreammaster
noreply at scummvm.org
Fri May 19 05:32:33 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:
b2d06cc4cd MM: MM1: Added changes for map 42
455e6d1779 MM: MM1: Fix Y position of interaction dialog buttons
Commit: b2d06cc4cd3dc0a919fea4bdd239430d6210dc4d
https://github.com/scummvm/scummvm/commit/b2d06cc4cd3dc0a919fea4bdd239430d6210dc4d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-05-18T22:32:18-07:00
Commit Message:
MM: MM1: Added changes for map 42
Changed paths:
A engines/mm/mm1/views_enh/interactions/dog_statue.cpp
A engines/mm/mm1/views_enh/interactions/dog_statue.h
devtools/create_mm/files/mm1/strings_en.yml
engines/mm/mm1/views_enh/dialogs.h
engines/mm/mm1/views_enh/interactions/interaction.cpp
engines/mm/mm1/views_enh/interactions/interaction.h
engines/mm/mm1/views_enh/interactions/lord_archer.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 c40882d36ba..0a8f2485f47 100644
--- a/devtools/create_mm/files/mm1/strings_en.yml
+++ b/devtools/create_mm/files/mm1/strings_en.yml
@@ -948,6 +948,8 @@ maps:
passage_outside2: "Passage outside, exit (Y/N)?"
accept: "Accept"
decline: "Decline"
+ yes: "\x01""37Yes"
+ no: "\x01""37No"
desert:
its_hot: "It's hot... "
@@ -1606,32 +1608,32 @@ maps:
boulder: "A boulder says: \"There should be 5 tests\""
title: "Lord Archer"
archer: "\"I am Lord Archer, the raven.\nI take from those who have and give to those who have not! Submit (Y/N)?\""
- yes: "\x01""37Yes"
- no: "\x01""37No"
map41:
message3: "Etched in gold, message 3 reads:\nFor-tasks-and-rating.-be-from-6th-\nfrustrations!-the-to-in"
dung: "Minotaur dung slushes beneath you!"
sign1: "The enchanted chamber"
sign2: "Cleptomian guild, do not disturb!"
- sign3: "The council of strength is in session"
- sign4: "The uglies club - members only!"
+ sign3: "The Council of Strength is in session"
+ sign4: "The Uglies Club - Members only!"
sign5: "Specimen tank - keep closed"
stairs_up: "Spiralling stairs go up,take them (Y/N)?"
tapestry1: "A tapestry on the wall depicts a gray\nminotaur stomping on a group of knights."
tapestry2: "A tapestry on the wall depicts\na kingdom ruled by minotaurs"
emap41:
- message3: "Etched in gold, message 3 reads:\n\"For-tasks-and-rating.-be-from-6th-\nfrustrations!-the-to-in\""
+ message3: "Etched in gold, message 3 reads:\n\"For-tasks-and-rating.-Be-from-\n6th-frustrations!-The-to-in\""
+ stairs_up: "Spiralling stairs go up, take them (Y/N)?"
map42:
message9: "Etched in gold, message 9 reads:\nSuccessful-that-training,-the-worthy-\nthe-visit-yet-inner-reality,-order,"
defeated: "The master of this stronghold\nhas been defeated!"
sign1: "Enter the maze of the minotaur...\nif you dare!"
statue1: "Standing atop a pedestal in the center\nof the room is a statue of a small sable\nand white dog. "
- statue2: "It comes to life and\nspeaks,\"Congratulations, you've\ncompleted a major quest (+10000 exp)\nremember b.j.!\""
+ statue2: "It comes to life and\nspeaks,\"Congratulations, you've\ncompleted a major quest (+10000 exp)\nRemember B.J.!\""
statue3: "Desecrate it (Y/N)?"
- emap43:
- message9: "Etched in gold, message 9 reads:\n\"Successful-that-training,-the-worthy-\nthe-visit-yet-inner-reality,-order,\""
+ emap42:
+ title: "Dog Statue"
+ message9: "Etched in gold, message 9 reads:\n\"Successful-that-training,-the-\nworthy-the-visit-yet-inner-\nreality,-order,\""
map43:
exit: "Exit castle, (Y/N)?"
diff --git a/engines/mm/mm1/views_enh/dialogs.h b/engines/mm/mm1/views_enh/dialogs.h
index a4a6188e22c..d508ae6f043 100644
--- a/engines/mm/mm1/views_enh/dialogs.h
+++ b/engines/mm/mm1/views_enh/dialogs.h
@@ -58,6 +58,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/dog_statue.h"
#include "mm/mm1/views_enh/interactions/ghost.h"
#include "mm/mm1/views_enh/interactions/giant.h"
#include "mm/mm1/views_enh/interactions/gypsy.h"
@@ -94,6 +95,7 @@ private:
ViewsEnh::Interactions::Arenko _arenko;
ViewsEnh::Interactions::Arrested _arrested;
ViewsEnh::Interactions::Chess _chess;
+ ViewsEnh::Interactions::DogStatue _dogStatue;
ViewsEnh::Interactions::Ghost _ghost;
ViewsEnh::Interactions::Giant _giant;
ViewsEnh::Interactions::Gypsy _gypsy;
diff --git a/engines/mm/mm1/views_enh/interactions/dog_statue.cpp b/engines/mm/mm1/views_enh/interactions/dog_statue.cpp
new file mode 100644
index 00000000000..628d77c3d0d
--- /dev/null
+++ b/engines/mm/mm1/views_enh/interactions/dog_statue.cpp
@@ -0,0 +1,97 @@
+/* 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/dog_statue.h"
+#include "mm/mm1/maps/map42.h"
+#include "mm/mm1/globals.h"
+#include "mm/mm1/sound.h"
+
+namespace MM {
+namespace MM1 {
+namespace ViewsEnh {
+namespace Interactions {
+
+DogStatue::DogStatue() : Interaction("DogStatue") {
+ _title = STRING["maps.emap42.title"];
+}
+
+bool DogStatue::msgFocus(const FocusMessage &msg) {
+ Sound::sound(SOUND_2);
+
+ _completedQuests = false;
+ for (uint i = 0; i < g_globals->_party.size(); ++i) {
+ if ((g_globals->_party[i]._flags[0] &
+ (CHARFLAG0_COURIER3 | CHARFLAG0_FOUND_CHEST | CHARFLAG0_40)) ==
+ (CHARFLAG0_COURIER3 | CHARFLAG0_FOUND_CHEST | CHARFLAG0_40)) {
+ _completedQuests = true;
+ break;
+ }
+ }
+
+ clearButtons();
+
+ if (_completedQuests) {
+ addText(Common::String::format("%s%s",
+ STRING["maps.map42.statue1"].c_str(),
+ STRING["maps.map42.statue2"].c_str()
+ ));
+ } else {
+ addText(Common::String::format("%s%s",
+ STRING["maps.map42.statue1"].c_str(),
+ STRING["maps.map42.statue3"].c_str()
+ ));
+
+ addButton(STRING["maps.yes"], 'Y');
+ addButton(STRING["maps.no"], 'N');
+ }
+
+ return TextView::msgFocus(msg);
+}
+
+bool DogStatue::msgKeypress(const KeypressMessage &msg) {
+ MM1::Maps::Map42 &map = *static_cast<MM1::Maps::Map42 *>(g_maps->_currentMap);
+
+ if (_completedQuests) {
+ close();
+ map.dogSuccess();
+
+ } else if (msg.keycode == Common::KEYCODE_y || msg.keycode == Common::KEYCODE_n) {
+ close();
+
+ if (msg.keycode == Common::KEYCODE_y)
+ map.dogDesecrate();
+ }
+
+ return true;
+}
+
+void DogStatue::viewAction() {
+ MM1::Maps::Map42 &map = *static_cast<MM1::Maps::Map42 *>(g_maps->_currentMap);
+
+ close();
+ if (_completedQuests)
+ map.dogSuccess();
+}
+
+} // namespace Interactions
+} // namespace ViewsEnh
+} // namespace MM1
+} // namespace MM
diff --git a/engines/mm/mm1/views_enh/interactions/dog_statue.h b/engines/mm/mm1/views_enh/interactions/dog_statue.h
new file mode 100644
index 00000000000..4d330aea616
--- /dev/null
+++ b/engines/mm/mm1/views_enh/interactions/dog_statue.h
@@ -0,0 +1,54 @@
+/* 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_DOG_STATUE_H
+#define MM1_VIEWS_ENH_INTERACTIONS_DOG_STATUE_H
+
+#include "mm/mm1/views_enh/interactions/interaction.h"
+
+namespace MM {
+namespace MM1 {
+namespace ViewsEnh {
+namespace Interactions {
+
+class DogStatue : public Interaction {
+private:
+ bool _completedQuests = false;
+protected:
+ /**
+ * Handles any action/press
+ */
+ void viewAction() override;
+
+public:
+ DogStatue();
+ virtual ~DogStatue() {}
+
+ bool msgFocus(const FocusMessage &msg) override;
+ bool msgKeypress(const KeypressMessage &msg) override;
+};
+
+} // namespace Interactions
+} // namespace ViewsEnh
+} // namespace MM1
+} // namespace MM
+
+#endif
diff --git a/engines/mm/mm1/views_enh/interactions/interaction.cpp b/engines/mm/mm1/views_enh/interactions/interaction.cpp
index dc7bdbe1c63..f73018ebecf 100644
--- a/engines/mm/mm1/views_enh/interactions/interaction.cpp
+++ b/engines/mm/mm1/views_enh/interactions/interaction.cpp
@@ -42,6 +42,7 @@ Interaction::Interaction(const Common::String &name, int portrait) : PartyView(n
}
void Interaction::addText(const Common::String &str) {
+ setReduced(false);
_lines = splitLines(searchAndReplace(str, "\n", " "));
}
diff --git a/engines/mm/mm1/views_enh/interactions/interaction.h b/engines/mm/mm1/views_enh/interactions/interaction.h
index ef9c7528701..783664812b3 100644
--- a/engines/mm/mm1/views_enh/interactions/interaction.h
+++ b/engines/mm/mm1/views_enh/interactions/interaction.h
@@ -98,7 +98,7 @@ protected:
}
public:
- Interaction(const Common::String &name, int portrait);
+ Interaction(const Common::String &name, int portrait = -1);
/**
* Handles game messages
diff --git a/engines/mm/mm1/views_enh/interactions/lord_archer.cpp b/engines/mm/mm1/views_enh/interactions/lord_archer.cpp
index e8d73236669..f22863d88a0 100644
--- a/engines/mm/mm1/views_enh/interactions/lord_archer.cpp
+++ b/engines/mm/mm1/views_enh/interactions/lord_archer.cpp
@@ -32,8 +32,8 @@ namespace Interactions {
LordArcher::LordArcher() : Interaction("LordArcher", 33) {
_title = STRING["maps.emap40.title"];
addText(STRING["maps.emap40.archer"]);
- addButton(STRING["maps.map40.yes"], 'Y');
- addButton(STRING["maps.map40.no"], 'N');
+ addButton(STRING["maps.yes"], 'Y');
+ addButton(STRING["maps.no"], 'N');
}
bool LordArcher::msgKeypress(const KeypressMessage &msg) {
diff --git a/engines/mm/module.mk b/engines/mm/module.mk
index eb69b206292..cf07f2340e7 100644
--- a/engines/mm/module.mk
+++ b/engines/mm/module.mk
@@ -185,6 +185,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/dog_statue.o \
mm1/views_enh/interactions/giant.o \
mm1/views_enh/interactions/ghost.o \
mm1/views_enh/interactions/gypsy.o \
Commit: 455e6d1779fd9754e447c73d353519f534693815
https://github.com/scummvm/scummvm/commit/455e6d1779fd9754e447c73d353519f534693815
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-05-18T22:32:18-07:00
Commit Message:
MM: MM1: Fix Y position of interaction dialog buttons
Changed paths:
devtools/create_mm/files/mm1/strings_en.yml
engines/mm/mm1/views_enh/interactions/interaction.cpp
engines/mm/mm1/views_enh/interactions/prisoners.cpp
diff --git a/devtools/create_mm/files/mm1/strings_en.yml b/devtools/create_mm/files/mm1/strings_en.yml
index 0a8f2485f47..2c7fedb5446 100644
--- a/devtools/create_mm/files/mm1/strings_en.yml
+++ b/devtools/create_mm/files/mm1/strings_en.yml
@@ -1522,7 +1522,7 @@ maps:
inspectron3: "\"Return not until thy quest is complete\""
inspectron4: "\"Sorry, but since you are currently\nquested, i can't engage your services.\""
inspectron5: "Well done, quest complete! +%u exp"
- message: "Etched in silver, message a reads:\natis-19-31ud54aeupi1"
+ message: "Etched in silver, message A reads:\natis-19-31ud54aeupi1"
slide: "A slide!"
vault: "Empty vault, alarm!"
emap35:
@@ -1645,7 +1645,7 @@ maps:
ironfist3: "\"Return not until thy quest is complete\""
ironfist4: "\"Sorry, but since you are currently\nquested, i can't engage your services.\""
ironfist5: "Well done, quest complete! +%u exp"
- message_b: "Etched in silver, message b reads:\nrstia-,e1,;/11rn;/m-"
+ message_b: "Etched in silver, message B reads:\nrstia-,e1,;/11rn;/m-"
guards: "Castle guards exclaim,\n\"No merchants pass! Begone peasants.\""
quests:
1: "Find the stronghold in ravens wood"
diff --git a/engines/mm/mm1/views_enh/interactions/interaction.cpp b/engines/mm/mm1/views_enh/interactions/interaction.cpp
index f73018ebecf..2bfd9f9bf1a 100644
--- a/engines/mm/mm1/views_enh/interactions/interaction.cpp
+++ b/engines/mm/mm1/views_enh/interactions/interaction.cpp
@@ -83,7 +83,7 @@ void Interaction::draw() {
// Write out any buttons
if (!_buttons.empty()) {
- _textPos = Common::Point(0, (8 + _lines.size()) * 8);
+ _textPos = Common::Point(0, (6 + _lines.size()) * 9);
setReduced(true);
// Create a blank button
diff --git a/engines/mm/mm1/views_enh/interactions/prisoners.cpp b/engines/mm/mm1/views_enh/interactions/prisoners.cpp
index 4cbd07ed63c..532af6e4bad 100644
--- a/engines/mm/mm1/views_enh/interactions/prisoners.cpp
+++ b/engines/mm/mm1/views_enh/interactions/prisoners.cpp
@@ -125,7 +125,7 @@ CloakedPrisoner::CloakedPrisoner() :
}
DemonPrisoner::DemonPrisoner() :
- Prisoner("DemonPrisoner", 1, STRING["maps.prisoners.demon"],
+ Prisoner("DemonPrisoner", 41, STRING["maps.prisoners.demon"],
CHARFLAG1_10, EVIL, GOOD) {
}
More information about the Scummvm-git-logs
mailing list