Replace magic constants derived from framebuffer size (#3144)

This commit is contained in:
Max Roncace
2026-04-11 02:43:37 -04:00
committed by GitHub
parent 422ed7afc3
commit 3f8bbe7c57
20 changed files with 111 additions and 92 deletions
+5 -2
View File
@@ -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];