summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-12-03 17:00:07 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-12-03 17:00:07 +0000
commit061b9e817ffe73acca163510b276e6ca7dd8f6c2 (patch)
treec1488381a9a62520f94cdb353bd5bd12ebc1b699 /src/engine.cpp
parent092bf185fc056338bcde2749a304e576edf342fd (diff)
downloadmana-client-061b9e817ffe73acca163510b276e6ca7dd8f6c2.tar.gz
mana-client-061b9e817ffe73acca163510b276e6ca7dd8f6c2.tar.bz2
mana-client-061b9e817ffe73acca163510b276e6ca7dd8f6c2.tar.xz
mana-client-061b9e817ffe73acca163510b276e6ca7dd8f6c2.zip
Made NPC names visible. Windows are now invisible by default.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index a6177b30..2b2f168a 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -163,7 +163,7 @@ void Engine::draw(Graphics *graphics)
lastTick = tick_time;
}
- // calculate viewpoint
+ // Calculate viewpoint
int midTileX = graphics->getWidth() / 32 / 2;
int midTileY = graphics->getHeight() / 32 / 2;
@@ -174,9 +174,9 @@ void Engine::draw(Graphics *graphics)
scrollRadius = (int)config.getValue("ScrollRadius", 32);
if (scrollLaziness < 1)
- scrollLaziness = 1; //avoids division by zero
+ scrollLaziness = 1; // Avoids division by zero
- //apply lazy scrolling
+ // Apply lazy scrolling
while (lastTick < tick_time)
{
if (player_x > view_x + scrollRadius)
@@ -198,7 +198,7 @@ void Engine::draw(Graphics *graphics)
lastTick++;
}
- //auto center when player is off screen
+ // Auto center when player is off screen
if ( player_x - view_x > graphics->getWidth() / 2
|| view_x - player_x > graphics->getWidth() / 2
|| view_y - player_y > graphics->getHeight() / 2
@@ -224,19 +224,19 @@ void Engine::draw(Graphics *graphics)
}
}
- camera_x = int(view_x + 16) / 32;
- camera_y = int(view_y + 16) / 32;
+ camera_x = (int) (view_x + 16) / 32;
+ camera_y = (int) (view_y + 16) / 32;
// Draw tiles and sprites
if (mCurrentMap != NULL)
{
- mCurrentMap->draw(graphics, (int)view_x, (int)view_y, 0);
- mCurrentMap->draw(graphics, (int)view_x, (int)view_y, 1);
- mCurrentMap->draw(graphics, (int)view_x, (int)view_y, 2);
+ mCurrentMap->draw(graphics, (int) view_x, (int) view_y, 0);
+ mCurrentMap->draw(graphics, (int) view_x, (int) view_y, 1);
+ mCurrentMap->draw(graphics, (int) view_x, (int) view_y, 2);
mCurrentMap->drawOverlay( graphics,
view_x,
view_y,
- (int)config.getValue("OverlayDetail", 2)
+ (int) config.getValue("OverlayDetail", 2)
);
}
@@ -272,9 +272,9 @@ void Engine::draw(Graphics *graphics)
Beings &beings = beingManager->getAll();
for (BeingIterator i = beings.begin(); i != beings.end(); i++)
{
- (*i)->drawSpeech(graphics, -(int)view_x, -(int)view_y);
- (*i)->drawName(graphics, -(int)view_x, -(int)view_y);
- (*i)->drawEmotion(graphics, -(int)view_x, -(int)view_y);
+ (*i)->drawSpeech(graphics, -(int) view_x, -(int) view_y);
+ (*i)->drawName(graphics, -(int) view_x, -(int) view_y);
+ (*i)->drawEmotion(graphics, -(int) view_x, -(int) view_y);
}
// Draw target marker if needed