decompile fldeff_80F9BCC with data
This commit is contained in:
@@ -42,7 +42,7 @@ void AllocateBattleResources(void)
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_SECRET_BASE)
|
||||
{
|
||||
u16 currSecretBaseId = VarGet(VAR_0x4054);
|
||||
u16 currSecretBaseId = VarGet(VAR_CURRENT_SECRET_BASE);
|
||||
CreateSecretBaseEnemyParty(&gSaveBlock1Ptr->secretBases[currSecretBaseId]);
|
||||
}
|
||||
}
|
||||
|
||||
1606
src/fldeff_80F9BCC.c
1606
src/fldeff_80F9BCC.c
File diff suppressed because it is too large
Load Diff
@@ -190,7 +190,7 @@ void sub_80E8B6C(void)
|
||||
continue;
|
||||
}
|
||||
gSpecialVar_Result = TRUE;
|
||||
VarSet(VAR_0x4054, i);
|
||||
VarSet(VAR_CURRENT_SECRET_BASE, i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -320,7 +320,7 @@ void sub_80E8E18(void)
|
||||
{
|
||||
gSaveBlock1Ptr->secretBases[0].trainerId[i] = gSaveBlock2Ptr->playerTrainerId[i];
|
||||
}
|
||||
VarSet(VAR_0x4054, 0);
|
||||
VarSet(VAR_CURRENT_SECRET_BASE, 0);
|
||||
StringCopyN(gSaveBlock1Ptr->secretBases[0].trainerName, gSaveBlock2Ptr->playerName, sub_80E8DF4(gSaveBlock2Ptr->playerName));
|
||||
gSaveBlock1Ptr->secretBases[0].gender = gSaveBlock2Ptr->playerGender;
|
||||
gSaveBlock1Ptr->secretBases[0].language = GAME_LANGUAGE;
|
||||
@@ -383,7 +383,7 @@ void sub_80E8FD0(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
secretBaseRecordId = VarGet(VAR_0x4054);
|
||||
secretBaseRecordId = VarGet(VAR_CURRENT_SECRET_BASE);
|
||||
if (gSaveBlock1Ptr->secretBases[secretBaseRecordId].sbr_field_10 < 255)
|
||||
{
|
||||
gSaveBlock1Ptr->secretBases[secretBaseRecordId].sbr_field_10 ++;
|
||||
@@ -479,7 +479,7 @@ void sub_80E9238(u8 flagIn)
|
||||
|
||||
if (CurrentMapIsSecretBase())
|
||||
{
|
||||
curBaseId = VarGet(VAR_0x4054);
|
||||
curBaseId = VarGet(VAR_CURRENT_SECRET_BASE);
|
||||
decorations = gSaveBlock1Ptr->secretBases[curBaseId].decorations;
|
||||
decorPos = gSaveBlock1Ptr->secretBases[curBaseId].decorationPos;
|
||||
for (x = 0; x < 16; x ++)
|
||||
@@ -522,7 +522,7 @@ void sub_80E933C(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
curBase = VarGet(VAR_0x4054);
|
||||
curBase = VarGet(VAR_CURRENT_SECRET_BASE);
|
||||
roomDecor = gSaveBlock1Ptr->secretBases[curBase].decorations;
|
||||
roomDecorPos = gSaveBlock1Ptr->secretBases[curBase].decorationPos;
|
||||
nDecor = 16;
|
||||
@@ -558,7 +558,7 @@ void sub_80E933C(void)
|
||||
show_sprite(gSpecialVar_Result, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
||||
sub_808EBA8(gSpecialVar_Result, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, gSpecialVar_0x8006, gSpecialVar_0x8007);
|
||||
sub_808F254(gSpecialVar_Result, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
||||
if (CurrentMapIsSecretBase() == TRUE && VarGet(VAR_0x4054) != 0)
|
||||
if (CurrentMapIsSecretBase() == TRUE && VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
if (category == DECORCAT_DOLL)
|
||||
{
|
||||
@@ -594,7 +594,7 @@ void sub_80E9578(void)
|
||||
|
||||
void sub_80E95D4(void)
|
||||
{
|
||||
VarSet(VAR_OBJ_GFX_ID_F, gUnknown_0858D060[sub_80EA20C(VarGet(VAR_0x4054))]);
|
||||
VarSet(VAR_OBJ_GFX_ID_F, gUnknown_0858D060[sub_80EA20C(VarGet(VAR_CURRENT_SECRET_BASE))]);
|
||||
}
|
||||
|
||||
void sub_80E9608(const struct MapPosition *position, const struct MapEvents *events)
|
||||
@@ -681,7 +681,7 @@ u8 *sub_80E9780(u8 *dest, u8 secretBaseRecordId)
|
||||
|
||||
u8 *GetSecretBaseMapName(u8 *dest)
|
||||
{
|
||||
return sub_80E9780(dest, VarGet(VAR_0x4054));
|
||||
return sub_80E9780(dest, VarGet(VAR_CURRENT_SECRET_BASE));
|
||||
}
|
||||
|
||||
void sub_80E980C(void)
|
||||
@@ -689,7 +689,7 @@ void sub_80E980C(void)
|
||||
u8 secretBaseRecordId;
|
||||
const u8 *src;
|
||||
|
||||
secretBaseRecordId = VarGet(VAR_0x4054);
|
||||
secretBaseRecordId = VarGet(VAR_CURRENT_SECRET_BASE);
|
||||
src = gSaveBlock1Ptr->secretBases[secretBaseRecordId].trainerName;
|
||||
*StringCopyN(gStringVar1, src, sub_80E8DF4(src)) = EOS;
|
||||
ConvertInternationalString(gStringVar1, gSaveBlock1Ptr->secretBases[secretBaseRecordId].language);
|
||||
@@ -829,7 +829,7 @@ u8 sub_80E9BA8(void)
|
||||
|
||||
void sub_80E9BDC(void)
|
||||
{
|
||||
if (sub_80E9878(VarGet(VAR_0x4054)) == TRUE)
|
||||
if (sub_80E9878(VarGet(VAR_CURRENT_SECRET_BASE)) == TRUE)
|
||||
{
|
||||
gSpecialVar_Result = 1;
|
||||
}
|
||||
@@ -845,7 +845,7 @@ void sub_80E9BDC(void)
|
||||
|
||||
void sub_80E9C2C(void)
|
||||
{
|
||||
gSaveBlock1Ptr->secretBases[VarGet(VAR_0x4054)].sbr_field_1_6 ^= 1;
|
||||
gSaveBlock1Ptr->secretBases[VarGet(VAR_CURRENT_SECRET_BASE)].sbr_field_1_6 ^= 1;
|
||||
FlagSet(0x10C);
|
||||
}
|
||||
|
||||
@@ -1081,7 +1081,7 @@ void sub_80EA18C(u8 taskId)
|
||||
|
||||
void task_pc_turn_off(u8 taskId)
|
||||
{
|
||||
if (VarGet(VAR_0x4054) == 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) == 0)
|
||||
{
|
||||
ScriptContext1_SetupScript(gUnknown_0823B4E8);
|
||||
}
|
||||
@@ -1101,7 +1101,7 @@ const u8 *GetSecretBaseTrainerLoseText(void)
|
||||
{
|
||||
u8 param;
|
||||
|
||||
param = sub_80EA20C(VarGet(VAR_0x4054));
|
||||
param = sub_80EA20C(VarGet(VAR_CURRENT_SECRET_BASE));
|
||||
if (param == 0)
|
||||
{
|
||||
return SecretBase_RedCave1_Text_274966;
|
||||
@@ -1150,7 +1150,7 @@ void sub_80EA2E4(void)
|
||||
|
||||
void sub_80EA30C(void)
|
||||
{
|
||||
gSaveBlock1Ptr->secretBases[VarGet(VAR_0x4054)].sbr_field_1_5 = gSpecialVar_Result;
|
||||
gSaveBlock1Ptr->secretBases[VarGet(VAR_CURRENT_SECRET_BASE)].sbr_field_1_5 = gSpecialVar_Result;
|
||||
}
|
||||
|
||||
void sub_80EA354(void)
|
||||
@@ -1158,7 +1158,7 @@ void sub_80EA354(void)
|
||||
u16 secretBaseRecordId;
|
||||
u8 i;
|
||||
|
||||
secretBaseRecordId = VarGet(VAR_0x4054);
|
||||
secretBaseRecordId = VarGet(VAR_CURRENT_SECRET_BASE);
|
||||
if (!FlagGet(0x922))
|
||||
{
|
||||
for (i = 0; i < 20; i ++)
|
||||
@@ -1183,7 +1183,7 @@ void sub_80EA3E4(u8 taskId)
|
||||
switch (data[1])
|
||||
{
|
||||
case 0:
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
gUnknown_0203A01D = TRUE;
|
||||
}
|
||||
@@ -1783,7 +1783,7 @@ void sub_80EB1AC(void)
|
||||
VarSet(VAR_0x40ED, 0);
|
||||
VarSet(VAR_0x40EE, 0);
|
||||
VarSet(VAR_0x40EF, 0);
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40F0, TRUE);
|
||||
}
|
||||
@@ -1811,7 +1811,7 @@ void sub_80EB218(void)
|
||||
|
||||
void sub_80EB290(void)
|
||||
{
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x800);
|
||||
}
|
||||
@@ -1819,7 +1819,7 @@ void sub_80EB290(void)
|
||||
|
||||
void sub_80EB2C8(void)
|
||||
{
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) | 0x400);
|
||||
}
|
||||
@@ -1827,7 +1827,7 @@ void sub_80EB2C8(void)
|
||||
|
||||
void sub_80EB300(void)
|
||||
{
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) & ~0x3800);
|
||||
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) & ~0x001);
|
||||
@@ -1837,7 +1837,7 @@ void sub_80EB300(void)
|
||||
|
||||
void sub_80EB368(void)
|
||||
{
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) & ~0x3800);
|
||||
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) & ~0x001);
|
||||
@@ -1847,7 +1847,7 @@ void sub_80EB368(void)
|
||||
|
||||
void sub_80EB3D0(void)
|
||||
{
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) & ~0x3800);
|
||||
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) & ~0x001);
|
||||
@@ -1857,7 +1857,7 @@ void sub_80EB3D0(void)
|
||||
|
||||
void sub_80EB438(void)
|
||||
{
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) & ~0x3800);
|
||||
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) & ~0x001);
|
||||
@@ -1888,7 +1888,7 @@ void sub_80EB498(void)
|
||||
case 0x332:
|
||||
case 0x333:
|
||||
case 0x334:
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) | 0x4000);
|
||||
}
|
||||
@@ -1906,7 +1906,7 @@ void sub_80EB56C(void)
|
||||
{
|
||||
case 0x28a:
|
||||
case 0x28b:
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) | 0x40);
|
||||
}
|
||||
@@ -1929,21 +1929,21 @@ void sub_80EB56C(void)
|
||||
case 0x2f9:
|
||||
case 0x2fa:
|
||||
case 0x2fb:
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) | 0x8);
|
||||
}
|
||||
break;
|
||||
case 0x22c:
|
||||
case 0x233:
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x40);
|
||||
}
|
||||
break;
|
||||
case 0x288:
|
||||
case 0x289:
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x100);
|
||||
}
|
||||
@@ -1951,7 +1951,7 @@ void sub_80EB56C(void)
|
||||
case 0x22d:
|
||||
case 0x22e:
|
||||
case 0x22f:
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x10);
|
||||
}
|
||||
@@ -1979,7 +1979,7 @@ void sub_80EB56C(void)
|
||||
case 0x2cd:
|
||||
case 0x2ce:
|
||||
case 0x2cf:
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x8);
|
||||
}
|
||||
@@ -2006,7 +2006,7 @@ void sub_80EB9E0(void)
|
||||
case 0x2be:
|
||||
case 0x2c3:
|
||||
case 0x2c6:
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x8);
|
||||
}
|
||||
@@ -2044,14 +2044,14 @@ void sub_80EBB28(void)
|
||||
case 0x2c4:
|
||||
case 0x2c5:
|
||||
case 0x2c7:
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x8);
|
||||
}
|
||||
break;
|
||||
case 0x280:
|
||||
case 0x281:
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x100);
|
||||
}
|
||||
@@ -2059,7 +2059,7 @@ void sub_80EBB28(void)
|
||||
case 0x225:
|
||||
case 0x226:
|
||||
case 0x227:
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x10);
|
||||
}
|
||||
@@ -2077,7 +2077,7 @@ void sub_80EBE7C(void)
|
||||
{
|
||||
case 0x28d:
|
||||
case 0x28e:
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x4);
|
||||
}
|
||||
|
||||
4
src/tv.c
4
src/tv.c
@@ -2572,13 +2572,13 @@ void sub_80EEA70(void)
|
||||
show->secretBaseSecrets.flags = VarGet(0x40ee) + (VarGet(0x40ef) << 16);
|
||||
tv_store_id_3x(show);
|
||||
show->secretBaseSecrets.language = gGameLanguage;
|
||||
if (show->secretBaseSecrets.language == LANGUAGE_JAPANESE || gSaveBlock1Ptr->secretBases[VarGet(VAR_0x4054)].language == LANGUAGE_JAPANESE)
|
||||
if (show->secretBaseSecrets.language == LANGUAGE_JAPANESE || gSaveBlock1Ptr->secretBases[VarGet(VAR_CURRENT_SECRET_BASE)].language == LANGUAGE_JAPANESE)
|
||||
{
|
||||
show->secretBaseSecrets.baseOwnersNameLanguage = LANGUAGE_JAPANESE;
|
||||
}
|
||||
else
|
||||
{
|
||||
show->secretBaseSecrets.baseOwnersNameLanguage = gSaveBlock1Ptr->secretBases[VarGet(VAR_0x4054)].language;
|
||||
show->secretBaseSecrets.baseOwnersNameLanguage = gSaveBlock1Ptr->secretBases[VarGet(VAR_CURRENT_SECRET_BASE)].language;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user