aboutsummaryrefslogtreecommitdiff
path: root/engines/gnap/character.cpp
diff options
context:
space:
mode:
authorStrangerke2016-05-08 23:15:09 +0200
committerEugene Sandulenko2016-05-10 12:14:56 +0200
commitd4053ee11b736255d8e22e8f668904a3c4462549 (patch)
tree6a0134a08b33757f7e9e1a6bf3d9903d52c21a4c /engines/gnap/character.cpp
parentcf32e654a712915ee9d40c6595e0f30911833479 (diff)
downloadscummvm-rg350-d4053ee11b736255d8e22e8f668904a3c4462549.tar.gz
scummvm-rg350-d4053ee11b736255d8e22e8f668904a3c4462549.tar.bz2
scummvm-rg350-d4053ee11b736255d8e22e8f668904a3c4462549.zip
GNAP: Refactoring of playScratchingHead, playShowCurrItem, playUseDevice
Diffstat (limited to 'engines/gnap/character.cpp')
-rw-r--r--engines/gnap/character.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/gnap/character.cpp b/engines/gnap/character.cpp
index c8ad1867cf..5226c75210 100644
--- a/engines/gnap/character.cpp
+++ b/engines/gnap/character.cpp
@@ -1061,8 +1061,8 @@ void PlayerGnap::playImpossible(Common::Point gridPos) {
playSequence(getSequenceId(gskImpossible, gridPos) | 0x10000);
}
-void PlayerGnap::playScratchingHead(int gridX, int gridY) {
- playSequence(getSequenceId(gskScratchingHead, Common::Point(gridX, gridY)) | 0x10000);
+void PlayerGnap::playScratchingHead(Common::Point gridPos) {
+ playSequence(getSequenceId(gskScratchingHead, gridPos) | 0x10000);
}
void PlayerGnap::playMoan1(Common::Point gridPos) {
@@ -1085,8 +1085,8 @@ void PlayerGnap::playPullOutDeviceNonWorking(Common::Point gridPos) {
playSequence(getSequenceId(gskPullOutDeviceNonWorking, gridPos) | 0x10000);
}
-void PlayerGnap::playUseDevice(int gridX, int gridY) {
- playSequence(getSequenceId(gskUseDevice, Common::Point(gridX, gridY)) | 0x10000);
+void PlayerGnap::playUseDevice(Common::Point gridPos) {
+ playSequence(getSequenceId(gskUseDevice, gridPos) | 0x10000);
}
void PlayerGnap::playIdle(Common::Point gridPos) {
@@ -1097,12 +1097,12 @@ void PlayerGnap::playShowItem(int itemIndex, int gridLookX, int gridLookY) {
playSequence(getShowSequenceId(itemIndex, gridLookX, gridLookY) | 0x10000);
}
-void PlayerGnap::playShowCurrItem(int gridX, int gridY, int gridLookX, int gridLookY) {
+void PlayerGnap::playShowCurrItem(Common::Point destPos, int gridLookX, int gridLookY) {
PlayerPlat& plat = *_vm->_plat;
- if (plat._pos.x == gridX && plat._pos.y == gridY)
+ if (plat._pos == destPos)
plat.makeRoom();
- walkTo(Common::Point(gridX, gridY), -1, -1, 1);
+ walkTo(destPos, -1, -1, 1);
playShowItem(_vm->_grabCursorSpriteIndex, gridLookX, gridLookY);
}