[Scummvm-git-logs] scummvm master -> e5c4adb3c0ecdc74df2f5edc69f19af265f93be2
dreammaster
dreammaster at scummvm.org
Wed Apr 4 03:13:45 CEST 2018
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
e5c4adb3c0 XEEN: Fixes for fighting in the Warzone
Commit: e5c4adb3c0ecdc74df2f5edc69f19af265f93be2
https://github.com/scummvm/scummvm/commit/e5c4adb3c0ecdc74df2f5edc69f19af265f93be2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-04-03T21:13:44-04:00
Commit Message:
XEEN: Fixes for fighting in the Warzone
Changed paths:
engines/xeen/locations.cpp
engines/xeen/map.cpp
diff --git a/engines/xeen/locations.cpp b/engines/xeen/locations.cpp
index 552b1c8..29e3555 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 b0c269c..5420f74 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
More information about the Scummvm-git-logs
mailing list