OpenRCT2/src/openrct2/title/TitleSequencePlayer.h

59 lines
1.9 KiB
C
Raw Normal View History

#pragma region Copyright (c) 2014-2017 OpenRCT2 Developers
/*****************************************************************************
* OpenRCT2, an open source clone of Roller Coaster Tycoon 2.
2015-10-20 20:16:30 +02:00
*
* OpenRCT2 is the work of many authors, a full list can be found in contributors.md
* For more information, visit https://github.com/OpenRCT2/OpenRCT2
2015-10-20 20:16:30 +02:00
*
* OpenRCT2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* A full copy of the GNU General Public License can be found in licence.txt
*****************************************************************************/
#pragma endregion
2015-10-20 20:16:30 +02:00
#pragma once
#ifdef __cplusplus
interface IScenarioRepository;
interface ITitleSequencePlayer
{
virtual ~ITitleSequencePlayer() = default;
virtual sint32 GetCurrentPosition() const abstract;
virtual bool Begin(uint32 titleSequenceId) abstract;
virtual void Reset() abstract;
virtual bool Update() abstract;
virtual void Seek(sint32 position) abstract;
virtual void Eject() abstract;
};
ITitleSequencePlayer * CreateTitleSequencePlayer(IScenarioRepository * scenarioRepository);
2016-11-26 16:32:49 +01:00
#else
typedef struct ITitleSequencePlayer ITitleSequencePlayer;
#endif
#ifdef __cplusplus
extern "C"
{
#endif
Feature: Preview title sequences in-game Title sequences can now be played back in-game, allowing for much easier editing. Improved title sequence playback in general. Clicking play while on a different title sequence will play the new one. Clicking stop will make the title screen go back to the config title sequence. And the closing the title sequence window will also make the game go back to the config title sequence, and reload the sequence if it was modified. Changes made to title sequences in-game are now correctly loaded in the title screen. Starting a title sequence within the editor will now always reset it even if it's the current playing sequence. (Not for playing in the editor though). Get Location in title sequence command editor now has 100% accuracy compared to before where it would usually get some offset value. Added `get_map_coordinates_from_pos_window` which will allow getting the viewport coordinates of a specific window even if the input coordinates are under another window. This has use with getting 2D positions from the main window without the other windows getting in the way. Options window will now always specify the config title sequence in the dropdown and not the current title sequence. Made a global variable `gLoadKeepWindowsOpen`, in game.h to keep windows open when loading a park. When loading a title sequence park in-game. The sequence player will force-close all park-specific windows ahead of time. Skipping while testing title sequences no longer needs to reload the park if the current playback position is already before the target position and ahead of the load position. Added changelog entry.
2017-10-30 12:07:01 +01:00
// When testing title sequences within a normal game
extern bool gTestingTitleSequenceInGame;
2016-11-26 16:32:49 +01:00
sint32 title_sequence_player_get_current_position(ITitleSequencePlayer * player);
bool title_sequence_player_begin(ITitleSequencePlayer * player, uint32 titleSequenceId);
void title_sequence_player_reset(ITitleSequencePlayer * player);
bool title_sequence_player_update(ITitleSequencePlayer * player);
void title_sequence_player_seek(ITitleSequencePlayer * player, uint32 position);
#ifdef __cplusplus
}
#endif