]> git.localhorst.tv Git - l2e.git/blobdiff - src/menu/CapsuleMenu.cpp
consistent naming of graphics drawing functions
[l2e.git] / src / menu / CapsuleMenu.cpp
index 5a800a39294fd7d9a0ae699173c34a977e4a0de1..e2a983ea81b3b5b2a5d1d2d8b393bd55c079fa76 100644 (file)
 #include "../graphics/Font.h"
 #include "../graphics/Frame.h"
 #include "../graphics/Texture.h"
+#include "../math/Vector.h"
 
 using app::Input;
 using common::Capsule;
 using common::Stats;
-using geometry::Vector;
+using math::Vector;
 using graphics::Font;
 using graphics::Frame;
 
@@ -34,7 +35,7 @@ CapsuleMenu::CapsuleMenu(PartyMenu *parent)
 
 
 void CapsuleMenu::OnEnterState(SDL_Surface *) {
-
+       menu.StartAnimation(Ctrl());
 }
 
 void CapsuleMenu::OnExitState(SDL_Surface *) {
@@ -83,7 +84,7 @@ void CapsuleMenu::HandleEvents(const Input &input) {
        }
 }
 
-void CapsuleMenu::UpdateWorld(float deltaT) {
+void CapsuleMenu::UpdateWorld(Uint32 deltaT) {
 
 }
 
@@ -116,7 +117,7 @@ void CapsuleMenu::Render(SDL_Surface *screen) {
 }
 
 void CapsuleMenu::RenderBackground(SDL_Surface *screen) const {
-       Res().capsulebg->Render(screen, Vector<int>(), Vector<int>(screen->w, screen->h));
+       Res().capsulebg->Draw(screen, Vector<int>(), Vector<int>(screen->w, screen->h));
 }
 
 void CapsuleMenu::RenderCapsule(SDL_Surface *screen, const Vector<int> &offset) const {
@@ -180,7 +181,7 @@ void CapsuleMenu::RenderInfo(SDL_Surface *screen, const Vector<int> &offset) con
 
 void CapsuleMenu::RenderWheel(SDL_Surface *screen, const Vector<int> &offset) const {
        Res().capsuleAlignmentWheel->DrawCenter(screen, offset);
-       Res().capsuleAlignmentCursor->DrawCenter(screen, offset + Game().state->capsule->AlignmentOffset());
+       Res().capsuleAlignmentCursor->DrawCenter(screen, offset + Game().state->GetCapsule().AlignmentOffset());
 }
 
 void CapsuleMenu::RenderStats(SDL_Surface *screen, const Vector<int> &offset) const {
@@ -220,7 +221,7 @@ void CapsuleMenu::RenderStats(SDL_Surface *screen, const Vector<int> &offset) co
        font.DrawNumberRight(capsule.NextLevel(), screen, lineHead);
 }
 
-void CapsuleMenu::RenderStatsLine(SDL_Surface *screen, const geometry::Vector<int> &offset, const char *name, int value) const {
+void CapsuleMenu::RenderStatsLine(SDL_Surface *screen, const math::Vector<int> &offset, const char *name, int value) const {
        const Font &font(*Res().statusFont);
        const Vector<int> numberOffset(4 * font.CharWidth(), 0);
 
@@ -264,11 +265,11 @@ int CapsuleMenu::Height() const {
 }
 
 Capsule &CapsuleMenu::GetCapsule() {
-       return *Game().state->capsule;
+       return Game().state->GetCapsule();
 }
 
 const Capsule &CapsuleMenu::GetCapsule() const {
-       return *Game().state->capsule;
+       return Game().state->GetCapsule();
 }
 
 }