X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmenu%2FStatusMenu.cpp;h=09c94050bc321ac4a49393c9fb99bf4751cd7e97;hb=a3ba4dc677ad7c92eeb78b20b642241563605c9d;hp=3a9b38f3489f58fc0b282c8e9108e948afb8d536;hpb=559457f14d914f6b1cb5d588a0ccf97529f011d1;p=l2e.git diff --git a/src/menu/StatusMenu.cpp b/src/menu/StatusMenu.cpp index 3a9b38f..09c9405 100644 --- a/src/menu/StatusMenu.cpp +++ b/src/menu/StatusMenu.cpp @@ -1,10 +1,3 @@ -/* - * StatusMenu.cpp - * - * Created on: Oct 22, 2012 - * Author: holy - */ - #include "StatusMenu.h" #include "HeroStatus.h" @@ -24,7 +17,7 @@ using app::Input; using common::Hero; using common::Item; using common::Stats; -using geometry::Vector; +using math::Vector; using graphics::Font; using graphics::Frame; @@ -178,22 +171,10 @@ void StatusMenu::RenderEquipment(SDL_Surface *screen, const Vector &offset) Vector lineBreak(0, 2 * parent->Res().statusFont->CharHeight()); Vector position(offset); - RenderEquipmentLine(hero.Weapon(), screen, position); - - position += lineBreak; - RenderEquipmentLine(hero.Armor(), screen, position); - - position += lineBreak; - RenderEquipmentLine(hero.Shield(), screen, position); - - position += lineBreak; - RenderEquipmentLine(hero.Helmet(), screen, position); - - position += lineBreak; - RenderEquipmentLine(hero.Ring(), screen, position); - - position += lineBreak; - RenderEquipmentLine(hero.Jewel(), screen, position); + for (int i = 0; i < Hero::EQUIP_COUNT; ++i) { + RenderEquipmentLine(hero.Equipment(Hero::EquipSlot(i)), screen, position); + position += lineBreak; + } } void StatusMenu::RenderEquipmentLine(const Item *item, SDL_Surface *screen, const Vector &position) const { @@ -209,7 +190,7 @@ void StatusMenu::RenderEquipmentLine(const Item *item, SDL_Surface *screen, cons } } -void StatusMenu::RenderExperience(SDL_Surface *screen, const geometry::Vector &offset) const { +void StatusMenu::RenderExperience(SDL_Surface *screen, const math::Vector &offset) const { const Font &font(*parent->Res().statusFont); font.DrawStringRight(parent->Res().experienceLabel, screen, offset, 10); @@ -217,7 +198,7 @@ void StatusMenu::RenderExperience(SDL_Surface *screen, const geometry::Vector &offset) const { +void StatusMenu::RenderNextLevel(SDL_Surface *screen, const math::Vector &offset) const { const Font &font(*parent->Res().statusFont); font.DrawStringRight(parent->Res().nextLevelLabel, screen, offset, 10); @@ -225,7 +206,7 @@ void StatusMenu::RenderNextLevel(SDL_Surface *screen, const geometry::Vector &offset) const { +void StatusMenu::RenderIkari(SDL_Surface *screen, const math::Vector &offset) const { const Font &font(*parent->Res().statusFont); font.DrawString(parent->Res().ipLabel, screen, offset, 5); @@ -236,7 +217,7 @@ void StatusMenu::RenderIkari(SDL_Surface *screen, const geometry::Vector &o font.DrawChar('%', screen, percentOffset); } -void StatusMenu::RenderMenu(SDL_Surface *screen, const geometry::Vector &offset) const { +void StatusMenu::RenderMenu(SDL_Surface *screen, const math::Vector &offset) const { const Font &font(*parent->Res().normalFont); const Frame &frame(*parent->Res().statusFrame);