aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2018-04-03 21:13:44 -0400
committerPaul Gilbert2018-04-03 21:13:44 -0400
commite5c4adb3c0ecdc74df2f5edc69f19af265f93be2 (patch)
tree3cdf133d27735aabb8e52cb45096ac047c3e4a3c /engines
parent0f82830778c0d45b851b260f3acfcd8f87b5cb3f (diff)
downloadscummvm-rg350-e5c4adb3c0ecdc74df2f5edc69f19af265f93be2.tar.gz
scummvm-rg350-e5c4adb3c0ecdc74df2f5edc69f19af265f93be2.tar.bz2
scummvm-rg350-e5c4adb3c0ecdc74df2f5edc69f19af265f93be2.zip
XEEN: Fixes for fighting in the Warzone
Diffstat (limited to 'engines')
-rw-r--r--engines/xeen/locations.cpp11
-rw-r--r--engines/xeen/map.cpp3
2 files changed, 7 insertions, 7 deletions
diff --git a/engines/xeen/locations.cpp b/engines/xeen/locations.cpp
index 552b1c899d..29e3555dd9 100644
--- a/engines/xeen/locations.cpp
+++ b/engines/xeen/locations.cpp
@@ -1143,9 +1143,9 @@ int ArenaLocation::show() {
}
Common::String format = map._events._text[3];
- Common::String count = Common::String::format("%05u", party._activeParty[0]._awards[WARZONE_AWARD]);
- int numIdx = count[3] == '1' ? 0 : count[4] - '0';
- Common::String msg = Common::String::format(format.c_str(), count.c_str(), SUFFIXES[numIdx]);
+ int count = party._activeParty[0]._awards[WARZONE_AWARD];
+ int suffixNum = (count < 10) ? count : 0;
+ Common::String msg = Common::String::format(format.c_str(), count, SUFFIXES[suffixNum]);
LocationMessage::show(27, Res.WARZONE_BATTLE_MASTER, msg, 1);
@@ -1161,8 +1161,7 @@ int ArenaLocation::show() {
}
}
- check = LocationMessage::show(27, Res.WARZONE_BATTLE_MASTER,
- map._events._text[0].c_str(), 300);
+ check = LocationMessage::show(27, Res.WARZONE_BATTLE_MASTER, map._events._text[0].c_str(), 0);
if (!check) {
LocationMessage::show(27, Res.WARZONE_BATTLE_MASTER,
map._events._text[1].c_str(), 300);
@@ -1187,7 +1186,7 @@ int ArenaLocation::show() {
if (howMany == 0)
goto exit;
- LocationMessage::show(27, Res.WARZONE_BATTLE_MASTER, map._events._text[2], 300);
+ LocationMessage::show(27, Res.WARZONE_BATTLE_MASTER, map._events._text[2], 1);
// Clear monsters array
party._mazeDirection = DIR_EAST;
diff --git a/engines/xeen/map.cpp b/engines/xeen/map.cpp
index b0c269cdab..5420f74941 100644
--- a/engines/xeen/map.cpp
+++ b/engines/xeen/map.cpp
@@ -525,7 +525,8 @@ void MonsterObjectData::clearMonsterSprites() {
void MonsterObjectData::addMonsterSprites(MazeMonster &monster) {
Map &map = *g_vm->_map;
- int imgNumber = map._monsterData[monster._spriteId]._imageNumber;
+ monster._monsterData = &map._monsterData[monster._spriteId];
+ int imgNumber = monster._monsterData->_imageNumber;
uint idx;
// Find the sprites for the monster, loading them in if necessary