Implement JetskiRace::FUN_10016930

This commit is contained in:
jonschz 2024-11-16 13:39:29 +01:00
parent c30398c790
commit 75f3670c28
2 changed files with 24 additions and 4 deletions

View File

@ -62,7 +62,7 @@ class JetskiRace : public LegoRace {
MxLong HandlePathStruct(LegoPathStructNotificationParam&) override; // vtable+0x70 MxLong HandlePathStruct(LegoPathStructNotificationParam&) override; // vtable+0x70
MxLong HandleEndAction(MxEndActionNotificationParam&) override; // vtable+0x74 MxLong HandleEndAction(MxEndActionNotificationParam&) override; // vtable+0x74
void FUN_10016930(undefined4 p_param1, undefined4 p_param2); void FUN_10016930(MxS32 p_param1, MxS16 p_param2);
static MxS32 g_unk0x100f0c78; static MxS32 g_unk0x100f0c78;

View File

@ -282,10 +282,30 @@ MxLong JetskiRace::HandlePathStruct(LegoPathStructNotificationParam& p_param)
return result; return result;
} }
// STUB: LEGO1 0x10016930 // FUNCTION: LEGO1 0x10016930
void JetskiRace::FUN_10016930(undefined4 p_param1, undefined4 p_param2) void JetskiRace::FUN_10016930(MxS32 p_param1, MxS16 p_param2)
{ {
// TODO MxS32 local_4;
MxStillPresenter* piVar1;
MxS32 x, y;
if (p_param1 == 11) {
piVar1 = m_unk0x128;
local_4 = m_unk0xfc;
}
else if (p_param1 == 12) {
piVar1 = m_unk0x12c;
local_4 = m_unk0x100;
}
if (piVar1) {
x = m_unk0x130.GetLeft() + 0.5 +
(m_unk0x130.GetRight() - m_unk0x130.GetLeft() + 1) * (local_4 * 20.0 + p_param2) / (g_unk0x100f0c78 * 20.0);
y = m_unk0x130.GetTop() + 0.5 +
(m_unk0x130.GetBottom() - m_unk0x130.GetTop() + 1) * (local_4 * 20.0 + p_param2) / (g_unk0x100f0c78 * 20.0);
piVar1->SetPosition(x, y);
}
} }
// FUNCTION: LEGO1 0x10016a10 // FUNCTION: LEGO1 0x10016a10