Add temp var aliases

This commit is contained in:
GriffinR
2023-08-04 14:17:28 -04:00
parent 6d4dadd7b5
commit 866c32a735
41 changed files with 223 additions and 199 deletions
+5
View File
@@ -3384,6 +3384,7 @@ u8 CheckForPlayersHouseNews(void)
void GetMomOrDadStringForTVMessage(void)
{
// If the player is checking the TV in their house it will only refer to their Mom.
if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(LITTLEROOT_TOWN_BRENDANS_HOUSE_1F))
{
if (gSaveBlock2Ptr->playerGender == MALE)
@@ -3413,6 +3414,7 @@ void GetMomOrDadStringForTVMessage(void)
}
else if (VarGet(VAR_TEMP_3) > 2)
{
// Should only happen if VAR_TEMP_3 is already in use by something else.
if (VarGet(VAR_TEMP_3) % 2 == 0)
StringCopy(gStringVar1, gText_Mom);
else
@@ -3420,6 +3422,9 @@ void GetMomOrDadStringForTVMessage(void)
}
else
{
// Randomly choose whether to refer to Mom or Dad.
// NOTE: Because of this, any map that has a TV in it shouldn't rely on VAR_TEMP_3.
// If its value is 0, checking the TV will set it to 1 or 2.
if (Random() % 2 != 0)
{
StringCopy(gStringVar1, gText_Mom);