Document symbols reffed in field_control_avatar

This commit is contained in:
PikalaxALT
2021-03-20 17:27:21 -04:00
parent 95c7e3d067
commit 2edc21281e
9 changed files with 165 additions and 165 deletions
+1 -1
View File
@@ -1144,7 +1144,7 @@ CableClub_EventScript_EnterWirelessLinkRoom:: @ 81BBF88
waitstate waitstate
end end
CableClub_EventScript_81BBFD8:: @ 81BBFD8 CableClub_EventScript_ShowWirelessCommunicationScreen:: @ 81BBFD8
goto_if_questlog EventScript_ReleaseEnd goto_if_questlog EventScript_ReleaseEnd
lockall lockall
goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_NotReadyYet goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_NotReadyYet
+47 -47
View File
@@ -1,99 +1,99 @@
@ Flavor text for interacting with various background objects @ Flavor text for interacting with various background objects
gUnknown_81A7606:: @ 81A7606 EventScript_Bookshelf:: @ 81A7606
msgbox gUnknown_81C0DB0, MSGBOX_SIGN msgbox Text_Bookshelf, MSGBOX_SIGN
end end
gUnknown_81A760F:: @ 81A760F EventScript_PokeMartShelf:: @ 81A760F
msgbox gUnknown_81C0DFD, MSGBOX_SIGN msgbox Text_PokeMartShelf, MSGBOX_SIGN
end end
gUnknown_81A7618:: @ 81A7618 EventScript_Food:: @ 81A7618
msgbox gUnknown_81C0F99, MSGBOX_SIGN msgbox Text_Food, MSGBOX_SIGN
end end
gUnknown_81A7621:: @ 81A7621 EventScript_VideoGame:: @ 81A7621
msgbox gUnknown_81C12A7, MSGBOX_SIGN msgbox Text_VideoGame, MSGBOX_SIGN
end end
gUnknown_81A762A:: @ 81A762A EventScript_Computer:: @ 81A762A
msgbox gUnknown_81C10C1, MSGBOX_SIGN msgbox Text_Computer, MSGBOX_SIGN
end end
gUnknown_81A7633:: @ 81A7633 EventScript_ImpressiveMachine:: @ 81A7633
msgbox gUnknown_81C1273, MSGBOX_SIGN msgbox Text_ImpressiveMachine, MSGBOX_SIGN
end end
gUnknown_81A763C:: @ 81A763C EventScript_Blueprints:: @ 81A763C
msgbox gUnknown_81C0FD8, MSGBOX_SIGN msgbox Text_Blueprints, MSGBOX_SIGN
end end
gUnknown_81A7645:: @ 81A7645 EventScript_Burglary:: @ 81A7645
msgbox gUnknown_81C12D6, MSGBOX_SIGN msgbox Text_Burglary, MSGBOX_SIGN
end end
gUnknown_81A764E:: @ 81A764E EventScript_PlayerFacingTVScreen:: @ 81A764E
msgbox gUnknown_81C1300, MSGBOX_SIGN msgbox Text_PlayerFacingTVScreen, MSGBOX_SIGN
end end
gUnknown_81A7657:: @ 81A7657 EventScript_Cabinet:: @ 81A7657
msgbox Text_DishesPlatesNeatlyLinedUp, MSGBOX_SIGN msgbox Text_DishesPlatesNeatlyLinedUp, MSGBOX_SIGN
end end
gUnknown_81A7660:: @ 81A7660 EventScript_Kitchen:: @ 81A7660
msgbox gUnknown_81C0E40, MSGBOX_SIGN msgbox Text_Kitchen, MSGBOX_SIGN
end end
gUnknown_81A7669:: @ 81A7669 EventScript_Dresser:: @ 81A7669
msgbox gUnknown_81C0E73, MSGBOX_SIGN msgbox Text_Dresser, MSGBOX_SIGN
end end
gUnknown_81A7672:: @ 81A7672 EventScript_Snacks:: @ 81A7672
msgbox gUnknown_81C0EAC, MSGBOX_SIGN msgbox Text_Snacks, MSGBOX_SIGN
end end
gUnknown_81A767B:: @ 81A767B EventScript_Painting:: @ 81A767B
msgbox gUnknown_81C101B, MSGBOX_SIGN msgbox Text_Painting, MSGBOX_SIGN
end end
gUnknown_81A7684:: @ 81A7684 EventScript_PowerPlantMachine:: @ 81A7684
msgbox gUnknown_81C1060, MSGBOX_SIGN msgbox Text_PowerPlantMachine, MSGBOX_SIGN
end end
gUnknown_81A768D:: @ 81A768D EventScript_Telephone:: @ 81A768D
msgbox gUnknown_81C109C, MSGBOX_SIGN msgbox Text_Telephone, MSGBOX_SIGN
end end
gUnknown_81A7696:: @ 81A7696 EventScript_AdvertisingPoster:: @ 81A7696
msgbox gUnknown_81C10FC, MSGBOX_SIGN msgbox Text_AdvertisingPoster, MSGBOX_SIGN
end end
gUnknown_81A769F:: @ 81A769F EventScript_TastyFood:: @ 81A769F
msgbox gUnknown_81C1134, MSGBOX_SIGN msgbox Text_TastyFood, MSGBOX_SIGN
end end
gUnknown_81A76A8:: @ 81A76A8 EventScript_TrashBin:: @ 81A76A8
msgbox gUnknown_81C116E, MSGBOX_SIGN msgbox Text_TrashBin, MSGBOX_SIGN
end end
gUnknown_81A76B1:: @ 81A76B1 EventScript_Cup:: @ 81A76B1
msgbox gUnknown_81C1194, MSGBOX_SIGN msgbox Text_Cup, MSGBOX_SIGN
end end
gUnknown_81A76BA:: @ 81A76BA EventScript_PolishedWindow:: @ 81A76BA
msgbox gUnknown_81C11BA, MSGBOX_SIGN msgbox Text_PolishedWindow, MSGBOX_SIGN
end end
gUnknown_81A76C3:: @ 81A76C3 EventScript_BeautifulSkyWindow:: @ 81A76C3
msgbox gUnknown_81C11DC, MSGBOX_SIGN msgbox Text_BeautifulSkyWindow, MSGBOX_SIGN
end end
gUnknown_81A76CC:: @ 81A76CC EventScript_BlinkingLights:: @ 81A76CC
msgbox gUnknown_81C1217, MSGBOX_SIGN msgbox Text_BlinkingLights, MSGBOX_SIGN
end end
gUnknown_81A76D5:: @ 81A76D5 EventScript_NeatlyLinedUpTools:: @ 81A76D5
msgbox gUnknown_81C124B, MSGBOX_SIGN msgbox Text_NeatlyLinedUpTools, MSGBOX_SIGN
end end
EventScript_PokemartSign:: @ 81A76DE EventScript_PokemartSign:: @ 81A76DE
+23 -23
View File
@@ -1,6 +1,6 @@
@ Flavor text for interacting with various background objects @ Flavor text for interacting with various background objects
gUnknown_81C0DB0:: @ 81C0DB0 Text_Bookshelf:: @ 81C0DB0
.string "It's crammed full of POKéMON\n" .string "It's crammed full of POKéMON\n"
.string "books.$" .string "books.$"
@@ -11,7 +11,7 @@ Text_NothingButPokemonBooks:: @ 81C0DD4
Text_ATownMap:: @ 81C0DF1 Text_ATownMap:: @ 81C0DF1
.string "A TOWN MAP.$" .string "A TOWN MAP.$"
gUnknown_81C0DFD:: @ 81C0DFD Text_PokeMartShelf:: @ 81C0DFD
.string "Wow!\n" .string "Wow!\n"
.string "Tons of POKéMON stuff!$" .string "Tons of POKéMON stuff!$"
@@ -19,15 +19,15 @@ Text_DishesPlatesNeatlyLinedUp:: @ 81C0E19
.string "Dishes and plates are neatly\n" .string "Dishes and plates are neatly\n"
.string "lined up.$" .string "lined up.$"
gUnknown_81C0E40:: @ 81C0E40 Text_Kitchen:: @ 81C0E40
.string "It smells delicious!\n" .string "It smells delicious!\n"
.string "Somebody's been cooking here.$" .string "Somebody's been cooking here.$"
gUnknown_81C0E73:: @ 81C0E73 Text_Dresser:: @ 81C0E73
.string "It's a nicely made dresser.\n" .string "It's a nicely made dresser.\n"
.string "It will hold a lot of stuff.$" .string "It will hold a lot of stuff.$"
gUnknown_81C0EAC:: @ 81C0EAC Text_Snacks:: @ 81C0EAC
.string "There's a pile of snacks here.$" .string "There's a pile of snacks here.$"
Text_PokemartSign:: @ 81C0ECB Text_PokemartSign:: @ 81C0ECB
@@ -48,75 +48,75 @@ Text_Indigo_HighestAuthority:: @ 81C0F59
.string "The highest POKéMON authority!\n" .string "The highest POKéMON authority!\n"
.string "POKéMON LEAGUE HQ$" .string "POKéMON LEAGUE HQ$"
gUnknown_81C0F99:: @ 81C0F99 Text_Food:: @ 81C0F99
.string "It should be packed with all kinds\n" .string "It should be packed with all kinds\n"
.string "of delicious things to eat.$" .string "of delicious things to eat.$"
gUnknown_81C0FD8:: @ 81C0FD8 Text_Blueprints:: @ 81C0FD8
.string "It's a blueprint of some sort.\n" .string "It's a blueprint of some sort.\n"
.string "It's filled with diagrams and text.$" .string "It's filled with diagrams and text.$"
gUnknown_81C101B:: @ 81C101B Text_Painting:: @ 81C101B
.string "It's a pretty picture of a POKéMON.\n" .string "It's a pretty picture of a POKéMON.\n"
.string "It looks like it's feeling good.$" .string "It looks like it's feeling good.$"
gUnknown_81C1060:: @ 81C1060 Text_PowerPlantMachine:: @ 81C1060
.string "What could this machine be?\n" .string "What could this machine be?\n"
.string "Better not mess around with it!$" .string "Better not mess around with it!$"
gUnknown_81C109C:: @ 81C109C Text_Telephone:: @ 81C109C
.string "It's a telephone.\n" .string "It's a telephone.\n"
.string "Better not use it.$" .string "Better not use it.$"
gUnknown_81C10C1:: @ 81C10C1 Text_Computer:: @ 81C10C1
.string "It's all complicated words and\n" .string "It's all complicated words and\n"
.string "numbers that make no sense…$" .string "numbers that make no sense…$"
gUnknown_81C10FC:: @ 81C10FC Text_AdvertisingPoster:: @ 81C10FC
.string "It's an advertising poster about\n" .string "It's an advertising poster about\n"
.string "all kinds of products.$" .string "all kinds of products.$"
gUnknown_81C1134:: @ 81C1134 Text_TastyFood:: @ 81C1134
.string "Oh, that smells tasty!\n" .string "Oh, that smells tasty!\n"
.string "It might get the stomach growling!$" .string "It might get the stomach growling!$"
gUnknown_81C116E:: @ 81C116E Text_TrashBin:: @ 81C116E
.string "Inside this…\n" .string "Inside this…\n"
.string "……\p" .string "……\p"
.string "There's nothing here!$" .string "There's nothing here!$"
gUnknown_81C1194:: @ 81C1194 Text_Cup:: @ 81C1194
.string "It's a cup with a POKéMON mark\n" .string "It's a cup with a POKéMON mark\n"
.string "on it.$" .string "on it.$"
gUnknown_81C11BA:: @ 81C11BA Text_PolishedWindow:: @ 81C11BA
.string "The window is very well polished.$" .string "The window is very well polished.$"
gUnknown_81C11DC:: @ 81C11DC Text_BeautifulSkyWindow:: @ 81C11DC
.string "Outside the window…\p" .string "Outside the window…\p"
.string "The sky looks fantastically\n" .string "The sky looks fantastically\n"
.string "beautiful.$" .string "beautiful.$"
gUnknown_81C1217:: @ 81C1217 Text_BlinkingLights:: @ 81C1217
.string "Lights in different colors are\n" .string "Lights in different colors are\n"
.string "flashing on and off.$" .string "flashing on and off.$"
gUnknown_81C124B:: @ 81C124B Text_NeatlyLinedUpTools:: @ 81C124B
.string "All sorts of tools are lined up\n" .string "All sorts of tools are lined up\n"
.string "neatly.$" .string "neatly.$"
gUnknown_81C1273:: @ 81C1273 Text_ImpressiveMachine:: @ 81C1273
.string "It's a machine of some sort.\n" .string "It's a machine of some sort.\n"
.string "It sure is impressive.$" .string "It sure is impressive.$"
gUnknown_81C12A7:: @ 81C12A7 Text_VideoGame:: @ 81C12A7
.string "It's the latest video game!\n" .string "It's the latest video game!\n"
.string "It sure looks fun!$" .string "It sure looks fun!$"
gUnknown_81C12D6:: @ 81C12D6 Text_Burglary:: @ 81C12D6
.string "There are obvious signs of burglary\n" .string "There are obvious signs of burglary\n"
.string "here…$" .string "here…$"
gUnknown_81C1300:: @ 81C1300 Text_PlayerFacingTVScreen:: @ 81C1300
.string "There's a POKéMON on TV!\n" .string "There's a POKéMON on TV!\n"
.string "It looks like it's having fun.$" .string "It looks like it's having fun.$"
+25 -25
View File
@@ -1218,32 +1218,32 @@ extern const u8 PalletTown_PlayersHouse_2F_EventScript_PC[];
extern const u8 EventScript_HiddenItemScript[]; extern const u8 EventScript_HiddenItemScript[];
extern const u8 EventScript_PC[]; extern const u8 EventScript_PC[];
extern const u8 EventScript_WallTownMap[]; extern const u8 EventScript_WallTownMap[];
extern const u8 gUnknown_81A7606[]; extern const u8 EventScript_Bookshelf[];
extern const u8 gUnknown_81A760F[]; extern const u8 EventScript_PokeMartShelf[];
extern const u8 gUnknown_81A7618[]; extern const u8 EventScript_Food[];
extern const u8 gUnknown_81A7633[]; extern const u8 EventScript_ImpressiveMachine[];
extern const u8 gUnknown_81A763C[]; extern const u8 EventScript_Blueprints[];
extern const u8 gUnknown_81A7621[]; extern const u8 EventScript_VideoGame[];
extern const u8 gUnknown_81A7645[]; extern const u8 EventScript_Burglary[];
extern const u8 gUnknown_81A762A[]; extern const u8 EventScript_Computer[];
extern const u8 TrainerTower_EventScript_ShowTime[]; extern const u8 TrainerTower_EventScript_ShowTime[];
extern const u8 gUnknown_81A764E[]; extern const u8 EventScript_PlayerFacingTVScreen[];
extern const u8 gUnknown_81A7657[]; extern const u8 EventScript_Cabinet[];
extern const u8 gUnknown_81A7660[]; extern const u8 EventScript_Kitchen[];
extern const u8 gUnknown_81A7669[]; extern const u8 EventScript_Dresser[];
extern const u8 gUnknown_81A7672[]; extern const u8 EventScript_Snacks[];
extern const u8 gUnknown_81A767B[]; extern const u8 EventScript_Painting[];
extern const u8 gUnknown_81A7684[]; extern const u8 EventScript_PowerPlantMachine[];
extern const u8 gUnknown_81A768D[]; extern const u8 EventScript_Telephone[];
extern const u8 gUnknown_81A7696[]; extern const u8 EventScript_AdvertisingPoster[];
extern const u8 gUnknown_81A769F[]; extern const u8 EventScript_TastyFood[];
extern const u8 gUnknown_81A76A8[]; extern const u8 EventScript_TrashBin[];
extern const u8 gUnknown_81A76B1[]; extern const u8 EventScript_Cup[];
extern const u8 gUnknown_81A76BA[]; extern const u8 EventScript_PolishedWindow[];
extern const u8 gUnknown_81A76C3[]; extern const u8 EventScript_BeautifulSkyWindow[];
extern const u8 gUnknown_81A76CC[]; extern const u8 EventScript_BlinkingLights[];
extern const u8 gUnknown_81A76D5[]; extern const u8 EventScript_NeatlyLinedUpTools[];
extern const u8 CableClub_EventScript_81BBFD8[]; extern const u8 CableClub_EventScript_ShowWirelessCommunicationScreen[];
extern const u8 EventScript_Questionnaire[]; extern const u8 EventScript_Questionnaire[];
extern const u8 CableClub_EventScript_ShowBattleRecords[]; extern const u8 CableClub_EventScript_ShowBattleRecords[];
extern const u8 EventScript_Indigo_UltimateGoal[]; extern const u8 EventScript_Indigo_UltimateGoal[];
+5 -5
View File
@@ -127,7 +127,7 @@ bool8 MetatileBehavior_IsKitchen(u8 metatileBehavior);
bool8 MetatileBehavior_IsDresser(u8 metatileBehavior); bool8 MetatileBehavior_IsDresser(u8 metatileBehavior);
bool8 MetatileBehavior_IsSnacks(u8 metatileBehavior); bool8 MetatileBehavior_IsSnacks(u8 metatileBehavior);
bool8 MetatileBehavior_IsStrengthButton(u8 metatileBehavior); bool8 MetatileBehavior_IsStrengthButton(u8 metatileBehavior);
bool8 MetatileBehavior_IsPlayerFacingMB_8D(u8 tile, u8 playerDirection); bool8 MetatileBehavior_IsPlayerFacingCableClubWirelessMonitor(u8 tile, u8 playerDirection);
bool8 MetatileBehavior_IsPlayerFacingBattleRecords(u8 tile, u8 playerDirection); bool8 MetatileBehavior_IsPlayerFacingBattleRecords(u8 tile, u8 playerDirection);
bool8 MetatileBehavior_IsQuestionnaire(u8 metatileBehavior); bool8 MetatileBehavior_IsQuestionnaire(u8 metatileBehavior);
bool8 MetatileBehavior_IsIndigoPlateauMark(u8 metatileBehavior); bool8 MetatileBehavior_IsIndigoPlateauMark(u8 metatileBehavior);
@@ -143,13 +143,13 @@ bool8 MetatileBehavior_IsAdvertisingPoster(u8 metatileBehavior);
bool8 MetatileBehavior_IsTastyFood(u8 metatileBehavior); bool8 MetatileBehavior_IsTastyFood(u8 metatileBehavior);
bool8 MetatileBehavior_IsTrashBin(u8 metatileBehavior); bool8 MetatileBehavior_IsTrashBin(u8 metatileBehavior);
bool8 MetatileBehavior_IsCup(u8 metatileBehavior); bool8 MetatileBehavior_IsCup(u8 metatileBehavior);
bool8 MetatileBehavior_ReturnFalse_19(u8 metatileBehavior); bool8 MetatileBehavior_IsPolishedWindow(u8 metatileBehavior);
bool8 MetatileBehavior_ReturnFalse_20(u8 metatileBehavior); bool8 MetatileBehavior_IsBeautifulSkyWindow(u8 metatileBehavior);
bool8 MetatileBehavior_IsBlinkingLights(u8 metatileBehavior); bool8 MetatileBehavior_IsBlinkingLights(u8 metatileBehavior);
bool8 MetatileBehavior_IsMB9F(u8 metatileBehavior); bool8 MetatileBehavior_IsIsNeatlyLinedUpTools(u8 metatileBehavior);
bool8 MetatileBehavior_IsImpressiveMachine(u8 metatileBehavior); bool8 MetatileBehavior_IsImpressiveMachine(u8 metatileBehavior);
bool8 MetatileBehavior_IsVideoGame(u8 metatileBehavior); bool8 MetatileBehavior_IsVideoGame(u8 metatileBehavior);
bool8 MetatileBehavior_IsBurglary(u8 metatileBehavior); bool8 MetatileBehavior_IsBurglary(u8 metatileBehavior);
bool8 MetatileBehavior_IsMBA3(u8 metatileBehavior); bool8 MetatileBehavior_IsTrainerTowerMonitor(u8 metatileBehavior);
#endif // GUARD_METATILE_BEHAVIOR #endif // GUARD_METATILE_BEHAVIOR
+2 -2
View File
@@ -34,7 +34,7 @@ struct WildPokemonHeader
extern const struct WildPokemonHeader gWildMonHeaders[]; extern const struct WildPokemonHeader gWildMonHeaders[];
void DisableWildEncounters(bool8 disabled); void DisableWildEncounters(bool8 disabled);
bool8 StandardWildEncounter(u32 currMetaTileBehavior, u16 previousMetaTileBehavior); bool8 StandardWildEncounter(u32 currMetatileAttrs, u16 previousMetaTileBehavior);
bool8 SweetScentWildEncounter(void); bool8 SweetScentWildEncounter(void);
bool8 DoesCurrentMapHaveFishingMons(void); bool8 DoesCurrentMapHaveFishingMons(void);
void FishingWildEncounter(u8 rod); void FishingWildEncounter(u8 rod);
@@ -46,6 +46,6 @@ u8 GetUnownLetterByPersonalityLoByte(u32 personality);
bool8 SweetScentWildEncounter(void); bool8 SweetScentWildEncounter(void);
void SeedWildEncounterRng(u16 randVal); void SeedWildEncounterRng(u16 randVal);
void ResetEncounterRateModifiers(void); void ResetEncounterRateModifiers(void);
bool8 TryStandardWildEncounter(u32 currMetatileBehavior); bool8 TryStandardWildEncounter(u32 currMetatileAttrs);
#endif // GUARD_WILD_ENCOUNTER_H #endif // GUARD_WILD_ENCOUNTER_H
+43 -43
View File
@@ -56,7 +56,7 @@ static bool8 TryStartMiscWalkingScripts(u16 metatileBehavior);
static bool8 TryStartStepCountScript(u16 metatileBehavior); static bool8 TryStartStepCountScript(u16 metatileBehavior);
static void UpdateHappinessStepCounter(void); static void UpdateHappinessStepCounter(void);
static bool8 UpdatePoisonStepCounter(void); static bool8 UpdatePoisonStepCounter(void);
static bool8 CheckStandardWildEncounter(u32 encounter); static bool8 CheckStandardWildEncounter(u32 metatileAttributes);
static bool8 TrySetUpWalkIntoSignpostScript(struct MapPosition * position, u16 metatileBehavior, u8 playerDirection); static bool8 TrySetUpWalkIntoSignpostScript(struct MapPosition * position, u16 metatileBehavior, u8 playerDirection);
static void SetUpWalkIntoSignScript(const u8 *script, u8 playerDirection); static void SetUpWalkIntoSignScript(const u8 *script, u8 playerDirection);
static u8 GetFacingSignpostType(u16 metatileBehvaior, u8 direction); static u8 GetFacingSignpostType(u16 metatileBehvaior, u8 direction);
@@ -195,12 +195,12 @@ int ProcessPlayerFieldInput(struct FieldInput *input)
struct MapPosition position; struct MapPosition position;
u8 playerDirection; u8 playerDirection;
u16 metatileBehavior; u16 metatileBehavior;
u32 r8; u32 metatileAttributes;
ResetFacingNpcOrSignPostVars(); ResetFacingNpcOrSignPostVars();
playerDirection = GetPlayerFacingDirection(); playerDirection = GetPlayerFacingDirection();
GetPlayerPosition(&position); GetPlayerPosition(&position);
r8 = MapGridGetMetatileAttributeAt(position.x, position.y, 0xFF); metatileAttributes = MapGridGetMetatileAttributeAt(position.x, position.y, 0xFF);
metatileBehavior = MapGridGetMetatileBehaviorAt(position.x, position.y); metatileBehavior = MapGridGetMetatileBehaviorAt(position.x, position.y);
FieldClearPlayerInput(&gInputToStoreInQuestLogMaybe); FieldClearPlayerInput(&gInputToStoreInQuestLogMaybe);
@@ -241,7 +241,7 @@ int ProcessPlayerFieldInput(struct FieldInput *input)
metatileBehavior = MapGridGetMetatileBehaviorAt(position.x, position.y); metatileBehavior = MapGridGetMetatileBehaviorAt(position.x, position.y);
} }
} }
if (input->checkStandardWildEncounter && CheckStandardWildEncounter(r8) == TRUE) if (input->checkStandardWildEncounter && CheckStandardWildEncounter(metatileAttributes) == TRUE)
{ {
gInputToStoreInQuestLogMaybe.checkStandardWildEncounter = TRUE; gInputToStoreInQuestLogMaybe.checkStandardWildEncounter = TRUE;
return TRUE; return TRUE;
@@ -520,57 +520,57 @@ static const u8 *GetInteractedMetatileScript(struct MapPosition *position, u8 me
if (MetatileBehavior_IsRegionMap(metatileBehavior) == TRUE) if (MetatileBehavior_IsRegionMap(metatileBehavior) == TRUE)
return EventScript_WallTownMap; return EventScript_WallTownMap;
if (MetatileBehavior_IsBookshelf(metatileBehavior) == TRUE) if (MetatileBehavior_IsBookshelf(metatileBehavior) == TRUE)
return gUnknown_81A7606; return EventScript_Bookshelf;
if (MetatileBehavior_IsPokeMartShelf(metatileBehavior) == TRUE) if (MetatileBehavior_IsPokeMartShelf(metatileBehavior) == TRUE)
return gUnknown_81A760F; return EventScript_PokeMartShelf;
if (MetatileBehavior_IsFood(metatileBehavior) == TRUE) if (MetatileBehavior_IsFood(metatileBehavior) == TRUE)
return gUnknown_81A7618; return EventScript_Food;
if (MetatileBehavior_IsImpressiveMachine(metatileBehavior) == TRUE) if (MetatileBehavior_IsImpressiveMachine(metatileBehavior) == TRUE)
return gUnknown_81A7633; return EventScript_ImpressiveMachine;
if (MetatileBehavior_IsBlueprints(metatileBehavior) == TRUE) if (MetatileBehavior_IsBlueprints(metatileBehavior) == TRUE)
return gUnknown_81A763C; return EventScript_Blueprints;
if (MetatileBehavior_IsVideoGame(metatileBehavior) == TRUE) if (MetatileBehavior_IsVideoGame(metatileBehavior) == TRUE)
return gUnknown_81A7621; return EventScript_VideoGame;
if (MetatileBehavior_IsBurglary(metatileBehavior) == TRUE) if (MetatileBehavior_IsBurglary(metatileBehavior) == TRUE)
return gUnknown_81A7645; return EventScript_Burglary;
if (MetatileBehavior_IsComputer(metatileBehavior) == TRUE) if (MetatileBehavior_IsComputer(metatileBehavior) == TRUE)
return gUnknown_81A762A; return EventScript_Computer;
if (MetatileBehavior_IsMBA3(metatileBehavior) == TRUE) if (MetatileBehavior_IsTrainerTowerMonitor(metatileBehavior) == TRUE)
return TrainerTower_EventScript_ShowTime; return TrainerTower_EventScript_ShowTime;
if (MetatileBehavior_IsPlayerFacingTVScreen(metatileBehavior, direction) == TRUE) if (MetatileBehavior_IsPlayerFacingTVScreen(metatileBehavior, direction) == TRUE)
return gUnknown_81A764E; return EventScript_PlayerFacingTVScreen;
if (MetatileBehavior_IsCabinet(metatileBehavior) == TRUE) if (MetatileBehavior_IsCabinet(metatileBehavior) == TRUE)
return gUnknown_81A7657; return EventScript_Cabinet;
if (MetatileBehavior_IsKitchen(metatileBehavior) == TRUE) if (MetatileBehavior_IsKitchen(metatileBehavior) == TRUE)
return gUnknown_81A7660; return EventScript_Kitchen;
if (MetatileBehavior_IsDresser(metatileBehavior) == TRUE) if (MetatileBehavior_IsDresser(metatileBehavior) == TRUE)
return gUnknown_81A7669; return EventScript_Dresser;
if (MetatileBehavior_IsSnacks(metatileBehavior) == TRUE) if (MetatileBehavior_IsSnacks(metatileBehavior) == TRUE)
return gUnknown_81A7672; return EventScript_Snacks;
if (MetatileBehavior_IsPainting(metatileBehavior) == TRUE) if (MetatileBehavior_IsPainting(metatileBehavior) == TRUE)
return gUnknown_81A767B; return EventScript_Painting;
if (MetatileBehavior_IsPowerPlantMachine(metatileBehavior) == TRUE) if (MetatileBehavior_IsPowerPlantMachine(metatileBehavior) == TRUE)
return gUnknown_81A7684; return EventScript_PowerPlantMachine;
if (MetatileBehavior_IsTelephone(metatileBehavior) == TRUE) if (MetatileBehavior_IsTelephone(metatileBehavior) == TRUE)
return gUnknown_81A768D; return EventScript_Telephone;
if (MetatileBehavior_IsAdvertisingPoster(metatileBehavior) == TRUE) if (MetatileBehavior_IsAdvertisingPoster(metatileBehavior) == TRUE)
return gUnknown_81A7696; return EventScript_AdvertisingPoster;
if (MetatileBehavior_IsTastyFood(metatileBehavior) == TRUE) if (MetatileBehavior_IsTastyFood(metatileBehavior) == TRUE)
return gUnknown_81A769F; return EventScript_TastyFood;
if (MetatileBehavior_IsTrashBin(metatileBehavior) == TRUE) if (MetatileBehavior_IsTrashBin(metatileBehavior) == TRUE)
return gUnknown_81A76A8; return EventScript_TrashBin;
if (MetatileBehavior_IsCup(metatileBehavior) == TRUE) if (MetatileBehavior_IsCup(metatileBehavior) == TRUE)
return gUnknown_81A76B1; return EventScript_Cup;
if (MetatileBehavior_ReturnFalse_19(metatileBehavior) == TRUE) if (MetatileBehavior_IsPolishedWindow(metatileBehavior) == TRUE)
return gUnknown_81A76BA; return EventScript_PolishedWindow;
if (MetatileBehavior_ReturnFalse_20(metatileBehavior) == TRUE) if (MetatileBehavior_IsBeautifulSkyWindow(metatileBehavior) == TRUE)
return gUnknown_81A76C3; return EventScript_BeautifulSkyWindow;
if (MetatileBehavior_IsBlinkingLights(metatileBehavior) == TRUE) if (MetatileBehavior_IsBlinkingLights(metatileBehavior) == TRUE)
return gUnknown_81A76CC; return EventScript_BlinkingLights;
if (MetatileBehavior_IsMB9F(metatileBehavior) == TRUE) if (MetatileBehavior_IsIsNeatlyLinedUpTools(metatileBehavior) == TRUE)
return gUnknown_81A76D5; return EventScript_NeatlyLinedUpTools;
if (MetatileBehavior_IsPlayerFacingMB_8D(metatileBehavior, direction) == TRUE) if (MetatileBehavior_IsPlayerFacingCableClubWirelessMonitor(metatileBehavior, direction) == TRUE)
return CableClub_EventScript_81BBFD8; return CableClub_EventScript_ShowWirelessCommunicationScreen;
if (MetatileBehavior_IsQuestionnaire(metatileBehavior) == TRUE) if (MetatileBehavior_IsQuestionnaire(metatileBehavior) == TRUE)
return EventScript_Questionnaire; return EventScript_Questionnaire;
if (MetatileBehavior_IsPlayerFacingBattleRecords(metatileBehavior, direction) == TRUE) if (MetatileBehavior_IsPlayerFacingBattleRecords(metatileBehavior, direction) == TRUE)
@@ -737,37 +737,37 @@ void RestartWildEncounterImmunitySteps(void)
ResetEncounterRateModifiers(); ResetEncounterRateModifiers();
} }
static bool8 CheckStandardWildEncounter(u32 encounter) static bool8 CheckStandardWildEncounter(u32 metatileAttributes)
{ {
return TryStandardWildEncounter(encounter); return TryStandardWildEncounter(metatileAttributes);
} }
static bool8 TrySetUpWalkIntoSignpostScript(struct MapPosition * position, u16 metatileBehavior, u8 playerDirection) static bool8 TrySetUpWalkIntoSignpostScript(struct MapPosition * position, u16 metatileBehavior, u8 playerDirection)
{ {
u8 r4; u8 signpostType;
const u8 * script; const u8 * script;
if (JOY_HELD(DPAD_LEFT | DPAD_RIGHT)) if (JOY_HELD(DPAD_LEFT | DPAD_RIGHT))
return FALSE; return FALSE;
if (playerDirection == DIR_EAST || playerDirection == DIR_WEST) if (playerDirection == DIR_EAST || playerDirection == DIR_WEST)
return FALSE; return FALSE;
r4 = GetFacingSignpostType(metatileBehavior, playerDirection); signpostType = GetFacingSignpostType(metatileBehavior, playerDirection);
if (r4 == SIGNPOST_POKECENTER) if (signpostType == SIGNPOST_POKECENTER)
{ {
SetUpWalkIntoSignScript(EventScript_PokecenterSign, playerDirection); SetUpWalkIntoSignScript(EventScript_PokecenterSign, playerDirection);
return TRUE; return TRUE;
} }
else if (r4 == SIGNPOST_POKEMART) else if (signpostType == SIGNPOST_POKEMART)
{ {
SetUpWalkIntoSignScript(EventScript_PokemartSign, playerDirection); SetUpWalkIntoSignScript(EventScript_PokemartSign, playerDirection);
return TRUE; return TRUE;
} }
else if (r4 == SIGNPOST_INDIGO_1) else if (signpostType == SIGNPOST_INDIGO_1)
{ {
SetUpWalkIntoSignScript(EventScript_Indigo_UltimateGoal, playerDirection); SetUpWalkIntoSignScript(EventScript_Indigo_UltimateGoal, playerDirection);
return TRUE; return TRUE;
} }
else if (r4 == SIGNPOST_INDIGO_2) else if (signpostType == SIGNPOST_INDIGO_2)
{ {
SetUpWalkIntoSignScript(EventScript_Indigo_HighestAuthority, playerDirection); SetUpWalkIntoSignScript(EventScript_Indigo_HighestAuthority, playerDirection);
return TRUE; return TRUE;
@@ -777,7 +777,7 @@ static bool8 TrySetUpWalkIntoSignpostScript(struct MapPosition * position, u16 m
script = GetSignpostScriptAtMapPosition(position); script = GetSignpostScriptAtMapPosition(position);
if (script == NULL) if (script == NULL)
return FALSE; return FALSE;
if (r4 != SIGNPOST_SCRIPTED) if (signpostType != SIGNPOST_SCRIPTED)
return FALSE; return FALSE;
SetUpWalkIntoSignScript(script, playerDirection); SetUpWalkIntoSignScript(script, playerDirection);
return TRUE; return TRUE;
+5 -5
View File
@@ -850,7 +850,7 @@ bool8 MetatileBehavior_IsStrengthButton(u8 metatileBehavior)
return FALSE; return FALSE;
} }
bool8 MetatileBehavior_IsPlayerFacingMB_8D(u8 tile, u8 playerDirection) bool8 MetatileBehavior_IsPlayerFacingCableClubWirelessMonitor(u8 tile, u8 playerDirection)
{ {
if(playerDirection != DIR_NORTH) if(playerDirection != DIR_NORTH)
return FALSE; return FALSE;
@@ -986,8 +986,8 @@ bool8 MetatileBehavior_IsCup(u8 metatileBehavior)
return FALSE; return FALSE;
} }
bool8 MetatileBehavior_ReturnFalse_19(u8 metatileBehavior) { return FALSE; } bool8 MetatileBehavior_IsPolishedWindow(u8 metatileBehavior) { return FALSE; }
bool8 MetatileBehavior_ReturnFalse_20(u8 metatileBehavior) { return FALSE; } bool8 MetatileBehavior_IsBeautifulSkyWindow(u8 metatileBehavior) { return FALSE; }
bool8 MetatileBehavior_IsBlinkingLights(u8 metatileBehavior) bool8 MetatileBehavior_IsBlinkingLights(u8 metatileBehavior)
{ {
@@ -997,7 +997,7 @@ bool8 MetatileBehavior_IsBlinkingLights(u8 metatileBehavior)
return FALSE; return FALSE;
} }
bool8 MetatileBehavior_IsMB9F(u8 metatileBehavior) bool8 MetatileBehavior_IsIsNeatlyLinedUpTools(u8 metatileBehavior)
{ {
if(metatileBehavior == MB_9F) if(metatileBehavior == MB_9F)
return TRUE; return TRUE;
@@ -1029,7 +1029,7 @@ bool8 MetatileBehavior_IsBurglary(u8 metatileBehavior)
return FALSE; return FALSE;
} }
bool8 MetatileBehavior_IsMBA3(u8 metatileBehavior) bool8 MetatileBehavior_IsTrainerTowerMonitor(u8 metatileBehavior)
{ {
if(metatileBehavior == MB_A3) if(metatileBehavior == MB_A3)
return TRUE; return TRUE;
+14 -14
View File
@@ -354,7 +354,7 @@ static bool8 DoGlobalWildEncounterDiceRoll(void)
return TRUE; return TRUE;
} }
bool8 StandardWildEncounter(u32 currMetatileBehavior, u16 previousMetatileBehavior) bool8 StandardWildEncounter(u32 currMetatileAttrs, u16 previousMetatileBehavior)
{ {
u16 headerId; u16 headerId;
struct Roamer * roamer; struct Roamer * roamer;
@@ -365,11 +365,11 @@ bool8 StandardWildEncounter(u32 currMetatileBehavior, u16 previousMetatileBehavi
headerId = GetCurrentMapWildMonHeaderId(); headerId = GetCurrentMapWildMonHeaderId();
if (headerId != 0xFFFF) if (headerId != 0xFFFF)
{ {
if (GetMetatileAttributeFromRawMetatileBehavior(currMetatileBehavior, METATILE_ATTRIBUTE_ENCOUNTER_TYPE) == TILE_ENCOUNTER_LAND) if (GetMetatileAttributeFromRawMetatileBehavior(currMetatileAttrs, METATILE_ATTRIBUTE_ENCOUNTER_TYPE) == TILE_ENCOUNTER_LAND)
{ {
if (gWildMonHeaders[headerId].landMonsInfo == NULL) if (gWildMonHeaders[headerId].landMonsInfo == NULL)
return FALSE; return FALSE;
else if (previousMetatileBehavior != GetMetatileAttributeFromRawMetatileBehavior(currMetatileBehavior, METATILE_ATTRIBUTE_BEHAVIOR) && !DoGlobalWildEncounterDiceRoll()) else if (previousMetatileBehavior != GetMetatileAttributeFromRawMetatileBehavior(currMetatileAttrs, METATILE_ATTRIBUTE_BEHAVIOR) && !DoGlobalWildEncounterDiceRoll())
return FALSE; return FALSE;
if (DoWildEncounterRateTest(gWildMonHeaders[headerId].landMonsInfo->encounterRate, FALSE) != TRUE) if (DoWildEncounterRateTest(gWildMonHeaders[headerId].landMonsInfo->encounterRate, FALSE) != TRUE)
{ {
@@ -403,12 +403,12 @@ bool8 StandardWildEncounter(u32 currMetatileBehavior, u16 previousMetatileBehavi
} }
} }
} }
else if (GetMetatileAttributeFromRawMetatileBehavior(currMetatileBehavior, METATILE_ATTRIBUTE_ENCOUNTER_TYPE) == TILE_ENCOUNTER_WATER else if (GetMetatileAttributeFromRawMetatileBehavior(currMetatileAttrs, METATILE_ATTRIBUTE_ENCOUNTER_TYPE) == TILE_ENCOUNTER_WATER
|| (TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_SURFING) && MetatileBehavior_IsBridge(GetMetatileAttributeFromRawMetatileBehavior(currMetatileBehavior, METATILE_ATTRIBUTE_BEHAVIOR)) == TRUE)) || (TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_SURFING) && MetatileBehavior_IsBridge(GetMetatileAttributeFromRawMetatileBehavior(currMetatileAttrs, METATILE_ATTRIBUTE_BEHAVIOR)) == TRUE))
{ {
if (gWildMonHeaders[headerId].waterMonsInfo == NULL) if (gWildMonHeaders[headerId].waterMonsInfo == NULL)
return FALSE; return FALSE;
else if (previousMetatileBehavior != GetMetatileAttributeFromRawMetatileBehavior(currMetatileBehavior, METATILE_ATTRIBUTE_BEHAVIOR) && !DoGlobalWildEncounterDiceRoll()) else if (previousMetatileBehavior != GetMetatileAttributeFromRawMetatileBehavior(currMetatileAttrs, METATILE_ATTRIBUTE_BEHAVIOR) && !DoGlobalWildEncounterDiceRoll())
return FALSE; return FALSE;
else if (DoWildEncounterRateTest(gWildMonHeaders[headerId].waterMonsInfo->encounterRate, FALSE) != TRUE) else if (DoWildEncounterRateTest(gWildMonHeaders[headerId].waterMonsInfo->encounterRate, FALSE) != TRUE)
{ {
@@ -707,9 +707,9 @@ void ResetEncounterRateModifiers(void)
sWildEncounterData.stepsSinceLastEncounter = 0; sWildEncounterData.stepsSinceLastEncounter = 0;
} }
static bool8 HandleWildEncounterCooldown(u32 currMetatileBehavior) static bool8 HandleWildEncounterCooldown(u32 currMetatileAttrs)
{ {
u8 encounterType = GetMetatileAttributeFromRawMetatileBehavior(currMetatileBehavior, METATILE_ATTRIBUTE_ENCOUNTER_TYPE); u8 encounterType = GetMetatileAttributeFromRawMetatileBehavior(currMetatileAttrs, METATILE_ATTRIBUTE_ENCOUNTER_TYPE);
u32 minSteps; u32 minSteps;
u32 encRate; u32 encRate;
if (encounterType == TILE_ENCOUNTER_NONE) if (encounterType == TILE_ENCOUNTER_NONE)
@@ -757,23 +757,23 @@ static bool8 HandleWildEncounterCooldown(u32 currMetatileBehavior)
return FALSE; return FALSE;
} }
bool8 TryStandardWildEncounter(u32 currMetatileBehavior) bool8 TryStandardWildEncounter(u32 currMetatileAttrs)
{ {
if (!HandleWildEncounterCooldown(currMetatileBehavior)) if (!HandleWildEncounterCooldown(currMetatileAttrs))
{ {
sWildEncounterData.prevMetatileBehavior = GetMetatileAttributeFromRawMetatileBehavior(currMetatileBehavior, METATILE_ATTRIBUTE_BEHAVIOR); sWildEncounterData.prevMetatileBehavior = GetMetatileAttributeFromRawMetatileBehavior(currMetatileAttrs, METATILE_ATTRIBUTE_BEHAVIOR);
return FALSE; return FALSE;
} }
else if (StandardWildEncounter(currMetatileBehavior, sWildEncounterData.prevMetatileBehavior) == TRUE) else if (StandardWildEncounter(currMetatileAttrs, sWildEncounterData.prevMetatileBehavior) == TRUE)
{ {
sWildEncounterData.encounterRateBuff = 0; sWildEncounterData.encounterRateBuff = 0;
sWildEncounterData.stepsSinceLastEncounter = 0; sWildEncounterData.stepsSinceLastEncounter = 0;
sWildEncounterData.prevMetatileBehavior = GetMetatileAttributeFromRawMetatileBehavior(currMetatileBehavior, METATILE_ATTRIBUTE_BEHAVIOR); sWildEncounterData.prevMetatileBehavior = GetMetatileAttributeFromRawMetatileBehavior(currMetatileAttrs, METATILE_ATTRIBUTE_BEHAVIOR);
return TRUE; return TRUE;
} }
else else
{ {
sWildEncounterData.prevMetatileBehavior = GetMetatileAttributeFromRawMetatileBehavior(currMetatileBehavior, METATILE_ATTRIBUTE_BEHAVIOR); sWildEncounterData.prevMetatileBehavior = GetMetatileAttributeFromRawMetatileBehavior(currMetatileAttrs, METATILE_ATTRIBUTE_BEHAVIOR);
return FALSE; return FALSE;
} }
} }