From 1c9b62056c6662d28674053357fd64cadf94bda2 Mon Sep 17 00:00:00 2001 From: HailSanta <53960937+HailSanta@users.noreply.github.com> Date: Thu, 16 Mar 2023 02:59:21 -0400 Subject: [PATCH] LVars (#982) Co-authored-by: HailSanta --- src/world/area_hos/hos_05/hos_05_5_intro.c | 18 +++++++++--------- src/world/area_iwa/iwa_10/iwa_10_2_main.c | 4 ++-- src/world/area_jan/jan_02/jan_02_2_main.c | 4 ++-- src/world/area_mac/mac_00/mac_00_2_main.c | 4 ++-- src/world/area_mac/mac_01/mac_01_2_main.c | 4 ++-- src/world/area_mac/mac_03/mac_03_2_main.c | 4 ++-- src/world/area_nok/nok_01/nok_01_2_main.c | 4 ++-- src/world/area_omo/omo_03/omo_03_2_main.c | 20 ++++++++++---------- src/world/area_omo/omo_06/omo_06_2_main.c | 20 ++++++++++---------- src/world/area_omo/omo_08/omo_08_2_main.c | 20 ++++++++++---------- src/world/area_omo/omo_09/omo_09_2_main.c | 10 +++++----- src/world/area_omo/omo_10/omo_10_2_main.c | 20 ++++++++++---------- src/world/common/complete/Quizmo.inc.c | 4 ++-- 13 files changed, 68 insertions(+), 68 deletions(-) diff --git a/src/world/area_hos/hos_05/hos_05_5_intro.c b/src/world/area_hos/hos_05/hos_05_5_intro.c index 97b50fb7d0..076d6db82f 100644 --- a/src/world/area_hos/hos_05/hos_05_5_intro.c +++ b/src/world/area_hos/hos_05/hos_05_5_intro.c @@ -1023,21 +1023,21 @@ ApiStatus func_802428C8_A2CB08(Evt* script, s32 isInitialCall) { break; } - vec01->x = evt_get_float_variable(script, LocalVar(0)); - vec01->y = evt_get_float_variable(script, LocalVar(1)); - vec01->z = evt_get_float_variable(script, LocalVar(2)); + vec01->x = evt_get_float_variable(script, LVar0); + vec01->y = evt_get_float_variable(script, LVar1); + vec01->z = evt_get_float_variable(script, LVar2); vec2 = &vec01[2]; vec01++; if (temp_s6 != 2) { - vec01->x = (evt_get_float_variable(script, LocalVar(0)) * temp_f28) + (vec2->x * (1.0f - temp_f28)); - vec01->y = (evt_get_float_variable(script, LocalVar(1)) * temp_f28) + (vec2->y * (1.0f - temp_f28)) + sp10; - vec01->z = (evt_get_float_variable(script, LocalVar(2)) * temp_f28) + (vec2->z * (1.0f - temp_f28)); + vec01->x = (evt_get_float_variable(script, LVar0) * temp_f28) + (vec2->x * (1.0f - temp_f28)); + vec01->y = (evt_get_float_variable(script, LVar1) * temp_f28) + (vec2->y * (1.0f - temp_f28)) + sp10; + vec01->z = (evt_get_float_variable(script, LVar2) * temp_f28) + (vec2->z * (1.0f - temp_f28)); } else { - vec01->x = ((evt_get_float_variable(script, LocalVar(0)) * temp_f28) + (vec2->x * (1.0f - temp_f28))) - 50.0f; - vec01->y = (evt_get_float_variable(script, LocalVar(1)) * temp_f28) + (vec2->y * (1.0f - temp_f28)) + sp10; - vec01->z = ((evt_get_float_variable(script, LocalVar(2)) * temp_f28) + (vec2->z * (1.0f - temp_f28))) - 50.0f; + vec01->x = ((evt_get_float_variable(script, LVar0) * temp_f28) + (vec2->x * (1.0f - temp_f28))) - 50.0f; + vec01->y = (evt_get_float_variable(script, LVar1) * temp_f28) + (vec2->y * (1.0f - temp_f28)) + sp10; + vec01->z = ((evt_get_float_variable(script, LVar2) * temp_f28) + (vec2->z * (1.0f - temp_f28))) - 50.0f; } script->varTable[0] = s5; script->varTablePtr[1] = unkData; diff --git a/src/world/area_iwa/iwa_10/iwa_10_2_main.c b/src/world/area_iwa/iwa_10/iwa_10_2_main.c index a3a30468f5..084e963b82 100644 --- a/src/world/area_iwa/iwa_10/iwa_10_2_main.c +++ b/src/world/area_iwa/iwa_10/iwa_10_2_main.c @@ -41,8 +41,8 @@ EvtScript N(EVS_Main) = { EVT_CALL(SetSpriteShading, SHADING_NONE) EVT_SETUP_CAMERA_ALT_NO_LEAD() #if VERSION_PAL - EVT_CALL(GetLanguage, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_o110, LocalVar(0)) + EVT_CALL(GetLanguage, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_o110, LVar0) #endif EVT_SET(GF_MAP_MtRugged, TRUE) EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) diff --git a/src/world/area_jan/jan_02/jan_02_2_main.c b/src/world/area_jan/jan_02/jan_02_2_main.c index 8308abf333..01cdc3c2d9 100644 --- a/src/world/area_jan/jan_02/jan_02_2_main.c +++ b/src/world/area_jan/jan_02/jan_02_2_main.c @@ -59,8 +59,8 @@ EvtScript N(EVS_Main) = { EVT_CALL(SetSpriteShading, SHADING_NONE) EVT_SETUP_CAMERA_NO_LEAD() #if VERSION_PAL - EVT_CALL(GetLanguage, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_o120, LocalVar(0)) + EVT_CALL(GetLanguage, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_o120, LVar0) #endif EVT_SET(GF_MAP_YoshisVillage, TRUE) EVT_SET(AF_JAN02_RaphaelComment, FALSE) diff --git a/src/world/area_mac/mac_00/mac_00_2_main.c b/src/world/area_mac/mac_00/mac_00_2_main.c index 7842e3c663..6e9fb933d4 100644 --- a/src/world/area_mac/mac_00/mac_00_2_main.c +++ b/src/world/area_mac/mac_00/mac_00_2_main.c @@ -73,8 +73,8 @@ EvtScript N(EVS_Main) = { EVT_CALL(SetSpriteShading, SHADING_NONE) EVT_SETUP_CAMERA_NO_LEAD() #if VERSION_PAL - EVT_CALL(GetLanguage, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_mushroom_kingdom, LocalVar(0)) + EVT_CALL(GetLanguage, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_mushroom_kingdom, LVar0) #endif EVT_IF_GE(GB_StoryProgress, STORY_CH0_KAMMY_RETURNED_TO_BOWSER) EVT_SET(GF_MAP_ToadTown, TRUE) diff --git a/src/world/area_mac/mac_01/mac_01_2_main.c b/src/world/area_mac/mac_01/mac_01_2_main.c index e077f8dc29..7b02be10e9 100644 --- a/src/world/area_mac/mac_01/mac_01_2_main.c +++ b/src/world/area_mac/mac_01/mac_01_2_main.c @@ -118,8 +118,8 @@ EvtScript N(EVS_Main) = { EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) #if VERSION_PAL - EVT_CALL(GetLanguage, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_k11, LocalVar(0)) + EVT_CALL(GetLanguage, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_k11, LVar0) #endif EVT_SET(AF_MAC_0E, FALSE) EVT_SET(AF_MAC_0F, FALSE) diff --git a/src/world/area_mac/mac_03/mac_03_2_main.c b/src/world/area_mac/mac_03/mac_03_2_main.c index 33381fa309..4f19fc5623 100644 --- a/src/world/area_mac/mac_03/mac_03_2_main.c +++ b/src/world/area_mac/mac_03/mac_03_2_main.c @@ -61,8 +61,8 @@ EvtScript N(EVS_Main) = { EVT_CALL(SetSpriteShading, SHADING_NONE) EVT_SETUP_CAMERA_NO_LEAD() #if VERSION_PAL - EVT_CALL(GetLanguage, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_o110, LocalVar(0)) + EVT_CALL(GetLanguage, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_o110, LVar0) #endif EVT_SET(AF_MAC_20, FALSE) EVT_SET(AF_MAC_21, FALSE) diff --git a/src/world/area_nok/nok_01/nok_01_2_main.c b/src/world/area_nok/nok_01/nok_01_2_main.c index 43ab9efd69..283e2a3781 100644 --- a/src/world/area_nok/nok_01/nok_01_2_main.c +++ b/src/world/area_nok/nok_01/nok_01_2_main.c @@ -88,8 +88,8 @@ EvtScript N(EVS_Main) = { EVT_CALL(SetSpriteShading, SHADING_NONE) EVT_SETUP_CAMERA_NO_LEAD() #if VERSION_PAL - EVT_CALL(GetLanguage, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_o340, LocalVar(0)) + EVT_CALL(GetLanguage, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_o340, LVar0) #endif EVT_SET(GF_MAP_KoopaVillage, TRUE) EVT_SET(AF_NOK01_Dialogue_RelaxedKoopa, FALSE) diff --git a/src/world/area_omo/omo_03/omo_03_2_main.c b/src/world/area_omo/omo_03/omo_03_2_main.c index 1f435b04e2..20fa0c1234 100644 --- a/src/world/area_omo/omo_03/omo_03_2_main.c +++ b/src/world/area_omo/omo_03/omo_03_2_main.c @@ -48,17 +48,17 @@ EvtScript N(EVS_Main) = { EVT_CALL(SetSpriteShading, SHADING_NONE) EVT_SETUP_CAMERA_ALT_NO_LEAD() #if VERSION_PAL - EVT_CALL(GetLanguage, LocalVar(0)) - EVT_SWITCH(LocalVar(0)) - EVT_IF_GE(LocalVar(0), 2) - EVT_SUB(LocalVar(0), 2) + EVT_CALL(GetLanguage, LVar0) + EVT_SWITCH(LVar0) + EVT_IF_GE(LVar0, 2) + EVT_SUB(LVar0, 2) EVT_END_IF - EVT_CALL(SetModelTexVariant, MODEL_s, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_a, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_t, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_i, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_o, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_n, LocalVar(0)) + EVT_CALL(SetModelTexVariant, MODEL_s, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_a, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_t, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_i, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_o, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_n, LVar0) #endif EVT_SET(AF_OMO_05, FALSE) EVT_SET(GF_MAP_ShyGuysToybox, TRUE) diff --git a/src/world/area_omo/omo_06/omo_06_2_main.c b/src/world/area_omo/omo_06/omo_06_2_main.c index 034c3510dc..c8bcd13058 100644 --- a/src/world/area_omo/omo_06/omo_06_2_main.c +++ b/src/world/area_omo/omo_06/omo_06_2_main.c @@ -38,17 +38,17 @@ EvtScript N(EVS_Main) = { EVT_CALL(SetSpriteShading, SHADING_NONE) EVT_SETUP_CAMERA_ALT_NO_LEAD() #if VERSION_PAL - EVT_CALL(GetLanguage, LocalVar(0)) - EVT_SWITCH(LocalVar(0)) - EVT_IF_GE(LocalVar(0), 2) - EVT_SUB(LocalVar(0), 2) + EVT_CALL(GetLanguage, LVar0) + EVT_SWITCH(LVar0) + EVT_IF_GE(LVar0, 2) + EVT_SUB(LVar0, 2) EVT_END_IF - EVT_CALL(SetModelTexVariant, MODEL_s, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_a, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_t, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_i, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_o, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_n, LocalVar(0)) + EVT_CALL(SetModelTexVariant, MODEL_s, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_a, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_t, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_i, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_o, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_n, LVar0) #endif EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) EVT_EXEC_WAIT(N(EVS_MakeEntities)) diff --git a/src/world/area_omo/omo_08/omo_08_2_main.c b/src/world/area_omo/omo_08/omo_08_2_main.c index 7344c54a2a..8b9bd82a34 100644 --- a/src/world/area_omo/omo_08/omo_08_2_main.c +++ b/src/world/area_omo/omo_08/omo_08_2_main.c @@ -33,17 +33,17 @@ EvtScript N(EVS_Main) = { EVT_CALL(SetSpriteShading, SHADING_NONE) EVT_SETUP_CAMERA_ALT_NO_LEAD() #if VERSION_PAL - EVT_CALL(GetLanguage, LocalVar(0)) - EVT_SWITCH(LocalVar(0)) - EVT_IF_GE(LocalVar(0), 2) - EVT_SUB(LocalVar(0), 2) + EVT_CALL(GetLanguage, LVar0) + EVT_SWITCH(LVar0) + EVT_IF_GE(LVar0, 2) + EVT_SUB(LVar0, 2) EVT_END_IF - EVT_CALL(SetModelTexVariant, MODEL_s, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_a, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_t, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_i, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_o, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_n, LocalVar(0)) + EVT_CALL(SetModelTexVariant, MODEL_s, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_a, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_t, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_i, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_o, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_n, LVar0) #endif EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) EVT_EXEC_WAIT(N(EVS_MakeEntities)) diff --git a/src/world/area_omo/omo_09/omo_09_2_main.c b/src/world/area_omo/omo_09/omo_09_2_main.c index 953a081d99..8000b0d45d 100644 --- a/src/world/area_omo/omo_09/omo_09_2_main.c +++ b/src/world/area_omo/omo_09/omo_09_2_main.c @@ -18,12 +18,12 @@ EvtScript N(EVS_Main) = { EVT_CALL(SetSpriteShading, SHADING_NONE) EVT_SETUP_CAMERA_DEFAULT() #if VERSION_PAL - EVT_CALL(GetLanguage, LocalVar(0)) - EVT_IF_EQ(LocalVar(0), 3) - EVT_SET(LocalVar(0), 2) + EVT_CALL(GetLanguage, LVar0) + EVT_IF_EQ(LVar0, 3) + EVT_SET(LVar0, 2) EVT_END_IF - EVT_CALL(SetModelTexVariant, MODEL_s1, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_s2, LocalVar(0)) + EVT_CALL(SetModelTexVariant, MODEL_s1, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_s2, LVar0) #endif EVT_IF_EQ(GF_OMO09_SpawnedPeachChoice3, FALSE) EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(KammySceneNPCs))) diff --git a/src/world/area_omo/omo_10/omo_10_2_main.c b/src/world/area_omo/omo_10/omo_10_2_main.c index f15aa80b69..5d5f18ce31 100644 --- a/src/world/area_omo/omo_10/omo_10_2_main.c +++ b/src/world/area_omo/omo_10/omo_10_2_main.c @@ -36,17 +36,17 @@ EvtScript N(EVS_Main) = { EVT_CALL(SetSpriteShading, SHADING_NONE) EVT_SETUP_CAMERA_ALT_NO_LEAD() #if VERSION_PAL - EVT_CALL(GetLanguage, LocalVar(0)) - EVT_SWITCH(LocalVar(0)) - EVT_IF_GE(LocalVar(0), 2) - EVT_SUB(LocalVar(0), 2) + EVT_CALL(GetLanguage, LVar0) + EVT_SWITCH(LVar0) + EVT_IF_GE(LVar0, 2) + EVT_SUB(LVar0, 2) EVT_END_IF - EVT_CALL(SetModelTexVariant, MODEL_s, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_a, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_t, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_i, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_o, LocalVar(0)) - EVT_CALL(SetModelTexVariant, MODEL_n, LocalVar(0)) + EVT_CALL(SetModelTexVariant, MODEL_s, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_a, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_t, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_i, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_o, LVar0) + EVT_CALL(SetModelTexVariant, MODEL_n, LVar0) #endif EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) EVT_EXEC_WAIT(N(EVS_MakeEntities)) diff --git a/src/world/common/complete/Quizmo.inc.c b/src/world/common/complete/Quizmo.inc.c index 0f080419ff..0c624bf7ee 100644 --- a/src/world/common/complete/Quizmo.inc.c +++ b/src/world/common/complete/Quizmo.inc.c @@ -1117,8 +1117,8 @@ EvtScript N(EVS_Quizmo_QuizMain) = { EVT_CALL(SetMessageText, EVT_PTR(MessageSingular), 1) EVT_ELSE #if VERSION_PAL - EVT_CALL(GetLanguage, LocalVar(0)) - EVT_IF_EQ(LocalVar(0), 1) + EVT_CALL(GetLanguage, LVar0) + EVT_IF_EQ(LVar0, 1) EVT_CALL(SetMessageText, EVT_PTR(MessagePlural_de), 1) EVT_ELSE EVT_CALL(SetMessageText, EVT_PTR(MessagePlural), 1)