]> git.localhorst.tv Git - l2e.git/commitdiff
renamed state callbacks
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Tue, 16 Oct 2012 21:02:42 +0000 (23:02 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Tue, 16 Oct 2012 21:02:42 +0000 (23:02 +0200)
28 files changed:
src/app/Application.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..06ea7270f545ec25aebb6e4234c2587b011adac6 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()->ExitState(*this, screen.Screen());
+               states.top()->OnPauseState(*this, screen.Screen());
+               states.top()->OnExitState(*this, screen.Screen());
                states.pop();
        }
        states.push(s);
-       s->EnterState(*this, screen.Screen());
-       s->ResumeState(*this, screen.Screen());
+       s->OnEnterState(*this, screen.Screen());
+       s->OnResumeState(*this, screen.Screen());
 }
 
 void Application::RealPushState(State *s) {
        if (!states.empty()) {
-               states.top()->PauseState(*this, screen.Screen());
+               states.top()->OnPauseState(*this, screen.Screen());
        }
        states.push(s);
-       s->EnterState(*this, screen.Screen());
-       s->ResumeState(*this, screen.Screen());
+       s->OnEnterState(*this, screen.Screen());
+       s->OnResumeState(*this, screen.Screen());
 }
 
 void Application::RealPopState() {
        if (states.empty()) return;
-       states.top()->PauseState(*this, screen.Screen());
-       states.top()->ExitState(*this, screen.Screen());
+       states.top()->OnPauseState(*this, screen.Screen());
+       states.top()->OnExitState(*this, screen.Screen());
        delete states.top();
        states.pop();
        if (!states.empty()) {
-               states.top()->ResumeState(*this, screen.Screen());
+               states.top()->OnResumeState(*this, screen.Screen());
        }
 }
 
@@ -120,8 +120,8 @@ void Application::Quit() {
 
 void Application::PopAllStates() {
        while (!states.empty()) {
-               states.top()->PauseState(*this, screen.Screen());
-               states.top()->ExitState(*this, screen.Screen());
+               states.top()->OnPauseState(*this, screen.Screen());
+               states.top()->OnExitState(*this, screen.Screen());
                delete states.top();
                states.pop();
        }
index 41af536280c92acfff4de02172123dbdf56ad343..28cb94d5d978179e2828f132aa6819875a5fd241 100644 (file)
@@ -26,14 +26,14 @@ public:
        /// can not be done by the constructor.
        /// Called when the state first enters the stack.
        /// @param ctrl the Application running the state
-       virtual void EnterState(Application &ctrl, SDL_Surface *screen) = 0;
+       virtual void OnEnterState(Application &ctrl, SDL_Surface *screen) = 0;
        /// Do some cleanup.
        /// Called when the state is popped from the stack.
-       virtual void ExitState(Application &ctrl, SDL_Surface *screen) = 0;
+       virtual void OnExitState(Application &ctrl, SDL_Surface *screen) = 0;
        /// Called when the state becomes the active one.
-       virtual void ResumeState(Application &ctrl, SDL_Surface *screen) = 0;
+       virtual void OnResumeState(Application &ctrl, SDL_Surface *screen) = 0;
        /// Called when the state becomes inactive.
-       virtual void PauseState(Application &ctrl, SDL_Surface *screen) = 0;
+       virtual void OnPauseState(Application &ctrl, 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 dcd824e32243e3a51504ca1a9b286ad49dda4094..c2310eaeed3510196575802f8b7c628507340b92 100644 (file)
@@ -79,7 +79,7 @@ void BattleState::Resize(int w, int h) {
 }
 
 
-void BattleState::EnterState(Application &ctrl, SDL_Surface *screen) {
+void BattleState::OnEnterState(Application &ctrl, 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,11 +130,11 @@ void BattleState::LoadInventory() {
        ClearAllAttacks();
 }
 
-void BattleState::ExitState(Application &ctrl, SDL_Surface *screen) {
+void BattleState::OnExitState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
-void BattleState::ResumeState(Application &ctrl, SDL_Surface *screen) {
+void BattleState::OnResumeState(Application &ctrl, SDL_Surface *screen) {
        if (ranAway) {
                ctrl.PopState(); // quit the battle scene
                return;
@@ -169,7 +169,7 @@ bool BattleState::Defeat() const {
        return true;
 }
 
-void BattleState::PauseState(Application &ctrl, SDL_Surface *screen) {
+void BattleState::OnPauseState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
index 60c24bc87aef33faf4537d961d82ea8cf05bc199..4ac64594ba498d35b3e2dfae0fd4d604176247a0 100644 (file)
@@ -56,10 +56,10 @@ public:
        void AddHero(const Hero &);
 
 public:
-       virtual void EnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void PauseState(app::Application &ctrl, SDL_Surface *screen);
+       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 Resize(int width, int height);
 
index 19fccb08d7384539add191705bfc160c5f097d9b..2c82c09aa1d6cb02ec2733a043710e03fdd5e32e 100644 (file)
@@ -29,23 +29,23 @@ using std::vector;
 
 namespace battle {
 
-void PerformAttacks::EnterState(Application &c, SDL_Surface *screen) {
+void PerformAttacks::OnEnterState(Application &c, SDL_Surface *screen) {
        ctrl = &c;
        battle->CalculateAttackOrder();
        numberAnimation.reserve(battle->MaxMonsters() > battle->NumHeroes() + 1 ? battle->MaxMonsters() : battle->NumHeroes() + 1);
        numberPosition.reserve(numberAnimation.size());
 }
 
-void PerformAttacks::ExitState(Application &c, SDL_Surface *screen) {
+void PerformAttacks::OnExitState(Application &c, SDL_Surface *screen) {
        battle->ClearAllAttacks();
        ctrl = 0;
 }
 
-void PerformAttacks::ResumeState(Application &ctrl, SDL_Surface *screen) {
+void PerformAttacks::OnResumeState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
-void PerformAttacks::PauseState(Application &ctrl, SDL_Surface *screen) {
+void PerformAttacks::OnPauseState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
index 19c6967379b258cafad54e48ac48ee5ecaccbbbe..44ea74bf9eb97e9aad025995c318dfb0666e0d1c 100644 (file)
@@ -27,10 +27,10 @@ public:
        : ctrl(0), battle(battle), moveAnimation(0), targetAnimation(0), titleBarText(0), cursor(-1) { }
 
 public:
-       virtual void EnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void PauseState(app::Application &ctrl, SDL_Surface *screen);
+       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 Resize(int width, int height);
 
index c75255c3d1edf51e9cd461066fdfd0c7ea2885d9..56bcbedc7c7db2c7c02dabae00eb2cda0216aec7 100644 (file)
@@ -22,19 +22,19 @@ using geometry::Vector;
 
 namespace battle {
 
-void RunState::EnterState(Application &c, SDL_Surface *screen) {
+void RunState::OnEnterState(Application &c, SDL_Surface *screen) {
        ctrl = &c;
 }
 
-void RunState::ExitState(Application &c, SDL_Surface *screen) {
+void RunState::OnExitState(Application &c, SDL_Surface *screen) {
        ctrl = 0;
 }
 
-void RunState::ResumeState(Application &ctrl, SDL_Surface *screen) {
+void RunState::OnResumeState(Application &ctrl, SDL_Surface *screen) {
        timer = GraphicsTimers().StartCountdown(2500);
 }
 
-void RunState::PauseState(Application &ctrl, SDL_Surface *screen) {
+void RunState::OnPauseState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
index 7af5461020c1439fa10ccc6f578404730144f0db..b1c18cb7bca65382ac3c11f95fc5c211e552c381 100644 (file)
@@ -22,10 +22,10 @@ public:
        : ctrl(0), battle(battle){ }
 
 public:
-       virtual void EnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void PauseState(app::Application &ctrl, SDL_Surface *screen);
+       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 Resize(int width, int height);
 
index fbd43336769f1c3d570c3e867d948b1340accc3c..351ad1c3584337d85a4d6b4baa3bc20a7a8fc3bb 100644 (file)
@@ -27,15 +27,15 @@ using geometry::Vector;
 
 namespace battle {
 
-void SelectAttackType::EnterState(Application &c, SDL_Surface *screen) {
+void SelectAttackType::OnEnterState(Application &c, SDL_Surface *screen) {
        ctrl = &c;
 }
 
-void SelectAttackType::ExitState(Application &c, SDL_Surface *screen) {
+void SelectAttackType::OnExitState(Application &c, SDL_Surface *screen) {
        ctrl = 0;
 }
 
-void SelectAttackType::ResumeState(Application &ctrl, SDL_Surface *screen) {
+void SelectAttackType::OnResumeState(Application &ctrl, SDL_Surface *screen) {
        if (battle->ActiveHero().GetAttackChoice().Selection().HasSelected()) {
                battle->ActiveHero().GetAttackChoice().SetType(battle->GetAttackTypeMenu().Selected());
                battle->NextHero();
@@ -46,7 +46,7 @@ void SelectAttackType::ResumeState(Application &ctrl, SDL_Surface *screen) {
        }
 }
 
-void SelectAttackType::PauseState(Application &ctrl, SDL_Surface *screen) {
+void SelectAttackType::OnPauseState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
index 17298b2244a5f33c030a4d09fbf927dca252ef9d..6acaaef8e15bc39b75f166257e464bb6569f6323 100644 (file)
@@ -22,10 +22,10 @@ public:
        : ctrl(0), battle(battle) { }
 
 public:
-       virtual void EnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void PauseState(app::Application &ctrl, SDL_Surface *screen);
+       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 Resize(int width, int height);
 
index 22853ce725c36d76fb09f0ef8e153efc3fc9c5d0..898b85c27e8600219abf25966415982c369c7705 100644 (file)
@@ -24,15 +24,15 @@ using graphics::Frame;
 
 namespace battle {
 
-void SelectIkari::EnterState(Application &c, SDL_Surface *screen) {
+void SelectIkari::OnEnterState(Application &c, SDL_Surface *screen) {
        ctrl = &c;
 }
 
-void SelectIkari::ExitState(Application &c, SDL_Surface *screen) {
+void SelectIkari::OnExitState(Application &c, SDL_Surface *screen) {
        ctrl = 0;
 }
 
-void SelectIkari::ResumeState(Application &ctrl, SDL_Surface *screen) {
+void SelectIkari::OnResumeState(Application &ctrl, SDL_Surface *screen) {
        if (battle->ActiveHero().GetAttackChoice().Selection().HasSelected()) {
                battle->ActiveHero().GetAttackChoice().SetType(AttackChoice::IKARI);
                battle->ActiveHero().GetAttackChoice().SetItem(battle->ActiveHero().IkariMenu().Selected());
@@ -40,7 +40,7 @@ void SelectIkari::ResumeState(Application &ctrl, SDL_Surface *screen) {
        }
 }
 
-void SelectIkari::PauseState(Application &ctrl, SDL_Surface *screen) {
+void SelectIkari::OnPauseState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
index 8e565c4e0abbc3d39317a4e4a2df4f0926ed7d81..9e89912f63274163b1ec7e63a8245f270dabd572 100644 (file)
@@ -23,10 +23,10 @@ public:
        : ctrl(0), battle(battle), parent(parent) { }
 
 public:
-       virtual void EnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void PauseState(app::Application &ctrl, SDL_Surface *screen);
+       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 Resize(int width, int height);
 
index e0f6aebe4736e5ed3a9a156379668a3570136e5d..86f11c25bf3e79547671a9cb507ce85c974a2c94 100644 (file)
@@ -23,15 +23,15 @@ using graphics::Frame;
 
 namespace battle {
 
-void SelectItem::EnterState(Application &c, SDL_Surface *screen) {
+void SelectItem::OnEnterState(Application &c, SDL_Surface *screen) {
        ctrl = &c;
 }
 
-void SelectItem::ExitState(Application &c, SDL_Surface *screen) {
+void SelectItem::OnExitState(Application &c, SDL_Surface *screen) {
        ctrl = 0;
 }
 
-void SelectItem::ResumeState(Application &ctrl, SDL_Surface *screen) {
+void SelectItem::OnResumeState(Application &ctrl, SDL_Surface *screen) {
        if (battle->ActiveHero().GetAttackChoice().Selection().HasSelected()) {
                battle->ActiveHero().GetAttackChoice().SetType(AttackChoice::ITEM);
                battle->ActiveHero().GetAttackChoice().SetItem(battle->ItemMenu().Selected());
@@ -39,7 +39,7 @@ void SelectItem::ResumeState(Application &ctrl, SDL_Surface *screen) {
        }
 }
 
-void SelectItem::PauseState(Application &ctrl, SDL_Surface *screen) {
+void SelectItem::OnPauseState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
index 3d03d2f3ea15387f96740ed7a1efe764fb73ed69..bf29124e55cc0657851c32cd778968656a36e004 100644 (file)
@@ -22,10 +22,10 @@ public:
        : ctrl(0), battle(battle), parent(parent) { }
 
 public:
-       virtual void EnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void PauseState(app::Application &ctrl, SDL_Surface *screen);
+       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 Resize(int width, int height);
 
index b2cac81e7357330918b501ee75dcf056d5b82d0d..351116bf0918e4e7aa434fcdc76accd7b412d941 100644 (file)
@@ -21,19 +21,19 @@ using geometry::Vector;
 
 namespace battle {
 
-void SelectMoveAction::EnterState(Application &c, SDL_Surface *screen) {
+void SelectMoveAction::OnEnterState(Application &c, SDL_Surface *screen) {
        ctrl = &c;
 }
 
-void SelectMoveAction::ExitState(Application &c, SDL_Surface *screen) {
+void SelectMoveAction::OnExitState(Application &c, SDL_Surface *screen) {
        ctrl = 0;
 }
 
-void SelectMoveAction::ResumeState(Application &ctrl, SDL_Surface *screen) {
+void SelectMoveAction::OnResumeState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
-void SelectMoveAction::PauseState(Application &ctrl, SDL_Surface *screen) {
+void SelectMoveAction::OnPauseState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
index 8a2846898219fa49b518917d7b7da4f1bbf4dab7..f302ebf9ac0b5b36a7175a619af07158d0229f4a 100644 (file)
@@ -22,10 +22,10 @@ public:
        : ctrl(0), battle(battle) { }
 
 public:
-       virtual void EnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void PauseState(app::Application &ctrl, SDL_Surface *screen);
+       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 Resize(int width, int height);
 
index df9273355e2d7135ed5a9bdd3f8772fd9787b350..cdf9b698fe9405416d803cbe33d25c42609c94d4 100644 (file)
@@ -24,15 +24,15 @@ using graphics::Frame;
 
 namespace battle {
 
-void SelectSpell::EnterState(Application &c, SDL_Surface *screen) {
+void SelectSpell::OnEnterState(Application &c, SDL_Surface *screen) {
        ctrl = &c;
 }
 
-void SelectSpell::ExitState(Application &c, SDL_Surface *screen) {
+void SelectSpell::OnExitState(Application &c, SDL_Surface *screen) {
        ctrl = 0;
 }
 
-void SelectSpell::ResumeState(Application &ctrl, SDL_Surface *screen) {
+void SelectSpell::OnResumeState(Application &ctrl, SDL_Surface *screen) {
        if (battle->ActiveHero().GetAttackChoice().Selection().HasSelected()) {
                battle->ActiveHero().GetAttackChoice().SetType(AttackChoice::MAGIC);
                battle->ActiveHero().GetAttackChoice().SetSpell(battle->ActiveHero().SpellMenu().Selected());
@@ -40,7 +40,7 @@ void SelectSpell::ResumeState(Application &ctrl, SDL_Surface *screen) {
        }
 }
 
-void SelectSpell::PauseState(Application &ctrl, SDL_Surface *screen) {
+void SelectSpell::OnPauseState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
index 38d2c39e6ab3afc869a2a7575ec92aacb200130e..237e662c99753830db45d9ee396755c07593cfca 100644 (file)
@@ -22,10 +22,10 @@ public:
        : ctrl(0), battle(battle), parent(parent) { }
 
 public:
-       virtual void EnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void PauseState(app::Application &ctrl, SDL_Surface *screen);
+       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 Resize(int width, int height);
 
index e8572884cf2648c366403385e44c7824da413fa2..0b5b01d6b78a3e096eba04df7aa9882af4cc896e 100644 (file)
@@ -19,19 +19,19 @@ using std::vector;
 
 namespace battle {
 
-void SelectTarget::EnterState(Application &c, SDL_Surface *screen) {
+void SelectTarget::OnEnterState(Application &c, SDL_Surface *screen) {
        ctrl = &c;
 }
 
-void SelectTarget::ExitState(Application &c, SDL_Surface *screen) {
+void SelectTarget::OnExitState(Application &c, SDL_Surface *screen) {
        ctrl = 0;
 }
 
-void SelectTarget::ResumeState(Application &ctrl, SDL_Surface *screen) {
+void SelectTarget::OnResumeState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
-void SelectTarget::PauseState(Application &ctrl, SDL_Surface *screen) {
+void SelectTarget::OnPauseState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
index 9bd51f5872aa6bb991aafcf4e1828d3e6bed4224..50d1000505d9e8b06b0b54befe75fbee983a5179 100644 (file)
@@ -23,10 +23,10 @@ public:
        : ctrl(0), battle(battle), parent(parent), selection(selection), cursorIcon(cursorIcon), flipFlop(true) { }
 
 public:
-       virtual void EnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void PauseState(app::Application &ctrl, SDL_Surface *screen);
+       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 Resize(int width, int height);
 
index 5c83f7403cbfee69c369f99c0a036f733f55157e..0feb7e9a59ac04a18288e04348cf4e7d730b5b6f 100644 (file)
@@ -19,19 +19,19 @@ using std::vector;
 
 namespace battle {
 
-void SwapHeroes::EnterState(Application &c, SDL_Surface *screen) {
+void SwapHeroes::OnEnterState(Application &c, SDL_Surface *screen) {
        ctrl = &c;
 }
 
-void SwapHeroes::ExitState(Application &c, SDL_Surface *screen) {
+void SwapHeroes::OnExitState(Application &c, SDL_Surface *screen) {
        ctrl = 0;
 }
 
-void SwapHeroes::ResumeState(Application &ctrl, SDL_Surface *screen) {
+void SwapHeroes::OnResumeState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
-void SwapHeroes::PauseState(Application &ctrl, SDL_Surface *screen) {
+void SwapHeroes::OnPauseState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
index 8ad92981c6eeae5952563d8c6272b45addbba943..1e7602aa0405bf51cad8193e6b40c82e94b32a3c 100644 (file)
@@ -22,10 +22,10 @@ public:
        : ctrl(0), battle(battle), parent(parent), cursor(0), selected(-1), flipFlop(true) { }
 
 public:
-       virtual void EnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void PauseState(app::Application &ctrl, SDL_Surface *screen);
+       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 Resize(int width, int height);
 
index e83edbb1c0ccf4313c9f1820723b3b968abf2869..ac45a9e6fb8dd6ae887c624d2b6f1616d9a62864 100644 (file)
@@ -30,7 +30,7 @@ ColorFade::ColorFade(State *slave, Uint32 color, int duration, bool in, bool int
 
 }
 
-void ColorFade::EnterState(Application &c, SDL_Surface *screen) {
+void ColorFade::OnEnterState(Application &c, SDL_Surface *screen) {
        ctrl = &c;
        if (leadIn > 0) {
                timer = GraphicsTimers().StartCountdown(leadIn);
@@ -40,18 +40,18 @@ void ColorFade::EnterState(Application &c, SDL_Surface *screen) {
        }
 }
 
-void ColorFade::ExitState(Application &, SDL_Surface *screen) {
+void ColorFade::OnExitState(Application &, SDL_Surface *screen) {
        if (blinds) {
                SDL_FreeSurface(blinds);
                blinds = 0;
        }
 }
 
-void ColorFade::ResumeState(Application &ctrl, SDL_Surface *screen) {
+void ColorFade::OnResumeState(Application &ctrl, SDL_Surface *screen) {
        UpdateBlinds(screen->w, screen->h);
 }
 
-void ColorFade::PauseState(Application &ctrl, SDL_Surface *screen) {
+void ColorFade::OnPauseState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
index 7226a00e29ca658ba57b23ba0e721cd5048619b0..4ccb02b532d60f9863971f471567ed41f354410a 100644 (file)
@@ -27,10 +27,10 @@ public:
        void SetLeadOutTime(int ms) { leadOut = ms; }
 
 public:
-       virtual void EnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void PauseState(app::Application &ctrl, SDL_Surface *screen);
+       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 Resize(int width, int height);
 
index 37ccc72246c1c62c84bac7c77e75af59ffe77107..8103fb1d513804e4335510f07478f46c7c6c7eb6 100644 (file)
@@ -47,21 +47,21 @@ MapState::MapState(GameConfig *g, Map *map)
 }
 
 
-void MapState::EnterState(Application &c, SDL_Surface *screen) {
+void MapState::OnEnterState(Application &c, SDL_Surface *screen) {
        ctrl = &c;
        camera.Resize(screen->w, screen->h);
        LoadMap(map);
 }
 
-void MapState::ExitState(Application &ctrl, SDL_Surface *screen) {
+void MapState::OnExitState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
-void MapState::ResumeState(Application &ctrl, SDL_Surface *screen) {
+void MapState::OnResumeState(Application &ctrl, SDL_Surface *screen) {
        camera.Resize(screen->w, screen->h);
 }
 
-void MapState::PauseState(Application &ctrl, SDL_Surface *screen) {
+void MapState::OnPauseState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
index 952bcee393d242cca8d73cdf793c23f5afba062e..35c6d6494ef6008a2638d67a27fe3f032c8de85d 100644 (file)
@@ -30,10 +30,10 @@ public:
        virtual ~MapState() { }
 
 public:
-       virtual void EnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void PauseState(app::Application &ctrl, SDL_Surface *screen);
+       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 Resize(int width, int height);
 
        virtual void HandleEvents(const app::Input &);
index 9a1d699f6582c44fd4b6b7ecf3e0f10b86e60bbf..75a4deaa540b86ea3d9727175a12ff04c1eff106 100644 (file)
@@ -25,19 +25,19 @@ TransitionState::TransitionState(MapState *ms, Map *map, const Vector<int> &coor
 
 }
 
-void TransitionState::EnterState(Application &c, SDL_Surface *screen) {
+void TransitionState::OnEnterState(Application &c, SDL_Surface *screen) {
        ctrl = &c;
 }
 
-void TransitionState::ExitState(Application &, SDL_Surface *screen) {
+void TransitionState::OnExitState(Application &, SDL_Surface *screen) {
 
 }
 
-void TransitionState::ResumeState(Application &ctrl, SDL_Surface *screen) {
+void TransitionState::OnResumeState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
-void TransitionState::PauseState(Application &ctrl, SDL_Surface *screen) {
+void TransitionState::OnPauseState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
index ee832a81a482391a1fffb3c693bb0a17c17adc2c..844665a34c3db2d41acc388751b18a16446c1132 100644 (file)
@@ -22,10 +22,10 @@ public:
        virtual ~TransitionState() { }
 
 public:
-       virtual void EnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void ResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void PauseState(app::Application &ctrl, SDL_Surface *screen);
+       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 Resize(int width, int height);