summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-09-17 14:25:03 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-09-17 14:25:03 +0000
commit7d7ea134637eb06e194068f157d3eead90115631 (patch)
tree9ea5d90f07531d0c71f2dd8adf3a6ec956f2dffa /src/engine.cpp
parent02e54bb74d2032abfbbdb17dc14d8d85664deb40 (diff)
downloadmana-7d7ea134637eb06e194068f157d3eead90115631.tar.gz
mana-7d7ea134637eb06e194068f157d3eead90115631.tar.bz2
mana-7d7ea134637eb06e194068f157d3eead90115631.tar.xz
mana-7d7ea134637eb06e194068f157d3eead90115631.zip
Indent properly.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 73ee30b1..7642ef6c 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -314,13 +314,15 @@ void Engine::draw()
being->text_x = x + get_x_offset(being);
being->text_y = y + get_y_offset(being);
- if (being->action == Being::SIT || being->action == Being::DEAD) {
+ if (being->action == Being::SIT || being->action == Being::DEAD)
+ {
being->frame = 0;
}
frame = being->frame + being->action;
- if (being->action == Being::ATTACK) {
+ if (being->action == Being::ATTACK)
+ {
if (being->getWeapon() > 0)
frame += 4 * (being->getWeapon() - 1);
}
@@ -328,7 +330,8 @@ void Engine::draw()
graphics->drawImage(playerset->spriteset[frame + 16 * dir],
being->text_x - 16, being->text_y - 32);
- if (being->getWeapon() != 0 && being->action == Being::ATTACK) {
+ if (being->getWeapon() != 0 && being->action == Being::ATTACK)
+ {
Image *image = weaponset->spriteset[
16 * (being->getWeapon() - 1) + 4 * being->frame + dir];
@@ -336,7 +339,8 @@ void Engine::draw()
being->text_x - 64, being->text_y - 80);
}
- if (being->getHairColor() <= NR_HAIR_COLORS) {
+ if (being->getHairColor() <= NR_HAIR_COLORS)
+ {
int hf = being->getHairColor() - 1 + 10 * (dir + 4 *
(being->getHairStyle() - 1));
@@ -345,25 +349,27 @@ void Engine::draw()
being->text_y - 50 + 2 * hairtable[frame][dir][1]);
}
- if (being->emotion != 0) {
+ if (being->emotion != 0)
+ {
graphics->drawImage(
emotionset->spriteset[being->emotion - 1],
being->text_x + 3, being->text_y - 90);
}
- if (being != player_node) {
- graphics->setFont(speechFont);
- graphics->drawText(being->getName(),
- being->text_x + 15, being->text_y + 30,
- gcn::Graphics::CENTER);
- graphics->setFont(gui->getFont());
+ if (being != player_node)
+ {
+ graphics->setFont(speechFont);
+ graphics->drawText(being->getName(),
+ being->text_x + 15, being->text_y + 30,
+ gcn::Graphics::CENTER);
+ graphics->setFont(gui->getFont());
}
break;
// Draw a NPC
case Being::NPC:
graphics->drawImage(npcset->spriteset[being->job - 100],
- x - 8, y - 52);
+ x - 8, y - 52);
break;
// Draw a monster