1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Implement follow entity command

This commit is contained in:
Hielke Morsink
2022-06-19 19:19:20 +02:00
parent 239dcb1677
commit 3da305b82f
2 changed files with 7 additions and 19 deletions

View File

@@ -262,24 +262,6 @@ namespace OpenRCT2::Title
return _position != entryPosition;
}
void FollowSprite(EntityId spriteIndex)
{
rct_window* w = window_get_main();
if (w != nullptr)
{
window_follow_sprite(w, spriteIndex);
}
}
void UnfollowSprite()
{
rct_window* w = window_get_main();
if (w != nullptr)
{
window_unfollow_sprite(w);
}
}
bool LoadParkFromFile(const utf8* path)
{
log_verbose("TitleSequencePlayer::LoadParkFromFile(%s)", path);

View File

@@ -9,11 +9,17 @@
#include "FollowEntity.h"
#include "../../interface/Window.h"
namespace OpenRCT2::Title
{
int16_t FollowEntityCommand::operator()(int16_t timer)
{
// TODO: Set entity to follow
auto* w = window_get_main();
if (w != nullptr)
{
window_follow_sprite(w, Follow.SpriteIndex);
}
return 0;
}