diff options
author | Strangerke | 2016-05-08 23:15:09 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-05-10 12:14:56 +0200 |
commit | d4053ee11b736255d8e22e8f668904a3c4462549 (patch) | |
tree | 6a0134a08b33757f7e9e1a6bf3d9903d52c21a4c /engines/gnap/character.cpp | |
parent | cf32e654a712915ee9d40c6595e0f30911833479 (diff) | |
download | scummvm-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.cpp | 14 |
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); } |