summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-09 22:30:00 +0100
committerIra Rice <irarice@gmail.com>2009-02-09 17:10:37 -0700
commit1db7d10787f462430054ba04110a8d4647bdbd0a (patch)
tree60dc4d04c738b1f54a41bc9d9b6d0e5ffb0fb1d4 /src/game.cpp
parent1ae95b709235ce811ce72437aa257bb7500e00d0 (diff)
downloadmana-1db7d10787f462430054ba04110a8d4647bdbd0a.tar.gz
mana-1db7d10787f462430054ba04110a8d4647bdbd0a.tar.bz2
mana-1db7d10787f462430054ba04110a8d4647bdbd0a.tar.xz
mana-1db7d10787f462430054ba04110a8d4647bdbd0a.zip
Mostly whitespace fixes
Removed tab characters and trailing spaces and added spaces between "if(", "for(", "while(" and "switch(".
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/game.cpp b/src/game.cpp
index e2064f58..f8903ed2 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -176,11 +176,11 @@ Uint32 nextSecond(Uint32 interval, void *param)
int get_elapsed_time(int start_time)
{
- if (start_time <= tick_time)
+ if (start_time <= tick_time)
{
return (tick_time - start_time) * 10;
}
- else
+ else
{
return (tick_time + (MAX_TIME - start_time)) * 10;
}
@@ -488,7 +488,7 @@ void Game::handleInput()
{
gcn::Window *requestedWindow = NULL;
- if (setupWindow->isVisible() &&
+ if (setupWindow->isVisible() &&
keyboard.getNewKeyIndex() > keyboard.KEY_NO_VALUE)
{
keyboard.setNewKey((int) event.key.keysym.sym);
@@ -594,7 +594,7 @@ void Game::handleInput()
case KeyboardConfig::KEY_QUIT:
if (!exitConfirm)
{
- exitConfirm = new ConfirmDialog( _("Quit"),
+ exitConfirm = new ConfirmDialog( _("Quit"),
_("Are you sure you "
"want to quit?"));
exitConfirm->addActionListener(&exitListener);
@@ -621,7 +621,7 @@ void Game::handleInput()
i <= KeyboardConfig::KEY_SHORTCUT_12;
i++)
{
- if (tKey == i && !used)
+ if (tKey == i && !used)
{
itemShortcut->useItem(
i - KeyboardConfig::KEY_SHORTCUT_1);
@@ -822,7 +822,7 @@ void Game::handleInput()
if (keyboard.isKeyActive(keyboard.KEY_ATTACK) ||
(joystick && joystick->buttonPressed(0)))
{
- Being *target = beingManager->findNearestLivingBeing(x, y, 20,
+ Being *target = beingManager->findNearestLivingBeing(x, y, 20,
Being::MONSTER);
bool newTarget = !keyboard.isKeyActive(keyboard.KEY_TARGET);
@@ -850,7 +850,7 @@ void Game::handleInput()
}
// Target the nearest player if 'q' is pressed
- if ( keyboard.isKeyActive(keyboard.KEY_TARGET_PLAYER) &&
+ if ( keyboard.isKeyActive(keyboard.KEY_TARGET_PLAYER) &&
!keyboard.isKeyActive(keyboard.KEY_TARGET) )
{
Being *target = beingManager->findNearestLivingBeing(player_node, 20, Being::PLAYER);
@@ -859,8 +859,8 @@ void Game::handleInput()
}
// Target the nearest monster if 'a' pressed
- if ((keyboard.isKeyActive(keyboard.KEY_TARGET_CLOSEST) ||
- (joystick && joystick->buttonPressed(3))) &&
+ if ((keyboard.isKeyActive(keyboard.KEY_TARGET_CLOSEST) ||
+ (joystick && joystick->buttonPressed(3))) &&
!keyboard.isKeyActive(keyboard.KEY_TARGET))
{
Being *target = beingManager->findNearestLivingBeing(
@@ -870,7 +870,7 @@ void Game::handleInput()
}
// Target the nearest npc if 'n' pressed
- if ( keyboard.isKeyActive(keyboard.KEY_TARGET_NPC) &&
+ if ( keyboard.isKeyActive(keyboard.KEY_TARGET_NPC) &&
!keyboard.isKeyActive(keyboard.KEY_TARGET) )
{
Being *target = beingManager->findNearestLivingBeing(