2021-04-18 18:23:10 +02:00
|
|
|
/* Copyright (C) 2021 Wildfire Games.
|
2023-07-27 22:54:46 +02:00
|
|
|
* This file is part of 0 A.D.
|
2015-12-30 22:16:35 +01:00
|
|
|
*
|
2023-07-27 22:54:46 +02:00
|
|
|
* 0 A.D. is free software: you can redistribute it and/or modify
|
2015-12-30 22:16:35 +01:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
2023-07-27 22:54:46 +02:00
|
|
|
* 0 A.D. is distributed in the hope that it will be useful,
|
2015-12-30 22:16:35 +01:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2023-07-27 22:54:46 +02:00
|
|
|
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
|
2015-12-30 22:16:35 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef INCLUDED_CINEMAMANAGER
|
|
|
|
#define INCLUDED_CINEMAMANAGER
|
|
|
|
|
2021-05-15 19:27:01 +02:00
|
|
|
class RNSpline;
|
2017-05-08 06:02:33 +02:00
|
|
|
|
2021-05-15 19:27:01 +02:00
|
|
|
struct CColor;
|
2015-12-30 22:16:35 +01:00
|
|
|
|
2016-01-03 13:41:04 +01:00
|
|
|
/**
|
2016-11-23 12:18:37 +01:00
|
|
|
* Class for in game playing of cinematics. Should only be instantiated in CGameView.
|
2016-01-03 13:41:04 +01:00
|
|
|
*/
|
2015-12-30 22:16:35 +01:00
|
|
|
class CCinemaManager
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CCinemaManager();
|
|
|
|
~CCinemaManager() {}
|
|
|
|
|
2016-01-03 13:41:04 +01:00
|
|
|
/**
|
2021-04-25 23:55:19 +02:00
|
|
|
* Renders paths and their nodes (if enabled).
|
2016-01-03 13:41:04 +01:00
|
|
|
*/
|
2017-04-05 05:59:20 +02:00
|
|
|
void Render() const;
|
2017-04-09 19:21:01 +02:00
|
|
|
|
2017-04-05 05:59:20 +02:00
|
|
|
bool IsPlaying() const;
|
|
|
|
bool IsEnabled() const;
|
2016-01-03 13:41:04 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Updates CCinemManager and current path
|
|
|
|
* @param deltaRealTime Elapsed real time since the last frame.
|
|
|
|
*/
|
2017-04-05 05:59:20 +02:00
|
|
|
void Update(const float deltaRealTime) const;
|
2016-01-03 13:41:04 +01:00
|
|
|
|
|
|
|
bool GetPathsDrawing() const;
|
|
|
|
void SetPathsDrawing(const bool drawPath);
|
|
|
|
|
2016-11-23 12:18:37 +01:00
|
|
|
private:
|
2021-04-25 23:55:19 +02:00
|
|
|
void DrawPaths() const;
|
|
|
|
void DrawSpline(const RNSpline& spline, const CColor& splineColor, int smoothness) const;
|
|
|
|
void DrawNodes(const RNSpline& spline, const CColor& nodesColor) const;
|
|
|
|
|
2016-01-03 13:41:04 +01:00
|
|
|
bool m_DrawPaths;
|
2015-12-30 22:16:35 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|