Skip to content

Commit

Permalink
TITANIC: Unmarked starviewer, fix, key directions
Browse files Browse the repository at this point in the history
Changing the fpose Y axis rotations flipped some of the keys (z,x)
so I added in negatives to fix that.

Also before slash was looking up and comma was looking down.
This is the same as the original, but I think thats less
intuitive so I have reversed that. It also makes those keys
now correct in the readme.
  • Loading branch information
dafioram committed Aug 17, 2017
1 parent 5ebc972 commit fb1e945
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions engines/titanic/star_control/star_view.cpp
Expand Up @@ -176,9 +176,8 @@ bool CStarView::KeyCharMsg(int key, CErrorCode *errorCode) {
}

case Common::KEYCODE_z:
case Common::KEYCODE_c:
if (matchedIndex == -1) {
pose.setRotationMatrix(key == Common::KEYCODE_z ? Y_AXIS : X_AXIS, 1.0);
pose.setRotationMatrix(Y_AXIS, -1.0);
_camera.proc22(pose);
_camera.updatePosition(errorCode);
return true;
Expand Down Expand Up @@ -211,7 +210,7 @@ bool CStarView::KeyCharMsg(int key, CErrorCode *errorCode) {

case Common::KEYCODE_x:
if (matchedIndex == -1) {
pose.setRotationMatrix(Y_AXIS, -1.0);
pose.setRotationMatrix(Y_AXIS, 1.0);
_camera.proc22(pose);
_camera.updatePosition(errorCode);
return true;
Expand All @@ -220,7 +219,7 @@ bool CStarView::KeyCharMsg(int key, CErrorCode *errorCode) {

case Common::KEYCODE_QUOTE:
if (matchedIndex == -1) {
pose.setRotationMatrix(X_AXIS, -1.0);
pose.setRotationMatrix(X_AXIS, 1.0);
_camera.proc22(pose);
_camera.updatePosition(errorCode);
return true;
Expand All @@ -229,7 +228,7 @@ bool CStarView::KeyCharMsg(int key, CErrorCode *errorCode) {

case Common::KEYCODE_SLASH:
if (matchedIndex == -1) {
pose.setRotationMatrix(X_AXIS, 1.0);
pose.setRotationMatrix(X_AXIS, -1.0);
_camera.proc22(pose);
_camera.updatePosition(errorCode);
return true;
Expand Down

0 comments on commit fb1e945

Please sign in to comment.