1 //////////////////////////////////////////////////////////////////////////////// 2 // Copyright (C) 2012-2018 by Bertram (Valyria Tear) 3 // All Rights Reserved 4 // 5 // This code is licensed under the GNU GPL version 2. It is free software and 6 // you may modify it and/or redistribute it under the terms of this license. 7 // See https://www.gnu.org/copyleft/gpl.html for details. 8 //////////////////////////////////////////////////////////////////////////////// 9 10 #ifndef __TRANSITION_BATTLE_HEADER__ 11 #define __TRANSITION_BATTLE_HEADER__ 12 13 #include "engine/mode_manager.h" 14 15 namespace vt_battle 16 { 17 18 class BattleMode; 19 20 //! \brief Handles transition from an event or a mode to the battle mode 21 //! Must be called without fade transition, as it will do it. 22 class TransitionToBattleMode : public vt_mode_manager::GameMode 23 { 24 public: 25 TransitionToBattleMode(BattleMode* BM, bool is_boss = false); 26 27 ~TransitionToBattleMode(); 28 29 void Update(); 30 31 void Draw(); 32 33 void Reset(); 34 35 private: 36 //! \brief The screen capture of the moment of the encounter 37 vt_video::StillImage _screen_capture; 38 39 //! \brief The transition timer, used to display the encounter visual effect 40 vt_system::SystemTimer _transition_timer; 41 42 //! \brief Used to display the effect 43 float _position; 44 45 //! \brief Tells whether the boss trigger sound is to be played or not. 46 bool _is_boss; 47 48 //! \brief The Battle mode to trigger afterward. Must not be nullptr. 49 BattleMode* _BM; 50 }; 51 52 } // namespace vt_battle 53 54 #endif // __TRANSITION_BATTLE_HEADER__ 55