summaryrefslogtreecommitdiff
path: root/src/d/d_msg_scrn_talk.cpp
diff options
context:
space:
mode:
authorMax Roncace <me@caseif.net>2026-04-11 02:43:37 -0400
committerGitHub <noreply@github.com>2026-04-10 23:43:37 -0700
commitd7c34741e23297863254089125ed9ab56617dc5b (patch)
tree6165df2b21a161a4349dd9c62440283a1909a9c1 /src/d/d_msg_scrn_talk.cpp
parentdabd6961a674f23ec0df8f2b4d16ba12e1e090e5 (diff)
Replace magic constants derived from framebuffer size (#3144)
Diffstat (limited to 'src/d/d_msg_scrn_talk.cpp')
-rw-r--r--src/d/d_msg_scrn_talk.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/d/d_msg_scrn_talk.cpp b/src/d/d_msg_scrn_talk.cpp
index 941e984fbd..f7b498357e 100644
--- a/src/d/d_msg_scrn_talk.cpp
+++ b/src/d/d_msg_scrn_talk.cpp
@@ -446,8 +446,8 @@ void dMsgScrnTalk_c::fukiPosCalc(u8 param_1) {
f3y = cStack_7c.y;
} else {
mDoLib_project(&msgActor->pos, &local_70);
- if (local_70.x >= 0.0f && local_70.x <= 608.0f && local_70.y >= 0.0f &&
- local_70.y <= 448.0f)
+ if (local_70.x >= 0.0f && local_70.x <= FB_WIDTH_BASE && local_70.y >= 0.0f &&
+ local_70.y <= FB_HEIGHT_BASE)
{
f3y = 0.5f * (cStack_7c.y + local_70.y);
} else {
@@ -482,6 +482,9 @@ void dMsgScrnTalk_c::fukiPosCalc(u8 param_1) {
field_0xf0 = 0.0f;
field_0x488 = param_1;
f32 dVar15;
+ // the magic numbers here are correlated with the framebuffer size, but
+ // were likely either chosen by hand or had multiple arithmetic
+ // operations applied which cannot easily be reverse engineered
switch (field_0x488) {
case 1:
dVar15 = g_MsgObject_HIO_c.mBoxPos[2][0];