[Scummvm-git-logs] scummvm master -> 872c667b2e6b3101b2ae4b0f45db7cfec32792d1
dreammaster
noreply at scummvm.org
Sat Feb 4 06:02:43 UTC 2023
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2a3da91ab0 MM: MM1: Fix display of monster attacking results
355175534e MM: MM1: Fix check for party being incapacitated
872c667b2e MM: MM1: Remove some deprecated checks for | character
Commit: 2a3da91ab09db0fa0cdc9640d93cd92919da1c09
https://github.com/scummvm/scummvm/commit/2a3da91ab09db0fa0cdc9640d93cd92919da1c09
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-02-03T21:46:37-08:00
Commit Message:
MM: MM1: Fix display of monster attacking results
Changed paths:
engines/mm/mm1/views/combat.cpp
diff --git a/engines/mm/mm1/views/combat.cpp b/engines/mm/mm1/views/combat.cpp
index 75ca7b9a5c6..d3b34e9d82a 100644
--- a/engines/mm/mm1/views/combat.cpp
+++ b/engines/mm/mm1/views/combat.cpp
@@ -645,9 +645,10 @@ void Combat::writeMonsterAttack() {
Common::String line = Common::String::format("%s %s %s",
monsterName.c_str(),
attackStyle.c_str(),
- getAttackString().c_str()
+ c._name
);
writeString(0, 20, line);
+ writeString(0, 21, getAttackString());
// It's not ideal, but we have to do some final minor damage
// adjustment here after we've written the basic damage the
@@ -667,18 +668,19 @@ void Combat::writeMonsterAttack() {
// This returns a text line to display, and can also
// adjust the damage amount. Another reason why we
// can't actually apply damage until here
+ int yp = 22;
if (monsterTouch(line))
- writeString(0, 21, line);
+ writeString(0, yp++, line);
// TODO: Maybe refactor subtractDamage to not use
// the _lines/add methods, which would make it cleaner
// to call it from here
_lines.clear();
- _lines.push_back(Line(0, 2, ""));
+ _lines.push_back(Line(0, 3, ""));
subtractDamage();
if (!_lines.back()._text.empty())
- writeString(0, 22, _lines.back()._text);
+ writeString(0, yp, _lines.back()._text);
}
}
Commit: 355175534e60dabf5c777c4e6dc07f2cd2361deb
https://github.com/scummvm/scummvm/commit/355175534e60dabf5c777c4e6dc07f2cd2361deb
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-02-03T21:51:32-08:00
Commit Message:
MM: MM1: Fix check for party being incapacitated
Changed paths:
engines/mm/mm1/data/party.cpp
diff --git a/engines/mm/mm1/data/party.cpp b/engines/mm/mm1/data/party.cpp
index ad7ffde5657..e2cb78484e3 100644
--- a/engines/mm/mm1/data/party.cpp
+++ b/engines/mm/mm1/data/party.cpp
@@ -131,10 +131,10 @@ bool Party::checkPartyIncapacitated() const {
}
if (isActive) {
+ return false;
+ } else {
g_events->replaceView("Dead", true);
return true;
- } else {
- return false;
}
}
Commit: 872c667b2e6b3101b2ae4b0f45db7cfec32792d1
https://github.com/scummvm/scummvm/commit/872c667b2e6b3101b2ae4b0f45db7cfec32792d1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-02-03T21:58:04-08:00
Commit Message:
MM: MM1: Remove some deprecated checks for | character
Originally I was going use this to wrap character names,
for formatting them in the enhanced version. However,
I've since changed all text to be lowercase by default,
and simply uppercased for the original displays
Changed paths:
engines/mm/mm1/messages.cpp
engines/mm/mm1/views/combat.cpp
engines/mm/mm1/views/text_view.cpp
diff --git a/engines/mm/mm1/messages.cpp b/engines/mm/mm1/messages.cpp
index 2ab8d9d872c..f646f571b57 100644
--- a/engines/mm/mm1/messages.cpp
+++ b/engines/mm/mm1/messages.cpp
@@ -100,13 +100,7 @@ InfoMessage &InfoMessage::operator=(const InfoMessage &src) {
}
size_t Line::size() const {
- size_t total = 0;
- for (uint i = 0; i < _text.size(); ++i) {
- if (_text[i] != '|')
- ++total;
- }
-
- return total;
+ return _text.size();
}
} // namespace MM1
diff --git a/engines/mm/mm1/views/combat.cpp b/engines/mm/mm1/views/combat.cpp
index d3b34e9d82a..19c46403da9 100644
--- a/engines/mm/mm1/views/combat.cpp
+++ b/engines/mm/mm1/views/combat.cpp
@@ -681,6 +681,7 @@ void Combat::writeMonsterAttack() {
if (!_lines.back()._text.empty())
writeString(0, yp, _lines.back()._text);
+ _lines.clear();
}
}
@@ -757,16 +758,9 @@ void Combat::shoot() {
}
void Combat::writeMessage() {
- size_t idx;
-
resetBottom();
- for (const auto &line : _message) {
- Common::String text = line._text;
- while ((idx = text.findFirstOf('|')) != Common::String::npos)
- text.deleteChar(idx);
-
- writeString(line.x, line.y, text);
- }
+ for (const auto &line : _message)
+ writeString(line.x, line.y, line._text);
}
void Combat::writeCharAttackDamage() {
diff --git a/engines/mm/mm1/views/text_view.cpp b/engines/mm/mm1/views/text_view.cpp
index ceccaf7c2d1..3954be21c23 100644
--- a/engines/mm/mm1/views/text_view.cpp
+++ b/engines/mm/mm1/views/text_view.cpp
@@ -60,8 +60,7 @@ void TextView::writeChar(int x, int y, unsigned char c) {
void TextView::writeString(const Common::String &str) {
for (const unsigned char *s = (const unsigned char *)str.c_str(); *s; ++s) {
- if (*s != '|')
- writeChar(*s);
+ writeChar(*s);
if (*s >= ' ' && _textPos.x == 0 && (*(s + 1) == '\r' || *(s + 1) == '\n'))
// Ignore carraige returns right after line wraps. The original didn't
More information about the Scummvm-git-logs
mailing list