diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-05-14 11:44:16 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-05-14 11:44:16 +0000 |
commit | 10a530ef7a5b2b083dbabccae62c2141394daf2e (patch) | |
tree | 7c7a8b00a46ea9c68148e5b2681507282453fc13 | |
parent | b22a61704aec7d2431c1417d2b96301d3835cf7c (diff) | |
download | mana-10a530ef7a5b2b083dbabccae62c2141394daf2e.tar.gz mana-10a530ef7a5b2b083dbabccae62c2141394daf2e.tar.bz2 mana-10a530ef7a5b2b083dbabccae62c2141394daf2e.tar.xz mana-10a530ef7a5b2b083dbabccae62c2141394daf2e.zip |
Fixed player character rendering errors in OpenGL mode.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/engine.cpp | 22 | ||||
-rw-r--r-- | src/gui/playerbox.cpp | 2 | ||||
-rw-r--r-- | src/main.cpp | 2 |
4 files changed, 15 insertions, 12 deletions
@@ -4,6 +4,7 @@ - Added confirmation dialog before quitting - Added button to show/hide equipment window - Fixed a crash in OpenGL mode +- Fixed rendering of minimap, progress bars and player sprite in OpenGL mode 0.0.12 (1 May 2005) - Added new map (a cave), tiles, monsters and items 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); |