Pyrogenesis  trunk
CinemaManager.h
Go to the documentation of this file.
1 /* Copyright (C) 2017 Wildfire Games.
2  * This file is part of 0 A.D.
3  *
4  * 0 A.D. is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * 0 A.D. is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 
19 #ifndef INCLUDED_CINEMAMANAGER
20 #define INCLUDED_CINEMAMANAGER
21 
22 #include <list>
23 #include <map>
24 
25 #include "lib/input.h" // InReaction - can't forward-declare enum
26 
28 #include "ps/CStr.h"
29 #include "ps/Shapes.h"
30 
31 /**
32  * Class for in game playing of cinematics. Should only be instantiated in CGameView.
33  */
35 {
36 public:
39 
40  /**
41  * Renders black bars and paths (if enabled)
42  */
43  void Render() const;
44  void DrawBars() const;
45  void DrawPaths() const;
46  void DrawSpline(const RNSpline& spline, const CColor& splineColor, int smoothness, bool lines) const;
47  void DrawNodes(const RNSpline& spline, const CColor& nodesColor) const;
48 
49  void UpdateSessionVisibility() const;
50  void UpdateSilhouettesVisibility() const;
51 
52  bool IsPlaying() const;
53  bool IsEnabled() const;
54 
55  /**
56  * Updates CCinemManager and current path
57  * @param deltaRealTime Elapsed real time since the last frame.
58  */
59  void Update(const float deltaRealTime) const;
60 
61  InReaction HandleEvent(const SDL_Event_* ev) const;
62  bool GetPathsDrawing() const;
63  void SetPathsDrawing(const bool drawPath);
64 
65 private:
67 };
68 
70 
71 #endif
void UpdateSilhouettesVisibility() const
Definition: CinemaManager.cpp:98
~CCinemaManager()
Definition: CinemaManager.h:38
Rounded Nonuniform Spline for describing spatial curves or paths with constant speed.
Definition: NUSpline.h:50
void Render() const
Renders black bars and paths (if enabled)
Definition: CinemaManager.cpp:72
Definition: Shapes.h:36
CCinemaManager()
Definition: CinemaManager.cpp:54
bool IsEnabled() const
Definition: CinemaManager.cpp:293
void DrawPaths() const
Definition: CinemaManager.cpp:108
void DrawNodes(const RNSpline &spline, const CColor &nodesColor) const
Definition: CinemaManager.cpp:197
InReaction cinema_manager_handler(const SDL_Event_ *ev)
Definition: CinemaManager.cpp:268
Definition: libsdl.h:51
bool GetPathsDrawing() const
Definition: CinemaManager.cpp:304
void DrawSpline(const RNSpline &spline, const CColor &splineColor, int smoothness, bool lines) const
Definition: CinemaManager.cpp:127
bool IsPlaying() const
Definition: CinemaManager.cpp:299
InReaction
Definition: input.h:34
InReaction HandleEvent(const SDL_Event_ *ev) const
Definition: CinemaManager.cpp:279
bool m_DrawPaths
Definition: CinemaManager.h:66
void UpdateSessionVisibility() const
Definition: CinemaManager.cpp:81
Class for in game playing of cinematics.
Definition: CinemaManager.h:34
void DrawBars() const
Definition: CinemaManager.cpp:217
void Update(const float deltaRealTime) const
Updates CCinemManager and current path.
Definition: CinemaManager.cpp:59
void SetPathsDrawing(const bool drawPath)
Definition: CinemaManager.cpp:309