Implement follow entity command

This commit is contained in:
Hielke Morsink committed 2022-06-28 21:57:27 +02:00
1 parent 239dcb1677
commit 3da305b82f
2 files changed
+7 -19

No files matched your search

@@ -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);
+7 -1
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;
}