diff options
author | Paul Gilbert | 2018-02-17 23:11:43 -0500 |
---|---|---|
committer | Paul Gilbert | 2018-02-17 23:11:43 -0500 |
commit | c5981a1fad9c107e05d0a66eb42305823481863b (patch) | |
tree | c0ce1897cab1e4db56b04bbf3c946150d23736e2 /engines/xeen/dialogs_party.cpp | |
parent | 9c2e71fd52ba49e60f0a47b4b01058db96767ec2 (diff) | |
download | scummvm-rg350-c5981a1fad9c107e05d0a66eb42305823481863b.tar.gz scummvm-rg350-c5981a1fad9c107e05d0a66eb42305823481863b.tar.bz2 scummvm-rg350-c5981a1fad9c107e05d0a66eb42305823481863b.zip |
XEEN: Fix dice animation in Create Character dialog
Diffstat (limited to 'engines/xeen/dialogs_party.cpp')
-rw-r--r-- | engines/xeen/dialogs_party.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/engines/xeen/dialogs_party.cpp b/engines/xeen/dialogs_party.cpp index de80a299e3..12d807488c 100644 --- a/engines/xeen/dialogs_party.cpp +++ b/engines/xeen/dialogs_party.cpp @@ -461,7 +461,7 @@ void PartyDialog::createChar() { // Get the display of the rolled character details selectedClass = newCharDetails(attribs, allowedClasses, race, sex, classId, selectedClass, details); - Common::String msg = Common::String::format(Res.CREATE_CHAR_DETAILS, + msg = Common::String::format(Res.CREATE_CHAR_DETAILS, details.c_str()); // Draw the screen @@ -867,6 +867,9 @@ void PartyDialog::drawDice(SpriteResource &dice) { EventsManager &events = *_vm->_events; Windows &windows = *_vm->_windows; Window &w = windows[32]; + Common::Point diceSize = dice.getFrameSize(0); + + events.updateGameCounter(); dice.draw(w, 7, Common::Point(12, 11)); for (int diceNum = 0; diceNum < 3; ++diceNum) { @@ -876,16 +879,16 @@ void PartyDialog::drawDice(SpriteResource &dice) { if (_dicePos[diceNum].x < 13) { _dicePos[diceNum].x = 13; _diceInc[diceNum].x *= -1; - } else if (_dicePos[diceNum].x >= 163) { - _dicePos[diceNum].x = 163; + } else if (_dicePos[diceNum].x >= (163 - diceSize.x)) { + _dicePos[diceNum].x = 163 - diceSize.x; _diceInc[diceNum].x *= -1; } if (_dicePos[diceNum].y < 12) { _dicePos[diceNum].y = 12; _diceInc[diceNum].y *= -1; - } else if (_dicePos[diceNum].y >= 93) { - _dicePos[diceNum].y = 93; + } else if (_dicePos[diceNum].y >= (93 - diceSize.y)) { + _dicePos[diceNum].y = 93 - diceSize.y; _diceInc[diceNum].y *= -1; } |