summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-28 18:14:58 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-28 18:14:58 +0300
commita204d2b11e6a4b620877ab6c5b80a818eaa7d476 (patch)
treeee2112216168624403769a1fdeab120dafab4100 /src/actions
parentd82cd00f86cf5f902a47ef19fd24c7745e4104d4 (diff)
downloadplus-a204d2b11e6a4b620877ab6c5b80a818eaa7d476.tar.gz
plus-a204d2b11e6a4b620877ab6c5b80a818eaa7d476.tar.bz2
plus-a204d2b11e6a4b620877ab6c5b80a818eaa7d476.tar.xz
plus-a204d2b11e6a4b620877ab6c5b80a818eaa7d476.zip
Add fake commands to change pet direction.
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/pets.cpp24
-rw-r--r--src/actions/pets.h4
2 files changed, 28 insertions, 0 deletions
diff --git a/src/actions/pets.cpp b/src/actions/pets.cpp
index e30e7f529..64ac81e83 100644
--- a/src/actions/pets.cpp
+++ b/src/actions/pets.cpp
@@ -177,4 +177,28 @@ impHandler0(petMoveRight)
return true;
}
+impHandler0(petDirectUp)
+{
+ petHandler->setDirection(BeingDirection::UP);
+ return true;
+}
+
+impHandler0(petDirectDown)
+{
+ petHandler->setDirection(BeingDirection::DOWN);
+ return true;
+}
+
+impHandler0(petDirectLeft)
+{
+ petHandler->setDirection(BeingDirection::LEFT);
+ return true;
+}
+
+impHandler0(petDirectRight)
+{
+ petHandler->setDirection(BeingDirection::RIGHT);
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/pets.h b/src/actions/pets.h
index 37bd85713..4aed1d94c 100644
--- a/src/actions/pets.h
+++ b/src/actions/pets.h
@@ -36,6 +36,10 @@ namespace Actions
decHandler(petMoveDown);
decHandler(petMoveLeft);
decHandler(petMoveRight);
+ decHandler(petDirectUp);
+ decHandler(petDirectDown);
+ decHandler(petDirectLeft);
+ decHandler(petDirectRight);
} // namespace Actions
#undef decHandler