Sync temp vars
This commit is contained in:
+7
-7
@@ -190,33 +190,33 @@ void ScrSpecial_BattleTowerMapScript2(void)
|
||||
case 0:
|
||||
ResetBattleTowerStreak(levelType);
|
||||
if (count == 0)
|
||||
VarSet(VAR_0x4000, 5);
|
||||
VarSet(VAR_TEMP_0, 5);
|
||||
break;
|
||||
case 1:
|
||||
ResetBattleTowerStreak(levelType);
|
||||
VarSet(VAR_0x4000, BTSPECIAL_RESULT_SAVE_SCUM);
|
||||
VarSet(VAR_TEMP_0, BTSPECIAL_RESULT_SAVE_SCUM);
|
||||
count++;
|
||||
break;
|
||||
case 3:
|
||||
break;
|
||||
case 4:
|
||||
VarSet(VAR_0x4000, BTSPECIAL_RESULT_WON7);
|
||||
VarSet(VAR_TEMP_0, BTSPECIAL_RESULT_WON7);
|
||||
count++;
|
||||
break;
|
||||
case 5:
|
||||
VarSet(VAR_0x4000, BTSPECIAL_RESULT_LOST);
|
||||
VarSet(VAR_TEMP_0, BTSPECIAL_RESULT_LOST);
|
||||
count++;
|
||||
break;
|
||||
case 6:
|
||||
break;
|
||||
case 2:
|
||||
VarSet(VAR_0x4000, BTSPECIAL_RESULT_QUICKSAVE);
|
||||
VarSet(VAR_TEMP_0, BTSPECIAL_RESULT_QUICKSAVE);
|
||||
count++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (gSaveBlock2Ptr->battleTower.var_4AE[0] == 3 && gSaveBlock2Ptr->battleTower.var_4AE[1] == 3)
|
||||
VarSet(VAR_0x4000, BTSPECIAL_RESULT_INACTIVE);
|
||||
VarSet(VAR_TEMP_0, BTSPECIAL_RESULT_INACTIVE);
|
||||
ValidateBattleTowerRecordChecksums();
|
||||
}
|
||||
|
||||
@@ -1150,7 +1150,7 @@ void SaveBattleTowerProgress(void)
|
||||
if (gSpecialVar_0x8004 != 3)
|
||||
gSaveBlock2Ptr->battleTower.var_4AE[battleTowerLevelType] = gSpecialVar_0x8004;
|
||||
|
||||
VarSet(VAR_0x4000, BTSPECIAL_TEST);
|
||||
VarSet(VAR_TEMP_0, BTSPECIAL_TEST);
|
||||
gSaveBlock2Ptr->battleTower.unk_554 = 1;
|
||||
TrySavingData(SAVE_EREADER);
|
||||
}
|
||||
|
||||
+1
-1
@@ -213,7 +213,7 @@ static void IcefallCaveIcePerStepCallback(u8 taskId)
|
||||
PlaySE(SE_RU_GASYAN);
|
||||
MapGridSetMetatileIdAt(x, y, 0x35b);
|
||||
CurrentMapDrawMetatileAt(x, y);
|
||||
VarSet(VAR_0x4001, 1);
|
||||
VarSet(VAR_TEMP_1, 1);
|
||||
data[1] = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
+8
-8
@@ -463,7 +463,7 @@ void InitTrainerTowerBattleStruct(void)
|
||||
|
||||
sub_815DC8C();
|
||||
sTrainerTowerOpponent = AllocZeroed(sizeof(*sTrainerTowerOpponent));
|
||||
r10 = VarGet(VAR_0x4001);
|
||||
r10 = VarGet(VAR_TEMP_1);
|
||||
StringCopyN(sTrainerTowerOpponent->name, sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[r10].name, 11);
|
||||
|
||||
for (r9 = 0; r9 < 6; r9++)
|
||||
@@ -494,7 +494,7 @@ void FreeTrainerTowerBattleStruct(void)
|
||||
void sub_815DBF4(u8 *dest, u8 opponentIdx)
|
||||
// TTower_GetBeforeBattleMessage?
|
||||
{
|
||||
VarSet(VAR_0x4003, opponentIdx);
|
||||
VarSet(VAR_TEMP_3, opponentIdx);
|
||||
TrainerTowerGetOpponentTextColor(sTrainerTowerOpponent->battleType, sTrainerTowerOpponent->facilityClass);
|
||||
if (opponentIdx == 0)
|
||||
TT_ConvertEasyChatMessageToString(sTrainerTowerOpponent->speechWin, dest);
|
||||
@@ -505,7 +505,7 @@ void sub_815DBF4(u8 *dest, u8 opponentIdx)
|
||||
void sub_815DC40(u8 *dest, u8 opponentIdx)
|
||||
// TTower_GetAfterBattleMessage?
|
||||
{
|
||||
VarSet(VAR_0x4003, opponentIdx);
|
||||
VarSet(VAR_TEMP_3, opponentIdx);
|
||||
TrainerTowerGetOpponentTextColor(sTrainerTowerOpponent->battleType, sTrainerTowerOpponent->facilityClass);
|
||||
if (opponentIdx == 0)
|
||||
TT_ConvertEasyChatMessageToString(sTrainerTowerOpponent->speechLose, dest);
|
||||
@@ -706,7 +706,7 @@ static void TrainerTowerGetOpponentTextColor(u8 battleType, u8 facilityClass)
|
||||
}
|
||||
if (r4 != NELEMS(sDoubleBattleTrainerInfo))
|
||||
{
|
||||
if (VarGet(VAR_0x4003))
|
||||
if (VarGet(VAR_TEMP_3))
|
||||
r5 = sDoubleBattleTrainerInfo[r4].gender2;
|
||||
else
|
||||
r5 = sDoubleBattleTrainerInfo[r4].gender1;
|
||||
@@ -905,12 +905,12 @@ static void sub_815E720(void)
|
||||
|
||||
PutWindowTilemap(windowId);
|
||||
CopyWindowToVram(windowId, 3);
|
||||
VarSet(VAR_0x4001, windowId);
|
||||
VarSet(VAR_TEMP_1, windowId);
|
||||
}
|
||||
|
||||
static void sub_815E88C(void)
|
||||
{
|
||||
u8 windowId = VarGet(VAR_0x4001);
|
||||
u8 windowId = VarGet(VAR_TEMP_1);
|
||||
ClearStdWindowAndFrameToTransparent(windowId, TRUE);
|
||||
RemoveWindow(windowId);
|
||||
}
|
||||
@@ -948,7 +948,7 @@ static void sub_815E908(void)
|
||||
static void sub_815E948(void)
|
||||
{
|
||||
s32 i;
|
||||
u16 var_4001 = VarGet(VAR_0x4001);
|
||||
u16 var_4001 = VarGet(VAR_TEMP_1);
|
||||
u8 r1 = sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[var_4001].facilityClass;
|
||||
|
||||
for (i = 0; i < NELEMS(sTrainerEncounterMusicLUT); i++)
|
||||
@@ -974,7 +974,7 @@ static void sub_815E9C8(void)
|
||||
|
||||
static void BuildEnemyParty(void)
|
||||
{
|
||||
u16 trainerIdx = VarGet(VAR_0x4001);
|
||||
u16 trainerIdx = VarGet(VAR_TEMP_1);
|
||||
s32 level = GetPartyMaxLevel();
|
||||
u8 floorIdx = gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk8;
|
||||
s32 i;
|
||||
|
||||
Reference in New Issue
Block a user