Update variable and flag names
This commit is contained in:
@@ -511,7 +511,7 @@ static void sub_8036A5C(void)
|
||||
|
||||
gBattleStruct->field_182 = r6;
|
||||
*(&gBattleStruct->field_183) = r6 >> 8;
|
||||
gBattleStruct->field_183 |= FlagGet(SYS_FRONTIER_PASS) << 7;
|
||||
gBattleStruct->field_183 |= FlagGet(FLAG_SYS_FRONTIER_PASS) << 7;
|
||||
}
|
||||
|
||||
static void SetPlayerBerryDataInBattleStruct(void)
|
||||
@@ -1612,7 +1612,7 @@ void BattleMainCB2(void)
|
||||
|
||||
if (gMain.heldKeys & B_BUTTON && gBattleTypeFlags & BATTLE_TYPE_RECORDED && sub_8186450())
|
||||
{
|
||||
gScriptResult = gBattleOutcome = BATTLE_PLAYER_TELEPORTED;
|
||||
gSpecialVar_ScriptResult = gBattleOutcome = BATTLE_PLAYER_TELEPORTED;
|
||||
ResetPaletteFadeControl();
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
SetMainCallback2(CB2_QuitRecordedBattle);
|
||||
@@ -2070,7 +2070,7 @@ static void sub_8038F34(void)
|
||||
|
||||
if (!gSaveBlock2Ptr->field_CA9_b && i == monsCount)
|
||||
{
|
||||
if (FlagGet(SYS_FRONTIER_PASS))
|
||||
if (FlagGet(FLAG_SYS_FRONTIER_PASS))
|
||||
{
|
||||
FreeAllWindowBuffers();
|
||||
SetMainCallback2(sub_80392A8);
|
||||
@@ -4428,7 +4428,7 @@ u8 GetWhoStrikesFirst(u8 bank1, u8 bank2, bool8 ignoreChosenMoves)
|
||||
|
||||
// badge boost
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000 | BATTLE_TYPE_FRONTIER))
|
||||
&& FlagGet(BADGE03_GET)
|
||||
&& FlagGet(FLAG_BADGE03_GET)
|
||||
&& GetBankSide(bank1) == SIDE_PLAYER)
|
||||
{
|
||||
speedBank1 = (speedBank1 * 110) / 100;
|
||||
@@ -4462,7 +4462,7 @@ u8 GetWhoStrikesFirst(u8 bank1, u8 bank2, bool8 ignoreChosenMoves)
|
||||
|
||||
// badge boost
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000 | BATTLE_TYPE_FRONTIER))
|
||||
&& FlagGet(BADGE03_GET)
|
||||
&& FlagGet(FLAG_BADGE03_GET)
|
||||
&& GetBankSide(bank2) == SIDE_PLAYER)
|
||||
{
|
||||
speedBank2 = (speedBank2 * 110) / 100;
|
||||
@@ -4751,7 +4751,7 @@ static void HandleEndTurn_BattleWon(void)
|
||||
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))
|
||||
{
|
||||
gScriptResult = gBattleOutcome;
|
||||
gSpecialVar_ScriptResult = gBattleOutcome;
|
||||
gBattleTextBuff1[0] = gBattleOutcome;
|
||||
gBankAttacker = GetBankByIdentity(IDENTITY_PLAYER_MON1);
|
||||
gBattlescriptCurrInstr = BattleScript_LinkBattleWonOrLost;
|
||||
@@ -5013,7 +5013,7 @@ static void ReturnFromBattleToOverworld(void)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_LINK && gReceivedRemoteLinkPlayers != 0)
|
||||
return;
|
||||
|
||||
gScriptResult = gBattleOutcome;
|
||||
gSpecialVar_ScriptResult = gBattleOutcome;
|
||||
gMain.inBattle = 0;
|
||||
gMain.callback1 = gPreBattleCallback1;
|
||||
|
||||
|
||||
@@ -1907,7 +1907,7 @@ u32 BattleStringExpandPlaceholders(const u8* src, u8* dst)
|
||||
HANDLE_NICKNAME_STRING_CASE(gBattleScripting.bank, *(&gBattleStruct->field_52))
|
||||
break;
|
||||
case B_TXT_PC_CREATOR_NAME: // lanette pc
|
||||
if (FlagGet(SYS_PC_LANETTE))
|
||||
if (FlagGet(FLAG_SYS_PC_LANETTE))
|
||||
toCpy = gText_Lanettes;
|
||||
else
|
||||
toCpy = gText_Someones;
|
||||
|
||||
@@ -11160,7 +11160,7 @@ static void atkF0_give_caught_mon(void)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
}
|
||||
|
||||
if (FlagGet(SYS_PC_LANETTE))
|
||||
if (FlagGet(FLAG_SYS_PC_LANETTE))
|
||||
gBattleCommunication[MULTISTRING_CHOOSER]++;
|
||||
}
|
||||
|
||||
|
||||
@@ -3511,16 +3511,16 @@ u8 IsPokeDisobedient(void)
|
||||
return 0;
|
||||
if (!IsOtherTrainer(gBattleMons[gBankAttacker].otId, gBattleMons[gBankAttacker].otName))
|
||||
return 0;
|
||||
if (FlagGet(BADGE08_GET))
|
||||
if (FlagGet(FLAG_BADGE08_GET))
|
||||
return 0;
|
||||
|
||||
obedienceLevel = 10;
|
||||
|
||||
if (FlagGet(BADGE02_GET))
|
||||
if (FlagGet(FLAG_BADGE02_GET))
|
||||
obedienceLevel = 30;
|
||||
if (FlagGet(BADGE04_GET))
|
||||
if (FlagGet(FLAG_BADGE04_GET))
|
||||
obedienceLevel = 50;
|
||||
if (FlagGet(BADGE06_GET))
|
||||
if (FlagGet(FLAG_BADGE06_GET))
|
||||
obedienceLevel = 70;
|
||||
}
|
||||
|
||||
|
||||
@@ -1169,7 +1169,7 @@ void FieldObjectInteractionGetBerryTreeData(void)
|
||||
id = FieldObjectGetBerryTreeId(gSelectedMapObject);
|
||||
berry = GetBerryTypeByBerryTreeId(id);
|
||||
ResetBerryTreeSparkleFlag(id);
|
||||
unk = gScriptLastTalked;
|
||||
unk = gSpecialVar_ScriptLastTalked;
|
||||
num = gSaveBlock1Ptr->location.mapNum;
|
||||
group = gSaveBlock1Ptr->location.mapGroup;
|
||||
if (sub_8092E9C(unk, num, group))
|
||||
@@ -1219,7 +1219,7 @@ void FieldObjectInteractionPickBerryTree(void)
|
||||
void FieldObjectInteractionRemoveBerryTree(void)
|
||||
{
|
||||
RemoveBerryTree(FieldObjectGetBerryTreeId(gSelectedMapObject));
|
||||
sub_8092EF0(gScriptLastTalked, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
||||
sub_8092EF0(gSpecialVar_ScriptLastTalked, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
||||
}
|
||||
|
||||
u8 PlayerHasBerries(void)
|
||||
|
||||
@@ -33,7 +33,7 @@ void sub_8179944(void);
|
||||
|
||||
bool8 ShouldDoBrailleDigEffect(void)
|
||||
{
|
||||
if (!FlagGet(SYS_BRAILLE_DIG)
|
||||
if (!FlagGet(FLAG_SYS_BRAILLE_DIG)
|
||||
&& (gSaveBlock1Ptr->location.mapGroup == 0x18
|
||||
&& gSaveBlock1Ptr->location.mapNum == 0x47))
|
||||
{
|
||||
@@ -58,7 +58,7 @@ void DoBrailleDigEffect(void)
|
||||
MapGridSetMetatileIdAt(18, 9, 3636);
|
||||
DrawWholeMapView();
|
||||
PlaySE(SE_BAN);
|
||||
FlagSet(SYS_BRAILLE_DIG);
|
||||
FlagSet(FLAG_SYS_BRAILLE_DIG);
|
||||
ScriptContext2_Disable();
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ bool8 CheckRelicanthWailord(void)
|
||||
void ShouldDoBrailleStrengthEffectOld(void)
|
||||
{
|
||||
/*
|
||||
if (!FlagGet(SYS_BRAILLE_STRENGTH) && (gSaveBlock1.location.mapGroup == MAP_GROUP_DESERT_RUINS && gSaveBlock1.location.mapNum == MAP_ID_DESERT_RUINS))
|
||||
if (!FlagGet(FLAG_SYS_BRAILLE_STRENGTH) && (gSaveBlock1.location.mapGroup == MAP_GROUP_DESERT_RUINS && gSaveBlock1.location.mapNum == MAP_ID_DESERT_RUINS))
|
||||
{
|
||||
if (gSaveBlock1.pos.x == 10 && gSaveBlock1.pos.y == 23)
|
||||
return TRUE;
|
||||
@@ -105,13 +105,13 @@ void DoBrailleStrengthEffect(void)
|
||||
MapGridSetMetatileIdAt(16, 27, 3636);
|
||||
DrawWholeMapView();
|
||||
PlaySE(SE_BAN);
|
||||
FlagSet(SYS_BRAILLE_STRENGTH);
|
||||
FlagSet(FLAG_SYS_BRAILLE_STRENGTH);
|
||||
ScriptContext2_Disable();
|
||||
}
|
||||
|
||||
bool8 ShouldDoBrailleFlyEffect(void)
|
||||
{
|
||||
if (!FlagGet(SYS_BRAILLE_FLY) && (gSaveBlock1.location.mapGroup == MAP_GROUP_ANCIENT_TOMB && gSaveBlock1.location.mapNum == MAP_ID_ANCIENT_TOMB))
|
||||
if (!FlagGet(FLAG_SYS_BRAILLE_FLY) && (gSaveBlock1.location.mapGroup == MAP_GROUP_ANCIENT_TOMB && gSaveBlock1.location.mapNum == MAP_ID_ANCIENT_TOMB))
|
||||
{
|
||||
if (gSaveBlock1.pos.x == 8 && gSaveBlock1.pos.y == 25)
|
||||
return TRUE;
|
||||
@@ -151,7 +151,7 @@ void UseFlyAncientTomb_Finish(void)
|
||||
MapGridSetMetatileIdAt(16, 27, 3636);
|
||||
DrawWholeMapView();
|
||||
PlaySE(SE_BAN);
|
||||
FlagSet(SYS_BRAILLE_FLY);
|
||||
FlagSet(FLAG_SYS_BRAILLE_FLY);
|
||||
ScriptContext2_Disable();
|
||||
}
|
||||
*/
|
||||
@@ -205,7 +205,7 @@ void SealedChamberShakingEffect(u8 taskId)
|
||||
// moved later in the function because it was rewritten.
|
||||
bool8 ShouldDoBrailleStrengthEffect(void)
|
||||
{
|
||||
if (!FlagGet(SYS_BRAILLE_STRENGTH) && (gSaveBlock1Ptr->location.mapGroup == 0x18 && gSaveBlock1Ptr->location.mapNum == 0x06))
|
||||
if (!FlagGet(FLAG_SYS_BRAILLE_STRENGTH) && (gSaveBlock1Ptr->location.mapGroup == 0x18 && gSaveBlock1Ptr->location.mapNum == 0x06))
|
||||
{
|
||||
if (gSaveBlock1Ptr->pos.x == 6 && gSaveBlock1Ptr->pos.y == 23)
|
||||
{ gBraillePuzzleCallbackFlag = STRENGTH_PUZZLE; return TRUE; }
|
||||
@@ -240,13 +240,13 @@ void sub_8179860(void)
|
||||
MapGridSetMetatileIdAt(16, 27, 3636);
|
||||
DrawWholeMapView();
|
||||
PlaySE(SE_BAN);
|
||||
FlagSet(SYS_BRAILLE_STRENGTH);
|
||||
FlagSet(FLAG_SYS_BRAILLE_STRENGTH);
|
||||
ScriptContext2_Disable();
|
||||
}
|
||||
|
||||
bool8 ShouldDoBrailleFlyEffect(void)
|
||||
{
|
||||
if (!FlagGet(SYS_BRAILLE_FLY) && (gSaveBlock1Ptr->location.mapGroup == 0x18 && gSaveBlock1Ptr->location.mapNum == 0x44))
|
||||
if (!FlagGet(FLAG_SYS_BRAILLE_FLY) && (gSaveBlock1Ptr->location.mapGroup == 0x18 && gSaveBlock1Ptr->location.mapNum == 0x44))
|
||||
{
|
||||
if (gSaveBlock1Ptr->pos.x == 8 && gSaveBlock1Ptr->pos.y == 25)
|
||||
{ gBraillePuzzleCallbackFlag = FLY_PUZZLE; return TRUE; }
|
||||
@@ -276,7 +276,7 @@ void sub_8179944(void)
|
||||
MapGridSetMetatileIdAt(16, 27, 3636);
|
||||
DrawWholeMapView();
|
||||
PlaySE(SE_BAN);
|
||||
FlagSet(SYS_BRAILLE_FLY);
|
||||
FlagSet(FLAG_SYS_BRAILLE_FLY);
|
||||
ScriptContext2_Disable();
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@ void sub_8179944(void)
|
||||
void DoBrailleWait(void)
|
||||
{
|
||||
/*
|
||||
if (!FlagGet(SYS_BRAILLE_WAIT))
|
||||
if (!FlagGet(FLAG_SYS_BRAILLE_WAIT))
|
||||
CreateTask(Task_BrailleWait, 0x50);
|
||||
}
|
||||
|
||||
@@ -387,7 +387,7 @@ bool8 ShouldDoBrailleRegicePuzzle(void)
|
||||
if (gSaveBlock1Ptr->location.mapGroup == 0x18 && gSaveBlock1Ptr->location.mapNum == 0x43)
|
||||
{
|
||||
// _08179A1A
|
||||
if (FlagGet(SYS_BRAILLE_WAIT) != FALSE)
|
||||
if (FlagGet(FLAG_SYS_BRAILLE_WAIT) != FALSE)
|
||||
return FALSE;
|
||||
if (FlagGet(2) == FALSE)
|
||||
return FALSE;
|
||||
|
||||
@@ -84,13 +84,13 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
|
||||
if (attacker->ability == ABILITY_HUGE_POWER || attacker->ability == ABILITY_PURE_POWER)
|
||||
attack *= 2;
|
||||
|
||||
if (ShouldGetStatBadgeBoost(BADGE01_GET, bankAtk))
|
||||
if (ShouldGetStatBadgeBoost(FLAG_BADGE01_GET, bankAtk))
|
||||
attack = (110 * attack) / 100;
|
||||
if (ShouldGetStatBadgeBoost(BADGE05_GET, bankDef))
|
||||
if (ShouldGetStatBadgeBoost(FLAG_BADGE05_GET, bankDef))
|
||||
defense = (110 * defense) / 100;
|
||||
if (ShouldGetStatBadgeBoost(BADGE07_GET, bankAtk))
|
||||
if (ShouldGetStatBadgeBoost(FLAG_BADGE07_GET, bankAtk))
|
||||
spAttack = (110 * spAttack) / 100;
|
||||
if (ShouldGetStatBadgeBoost(BADGE07_GET, bankDef))
|
||||
if (ShouldGetStatBadgeBoost(FLAG_BADGE07_GET, bankDef))
|
||||
spDefense = (110 * spDefense) / 100;
|
||||
|
||||
for (i = 0; i < 17; i++)
|
||||
|
||||
@@ -2133,10 +2133,10 @@ void sub_8129708(void)
|
||||
u16 i;
|
||||
|
||||
gSpecialVar_0x8005 = 0;
|
||||
gScriptResult = 0;
|
||||
gSpecialVar_ScriptResult = 0;
|
||||
if (gSpecialVar_0x8004 == sCurDecorSelectedInRearrangement)
|
||||
{
|
||||
gScriptResult = 1;
|
||||
gSpecialVar_ScriptResult = 1;
|
||||
}
|
||||
else if (gDecorations[gUnknown_0203A17C.items[sDecorRearrangementDataBuffer[gSpecialVar_0x8004].idx]].permission == DECORPERM_SOLID_MAT)
|
||||
{
|
||||
|
||||
@@ -17,11 +17,11 @@ EWRAM_DATA u16 gSpecialVar_0x8008 = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_0x8009 = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_0x800A = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_0x800B = 0;
|
||||
EWRAM_DATA u16 gScriptResult = 0;
|
||||
EWRAM_DATA u16 gScriptLastTalked = 0;
|
||||
EWRAM_DATA u16 gScriptFacing = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_0x8012 = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_0x8013 = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_ScriptResult = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_ScriptLastTalked = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_ScriptFacing = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_MonBoxId = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_MonBoxPos = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_0x8014 = 0;
|
||||
EWRAM_DATA static u8 gUnknown_020375FC[16] = {0};
|
||||
|
||||
@@ -40,11 +40,11 @@ void ClearTempFieldEventData(void)
|
||||
{
|
||||
memset(gSaveBlock1Ptr->flags, 0, TEMP_FLAGS_SIZE);
|
||||
memset(gSaveBlock1Ptr->vars, 0, TEMP_VARS_SIZE);
|
||||
FlagClear(SYS_ENC_UP_ITEM);
|
||||
FlagClear(SYS_ENC_DOWN_ITEM);
|
||||
FlagClear(SYS_USE_STRENGTH);
|
||||
FlagClear(SYS_CTRL_OBJ_DELETE);
|
||||
FlagClear(SYS_UNKNOWN_880);
|
||||
FlagClear(FLAG_SYS_ENC_UP_ITEM);
|
||||
FlagClear(FLAG_SYS_ENC_DOWN_ITEM);
|
||||
FlagClear(FLAG_SYS_USE_STRENGTH);
|
||||
FlagClear(FLAG_SYS_CTRL_OBJ_DELETE);
|
||||
FlagClear(FLAG_SYS_UNKNOWN_880);
|
||||
}
|
||||
|
||||
// probably had different flag splits at one point.
|
||||
@@ -58,7 +58,7 @@ void DisableNationalPokedex(void)
|
||||
u16 *nationalDexVar = GetVarPointer(VAR_NATIONAL_DEX);
|
||||
gSaveBlock2Ptr->pokedex.nationalMagic = 0;
|
||||
*nationalDexVar = 0;
|
||||
FlagClear(SYS_NATIONAL_DEX);
|
||||
FlagClear(FLAG_SYS_NATIONAL_DEX);
|
||||
}
|
||||
|
||||
void EnableNationalPokedex(void)
|
||||
@@ -66,7 +66,7 @@ void EnableNationalPokedex(void)
|
||||
u16 *nationalDexVar = GetVarPointer(VAR_NATIONAL_DEX);
|
||||
gSaveBlock2Ptr->pokedex.nationalMagic = 0xDA;
|
||||
*nationalDexVar = 0x302;
|
||||
FlagSet(SYS_NATIONAL_DEX);
|
||||
FlagSet(FLAG_SYS_NATIONAL_DEX);
|
||||
gSaveBlock2Ptr->pokedex.unknown1 = 1;
|
||||
gSaveBlock2Ptr->pokedex.order = 0;
|
||||
sub_80BB358();
|
||||
@@ -74,7 +74,7 @@ void EnableNationalPokedex(void)
|
||||
|
||||
bool32 IsNationalPokedexEnabled(void)
|
||||
{
|
||||
if (gSaveBlock2Ptr->pokedex.nationalMagic == 0xDA && VarGet(VAR_NATIONAL_DEX) == 0x302 && FlagGet(SYS_NATIONAL_DEX))
|
||||
if (gSaveBlock2Ptr->pokedex.nationalMagic == 0xDA && VarGet(VAR_NATIONAL_DEX) == 0x302 && FlagGet(FLAG_SYS_NATIONAL_DEX))
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
@@ -82,32 +82,32 @@ bool32 IsNationalPokedexEnabled(void)
|
||||
|
||||
void DisableMysteryEvent(void)
|
||||
{
|
||||
FlagClear(SYS_MYSTERY_EVENT_ENABLE);
|
||||
FlagClear(FLAG_SYS_MYSTERY_EVENT_ENABLE);
|
||||
}
|
||||
|
||||
void EnableMysteryEvent(void)
|
||||
{
|
||||
FlagSet(SYS_MYSTERY_EVENT_ENABLE);
|
||||
FlagSet(FLAG_SYS_MYSTERY_EVENT_ENABLE);
|
||||
}
|
||||
|
||||
bool32 IsMysteryEventEnabled(void)
|
||||
{
|
||||
return FlagGet(SYS_MYSTERY_EVENT_ENABLE);
|
||||
return FlagGet(FLAG_SYS_MYSTERY_EVENT_ENABLE);
|
||||
}
|
||||
|
||||
void DisableMysteryGift(void)
|
||||
{
|
||||
FlagClear(SYS_MYSTERY_GIFT_ENABLE);
|
||||
FlagClear(FLAG_SYS_MYSTERY_GIFT_ENABLE);
|
||||
}
|
||||
|
||||
void EnableMysteryGift(void)
|
||||
{
|
||||
FlagSet(SYS_MYSTERY_GIFT_ENABLE);
|
||||
FlagSet(FLAG_SYS_MYSTERY_GIFT_ENABLE);
|
||||
}
|
||||
|
||||
bool32 IsMysteryGiftEnabled(void)
|
||||
{
|
||||
return FlagGet(SYS_MYSTERY_GIFT_ENABLE);
|
||||
return FlagGet(FLAG_SYS_MYSTERY_GIFT_ENABLE);
|
||||
}
|
||||
|
||||
void sub_809D4D8(void)
|
||||
@@ -145,18 +145,18 @@ void sub_809D570(void)
|
||||
void DisableResetRTC(void)
|
||||
{
|
||||
VarSet(VAR_RESET_RTC_ENABLE, 0);
|
||||
FlagClear(SYS_RESET_RTC_ENABLE);
|
||||
FlagClear(FLAG_SYS_RESET_RTC_ENABLE);
|
||||
}
|
||||
|
||||
void EnableResetRTC(void)
|
||||
{
|
||||
VarSet(VAR_RESET_RTC_ENABLE, 0x920);
|
||||
FlagSet(SYS_RESET_RTC_ENABLE);
|
||||
FlagSet(FLAG_SYS_RESET_RTC_ENABLE);
|
||||
}
|
||||
|
||||
bool32 CanResetRTC(void)
|
||||
{
|
||||
if (FlagGet(SYS_RESET_RTC_ENABLE) && VarGet(VAR_RESET_RTC_ENABLE) == 0x920)
|
||||
if (FlagGet(FLAG_SYS_RESET_RTC_ENABLE) && VarGet(VAR_RESET_RTC_ENABLE) == 0x920)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
|
||||
@@ -354,7 +354,7 @@ void sub_80FB768(void)
|
||||
|
||||
void sub_80FB7A4(void)
|
||||
{
|
||||
FlagSet(SYS_CRUISE_MODE);
|
||||
FlagSet(FLAG_SYS_CRUISE_MODE);
|
||||
FlagSet(0x4001);
|
||||
FlagSet(0x4000);
|
||||
saved_warp2_set(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1);
|
||||
|
||||
@@ -165,11 +165,11 @@ bool8 HasAtLeastOneBerry(void)
|
||||
{
|
||||
if (CheckBagHasItem(i, 1) == TRUE)
|
||||
{
|
||||
gScriptResult = 1;
|
||||
gSpecialVar_ScriptResult = 1;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
gScriptResult = 0;
|
||||
gSpecialVar_ScriptResult = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -242,11 +242,11 @@ void sub_818D9C0(void)
|
||||
{
|
||||
lilycoveLady = &gSaveBlock1Ptr->lilycoveLady;
|
||||
VarSet(VAR_0x4011, gUnknown_0860B074[lilycoveLady->contest.category]);
|
||||
gScriptResult = TRUE;
|
||||
gSpecialVar_ScriptResult = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ void SetLilycoveLadyRandomly(void)
|
||||
|
||||
void sub_818DAEC(void)
|
||||
{
|
||||
gScriptResult = GetLilycoveLadyId();
|
||||
gSpecialVar_ScriptResult = GetLilycoveLadyId();
|
||||
}
|
||||
|
||||
static u8 sub_818DB04(const u16 *data)
|
||||
|
||||
@@ -42,7 +42,7 @@ void SetRandomLotteryNumber(u16 i)
|
||||
void RetrieveLotteryNumber(void)
|
||||
{
|
||||
u16 lottoNumber = GetLotteryNumber();
|
||||
gScriptResult = lottoNumber;
|
||||
gSpecialVar_ScriptResult = lottoNumber;
|
||||
}
|
||||
|
||||
void PickLotteryCornerTicket(void)
|
||||
@@ -66,7 +66,7 @@ void PickLotteryCornerTicket(void)
|
||||
if (!GetMonData(pkmn, MON_DATA_IS_EGG))
|
||||
{
|
||||
u32 otId = GetMonData(pkmn, MON_DATA_OT_ID);
|
||||
u8 numMatchingDigits = GetMatchingDigits(gScriptResult, otId);
|
||||
u8 numMatchingDigits = GetMatchingDigits(gSpecialVar_ScriptResult, otId);
|
||||
|
||||
if (numMatchingDigits > gSpecialVar_0x8004 && numMatchingDigits > 1)
|
||||
{
|
||||
@@ -90,7 +90,7 @@ void PickLotteryCornerTicket(void)
|
||||
!GetBoxMonData(&gPokemonStoragePtr->boxes[i][j], MON_DATA_IS_EGG))
|
||||
{
|
||||
u32 otId = GetBoxMonData(&gPokemonStoragePtr->boxes[i][j], MON_DATA_OT_ID);
|
||||
u8 numMatchingDigits = GetMatchingDigits(gScriptResult, otId);
|
||||
u8 numMatchingDigits = GetMatchingDigits(gSpecialVar_ScriptResult, otId);
|
||||
|
||||
if (numMatchingDigits > gSpecialVar_0x8004 && numMatchingDigits > 1)
|
||||
{
|
||||
|
||||
@@ -1086,10 +1086,10 @@ u8 SendMonToPC(struct Pokemon* mon)
|
||||
{
|
||||
MonRestorePP(mon);
|
||||
CopyMon(checkingMon, &mon->box, sizeof(mon->box));
|
||||
gSpecialVar_0x8012 = boxNo;
|
||||
gSpecialVar_0x8013 = boxPos;
|
||||
gSpecialVar_MonBoxId = boxNo;
|
||||
gSpecialVar_MonBoxPos = boxPos;
|
||||
if (get_unknown_box_id() != boxNo)
|
||||
FlagClear(SYS_STORAGE_UNKNOWN_FLAG);
|
||||
FlagClear(FLAG_SYS_STORAGE_UNKNOWN_FLAG);
|
||||
VarSet(VAR_STORAGE_UNKNOWN, boxNo);
|
||||
return MON_GIVEN_TO_PC;
|
||||
}
|
||||
|
||||
@@ -109,13 +109,13 @@ static void FormatMonSizeRecord(u8 *string, u32 size)
|
||||
|
||||
static u8 CompareMonSize(u16 species, u16 *sizeRecord)
|
||||
{
|
||||
if (gScriptResult == 0xFF)
|
||||
if (gSpecialVar_ScriptResult == 0xFF)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
struct Pokemon *pkmn = &gPlayerParty[gScriptResult];
|
||||
struct Pokemon *pkmn = &gPlayerParty[gSpecialVar_ScriptResult];
|
||||
|
||||
if (GetMonData(pkmn, MON_DATA_IS_EGG) == TRUE || GetMonData(pkmn, MON_DATA_SPECIES) != species)
|
||||
{
|
||||
@@ -173,7 +173,7 @@ void CompareSeedotSize(void)
|
||||
{
|
||||
u16 *sizeRecord = GetVarPointer(VAR_SEEDOT_SIZE_RECORD);
|
||||
|
||||
gScriptResult = CompareMonSize(SPECIES_SEEDOT, sizeRecord);
|
||||
gSpecialVar_ScriptResult = CompareMonSize(SPECIES_SEEDOT, sizeRecord);
|
||||
}
|
||||
|
||||
void InitLotadSizeRecord(void)
|
||||
@@ -192,7 +192,7 @@ void CompareLotadSize(void)
|
||||
{
|
||||
u16 *sizeRecord = GetVarPointer(VAR_LOTAD_SIZE_RECORD);
|
||||
|
||||
gScriptResult = CompareMonSize(SPECIES_LOTAD, sizeRecord);
|
||||
gSpecialVar_ScriptResult = CompareMonSize(SPECIES_LOTAD, sizeRecord);
|
||||
}
|
||||
|
||||
void GiveGiftRibbonToParty(u8 index, u8 ribbonId)
|
||||
@@ -217,6 +217,6 @@ void GiveGiftRibbonToParty(u8 index, u8 ribbonId)
|
||||
}
|
||||
}
|
||||
if (gotRibbon)
|
||||
FlagSet(SYS_RIBBON_GET);
|
||||
FlagSet(FLAG_SYS_RIBBON_GET);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,17 +50,17 @@ static void DecrementFeederStepCounters(void);
|
||||
|
||||
bool32 GetSafariZoneFlag(void)
|
||||
{
|
||||
return FlagGet(SYS_SAFARI_MODE);
|
||||
return FlagGet(FLAG_SYS_SAFARI_MODE);
|
||||
}
|
||||
|
||||
void SetSafariZoneFlag(void)
|
||||
{
|
||||
FlagSet(SYS_SAFARI_MODE);
|
||||
FlagSet(FLAG_SYS_SAFARI_MODE);
|
||||
}
|
||||
|
||||
void ResetSafariZoneFlag(void)
|
||||
{
|
||||
FlagClear(SYS_SAFARI_MODE);
|
||||
FlagClear(FLAG_SYS_SAFARI_MODE);
|
||||
}
|
||||
|
||||
void EnterSafariMode(void)
|
||||
@@ -152,13 +152,13 @@ void GetPokeblockFeederInFront(void)
|
||||
&& sPokeblockFeeders[i].x == x
|
||||
&& sPokeblockFeeders[i].y == y)
|
||||
{
|
||||
gScriptResult = i;
|
||||
gSpecialVar_ScriptResult = i;
|
||||
StringCopy(gStringVar1, gPokeblockNames[sPokeblockFeeders[i].pokeblock.color]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
gScriptResult = -1;
|
||||
gSpecialVar_ScriptResult = -1;
|
||||
}
|
||||
|
||||
void GetPokeblockFeederWithinRange(void)
|
||||
@@ -181,13 +181,13 @@ void GetPokeblockFeederWithinRange(void)
|
||||
y *= -1;
|
||||
if ((x + y) <= 5)
|
||||
{
|
||||
gScriptResult = i;
|
||||
gSpecialVar_ScriptResult = i;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gScriptResult = -1;
|
||||
gSpecialVar_ScriptResult = -1;
|
||||
}
|
||||
|
||||
// unused
|
||||
@@ -195,20 +195,20 @@ struct Pokeblock *SafariZoneGetPokeblockInFront(void)
|
||||
{
|
||||
GetPokeblockFeederInFront();
|
||||
|
||||
if (gScriptResult == 0xFFFF)
|
||||
if (gSpecialVar_ScriptResult == 0xFFFF)
|
||||
return NULL;
|
||||
else
|
||||
return &sPokeblockFeeders[gScriptResult].pokeblock;
|
||||
return &sPokeblockFeeders[gSpecialVar_ScriptResult].pokeblock;
|
||||
}
|
||||
|
||||
struct Pokeblock *SafariZoneGetActivePokeblock(void)
|
||||
{
|
||||
GetPokeblockFeederWithinRange();
|
||||
|
||||
if (gScriptResult == 0xFFFF)
|
||||
if (gSpecialVar_ScriptResult == 0xFFFF)
|
||||
return NULL;
|
||||
else
|
||||
return &sPokeblockFeeders[gScriptResult].pokeblock;
|
||||
return &sPokeblockFeeders[gSpecialVar_ScriptResult].pokeblock;
|
||||
}
|
||||
|
||||
void SafariZoneActivatePokeblockFeeder(u8 pkblId)
|
||||
@@ -255,13 +255,13 @@ bool8 GetInFrontFeederPokeblockAndSteps(void)
|
||||
{
|
||||
GetPokeblockFeederInFront();
|
||||
|
||||
if (gScriptResult == 0xFFFF)
|
||||
if (gSpecialVar_ScriptResult == 0xFFFF)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ConvertIntToDecimalStringN(gStringVar2,
|
||||
sPokeblockFeeders[gScriptResult].stepCounter,
|
||||
sPokeblockFeeders[gSpecialVar_ScriptResult].stepCounter,
|
||||
STR_CONV_MODE_LEADING_ZEROS, 3);
|
||||
|
||||
return TRUE;
|
||||
|
||||
52
src/scrcmd.c
52
src/scrcmd.c
@@ -69,7 +69,7 @@ extern u16 gSpecialVar_0x8001;
|
||||
extern u16 gSpecialVar_0x8002;
|
||||
extern u16 gSpecialVar_0x8004;
|
||||
|
||||
extern u16 gScriptResult;
|
||||
extern u16 gSpecialVar_ScriptResult;
|
||||
|
||||
extern u16 gScriptContestCategory;
|
||||
|
||||
@@ -491,7 +491,7 @@ bool8 ScrCmd_random(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 max = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gScriptResult = Random() % max;
|
||||
gSpecialVar_ScriptResult = Random() % max;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -500,7 +500,7 @@ bool8 ScrCmd_giveitem(struct ScriptContext *ctx)
|
||||
u16 itemId = VarGet(ScriptReadHalfword(ctx));
|
||||
u32 quantity = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gScriptResult = AddBagItem(itemId, (u8)quantity);
|
||||
gSpecialVar_ScriptResult = AddBagItem(itemId, (u8)quantity);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -509,7 +509,7 @@ bool8 ScrCmd_takeitem(struct ScriptContext *ctx)
|
||||
u16 itemId = VarGet(ScriptReadHalfword(ctx));
|
||||
u32 quantity = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gScriptResult = RemoveBagItem(itemId, (u8)quantity);
|
||||
gSpecialVar_ScriptResult = RemoveBagItem(itemId, (u8)quantity);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -518,7 +518,7 @@ bool8 ScrCmd_checkitemspace(struct ScriptContext *ctx)
|
||||
u16 itemId = VarGet(ScriptReadHalfword(ctx));
|
||||
u32 quantity = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gScriptResult = CheckBagHasSpace(itemId, (u8)quantity);
|
||||
gSpecialVar_ScriptResult = CheckBagHasSpace(itemId, (u8)quantity);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -527,7 +527,7 @@ bool8 ScrCmd_checkitem(struct ScriptContext *ctx)
|
||||
u16 itemId = VarGet(ScriptReadHalfword(ctx));
|
||||
u32 quantity = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gScriptResult = CheckBagHasItem(itemId, (u8)quantity);
|
||||
gSpecialVar_ScriptResult = CheckBagHasItem(itemId, (u8)quantity);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -535,7 +535,7 @@ bool8 ScrCmd_checkitemtype(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 itemId = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gScriptResult = GetPocketByItemId(itemId);
|
||||
gSpecialVar_ScriptResult = GetPocketByItemId(itemId);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -544,7 +544,7 @@ bool8 ScrCmd_givepcitem(struct ScriptContext *ctx)
|
||||
u16 itemId = VarGet(ScriptReadHalfword(ctx));
|
||||
u16 quantity = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gScriptResult = AddPCItem(itemId, quantity);
|
||||
gSpecialVar_ScriptResult = AddPCItem(itemId, quantity);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -553,7 +553,7 @@ bool8 ScrCmd_checkpcitem(struct ScriptContext *ctx)
|
||||
u16 itemId = VarGet(ScriptReadHalfword(ctx));
|
||||
u16 quantity = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gScriptResult = CheckPCHasItem(itemId, quantity);
|
||||
gSpecialVar_ScriptResult = CheckPCHasItem(itemId, quantity);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -561,7 +561,7 @@ bool8 ScrCmd_givedecoration(struct ScriptContext *ctx)
|
||||
{
|
||||
u32 decorId = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gScriptResult = DecorationAdd(decorId);
|
||||
gSpecialVar_ScriptResult = DecorationAdd(decorId);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -569,7 +569,7 @@ bool8 ScrCmd_takedecoration(struct ScriptContext *ctx)
|
||||
{
|
||||
u32 decorId = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gScriptResult = DecorationRemove(decorId);
|
||||
gSpecialVar_ScriptResult = DecorationRemove(decorId);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -577,7 +577,7 @@ bool8 ScrCmd_checkdecorspace(struct ScriptContext *ctx)
|
||||
{
|
||||
u32 decorId = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gScriptResult = DecorationCheckSpace(decorId);
|
||||
gSpecialVar_ScriptResult = DecorationCheckSpace(decorId);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -585,7 +585,7 @@ bool8 ScrCmd_checkdecor(struct ScriptContext *ctx)
|
||||
{
|
||||
u32 decorId = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gScriptResult = CheckHasDecoration(decorId);
|
||||
gSpecialVar_ScriptResult = CheckHasDecoration(decorId);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -909,7 +909,7 @@ bool8 ScrCmd_getplayerxy(struct ScriptContext *ctx)
|
||||
|
||||
bool8 ScrCmd_getpartysize(struct ScriptContext *ctx)
|
||||
{
|
||||
gScriptResult = CalculatePlayerPartyCount();
|
||||
gSpecialVar_ScriptResult = CalculatePlayerPartyCount();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1835,7 +1835,7 @@ bool8 ScrCmd_givemon(struct ScriptContext *ctx)
|
||||
u32 unkParam2 = ScriptReadWord(ctx);
|
||||
u8 unkParam3 = ScriptReadByte(ctx);
|
||||
|
||||
gScriptResult = ScriptGiveMon(species, level, item, unkParam1, unkParam2, unkParam3);
|
||||
gSpecialVar_ScriptResult = ScriptGiveMon(species, level, item, unkParam1, unkParam2, unkParam3);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1843,7 +1843,7 @@ bool8 ScrCmd_giveegg(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 species = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gScriptResult = ScriptGiveEgg(species);
|
||||
gSpecialVar_ScriptResult = ScriptGiveEgg(species);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1862,7 +1862,7 @@ bool8 ScrCmd_checkpartymove(struct ScriptContext *ctx)
|
||||
u8 i;
|
||||
u16 moveId = ScriptReadHalfword(ctx);
|
||||
|
||||
gScriptResult = 6;
|
||||
gSpecialVar_ScriptResult = 6;
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES, NULL);
|
||||
@@ -1871,7 +1871,7 @@ bool8 ScrCmd_checkpartymove(struct ScriptContext *ctx)
|
||||
// UB: GetMonData() arguments don't match function definition
|
||||
if (!GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG) && pokemon_has_move(&gPlayerParty[i], moveId) == TRUE)
|
||||
{
|
||||
gScriptResult = i;
|
||||
gSpecialVar_ScriptResult = i;
|
||||
gSpecialVar_0x8004 = species;
|
||||
break;
|
||||
}
|
||||
@@ -1905,7 +1905,7 @@ bool8 ScrCmd_checkmoney(struct ScriptContext *ctx)
|
||||
u8 ignore = ScriptReadByte(ctx);
|
||||
|
||||
if (!ignore)
|
||||
gScriptResult = IsEnoughMoney(&gSaveBlock1Ptr->money, amount);
|
||||
gSpecialVar_ScriptResult = IsEnoughMoney(&gSaveBlock1Ptr->money, amount);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2085,7 +2085,7 @@ bool8 ScrCmd_getpricereduction(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 value = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gScriptResult = GetPriceReduction(value);
|
||||
gSpecialVar_ScriptResult = GetPriceReduction(value);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2160,7 +2160,7 @@ bool8 ScrCmd_setrespawn(struct ScriptContext *ctx)
|
||||
|
||||
bool8 ScrCmd_checkplayergender(struct ScriptContext *ctx)
|
||||
{
|
||||
gScriptResult = gSaveBlock2Ptr->playerGender;
|
||||
gSpecialVar_ScriptResult = gSaveBlock2Ptr->playerGender;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2285,9 +2285,9 @@ bool8 ScrCmd_givecoins(struct ScriptContext *ctx)
|
||||
u16 coins = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
if (GiveCoins(coins) == TRUE)
|
||||
gScriptResult = 0;
|
||||
gSpecialVar_ScriptResult = 0;
|
||||
else
|
||||
gScriptResult = 1;
|
||||
gSpecialVar_ScriptResult = 1;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2296,9 +2296,9 @@ bool8 ScrCmd_takecoins(struct ScriptContext *ctx)
|
||||
u16 coins = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
if (TakeCoins(coins) == TRUE)
|
||||
gScriptResult = 0;
|
||||
gSpecialVar_ScriptResult = 0;
|
||||
else
|
||||
gScriptResult = 1;
|
||||
gSpecialVar_ScriptResult = 1;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2367,7 +2367,7 @@ bool8 ScrCmd_checkmonobedience(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 partyIndex = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gScriptResult = GetMonData(&gPlayerParty[partyIndex], MON_DATA_OBEDIENCE, NULL);
|
||||
gSpecialVar_ScriptResult = GetMonData(&gPlayerParty[partyIndex], MON_DATA_OBEDIENCE, NULL);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,12 +74,12 @@ void AddStartMenuAction(u8 action)
|
||||
|
||||
static void BuildStartMenuActions_Normal(void)
|
||||
{
|
||||
if (FlagGet(SYS_POKEDEX_GET) == TRUE)
|
||||
if (FlagGet(FLAG_SYS_POKEDEX_GET) == TRUE)
|
||||
AddStartMenuAction(MENU_ACTION_POKEDEX);
|
||||
if (FlagGet(SYS_POKEMON_GET) == TRUE)
|
||||
if (FlagGet(FLAG_SYS_POKEMON_GET) == TRUE)
|
||||
AddStartMenuAction(MENU_ACTION_POKEMON);
|
||||
AddStartMenuAction(MENU_ACTION_BAG);
|
||||
if (FlagGet(SYS_POKENAV_GET) == TRUE)
|
||||
if (FlagGet(FLAG_SYS_POKENAV_GET) == TRUE)
|
||||
AddStartMenuAction(MENU_ACTION_POKENAV);
|
||||
AddStartMenuAction(MENU_ACTION_PLAYER);
|
||||
AddStartMenuAction(MENU_ACTION_SAVE);
|
||||
@@ -102,7 +102,7 @@ static void BuildStartMenuActions_LinkMode(void)
|
||||
{
|
||||
AddStartMenuAction(MENU_ACTION_POKEMON);
|
||||
AddStartMenuAction(MENU_ACTION_BAG);
|
||||
if (FlagGet(SYS_POKENAV_GET) == TRUE)
|
||||
if (FlagGet(FLAG_SYS_POKENAV_GET) == TRUE)
|
||||
AddStartMenuAction(MENU_ACTION_POKENAV);
|
||||
AddStartMenuAction(MENU_ACTION_PLAYER_LINK);
|
||||
AddStartMenuAction(MENU_ACTION_OPTION);
|
||||
@@ -113,7 +113,7 @@ static void BuildStartMenuActions_UnionRoom(void)
|
||||
{
|
||||
AddStartMenuAction(MENU_ACTION_POKEMON);
|
||||
AddStartMenuAction(MENU_ACTION_BAG);
|
||||
if (FlagGet(SYS_POKENAV_GET) == TRUE)
|
||||
if (FlagGet(FLAG_SYS_POKENAV_GET) == TRUE)
|
||||
AddStartMenuAction(MENU_ACTION_POKENAV);
|
||||
AddStartMenuAction(MENU_ACTION_PLAYER);
|
||||
AddStartMenuAction(MENU_ACTION_OPTION);
|
||||
|
||||
162
src/tv.c
162
src/tv.c
@@ -214,23 +214,23 @@ const struct {
|
||||
|
||||
// TODO: Figure out what these are, and define constants in include/flags.h
|
||||
const u16 sGoldSymbolFlags[] = {
|
||||
SYS_TOWER_GOLD,
|
||||
SYS_DOME_GOLD,
|
||||
SYS_PALACE_GOLD,
|
||||
SYS_ARENA_GOLD,
|
||||
SYS_FACTORY_GOLD,
|
||||
SYS_PIKE_GOLD,
|
||||
SYS_PYRAMID_GOLD
|
||||
FLAG_SYS_TOWER_GOLD,
|
||||
FLAG_SYS_DOME_GOLD,
|
||||
FLAG_SYS_PALACE_GOLD,
|
||||
FLAG_SYS_ARENA_GOLD,
|
||||
FLAG_SYS_FACTORY_GOLD,
|
||||
FLAG_SYS_PIKE_GOLD,
|
||||
FLAG_SYS_PYRAMID_GOLD
|
||||
};
|
||||
|
||||
const u16 sSilverSymbolFlags[] = {
|
||||
SYS_TOWER_SILVER,
|
||||
SYS_DOME_SILVER,
|
||||
SYS_PALACE_SILVER,
|
||||
SYS_ARENA_SILVER,
|
||||
SYS_FACTORY_SILVER,
|
||||
SYS_PIKE_SILVER,
|
||||
SYS_PYRAMID_SILVER
|
||||
FLAG_SYS_TOWER_SILVER,
|
||||
FLAG_SYS_DOME_SILVER,
|
||||
FLAG_SYS_PALACE_SILVER,
|
||||
FLAG_SYS_ARENA_SILVER,
|
||||
FLAG_SYS_FACTORY_SILVER,
|
||||
FLAG_SYS_PIKE_SILVER,
|
||||
FLAG_SYS_PYRAMID_SILVER
|
||||
};
|
||||
|
||||
// TODO: Figure out what these are, and define constants in include/vars.h
|
||||
@@ -823,7 +823,7 @@ u8 FindAnyTVShowOnTheAir(void)
|
||||
|
||||
void UpdateTVScreensOnMap(int width, int height)
|
||||
{
|
||||
FlagSet(SYS_TV_WATCH);
|
||||
FlagSet(FLAG_SYS_TV_WATCH);
|
||||
switch (CheckForBigMovieOrEmergencyNewsOnTV())
|
||||
{
|
||||
case 1:
|
||||
@@ -836,9 +836,9 @@ void UpdateTVScreensOnMap(int width, int height)
|
||||
{
|
||||
SetTVMetatilesOnMap(width, height, 0x3);
|
||||
}
|
||||
else if (FlagGet(SYS_TV_START) && (FindAnyTVShowOnTheAir() != 0xff || FindAnyTVNewsOnTheAir() != 0xff || IsTVShowInSearchOfTrainersAiring()))
|
||||
else if (FlagGet(FLAG_SYS_TV_START) && (FindAnyTVShowOnTheAir() != 0xff || FindAnyTVNewsOnTheAir() != 0xff || IsTVShowInSearchOfTrainersAiring()))
|
||||
{
|
||||
FlagClear(SYS_TV_WATCH);
|
||||
FlagClear(FLAG_SYS_TV_WATCH);
|
||||
SetTVMetatilesOnMap(width, height, 0x3);
|
||||
}
|
||||
break;
|
||||
@@ -1288,7 +1288,7 @@ void PutBattleUpdateOnTheAir(u8 a0, u16 a1, u16 a2, u16 a3)
|
||||
if (sCurTVShowSlot != -1)
|
||||
{
|
||||
FindActiveBroadcastByShowType_SetScriptResult(TVSHOW_BATTLE_UPDATE);
|
||||
if (gScriptResult != 1)
|
||||
if (gSpecialVar_ScriptResult != 1)
|
||||
{
|
||||
show = &gSaveBlock1Ptr->tvShows[sCurTVShowSlot];
|
||||
show->battleUpdate.kind = TVSHOW_BATTLE_UPDATE;
|
||||
@@ -1337,7 +1337,7 @@ bool8 Put3CheersForPokeblocksOnTheAir(const u8 *partnersName, u8 flavor, u8 unus
|
||||
return FALSE;
|
||||
}
|
||||
FindActiveBroadcastByShowType_SetScriptResult(TVSHOW_3_CHEERS_FOR_POKEBLOCKS);
|
||||
if (gScriptResult == 1)
|
||||
if (gSpecialVar_ScriptResult == 1)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1606,7 +1606,7 @@ void PutNameRaterShowOnTheAir(void)
|
||||
TVShow *show;
|
||||
|
||||
InterviewBefore_NameRater();
|
||||
if (gScriptResult != 1)
|
||||
if (gSpecialVar_ScriptResult != 1)
|
||||
{
|
||||
GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_NICKNAME, gStringVar1);
|
||||
if (StringLength(gSaveBlock2Ptr->playerName) > 1 && StringLength(gStringVar1) > 1)
|
||||
@@ -1653,7 +1653,7 @@ void PutLilycoveContestLadyShowOnTheAir(void)
|
||||
TVShow *show;
|
||||
|
||||
sub_80EFA88();
|
||||
if (gScriptResult != TRUE)
|
||||
if (gSpecialVar_ScriptResult != TRUE)
|
||||
{
|
||||
show = &gSaveBlock1Ptr->tvShows[sCurTVShowSlot];
|
||||
sub_818E848(&show->contestLiveUpdates2.language);
|
||||
@@ -1731,7 +1731,7 @@ void sub_80ED718(void)
|
||||
u16 outbreakIdx;
|
||||
TVShow *show;
|
||||
|
||||
if (FlagGet(SYS_GAME_CLEAR))
|
||||
if (FlagGet(FLAG_SYS_GAME_CLEAR))
|
||||
{
|
||||
for (i = 0; i < 24; i ++)
|
||||
{
|
||||
@@ -1943,7 +1943,7 @@ void sub_80EDB44(void)
|
||||
show = &gSaveBlock1Ptr->tvShows[sCurTVShowSlot];
|
||||
show->rivalTrainer.kind = TVSHOW_TODAYS_RIVAL_TRAINER;
|
||||
show->rivalTrainer.active = FALSE;
|
||||
for (i = BADGE01_GET, nBadges = 0; i < BADGE01_GET + 8; i ++)
|
||||
for (i = FLAG_BADGE01_GET, nBadges = 0; i < FLAG_BADGE01_GET + 8; i ++)
|
||||
{
|
||||
if (FlagGet(i))
|
||||
{
|
||||
@@ -2613,7 +2613,7 @@ bool8 sub_80EE7C0(void)
|
||||
return TRUE;
|
||||
}
|
||||
FindActiveBroadcastByShowType_SetScriptResult(TVSHOW_FAN_CLUB_SPECIAL);
|
||||
if (gScriptResult == TRUE)
|
||||
if (gSpecialVar_ScriptResult == TRUE)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@@ -2814,7 +2814,7 @@ void sub_80EED88(void)
|
||||
{
|
||||
u8 newsKind;
|
||||
|
||||
if (FlagGet(SYS_GAME_CLEAR))
|
||||
if (FlagGet(FLAG_SYS_GAME_CLEAR))
|
||||
{
|
||||
sCurTVShowSlot = sub_80EEE30(gSaveBlock1Ptr->pokeNews);
|
||||
if (sCurTVShowSlot != -1 && rbernoulli(1, 100) != TRUE)
|
||||
@@ -2905,7 +2905,7 @@ void DoPokeNews(void)
|
||||
i = FindAnyTVNewsOnTheAir();
|
||||
if (i == 0xFF)
|
||||
{
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2928,7 +2928,7 @@ void DoPokeNews(void)
|
||||
gSaveBlock1Ptr->pokeNews[i].state = 0;
|
||||
ShowFieldMessage(sPokeNewsTextGroup_Upcoming[gSaveBlock1Ptr->pokeNews[i].kind]);
|
||||
}
|
||||
gScriptResult = TRUE;
|
||||
gSpecialVar_ScriptResult = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2959,7 +2959,7 @@ bool8 IsPriceDiscounted(u8 newsKind)
|
||||
switch (newsKind)
|
||||
{
|
||||
case POKENEWS_SLATEPORT:
|
||||
if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP_SLATEPORT_CITY && gSaveBlock1Ptr->location.mapNum == MAP_ID_SLATEPORT_CITY && gScriptLastTalked == 25)
|
||||
if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP_SLATEPORT_CITY && gSaveBlock1Ptr->location.mapNum == MAP_ID_SLATEPORT_CITY && gSpecialVar_ScriptLastTalked == 25)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@@ -3005,7 +3005,7 @@ void sub_80EF120(u16 days)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gSaveBlock1Ptr->pokeNews[i].state == 0 && FlagGet(SYS_GAME_CLEAR) == TRUE)
|
||||
if (gSaveBlock1Ptr->pokeNews[i].state == 0 && FlagGet(FLAG_SYS_GAME_CLEAR) == TRUE)
|
||||
{
|
||||
gSaveBlock1Ptr->pokeNews[i].state = 1;
|
||||
}
|
||||
@@ -3189,7 +3189,7 @@ void FindActiveBroadcastByShowType_SetScriptResult(u8 kind)
|
||||
{
|
||||
if (gSaveBlock1Ptr->tvShows[i].common.active == TRUE)
|
||||
{
|
||||
gScriptResult = TRUE;
|
||||
gSpecialVar_ScriptResult = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3205,7 +3205,7 @@ void FindActiveBroadcastByShowType_SetScriptResult(u8 kind)
|
||||
|
||||
void InterviewBefore(void)
|
||||
{
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
switch (gSpecialVar_0x8005)
|
||||
{
|
||||
case TVSHOW_FAN_CLUB_LETTER:
|
||||
@@ -3244,7 +3244,7 @@ void InterviewBefore(void)
|
||||
void InterviewBefore_FanClubLetter(void)
|
||||
{
|
||||
FindActiveBroadcastByShowType_SetScriptResult(TVSHOW_FAN_CLUB_LETTER);
|
||||
if (!gScriptResult)
|
||||
if (!gSpecialVar_ScriptResult)
|
||||
{
|
||||
StringCopy(gStringVar1, gSpeciesNames[GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_SPECIES, NULL)]);
|
||||
InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanclubLetter.words, 6);
|
||||
@@ -3254,7 +3254,7 @@ void InterviewBefore_FanClubLetter(void)
|
||||
void InterviewBefore_RecentHappenings(void)
|
||||
{
|
||||
FindActiveBroadcastByShowType_SetScriptResult(TVSHOW_RECENT_HAPPENINGS);
|
||||
if (!gScriptResult)
|
||||
if (!gSpecialVar_ScriptResult)
|
||||
{
|
||||
InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].recentHappenings.words, 6);
|
||||
}
|
||||
@@ -3263,7 +3263,7 @@ void InterviewBefore_RecentHappenings(void)
|
||||
void InterviewBefore_PkmnFanClubOpinions(void)
|
||||
{
|
||||
FindActiveBroadcastByShowType_SetScriptResult(TVSHOW_PKMN_FAN_CLUB_OPINIONS);
|
||||
if (!gScriptResult)
|
||||
if (!gSpecialVar_ScriptResult)
|
||||
{
|
||||
StringCopy(gStringVar1, gSpeciesNames[GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_SPECIES, NULL)]);
|
||||
GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_NICKNAME, gStringVar2);
|
||||
@@ -3274,7 +3274,7 @@ void InterviewBefore_PkmnFanClubOpinions(void)
|
||||
|
||||
void InterviewBefore_Dummy(void)
|
||||
{
|
||||
gScriptResult = TRUE;
|
||||
gSpecialVar_ScriptResult = TRUE;
|
||||
}
|
||||
|
||||
void InterviewBefore_NameRater(void)
|
||||
@@ -3285,7 +3285,7 @@ void InterviewBefore_NameRater(void)
|
||||
void InterviewBefore_BravoTrainerPkmnProfile(void)
|
||||
{
|
||||
FindActiveBroadcastByShowType_SetScriptResult(TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE);
|
||||
if (!gScriptResult)
|
||||
if (!gSpecialVar_ScriptResult)
|
||||
{
|
||||
InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].bravoTrainer.words, 2);
|
||||
}
|
||||
@@ -3304,7 +3304,7 @@ void InterviewBefore_3CheersForPokeblocks(void)
|
||||
void InterviewBefore_BravoTrainerBTProfile(void)
|
||||
{
|
||||
FindActiveBroadcastByShowType_SetScriptResult(TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE);
|
||||
if (!gScriptResult)
|
||||
if (!gSpecialVar_ScriptResult)
|
||||
{
|
||||
InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].bravoTrainerTower.words, 1);
|
||||
}
|
||||
@@ -3313,7 +3313,7 @@ void InterviewBefore_BravoTrainerBTProfile(void)
|
||||
void InterviewBefore_FanClubSpecial(void)
|
||||
{
|
||||
FindActiveBroadcastByShowType_SetScriptResult(TVSHOW_FAN_CLUB_SPECIAL);
|
||||
if (!gScriptResult)
|
||||
if (!gSpecialVar_ScriptResult)
|
||||
{
|
||||
InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanClubSpecial.words, 1);
|
||||
}
|
||||
@@ -3429,11 +3429,11 @@ void sub_80EFA88(void)
|
||||
gSpecialVar_0x8006 = sCurTVShowSlot;
|
||||
if (sCurTVShowSlot == -1)
|
||||
{
|
||||
gScriptResult = TRUE;
|
||||
gSpecialVar_ScriptResult = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3636,7 +3636,7 @@ void ChangeBoxPokemonNickname(void)
|
||||
{
|
||||
struct BoxPokemon *boxMon;
|
||||
|
||||
boxMon = GetBoxedMonPtr(gSpecialVar_0x8012, gSpecialVar_0x8013);
|
||||
boxMon = GetBoxedMonPtr(gSpecialVar_MonBoxId, gSpecialVar_MonBoxPos);
|
||||
GetBoxMonData(boxMon, MON_DATA_NICKNAME, gStringVar3);
|
||||
GetBoxMonData(boxMon, MON_DATA_NICKNAME, gStringVar2);
|
||||
DoNamingScreen(3, gStringVar2, GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL), GetBoxMonGender(boxMon), GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL), ChangeBoxPokemonNickname_CB);
|
||||
@@ -3644,7 +3644,7 @@ void ChangeBoxPokemonNickname(void)
|
||||
|
||||
void ChangeBoxPokemonNickname_CB(void)
|
||||
{
|
||||
SetBoxMonNickFromAnyBox(gSpecialVar_0x8012, gSpecialVar_0x8013, gStringVar2);
|
||||
SetBoxMonNickFromAnyBox(gSpecialVar_MonBoxId, gSpecialVar_MonBoxPos, gStringVar2);
|
||||
c2_exit_to_overworld_1_continue_scripts_restart_music();
|
||||
}
|
||||
|
||||
@@ -3658,11 +3658,11 @@ void TV_CheckMonOTIDEqualsPlayerID(void)
|
||||
{
|
||||
if (GetPlayerIDAsU32() == GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_OT_ID, NULL))
|
||||
{
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
gScriptResult = TRUE;
|
||||
gSpecialVar_ScriptResult = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3712,11 +3712,11 @@ u8 CheckForBigMovieOrEmergencyNewsOnTV(void)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (FlagGet(SYS_TV_LATI) == TRUE)
|
||||
if (FlagGet(FLAG_SYS_TV_LATI) == TRUE)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (FlagGet(SYS_TV_HOME) == TRUE)
|
||||
if (FlagGet(FLAG_SYS_TV_HOME) == TRUE)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
@@ -4561,7 +4561,7 @@ void sub_80F0B64(void)
|
||||
{
|
||||
u16 i;
|
||||
|
||||
if (FlagGet(SYS_GAME_CLEAR) != TRUE)
|
||||
if (FlagGet(FLAG_SYS_GAME_CLEAR) != TRUE)
|
||||
{
|
||||
for (i = 0; i < 24; i ++)
|
||||
{
|
||||
@@ -4736,7 +4736,7 @@ void sub_80F0F24(void)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
if (FlagGet(SYS_GAME_CLEAR) != TRUE)
|
||||
if (FlagGet(FLAG_SYS_GAME_CLEAR) != TRUE)
|
||||
{
|
||||
for (i = 0; i < 16; i ++)
|
||||
{
|
||||
@@ -5108,7 +5108,7 @@ void DoTVShowBravoTrainerPokemonProfile(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -5180,7 +5180,7 @@ void DoTVShowBravoTrainerBattleTower(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch(state)
|
||||
{
|
||||
@@ -5277,7 +5277,7 @@ void DoTVShowTodaysSmartShopper(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch(state)
|
||||
{
|
||||
@@ -5400,7 +5400,7 @@ void DoTVShowTheNameRaterShow(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -5498,7 +5498,7 @@ void DoTVShowPokemonTodaySuccessfulCapture(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -5576,7 +5576,7 @@ void DoTVShowPokemonTodayFailedCapture(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -5630,7 +5630,7 @@ void DoTVShowPokemonFanClubLetter(void)
|
||||
u16 rval;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -5683,7 +5683,7 @@ void DoTVShowRecentHappenings(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -5718,7 +5718,7 @@ void DoTVShowPokemonFanClubOpinions(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -5768,7 +5768,7 @@ void DoTVShowPokemonContestLiveUpdates(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6115,7 +6115,7 @@ void DoTVShowPokemonBattleUpdate(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6187,7 +6187,7 @@ void DoTVShow3CheersForPokeblocks(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6288,7 +6288,7 @@ void DoTVShowInSearchOfTrainers(void)
|
||||
{
|
||||
u8 state;
|
||||
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6344,7 +6344,7 @@ void DoTVShowInSearchOfTrainers(void)
|
||||
CopyEasyChatWord(gStringVar1, gSaveBlock1Ptr->gabbyAndTyData.quote[0]);
|
||||
StringCopy(gStringVar2, gSpeciesNames[gSaveBlock1Ptr->gabbyAndTyData.mon1]);
|
||||
StringCopy(gStringVar3, gSpeciesNames[gSaveBlock1Ptr->gabbyAndTyData.mon2]);
|
||||
gScriptResult = TRUE;
|
||||
gSpecialVar_ScriptResult = TRUE;
|
||||
sTVShowState = 0;
|
||||
TakeTVShowInSearchOfTrainersOffTheAir();
|
||||
break;
|
||||
@@ -6358,7 +6358,7 @@ void DoTVShowPokemonAngler(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
if (show->pokemonAngler.nBites < show->pokemonAngler.nFails)
|
||||
{
|
||||
sTVShowState = 0;
|
||||
@@ -6392,7 +6392,7 @@ void DoTVShowTheWorldOfMasters(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6422,7 +6422,7 @@ void DoTVShowTodaysRivalTrainer(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6571,7 +6571,7 @@ void DoTVShowDewfordTrendWatcherNetwork(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6627,7 +6627,7 @@ void DoTVShowHoennTreasureInvestigators(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6671,7 +6671,7 @@ void DoTVShowFindThatGamer(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6745,7 +6745,7 @@ void DoTVShowBreakingNewsTV(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6848,7 +6848,7 @@ void DoTVShowSecretBaseVisit(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6944,7 +6944,7 @@ void DoTVShowPokemonLotteryWinnerFlashReport(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
TVShowConvertInternationalString(gStringVar1, show->lottoWinner.playerName, show->lottoWinner.language);
|
||||
if (show->lottoWinner.whichPrize == 0)
|
||||
@@ -6974,7 +6974,7 @@ void DoTVShowThePokemonBattleSeminar(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -7038,7 +7038,7 @@ void DoTVShowTrainerFanClubSpecial(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -7104,7 +7104,7 @@ void DoTVShowTrainerFanClub(void)
|
||||
u32 playerId;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -7191,7 +7191,7 @@ void DoTVShowSpotTheCuties(void)
|
||||
u32 playerId;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -7296,7 +7296,7 @@ void DoTVShowPokemonNewsBattleFrontier(void)
|
||||
u32 playerId;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -7445,7 +7445,7 @@ void DoTVShowWhatsNo1InHoennToday(void)
|
||||
u32 playerId;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -7561,7 +7561,7 @@ void DoTVShowSecretBaseSecrets(void)
|
||||
u16 i;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -7797,7 +7797,7 @@ void DoTVShowSafariFanClub(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -7884,7 +7884,7 @@ void DoTVShowPokemonContestLiveUpdates2(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gScriptResult = FALSE;
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -7916,7 +7916,7 @@ void DoTVShowPokemonContestLiveUpdates2(void)
|
||||
|
||||
void TVShowDone(void)
|
||||
{
|
||||
gScriptResult = TRUE;
|
||||
gSpecialVar_ScriptResult = TRUE;
|
||||
sTVShowState = 0;
|
||||
gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004].common.active = FALSE;
|
||||
}
|
||||
|
||||
@@ -98,17 +98,17 @@ u16 TryGetWallpaperWithWaldaPhrase(void)
|
||||
u16 backgroundClr, foregroundClr;
|
||||
u8 patternId, iconId;
|
||||
u16 trainerId = ReadUnalignedWord(gSaveBlock2Ptr->playerTrainerId);
|
||||
gScriptResult = TryCalculateWallpaper(&backgroundClr, &foregroundClr, &iconId, &patternId, trainerId, GetWaldaPhrasePtr());
|
||||
gSpecialVar_ScriptResult = TryCalculateWallpaper(&backgroundClr, &foregroundClr, &iconId, &patternId, trainerId, GetWaldaPhrasePtr());
|
||||
|
||||
if (gScriptResult)
|
||||
if (gSpecialVar_ScriptResult)
|
||||
{
|
||||
SetWaldaWallpaperPatternId(patternId);
|
||||
SetWaldaWallpaperIconId(iconId);
|
||||
SetWaldaWallpaperColors(backgroundClr, foregroundClr);
|
||||
}
|
||||
|
||||
SetWaldaWallpaperLockedOrUnlocked(gScriptResult);
|
||||
return (bool8)(gScriptResult);
|
||||
SetWaldaWallpaperLockedOrUnlocked(gSpecialVar_ScriptResult);
|
||||
return (bool8)(gSpecialVar_ScriptResult);
|
||||
}
|
||||
|
||||
static u8 GetLetterTableId(u8 letter)
|
||||
|
||||
Reference in New Issue
Block a user