From: Daniel Karbach Date: Wed, 17 Oct 2012 18:21:56 +0000 (+0200) Subject: renamed app::State's Resize -> OnResize X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=2ccc2369d32fb680a3047519d79c17de34c4e10a;p=l2e.git renamed app::State's Resize -> OnResize --- diff --git a/src/app/Application.cpp b/src/app/Application.cpp index 06ea727..b84d724 100644 --- a/src/app/Application.cpp +++ b/src/app/Application.cpp @@ -165,7 +165,7 @@ void Application::HandleEvents() { break; case SDL_VIDEORESIZE: screen.Resize(event.resize.w, event.resize.h); - CurrentState()->Resize(event.resize.w, event.resize.h); + CurrentState()->OnResize(event.resize.w, event.resize.h); break; case SDL_KEYDOWN: case SDL_KEYUP: diff --git a/src/app/State.h b/src/app/State.h index 28cb94d..6783d76 100644 --- a/src/app/State.h +++ b/src/app/State.h @@ -39,7 +39,7 @@ public: /// NOTE: currently, this is only called for the stack top and not /// propagated on stack changes. /// Will be fixed soom ;). - virtual void Resize(int width, int height) = 0; + virtual void OnResize(int width, int height) = 0; /// Handle interactive events such as input and timers. virtual void HandleEvents(const Input &) = 0; diff --git a/src/battle/BattleState.cpp b/src/battle/BattleState.cpp index c2310ea..d442f22 100644 --- a/src/battle/BattleState.cpp +++ b/src/battle/BattleState.cpp @@ -74,7 +74,7 @@ void BattleState::SwapHeroes(int lhs, int rhs) { } -void BattleState::Resize(int w, int h) { +void BattleState::OnResize(int w, int h) { } diff --git a/src/battle/BattleState.h b/src/battle/BattleState.h index 4ac6459..00cea78 100644 --- a/src/battle/BattleState.h +++ b/src/battle/BattleState.h @@ -61,7 +61,7 @@ public: 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 OnResize(int width, int height); virtual void HandleEvents(const app::Input &); virtual void UpdateWorld(float deltaT); diff --git a/src/battle/states/PerformAttacks.cpp b/src/battle/states/PerformAttacks.cpp index 2c82c09..50c7b14 100644 --- a/src/battle/states/PerformAttacks.cpp +++ b/src/battle/states/PerformAttacks.cpp @@ -50,7 +50,7 @@ void PerformAttacks::OnPauseState(Application &ctrl, SDL_Surface *screen) { } -void PerformAttacks::Resize(int width, int height) { +void PerformAttacks::OnResize(int width, int height) { } diff --git a/src/battle/states/PerformAttacks.h b/src/battle/states/PerformAttacks.h index 44ea74b..fa16b4c 100644 --- a/src/battle/states/PerformAttacks.h +++ b/src/battle/states/PerformAttacks.h @@ -32,7 +32,7 @@ public: 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 OnResize(int width, int height); virtual void HandleEvents(const app::Input &); virtual void UpdateWorld(float deltaT); diff --git a/src/battle/states/RunState.cpp b/src/battle/states/RunState.cpp index 56bcbed..dbf3868 100644 --- a/src/battle/states/RunState.cpp +++ b/src/battle/states/RunState.cpp @@ -39,7 +39,7 @@ void RunState::OnPauseState(Application &ctrl, SDL_Surface *screen) { } -void RunState::Resize(int width, int height) { +void RunState::OnResize(int width, int height) { } diff --git a/src/battle/states/RunState.h b/src/battle/states/RunState.h index b1c18cb..e2d1b1b 100644 --- a/src/battle/states/RunState.h +++ b/src/battle/states/RunState.h @@ -27,7 +27,7 @@ public: 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 OnResize(int width, int height); virtual void HandleEvents(const app::Input &); virtual void UpdateWorld(float deltaT); diff --git a/src/battle/states/SelectAttackType.cpp b/src/battle/states/SelectAttackType.cpp index 351ad1c..c41eb67 100644 --- a/src/battle/states/SelectAttackType.cpp +++ b/src/battle/states/SelectAttackType.cpp @@ -51,7 +51,7 @@ void SelectAttackType::OnPauseState(Application &ctrl, SDL_Surface *screen) { } -void SelectAttackType::Resize(int width, int height) { +void SelectAttackType::OnResize(int width, int height) { } diff --git a/src/battle/states/SelectAttackType.h b/src/battle/states/SelectAttackType.h index 6acaaef..690427f 100644 --- a/src/battle/states/SelectAttackType.h +++ b/src/battle/states/SelectAttackType.h @@ -27,7 +27,7 @@ public: 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 OnResize(int width, int height); virtual void HandleEvents(const app::Input &); virtual void UpdateWorld(float deltaT); diff --git a/src/battle/states/SelectIkari.cpp b/src/battle/states/SelectIkari.cpp index 898b85c..1a36e41 100644 --- a/src/battle/states/SelectIkari.cpp +++ b/src/battle/states/SelectIkari.cpp @@ -45,7 +45,7 @@ void SelectIkari::OnPauseState(Application &ctrl, SDL_Surface *screen) { } -void SelectIkari::Resize(int width, int height) { +void SelectIkari::OnResize(int width, int height) { } diff --git a/src/battle/states/SelectIkari.h b/src/battle/states/SelectIkari.h index 9e89912..c213b7f 100644 --- a/src/battle/states/SelectIkari.h +++ b/src/battle/states/SelectIkari.h @@ -28,7 +28,7 @@ public: 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 OnResize(int width, int height); virtual void HandleEvents(const app::Input &); virtual void UpdateWorld(float deltaT); diff --git a/src/battle/states/SelectItem.cpp b/src/battle/states/SelectItem.cpp index 86f11c2..35a0c61 100644 --- a/src/battle/states/SelectItem.cpp +++ b/src/battle/states/SelectItem.cpp @@ -44,7 +44,7 @@ void SelectItem::OnPauseState(Application &ctrl, SDL_Surface *screen) { } -void SelectItem::Resize(int width, int height) { +void SelectItem::OnResize(int width, int height) { } diff --git a/src/battle/states/SelectItem.h b/src/battle/states/SelectItem.h index bf29124..5fe98d0 100644 --- a/src/battle/states/SelectItem.h +++ b/src/battle/states/SelectItem.h @@ -27,7 +27,7 @@ public: 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 OnResize(int width, int height); virtual void HandleEvents(const app::Input &); virtual void UpdateWorld(float deltaT); diff --git a/src/battle/states/SelectMoveAction.cpp b/src/battle/states/SelectMoveAction.cpp index 351116b..072b03d 100644 --- a/src/battle/states/SelectMoveAction.cpp +++ b/src/battle/states/SelectMoveAction.cpp @@ -38,7 +38,7 @@ void SelectMoveAction::OnPauseState(Application &ctrl, SDL_Surface *screen) { } -void SelectMoveAction::Resize(int width, int height) { +void SelectMoveAction::OnResize(int width, int height) { } diff --git a/src/battle/states/SelectMoveAction.h b/src/battle/states/SelectMoveAction.h index f302ebf..2a55a92 100644 --- a/src/battle/states/SelectMoveAction.h +++ b/src/battle/states/SelectMoveAction.h @@ -27,7 +27,7 @@ public: 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 OnResize(int width, int height); virtual void HandleEvents(const app::Input &); virtual void UpdateWorld(float deltaT); diff --git a/src/battle/states/SelectSpell.cpp b/src/battle/states/SelectSpell.cpp index cdf9b69..6ea4675 100644 --- a/src/battle/states/SelectSpell.cpp +++ b/src/battle/states/SelectSpell.cpp @@ -45,7 +45,7 @@ void SelectSpell::OnPauseState(Application &ctrl, SDL_Surface *screen) { } -void SelectSpell::Resize(int width, int height) { +void SelectSpell::OnResize(int width, int height) { } diff --git a/src/battle/states/SelectSpell.h b/src/battle/states/SelectSpell.h index 237e662..823bef2 100644 --- a/src/battle/states/SelectSpell.h +++ b/src/battle/states/SelectSpell.h @@ -27,7 +27,7 @@ public: 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 OnResize(int width, int height); virtual void HandleEvents(const app::Input &); virtual void UpdateWorld(float deltaT); diff --git a/src/battle/states/SelectTarget.cpp b/src/battle/states/SelectTarget.cpp index 0b5b01d..4645f6d 100644 --- a/src/battle/states/SelectTarget.cpp +++ b/src/battle/states/SelectTarget.cpp @@ -36,7 +36,7 @@ void SelectTarget::OnPauseState(Application &ctrl, SDL_Surface *screen) { } -void SelectTarget::Resize(int width, int height) { +void SelectTarget::OnResize(int width, int height) { } diff --git a/src/battle/states/SelectTarget.h b/src/battle/states/SelectTarget.h index 50d1000..2f1f384 100644 --- a/src/battle/states/SelectTarget.h +++ b/src/battle/states/SelectTarget.h @@ -28,7 +28,7 @@ public: 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 OnResize(int width, int height); virtual void HandleEvents(const app::Input &); virtual void UpdateWorld(float deltaT); diff --git a/src/battle/states/SwapHeroes.cpp b/src/battle/states/SwapHeroes.cpp index 0feb7e9..678b5c8 100644 --- a/src/battle/states/SwapHeroes.cpp +++ b/src/battle/states/SwapHeroes.cpp @@ -36,7 +36,7 @@ void SwapHeroes::OnPauseState(Application &ctrl, SDL_Surface *screen) { } -void SwapHeroes::Resize(int width, int height) { +void SwapHeroes::OnResize(int width, int height) { } diff --git a/src/battle/states/SwapHeroes.h b/src/battle/states/SwapHeroes.h index 1e7602a..68e7360 100644 --- a/src/battle/states/SwapHeroes.h +++ b/src/battle/states/SwapHeroes.h @@ -27,7 +27,7 @@ public: 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 OnResize(int width, int height); virtual void HandleEvents(const app::Input &); virtual void UpdateWorld(float deltaT); diff --git a/src/graphics/ColorFade.cpp b/src/graphics/ColorFade.cpp index ac45a9e..b33ee08 100644 --- a/src/graphics/ColorFade.cpp +++ b/src/graphics/ColorFade.cpp @@ -56,8 +56,8 @@ void ColorFade::OnPauseState(Application &ctrl, SDL_Surface *screen) { } -void ColorFade::Resize(int width, int height) { - slave->Resize(width, height); +void ColorFade::OnResize(int width, int height) { + slave->OnResize(width, height); UpdateBlinds(width, height); } diff --git a/src/graphics/ColorFade.h b/src/graphics/ColorFade.h index 4ccb02b..947675e 100644 --- a/src/graphics/ColorFade.h +++ b/src/graphics/ColorFade.h @@ -32,7 +32,7 @@ public: 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 OnResize(int width, int height); virtual void HandleEvents(const app::Input &); virtual void UpdateWorld(float deltaT); diff --git a/src/map/MapState.cpp b/src/map/MapState.cpp index 8103fb1..7e42e13 100644 --- a/src/map/MapState.cpp +++ b/src/map/MapState.cpp @@ -65,7 +65,7 @@ void MapState::OnPauseState(Application &ctrl, SDL_Surface *screen) { } -void MapState::Resize(int width, int height) { +void MapState::OnResize(int width, int height) { camera.Resize(width, height); } diff --git a/src/map/MapState.h b/src/map/MapState.h index 35c6d64..c5f26e1 100644 --- a/src/map/MapState.h +++ b/src/map/MapState.h @@ -34,7 +34,7 @@ public: 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 OnResize(int width, int height); virtual void HandleEvents(const app::Input &); virtual void UpdateWorld(float deltaT); diff --git a/src/map/TransitionState.cpp b/src/map/TransitionState.cpp index 75a4dea..1a2afb5 100644 --- a/src/map/TransitionState.cpp +++ b/src/map/TransitionState.cpp @@ -42,7 +42,7 @@ void TransitionState::OnPauseState(Application &ctrl, SDL_Surface *screen) { } -void TransitionState::Resize(int width, int height) { +void TransitionState::OnResize(int width, int height) { } diff --git a/src/map/TransitionState.h b/src/map/TransitionState.h index 844665a..2a99f1a 100644 --- a/src/map/TransitionState.h +++ b/src/map/TransitionState.h @@ -27,7 +27,7 @@ public: 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 OnResize(int width, int height); virtual void HandleEvents(const app::Input &); virtual void UpdateWorld(float deltaT);