]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/states/SelectTarget.cpp
switched geometric scalars from floating to fixed
[l2e.git] / src / battle / states / SelectTarget.cpp
index 4645f6debd37dfaf50ad2c450c6725800b35c52d..a0955b2691d477bb7fbd779a2c4f43b587055cda 100644 (file)
 
 using app::Application;
 using app::Input;
-using geometry::Vector;
+using math::Vector;
 using std::vector;
 
 namespace battle {
 
-void SelectTarget::OnEnterState(Application &c, SDL_Surface *screen) {
-       ctrl = &c;
+void SelectTarget::OnEnterState(SDL_Surface *screen) {
+
 }
 
-void SelectTarget::OnExitState(Application &c, SDL_Surface *screen) {
-       ctrl = 0;
+void SelectTarget::OnExitState(SDL_Surface *screen) {
+
 }
 
-void SelectTarget::OnResumeState(Application &ctrl, SDL_Surface *screen) {
+void SelectTarget::OnResumeState(SDL_Surface *screen) {
 
 }
 
-void SelectTarget::OnPauseState(Application &ctrl, SDL_Surface *screen) {
+void SelectTarget::OnPauseState(SDL_Surface *screen) {
 
 }
 
@@ -44,11 +44,11 @@ void SelectTarget::OnResize(int width, int height) {
 void SelectTarget::HandleEvents(const Input &input) {
        if (input.JustPressed(Input::ACTION_A)) {
                if (selection->CurrentIsSelected()) {
-                       ctrl->PopState(); // return control to parent
+                       Ctrl().PopState(); // return control to parent
                } else {
                        selection->Select();
                        if (selection->SelectSingle()) {
-                               ctrl->PopState(); // return control to parent
+                               Ctrl().PopState(); // return control to parent
                        }
                }
        }
@@ -57,7 +57,7 @@ void SelectTarget::HandleEvents(const Input &input) {
                        selection->Unselect();
                } else {
                        selection->UnselectAll();
-                       ctrl->PopState(); // return control to parent
+                       Ctrl().PopState(); // return control to parent
                }
        }
 
@@ -75,7 +75,7 @@ void SelectTarget::HandleEvents(const Input &input) {
        }
 }
 
-void SelectTarget::UpdateWorld(float deltaT) {
+void SelectTarget::UpdateWorld(Uint32 deltaT) {
 
 }
 
@@ -85,7 +85,7 @@ void SelectTarget::Render(SDL_Surface *screen) {
        RenderCursors(screen, offset);
 }
 
-void SelectTarget::RenderCursors(SDL_Surface *screen, const geometry::Vector<int> &offset) {
+void SelectTarget::RenderCursors(SDL_Surface *screen, const math::Vector<int> &offset) {
        Vector<int> cursorOffset(cursorIcon->Width() / -2, cursorIcon->Height());
        // offset the indicator by 1/8th to the right and top
        Vector<int> indicatorOffset(cursorOffset + Vector<int>(cursorIcon->Width() / 8, cursorIcon->Height() / -8));