mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-20 23:01:16 +00:00
Match Jetski::HandleClick
This commit is contained in:
parent
dad44535bd
commit
b1f9802635
@ -157,27 +157,30 @@ MxLong DuneBuggy::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10068290
|
// FUNCTION: LEGO1 0x10068290
|
||||||
|
// FUNCTION: BETA10 0x1002765d
|
||||||
MxS32 DuneBuggy::GetColorOffset(const char* p_variable)
|
MxS32 DuneBuggy::GetColorOffset(const char* p_variable)
|
||||||
{
|
{
|
||||||
MxS32 offset = 1;
|
MxS32 offset = 1;
|
||||||
const char* colorName = VariableTable()->GetVariable(p_variable);
|
const char* color = VariableTable()->GetVariable(p_variable);
|
||||||
|
assert(color);
|
||||||
|
|
||||||
if (strcmpi(colorName, "lego green")) {
|
if (!strcmpi(color, "lego green")) {
|
||||||
if (!strcmpi(colorName, "lego red")) {
|
offset = 1;
|
||||||
offset = 2;
|
}
|
||||||
}
|
else if (!strcmpi(color, "lego red")) {
|
||||||
else if (!strcmpi(colorName, "lego yellow")) {
|
offset = 2;
|
||||||
offset = 3;
|
}
|
||||||
}
|
else if (!strcmpi(color, "lego yellow")) {
|
||||||
else if (!strcmpi(colorName, "lego black")) {
|
offset = 3;
|
||||||
offset = 4;
|
}
|
||||||
}
|
else if (!strcmpi(color, "lego black")) {
|
||||||
else if (!strcmpi(colorName, "lego blue")) {
|
offset = 4;
|
||||||
offset = 5;
|
}
|
||||||
}
|
else if (!strcmpi(color, "lego blue")) {
|
||||||
else if (!strcmpi(colorName, "lego white")) {
|
offset = 5;
|
||||||
offset = 6;
|
}
|
||||||
}
|
else if (!strcmpi(color, "lego white")) {
|
||||||
|
offset = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
return offset;
|
return offset;
|
||||||
|
|||||||
@ -18,12 +18,15 @@
|
|||||||
|
|
||||||
DECOMP_SIZE_ASSERT(Jetski, 0x164)
|
DECOMP_SIZE_ASSERT(Jetski, 0x164)
|
||||||
|
|
||||||
|
// These two have been changed between BETA10 and LEGO1
|
||||||
// GLOBAL: LEGO1 0x100f7ab8
|
// GLOBAL: LEGO1 0x100f7ab8
|
||||||
// STRING: LEGO1 0x100f3ce0
|
// STRING: LEGO1 0x100f3ce0
|
||||||
|
// GLOBAL: BETA10 0x101e0be4
|
||||||
const char* g_varJSFRNTY5 = "c_jsfrnty5";
|
const char* g_varJSFRNTY5 = "c_jsfrnty5";
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x100f7abc
|
// GLOBAL: LEGO1 0x100f7abc
|
||||||
// STRING: LEGO1 0x100f3ca4
|
// STRING: LEGO1 0x100f3ca4
|
||||||
|
// GLOBAL: BETA10 0x101e0be0
|
||||||
const char* g_varJSWNSHY5 = "c_jswnshy5";
|
const char* g_varJSWNSHY5 = "c_jswnshy5";
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1007e3b0
|
// FUNCTION: LEGO1 0x1007e3b0
|
||||||
@ -90,9 +93,10 @@ MxLong Jetski::HandleClick()
|
|||||||
((IslePathActor*) UserActor())->Exit();
|
((IslePathActor*) UserActor())->Exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Match
|
MxS32 local_8 = DuneBuggy::GetColorOffset(g_varJSWNSHY5);
|
||||||
m_unk0x160 = ((DuneBuggy::GetColorOffset(g_varJSWNSHY5) * 5 + 15) * 2);
|
m_unk0x160 = 10 * (local_8 + 3);
|
||||||
m_unk0x160 += DuneBuggy::GetColorOffset(g_varJSFRNTY5);
|
MxS32 local_1c = DuneBuggy::GetColorOffset(g_varJSFRNTY5);
|
||||||
|
m_unk0x160 += local_1c;
|
||||||
|
|
||||||
InvokeAction(Extra::ActionType::e_start, *g_isleScript, m_unk0x160, NULL);
|
InvokeAction(Extra::ActionType::e_start, *g_isleScript, m_unk0x160, NULL);
|
||||||
InvokeAction(Extra::ActionType::e_start, *g_isleScript, IsleScript::c_JetskiDashboard, NULL);
|
InvokeAction(Extra::ActionType::e_start, *g_isleScript, IsleScript::c_JetskiDashboard, NULL);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user