aboutsummaryrefslogtreecommitdiff
path: root/engines/gnap/character.cpp
diff options
context:
space:
mode:
authorStrangerke2016-05-07 10:27:22 +0200
committerEugene Sandulenko2016-05-10 12:14:53 +0200
commit9d2c537beb5135ecd8e007b227da5139e74a9515 (patch)
tree4c342366c13ad283adc73e4e20e88c4ec64ff76f /engines/gnap/character.cpp
parent38a83d1770a35b82cdfd7b04c19fcccb174b157f (diff)
downloadscummvm-rg350-9d2c537beb5135ecd8e007b227da5139e74a9515.tar.gz
scummvm-rg350-9d2c537beb5135ecd8e007b227da5139e74a9515.tar.bz2
scummvm-rg350-9d2c537beb5135ecd8e007b227da5139e74a9515.zip
GNAP: Some more refactoring in Character, some renaming
Diffstat (limited to 'engines/gnap/character.cpp')
-rw-r--r--engines/gnap/character.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/engines/gnap/character.cpp b/engines/gnap/character.cpp
index 4356862756..9503bfdd39 100644
--- a/engines/gnap/character.cpp
+++ b/engines/gnap/character.cpp
@@ -598,6 +598,16 @@ void PlayerGnap::initPos(int gridX, int gridY, Facing facing) {
kSeqScale, 0, 75 * _pos.x - _gridX, 48 * _pos.y - _gridY);
}
+int PlayerGnap::getWalkSequenceId(int deltaX, int deltaY) {
+ static const int walkSequenceIds[9] = {
+ 0x7B2, 0x000, 0x7B4,
+ 0x7AD, 0x000, 0x7AE,
+ 0x7B1, 0x000, 0x7B3
+ };
+ // CHECKME This is a little weird
+ return walkSequenceIds[3 * deltaX + 3 + 1 + deltaY];
+}
+
/************************************************************************************************/
PlayerPlat::PlayerPlat(GnapEngine * vm) : Character(vm) {}
@@ -711,4 +721,14 @@ void PlayerPlat::initPos(int gridX, int gridY, Facing facing) {
kSeqScale, 0, 75 * _pos.x - _gridX, 48 * _pos.y - _gridY);
}
+int PlayerPlat::getWalkSequenceId(int deltaX, int deltaY) {
+ static const int walkSequenceIds[9] = {
+ 0x7C5, 0x000, 0x7C8,
+ 0x7C4, 0x000, 0x7C7,
+ 0x7C3, 0x000, 0x7C6
+ };
+ // CHECKME This is a little weird
+ return walkSequenceIds[3 * deltaX + 3 + 1 + deltaY];
+}
+
} // End of namespace Gnap