]> git.localhorst.tv Git - l2e.git/commitdiff
removed now superfluous Application parameter to State callbacks
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 17 Oct 2012 19:34:48 +0000 (21:34 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 17 Oct 2012 19:34:48 +0000 (21:34 +0200)
29 files changed:
src/app/Application.cpp
src/app/State.cpp
src/app/State.h
src/battle/BattleState.cpp
src/battle/BattleState.h
src/battle/states/PerformAttacks.cpp
src/battle/states/PerformAttacks.h
src/battle/states/RunState.cpp
src/battle/states/RunState.h
src/battle/states/SelectAttackType.cpp
src/battle/states/SelectAttackType.h
src/battle/states/SelectIkari.cpp
src/battle/states/SelectIkari.h
src/battle/states/SelectItem.cpp
src/battle/states/SelectItem.h
src/battle/states/SelectMoveAction.cpp
src/battle/states/SelectMoveAction.h
src/battle/states/SelectSpell.cpp
src/battle/states/SelectSpell.h
src/battle/states/SelectTarget.cpp
src/battle/states/SelectTarget.h
src/battle/states/SwapHeroes.cpp
src/battle/states/SwapHeroes.h
src/graphics/ColorFade.cpp
src/graphics/ColorFade.h
src/map/MapState.cpp
src/map/MapState.h
src/map/TransitionState.cpp
src/map/TransitionState.h

index f773cfcec71f96252c9da4cad9275e8096016bc9..90ed2882e2e75b013f1246aae873c29897a2bf81 100644 (file)
@@ -85,32 +85,32 @@ void Application::PopState() {
 
 void Application::RealChangeState(State *s) {
        if (!states.empty()) {
-               states.top()->PauseState(*this, screen.Screen());
+               states.top()->PauseState(screen.Screen());
                states.top()->ExitState(*this, screen.Screen());
                states.pop();
        }
        states.push(s);
        s->EnterState(*this, screen.Screen());
-       s->ResumeState(*this, screen.Screen());
+       s->ResumeState(screen.Screen());
 }
 
 void Application::RealPushState(State *s) {
        if (!states.empty()) {
-               states.top()->PauseState(*this, screen.Screen());
+               states.top()->PauseState(screen.Screen());
        }
        states.push(s);
        s->EnterState(*this, screen.Screen());
-       s->ResumeState(*this, screen.Screen());
+       s->ResumeState(screen.Screen());
 }
 
 void Application::RealPopState() {
        if (states.empty()) return;
-       states.top()->PauseState(*this, screen.Screen());
+       states.top()->PauseState(screen.Screen());
        states.top()->ExitState(*this, screen.Screen());
        delete states.top();
        states.pop();
        if (!states.empty()) {
-               states.top()->ResumeState(*this, screen.Screen());
+               states.top()->ResumeState(screen.Screen());
        }
 }
 
@@ -120,7 +120,7 @@ void Application::Quit() {
 
 void Application::PopAllStates() {
        while (!states.empty()) {
-               states.top()->PauseState(*this, screen.Screen());
+               states.top()->PauseState(screen.Screen());
                states.top()->ExitState(*this, screen.Screen());
                delete states.top();
                states.pop();
index f1c7712b01a63101c004a47e32b6e6be23bf78d3..2c8f0c32ad6f68a3bc452f01bf85ecca29dcba26 100644 (file)
@@ -25,20 +25,20 @@ State::~State() {
 
 void State::EnterState(Application &c, SDL_Surface *screen) {
        ctrl = &c;
-       OnEnterState(c, screen);
+       OnEnterState(screen);
 }
 
 void State::ExitState(Application &c, SDL_Surface *screen) {
-       OnExitState(c, screen);
+       OnExitState(screen);
        ctrl = 0;
 }
 
-void State::ResumeState(Application &ctrl, SDL_Surface *screen) {
-       OnResumeState(ctrl, screen);
+void State::ResumeState(SDL_Surface *screen) {
+       OnResumeState(screen);
 }
 
-void State::PauseState(Application &ctrl, SDL_Surface *screen) {
-       OnPauseState(ctrl, screen);
+void State::PauseState(SDL_Surface *screen) {
+       OnPauseState(screen);
 }
 
 void State::Resize(int width, int height) {
index 2a4b5e1bfd93176b8b9b4ebea58dfcfe9f519e8c..4e1fd7fe2bf5feadc90bfcf4edd6acd97f3dd166 100644 (file)
@@ -28,9 +28,9 @@ public:
        /// Called by Application when popping this state.
        void ExitState(Application &ctrl, SDL_Surface *screen);
        /// Called by Application when this state becomes the top state.
-       void ResumeState(Application &ctrl, SDL_Surface *screen);
+       void ResumeState(SDL_Surface *screen);
        /// Called by Application when this state no longer is the top state.
-       void PauseState(Application &ctrl, SDL_Surface *screen);
+       void PauseState(SDL_Surface *screen);
 
        /// Called by Application on SDL window resize events.
        void Resize(int width, int height);
@@ -54,14 +54,14 @@ private:
        /// can not be done by the constructor.
        /// Called when the state first enters the stack.
        /// @param ctrl the Application running the state
-       virtual void OnEnterState(Application &ctrl, SDL_Surface *screen) = 0;
+       virtual void OnEnterState(SDL_Surface *screen) = 0;
        /// Do some cleanup.
        /// Called when the state is popped from the stack.
-       virtual void OnExitState(Application &ctrl, SDL_Surface *screen) = 0;
+       virtual void OnExitState(SDL_Surface *screen) = 0;
        /// Called when the state becomes the active one.
-       virtual void OnResumeState(Application &ctrl, SDL_Surface *screen) = 0;
+       virtual void OnResumeState(SDL_Surface *screen) = 0;
        /// Called when the state becomes inactive.
-       virtual void OnPauseState(Application &ctrl, SDL_Surface *screen) = 0;
+       virtual void OnPauseState(SDL_Surface *screen) = 0;
 
        /// Adapt the state's graphics to given dimensions.
        /// NOTE: currently, this is only called for the stack top and not
index d442f2289becfefbbf4432ac37e637e292001eb3..be1ef34155571d65ccdf5a6923eddf47c38a781d 100644 (file)
@@ -79,7 +79,7 @@ void BattleState::OnResize(int w, int h) {
 }
 
 
-void BattleState::OnEnterState(Application &ctrl, SDL_Surface *screen) {
+void BattleState::OnEnterState(SDL_Surface *screen) {
        for (int i(0); i < 4; ++i) {
                heroes[i].Position() = heroesLayout->CalculatePosition(i, background->w, background->h);
                heroes[i].SpellMenu() = *res->spellMenuProperties;
@@ -130,28 +130,28 @@ void BattleState::LoadInventory() {
        ClearAllAttacks();
 }
 
-void BattleState::OnExitState(Application &ctrl, SDL_Surface *screen) {
+void BattleState::OnExitState(SDL_Surface *screen) {
 
 }
 
-void BattleState::OnResumeState(Application &ctrl, SDL_Surface *screen) {
+void BattleState::OnResumeState(SDL_Surface *screen) {
        if (ranAway) {
-               ctrl.PopState(); // quit the battle scene
+               Ctrl().PopState(); // quit the battle scene
                return;
        }
        if (Victory()) {
-               ctrl.PopState();
+               Ctrl().PopState();
                return;
        }
        if (Defeat()) {
-               ctrl.PopState();
+               Ctrl().PopState();
                return;
        }
        // TODO: this should not push a state while quitting
        if (AttackSelectionDone()) {
-               ctrl.PushState(new PerformAttacks(this));
+               Ctrl().PushState(new PerformAttacks(this));
        } else {
-               ctrl.PushState(new SelectMoveAction(this));
+               Ctrl().PushState(new SelectMoveAction(this));
        }
 }
 
@@ -169,7 +169,7 @@ bool BattleState::Defeat() const {
        return true;
 }
 
-void BattleState::OnPauseState(Application &ctrl, SDL_Surface *screen) {
+void BattleState::OnPauseState(SDL_Surface *screen) {
 
 }
 
index cc9eaf1f68992d7d8370c4a9a02a5d51911e16fa..e76440ed2908b44d17343174bc12a48d6bf7f69a 100644 (file)
@@ -131,10 +131,10 @@ public:
        void RenderSmallHeroTags(SDL_Surface *screen, const geometry::Vector<int> &offset);
 
 private:
-       virtual void OnEnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnPauseState(app::Application &ctrl, SDL_Surface *screen);
+       virtual void OnEnterState(SDL_Surface *screen);
+       virtual void OnExitState(SDL_Surface *screen);
+       virtual void OnResumeState(SDL_Surface *screen);
+       virtual void OnPauseState(SDL_Surface *screen);
 
        virtual void OnResize(int width, int height);
 
index a1a5b8b260226a5ad816765b1d14e419417f9582..665756fcf38d8639cbe2fcbf8216ab540f0fca95 100644 (file)
@@ -29,21 +29,21 @@ using std::vector;
 
 namespace battle {
 
-void PerformAttacks::OnEnterState(Application &c, SDL_Surface *screen) {
+void PerformAttacks::OnEnterState(SDL_Surface *screen) {
        battle->CalculateAttackOrder();
        numberAnimation.reserve(battle->MaxMonsters() > battle->NumHeroes() + 1 ? battle->MaxMonsters() : battle->NumHeroes() + 1);
        numberPosition.reserve(numberAnimation.size());
 }
 
-void PerformAttacks::OnExitState(Application &c, SDL_Surface *screen) {
+void PerformAttacks::OnExitState(SDL_Surface *screen) {
        battle->ClearAllAttacks();
 }
 
-void PerformAttacks::OnResumeState(Application &ctrl, SDL_Surface *screen) {
+void PerformAttacks::OnResumeState(SDL_Surface *screen) {
 
 }
 
-void PerformAttacks::OnPauseState(Application &ctrl, SDL_Surface *screen) {
+void PerformAttacks::OnPauseState(SDL_Surface *screen) {
 
 }
 
index 2fe9a06b9c5d31367d08d32489152a21a07b4747..06ce1b89cd93329719988b561b272fcf1c6982e9 100644 (file)
@@ -32,10 +32,10 @@ public:
        virtual void Render(SDL_Surface *);
 
 private:
-       virtual void OnEnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnPauseState(app::Application &ctrl, SDL_Surface *screen);
+       virtual void OnEnterState(SDL_Surface *screen);
+       virtual void OnExitState(SDL_Surface *screen);
+       virtual void OnResumeState(SDL_Surface *screen);
+       virtual void OnPauseState(SDL_Surface *screen);
 
        virtual void OnResize(int width, int height);
 
index cf113f24f5a41b6aa433191f64365b14b4176f1e..311e0f35c3cc8b8c7aba89350901da1c762a3e92 100644 (file)
@@ -22,19 +22,19 @@ using geometry::Vector;
 
 namespace battle {
 
-void RunState::OnEnterState(Application &c, SDL_Surface *screen) {
+void RunState::OnEnterState(SDL_Surface *screen) {
 
 }
 
-void RunState::OnExitState(Application &c, SDL_Surface *screen) {
+void RunState::OnExitState(SDL_Surface *screen) {
 
 }
 
-void RunState::OnResumeState(Application &ctrl, SDL_Surface *screen) {
+void RunState::OnResumeState(SDL_Surface *screen) {
        timer = GraphicsTimers().StartCountdown(2500);
 }
 
-void RunState::OnPauseState(Application &ctrl, SDL_Surface *screen) {
+void RunState::OnPauseState(SDL_Surface *screen) {
 
 }
 
index 9cee764776e59df9062658db3c415f19b1b969a1..cf91f9ab47796eb0659223093526b3f0a61d6bb0 100644 (file)
@@ -28,10 +28,10 @@ public:
        virtual void Render(SDL_Surface *);
 
 private:
-       virtual void OnEnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnPauseState(app::Application &ctrl, SDL_Surface *screen);
+       virtual void OnEnterState(SDL_Surface *screen);
+       virtual void OnExitState(SDL_Surface *screen);
+       virtual void OnResumeState(SDL_Surface *screen);
+       virtual void OnPauseState(SDL_Surface *screen);
 
        virtual void OnResize(int width, int height);
 
index 31a0be0e2e853a6ddb90e623156d3621486981e8..fade2326d305ff815f1c1cd4a55241e47d8bb273 100644 (file)
@@ -27,26 +27,26 @@ using geometry::Vector;
 
 namespace battle {
 
-void SelectAttackType::OnEnterState(Application &c, SDL_Surface *screen) {
+void SelectAttackType::OnEnterState(SDL_Surface *screen) {
 
 }
 
-void SelectAttackType::OnExitState(Application &c, SDL_Surface *screen) {
+void SelectAttackType::OnExitState(SDL_Surface *screen) {
 
 }
 
-void SelectAttackType::OnResumeState(Application &ctrl, SDL_Surface *screen) {
+void SelectAttackType::OnResumeState(SDL_Surface *screen) {
        if (battle->ActiveHero().GetAttackChoice().Selection().HasSelected()) {
                battle->ActiveHero().GetAttackChoice().SetType(battle->GetAttackTypeMenu().Selected());
                battle->NextHero();
        }
        if (battle->AttackSelectionDone()) {
                // pass through
-               ctrl.PopState();
+               Ctrl().PopState();
        }
 }
 
-void SelectAttackType::OnPauseState(Application &ctrl, SDL_Surface *screen) {
+void SelectAttackType::OnPauseState(SDL_Surface *screen) {
 
 }
 
index 3f9832777a5364d6711aad908d99084331366057..64a7dbd9414b615ba9cbec40d3c30cb36ac3d283 100644 (file)
@@ -27,10 +27,10 @@ public:
        virtual void Render(SDL_Surface *);
 
 private:
-       virtual void OnEnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnPauseState(app::Application &ctrl, SDL_Surface *screen);
+       virtual void OnEnterState(SDL_Surface *screen);
+       virtual void OnExitState(SDL_Surface *screen);
+       virtual void OnResumeState(SDL_Surface *screen);
+       virtual void OnPauseState(SDL_Surface *screen);
 
        virtual void OnResize(int width, int height);
 
index 604689c998d28dbd258f2c8f4636cfc68d1489b2..2860a81afa7977ec5905b5b1356f63469ac6775a 100644 (file)
@@ -24,23 +24,23 @@ using graphics::Frame;
 
 namespace battle {
 
-void SelectIkari::OnEnterState(Application &c, SDL_Surface *screen) {
+void SelectIkari::OnEnterState(SDL_Surface *screen) {
 
 }
 
-void SelectIkari::OnExitState(Application &c, SDL_Surface *screen) {
+void SelectIkari::OnExitState(SDL_Surface *screen) {
 
 }
 
-void SelectIkari::OnResumeState(Application &ctrl, SDL_Surface *screen) {
+void SelectIkari::OnResumeState(SDL_Surface *screen) {
        if (battle->ActiveHero().GetAttackChoice().Selection().HasSelected()) {
                battle->ActiveHero().GetAttackChoice().SetType(AttackChoice::IKARI);
                battle->ActiveHero().GetAttackChoice().SetItem(battle->ActiveHero().IkariMenu().Selected());
-               ctrl.PopState();
+               Ctrl().PopState();
        }
 }
 
-void SelectIkari::OnPauseState(Application &ctrl, SDL_Surface *screen) {
+void SelectIkari::OnPauseState(SDL_Surface *screen) {
 
 }
 
index 136436f6c680b251cbe8e743ef7d6a4c8a1a2ff5..8603a57f5f3258f657d588cbbbd7a8f401673d03 100644 (file)
@@ -28,10 +28,10 @@ public:
        virtual void Render(SDL_Surface *);
 
 private:
-       virtual void OnEnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnPauseState(app::Application &ctrl, SDL_Surface *screen);
+       virtual void OnEnterState(SDL_Surface *screen);
+       virtual void OnExitState(SDL_Surface *screen);
+       virtual void OnResumeState(SDL_Surface *screen);
+       virtual void OnPauseState(SDL_Surface *screen);
 
        virtual void OnResize(int width, int height);
 
index fe6ce7b3ba7dc9fa8e1addc5382883012317e3d0..6ca43960ac1277c31fa0b48cdb054278150abb2e 100644 (file)
@@ -23,23 +23,23 @@ using graphics::Frame;
 
 namespace battle {
 
-void SelectItem::OnEnterState(Application &c, SDL_Surface *screen) {
+void SelectItem::OnEnterState(SDL_Surface *screen) {
 
 }
 
-void SelectItem::OnExitState(Application &c, SDL_Surface *screen) {
+void SelectItem::OnExitState(SDL_Surface *screen) {
 
 }
 
-void SelectItem::OnResumeState(Application &ctrl, SDL_Surface *screen) {
+void SelectItem::OnResumeState(SDL_Surface *screen) {
        if (battle->ActiveHero().GetAttackChoice().Selection().HasSelected()) {
                battle->ActiveHero().GetAttackChoice().SetType(AttackChoice::ITEM);
                battle->ActiveHero().GetAttackChoice().SetItem(battle->ItemMenu().Selected());
-               ctrl.PopState();
+               Ctrl().PopState();
        }
 }
 
-void SelectItem::OnPauseState(Application &ctrl, SDL_Surface *screen) {
+void SelectItem::OnPauseState(SDL_Surface *screen) {
 
 }
 
index 52429aa5c9d9d15bad4f319d183c44eddedff179..1942ff405e74e98460f7f0a3dacbed4e354d6847 100644 (file)
@@ -27,10 +27,10 @@ public:
        virtual void Render(SDL_Surface *);
 
 private:
-       virtual void OnEnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnPauseState(app::Application &ctrl, SDL_Surface *screen);
+       virtual void OnEnterState(SDL_Surface *screen);
+       virtual void OnExitState(SDL_Surface *screen);
+       virtual void OnResumeState(SDL_Surface *screen);
+       virtual void OnPauseState(SDL_Surface *screen);
 
        virtual void OnResize(int width, int height);
 
index bb7148727d77246e250d362fe323e19d6c639373..52b670b5d941d019b1132884a40af89557c83763 100644 (file)
@@ -21,19 +21,19 @@ using geometry::Vector;
 
 namespace battle {
 
-void SelectMoveAction::OnEnterState(Application &c, SDL_Surface *screen) {
+void SelectMoveAction::OnEnterState(SDL_Surface *screen) {
 
 }
 
-void SelectMoveAction::OnExitState(Application &c, SDL_Surface *screen) {
+void SelectMoveAction::OnExitState(SDL_Surface *screen) {
 
 }
 
-void SelectMoveAction::OnResumeState(Application &ctrl, SDL_Surface *screen) {
+void SelectMoveAction::OnResumeState(SDL_Surface *screen) {
 
 }
 
-void SelectMoveAction::OnPauseState(Application &ctrl, SDL_Surface *screen) {
+void SelectMoveAction::OnPauseState(SDL_Surface *screen) {
 
 }
 
index cd54aed1e0f38c22aa39ea66a2d9dfcb00bf0d86..a48633d6dc7434b8ea754cf51c60eae5463d7d7b 100644 (file)
@@ -27,10 +27,10 @@ public:
        virtual void Render(SDL_Surface *);
 
 private:
-       virtual void OnEnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnPauseState(app::Application &ctrl, SDL_Surface *screen);
+       virtual void OnEnterState(SDL_Surface *screen);
+       virtual void OnExitState(SDL_Surface *screen);
+       virtual void OnResumeState(SDL_Surface *screen);
+       virtual void OnPauseState(SDL_Surface *screen);
 
        virtual void OnResize(int width, int height);
 
index 623181e81265339c855fdf57cc1e1b86c661d923..d7941c8e917212c58753a2b645e6b5875ebf37d1 100644 (file)
@@ -24,23 +24,23 @@ using graphics::Frame;
 
 namespace battle {
 
-void SelectSpell::OnEnterState(Application &c, SDL_Surface *screen) {
+void SelectSpell::OnEnterState(SDL_Surface *screen) {
 
 }
 
-void SelectSpell::OnExitState(Application &c, SDL_Surface *screen) {
+void SelectSpell::OnExitState(SDL_Surface *screen) {
 
 }
 
-void SelectSpell::OnResumeState(Application &ctrl, SDL_Surface *screen) {
+void SelectSpell::OnResumeState(SDL_Surface *screen) {
        if (battle->ActiveHero().GetAttackChoice().Selection().HasSelected()) {
                battle->ActiveHero().GetAttackChoice().SetType(AttackChoice::MAGIC);
                battle->ActiveHero().GetAttackChoice().SetSpell(battle->ActiveHero().SpellMenu().Selected());
-               ctrl.PopState();
+               Ctrl().PopState();
        }
 }
 
-void SelectSpell::OnPauseState(Application &ctrl, SDL_Surface *screen) {
+void SelectSpell::OnPauseState(SDL_Surface *screen) {
 
 }
 
index a1bbac78dda90d830346b4cb21a8f9e351047f5d..514a2b8a6b55175ad1ce5e596b4d9e458190ac00 100644 (file)
@@ -27,10 +27,10 @@ public:
        virtual void Render(SDL_Surface *);
 
 private:
-       virtual void OnEnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnPauseState(app::Application &ctrl, SDL_Surface *screen);
+       virtual void OnEnterState(SDL_Surface *screen);
+       virtual void OnExitState(SDL_Surface *screen);
+       virtual void OnResumeState(SDL_Surface *screen);
+       virtual void OnPauseState(SDL_Surface *screen);
 
        virtual void OnResize(int width, int height);
 
index 740e46c355065da33fcfb2c27640a3976c129376..1961738623a30a1c9f3ec2f90c340c3a651f4dbe 100644 (file)
@@ -19,19 +19,19 @@ using std::vector;
 
 namespace battle {
 
-void SelectTarget::OnEnterState(Application &c, SDL_Surface *screen) {
+void SelectTarget::OnEnterState(SDL_Surface *screen) {
 
 }
 
-void SelectTarget::OnExitState(Application &c, SDL_Surface *screen) {
+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) {
 
 }
 
index 01ebba72315dffee10258c84b8daabcf59f0e747..388aef3544cfb99e0d0729342937762b5509023c 100644 (file)
@@ -28,10 +28,10 @@ public:
        virtual void Render(SDL_Surface *);
 
 private:
-       virtual void OnEnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnPauseState(app::Application &ctrl, SDL_Surface *screen);
+       virtual void OnEnterState(SDL_Surface *screen);
+       virtual void OnExitState(SDL_Surface *screen);
+       virtual void OnResumeState(SDL_Surface *screen);
+       virtual void OnPauseState(SDL_Surface *screen);
 
        virtual void OnResize(int width, int height);
 
index 0dcd0bd4ea837bda9e30f340a6a9f947f00ad38c..357e324eced45ea995c1a0f45e23b9aa0cacba40 100644 (file)
@@ -19,19 +19,19 @@ using std::vector;
 
 namespace battle {
 
-void SwapHeroes::OnEnterState(Application &c, SDL_Surface *screen) {
+void SwapHeroes::OnEnterState(SDL_Surface *screen) {
 
 }
 
-void SwapHeroes::OnExitState(Application &c, SDL_Surface *screen) {
+void SwapHeroes::OnExitState(SDL_Surface *screen) {
 
 }
 
-void SwapHeroes::OnResumeState(Application &ctrl, SDL_Surface *screen) {
+void SwapHeroes::OnResumeState(SDL_Surface *screen) {
 
 }
 
-void SwapHeroes::OnPauseState(Application &ctrl, SDL_Surface *screen) {
+void SwapHeroes::OnPauseState(SDL_Surface *screen) {
 
 }
 
index 1710721e85f5f6d0657173f0dce5e796bccf85e4..198e4d3d1504d0a99aa78471ee7d51b2123bb3c7 100644 (file)
@@ -27,10 +27,10 @@ public:
        virtual void Render(SDL_Surface *);
 
 private:
-       virtual void OnEnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnPauseState(app::Application &ctrl, SDL_Surface *screen);
+       virtual void OnEnterState(SDL_Surface *screen);
+       virtual void OnExitState(SDL_Surface *screen);
+       virtual void OnResumeState(SDL_Surface *screen);
+       virtual void OnPauseState(SDL_Surface *screen);
 
        virtual void OnResize(int width, int height);
 
index f194665d1daecb35694880474e2b35dba549f2e8..8afd87be72b8345c76b1ca753b34ac8c5e6d6674 100644 (file)
@@ -29,7 +29,7 @@ ColorFade::ColorFade(State *slave, Uint32 color, int duration, bool in, bool int
 
 }
 
-void ColorFade::OnEnterState(Application &c, SDL_Surface *screen) {
+void ColorFade::OnEnterState(SDL_Surface *screen) {
        if (leadIn > 0) {
                timer = GraphicsTimers().StartCountdown(leadIn);
        } else {
@@ -38,18 +38,18 @@ void ColorFade::OnEnterState(Application &c, SDL_Surface *screen) {
        }
 }
 
-void ColorFade::OnExitState(Application &, SDL_Surface *screen) {
+void ColorFade::OnExitState(SDL_Surface *screen) {
        if (blinds) {
                SDL_FreeSurface(blinds);
                blinds = 0;
        }
 }
 
-void ColorFade::OnResumeState(Application &ctrl, SDL_Surface *screen) {
+void ColorFade::OnResumeState(SDL_Surface *screen) {
        UpdateBlinds(screen->w, screen->h);
 }
 
-void ColorFade::OnPauseState(Application &ctrl, SDL_Surface *screen) {
+void ColorFade::OnPauseState(SDL_Surface *screen) {
 
 }
 
index 5e146636eada502d3d39f53a3a767806af9aba1d..079d30ea74a44a49f53c0707d6136fc9f97c8a96 100644 (file)
@@ -32,10 +32,10 @@ public:
        virtual void Render(SDL_Surface *);
 
 private:
-       virtual void OnEnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnPauseState(app::Application &ctrl, SDL_Surface *screen);
+       virtual void OnEnterState(SDL_Surface *screen);
+       virtual void OnExitState(SDL_Surface *screen);
+       virtual void OnResumeState(SDL_Surface *screen);
+       virtual void OnPauseState(SDL_Surface *screen);
 
        virtual void OnResize(int width, int height);
 
index 8e70acd19dbbccf0adf08601790a693162962db9..500acea60623b5dd464d99f62ebbdff24848165d 100644 (file)
@@ -46,20 +46,20 @@ MapState::MapState(GameConfig *g, Map *map)
 }
 
 
-void MapState::OnEnterState(Application &c, SDL_Surface *screen) {
+void MapState::OnEnterState(SDL_Surface *screen) {
        camera.Resize(screen->w, screen->h);
        LoadMap(map);
 }
 
-void MapState::OnExitState(Application &ctrl, SDL_Surface *screen) {
+void MapState::OnExitState(SDL_Surface *screen) {
 
 }
 
-void MapState::OnResumeState(Application &ctrl, SDL_Surface *screen) {
+void MapState::OnResumeState(SDL_Surface *screen) {
        camera.Resize(screen->w, screen->h);
 }
 
-void MapState::OnPauseState(Application &ctrl, SDL_Surface *screen) {
+void MapState::OnPauseState(SDL_Surface *screen) {
 
 }
 
index 9cff10cbfa5cbd248b7188d7bd3bfb762342ae92..1b53d776b0c457ace6b3b730b8fea5f959ae33d5 100644 (file)
@@ -45,10 +45,10 @@ public:
        virtual void HandleSyscall(common::ScriptRunner &);
 
 private:
-       virtual void OnEnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnPauseState(app::Application &ctrl, SDL_Surface *screen);
+       virtual void OnEnterState(SDL_Surface *screen);
+       virtual void OnExitState(SDL_Surface *screen);
+       virtual void OnResumeState(SDL_Surface *screen);
+       virtual void OnPauseState(SDL_Surface *screen);
 
        virtual void OnResize(int width, int height);
 
index b339381001fd711a4d0ce614ed5698fabeb60add..4490f83b37b0170d2bc22b2f8d22250ad165e2f6 100644 (file)
@@ -24,19 +24,19 @@ TransitionState::TransitionState(MapState *ms, Map *map, const Vector<int> &coor
 
 }
 
-void TransitionState::OnEnterState(Application &c, SDL_Surface *screen) {
+void TransitionState::OnEnterState(SDL_Surface *screen) {
 
 }
 
-void TransitionState::OnExitState(Application &, SDL_Surface *screen) {
+void TransitionState::OnExitState(SDL_Surface *screen) {
 
 }
 
-void TransitionState::OnResumeState(Application &ctrl, SDL_Surface *screen) {
+void TransitionState::OnResumeState(SDL_Surface *screen) {
 
 }
 
-void TransitionState::OnPauseState(Application &ctrl, SDL_Surface *screen) {
+void TransitionState::OnPauseState(SDL_Surface *screen) {
 
 }
 
index 134e54a505de8cd97d76f6c8b18d288c850e8a5d..1790d716c39a010fddd3ed85628e25a8d7aa2757 100644 (file)
@@ -27,10 +27,10 @@ public:
        virtual void Render(SDL_Surface *);
 
 private:
-       virtual void OnEnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnPauseState(app::Application &ctrl, SDL_Surface *screen);
+       virtual void OnEnterState(SDL_Surface *screen);
+       virtual void OnExitState(SDL_Surface *screen);
+       virtual void OnResumeState(SDL_Surface *screen);
+       virtual void OnPauseState(SDL_Surface *screen);
 
        virtual void OnResize(int width, int height);