Make frontier util compile

This commit is contained in:
DizzyEggg
2018-10-30 22:17:03 +01:00
parent 90ef269426
commit 7de1c4bd14
18 changed files with 318 additions and 69 deletions
+30 -30
View File
@@ -2158,73 +2158,73 @@ void sub_8139F20(void)
case 1:
case 2:
case 3:
if (gSaveBlock2Ptr->frontier.winStreaks[var][0] >= gSaveBlock2Ptr->frontier.winStreaks[var][1])
if (gSaveBlock2Ptr->frontier.towerWinStreaks[var][0] >= gSaveBlock2Ptr->frontier.towerWinStreaks[var][1])
{
unk = gSaveBlock2Ptr->frontier.winStreaks[var][0];
unk = gSaveBlock2Ptr->frontier.towerWinStreaks[var][0];
}
else
{
unk = gSaveBlock2Ptr->frontier.winStreaks[var][1];
unk = gSaveBlock2Ptr->frontier.towerWinStreaks[var][1];
}
break;
case 4:
if (gSaveBlock2Ptr->frontier.field_D0C[0][0] >= gSaveBlock2Ptr->frontier.field_D0C[0][1])
if (gSaveBlock2Ptr->frontier.domeWinStreaks[0][0] >= gSaveBlock2Ptr->frontier.domeWinStreaks[0][1])
{
unk = gSaveBlock2Ptr->frontier.field_D0C[0][0];
unk = gSaveBlock2Ptr->frontier.domeWinStreaks[0][0];
}
else
{
unk = gSaveBlock2Ptr->frontier.field_D0C[0][1];
unk = gSaveBlock2Ptr->frontier.domeWinStreaks[0][1];
}
break;
case 5:
if (gSaveBlock2Ptr->frontier.field_DE2[0][0] >= gSaveBlock2Ptr->frontier.field_DE2[0][1])
if (gSaveBlock2Ptr->frontier.factoryWinStreaks[0][0] >= gSaveBlock2Ptr->frontier.factoryWinStreaks[0][1])
{
unk = gSaveBlock2Ptr->frontier.field_DE2[0][0];
unk = gSaveBlock2Ptr->frontier.factoryWinStreaks[0][0];
}
else
{
unk = gSaveBlock2Ptr->frontier.field_DE2[0][1];
unk = gSaveBlock2Ptr->frontier.factoryWinStreaks[0][1];
}
break;
case 6:
if (gSaveBlock2Ptr->frontier.field_DC8[0][0] >= gSaveBlock2Ptr->frontier.field_DC8[0][1])
if (gSaveBlock2Ptr->frontier.palaceWinStreaks[0][0] >= gSaveBlock2Ptr->frontier.palaceWinStreaks[0][1])
{
unk = gSaveBlock2Ptr->frontier.field_DC8[0][0];
unk = gSaveBlock2Ptr->frontier.palaceWinStreaks[0][0];
}
else
{
unk = gSaveBlock2Ptr->frontier.field_DC8[0][1];
unk = gSaveBlock2Ptr->frontier.palaceWinStreaks[0][1];
}
break;
case 7:
if (gSaveBlock2Ptr->frontier.field_DDA[0] >= gSaveBlock2Ptr->frontier.field_DDA[1])
if (gSaveBlock2Ptr->frontier.arenaWinStreaks[0] >= gSaveBlock2Ptr->frontier.arenaWinStreaks[1])
{
unk = gSaveBlock2Ptr->frontier.field_DDA[0];
unk = gSaveBlock2Ptr->frontier.arenaWinStreaks[0];
}
else
{
unk = gSaveBlock2Ptr->frontier.field_DDA[1];
unk = gSaveBlock2Ptr->frontier.arenaWinStreaks[1];
}
break;
case 8:
if (gSaveBlock2Ptr->frontier.field_E04[0] >= gSaveBlock2Ptr->frontier.field_E04[1])
if (gSaveBlock2Ptr->frontier.pikeWinStreaks[0] >= gSaveBlock2Ptr->frontier.pikeWinStreaks[1])
{
unk = gSaveBlock2Ptr->frontier.field_E04[0];
unk = gSaveBlock2Ptr->frontier.pikeWinStreaks[0];
}
else
{
unk = gSaveBlock2Ptr->frontier.field_E04[1];
unk = gSaveBlock2Ptr->frontier.pikeWinStreaks[1];
}
break;
case 9:
if (gSaveBlock2Ptr->frontier.field_E1A[0] >= gSaveBlock2Ptr->frontier.field_E1A[1])
if (gSaveBlock2Ptr->frontier.pyramidWinStreaks[0] >= gSaveBlock2Ptr->frontier.pyramidWinStreaks[1])
{
unk = gSaveBlock2Ptr->frontier.field_E1A[0];
unk = gSaveBlock2Ptr->frontier.pyramidWinStreaks[0];
}
else
{
unk = gSaveBlock2Ptr->frontier.field_E1A[1];
unk = gSaveBlock2Ptr->frontier.pyramidWinStreaks[1];
}
break;
}
@@ -2253,7 +2253,7 @@ void sub_813A080(void)
for (i = 0; i < 9; i++)
{
if (gUnknown_085B2CDC[i] > gSaveBlock2Ptr->frontier.winStreaks[battleMode][lvlMode])
if (gUnknown_085B2CDC[i] > gSaveBlock2Ptr->frontier.towerWinStreaks[battleMode][lvlMode])
{
gSpecialVar_0x8005 = 4;
gSpecialVar_0x8006 = i + 5;
@@ -2997,7 +2997,7 @@ void sub_813A8FC(void)
{
u8 string[32];
u32 x;
StringCopy(ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->frontier.frontierBattlePoints, STR_CONV_MODE_RIGHT_ALIGN, 4), gText_BP);
StringCopy(ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->frontier.battlePoints, STR_CONV_MODE_RIGHT_ALIGN, 4), gText_BP);
x = GetStringRightAlignXOffset(1, string, 48);
AddTextPrinterParameterized(gUnknown_0203AB6D, 1, string, x, 1, 0, NULL);
}
@@ -3028,31 +3028,31 @@ void sub_813A988(void)
void sub_813A9A4(void)
{
if (gSaveBlock2Ptr->frontier.frontierBattlePoints < gSpecialVar_0x8004)
if (gSaveBlock2Ptr->frontier.battlePoints < gSpecialVar_0x8004)
{
gSaveBlock2Ptr->frontier.frontierBattlePoints = 0;
gSaveBlock2Ptr->frontier.battlePoints = 0;
}
else
{
gSaveBlock2Ptr->frontier.frontierBattlePoints -= gSpecialVar_0x8004;
gSaveBlock2Ptr->frontier.battlePoints -= gSpecialVar_0x8004;
}
}
void sub_813A9D0(void)
{
if (gSaveBlock2Ptr->frontier.frontierBattlePoints + gSpecialVar_0x8004 > 0x270F)
if (gSaveBlock2Ptr->frontier.battlePoints + gSpecialVar_0x8004 > 9999)
{
gSaveBlock2Ptr->frontier.frontierBattlePoints = 0x270f;
gSaveBlock2Ptr->frontier.battlePoints = 9999;
}
else
{
gSaveBlock2Ptr->frontier.frontierBattlePoints = gSaveBlock2Ptr->frontier.frontierBattlePoints + gSpecialVar_0x8004;
gSaveBlock2Ptr->frontier.battlePoints = gSaveBlock2Ptr->frontier.battlePoints + gSpecialVar_0x8004;
}
}
u16 sub_813AA04(void)
{
return gSaveBlock2Ptr->frontier.frontierBattlePoints;
return gSaveBlock2Ptr->frontier.battlePoints;
}
void sub_813AA18(void)