[Scummvm-git-logs] scummvm master -> 730de448db0193526a4b8692191374b707f78ff5
dreammaster
dreammaster at scummvm.org
Sat Apr 28 22:33:17 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:
730de448db XEEN: Revert removal of movement check code; it was necessary after all
Commit: 730de448db0193526a4b8692191374b707f78ff5
https://github.com/scummvm/scummvm/commit/730de448db0193526a4b8692191374b707f78ff5
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-04-28T16:33:10-04:00
Commit Message:
XEEN: Revert removal of movement check code; it was necessary after all
Changed paths:
engines/xeen/interface.cpp
diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp
index 390328a..fbb91aa 100644
--- a/engines/xeen/interface.cpp
+++ b/engines/xeen/interface.cpp
@@ -901,7 +901,25 @@ bool Interface::checkMoveDirection(int key) {
Map &map = *_vm->_map;
Party &party = *_vm->_party;
Sound &sound = *_vm->_sound;
+
+ // For strafing or moving backwards, temporarily move to face the direction being checked,
+ // since the call to getCell will the adjacent cell details in the direction being faced
Direction dir = party._mazeDirection;
+ switch (key) {
+ case (Common::KBD_CTRL << 16) | Common::KEYCODE_LEFT:
+ party._mazeDirection = (party._mazeDirection == DIR_NORTH) ? DIR_WEST :
+ (Direction)(party._mazeDirection - 1);
+ break;
+ case (Common::KBD_CTRL << 16) | Common::KEYCODE_RIGHT:
+ party._mazeDirection = (party._mazeDirection == DIR_WEST) ? DIR_NORTH :
+ (Direction)(party._mazeDirection + 1);
+ break;
+ case Common::KEYCODE_DOWN:
+ party._mazeDirection = (Direction)((int)party._mazeDirection ^ 2);
+ break;
+ default:
+ break;
+ }
map.getCell(7);
int startSurfaceId = map._currentSurfaceId;
More information about the Scummvm-git-logs
mailing list