1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 06:44:38 +01:00

Use reference types in TitleSequencePlayer

This commit is contained in:
Ted John
2018-05-31 12:49:09 +01:00
parent 9d617958cf
commit 056b596124
5 changed files with 16 additions and 18 deletions

View File

@@ -41,7 +41,7 @@ using namespace OpenRCT2;
// TODO Remove when no longer required.
static TitleScreen * _singleton = nullptr;
TitleScreen::TitleScreen(GameState * gameState)
TitleScreen::TitleScreen(GameState& gameState)
: _gameState(gameState)
{
_singleton = this;
@@ -174,7 +174,7 @@ void TitleScreen::Update()
}
for (sint32 i = 0; i < numUpdates; i++)
{
_gameState->UpdateLogic();
_gameState.UpdateLogic();
}
update_palette_effects();
// update_rain_animation();
@@ -227,8 +227,8 @@ void TitleScreen::TitleInitialise()
{
if (_sequencePlayer == nullptr)
{
IScenarioRepository * scenarioRepository = GetScenarioRepository();
_sequencePlayer = CreateTitleSequencePlayer(scenarioRepository, _gameState);
auto scenarioRepository = GetScenarioRepository();
_sequencePlayer = CreateTitleSequencePlayer(*scenarioRepository, _gameState);
}
size_t seqId = title_get_config_sequence();
if (seqId == SIZE_MAX)