summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-05-14 11:44:16 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-05-14 11:44:16 +0000
commit10a530ef7a5b2b083dbabccae62c2141394daf2e (patch)
tree7c7a8b00a46ea9c68148e5b2681507282453fc13 /src
parentb22a61704aec7d2431c1417d2b96301d3835cf7c (diff)
downloadmana-10a530ef7a5b2b083dbabccae62c2141394daf2e.tar.gz
mana-10a530ef7a5b2b083dbabccae62c2141394daf2e.tar.bz2
mana-10a530ef7a5b2b083dbabccae62c2141394daf2e.tar.xz
mana-10a530ef7a5b2b083dbabccae62c2141394daf2e.zip
Fixed player character rendering errors in OpenGL mode.
Diffstat (limited to 'src')
-rw-r--r--src/engine.cpp22
-rw-r--r--src/gui/playerbox.cpp2
-rw-r--r--src/main.cpp2
3 files changed, 14 insertions, 12 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 52f1d11e..e189558d 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -183,14 +183,15 @@ Engine::Engine()
tradeWindow = new TradeWindow();
buddyWindow = new BuddyWindow();
requestTradeDialog = new RequestTradeDialog();
- quitDialog = new ConfirmDialog("Quit", "Are you sure you want to quit ?", (gcn::ActionListener*)&exitListener);
+ quitDialog = new ConfirmDialog("Quit", "Are you sure you want to quit ?",
+ (gcn::ActionListener*)&exitListener);
// Initialize window posisitons
chatWindow->setPosition(0, screen->h - chatWindow->getHeight());
statusWindow->setPosition(screen->w - statusWindow->getWidth() - 5, 5);
inventoryWindow->setPosition(screen->w - statusWindow->getWidth() -
inventoryWindow->getWidth() - 10, 5);
- itemAmountWindow->setPosition(screen->w - statusWindow->getWidth() -
- inventoryWindow->getWidth() - 10, inventoryWindow->getHeight() +
+ itemAmountWindow->setPosition(screen->w - statusWindow->getWidth() -
+ inventoryWindow->getWidth() - 10, inventoryWindow->getHeight() +
10);
statsWindow->setPosition(
screen->w - 5 - statsWindow->getWidth(),
@@ -201,10 +202,10 @@ Engine::Engine()
tradeWindow->setPosition(screen->w - statusWindow->getWidth() -
tradeWindow->getWidth() - 10,
inventoryWindow->getY() + inventoryWindow->getHeight());
- buddyWindow->setPosition(10,
- minimap->getHeight() + 30);
- requestTradeDialog->setPosition(screen->w - statusWindow->getWidth() -
- requestTradeDialog->getWidth() - 10,
+ buddyWindow->setPosition(10,
+ minimap->getHeight() + 30);
+ requestTradeDialog->setPosition(screen->w - statusWindow->getWidth() -
+ requestTradeDialog->getWidth() - 10,
chatWindow->getHeight() + 15);
equipmentWindow->setPosition(5,140);
@@ -418,12 +419,13 @@ void Engine::draw()
int pf = being->frame + being->action;
if (being->action == ATTACK) {
- if(being->weapon > 0)
+ if (being->weapon > 0)
pf += 4 * (being->weapon - 1);
}
- playerset->spriteset[4 * pf + dir]->draw(screen,
- being->text_x - 16, being->text_y - 80);
+ playerset->spriteset[pf + 16 * dir]->draw(screen,
+ being->text_x - 16, being->text_y - 32);
+
if (being->weapon != 0 && being->action == ATTACK) {
weaponset->spriteset[16 * (being->weapon - 1) + 4 * being->frame + dir]->draw(screen,
being->text_x - 64, being->text_y - 80);
diff --git a/src/gui/playerbox.cpp b/src/gui/playerbox.cpp
index 0e9f5e0f..b97b37b3 100644
--- a/src/gui/playerbox.cpp
+++ b/src/gui/playerbox.cpp
@@ -60,7 +60,7 @@ void PlayerBox::draw(gcn::Graphics *graphics)
getAbsolutePosition(x, y);
// Draw character
- playerset->spriteset[0]->draw(screen, x + 23, y - 25);
+ playerset->spriteset[0]->draw(screen, x + 23, y + 23);
// Draw his hair
if (hairColor >= 0 && hairStyle >= 0 &&
diff --git a/src/main.cpp b/src/main.cpp
index 364b2c7b..8c871b6a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -277,7 +277,7 @@ void init_engine()
if (!playerImg) logger->error("Couldn't load player_male_base.png");
if (!hairImg) logger->error("Couldn't load player_male_hair.png");
- playerset = new Spriteset(playerImg, 64, 120);
+ playerset = new Spriteset(playerImg, 64, 64);
hairset = new Spriteset(hairImg, 40, 40);
gui = new Gui(graphics);