OpenXcom  1.0
Open-source clone of the original X-Com
CutsceneState.h
1 #pragma once
2 /*
3  * Copyright 2010-2016 OpenXcom Developers.
4  *
5  * This file is part of OpenXcom.
6  *
7  * OpenXcom is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * OpenXcom is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
19  */
20 #include "../Engine/State.h"
21 
22 namespace OpenXcom
23 {
24 
29 class CutsceneState : public State
30 {
31 private:
32  std::string _cutsceneId;
33 public:
35  CutsceneState(const std::string &cutsceneId);
39  void init();
40 
41  static const std::string WIN_GAME;
42  static const std::string LOSE_GAME;
43  // shared utility methods for SlideshowState and VideoState
45  static bool initDisplay();
47  static void resetDisplay(bool wasLetterboxed);
48 };
49 
50 }
A game state that receives user input and reacts accordingly.
Definition: State.h:44
Shows cutscenes: inspects the relevant rules and loads the appropriate state for showing slideshows o...
Definition: CutsceneState.h:29
static void resetDisplay(bool wasLetterboxed)
restores the screen to its original state
Definition: CutsceneState.cpp:113
CutsceneState(const std::string &cutsceneId)
Creates the CutsceneState.
Definition: CutsceneState.cpp:40
~CutsceneState()
Cleans up the CutsceneState.
Definition: CutsceneState.cpp:46
void init()
Replace this state on the stack with the real player state.
Definition: CutsceneState.cpp:51
Definition: BaseInfoState.cpp:40
static bool initDisplay()
returns whether the display was letterboxed (for restoration in resetDisplay)
Definition: CutsceneState.cpp:103