summaryrefslogtreecommitdiff
path: root/src/engine/actors/Text.cpp
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2026-02-24 16:23:17 -0700
committerGitHub <noreply@github.com>2026-02-24 16:23:17 -0700
commita33c66ee31b72035c7712ada8f91acb03361467d (patch)
treee1bbef0809aaaeb633cba7d3909738a3d18611f4 /src/engine/actors/Text.cpp
parent548ccf0063f6c4d6608cf87f46a347c71079c0bd (diff)
Frame Interp changes (#654)
Diffstat (limited to 'src/engine/actors/Text.cpp')
-rw-r--r--src/engine/actors/Text.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/engine/actors/Text.cpp b/src/engine/actors/Text.cpp
index ad99430eb..f6ab19373 100644
--- a/src/engine/actors/Text.cpp
+++ b/src/engine/actors/Text.cpp
@@ -21,9 +21,12 @@ extern "C" {
#include "code_80005FD0.h"
}
+size_t AText::_count;
+
AText::AText(const SpawnParams& params) : AActor(params) {
Name = "Text";
ResourceName = "hm:text";
+ _idx = _count;
SpawnPos = params.Location.value_or(FVector(0.0f, 100.0f, 0.0f));
Pos[0] = SpawnPos.x;
@@ -65,6 +68,8 @@ AText::AText(const SpawnParams& params) : AActor(params) {
Text = ValidateString(params.Skin.value_or("Harbour Masters"));
AText::Print3D((char*)Text.c_str(), 0, CENTER_TEXT_MODE_2);
+
+ _count += 1;
}
/**
@@ -360,7 +365,7 @@ void AText::DrawText3D(Camera* camera) { // Based on func_80095BD0
AddObjectMatrix(mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
- FrameInterpolation_RecordOpenChild("actor_text", ((uintptr_t)this << 6) | camera->cameraId);
+ FrameInterpolation_RecordOpenChild("actor_text", ((uintptr_t)_idx << 6) | camera->cameraId);
gSPDisplayList(gDisplayListHead++, (Gfx*)D_020077A8);
for (CharacterList& tex : TextureList) {