diff --git a/engines/mm/mm1/data/character.cpp b/engines/mm/mm1/data/character.cpp index d43cf434ec5..f0b4a269267 100644 --- a/engines/mm/mm1/data/character.cpp +++ b/engines/mm/mm1/data/character.cpp @@ -654,5 +654,18 @@ size_t Character::getPerformanceTotal() const { + totalFlags; } +int Character::statColor(int amount, int threshold) const { + if (amount < 1) + return 6; + else if (amount > threshold) + return 2; + else if (amount == threshold) + return 15; + else if (amount >= (threshold / 4)) + return 9; + else + return 32; +} + } // namespace MM1 } // namespace MM diff --git a/engines/mm/mm1/data/character.h b/engines/mm/mm1/data/character.h index 5d982e2da53..1f45508fb07 100644 --- a/engines/mm/mm1/data/character.h +++ b/engines/mm/mm1/data/character.h @@ -532,6 +532,12 @@ struct Character : public PrimaryAttributes { * value for the party at the end of the game */ size_t getPerformanceTotal() const; + + /** + * Returns the color to use in enhanced mode to + * represent the color of a character attribute + */ + int statColor(int amount, int threshold) const; }; } // namespace MM1 diff --git a/engines/mm/mm1/views_enh/quick_ref.cpp b/engines/mm/mm1/views_enh/quick_ref.cpp index 6332cad2ed7..d1c01d9e2d6 100644 --- a/engines/mm/mm1/views_enh/quick_ref.cpp +++ b/engines/mm/mm1/views_enh/quick_ref.cpp @@ -52,10 +52,8 @@ void QuickRef::draw() { writeString(COLUMN_NAME, 20, STRING["enhdialogs.quickref.headers.name"]); writeString(COLUMN_CLASS, 20, STRING["enhdialogs.quickref.headers.class"]); writeString(COLUMN_LEVEL, 20, STRING["enhdialogs.quickref.headers.level"], ALIGN_RIGHT); - writeString(COLUMN_HP, 20, " "); - writeString(STRING["enhdialogs.quickref.headers.hp"]); - writeString(COLUMN_SP, 20, " "); - writeString(STRING["enhdialogs.quickref.headers.sp"]); + writeString(COLUMN_HP, 20, STRING["enhdialogs.quickref.headers.hp"]); + writeString(COLUMN_SP, 20, STRING["enhdialogs.quickref.headers.sp"]); writeString(COLUMN_AC, 20, STRING["enhdialogs.quickref.headers.ac"]); writeString(COLUMN_CONDITION, 20, STRING["enhdialogs.quickref.headers.cond"]); @@ -78,8 +76,23 @@ void QuickRef::writeCharacterLine(int charNum) { writeString(COLUMN_CLASS, yp, Common::String( classStr.c_str(), classStr.c_str() + 3)); + setTextColor(c.statColor(c._level._current, c._level._base)); writeString(COLUMN_LEVEL, yp, - Common::String::format("%d", c._level), ALIGN_RIGHT); + Common::String::format("%d", c._level._current), ALIGN_RIGHT); + + setTextColor(c.statColor(c._hpCurrent, c._hpMax)); + writeNumber(COLUMN_HP, yp, c._hpCurrent); + + setTextColor(c.statColor(c._sp._current, c._sp._base)); + writeChar(COLUMN_SP, yp, ' '); + writeNumber(c._sp._current); + + setTextColor(c.statColor(c._ac._current, c._ac._base)); + writeChar(COLUMN_AC, yp, ' '); + writeNumber(c._ac._current); + + + setTextColor(0); } } // namespace Views