Extract baseroms from event_scripts
This commit is contained in:
@@ -1611,7 +1611,7 @@ void BattleMainCB2(void)
|
||||
|
||||
if (gMain.heldKeys & B_BUTTON && gBattleTypeFlags & BATTLE_TYPE_RECORDED && sub_8186450())
|
||||
{
|
||||
gSpecialVar_ScriptResult = gBattleOutcome = BATTLE_PLAYER_TELEPORTED;
|
||||
gSpecialVar_Result = gBattleOutcome = BATTLE_PLAYER_TELEPORTED;
|
||||
ResetPaletteFadeControl();
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
SetMainCallback2(CB2_QuitRecordedBattle);
|
||||
@@ -4750,7 +4750,7 @@ static void HandleEndTurn_BattleWon(void)
|
||||
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))
|
||||
{
|
||||
gSpecialVar_ScriptResult = gBattleOutcome;
|
||||
gSpecialVar_Result = gBattleOutcome;
|
||||
gBattleTextBuff1[0] = gBattleOutcome;
|
||||
gBankAttacker = GetBankByIdentity(IDENTITY_PLAYER_MON1);
|
||||
gBattlescriptCurrInstr = BattleScript_LinkBattleWonOrLost;
|
||||
@@ -5012,7 +5012,7 @@ static void ReturnFromBattleToOverworld(void)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_LINK && gReceivedRemoteLinkPlayers != 0)
|
||||
return;
|
||||
|
||||
gSpecialVar_ScriptResult = gBattleOutcome;
|
||||
gSpecialVar_Result = gBattleOutcome;
|
||||
gMain.inBattle = 0;
|
||||
gMain.callback1 = gPreBattleCallback1;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ extern u8 gBattleBufferA[BATTLE_BANKS_COUNT][0x200];
|
||||
extern u8 gBattleBufferB[BATTLE_BANKS_COUNT][0x200];
|
||||
extern struct BattlePokemon gBattleMons[BATTLE_BANKS_COUNT];
|
||||
extern struct SpriteTemplate gUnknown_0202499C;
|
||||
extern u16 gScriptItemId;
|
||||
extern u16 gSpecialVar_ItemId;
|
||||
extern u8 gHealthBoxesIds[BATTLE_BANKS_COUNT];
|
||||
extern u8 gBattleOutcome;
|
||||
extern u16 gBattle_BG0_X;
|
||||
|
||||
@@ -36,7 +36,7 @@ extern u8 gBattleBufferA[BATTLE_BANKS_COUNT][0x200];
|
||||
extern u8 gBattleBufferB[BATTLE_BANKS_COUNT][0x200];
|
||||
extern struct BattlePokemon gBattleMons[BATTLE_BANKS_COUNT];
|
||||
extern struct SpriteTemplate gUnknown_0202499C;
|
||||
extern u16 gScriptItemId;
|
||||
extern u16 gSpecialVar_ItemId;
|
||||
extern u8 gHealthBoxesIds[BATTLE_BANKS_COUNT];
|
||||
extern u8 gBattleOutcome;
|
||||
extern u16 gBattle_BG0_X;
|
||||
|
||||
@@ -46,7 +46,7 @@ extern struct MusicPlayerInfo gMPlay_BGM;
|
||||
extern u16 gPartnerTrainerId;
|
||||
extern struct SpriteTemplate gUnknown_0202499C;
|
||||
extern u8 gBattleMonForms[BATTLE_BANKS_COUNT];
|
||||
extern u16 gScriptItemId;
|
||||
extern u16 gSpecialVar_ItemId;
|
||||
extern u8 gUnknown_0203CEE8;
|
||||
extern u8 gUnknown_0203CEE9;
|
||||
extern u8 gUnknown_0203CF00[];
|
||||
@@ -1416,7 +1416,7 @@ static void CompleteWhenChoseItem(void)
|
||||
{
|
||||
if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active)
|
||||
{
|
||||
EmitOneReturnValue(1, gScriptItemId);
|
||||
EmitOneReturnValue(1, gSpecialVar_ItemId);
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ extern u8 gBattleBufferA[BATTLE_BANKS_COUNT][0x200];
|
||||
extern u8 gBattleBufferB[BATTLE_BANKS_COUNT][0x200];
|
||||
extern struct BattlePokemon gBattleMons[BATTLE_BANKS_COUNT];
|
||||
extern struct SpriteTemplate gUnknown_0202499C;
|
||||
extern u16 gScriptItemId;
|
||||
extern u16 gSpecialVar_ItemId;
|
||||
extern u8 gHealthBoxesIds[BATTLE_BANKS_COUNT];
|
||||
extern u8 gBattleOutcome;
|
||||
extern u16 gBattle_BG0_X;
|
||||
|
||||
@@ -37,7 +37,7 @@ extern u8 gBattleBufferA[BATTLE_BANKS_COUNT][0x200];
|
||||
extern u8 gBattleBufferB[BATTLE_BANKS_COUNT][0x200];
|
||||
extern struct BattlePokemon gBattleMons[BATTLE_BANKS_COUNT];
|
||||
extern struct SpriteTemplate gUnknown_0202499C;
|
||||
extern u16 gScriptItemId;
|
||||
extern u16 gSpecialVar_ItemId;
|
||||
extern u8 gHealthBoxesIds[BATTLE_BANKS_COUNT];
|
||||
extern u8 gBattleOutcome;
|
||||
extern u16 gBattle_BG0_X;
|
||||
|
||||
@@ -36,7 +36,7 @@ extern u8 gBattleBufferA[BATTLE_BANKS_COUNT][0x200];
|
||||
extern u8 gBattleBufferB[BATTLE_BANKS_COUNT][0x200];
|
||||
extern struct BattlePokemon gBattleMons[BATTLE_BANKS_COUNT];
|
||||
extern struct SpriteTemplate gUnknown_0202499C;
|
||||
extern u16 gScriptItemId;
|
||||
extern u16 gSpecialVar_ItemId;
|
||||
extern u8 gHealthBoxesIds[BATTLE_BANKS_COUNT];
|
||||
extern u8 gBattleOutcome;
|
||||
extern u16 gBattle_BG0_X;
|
||||
|
||||
@@ -33,7 +33,7 @@ extern u8 gBattleBufferA[BATTLE_BANKS_COUNT][0x200];
|
||||
extern u8 gBattleBufferB[BATTLE_BANKS_COUNT][0x200];
|
||||
extern struct BattlePokemon gBattleMons[BATTLE_BANKS_COUNT];
|
||||
extern struct SpriteTemplate gUnknown_0202499C;
|
||||
extern u16 gScriptItemId;
|
||||
extern u16 gSpecialVar_ItemId;
|
||||
extern u8 gHealthBoxesIds[BATTLE_BANKS_COUNT];
|
||||
extern u8 gBattleOutcome;
|
||||
extern u16 gBattle_BG0_X;
|
||||
@@ -305,7 +305,7 @@ static void CompleteWhenChosePokeblock(void)
|
||||
{
|
||||
if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active)
|
||||
{
|
||||
EmitOneReturnValue(1, gScriptItemId);
|
||||
EmitOneReturnValue(1, gSpecialVar_ItemId);
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ extern struct MusicPlayerInfo gMPlay_BGM;
|
||||
extern u16 gPartnerTrainerId;
|
||||
extern struct SpriteTemplate gUnknown_0202499C;
|
||||
extern u8 gBattleMonForms[BATTLE_BANKS_COUNT];
|
||||
extern u16 gScriptItemId;
|
||||
extern u16 gSpecialVar_ItemId;
|
||||
extern u8 gUnknown_03005D7C[BATTLE_BANKS_COUNT];
|
||||
extern u8 gHealthBoxesIds[BATTLE_BANKS_COUNT];
|
||||
extern u8 gBattleOutcome;
|
||||
@@ -314,7 +314,7 @@ static void CompleteOnChosenItem(void)
|
||||
{
|
||||
if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active)
|
||||
{
|
||||
EmitOneReturnValue(1, gScriptItemId);
|
||||
EmitOneReturnValue(1, gSpecialVar_ItemId);
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ extern void CB2_ChooseBerry(void);
|
||||
extern const u8* GetFieldObjectScriptPointerForComparison(void);
|
||||
extern bool8 sub_8092E9C(u8, u8, u8);
|
||||
|
||||
extern u16 gScriptItemId;
|
||||
extern u16 gSpecialVar_ItemId;
|
||||
|
||||
extern const u8 BerryTreeScript[];
|
||||
|
||||
@@ -1169,7 +1169,7 @@ void FieldObjectInteractionGetBerryTreeData(void)
|
||||
id = FieldObjectGetBerryTreeId(gSelectedMapObject);
|
||||
berry = GetBerryTypeByBerryTreeId(id);
|
||||
ResetBerryTreeSparkleFlag(id);
|
||||
unk = gSpecialVar_ScriptLastTalked;
|
||||
unk = gSpecialVar_LastTalked;
|
||||
num = gSaveBlock1Ptr->location.mapNum;
|
||||
group = gSaveBlock1Ptr->location.mapGroup;
|
||||
if (sub_8092E9C(unk, num, group))
|
||||
@@ -1202,7 +1202,7 @@ void Bag_ChooseBerry(void)
|
||||
|
||||
void FieldObjectInteractionPlantBerryTree(void)
|
||||
{
|
||||
u8 berry = ItemIdToBerryType(gScriptItemId);
|
||||
u8 berry = ItemIdToBerryType(gSpecialVar_ItemId);
|
||||
|
||||
PlantBerryTree(FieldObjectGetBerryTreeId(gSelectedMapObject), berry, 1, TRUE);
|
||||
FieldObjectInteractionGetBerryTreeData();
|
||||
@@ -1219,7 +1219,7 @@ void FieldObjectInteractionPickBerryTree(void)
|
||||
void FieldObjectInteractionRemoveBerryTree(void)
|
||||
{
|
||||
RemoveBerryTree(FieldObjectGetBerryTreeId(gSelectedMapObject));
|
||||
sub_8092EF0(gSpecialVar_ScriptLastTalked, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
||||
sub_8092EF0(gSpecialVar_LastTalked, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
||||
}
|
||||
|
||||
u8 PlayerHasBerries(void)
|
||||
|
||||
@@ -1600,7 +1600,7 @@ void sub_81289F0(u8 taskId)
|
||||
{
|
||||
sCurDecorMapX = gTasks[taskId].data[0] - 7;
|
||||
sCurDecorMapY = gTasks[taskId].data[1] - 7;
|
||||
ScriptContext1_SetupScript(gUnknown_08275D1F);
|
||||
ScriptContext1_SetupScript(EventScript_275D1F);
|
||||
}
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].pos1.y += 2;
|
||||
if (gMapHeader.regionMapSectionId == REGION_MAP_SECRET_BASE)
|
||||
@@ -1700,7 +1700,7 @@ void sub_8128C64(u8 taskId)
|
||||
data[2] ++;
|
||||
break;
|
||||
case 1:
|
||||
ScriptContext1_SetupScript(gUnknown_08275D0C);
|
||||
ScriptContext1_SetupScript(EventScript_275D0C);
|
||||
data[2] ++;
|
||||
break;
|
||||
case 2:
|
||||
@@ -2133,10 +2133,10 @@ void sub_8129708(void)
|
||||
u16 i;
|
||||
|
||||
gSpecialVar_0x8005 = 0;
|
||||
gSpecialVar_ScriptResult = 0;
|
||||
gSpecialVar_Result = 0;
|
||||
if (gSpecialVar_0x8004 == sCurDecorSelectedInRearrangement)
|
||||
{
|
||||
gSpecialVar_ScriptResult = 1;
|
||||
gSpecialVar_Result = 1;
|
||||
}
|
||||
else if (gDecorations[gUnknown_0203A17C.items[sDecorRearrangementDataBuffer[gSpecialVar_0x8004].idx]].permission == DECORPERM_SOLID_MAT)
|
||||
{
|
||||
@@ -2206,7 +2206,7 @@ void sub_81298EC(u8 taskId)
|
||||
case 1:
|
||||
if (!gPaletteFade.active) {
|
||||
DrawWholeMapView();
|
||||
ScriptContext1_SetupScript(gUnknown_08275D2E);
|
||||
ScriptContext1_SetupScript(EventScript_275D2E);
|
||||
sub_8197434(0, 1);
|
||||
gTasks[taskId].data[2] = 2;
|
||||
}
|
||||
@@ -2691,7 +2691,7 @@ void sub_812A2C4(u8 taskId)
|
||||
data[2] ++;
|
||||
break;
|
||||
case 1:
|
||||
ScriptContext1_SetupScript(gUnknown_08275D0C);
|
||||
ScriptContext1_SetupScript(EventScript_275D0C);
|
||||
data[2] ++;
|
||||
break;
|
||||
case 2:
|
||||
|
||||
@@ -17,9 +17,9 @@ 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 gSpecialVar_ScriptResult = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_ScriptLastTalked = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_ScriptFacing = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_Result = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_LastTalked = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_Facing = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_MonBoxId = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_MonBoxPos = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_0x8014 = 0;
|
||||
|
||||
@@ -1765,10 +1765,10 @@ void sub_808F28C(u8 localId, u8 mapNum, u8 mapGroup, u8 decorCat)
|
||||
switch (decorCat)
|
||||
{
|
||||
case DECORCAT_DOLL:
|
||||
sub_808F228(&gMapObjects[mapObjectId], gUnknown_082766A2);
|
||||
sub_808F228(&gMapObjects[mapObjectId], EventScript_2766A2);
|
||||
break;
|
||||
case DECORCAT_CUSHION:
|
||||
sub_808F228(&gMapObjects[mapObjectId], gUnknown_082766A6);
|
||||
sub_808F228(&gMapObjects[mapObjectId], EventScript_2766A6);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,11 +165,11 @@ bool8 HasAtLeastOneBerry(void)
|
||||
{
|
||||
if (CheckBagHasItem(i, 1) == TRUE)
|
||||
{
|
||||
gSpecialVar_ScriptResult = 1;
|
||||
gSpecialVar_Result = 1;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
gSpecialVar_ScriptResult = 0;
|
||||
gSpecialVar_Result = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@ static EWRAM_DATA struct LilycoveLadyFavour *gUnknown_0203CD64 = NULL;
|
||||
static EWRAM_DATA struct LilycoveLadyQuiz *gUnknown_0203CD68 = NULL;
|
||||
static EWRAM_DATA struct LilycoveLadyContest *gUnknown_0203CD6C = NULL;
|
||||
|
||||
extern EWRAM_DATA u16 gScriptItemId;
|
||||
extern EWRAM_DATA u16 gSpecialVar_ItemId;
|
||||
|
||||
u8 GetLilycoveLadyId(void)
|
||||
{
|
||||
@@ -242,11 +242,11 @@ void sub_818D9C0(void)
|
||||
{
|
||||
lilycoveLady = &gSaveBlock1Ptr->lilycoveLady;
|
||||
VarSet(VAR_0x4011, gUnknown_0860B074[lilycoveLady->contest.category]);
|
||||
gSpecialVar_ScriptResult = TRUE;
|
||||
gSpecialVar_Result = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ void SetLilycoveLadyRandomly(void)
|
||||
|
||||
void sub_818DAEC(void)
|
||||
{
|
||||
gSpecialVar_ScriptResult = GetLilycoveLadyId();
|
||||
gSpecialVar_Result = GetLilycoveLadyId();
|
||||
}
|
||||
|
||||
static u8 sub_818DB04(const u16 *data)
|
||||
@@ -459,7 +459,7 @@ static bool8 sub_818DD84(u16 itemId)
|
||||
|
||||
bool8 sub_818DE44(void)
|
||||
{
|
||||
return sub_818DD84(gScriptItemId);
|
||||
return sub_818DD84(gSpecialVar_ItemId);
|
||||
}
|
||||
|
||||
bool8 sub_818DE5C(void)
|
||||
@@ -845,7 +845,7 @@ void sub_818E47C(void)
|
||||
|
||||
void sub_818E490(void)
|
||||
{
|
||||
RemoveBagItem(gScriptItemId, 1);
|
||||
RemoveBagItem(gSpecialVar_ItemId, 1);
|
||||
}
|
||||
|
||||
void sub_818E4A4(void)
|
||||
@@ -853,7 +853,7 @@ void sub_818E4A4(void)
|
||||
u8 i;
|
||||
|
||||
gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
||||
gUnknown_0203CD68->itemId = gScriptItemId;
|
||||
gUnknown_0203CD68->itemId = gSpecialVar_ItemId;
|
||||
for (i = 0; i < 4; i ++)
|
||||
{
|
||||
gUnknown_0203CD68->playerTrainerId[i] = gSaveBlock2Ptr->playerTrainerId[i];
|
||||
|
||||
@@ -42,7 +42,7 @@ void SetRandomLotteryNumber(u16 i)
|
||||
void RetrieveLotteryNumber(void)
|
||||
{
|
||||
u16 lottoNumber = GetLotteryNumber();
|
||||
gSpecialVar_ScriptResult = lottoNumber;
|
||||
gSpecialVar_Result = 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(gSpecialVar_ScriptResult, otId);
|
||||
u8 numMatchingDigits = GetMatchingDigits(gSpecialVar_Result, 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(gSpecialVar_ScriptResult, otId);
|
||||
u8 numMatchingDigits = GetMatchingDigits(gSpecialVar_Result, otId);
|
||||
|
||||
if (numMatchingDigits > gSpecialVar_0x8004 && numMatchingDigits > 1)
|
||||
{
|
||||
|
||||
@@ -59,7 +59,7 @@ extern void ResetContestLinkResults(void);
|
||||
extern void ResetPokeJumpResults(void);
|
||||
extern void SetBerryPowder(u32* powder, u32 newValue);
|
||||
|
||||
extern u8 gUnknown_082715DE[];
|
||||
extern u8 EventScript_2715DE[];
|
||||
|
||||
void WriteUnalignedWord(u32 var, u8 *dataPtr)
|
||||
{
|
||||
@@ -198,7 +198,7 @@ void NewGameInitData(void)
|
||||
ResetFanClub();
|
||||
ResetLotteryCorner();
|
||||
WarpToTruck();
|
||||
ScriptContext2_RunNewScript(gUnknown_082715DE);
|
||||
ScriptContext2_RunNewScript(EventScript_2715DE);
|
||||
ResetMiniGamesResults();
|
||||
copy_strings_to_sav1();
|
||||
SetLilycoveLady();
|
||||
|
||||
@@ -109,13 +109,13 @@ static void FormatMonSizeRecord(u8 *string, u32 size)
|
||||
|
||||
static u8 CompareMonSize(u16 species, u16 *sizeRecord)
|
||||
{
|
||||
if (gSpecialVar_ScriptResult == 0xFF)
|
||||
if (gSpecialVar_Result == 0xFF)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
struct Pokemon *pkmn = &gPlayerParty[gSpecialVar_ScriptResult];
|
||||
struct Pokemon *pkmn = &gPlayerParty[gSpecialVar_Result];
|
||||
|
||||
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);
|
||||
|
||||
gSpecialVar_ScriptResult = CompareMonSize(SPECIES_SEEDOT, sizeRecord);
|
||||
gSpecialVar_Result = CompareMonSize(SPECIES_SEEDOT, sizeRecord);
|
||||
}
|
||||
|
||||
void InitLotadSizeRecord(void)
|
||||
@@ -192,7 +192,7 @@ void CompareLotadSize(void)
|
||||
{
|
||||
u16 *sizeRecord = GetVarPointer(VAR_LOTAD_SIZE_RECORD);
|
||||
|
||||
gSpecialVar_ScriptResult = CompareMonSize(SPECIES_LOTAD, sizeRecord);
|
||||
gSpecialVar_Result = CompareMonSize(SPECIES_LOTAD, sizeRecord);
|
||||
}
|
||||
|
||||
void GiveGiftRibbonToParty(u8 index, u8 ribbonId)
|
||||
|
||||
@@ -20,10 +20,10 @@ struct PokeblockFeeder
|
||||
extern u8 gBattleOutcome;
|
||||
extern void* gFieldCallback;
|
||||
|
||||
extern u8 gUnknown_082A4B8A[];
|
||||
extern u8 gUnknown_082A4B6F[];
|
||||
extern u8 gUnknown_082A4B4C[];
|
||||
extern u8 gUnknown_082A4B9B[];
|
||||
extern u8 EventScript_2A4B8A[];
|
||||
extern u8 EventScript_2A4B6F[];
|
||||
extern u8 EventScript_2A4B4C[];
|
||||
extern u8 EventScript_2A4B9B[];
|
||||
extern const u8* const gPokeblockNames[];
|
||||
|
||||
extern void sub_80EE44C(u8, u8);
|
||||
@@ -94,7 +94,7 @@ bool8 SafariZoneTakeStep(void)
|
||||
sSafariZoneStepCounter--;
|
||||
if (sSafariZoneStepCounter == 0)
|
||||
{
|
||||
ScriptContext1_SetupScript(gUnknown_082A4B8A);
|
||||
ScriptContext1_SetupScript(EventScript_2A4B8A);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
@@ -102,7 +102,7 @@ bool8 SafariZoneTakeStep(void)
|
||||
|
||||
void SafariZoneRetirePrompt(void)
|
||||
{
|
||||
ScriptContext1_SetupScript(gUnknown_082A4B6F);
|
||||
ScriptContext1_SetupScript(EventScript_2A4B6F);
|
||||
}
|
||||
|
||||
void sub_80FC190(void)
|
||||
@@ -116,14 +116,14 @@ void sub_80FC190(void)
|
||||
}
|
||||
else if (gBattleOutcome == BATTLE_SAFARI_OUT_OF_BALLS)
|
||||
{
|
||||
ScriptContext2_RunNewScript(gUnknown_082A4B4C);
|
||||
ScriptContext2_RunNewScript(EventScript_2A4B4C);
|
||||
warp_in();
|
||||
gFieldCallback = sub_80AF6F0;
|
||||
SetMainCallback2(c2_load_new_map);
|
||||
}
|
||||
else if (gBattleOutcome == BATTLE_CAUGHT)
|
||||
{
|
||||
ScriptContext1_SetupScript(gUnknown_082A4B9B);
|
||||
ScriptContext1_SetupScript(EventScript_2A4B9B);
|
||||
ScriptContext1_Stop();
|
||||
SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music);
|
||||
}
|
||||
@@ -152,13 +152,13 @@ void GetPokeblockFeederInFront(void)
|
||||
&& sPokeblockFeeders[i].x == x
|
||||
&& sPokeblockFeeders[i].y == y)
|
||||
{
|
||||
gSpecialVar_ScriptResult = i;
|
||||
gSpecialVar_Result = i;
|
||||
StringCopy(gStringVar1, gPokeblockNames[sPokeblockFeeders[i].pokeblock.color]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
gSpecialVar_ScriptResult = -1;
|
||||
gSpecialVar_Result = -1;
|
||||
}
|
||||
|
||||
void GetPokeblockFeederWithinRange(void)
|
||||
@@ -181,13 +181,13 @@ void GetPokeblockFeederWithinRange(void)
|
||||
y *= -1;
|
||||
if ((x + y) <= 5)
|
||||
{
|
||||
gSpecialVar_ScriptResult = i;
|
||||
gSpecialVar_Result = i;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gSpecialVar_ScriptResult = -1;
|
||||
gSpecialVar_Result = -1;
|
||||
}
|
||||
|
||||
// unused
|
||||
@@ -195,20 +195,20 @@ struct Pokeblock *SafariZoneGetPokeblockInFront(void)
|
||||
{
|
||||
GetPokeblockFeederInFront();
|
||||
|
||||
if (gSpecialVar_ScriptResult == 0xFFFF)
|
||||
if (gSpecialVar_Result == 0xFFFF)
|
||||
return NULL;
|
||||
else
|
||||
return &sPokeblockFeeders[gSpecialVar_ScriptResult].pokeblock;
|
||||
return &sPokeblockFeeders[gSpecialVar_Result].pokeblock;
|
||||
}
|
||||
|
||||
struct Pokeblock *SafariZoneGetActivePokeblock(void)
|
||||
{
|
||||
GetPokeblockFeederWithinRange();
|
||||
|
||||
if (gSpecialVar_ScriptResult == 0xFFFF)
|
||||
if (gSpecialVar_Result == 0xFFFF)
|
||||
return NULL;
|
||||
else
|
||||
return &sPokeblockFeeders[gSpecialVar_ScriptResult].pokeblock;
|
||||
return &sPokeblockFeeders[gSpecialVar_Result].pokeblock;
|
||||
}
|
||||
|
||||
void SafariZoneActivatePokeblockFeeder(u8 pkblId)
|
||||
@@ -255,13 +255,13 @@ bool8 GetInFrontFeederPokeblockAndSteps(void)
|
||||
{
|
||||
GetPokeblockFeederInFront();
|
||||
|
||||
if (gSpecialVar_ScriptResult == 0xFFFF)
|
||||
if (gSpecialVar_Result == 0xFFFF)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ConvertIntToDecimalStringN(gStringVar2,
|
||||
sPokeblockFeeders[gSpecialVar_ScriptResult].stepCounter,
|
||||
sPokeblockFeeders[gSpecialVar_Result].stepCounter,
|
||||
STR_CONV_MODE_LEADING_ZEROS, 3);
|
||||
|
||||
return TRUE;
|
||||
|
||||
56
src/scrcmd.c
56
src/scrcmd.c
@@ -69,9 +69,9 @@ extern u16 gSpecialVar_0x8001;
|
||||
extern u16 gSpecialVar_0x8002;
|
||||
extern u16 gSpecialVar_0x8004;
|
||||
|
||||
extern u16 gSpecialVar_ScriptResult;
|
||||
extern u16 gSpecialVar_Result;
|
||||
|
||||
extern u16 gScriptContestCategory;
|
||||
extern u16 gSpecialVar_ContestCategory;
|
||||
|
||||
IWRAM_DATA u8 gUnknown_03000F30;
|
||||
|
||||
@@ -491,7 +491,7 @@ bool8 ScrCmd_random(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 max = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gSpecialVar_ScriptResult = Random() % max;
|
||||
gSpecialVar_Result = Random() % max;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -500,7 +500,7 @@ bool8 ScrCmd_giveitem(struct ScriptContext *ctx)
|
||||
u16 itemId = VarGet(ScriptReadHalfword(ctx));
|
||||
u32 quantity = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gSpecialVar_ScriptResult = AddBagItem(itemId, (u8)quantity);
|
||||
gSpecialVar_Result = 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));
|
||||
|
||||
gSpecialVar_ScriptResult = RemoveBagItem(itemId, (u8)quantity);
|
||||
gSpecialVar_Result = 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));
|
||||
|
||||
gSpecialVar_ScriptResult = CheckBagHasSpace(itemId, (u8)quantity);
|
||||
gSpecialVar_Result = 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));
|
||||
|
||||
gSpecialVar_ScriptResult = CheckBagHasItem(itemId, (u8)quantity);
|
||||
gSpecialVar_Result = CheckBagHasItem(itemId, (u8)quantity);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -535,7 +535,7 @@ bool8 ScrCmd_checkitemtype(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 itemId = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gSpecialVar_ScriptResult = GetPocketByItemId(itemId);
|
||||
gSpecialVar_Result = GetPocketByItemId(itemId);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -544,7 +544,7 @@ bool8 ScrCmd_givepcitem(struct ScriptContext *ctx)
|
||||
u16 itemId = VarGet(ScriptReadHalfword(ctx));
|
||||
u16 quantity = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gSpecialVar_ScriptResult = AddPCItem(itemId, quantity);
|
||||
gSpecialVar_Result = 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));
|
||||
|
||||
gSpecialVar_ScriptResult = CheckPCHasItem(itemId, quantity);
|
||||
gSpecialVar_Result = CheckPCHasItem(itemId, quantity);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -561,7 +561,7 @@ bool8 ScrCmd_givedecoration(struct ScriptContext *ctx)
|
||||
{
|
||||
u32 decorId = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gSpecialVar_ScriptResult = DecorationAdd(decorId);
|
||||
gSpecialVar_Result = DecorationAdd(decorId);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -569,7 +569,7 @@ bool8 ScrCmd_takedecoration(struct ScriptContext *ctx)
|
||||
{
|
||||
u32 decorId = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gSpecialVar_ScriptResult = DecorationRemove(decorId);
|
||||
gSpecialVar_Result = DecorationRemove(decorId);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -577,7 +577,7 @@ bool8 ScrCmd_checkdecorspace(struct ScriptContext *ctx)
|
||||
{
|
||||
u32 decorId = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gSpecialVar_ScriptResult = DecorationCheckSpace(decorId);
|
||||
gSpecialVar_Result = DecorationCheckSpace(decorId);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -585,7 +585,7 @@ bool8 ScrCmd_checkdecor(struct ScriptContext *ctx)
|
||||
{
|
||||
u32 decorId = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gSpecialVar_ScriptResult = CheckHasDecoration(decorId);
|
||||
gSpecialVar_Result = CheckHasDecoration(decorId);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -909,7 +909,7 @@ bool8 ScrCmd_getplayerxy(struct ScriptContext *ctx)
|
||||
|
||||
bool8 ScrCmd_getpartysize(struct ScriptContext *ctx)
|
||||
{
|
||||
gSpecialVar_ScriptResult = CalculatePlayerPartyCount();
|
||||
gSpecialVar_Result = CalculatePlayerPartyCount();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1835,7 +1835,7 @@ bool8 ScrCmd_givemon(struct ScriptContext *ctx)
|
||||
u32 unkParam2 = ScriptReadWord(ctx);
|
||||
u8 unkParam3 = ScriptReadByte(ctx);
|
||||
|
||||
gSpecialVar_ScriptResult = ScriptGiveMon(species, level, item, unkParam1, unkParam2, unkParam3);
|
||||
gSpecialVar_Result = ScriptGiveMon(species, level, item, unkParam1, unkParam2, unkParam3);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1843,7 +1843,7 @@ bool8 ScrCmd_giveegg(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 species = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gSpecialVar_ScriptResult = ScriptGiveEgg(species);
|
||||
gSpecialVar_Result = ScriptGiveEgg(species);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1862,7 +1862,7 @@ bool8 ScrCmd_checkpartymove(struct ScriptContext *ctx)
|
||||
u8 i;
|
||||
u16 moveId = ScriptReadHalfword(ctx);
|
||||
|
||||
gSpecialVar_ScriptResult = 6;
|
||||
gSpecialVar_Result = 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)
|
||||
{
|
||||
gSpecialVar_ScriptResult = i;
|
||||
gSpecialVar_Result = i;
|
||||
gSpecialVar_0x8004 = species;
|
||||
break;
|
||||
}
|
||||
@@ -1905,7 +1905,7 @@ bool8 ScrCmd_checkmoney(struct ScriptContext *ctx)
|
||||
u8 ignore = ScriptReadByte(ctx);
|
||||
|
||||
if (!ignore)
|
||||
gSpecialVar_ScriptResult = IsEnoughMoney(&gSaveBlock1Ptr->money, amount);
|
||||
gSpecialVar_Result = IsEnoughMoney(&gSaveBlock1Ptr->money, amount);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2085,7 +2085,7 @@ bool8 ScrCmd_getpricereduction(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 value = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gSpecialVar_ScriptResult = GetPriceReduction(value);
|
||||
gSpecialVar_Result = GetPriceReduction(value);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2113,7 +2113,7 @@ bool8 ScrCmd_showcontestresults(struct ScriptContext *ctx)
|
||||
|
||||
bool8 ScrCmd_contestlinktransfer(struct ScriptContext *ctx)
|
||||
{
|
||||
sub_80F84C4(gScriptContestCategory);
|
||||
sub_80F84C4(gSpecialVar_ContestCategory);
|
||||
ScriptContext1_Stop();
|
||||
return TRUE;
|
||||
}
|
||||
@@ -2160,7 +2160,7 @@ bool8 ScrCmd_setrespawn(struct ScriptContext *ctx)
|
||||
|
||||
bool8 ScrCmd_checkplayergender(struct ScriptContext *ctx)
|
||||
{
|
||||
gSpecialVar_ScriptResult = gSaveBlock2Ptr->playerGender;
|
||||
gSpecialVar_Result = gSaveBlock2Ptr->playerGender;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2285,9 +2285,9 @@ bool8 ScrCmd_givecoins(struct ScriptContext *ctx)
|
||||
u16 coins = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
if (GiveCoins(coins) == TRUE)
|
||||
gSpecialVar_ScriptResult = 0;
|
||||
gSpecialVar_Result = 0;
|
||||
else
|
||||
gSpecialVar_ScriptResult = 1;
|
||||
gSpecialVar_Result = 1;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2296,9 +2296,9 @@ bool8 ScrCmd_takecoins(struct ScriptContext *ctx)
|
||||
u16 coins = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
if (TakeCoins(coins) == TRUE)
|
||||
gSpecialVar_ScriptResult = 0;
|
||||
gSpecialVar_Result = 0;
|
||||
else
|
||||
gSpecialVar_ScriptResult = 1;
|
||||
gSpecialVar_Result = 1;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2367,7 +2367,7 @@ bool8 ScrCmd_checkmonobedience(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 partyIndex = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gSpecialVar_ScriptResult = GetMonData(&gPlayerParty[partyIndex], MON_DATA_OBEDIENCE, NULL);
|
||||
gSpecialVar_Result = GetMonData(&gPlayerParty[partyIndex], MON_DATA_OBEDIENCE, NULL);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -175,14 +175,14 @@ void sub_80E8B6C(void)
|
||||
{
|
||||
u16 i;
|
||||
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
for (i = 0; i < 20; i ++)
|
||||
{
|
||||
if (sCurSecretBaseId != gSaveBlock1Ptr->secretBases[i].secretBaseId)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
gSpecialVar_ScriptResult = TRUE;
|
||||
gSpecialVar_Result = TRUE;
|
||||
VarSet(VAR_0x4054, i);
|
||||
break;
|
||||
}
|
||||
@@ -192,11 +192,11 @@ void sub_80E8BC8(void)
|
||||
{
|
||||
if (gSaveBlock1Ptr->secretBases[0].secretBaseId != 0)
|
||||
{
|
||||
gSpecialVar_ScriptResult = TRUE;
|
||||
gSpecialVar_Result = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -544,22 +544,22 @@ void sub_80E933C(void)
|
||||
metatile = MapGridGetMetatileBehaviorAt(gSpecialVar_0x8006 + 7, gSpecialVar_0x8007 + 7);
|
||||
if (MetatileBehavior_IsMB_B5(metatile) == TRUE || MetatileBehavior_IsMB_C3(metatile) == TRUE)
|
||||
{
|
||||
gSpecialVar_ScriptResult = gMapHeader.events->mapObjects[objIdx].graphicsId + VAR_0x3F20;
|
||||
VarSet(gSpecialVar_ScriptResult, gDecorations[roomDecor[decorIdx]].tiles[0]);
|
||||
gSpecialVar_ScriptResult = gMapHeader.events->mapObjects[objIdx].localId;
|
||||
gSpecialVar_Result = gMapHeader.events->mapObjects[objIdx].graphicsId + VAR_0x3F20;
|
||||
VarSet(gSpecialVar_Result, gDecorations[roomDecor[decorIdx]].tiles[0]);
|
||||
gSpecialVar_Result = gMapHeader.events->mapObjects[objIdx].localId;
|
||||
FlagClear(gSpecialVar_0x8004 + 0xAE);
|
||||
show_sprite(gSpecialVar_ScriptResult, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
||||
sub_808EBA8(gSpecialVar_ScriptResult, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, gSpecialVar_0x8006, gSpecialVar_0x8007);
|
||||
sub_808F254(gSpecialVar_ScriptResult, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
||||
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 (category == DECORCAT_DOLL)
|
||||
{
|
||||
sub_808F28C(gSpecialVar_ScriptResult, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, DECORCAT_DOLL);
|
||||
sub_808F28C(gSpecialVar_Result, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, DECORCAT_DOLL);
|
||||
}
|
||||
else if (category == DECORCAT_CUSHION)
|
||||
{
|
||||
sub_808F28C(gSpecialVar_ScriptResult, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, DECORCAT_CUSHION);
|
||||
sub_808F28C(gSpecialVar_Result, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, DECORCAT_CUSHION);
|
||||
}
|
||||
}
|
||||
gSpecialVar_0x8004 ++;
|
||||
@@ -608,14 +608,14 @@ void sub_80E9668(struct Coords16 *coords, struct MapEvents *events)
|
||||
{
|
||||
sub_80E9608(coords, events);
|
||||
sub_80E8B6C();
|
||||
ScriptContext1_SetupScript(gUnknown_08275BB7);
|
||||
ScriptContext1_SetupScript(EventScript_275BB7);
|
||||
}
|
||||
|
||||
bool8 sub_80E9680(void)
|
||||
{
|
||||
sub_80E8B58();
|
||||
sub_80E8B6C();
|
||||
if (gSpecialVar_ScriptResult == TRUE)
|
||||
if (gSpecialVar_Result == TRUE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -657,11 +657,11 @@ void sub_80E9744(void)
|
||||
{
|
||||
if (gSaveBlock1Ptr->secretBases[0].secretBaseId != sCurSecretBaseId)
|
||||
{
|
||||
gSpecialVar_ScriptResult = TRUE;
|
||||
gSpecialVar_Result = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1016,15 +1016,15 @@ void sub_80E9BDC(void)
|
||||
{
|
||||
if (sub_80E9878(VarGet(VAR_0x4054)) == TRUE)
|
||||
{
|
||||
gSpecialVar_ScriptResult = 1;
|
||||
gSpecialVar_Result = 1;
|
||||
}
|
||||
else if (sub_80E9BA8() > 9)
|
||||
{
|
||||
gSpecialVar_ScriptResult = 2;
|
||||
gSpecialVar_Result = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSpecialVar_ScriptResult = 0;
|
||||
gSpecialVar_Result = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1289,41 +1289,41 @@ const u8 *sub_80EA250(void)
|
||||
param = sub_80EA20C(VarGet(VAR_0x4054));
|
||||
if (param == 0)
|
||||
{
|
||||
return gUnknown_08274966;
|
||||
return SecretBase_RedCave1_Text_274966;
|
||||
}
|
||||
if (param == 1)
|
||||
{
|
||||
return gUnknown_08274D13;
|
||||
return SecretBase_RedCave1_Text_274D13;
|
||||
}
|
||||
if (param == 2)
|
||||
{
|
||||
return gUnknown_08274FFE;
|
||||
return SecretBase_RedCave1_Text_274FFE;
|
||||
}
|
||||
if (param == 3)
|
||||
{
|
||||
return gUnknown_08275367;
|
||||
return SecretBase_RedCave1_Text_275367;
|
||||
}
|
||||
if (param == 4)
|
||||
{
|
||||
return gUnknown_082756C7;
|
||||
return SecretBase_RedCave1_Text_2756C7;
|
||||
}
|
||||
if (param == 5)
|
||||
{
|
||||
return gUnknown_08274B24;
|
||||
return SecretBase_RedCave1_Text_274B24;
|
||||
}
|
||||
if (param == 6)
|
||||
{
|
||||
return gUnknown_08274E75;
|
||||
return SecretBase_RedCave1_Text_274E75;
|
||||
}
|
||||
if (param == 7)
|
||||
{
|
||||
return gUnknown_082751E1;
|
||||
return SecretBase_RedCave1_Text_2751E1;
|
||||
}
|
||||
if (param == 8)
|
||||
{
|
||||
return gUnknown_082754F6;
|
||||
return SecretBase_RedCave1_Text_2754F6;
|
||||
}
|
||||
return gUnknown_082758CC;
|
||||
return SecretBase_RedCave1_Text_2758CC;
|
||||
}
|
||||
|
||||
void sub_80EA2E4(void)
|
||||
@@ -1335,7 +1335,7 @@ void sub_80EA2E4(void)
|
||||
|
||||
void sub_80EA30C(void)
|
||||
{
|
||||
gSaveBlock1Ptr->secretBases[VarGet(VAR_0x4054)].sbr_field_1_5 = gSpecialVar_ScriptResult;
|
||||
gSaveBlock1Ptr->secretBases[VarGet(VAR_0x4054)].sbr_field_1_5 = gSpecialVar_Result;
|
||||
}
|
||||
|
||||
void sub_80EA354(void)
|
||||
@@ -1353,7 +1353,7 @@ void sub_80EA354(void)
|
||||
FlagSet(0x922);
|
||||
}
|
||||
gSpecialVar_0x8004 = sub_80EA20C(secretBaseRecordId);
|
||||
gSpecialVar_ScriptResult = gSaveBlock1Ptr->secretBases[secretBaseRecordId].sbr_field_1_5;
|
||||
gSpecialVar_Result = gSaveBlock1Ptr->secretBases[secretBaseRecordId].sbr_field_1_5;
|
||||
}
|
||||
|
||||
|
||||
|
||||
114
src/tv.c
114
src/tv.c
@@ -1263,7 +1263,7 @@ void InterviewAfter_ContestLiveUpdates(void)
|
||||
show2->contestLiveUpdates.kind = TVSHOW_CONTEST_LIVE_UPDATES;
|
||||
show2->contestLiveUpdates.active = TRUE;
|
||||
StringCopy(show2->contestLiveUpdates.playerName, gSaveBlock2Ptr->playerName);
|
||||
show2->contestLiveUpdates.category = gScriptContestCategory;
|
||||
show2->contestLiveUpdates.category = gSpecialVar_ContestCategory;
|
||||
show2->contestLiveUpdates.species = GetMonData(&gPlayerParty[gUnknown_02039F24], MON_DATA_SPECIES, NULL);
|
||||
show2->contestLiveUpdates.winningSpecies = show->contestLiveUpdates.winningSpecies;
|
||||
show2->contestLiveUpdates.appealFlags2 = show->contestLiveUpdates.appealFlags2;
|
||||
@@ -1288,7 +1288,7 @@ void PutBattleUpdateOnTheAir(u8 a0, u16 a1, u16 a2, u16 a3)
|
||||
if (sCurTVShowSlot != -1)
|
||||
{
|
||||
FindActiveBroadcastByShowType_SetScriptResult(TVSHOW_BATTLE_UPDATE);
|
||||
if (gSpecialVar_ScriptResult != 1)
|
||||
if (gSpecialVar_Result != 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 (gSpecialVar_ScriptResult == 1)
|
||||
if (gSpecialVar_Result == 1)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1527,8 +1527,8 @@ void BravoTrainerPokemonProfile_BeforeInterview2(u8 a0)
|
||||
if (sCurTVShowSlot != -1)
|
||||
{
|
||||
show->bravoTrainer.contestResult = a0;
|
||||
show->bravoTrainer.contestCategory = gScriptContestCategory;
|
||||
show->bravoTrainer.contestRank = gUnknown_02039F2E;
|
||||
show->bravoTrainer.contestCategory = gSpecialVar_ContestCategory;
|
||||
show->bravoTrainer.contestRank = gSpecialVar_ContestRank;
|
||||
show->bravoTrainer.species = GetMonData(&gPlayerParty[gUnknown_02039F24], MON_DATA_SPECIES, NULL);
|
||||
GetMonData(&gPlayerParty[gUnknown_02039F24], MON_DATA_NICKNAME, show->bravoTrainer.pokemonNickname);
|
||||
StripExtCtrlCodes(show->bravoTrainer.pokemonNickname);
|
||||
@@ -1606,7 +1606,7 @@ void PutNameRaterShowOnTheAir(void)
|
||||
TVShow *show;
|
||||
|
||||
InterviewBefore_NameRater();
|
||||
if (gSpecialVar_ScriptResult != 1)
|
||||
if (gSpecialVar_Result != 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 (gSpecialVar_ScriptResult != TRUE)
|
||||
if (gSpecialVar_Result != TRUE)
|
||||
{
|
||||
show = &gSaveBlock1Ptr->tvShows[sCurTVShowSlot];
|
||||
sub_818E848(&show->contestLiveUpdates2.language);
|
||||
@@ -2613,7 +2613,7 @@ bool8 sub_80EE7C0(void)
|
||||
return TRUE;
|
||||
}
|
||||
FindActiveBroadcastByShowType_SetScriptResult(TVSHOW_FAN_CLUB_SPECIAL);
|
||||
if (gSpecialVar_ScriptResult == TRUE)
|
||||
if (gSpecialVar_Result == TRUE)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@@ -2905,7 +2905,7 @@ void DoPokeNews(void)
|
||||
i = FindAnyTVNewsOnTheAir();
|
||||
if (i == 0xFF)
|
||||
{
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2928,7 +2928,7 @@ void DoPokeNews(void)
|
||||
gSaveBlock1Ptr->pokeNews[i].state = 0;
|
||||
ShowFieldMessage(sPokeNewsTextGroup_Upcoming[gSaveBlock1Ptr->pokeNews[i].kind]);
|
||||
}
|
||||
gSpecialVar_ScriptResult = TRUE;
|
||||
gSpecialVar_Result = 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 && gSpecialVar_ScriptLastTalked == 25)
|
||||
if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP_SLATEPORT_CITY && gSaveBlock1Ptr->location.mapNum == MAP_ID_SLATEPORT_CITY && gSpecialVar_LastTalked == 25)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@@ -3189,7 +3189,7 @@ void FindActiveBroadcastByShowType_SetScriptResult(u8 kind)
|
||||
{
|
||||
if (gSaveBlock1Ptr->tvShows[i].common.active == TRUE)
|
||||
{
|
||||
gSpecialVar_ScriptResult = TRUE;
|
||||
gSpecialVar_Result = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3205,7 +3205,7 @@ void FindActiveBroadcastByShowType_SetScriptResult(u8 kind)
|
||||
|
||||
void InterviewBefore(void)
|
||||
{
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = 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 (!gSpecialVar_ScriptResult)
|
||||
if (!gSpecialVar_Result)
|
||||
{
|
||||
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 (!gSpecialVar_ScriptResult)
|
||||
if (!gSpecialVar_Result)
|
||||
{
|
||||
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 (!gSpecialVar_ScriptResult)
|
||||
if (!gSpecialVar_Result)
|
||||
{
|
||||
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)
|
||||
{
|
||||
gSpecialVar_ScriptResult = TRUE;
|
||||
gSpecialVar_Result = 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 (!gSpecialVar_ScriptResult)
|
||||
if (!gSpecialVar_Result)
|
||||
{
|
||||
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 (!gSpecialVar_ScriptResult)
|
||||
if (!gSpecialVar_Result)
|
||||
{
|
||||
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 (!gSpecialVar_ScriptResult)
|
||||
if (!gSpecialVar_Result)
|
||||
{
|
||||
InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanClubSpecial.words, 1);
|
||||
}
|
||||
@@ -3429,11 +3429,11 @@ void sub_80EFA88(void)
|
||||
gSpecialVar_0x8006 = sCurTVShowSlot;
|
||||
if (sCurTVShowSlot == -1)
|
||||
{
|
||||
gSpecialVar_ScriptResult = TRUE;
|
||||
gSpecialVar_Result = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3658,11 +3658,11 @@ void TV_CheckMonOTIDEqualsPlayerID(void)
|
||||
{
|
||||
if (GetPlayerIDAsU32() == GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_OT_ID, NULL))
|
||||
{
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSpecialVar_ScriptResult = TRUE;
|
||||
gSpecialVar_Result = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5108,7 +5108,7 @@ void DoTVShowBravoTrainerPokemonProfile(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -5180,7 +5180,7 @@ void DoTVShowBravoTrainerBattleTower(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch(state)
|
||||
{
|
||||
@@ -5277,7 +5277,7 @@ void DoTVShowTodaysSmartShopper(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch(state)
|
||||
{
|
||||
@@ -5400,7 +5400,7 @@ void DoTVShowTheNameRaterShow(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -5498,7 +5498,7 @@ void DoTVShowPokemonTodaySuccessfulCapture(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -5576,7 +5576,7 @@ void DoTVShowPokemonTodayFailedCapture(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -5630,7 +5630,7 @@ void DoTVShowPokemonFanClubLetter(void)
|
||||
u16 rval;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -5683,7 +5683,7 @@ void DoTVShowRecentHappenings(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -5718,7 +5718,7 @@ void DoTVShowPokemonFanClubOpinions(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -5768,7 +5768,7 @@ void DoTVShowPokemonContestLiveUpdates(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6115,7 +6115,7 @@ void DoTVShowPokemonBattleUpdate(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6187,7 +6187,7 @@ void DoTVShow3CheersForPokeblocks(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6288,7 +6288,7 @@ void DoTVShowInSearchOfTrainers(void)
|
||||
{
|
||||
u8 state;
|
||||
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = 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]);
|
||||
gSpecialVar_ScriptResult = TRUE;
|
||||
gSpecialVar_Result = TRUE;
|
||||
sTVShowState = 0;
|
||||
TakeTVShowInSearchOfTrainersOffTheAir();
|
||||
break;
|
||||
@@ -6358,7 +6358,7 @@ void DoTVShowPokemonAngler(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
if (show->pokemonAngler.nBites < show->pokemonAngler.nFails)
|
||||
{
|
||||
sTVShowState = 0;
|
||||
@@ -6392,7 +6392,7 @@ void DoTVShowTheWorldOfMasters(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6422,7 +6422,7 @@ void DoTVShowTodaysRivalTrainer(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6571,7 +6571,7 @@ void DoTVShowDewfordTrendWatcherNetwork(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6627,7 +6627,7 @@ void DoTVShowHoennTreasureInvestigators(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6671,7 +6671,7 @@ void DoTVShowFindThatGamer(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6745,7 +6745,7 @@ void DoTVShowBreakingNewsTV(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6848,7 +6848,7 @@ void DoTVShowSecretBaseVisit(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -6944,7 +6944,7 @@ void DoTVShowPokemonLotteryWinnerFlashReport(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = 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];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -7038,7 +7038,7 @@ void DoTVShowTrainerFanClubSpecial(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -7104,7 +7104,7 @@ void DoTVShowTrainerFanClub(void)
|
||||
u32 playerId;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -7191,7 +7191,7 @@ void DoTVShowSpotTheCuties(void)
|
||||
u32 playerId;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -7296,7 +7296,7 @@ void DoTVShowPokemonNewsBattleFrontier(void)
|
||||
u32 playerId;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -7445,7 +7445,7 @@ void DoTVShowWhatsNo1InHoennToday(void)
|
||||
u32 playerId;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -7561,7 +7561,7 @@ void DoTVShowSecretBaseSecrets(void)
|
||||
u16 i;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -7797,7 +7797,7 @@ void DoTVShowSafariFanClub(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -7884,7 +7884,7 @@ void DoTVShowPokemonContestLiveUpdates2(void)
|
||||
u8 state;
|
||||
|
||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||
gSpecialVar_ScriptResult = FALSE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
state = sTVShowState;
|
||||
switch (state)
|
||||
{
|
||||
@@ -7916,7 +7916,7 @@ void DoTVShowPokemonContestLiveUpdates2(void)
|
||||
|
||||
void TVShowDone(void)
|
||||
{
|
||||
gSpecialVar_ScriptResult = TRUE;
|
||||
gSpecialVar_Result = 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);
|
||||
gSpecialVar_ScriptResult = TryCalculateWallpaper(&backgroundClr, &foregroundClr, &iconId, &patternId, trainerId, GetWaldaPhrasePtr());
|
||||
gSpecialVar_Result = TryCalculateWallpaper(&backgroundClr, &foregroundClr, &iconId, &patternId, trainerId, GetWaldaPhrasePtr());
|
||||
|
||||
if (gSpecialVar_ScriptResult)
|
||||
if (gSpecialVar_Result)
|
||||
{
|
||||
SetWaldaWallpaperPatternId(patternId);
|
||||
SetWaldaWallpaperIconId(iconId);
|
||||
SetWaldaWallpaperColors(backgroundClr, foregroundClr);
|
||||
}
|
||||
|
||||
SetWaldaWallpaperLockedOrUnlocked(gSpecialVar_ScriptResult);
|
||||
return (bool8)(gSpecialVar_ScriptResult);
|
||||
SetWaldaWallpaperLockedOrUnlocked(gSpecialVar_Result);
|
||||
return (bool8)(gSpecialVar_Result);
|
||||
}
|
||||
|
||||
static u8 GetLetterTableId(u8 letter)
|
||||
|
||||
Reference in New Issue
Block a user