[Scummvm-git-logs] scummvm master -> 644ef043fbd5279e2a2ff339f0feebed8d03962e
dreammaster
dreammaster at scummvm.org
Fri Jan 26 03:47:44 CET 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:
644ef043fb XEEN: Further fixes for starting falls
Commit: 644ef043fbd5279e2a2ff339f0feebed8d03962e
https://github.com/scummvm/scummvm/commit/644ef043fbd5279e2a2ff339f0feebed8d03962e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-01-25T21:47:30-05:00
Commit Message:
XEEN: Further fixes for starting falls
Changed paths:
engines/xeen/combat.cpp
engines/xeen/interface.cpp
diff --git a/engines/xeen/combat.cpp b/engines/xeen/combat.cpp
index 676f8b4..8900d13 100644
--- a/engines/xeen/combat.cpp
+++ b/engines/xeen/combat.cpp
@@ -140,6 +140,7 @@ void Combat::clearShooting() {
}
void Combat::giveCharDamage(int damage, DamageType attackType, int charIndex) {
+ Interface &intf = *_vm->_interface;
Party &party = *_vm->_party;
Scripts &scripts = *_vm->_scripts;
Sound &sound = *_vm->_sound;
@@ -228,7 +229,7 @@ void Combat::giveCharDamage(int damage, DamageType attackType, int charIndex) {
// Draw the attack effect on the character sprite
sound.playFX(fx);
- _powSprites.draw(0, frame, Common::Point(Res.CHAR_FACES_X[selectedIndex1], 150));
+ intf._charPowSprites.draw(0, frame, Common::Point(Res.CHAR_FACES_X[selectedIndex1], 150));
windows[33].update();
// Reduce damage if power shield active, and set it zero
diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp
index 0073552..625f9c6 100644
--- a/engines/xeen/interface.cpp
+++ b/engines/xeen/interface.cpp
@@ -878,17 +878,19 @@ void Interface::startFalling(bool flag) {
_falling = FALL_1;
map.load(party._mazeId);
- if (flag && map._isOutdoors && ((party._mazePosition.x & 16) || (party._mazePosition.y & 16)))
- map.getNewMaze();
+ if (flag) {
+ if (map._isOutdoors && ((party._mazePosition.x & 16) || (party._mazePosition.y & 16)))
+ map.getNewMaze();
- _flipGround ^= 1;
- draw3d(true);
- int tempVal = scripts._v2;
- scripts._v2 = 0;
- combat.giveCharDamage(party._fallDamage, DT_PHYSICAL, 0);
- scripts._v2 = tempVal;
+ _flipGround ^= 1;
+ draw3d(true);
+ int tempVal = scripts._v2;
+ scripts._v2 = 0;
+ combat.giveCharDamage(party._fallDamage, DT_PHYSICAL, 0);
- _flipGround ^= 1;
+ scripts._v2 = tempVal;
+ _flipGround ^= 1;
+ }
}
bool Interface::checkMoveDirection(int key) {
More information about the Scummvm-git-logs
mailing list