[Scummvm-git-logs] scummvm master -> 3de760d625533d6a377763ca05bbf78246607d13
dreammaster
noreply at scummvm.org
Sun Apr 9 02:29:11 UTC 2023
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a6baa730e9 MM: MM1: Further fixes to color questions view
f1f6eba047 MM: MM1: Show party when answering colors in enhanced mode
2d2a2d66c6 MM: MM1: Check for party all dead when color questions finish
3de760d625 MM: MM1: Added death screen
Commit: a6baa730e9405eb3bfa0767b232a9ff161e7c0e9
https://github.com/scummvm/scummvm/commit/a6baa730e9405eb3bfa0767b232a9ff161e7c0e9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-04-08T19:28:43-07:00
Commit Message:
MM: MM1: Further fixes to color questions view
Changed paths:
engines/mm/mm1/views/color_questions.cpp
engines/mm/mm1/views_enh/color_questions.cpp
diff --git a/engines/mm/mm1/views/color_questions.cpp b/engines/mm/mm1/views/color_questions.cpp
index f5ffe8d434b..668f9a479d2 100644
--- a/engines/mm/mm1/views/color_questions.cpp
+++ b/engines/mm/mm1/views/color_questions.cpp
@@ -48,17 +48,17 @@ bool ColorQuestions::msgFocus(const FocusMessage &msg) {
void ColorQuestions::draw() {
clearSurface();
- writeString(0, 0, STRING["maps.map17.color"]);
- writeString(0, 2, STRING["maps.map17.options"]);
+ if (!_showingResponse) {
+ writeString(0, 0, STRING["maps.map17.color"]);
+ writeString(0, 2, STRING["maps.map17.options"]);
- if (_showingResponse) {
+ } else {
const Character &c = g_globals->_party[_charIndex];
Common::String result = STRING[c.hasBadCondition() ?
"maps.map17.wrong" : "maps.map17.correct"];
- writeString(16, 6, result);
+ writeString(16, 2, result);
}
-
}
bool ColorQuestions::msgKeypress(const KeypressMessage &msg) {
@@ -69,7 +69,7 @@ bool ColorQuestions::msgKeypress(const KeypressMessage &msg) {
Maps::Map17 &map = *static_cast<Maps::Map17 *>(g_maps->_currentMap);
map[COLOR] = msg.ascii - '1';
- Character &c = *g_globals->_currCharacter;
+ Character &c = g_globals->_party[_charIndex];
int color = c._flags[2] & 0xf;
// If a color hasn't been designated yet from talking to Gypsy,
@@ -84,6 +84,7 @@ bool ColorQuestions::msgKeypress(const KeypressMessage &msg) {
// Show the response
_showingResponse = true;
redraw();
+ delaySeconds(2);
return true;
}
diff --git a/engines/mm/mm1/views_enh/color_questions.cpp b/engines/mm/mm1/views_enh/color_questions.cpp
index 992db51200b..f759aadd5e1 100644
--- a/engines/mm/mm1/views_enh/color_questions.cpp
+++ b/engines/mm/mm1/views_enh/color_questions.cpp
@@ -47,25 +47,25 @@ bool ColorQuestions::msgFocus(const FocusMessage &msg) {
void ColorQuestions::draw() {
ScrollView::draw();
-
setReduced(false);
- writeLine(0, STRING["maps.map17.color"]);
- setReduced(true);
- for (int option = 0; option < 8; ++option) {
- Common::String prefix = Common::String::format("%c) ", '1' + option);
- writeLine(option / 2 + 1, prefix, ALIGN_RIGHT, 20 + 105 * (option % 2));
- writeString(STRING[Common::String::format("maps.emap17.options.%d", option + 1)]);
- }
+ if (!_showingResponse) {
+ writeString(0, 0, STRING["maps.map17.color"]);
+
+ setReduced(true);
+ for (int option = 0; option < 8; ++option) {
+ Common::String prefix = Common::String::format("%c) ", '1' + option);
+ writeString(20 + 105 * (option % 2), 10 + (option / 2) * 8, prefix, ALIGN_RIGHT);
+ writeString(STRING[Common::String::format("maps.emap17.options.%d", option + 1)]);
+ }
- if (_showingResponse) {
+ } else {
const Character &c = g_globals->_party[_charIndex];
Common::String result = STRING[c.hasBadCondition() ?
"maps.map17.wrong" : "maps.map17.correct"];
- writeString(16, 6, result);
+ writeLine(1, result, ALIGN_MIDDLE);
}
-
}
bool ColorQuestions::msgKeypress(const KeypressMessage &msg) {
@@ -76,7 +76,7 @@ bool ColorQuestions::msgKeypress(const KeypressMessage &msg) {
Maps::Map17 &map = *static_cast<Maps::Map17 *>(g_maps->_currentMap);
map[COLOR] = msg.ascii - '1';
- Character &c = *g_globals->_currCharacter;
+ Character &c = g_globals->_party[_charIndex];
int color = c._flags[2] & 0xf;
// If a color hasn't been designated yet from talking to Gypsy,
@@ -91,6 +91,7 @@ bool ColorQuestions::msgKeypress(const KeypressMessage &msg) {
// Show the response
_showingResponse = true;
redraw();
+ delaySeconds(2);
return true;
}
Commit: f1f6eba047c14ee29771b5bed85672fb0b89c993
https://github.com/scummvm/scummvm/commit/f1f6eba047c14ee29771b5bed85672fb0b89c993
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-04-08T19:28:44-07:00
Commit Message:
MM: MM1: Show party when answering colors in enhanced mode
Changed paths:
engines/mm/mm1/views_enh/color_questions.cpp
diff --git a/engines/mm/mm1/views_enh/color_questions.cpp b/engines/mm/mm1/views_enh/color_questions.cpp
index f759aadd5e1..5a3afb912eb 100644
--- a/engines/mm/mm1/views_enh/color_questions.cpp
+++ b/engines/mm/mm1/views_enh/color_questions.cpp
@@ -31,7 +31,7 @@ namespace ViewsEnh {
#define CORRECT_ANSWERS 511
ColorQuestions::ColorQuestions() : ScrollView("ColorQuestions") {
- setBounds(Common::Rect(0, 144, 234, 200));
+ setBounds(Common::Rect(0, 88, 234, 144));
}
bool ColorQuestions::msgFocus(const FocusMessage &msg) {
@@ -46,6 +46,11 @@ bool ColorQuestions::msgFocus(const FocusMessage &msg) {
}
void ColorQuestions::draw() {
+ // Highlight next character to answer question
+ g_globals->_currCharacter = &g_globals->_party[_charIndex];
+ g_events->send("GameParty", GameMessage("CHAR_HIGHLIGHT", (int)true));
+
+ // Draw view
ScrollView::draw();
setReduced(false);
Commit: 2d2a2d66c6689229c3ff22b39d484b031e06525d
https://github.com/scummvm/scummvm/commit/2d2a2d66c6689229c3ff22b39d484b031e06525d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-04-08T19:28:44-07:00
Commit Message:
MM: MM1: Check for party all dead when color questions finish
Changed paths:
engines/mm/mm1/views/color_questions.cpp
engines/mm/mm1/views_enh/color_questions.cpp
diff --git a/engines/mm/mm1/views/color_questions.cpp b/engines/mm/mm1/views/color_questions.cpp
index 668f9a479d2..192212ed8c4 100644
--- a/engines/mm/mm1/views/color_questions.cpp
+++ b/engines/mm/mm1/views/color_questions.cpp
@@ -110,6 +110,8 @@ void ColorQuestions::timeout() {
g_maps->_mapPos.y = 2;
g_maps->_currentMap->updateGame();
+ g_globals->_party.checkPartyDead();
+
} else {
// Prompt response for next party member
redraw();
diff --git a/engines/mm/mm1/views_enh/color_questions.cpp b/engines/mm/mm1/views_enh/color_questions.cpp
index 5a3afb912eb..2e28aaac85d 100644
--- a/engines/mm/mm1/views_enh/color_questions.cpp
+++ b/engines/mm/mm1/views_enh/color_questions.cpp
@@ -122,6 +122,8 @@ void ColorQuestions::timeout() {
g_maps->_mapPos.y = 2;
g_maps->_currentMap->updateGame();
+ g_globals->_party.checkPartyDead();
+
} else {
// Prompt response for next party member
redraw();
Commit: 3de760d625533d6a377763ca05bbf78246607d13
https://github.com/scummvm/scummvm/commit/3de760d625533d6a377763ca05bbf78246607d13
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-04-08T19:28:44-07:00
Commit Message:
MM: MM1: Added death screen
Changed paths:
A engines/mm/mm1/views_enh/dead.cpp
A engines/mm/mm1/views_enh/dead.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 b129fbe5cc0..0cf33a2e8b2 100644
--- a/devtools/create_mm/files/mm1/strings_en.yml
+++ b/devtools/create_mm/files/mm1/strings_en.yml
@@ -83,12 +83,12 @@ dialogs:
start_over: "'esc' start over"
name: "name:"
dead:
- 1: "the shadow of death"
+ 1: "The shadow of death"
2: "has fallen upon your party!"
- 3: "fortunately, you may renew"
+ 3: "Fortunately, you may renew"
4: "your quest from the last"
5: "inn in which you stayed"
- 6: "by pressing 'enter'"
+ 6: "by pressing 'Enter'"
inn:
title: "(%c) Inn of "
to_view: "to view"
diff --git a/engines/mm/mm1/views_enh/dead.cpp b/engines/mm/mm1/views_enh/dead.cpp
new file mode 100644
index 00000000000..7e4cedd4804
--- /dev/null
+++ b/engines/mm/mm1/views_enh/dead.cpp
@@ -0,0 +1,64 @@
+/* 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/dead.h"
+#include "mm/mm1/globals.h"
+#include "mm/mm1/sound.h"
+
+namespace MM {
+namespace MM1 {
+namespace ViewsEnh {
+
+bool Dead::msgFocus(const FocusMessage &msg) {
+ TextView::msgFocus(msg);
+ Sound::sound2(SOUND_4);
+
+ g_globals->_party.clear();
+ g_globals->_roster.load();
+ g_globals->_activeSpells.clear();
+
+ return true;
+}
+
+void Dead::draw() {
+ ScrollView::draw();
+ setReduced(false);
+
+ writeLine(4, STRING["dialogs.dead.1"], ALIGN_MIDDLE);
+ writeLine(6, STRING["dialogs.dead.2"], ALIGN_MIDDLE);
+ writeLine(8, STRING["dialogs.dead.3"], ALIGN_MIDDLE);
+ writeLine(10, STRING["dialogs.dead.4"], ALIGN_MIDDLE);
+ writeLine(12, STRING["dialogs.dead.5"], ALIGN_MIDDLE);
+ writeLine(14, STRING["dialogs.dead.6"], ALIGN_MIDDLE);
+}
+
+bool Dead::msgAction(const ActionMessage &msg) {
+ if (msg._action == KEYBIND_SELECT) {
+ replaceView("MainMenu");
+ return true;
+ }
+
+ return false;
+}
+
+} // namespace Views
+} // namespace MM1
+} // namespace MM
diff --git a/engines/mm/mm1/views_enh/dead.h b/engines/mm/mm1/views_enh/dead.h
new file mode 100644
index 00000000000..f322ace2a6e
--- /dev/null
+++ b/engines/mm/mm1/views_enh/dead.h
@@ -0,0 +1,45 @@
+/* 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_DEAD_H
+#define MM1_VIEWS_ENH_DEAD_H
+
+#include "mm/mm1/views_enh/scroll_view.h"
+
+namespace MM {
+namespace MM1 {
+namespace ViewsEnh {
+
+class Dead : public ScrollView {
+public:
+ Dead() : ScrollView("Dead") {}
+ virtual ~Dead() {}
+
+ bool msgFocus(const FocusMessage &msg) override;
+ void draw() override;
+ bool msgAction(const ActionMessage &msg) override;
+};
+
+} // namespace ViewsEnh
+} // namespace MM1
+} // namespace MM
+
+#endif
diff --git a/engines/mm/mm1/views_enh/dialogs.h b/engines/mm/mm1/views_enh/dialogs.h
index 4e9411dd242..279fef4c34b 100644
--- a/engines/mm/mm1/views_enh/dialogs.h
+++ b/engines/mm/mm1/views_enh/dialogs.h
@@ -33,6 +33,7 @@
#include "mm/mm1/views_enh/combat.h"
#include "mm/mm1/views_enh/confirm.h"
#include "mm/mm1/views_enh/create_characters.h"
+#include "mm/mm1/views_enh/dead.h"
#include "mm/mm1/views_enh/encounter.h"
#include "mm/mm1/views_enh/exchange.h"
#include "mm/mm1/views_enh/game.h"
@@ -105,6 +106,7 @@ private:
ViewsEnh::Combat _combat;
ViewsEnh::Confirm _confirm;
ViewsEnh::CreateCharacters _createCharacters;
+ ViewsEnh::Dead _dead;
ViewsEnh::Encounter _encounter;
ViewsEnh::Exchange _exchange;
ViewsEnh::Game _game;
diff --git a/engines/mm/module.mk b/engines/mm/module.mk
index 419c911678b..e738bcce6b2 100644
--- a/engines/mm/module.mk
+++ b/engines/mm/module.mk
@@ -142,6 +142,7 @@ MODULE_OBJS += \
mm1/views_enh/combat.o \
mm1/views_enh/confirm.o \
mm1/views_enh/create_characters.o \
+ mm1/views_enh/dead.o \
mm1/views_enh/dialogs.o \
mm1/views_enh/encounter.o \
mm1/views_enh/exchange.o \
More information about the Scummvm-git-logs
mailing list