aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2016-05-08 11:06:06 +0200
committerEugene Sandulenko2016-05-10 12:14:55 +0200
commitb605baef85cab9d562d541a4b14e8fbf564a8267 (patch)
tree3d71694ed30033394ba9aeb2bc25715650e2fd5e /engines
parent6e9243d125153cac1a342d716b0c18f06c88323e (diff)
downloadscummvm-rg350-b605baef85cab9d562d541a4b14e8fbf564a8267.tar.gz
scummvm-rg350-b605baef85cab9d562d541a4b14e8fbf564a8267.tar.bz2
scummvm-rg350-b605baef85cab9d562d541a4b14e8fbf564a8267.zip
GNAP: Reorder functions in grid.cpp
Diffstat (limited to 'engines')
-rw-r--r--engines/gnap/grid.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/engines/gnap/grid.cpp b/engines/gnap/grid.cpp
index b817b65102..076705cd03 100644
--- a/engines/gnap/grid.cpp
+++ b/engines/gnap/grid.cpp
@@ -38,26 +38,6 @@ void GnapEngine::initSceneGrid(int gridMinX, int gridMinY, int gridMaxX, int gri
_plat->_gridY = 347 - gridMinY;
}
-int PlayerGnap::getWalkStopSequenceId(int deltaX, int deltaY) {
- static const int gnapWalkStopSequenceIds[9] = {
- 0x7BC, 0x7BA, 0x7BA,
- 0x7BC, 0x000, 0x7BA,
- 0x7BB, 0x7B9, 0x7B9
- };
- // CHECKME This is a little weird
- return gnapWalkStopSequenceIds[3 * deltaX + 3 + 1 + deltaY];
-}
-
-Facing PlayerGnap::getWalkFacing(int deltaX, int deltaY) {
- static const Facing gnapWalkFacings[9] = {
- kDirUpLeft, kDirBottomLeft, kDirBottomLeft,
- kDirUpLeft, kDirNone, kDirBottomLeft,
- kDirUpRight, kDirBottomRight, kDirBottomRight
- };
- // CHECKME This is a little weird
- return gnapWalkFacings[3 * deltaX + 3 + 1 + deltaY];
-}
-
bool GnapEngine::isPointBlocked(Common::Point gridPos) {
return isPointBlocked(gridPos.x, gridPos.y);
}
@@ -85,6 +65,26 @@ bool GnapEngine::isPointBlocked(int gridX, int gridY) {
/******************************************************************************/
+int PlayerGnap::getWalkStopSequenceId(int deltaX, int deltaY) {
+ static const int gnapWalkStopSequenceIds[9] = {
+ 0x7BC, 0x7BA, 0x7BA,
+ 0x7BC, 0x000, 0x7BA,
+ 0x7BB, 0x7B9, 0x7B9
+ };
+ // CHECKME This is a little weird
+ return gnapWalkStopSequenceIds[3 * deltaX + 3 + 1 + deltaY];
+}
+
+Facing PlayerGnap::getWalkFacing(int deltaX, int deltaY) {
+ static const Facing gnapWalkFacings[9] = {
+ kDirUpLeft, kDirBottomLeft, kDirBottomLeft,
+ kDirUpLeft, kDirNone, kDirBottomLeft,
+ kDirUpRight, kDirBottomRight, kDirBottomRight
+ };
+ // CHECKME This is a little weird
+ return gnapWalkFacings[3 * deltaX + 3 + 1 + deltaY];
+}
+
bool PlayerGnap::findPath1(int gridX, int gridY, int index) {
_walkNodesCount = index;
_walkDirXIncr = 0;