diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-09 05:16:27 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-09 05:16:27 +0000 |
commit | e5f795ad9952b8bba6993ee3e324b22a0f104816 (patch) | |
tree | 1602ac0f74865135eae5acf935b0a285a8e918c2 /src/game.cpp | |
parent | 7593d6c71e2331c3e43c732db60ad03ee4d5385d (diff) | |
download | mana-e5f795ad9952b8bba6993ee3e324b22a0f104816.tar.gz mana-e5f795ad9952b8bba6993ee3e324b22a0f104816.tar.bz2 mana-e5f795ad9952b8bba6993ee3e324b22a0f104816.tar.xz mana-e5f795ad9952b8bba6993ee3e324b22a0f104816.zip |
Made all class members named like mClassMember.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/game.cpp b/src/game.cpp index 10d87d12..497cc903 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -461,20 +461,20 @@ void Game::handleInput() if (!chatWindow->isFocused()) { FloorItem *item = floorItemManager->findByCoordinates( - player_node->x, player_node->y); + player_node->mX, player_node->mY); // If none below the player, try the tile in front of // the player if (!item) { - Uint16 x = player_node->x; - Uint16 y = player_node->y; - if (player_node->direction & Being::UP) + Uint16 x = player_node->mX; + Uint16 y = player_node->mY; + if (player_node->mDirection & Being::UP) y--; - if (player_node->direction & Being::DOWN) + if (player_node->mDirection & Being::DOWN) y++; - if (player_node->direction & Being::LEFT) + if (player_node->mDirection & Being::LEFT) x--; - if (player_node->direction & Being::RIGHT) + if (player_node->mDirection & Being::RIGHT) x++; item = floorItemManager->findByCoordinates(x, y); @@ -585,12 +585,12 @@ void Game::handleInput() } // End while // Moving player around - if (player_node->action != Being::DEAD && + if (player_node->mAction != Being::DEAD && current_npc == 0 && !chatWindow->isFocused()) { - Uint16 x = player_node->x; - Uint16 y = player_node->y; + Uint16 x = player_node->mX; + Uint16 y = player_node->mY; unsigned char Direction = 0; // Translate pressed keys to movement and direction @@ -633,13 +633,13 @@ void Game::handleInput() { Uint16 targetX = x, targetY = y; - if (player_node->direction & Being::UP) + if (player_node->mDirection & Being::UP) targetY--; - if (player_node->direction & Being::DOWN) + if (player_node->mDirection & Being::DOWN) targetY++; - if (player_node->direction & Being::LEFT) + if (player_node->mDirection & Being::LEFT) targetX--; - if (player_node->direction & Being::RIGHT) + if (player_node->mDirection & Being::RIGHT) targetX++; // Attack priorioty is: Monster, Player, auto target @@ -658,7 +658,7 @@ void Game::handleInput() if (joystick->buttonPressed(1)) { FloorItem *item = floorItemManager->findByCoordinates( - player_node->x, player_node->y); + player_node->mX, player_node->mY); if (item) player_node->pickUp(item); |