mirror of
https://github.com/rh-hideout/pokeemerald-expansion.git
synced 2026-03-21 18:04:50 -05:00
More type checking across the repo (#8988)
This commit is contained in:
parent
a2c5332e13
commit
fb4c8ef62c
|
|
@ -20,6 +20,6 @@ void Apprentice_ScriptContext_Enable(void);
|
|||
void ResetApprenticeStruct(struct Apprentice *apprentice);
|
||||
void ResetAllApprenticeData(void);
|
||||
void CallApprenticeFunction(void);
|
||||
const u8 *GetApprenticeNameInLanguage(u32 apprenticeId, s32 language);
|
||||
const u8 *GetApprenticeNameInLanguage(u32 apprenticeId, enum Language language);
|
||||
|
||||
#endif // GUARD_APPRENTICE_H
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ void CallBattleFactoryFunction(void);
|
|||
bool8 InBattleFactory(void);
|
||||
u8 GetFactoryMonFixedIV(u8 challengeNum, bool8 isLastBattle);
|
||||
void FillFactoryBrainParty(void);
|
||||
u8 GetNumPastRentalsRank(u8 battleMode, u8 lvlMode);
|
||||
u8 GetNumPastRentalsRank(u8 battleMode, enum FrontierLevelMode lvlMode);
|
||||
u64 GetAiScriptsInBattleFactory(void);
|
||||
void SetMonMoveAvoidReturn(struct Pokemon *mon, enum Move moveArg, u8 moveSlot);
|
||||
void FillFactoryTrainerParty(void);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ void CallBattleTowerFunc(void);
|
|||
void PutNewBattleTowerRecord(struct EmeraldBattleTowerRecord *newRecordEm);
|
||||
void CalcEmeraldBattleTowerChecksum(struct EmeraldBattleTowerRecord *record);
|
||||
void CalcRubyBattleTowerChecksum(struct RSBattleTowerRecord *record);
|
||||
u16 GetCurrentBattleTowerWinStreak(u8 lvlMode, u8 battleMode);
|
||||
u16 GetCurrentBattleTowerWinStreak(enum FrontierLevelMode lvlMode, u8 battleMode);
|
||||
void TryHideBattleTowerReporter(void);
|
||||
bool32 RubyBattleTowerRecordToEmerald(struct RSBattleTowerRecord *src, struct EmeraldBattleTowerRecord *dst);
|
||||
bool32 EmeraldBattleTowerRecordToRuby(struct EmeraldBattleTowerRecord *src, struct RSBattleTowerRecord *dst);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ struct BikeHistoryInputInfo
|
|||
};
|
||||
|
||||
// Player speeds
|
||||
enum
|
||||
enum PlayerSpeed
|
||||
{
|
||||
PLAYER_SPEED_STANDING,
|
||||
PLAYER_SPEED_NORMAL,
|
||||
|
|
@ -25,7 +25,7 @@ enum
|
|||
};
|
||||
|
||||
// mach bike transitions enum
|
||||
enum
|
||||
enum MachTransition
|
||||
{
|
||||
MACH_TRANS_FACE_DIRECTION,
|
||||
MACH_TRANS_TURN_DIRECTION,
|
||||
|
|
@ -34,7 +34,7 @@ enum
|
|||
};
|
||||
|
||||
// Acro bike states
|
||||
enum
|
||||
enum AcroState
|
||||
{
|
||||
ACRO_STATE_NORMAL,
|
||||
ACRO_STATE_TURNING,
|
||||
|
|
@ -46,7 +46,7 @@ enum
|
|||
};
|
||||
|
||||
// Acro bike transitions
|
||||
enum
|
||||
enum AcroTransition
|
||||
{
|
||||
ACRO_TRANS_FACE_DIRECTION,
|
||||
ACRO_TRANS_TURN_DIRECTION,
|
||||
|
|
@ -67,7 +67,7 @@ enum
|
|||
extern bool8 gUnusedBikeCameraAheadPanback;
|
||||
|
||||
// Exported ROM declarations
|
||||
void MovePlayerOnBike(u8 direction, u16 newKeys, u16 heldKeys);
|
||||
void MovePlayerOnBike(enum Direction direction, u16 newKeys, u16 heldKeys);
|
||||
void Bike_TryAcroBikeHistoryUpdate(u16 newKeys, u16 heldKeys);
|
||||
bool8 RS_IsRunningDisallowed(u8 tile);
|
||||
bool8 IsBikingDisallowedByPlayer(void);
|
||||
|
|
@ -75,7 +75,7 @@ bool8 IsPlayerNotUsingAcroBikeOnBumpySlope(void);
|
|||
void GetOnOffBike(u8 transitionFlags);
|
||||
void BikeClearState(int newDirHistory, int newAbStartHistory);
|
||||
void Bike_UpdateBikeCounterSpeed(u8 counter);
|
||||
s16 GetPlayerSpeed(void);
|
||||
enum PlayerSpeed GetPlayerSpeed(void);
|
||||
void Bike_HandleBumpySlopeJump(void);
|
||||
bool32 IsRunningDisallowed(u8 metatile);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,26 +3,35 @@
|
|||
|
||||
#define BERRY_NONE 0
|
||||
|
||||
#define BERRY_FIRMNESS_UNKNOWN 0
|
||||
#define BERRY_FIRMNESS_VERY_SOFT 1
|
||||
#define BERRY_FIRMNESS_SOFT 2
|
||||
#define BERRY_FIRMNESS_HARD 3
|
||||
#define BERRY_FIRMNESS_VERY_HARD 4
|
||||
#define BERRY_FIRMNESS_SUPER_HARD 5
|
||||
enum BerryFirmness
|
||||
{
|
||||
BERRY_FIRMNESS_UNKNOWN,
|
||||
BERRY_FIRMNESS_VERY_SOFT,
|
||||
BERRY_FIRMNESS_SOFT,
|
||||
BERRY_FIRMNESS_HARD,
|
||||
BERRY_FIRMNESS_VERY_HARD,
|
||||
BERRY_FIRMNESS_SUPER_HARD,
|
||||
};
|
||||
|
||||
#define BERRY_COLOR_RED 0
|
||||
#define BERRY_COLOR_BLUE 1
|
||||
#define BERRY_COLOR_PURPLE 2
|
||||
#define BERRY_COLOR_GREEN 3
|
||||
#define BERRY_COLOR_YELLOW 4
|
||||
#define BERRY_COLOR_PINK 5
|
||||
enum BerryColor
|
||||
{
|
||||
BERRY_COLOR_RED,
|
||||
BERRY_COLOR_BLUE,
|
||||
BERRY_COLOR_PURPLE,
|
||||
BERRY_COLOR_GREEN,
|
||||
BERRY_COLOR_YELLOW,
|
||||
BERRY_COLOR_PINK,
|
||||
};
|
||||
|
||||
#define FLAVOR_SPICY 0
|
||||
#define FLAVOR_DRY 1
|
||||
#define FLAVOR_SWEET 2
|
||||
#define FLAVOR_BITTER 3
|
||||
#define FLAVOR_SOUR 4
|
||||
#define FLAVOR_COUNT 5
|
||||
enum __attribute__((__packed__)) Flavor
|
||||
{
|
||||
FLAVOR_SPICY,
|
||||
FLAVOR_DRY,
|
||||
FLAVOR_SWEET,
|
||||
FLAVOR_BITTER,
|
||||
FLAVOR_SOUR,
|
||||
FLAVOR_COUNT,
|
||||
};
|
||||
|
||||
#define BERRY_STAGE_NO_BERRY 0 // there is no tree planted and the soil is completely flat.
|
||||
#define BERRY_STAGE_PLANTED 1
|
||||
|
|
|
|||
|
|
@ -34,28 +34,33 @@
|
|||
// In Gen 4 only, migrated Pokémon with Diamond, Pearl, or Platinum's ID show as "----------".
|
||||
// Gen 5 and up read Diamond, Pearl, or Platinum's ID as "Sinnoh".
|
||||
// In Gen 4 and up, migrated Pokémon with HeartGold or SoulSilver's ID show the otherwise unused "Johto" string.
|
||||
#define VERSION_SAPPHIRE 1
|
||||
#define VERSION_RUBY 2
|
||||
#define VERSION_EMERALD 3
|
||||
#define VERSION_FIRE_RED 4
|
||||
#define VERSION_LEAF_GREEN 5
|
||||
#define VERSION_HEART_GOLD 7
|
||||
#define VERSION_SOUL_SILVER 8
|
||||
#define VERSION_DIAMOND 10
|
||||
#define VERSION_PEARL 11
|
||||
#define VERSION_PLATINUM 12
|
||||
#define VERSION_GAMECUBE 15
|
||||
enum GameVersion
|
||||
{
|
||||
VERSION_SAPPHIRE = 1,
|
||||
VERSION_RUBY = 2,
|
||||
VERSION_EMERALD = 3,
|
||||
VERSION_FIRE_RED = 4,
|
||||
VERSION_LEAF_GREEN = 5,
|
||||
VERSION_HEART_GOLD = 7,
|
||||
VERSION_SOUL_SILVER = 8,
|
||||
VERSION_DIAMOND = 10,
|
||||
VERSION_PEARL = 11,
|
||||
VERSION_PLATINUM = 12,
|
||||
VERSION_GAMECUBE = 15,
|
||||
NUM_VERSIONS = VERSION_GAMECUBE,
|
||||
};
|
||||
|
||||
#define NUM_VERSIONS 15
|
||||
|
||||
#define LANGUAGE_JAPANESE 1
|
||||
#define LANGUAGE_ENGLISH 2
|
||||
#define LANGUAGE_FRENCH 3
|
||||
#define LANGUAGE_ITALIAN 4
|
||||
#define LANGUAGE_GERMAN 5
|
||||
#define LANGUAGE_KOREAN 6 // 6 goes unused but the theory is it was meant to be Korean
|
||||
#define LANGUAGE_SPANISH 7
|
||||
#define NUM_LANGUAGES 7
|
||||
enum Language
|
||||
{
|
||||
LANGUAGE_JAPANESE = 1,
|
||||
LANGUAGE_ENGLISH = 2,
|
||||
LANGUAGE_FRENCH = 3,
|
||||
LANGUAGE_ITALIAN = 4,
|
||||
LANGUAGE_GERMAN = 5,
|
||||
LANGUAGE_KOREAN = 6, // 6 goes unused but the theory is it was meant to be Korean,
|
||||
LANGUAGE_SPANISH = 7,
|
||||
NUM_LANGUAGES = LANGUAGE_SPANISH,
|
||||
};
|
||||
|
||||
#define GAME_VERSION (VERSION_EMERALD)
|
||||
#define GAME_LANGUAGE (LANGUAGE_ENGLISH)
|
||||
|
|
@ -107,24 +112,31 @@
|
|||
#define HALL_RECORDS_COUNT 3
|
||||
|
||||
// Battle Frontier level modes.
|
||||
#define FRONTIER_LVL_50 0
|
||||
#define FRONTIER_LVL_OPEN 1
|
||||
#define FRONTIER_LVL_MODE_COUNT 2
|
||||
#define FRONTIER_LVL_TENT FRONTIER_LVL_MODE_COUNT // Special usage for indicating Battle Tent
|
||||
enum FrontierLevelMode
|
||||
{
|
||||
FRONTIER_LVL_50,
|
||||
FRONTIER_LVL_OPEN,
|
||||
FRONTIER_LVL_TENT, // Special usage for indicating Battle Tent
|
||||
FRONTIER_LVL_MODE_COUNT = FRONTIER_LVL_TENT,
|
||||
};
|
||||
|
||||
#define TRAINER_ID_LENGTH 4
|
||||
#define MAX_MON_MOVES 4
|
||||
#define ALL_MOVES_MASK ((1 << MAX_MON_MOVES) - 1)
|
||||
|
||||
#define CONTESTANT_COUNT 4
|
||||
#define CONTEST_CATEGORY_COOL 0
|
||||
#define CONTEST_CATEGORY_BEAUTIFUL 1
|
||||
#define CONTEST_CATEGORY_BEAUTY CONTEST_CATEGORY_BEAUTIFUL
|
||||
#define CONTEST_CATEGORY_CUTE 2
|
||||
#define CONTEST_CATEGORY_CLEVER 3
|
||||
#define CONTEST_CATEGORY_SMART CONTEST_CATEGORY_CLEVER
|
||||
#define CONTEST_CATEGORY_TOUGH 4
|
||||
#define CONTEST_CATEGORIES_COUNT 5
|
||||
|
||||
enum ContestCategories
|
||||
{
|
||||
CONTEST_CATEGORY_COOL,
|
||||
CONTEST_CATEGORY_BEAUTIFUL,
|
||||
CONTEST_CATEGORY_BEAUTY = CONTEST_CATEGORY_BEAUTIFUL,
|
||||
CONTEST_CATEGORY_CUTE,
|
||||
CONTEST_CATEGORY_CLEVER,
|
||||
CONTEST_CATEGORY_SMART = CONTEST_CATEGORY_CLEVER,
|
||||
CONTEST_CATEGORY_TOUGH,
|
||||
CONTEST_CATEGORIES_COUNT
|
||||
};
|
||||
|
||||
// string lengths
|
||||
#define ITEM_NAME_LENGTH 20
|
||||
|
|
@ -149,9 +161,12 @@
|
|||
|
||||
#define MAX_STAMP_CARD_STAMPS 7
|
||||
|
||||
#define MALE 0
|
||||
#define FEMALE 1
|
||||
#define GENDER_COUNT 2
|
||||
enum Gender
|
||||
{
|
||||
MALE,
|
||||
FEMALE,
|
||||
GENDER_COUNT,
|
||||
};
|
||||
|
||||
#define NUM_BARD_SONG_WORDS 6
|
||||
#define NUM_STORYTELLER_TALES 4
|
||||
|
|
@ -174,29 +189,31 @@
|
|||
#define OPTIONS_BATTLE_STYLE_SHIFT 0
|
||||
#define OPTIONS_BATTLE_STYLE_SET 1
|
||||
|
||||
#define DIR_NONE 0
|
||||
#define DIR_SOUTH 1
|
||||
#define DIR_NORTH 2
|
||||
#define DIR_WEST 3
|
||||
#define DIR_EAST 4
|
||||
#define DIR_SOUTHWEST 5
|
||||
#define DIR_SOUTHEAST 6
|
||||
#define DIR_NORTHWEST 7
|
||||
#define DIR_NORTHEAST 8
|
||||
#define CARDINAL_DIRECTION_COUNT DIR_SOUTHWEST
|
||||
enum Direction
|
||||
{
|
||||
DIR_NONE,
|
||||
DIR_SOUTH,
|
||||
DIR_NORTH,
|
||||
DIR_WEST,
|
||||
DIR_EAST,
|
||||
CARDINAL_DIRECTION_COUNT,
|
||||
DIR_SOUTHWEST = CARDINAL_DIRECTION_COUNT,
|
||||
DIR_SOUTHEAST,
|
||||
DIR_NORTHWEST,
|
||||
DIR_NORTHEAST,
|
||||
};
|
||||
|
||||
#define AXIS_X 0
|
||||
#define AXIS_Y 1
|
||||
#define AXIS_COUNT 2
|
||||
|
||||
#define CONNECTION_INVALID -1
|
||||
#define CONNECTION_NONE 0
|
||||
#define CONNECTION_SOUTH 1
|
||||
#define CONNECTION_NORTH 2
|
||||
#define CONNECTION_WEST 3
|
||||
#define CONNECTION_EAST 4
|
||||
#define CONNECTION_DIVE 5
|
||||
#define CONNECTION_EMERGE 6
|
||||
enum Connection
|
||||
{
|
||||
CONNECTION_INVALID = -1,
|
||||
CONNECTION_NONE,
|
||||
CONNECTION_SOUTH,
|
||||
CONNECTION_NORTH,
|
||||
CONNECTION_WEST,
|
||||
CONNECTION_EAST,
|
||||
CONNECTION_DIVE,
|
||||
CONNECTION_EMERGE
|
||||
};
|
||||
|
||||
#if TESTING
|
||||
#include "config/test.h"
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ extern u8 gContestPlayerMonIndex;
|
|||
extern u8 gContestantTurnOrder[CONTESTANT_COUNT];
|
||||
extern u8 gLinkContestFlags;
|
||||
extern u8 gContestLinkLeaderIndex;
|
||||
extern u16 gSpecialVar_ContestCategory;
|
||||
extern enum ContestCategories gSpecialVar_ContestCategory;
|
||||
extern u16 gSpecialVar_ContestRank;
|
||||
extern u8 gNumLinkContestPlayers;
|
||||
extern u8 gHighestRibbonRank;
|
||||
|
|
@ -351,10 +351,10 @@ void ResetLinkContestBoolean(void);
|
|||
void LoadContestBgAfterMoveAnim(void);
|
||||
void CB2_StartContest(void);
|
||||
void CreateContestMonFromParty(u8 partyIndex);
|
||||
void SetContestants(u8 contestType, u8 rank);
|
||||
void SetLinkAIContestants(u8 contestType, u8 rank, bool32 isPostgame);
|
||||
void SetContestants(enum ContestCategories contestType, u8 rank);
|
||||
void SetLinkAIContestants(enum ContestCategories contestType, u8 rank, bool32 isPostgame);
|
||||
u8 GetContestEntryEligibility(struct Pokemon *pkmn);
|
||||
void CalculateRound1Points(u8 contestCategory);
|
||||
void CalculateRound1Points(enum ContestCategories contestCategory);
|
||||
bool8 IsSpeciesNotUnown(u16 species);
|
||||
bool8 Contest_IsMonsTurnDisabled(u8 contestant);
|
||||
void SaveLinkContestResults(void);
|
||||
|
|
@ -370,6 +370,6 @@ void ResetContestLinkResults(void);
|
|||
bool8 SaveContestWinner(u8 rank);
|
||||
u8 GetContestWinnerSaveIdx(u8 rank, bool8 shift);
|
||||
void ClearContestWinnerPicsInContestHall(void);
|
||||
void StripPlayerAndMonNamesForLinkContest(struct ContestPokemon *mon, s32 language);
|
||||
void StripPlayerAndMonNamesForLinkContest(struct ContestPokemon *mon, enum Language language);
|
||||
|
||||
#endif //GUARD_CONTEST_H
|
||||
|
|
|
|||
|
|
@ -125,11 +125,11 @@ extern const struct SpriteFrameImage *const gBerryTreePicTablePointers[];
|
|||
extern const u8 *const gBerryTreePaletteSlotTablePointers[];
|
||||
|
||||
void ResetObjectEvents(void);
|
||||
u8 GetMoveDirectionAnimNum(u8 direction);
|
||||
u8 GetMoveDirectionAnimNum(enum Direction direction);
|
||||
u8 GetObjectEventIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroupId);
|
||||
bool8 TryGetObjectEventIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroupId, u8 *objectEventId);
|
||||
u8 GetObjectEventIdByXY(s16 x, s16 y);
|
||||
void SetObjectEventDirection(struct ObjectEvent *objectEvent, u8 direction);
|
||||
void SetObjectEventDirection(struct ObjectEvent *objectEvent, enum Direction direction);
|
||||
u8 GetFirstInactiveObjectEventId(void);
|
||||
u8 GetObjectEventIdByLocalId(u8);
|
||||
void RemoveObjectEvent(struct ObjectEvent *objectEvent);
|
||||
|
|
@ -140,7 +140,7 @@ void PatchObjectPalette(u16 paletteTag, u8 paletteSlot);
|
|||
void SpawnObjectEventsOnReturnToField(s16 x, s16 y);
|
||||
void OverrideSecretBaseDecorationSpriteScript(u8 localId, u8 mapNum, u8 mapGroup, u8 decorationCategory);
|
||||
void GetMapCoordsFromSpritePos(s16 x, s16 y, s16 *destX, s16 *destY);
|
||||
u8 GetFaceDirectionAnimNum(u8 direction);
|
||||
u8 GetFaceDirectionAnimNum(enum Direction direction);
|
||||
void SetSpritePosToOffsetMapCoords(s16 *x, s16 *y, s16 dx, s16 dy);
|
||||
void ClearObjectEventMovement(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
void ObjectEventClearHeldMovement(struct ObjectEvent *objectEvent);
|
||||
|
|
@ -150,7 +150,7 @@ u16 GetOverworldWeatherSpecies(u16 species);
|
|||
void UpdateFollowingPokemon(void);
|
||||
void RemoveFollowingPokemon(void);
|
||||
struct ObjectEvent *GetFollowerObject(void);
|
||||
u8 GetDirectionToFace(s16, s16, s16, s16);
|
||||
enum Direction GetDirectionToFace(s16, s16, s16, s16);
|
||||
void UpdateLightSprite(struct Sprite *);
|
||||
void TrySpawnObjectEvents(s16 cameraX, s16 cameraY);
|
||||
u8 CreateObjectGraphicsSpriteWithTag(u16 graphicsId, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u16 paletteTag);
|
||||
|
|
@ -163,14 +163,14 @@ void CameraObjectReset(void);
|
|||
u8 LoadObjectEventPalette(u16);
|
||||
u8 UpdateSpritePaletteByTemplate(const struct SpriteTemplate *spriteTemplate, struct Sprite *sprite);
|
||||
void ObjectEventSetGraphicsId(struct ObjectEvent *objectEvent, u16 graphicsId);
|
||||
void ObjectEventTurn(struct ObjectEvent *objectEvent, u8 direction);
|
||||
void ObjectEventTurnByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, u8 direction);
|
||||
void ObjectEventTurn(struct ObjectEvent *objectEvent, enum Direction direction);
|
||||
void ObjectEventTurnByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, enum Direction direction);
|
||||
const struct ObjectEventGraphicsInfo *GetObjectEventGraphicsInfo(u16 graphicsId);
|
||||
void SetObjectInvisibility(u8 localId, u8 mapNum, u8 mapGroup, bool8 invisible);
|
||||
void FreeAndReserveObjectSpritePalettes(void);
|
||||
u8 LoadObjectEventPalette(u16 paletteTag);
|
||||
u8 LoadObjectEventPaletteCopy(u16 originalTag, u16 copyTag);
|
||||
u8 LoadPlayerObjectEventPalette(u8 gender);
|
||||
u8 LoadPlayerObjectEventPalette(enum Gender gender);
|
||||
void SetObjectEventSpritePosByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y);
|
||||
void ResetObjectSubpriority(u8 localId, u8 mapNum, u8 mapGroup);
|
||||
void SetObjectSubpriority(u8 localId, u8 mapNum, u8 mapGroup, u8 subpriority);
|
||||
|
|
@ -181,22 +181,22 @@ void MoveObjectEventToMapCoords(struct ObjectEvent *objectEvent, s16 x, s16 y);
|
|||
void TryOverrideObjectEventTemplateCoords(u8 localId, u8 mapNum, u8 mapGroup);
|
||||
void InitObjectEventPalettes(u8 reflectionType);
|
||||
void UpdateObjectEventCurrentMovement(struct ObjectEvent *objectEvent, struct Sprite *sprite, bool8 (*callback)(struct ObjectEvent *, struct Sprite *));
|
||||
bool8 ObjectEventFaceOppositeDirection(struct ObjectEvent *objectEvent, u8 direction);
|
||||
u8 GetOppositeDirection(u8 direction);
|
||||
bool8 ObjectEventFaceOppositeDirection(struct ObjectEvent *objectEvent, enum Direction direction);
|
||||
enum Direction GetOppositeDirection(enum Direction direction);
|
||||
u8 GetWalkInPlaceFasterMovementAction(u32);
|
||||
u8 GetWalkInPlaceFastMovementAction(u32);
|
||||
u8 GetWalkInPlaceNormalMovementAction(u32);
|
||||
u8 GetWalkInPlaceSlowMovementAction(u32);
|
||||
u8 GetCollisionAtCoords(struct ObjectEvent *objectEvent, s16 x, s16 y, u32 dir);
|
||||
enum Collision GetCollisionAtCoords(struct ObjectEvent *objectEvent, s16 x, s16 y, enum Direction dir);
|
||||
u32 GetObjectObjectCollidesWith(struct ObjectEvent *objectEvent, s16 x, s16 y, bool32 addCoords);
|
||||
void MoveCoords(u8 direction, s16 *x, s16 *y);
|
||||
void MoveCoords(enum Direction direction, s16 *x, s16 *y);
|
||||
bool8 ObjectEventIsHeldMovementActive(struct ObjectEvent *objectEvent);
|
||||
u8 ObjectEventClearHeldMovementIfFinished(struct ObjectEvent *objectEvent);
|
||||
u8 GetObjectEventIdByPosition(u16 x, u16 y, u8 elevation);
|
||||
void SetTrainerMovementType(struct ObjectEvent *objectEvent, u8 movementType);
|
||||
u8 GetTrainerFacingDirectionMovementType(u8 direction);
|
||||
u8 GetTrainerFacingDirectionMovementType(enum Direction direction);
|
||||
const u8 *GetObjectEventScriptPointerByObjectEventId(u8 objectEventId);
|
||||
u8 GetCollisionFlagsAtCoords(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 direction);
|
||||
u8 GetCollisionFlagsAtCoords(struct ObjectEvent *objectEvent, s16 x, s16 y, enum Direction direction);
|
||||
u8 GetFaceDirectionMovementAction(u32);
|
||||
u8 GetWalkNormalMovementAction(u32);
|
||||
u8 GetWalkFastMovementAction(u32);
|
||||
|
|
@ -215,10 +215,10 @@ u8 GetAcroWheelieInPlaceDirectionMovementAction(u32);
|
|||
u8 GetAcroPopWheelieMoveDirectionMovementAction(u32);
|
||||
u8 GetAcroWheelieMoveDirectionMovementAction(u32);
|
||||
u8 GetAcroEndWheelieMoveDirectionMovementAction(u32);
|
||||
u8 GetFishingDirectionAnimNum(u8 direction);
|
||||
u8 GetAcroWheelieDirectionAnimNum(u8 direction);
|
||||
u8 GetFishingBiteDirectionAnimNum(u8 direction);
|
||||
u8 GetFishingNoCatchDirectionAnimNum(u8 direction);
|
||||
u8 GetFishingDirectionAnimNum(enum Direction direction);
|
||||
u8 GetAcroWheelieDirectionAnimNum(enum Direction direction);
|
||||
u8 GetFishingBiteDirectionAnimNum(enum Direction direction);
|
||||
u8 GetFishingNoCatchDirectionAnimNum(enum Direction direction);
|
||||
bool8 ObjectEventSetHeldMovement(struct ObjectEvent *objectEvent, u8 specialAnimId);
|
||||
void ObjectEventForceSetHeldMovement(struct ObjectEvent *objectEvent, u8 movementActionId);
|
||||
bool8 ObjectEventIsMovementOverridden(struct ObjectEvent *objectEvent);
|
||||
|
|
@ -228,7 +228,7 @@ const struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8, const str
|
|||
void TryOverrideTemplateCoordsForObjectEvent(const struct ObjectEvent *objectEvent, u8 movementType);
|
||||
void OverrideTemplateCoordsForObjectEvent(const struct ObjectEvent *objectEvent);
|
||||
void ShiftStillObjectEventCoords(struct ObjectEvent *objEvent);
|
||||
void ObjectEventMoveDestCoords(struct ObjectEvent *objEvent, u32 direction, s16 *x, s16 *y);
|
||||
void ObjectEventMoveDestCoords(struct ObjectEvent *objEvent, enum Direction direction, s16 *x, s16 *y);
|
||||
u8 AddCameraObject(u8 linkedSpriteId);
|
||||
void UpdateObjectEventsForCameraUpdate(s16 x, s16 y);
|
||||
u8 GetWalkSlowMovementAction(u32);
|
||||
|
|
@ -246,10 +246,10 @@ void FreezeObjectEventsExceptOne(u8 objectEventId);
|
|||
void FreezeObjectEventsExceptTwo(u8 objectEventId1, u8 objectEventId2);
|
||||
void FreezeObjectEvents(void);
|
||||
bool8 FreezeObjectEvent(struct ObjectEvent *objectEvent);
|
||||
u8 GetMoveDirectionFastAnimNum(u8 direction);
|
||||
u8 GetMoveDirectionFasterAnimNum(u8 direction);
|
||||
u8 GetMoveDirectionFastestAnimNum(u8 direction);
|
||||
u8 GetLedgeJumpDirection(s16 x, s16 y, u8 direction);
|
||||
u8 GetMoveDirectionFastAnimNum(enum Direction direction);
|
||||
u8 GetMoveDirectionFasterAnimNum(enum Direction direction);
|
||||
u8 GetMoveDirectionFastestAnimNum(enum Direction direction);
|
||||
enum Direction GetLedgeJumpDirection(s16 x, s16 y, enum Direction direction);
|
||||
void CameraObjectSetFollowedSpriteId(u8 objectId);
|
||||
u16 GetObjectPaletteTag(u8 palSlot);
|
||||
void UpdateObjectEventSpriteInvisibility(struct Sprite *sprite, bool8 invisible);
|
||||
|
|
@ -334,17 +334,17 @@ u8 MovementType_Wander_Step3(struct ObjectEvent *objectEvent, struct Sprite *spr
|
|||
u8 MovementType_WanderAround_Step4(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
u8 MovementType_WanderAround_Step5(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
u8 MovementType_WanderAround_Step6(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
u8 GetVectorDirection(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 GetLimitedVectorDirection_SouthNorth(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 GetLimitedVectorDirection_WestEast(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 GetLimitedVectorDirection_WestNorth(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 GetLimitedVectorDirection_EastNorth(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 GetLimitedVectorDirection_WestSouth(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 GetLimitedVectorDirection_EastSouth(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 GetLimitedVectorDirection_SouthNorthWest(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 GetLimitedVectorDirection_SouthNorthEast(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 GetLimitedVectorDirection_NorthWestEast(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 GetLimitedVectorDirection_SouthWestEast(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
enum Direction GetVectorDirection(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
enum Direction GetLimitedVectorDirection_SouthNorth(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
enum Direction GetLimitedVectorDirection_WestEast(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
enum Direction GetLimitedVectorDirection_WestNorth(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
enum Direction GetLimitedVectorDirection_EastNorth(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
enum Direction GetLimitedVectorDirection_WestSouth(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
enum Direction GetLimitedVectorDirection_EastSouth(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
enum Direction GetLimitedVectorDirection_SouthNorthWest(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
enum Direction GetLimitedVectorDirection_SouthNorthEast(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
enum Direction GetLimitedVectorDirection_NorthWestEast(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
enum Direction GetLimitedVectorDirection_SouthWestEast(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 MovementType_LookAround_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
u8 MovementType_LookAround_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
u8 MovementType_LookAround_Step2(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
|
|
@ -461,30 +461,30 @@ u8 MovementType_WalkSequenceRightDownLeftUp_Step1(struct ObjectEvent *objectEven
|
|||
u8 MovementType_CopyPlayer_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
u8 MovementType_CopyPlayer_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
u8 MovementType_CopyPlayer_Step2(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
bool8 CopyablePlayerMovement_None(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8));
|
||||
bool8 CopyablePlayerMovement_FaceDirection(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8));
|
||||
bool8 CopyablePlayerMovement_WalkNormal(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8));
|
||||
bool8 CopyablePlayerMovement_WalkFast(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8));
|
||||
bool8 CopyablePlayerMovement_WalkFaster(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8));
|
||||
bool8 CopyablePlayerMovement_Slide(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8));
|
||||
bool8 CopyablePlayerMovement_JumpInPlace(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8));
|
||||
bool8 CopyablePlayerMovement_Jump(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8));
|
||||
bool8 CopyablePlayerMovement_None(struct ObjectEvent *objectEvent, struct Sprite *sprite, enum Direction playerDirection, bool8 tileCallback(u8));
|
||||
bool8 CopyablePlayerMovement_FaceDirection(struct ObjectEvent *objectEvent, struct Sprite *sprite, enum Direction playerDirection, bool8 tileCallback(u8));
|
||||
bool8 CopyablePlayerMovement_WalkNormal(struct ObjectEvent *objectEvent, struct Sprite *sprite, enum Direction playerDirection, bool8 tileCallback(u8));
|
||||
bool8 CopyablePlayerMovement_WalkFast(struct ObjectEvent *objectEvent, struct Sprite *sprite, enum Direction playerDirection, bool8 tileCallback(u8));
|
||||
bool8 CopyablePlayerMovement_WalkFaster(struct ObjectEvent *objectEvent, struct Sprite *sprite, enum Direction playerDirection, bool8 tileCallback(u8));
|
||||
bool8 CopyablePlayerMovement_Slide(struct ObjectEvent *objectEvent, struct Sprite *sprite, enum Direction playerDirection, bool8 tileCallback(u8));
|
||||
bool8 CopyablePlayerMovement_JumpInPlace(struct ObjectEvent *objectEvent, struct Sprite *sprite, enum Direction playerDirection, bool8 tileCallback(u8));
|
||||
bool8 CopyablePlayerMovement_Jump(struct ObjectEvent *objectEvent, struct Sprite *sprite, enum Direction playerDirection, bool8 tileCallback(u8));
|
||||
|
||||
u8 MovementType_FollowPlayer_Shadow(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
u8 MovementType_FollowPlayer_Active(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
u8 MovementType_FollowPlayer_Moving(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
void StartSpriteAnimInDirection(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 direction, u8 animNum);
|
||||
void StartSpriteAnimInDirection(struct ObjectEvent *objectEvent, struct Sprite *sprite, enum Direction direction, u8 animNum);
|
||||
|
||||
bool8 FollowablePlayerMovement_Idle(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8, bool8 tileCallback(u8));
|
||||
bool8 FollowablePlayerMovement_FaceDirection(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8, bool8 tileCallback(u8));
|
||||
bool8 FollowablePlayerMovement_Step(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8, bool8 tileCallback(u8));
|
||||
bool8 FollowablePlayerMovement_GoSpeed1(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8, bool8 tileCallback(u8));
|
||||
bool8 FollowablePlayerMovement_GoSpeed2(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8, bool8 tileCallback(u8));
|
||||
bool8 FollowablePlayerMovement_Slide(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8, bool8 tileCallback(u8));
|
||||
bool8 FollowablePlayerMovement_JumpInPlace(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8, bool8 tileCallback(u8));
|
||||
bool8 FollowablePlayerMovement_GoSpeed4(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8, bool8 tileCallback(u8));
|
||||
bool8 FollowablePlayerMovement_Jump(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8, bool8 tileCallback(u8));
|
||||
bool8 CopyablePlayerMovement_Jump2(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8, bool8 tileCallback(u8));
|
||||
bool8 FollowablePlayerMovement_Idle(struct ObjectEvent *objectEvent, struct Sprite *sprite, enum Direction, bool8 tileCallback(u8));
|
||||
bool8 FollowablePlayerMovement_FaceDirection(struct ObjectEvent *objectEvent, struct Sprite *sprite, enum Direction, bool8 tileCallback(u8));
|
||||
bool8 FollowablePlayerMovement_Step(struct ObjectEvent *objectEvent, struct Sprite *sprite, enum Direction, bool8 tileCallback(u8));
|
||||
bool8 FollowablePlayerMovement_GoSpeed1(struct ObjectEvent *objectEvent, struct Sprite *sprite, enum Direction, bool8 tileCallback(u8));
|
||||
bool8 FollowablePlayerMovement_GoSpeed2(struct ObjectEvent *objectEvent, struct Sprite *sprite, enum Direction, bool8 tileCallback(u8));
|
||||
bool8 FollowablePlayerMovement_Slide(struct ObjectEvent *objectEvent, struct Sprite *sprite, enum Direction, bool8 tileCallback(u8));
|
||||
bool8 FollowablePlayerMovement_JumpInPlace(struct ObjectEvent *objectEvent, struct Sprite *sprite, enum Direction, bool8 tileCallback(u8));
|
||||
bool8 FollowablePlayerMovement_GoSpeed4(struct ObjectEvent *objectEvent, struct Sprite *sprite, enum Direction, bool8 tileCallback(u8));
|
||||
bool8 FollowablePlayerMovement_Jump(struct ObjectEvent *objectEvent, struct Sprite *sprite, enum Direction, bool8 tileCallback(u8));
|
||||
bool8 CopyablePlayerMovement_Jump2(struct ObjectEvent *objectEvent, struct Sprite *sprite, enum Direction, bool8 tileCallback(u8));
|
||||
u8 MovementType_CopyPlayerInGrass_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
u8 MovementType_Buried_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
u8 MovementType_WalkInPlace_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
|
|
@ -496,8 +496,8 @@ u8 MovementType_Invisible_Step0(struct ObjectEvent *objectEvent, struct Sprite *
|
|||
u8 MovementType_Invisible_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
u8 MovementType_Invisible_Step2(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
|
||||
u8 CreateVirtualObject(u16 graphicsId, u8 virtualObjId, s16 x, s16 y, u8 elevation, u8 direction);
|
||||
void TurnVirtualObject(u8 virtualObjId, u8 direction);
|
||||
u8 CreateVirtualObject(u16 graphicsId, u8 virtualObjId, s16 x, s16 y, u8 elevation, enum Direction direction);
|
||||
void TurnVirtualObject(u8 virtualObjId, enum Direction direction);
|
||||
void SetVirtualObjectGraphics(u8 virtualObjId, u16 graphicsId);
|
||||
void SetVirtualObjectInvisibility(u8 virtualObjId, bool32 invisible);
|
||||
bool32 IsVirtualObjectInvisible(u8 virtualObjId);
|
||||
|
|
@ -509,9 +509,7 @@ bool32 IsFollowerVisible(void);
|
|||
// run slow
|
||||
u8 GetPlayerRunSlowMovementAction(u32);
|
||||
//sideways stairs
|
||||
u8 GetSidewaysStairsToRightDirection(s16, s16, u8);
|
||||
u8 GetSidewaysStairsToLeftDirection(s16, s16, u8);
|
||||
u8 GetSidewaysStairsCollision(struct ObjectEvent *objectEvent, u8 dir, u8 currentBehavior, u8 nextBehavior, u8 collision);
|
||||
enum Collision GetSidewaysStairsCollision(struct ObjectEvent *objectEvent, enum Direction dir, u8 currentBehavior, u8 nextBehavior, enum Collision collision);
|
||||
|
||||
bool8 MovementAction_EmoteX_Step0(struct ObjectEvent *, struct Sprite *);
|
||||
bool8 MovementAction_EmoteDoubleExclamationMark_Step0(struct ObjectEvent *, struct Sprite *);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ const u8 *GetObjectEventScriptPointerPlayerFacing(void);
|
|||
bool8 TryDoDiveWarp(struct MapPosition *position, u16 metatileBehavior);
|
||||
int SetCableClubWarp(void);
|
||||
u8 TrySetDiveWarp(void);
|
||||
const u8 *GetInteractedLinkPlayerScript(struct MapPosition *position, u8 metatileBehavior, u8 direction);
|
||||
const u8 *GetInteractedLinkPlayerScript(struct MapPosition *position, u8 metatileBehavior, enum Direction direction);
|
||||
const u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position);
|
||||
void ClearPoisonStepCounter(void);
|
||||
void CancelSignPostMessageBox(struct FieldInput *input);
|
||||
|
|
|
|||
|
|
@ -41,6 +41,6 @@ void UpdateHotSpringsWaterFieldEffect(struct Sprite *sprite);
|
|||
void UpdateBubblesFieldEffect(struct Sprite *sprite);
|
||||
void UpdateSparkleFieldEffect(struct Sprite *sprite);
|
||||
void SetSpriteInvisible(u8 spriteId);
|
||||
void ShowWarpArrowSprite(u8 spriteId, u8 direction, s16 x, s16 y);
|
||||
void ShowWarpArrowSprite(u8 spriteId, enum Direction direction, s16 x, s16 y);
|
||||
|
||||
#endif //GUARD_FIELD_EFFECT_HELPERS_H
|
||||
|
|
|
|||
|
|
@ -1,45 +1,45 @@
|
|||
#ifndef GUARD_FIELD_PLAYER_AVATAR_H
|
||||
#define GUARD_FIELD_PLAYER_AVATAR_H
|
||||
|
||||
void PlayerStep(u8 direction, u16 newKeys, u16 heldKeys);
|
||||
void PlayerStep(enum Direction direction, u16 newKeys, u16 heldKeys);
|
||||
bool8 TryDoMetatileBehaviorForcedMovement();
|
||||
void ClearPlayerAvatarInfo(void);
|
||||
void SetPlayerAvatarExtraStateTransition(u16 graphicsId, u8 transitionFlag);
|
||||
u8 GetPlayerAvatarGenderByGraphicsId(u16 gfxId);
|
||||
enum Gender GetPlayerAvatarGenderByGraphicsId(u16 gfxId);
|
||||
u8 TestPlayerAvatarFlags(u8 flag);
|
||||
u8 GetPlayerAvatarSpriteId(void);
|
||||
void PlayerGetDestCoords(s16 *x, s16 *y);
|
||||
u8 GetPlayerFacingDirection(void);
|
||||
u8 GetPlayerMovementDirection(void);
|
||||
enum Direction GetPlayerFacingDirection(void);
|
||||
enum Direction GetPlayerMovementDirection(void);
|
||||
u8 PlayerGetCopyableMovement(void);
|
||||
void PlayerWalkNormal(u8 direction);
|
||||
void PlayerWalkFast(u8 direction);
|
||||
void PlayerRideWaterCurrent(u8 direction);
|
||||
void PlayerWalkFaster(u8 direction);
|
||||
void PlayerOnBikeCollide(u8 direction);
|
||||
void PlayerFaceDirection(u8 direction);
|
||||
void PlayerTurnInPlace(u8 direction);
|
||||
void PlayerJumpLedge(u8 direction);
|
||||
void PlayerIdleWheelie(u8 direction);
|
||||
void PlayerStartWheelie(u8 direction);
|
||||
void PlayerEndWheelie(u8 direction);
|
||||
void PlayerStandingHoppingWheelie(u8 direction);
|
||||
void PlayerMovingHoppingWheelie(u8 direction);
|
||||
void PlayerLedgeHoppingWheelie(u8 direction);
|
||||
void PlayerAcroTurnJump(u8 direction);
|
||||
void PlayerWalkNormal(enum Direction direction);
|
||||
void PlayerWalkFast(enum Direction direction);
|
||||
void PlayerRideWaterCurrent(enum Direction direction);
|
||||
void PlayerWalkFaster(enum Direction direction);
|
||||
void PlayerOnBikeCollide(enum Direction direction);
|
||||
void PlayerFaceDirection(enum Direction direction);
|
||||
void PlayerTurnInPlace(enum Direction direction);
|
||||
void PlayerJumpLedge(enum Direction direction);
|
||||
void PlayerIdleWheelie(enum Direction direction);
|
||||
void PlayerStartWheelie(enum Direction direction);
|
||||
void PlayerEndWheelie(enum Direction direction);
|
||||
void PlayerStandingHoppingWheelie(enum Direction direction);
|
||||
void PlayerMovingHoppingWheelie(enum Direction direction);
|
||||
void PlayerLedgeHoppingWheelie(enum Direction direction);
|
||||
void PlayerAcroTurnJump(enum Direction direction);
|
||||
void PlayerSetAnimId(u8 movementActionId, u8 copyableMovement);
|
||||
bool8 IsPlayerCollidingWithFarawayIslandMew(u8 direction);
|
||||
void PlayerOnBikeCollideWithFarawayIslandMew(u8 direction);
|
||||
u8 CheckForObjectEventCollision(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 direction, u8 metatileBehavior);
|
||||
bool8 IsPlayerCollidingWithFarawayIslandMew(enum Direction direction);
|
||||
void PlayerOnBikeCollideWithFarawayIslandMew(enum Direction direction);
|
||||
enum Collision CheckForObjectEventCollision(struct ObjectEvent *objectEvent, s16 x, s16 y, enum Direction direction, u8 metatileBehavior);
|
||||
u8 PlayerGetElevation(void);
|
||||
void SetPlayerAvatarTransitionFlags(u16 transitionFlags);
|
||||
void CancelPlayerForcedMovement(void);
|
||||
void InitPlayerAvatar(s16 x, s16 y, u8 direction, u8 gender);
|
||||
void InitPlayerAvatar(s16 x, s16 y, enum Direction direction, enum Gender gender);
|
||||
void PlayerFreeze(void);
|
||||
void StopPlayerAvatar(void);
|
||||
void SetSpinStartFacingDir(u8 direction);
|
||||
void SetSpinStartFacingDir(enum Direction direction);
|
||||
void GetXYCoordsOneStepInFrontOfPlayer(s16 *xPtr, s16 *yPtr);
|
||||
u16 GetRivalAvatarGraphicsIdByStateIdAndGender(u8 state, u8 gender);
|
||||
u16 GetRivalAvatarGraphicsIdByStateIdAndGender(u8 state, enum Gender gender);
|
||||
void SetPlayerAvatarFieldMove(void);
|
||||
u16 GetPlayerAvatarGraphicsIdByCurrentState(void);
|
||||
void SetPlayerAvatarStateMask(u8 flags);
|
||||
|
|
@ -48,27 +48,27 @@ u8 GetJumpSpecialMovementAction(u32);
|
|||
bool8 PartyHasMonWithSurf(void);
|
||||
bool8 IsPlayerFacingSurfableFishableWater(void);
|
||||
bool8 IsPlayerSurfingNorth(void);
|
||||
void SetPlayerAvatarWatering(u8 direction);
|
||||
void SetPlayerAvatarWatering(enum Direction direction);
|
||||
u8 GetPlayerAvatarFlags(void);
|
||||
void UpdatePlayerAvatarTransitionState(void);
|
||||
u16 GetFRLGAvatarGraphicsIdByGender(u8 gender);
|
||||
u16 GetRSAvatarGraphicsIdByGender(u8 gender);
|
||||
void PlayerWheelieInPlace(u8 direction);
|
||||
void PlayerWheelieMove(u8 direction);
|
||||
void PlayerPopWheelieWhileMoving(u8 direction);
|
||||
void PlayerUseAcroBikeOnBumpySlope(u8 direction);
|
||||
void PlayerEndWheelieWhileMoving(u8 direction);
|
||||
u16 GetFRLGAvatarGraphicsIdByGender(enum Gender gender);
|
||||
u16 GetRSAvatarGraphicsIdByGender(enum Gender gender);
|
||||
void PlayerWheelieInPlace(enum Direction direction);
|
||||
void PlayerWheelieMove(enum Direction direction);
|
||||
void PlayerPopWheelieWhileMoving(enum Direction direction);
|
||||
void PlayerUseAcroBikeOnBumpySlope(enum Direction direction);
|
||||
void PlayerEndWheelieWhileMoving(enum Direction direction);
|
||||
void DoPlayerSpinEntrance(void);
|
||||
void DoPlayerSpinExit(void);
|
||||
bool32 IsPlayerSpinEntranceActive(void);
|
||||
bool32 IsPlayerSpinExitActive(void);
|
||||
void SetPlayerInvisibility(bool8 invisible);
|
||||
u8 player_get_pos_including_state_based_drift(s16 *x, s16 *y);
|
||||
void SetPlayerAvatarFishing(u8 direction);
|
||||
bool8 ObjectMovingOnRockStairs(struct ObjectEvent *objectEvent, u8 direction);
|
||||
void SetPlayerAvatarFishing(enum Direction direction);
|
||||
bool8 ObjectMovingOnRockStairs(struct ObjectEvent *objectEvent, enum Direction direction);
|
||||
//sideways stairs
|
||||
u8 GetRightSideStairsDirection(u8 direction);
|
||||
u8 GetLeftSideStairsDirection(u8 direction);
|
||||
enum Direction GetRightSideStairsDirection(enum Direction direction);
|
||||
enum Direction GetLeftSideStairsDirection(enum Direction direction);
|
||||
void UpdateSpinData(void);
|
||||
void ResetSpinTimer(void);
|
||||
bool32 CanTriggerSpinEvolution();
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ void FadeOutOrbEffect(void);
|
|||
void WriteFlashScanlineEffectBuffer(u8 flashLevel);
|
||||
bool8 IsPlayerStandingStill(void);
|
||||
void DoStairWarp(u16 metatileBehavior, u16 delay);
|
||||
bool32 IsDirectionalStairWarpMetatileBehavior(u16 metatileBehavior, u8 playerDirection);
|
||||
bool32 IsDirectionalStairWarpMetatileBehavior(u16 metatileBehavior, enum Direction playerDirection);
|
||||
void SetPlayerVisibility(bool8 visible);
|
||||
void Task_WarpAndLoadMap(u8 taskId);
|
||||
void Task_DoDoorWarp(u8 taskId);
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ void MapGridSetMetatileIdAt(int x, int y, u16 metatile);
|
|||
void MapGridSetMetatileEntryAt(int x, int y, u16 metatile);
|
||||
void GetCameraCoords(u16 *x, u16 *y);
|
||||
u8 MapGridGetCollisionAt(int x, int y);
|
||||
int GetMapBorderIdAt(int x, int y);
|
||||
bool32 CanCameraMoveInDirection(int direction);
|
||||
enum Connection GetMapBorderIdAt(int x, int y);
|
||||
bool32 CanCameraMoveInDirection(enum Direction direction);
|
||||
u16 GetMetatileAttributesById(u16 metatile);
|
||||
void GetCameraFocusCoords(u16 *x, u16 *y);
|
||||
u8 MapGridGetMetatileLayerTypeAt(int x, int y);
|
||||
|
|
|
|||
|
|
@ -100,14 +100,14 @@ void ClearFollowerNPCData(void);
|
|||
|
||||
void CreateFollowerNPC(u32 gfx, u32 followerFlags, const u8 *scriptPtr);
|
||||
void DestroyFollowerNPC(void);
|
||||
u32 DetermineFollowerNPCState(struct ObjectEvent *follower, u32 state, u32 direction);
|
||||
u32 DetermineFollowerNPCState(struct ObjectEvent *follower, u32 state, enum Direction direction);
|
||||
void SetFollowerNPCSprite(u32 spriteIndex);
|
||||
|
||||
bool32 PlayerHasFollowerNPC(void);
|
||||
void NPCFollow(struct ObjectEvent *npc, u32 state, bool32 ignoreScriptActive);
|
||||
void CreateFollowerNPCAvatar(void);
|
||||
void FollowerNPC_HandleSprite(void);
|
||||
u32 DetermineFollowerNPCDirection(struct ObjectEvent *player, struct ObjectEvent *follower);
|
||||
enum Direction DetermineFollowerNPCDirection(struct ObjectEvent *player, struct ObjectEvent *follower);
|
||||
u32 GetFollowerNPCObjectId(void);
|
||||
bool32 CheckFollowerNPCFlag(u32 flag);
|
||||
bool32 FollowerNPC_IsCollisionExempt(struct ObjectEvent *obstacle, struct ObjectEvent *collider);
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ void GetFrontierTrainerName(u8 *dst, u16 trainerId);
|
|||
u16 GetRandomFrontierMonFromSet(u16 trainerId);
|
||||
void FrontierSpeechToString(const u16 *words);
|
||||
u8 SetFacilityPtrsGetLevel(void);
|
||||
u8 GetFrontierEnemyMonLevel(u8 lvlMode);
|
||||
u8 GetFrontierEnemyMonLevel(enum FrontierLevelMode lvlMode);
|
||||
s32 GetHighestLevelInPlayerParty(void);
|
||||
u16 FacilityClassToGraphicsId(u8 facilityClass);
|
||||
void ShowBattleFrontierCaughtBannedSpecies(void);
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
struct Berry
|
||||
{
|
||||
const u8 name[BERRY_NAME_LENGTH + 1];
|
||||
u8 firmness:4;
|
||||
u8 color:4;
|
||||
enum BerryFirmness firmness:4;
|
||||
enum BerryColor color:4;
|
||||
u16 size:10;
|
||||
u16 weedsBonus:3;
|
||||
u16 pestsBonus:3;
|
||||
|
|
@ -32,8 +32,8 @@ struct Berry
|
|||
struct Berry2
|
||||
{
|
||||
u8 name[BERRY_NAME_LENGTH + 1];
|
||||
u8 firmness:4;
|
||||
u8 color:4;
|
||||
enum BerryFirmness firmness:4;
|
||||
enum BerryColor color:4;
|
||||
u16 size:10;
|
||||
u16 weedsBonus:3;
|
||||
u16 pestsBonus:3;
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ enum
|
|||
ACRO_BIKE_STATE6,
|
||||
};
|
||||
|
||||
enum
|
||||
enum Collision
|
||||
{
|
||||
COLLISION_NONE,
|
||||
COLLISION_OUTSIDE_RANGE,
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ typedef union // size = 0x24
|
|||
/*0x00*/ u8 kind;
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u8 sheen;
|
||||
/*0x03*/ u8 flavor:3;
|
||||
/*0x03*/ enum Flavor flavor:3;
|
||||
u8 color:2;
|
||||
//u8 padding:3;
|
||||
/*0x04*/ u8 worstBlenderName[PLAYER_NAME_LENGTH + 1];
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ u8 *GetStringClearToWidth(u8 *dest, int fontId, const u8 *str, int totalStringWi
|
|||
void PadNameString(u8 *dest, u8 padChar);
|
||||
void ConvertInternationalPlayerNameStripChar(u8 *str, u8 removeChar);
|
||||
void ConvertInternationalContestantName(u8 *str);
|
||||
int GetNicknameLanguage(u8 *str);
|
||||
enum Language GetNicknameLanguage(u8 *str);
|
||||
void FillWindowTilesByRow(int windowId, int columnStart, int rowStart, int numFillTiles, int numRows);
|
||||
|
||||
#endif // GUARD_INTERNATIONAL_STRING_UTIL_H
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ void DisplayDadsAdviceCannotUseItemMessage(u8 taskId, bool8 isUsingRegisteredKey
|
|||
void ItemUseOutOfBattle_PokeFlute(u8 taskId);
|
||||
void ItemUseOutOfBattle_TownMap(u8 taskId);
|
||||
bool8 ItemfinderCheckForHiddenItems(const struct MapEvents *, u8);
|
||||
u8 GetDirectionToHiddenItem(s16, s16);
|
||||
enum Direction GetDirectionToHiddenItem(s16, s16);
|
||||
|
||||
enum {
|
||||
BALL_THROW_UNABLE_TWO_MONS,
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ struct Main
|
|||
};
|
||||
|
||||
#define GAME_CODE_LENGTH 4
|
||||
extern const u8 gGameVersion;
|
||||
extern const u8 gGameLanguage;
|
||||
extern const enum GameVersion gGameVersion;
|
||||
extern const enum Language gGameLanguage;
|
||||
extern const u8 RomHeaderGameCode[GAME_CODE_LENGTH];
|
||||
extern const u8 RomHeaderSoftwareVersion;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ void SetMauvilleOldMan(void);
|
|||
u8 GetCurrentMauvilleOldMan(void);
|
||||
void SetMauvilleOldManObjEventGfx(void);
|
||||
void SanitizeMauvilleOldManForRuby(union OldMan *oldMan);
|
||||
void SanitizeReceivedRubyOldMan(union OldMan *oldMan, u32 version, u32 language);
|
||||
void SanitizeReceivedEmeraldOldMan(union OldMan *oldMan, u32 version, u32 language);
|
||||
void SanitizeReceivedRubyOldMan(union OldMan *oldMan, enum GameVersion version, enum Language language);
|
||||
void SanitizeReceivedEmeraldOldMan(union OldMan *oldMan, enum Language language);
|
||||
void ResetMauvilleOldManFlag(void);
|
||||
|
||||
#endif // GUARD_MAUVILLE_OLD_MAN_H
|
||||
|
|
|
|||
|
|
@ -868,8 +868,8 @@ const u16 *GetMonSpritePalFromSpeciesIsEgg(u16 species, bool32 isShiny, bool32 i
|
|||
bool32 IsMoveHM(enum Move move);
|
||||
bool32 CannotForgetMove(enum Move move);
|
||||
bool8 IsMonSpriteNotFlipped(u16 species);
|
||||
s8 GetMonFlavorRelation(struct Pokemon *mon, u8 flavor);
|
||||
s8 GetFlavorRelationByPersonality(u32 personality, u8 flavor);
|
||||
s8 GetMonFlavorRelation(struct Pokemon *mon, enum Flavor flavor);
|
||||
s8 GetFlavorRelationByPersonality(u32 personality, enum Flavor flavor);
|
||||
bool8 IsTradedMon(struct Pokemon *mon);
|
||||
bool8 IsOtherTrainer(u32 otId, u8 *otName);
|
||||
void MonRestorePP(struct Pokemon *mon);
|
||||
|
|
@ -885,7 +885,7 @@ void StopPokemonAnimationDelayTask(void);
|
|||
void BattleAnimateBackSprite(struct Sprite *sprite, u16 species);
|
||||
u8 GetOpposingLinkMultiBattlerId(bool8 rightSide, u8 multiplayerId);
|
||||
enum TrainerPicID FacilityClassToPicIndex(u16 facilityClass);
|
||||
enum TrainerPicID PlayerGenderToFrontTrainerPicId(u8 playerGender);
|
||||
enum TrainerPicID PlayerGenderToFrontTrainerPicId(enum Gender playerGender);
|
||||
void HandleSetPokedexFlag(enum NationalDexOrder nationalNum, u8 caseId, u32 personality);
|
||||
void HandleSetPokedexFlagFromMon(struct Pokemon *mon, u32 caseId);
|
||||
bool8 HasTwoFramesAnimation(u16 species);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
void RotatingGatePuzzleCameraUpdate(s16 deltaX, s16 deltaY);
|
||||
void RotatingGate_InitPuzzleAndGraphics(void);
|
||||
bool32 CheckForRotatingGatePuzzleCollision(u8 direction, s16 x, s16 y);
|
||||
bool32 CheckForRotatingGatePuzzleCollisionWithoutAnimation(u8 direction, s16 x, s16 y);
|
||||
bool32 CheckForRotatingGatePuzzleCollision(enum Direction direction, s16 x, s16 y);
|
||||
bool32 CheckForRotatingGatePuzzleCollisionWithoutAnimation(enum Direction direction, s16 x, s16 y);
|
||||
|
||||
#endif // GUARD_ROTATING_GATE_H
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef GUARD_STRING_UTIL_H
|
||||
#define GUARD_STRING_UTIL_H
|
||||
|
||||
#include "constants/global.h"
|
||||
|
||||
extern u8 gStringVar1[0x100];
|
||||
extern u8 gStringVar2[0x100];
|
||||
extern u8 gStringVar3[0x100];
|
||||
|
|
@ -50,7 +52,7 @@ bool32 IsStringJapanese(u8 *str);
|
|||
bool32 IsStringNJapanese(u8 *str, s32 n);
|
||||
u8 GetExtCtrlCodeLength(u8 code);
|
||||
s32 StringCompareWithoutExtCtrlCodes(const u8 *str1, const u8 *str2);
|
||||
void ConvertInternationalString(u8 *s, u8 language);
|
||||
void ConvertInternationalString(u8 *s, enum Language language);
|
||||
void StripExtCtrlCodes(u8 *str);
|
||||
u8 *StringCopyUppercase(u8 *dest, const u8 *src);
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ u16 FreeAndDestroyMonPicSpriteNoPalette(u16 spriteId);
|
|||
u16 CreateTrainerPicSprite(u16 species, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag);
|
||||
u16 FreeAndDestroyTrainerPicSprite(u16 spriteId);
|
||||
u16 CreateTrainerCardTrainerPicSprite(u16 species, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId);
|
||||
u16 PlayerGenderToFrontTrainerPicId_Debug(u8 gender, bool8 getClass);
|
||||
u16 PlayerGenderToFrontTrainerPicId_Debug(enum Gender gender, bool8 getClass);
|
||||
void CopyTrainerBackspriteFramesToDest(enum TrainerPicID trainerPicId, u8 *dest);
|
||||
|
||||
#endif // GUARD_TRAINER_POKEMON_SPRITES_H
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ void IncrementDailyWildBattles(void);
|
|||
void IncrementDailyBerryBlender(void);
|
||||
void SanitizeTVShowsForRuby(TVShow *shows);
|
||||
void TryPutSafariFanClubOnAir(u8 monsCaught, u8 pokeblocksUsed);
|
||||
bool8 Put3CheersForPokeblocksOnTheAir(const u8 *partnersName, u8 flavor, u8 color, u8 sheen, u8 language);
|
||||
bool8 Put3CheersForPokeblocksOnTheAir(const u8 *partnersName, enum Flavor flavor, u8 color, u8 sheen, u8 language);
|
||||
void SetPokemonAnglerSpecies(u16 species);
|
||||
void UpdateTVShowsPerDay(u16 days);
|
||||
void TryPutPokemonTodayOnAir(void);
|
||||
|
|
|
|||
|
|
@ -1237,7 +1237,7 @@ static void GetShouldApprenticeLeave(void)
|
|||
gSpecialVar_0x8004 = TRUE;
|
||||
}
|
||||
|
||||
const u8 *GetApprenticeNameInLanguage(u32 apprenticeId, s32 language)
|
||||
const u8 *GetApprenticeNameInLanguage(u32 apprenticeId, enum Language language)
|
||||
{
|
||||
const struct ApprenticeTrainer *apprentice = &gApprentices[apprenticeId];
|
||||
|
||||
|
|
|
|||
|
|
@ -451,7 +451,7 @@ static void UNUSED UpdateHPAtStart(u8 battler)
|
|||
static void InitArenaChallenge(void)
|
||||
{
|
||||
bool32 isCurrent;
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
|
||||
gSaveBlock2Ptr->frontier.challengeStatus = 0;
|
||||
gSaveBlock2Ptr->frontier.curChallengeBattleNum = 0;
|
||||
|
|
@ -471,7 +471,7 @@ static void InitArenaChallenge(void)
|
|||
|
||||
static void GetArenaData(void)
|
||||
{
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
|
||||
switch (gSpecialVar_0x8005)
|
||||
{
|
||||
|
|
@ -492,7 +492,7 @@ static void GetArenaData(void)
|
|||
|
||||
static void SetArenaData(void)
|
||||
{
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
|
||||
switch (gSpecialVar_0x8005)
|
||||
{
|
||||
|
|
@ -532,7 +532,7 @@ static void SaveArenaChallenge(void)
|
|||
|
||||
static void SetArenaPrize(void)
|
||||
{
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
|
||||
if (gSaveBlock2Ptr->frontier.arenaWinStreaks[lvlMode] > 41)
|
||||
gSaveBlock2Ptr->frontier.arenaPrize = sLongStreakPrizeItems[Random() % ARRAY_COUNT(sLongStreakPrizeItems)];
|
||||
|
|
|
|||
|
|
@ -1866,7 +1866,7 @@ enum TrainerPicID LinkPlayerGetTrainerPicId(u32 multiplayerId)
|
|||
enum TrainerPicID trainerPicId;
|
||||
|
||||
u8 gender = gLinkPlayers[multiplayerId].gender;
|
||||
u8 version = gLinkPlayers[multiplayerId].version & 0xFF;
|
||||
enum GameVersion version = gLinkPlayers[multiplayerId].version & 0xFF;
|
||||
|
||||
if (version == VERSION_FIRE_RED || version == VERSION_LEAF_GREEN)
|
||||
trainerPicId = gender + TRAINER_PIC_BACK_RED;
|
||||
|
|
|
|||
|
|
@ -1759,7 +1759,7 @@ void CallBattleDomeFunction(void)
|
|||
|
||||
static void InitDomeChallenge(void)
|
||||
{
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
|
||||
gSaveBlock2Ptr->frontier.challengeStatus = 0;
|
||||
|
|
@ -1775,7 +1775,7 @@ static void InitDomeChallenge(void)
|
|||
|
||||
static void GetDomeData(void)
|
||||
{
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
|
||||
switch (gSpecialVar_0x8005)
|
||||
|
|
@ -1843,7 +1843,7 @@ static void GetDomeData(void)
|
|||
|
||||
static void SetDomeData(void)
|
||||
{
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
|
||||
switch (gSpecialVar_0x8005)
|
||||
|
|
@ -2590,7 +2590,7 @@ static void SaveDomeChallenge(void)
|
|||
|
||||
static void IncrementDomeStreaks(void)
|
||||
{
|
||||
u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
|
||||
if (gSaveBlock2Ptr->frontier.domeWinStreaks[battleMode][lvlMode] < 999)
|
||||
|
|
@ -5730,7 +5730,7 @@ static void InitRandomTourneyTreeResults(void)
|
|||
int monId;
|
||||
int zero1;
|
||||
int zero2;
|
||||
u8 lvlMode;
|
||||
enum FrontierLevelMode lvlMode;
|
||||
u16 *statSums;
|
||||
int *statValues;
|
||||
u8 ivs = 0;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ static void GenerateInitialRentalMons(void);
|
|||
static void GetOpponentMostCommonMonType(void);
|
||||
static void GetOpponentBattleStyle(void);
|
||||
static void RestorePlayerPartyHeldItems(void);
|
||||
static u16 GetFactoryMonId(u8 lvlMode, u8 challengeNum, bool8 useBetterRange);
|
||||
static u16 GetFactoryMonId(enum FrontierLevelMode lvlMode, u8 challengeNum, bool8 useBetterRange);
|
||||
static enum FactoryStyle GetMoveBattleStyle(enum Move move);
|
||||
|
||||
// Number of moves needed on the team to be considered using a certain battle style
|
||||
|
|
@ -129,7 +129,7 @@ void CallBattleFactoryFunction(void)
|
|||
static void InitFactoryChallenge(void)
|
||||
{
|
||||
u8 i;
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
|
||||
gSaveBlock2Ptr->frontier.challengeStatus = 0;
|
||||
|
|
@ -239,7 +239,7 @@ static void GenerateOpponentMons(void)
|
|||
u16 heldItems[FRONTIER_PARTY_SIZE];
|
||||
int firstMonId = 0;
|
||||
u16 trainerId = 0;
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
u32 winStreak = gSaveBlock2Ptr->frontier.factoryWinStreaks[battleMode][lvlMode];
|
||||
u32 challengeNum = winStreak / FRONTIER_STAGES_PER_CHALLENGE;
|
||||
|
|
@ -384,9 +384,9 @@ static void GenerateInitialRentalMons(void)
|
|||
int i, j;
|
||||
u8 firstMonId;
|
||||
u8 battleMode;
|
||||
u8 lvlMode;
|
||||
enum FrontierLevelMode lvlMode;
|
||||
u8 challengeNum;
|
||||
u8 factoryLvlMode;
|
||||
enum FrontierLevelMode factoryLvlMode;
|
||||
u8 factoryBattleMode;
|
||||
u8 rentalRank;
|
||||
u16 monId;
|
||||
|
|
@ -660,7 +660,7 @@ void FillFactoryBrainParty(void)
|
|||
u8 fixedIV;
|
||||
u32 otId;
|
||||
|
||||
u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
u8 challengeNum = gSaveBlock2Ptr->frontier.factoryWinStreaks[battleMode][lvlMode] / FRONTIER_STAGES_PER_CHALLENGE;
|
||||
fixedIV = GetFactoryMonFixedIV(challengeNum + 2, FALSE);
|
||||
|
|
@ -710,7 +710,7 @@ void FillFactoryBrainParty(void)
|
|||
}
|
||||
}
|
||||
|
||||
static u16 GetFactoryMonId(u8 lvlMode, u8 challengeNum, bool8 useBetterRange)
|
||||
static u16 GetFactoryMonId(enum FrontierLevelMode lvlMode, u8 challengeNum, bool8 useBetterRange)
|
||||
{
|
||||
u16 numMons, monId;
|
||||
u16 adder; // Used to skip past early mons for open level
|
||||
|
|
@ -749,7 +749,7 @@ static u16 GetFactoryMonId(u8 lvlMode, u8 challengeNum, bool8 useBetterRange)
|
|||
return monId;
|
||||
}
|
||||
|
||||
u8 GetNumPastRentalsRank(u8 battleMode, u8 lvlMode)
|
||||
u8 GetNumPastRentalsRank(u8 battleMode, enum FrontierLevelMode lvlMode)
|
||||
{
|
||||
u8 ret;
|
||||
u8 rents = gSaveBlock2Ptr->frontier.factoryRentsCount[battleMode][lvlMode];
|
||||
|
|
@ -813,11 +813,11 @@ static void FillFactoryFrontierTrainerParty(u16 trainerId, u8 firstMonId)
|
|||
{
|
||||
// By mistake Battle Tower's Level 50 challenge number is used to determine the IVs for Battle Factory.
|
||||
#ifdef BUGFIX
|
||||
u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
u8 challengeNum = gSaveBlock2Ptr->frontier.factoryWinStreaks[battleMode][lvlMode] / FRONTIER_STAGES_PER_CHALLENGE;
|
||||
#else
|
||||
u8 UNUSED lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode UNUSED lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
u8 challengeNum = gSaveBlock2Ptr->frontier.towerWinStreaks[battleMode][FRONTIER_LVL_50] / FRONTIER_STAGES_PER_CHALLENGE;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1714,7 +1714,7 @@ static void CreateFrontierFactorySelectableMons(u8 firstMonId)
|
|||
u8 level = 0;
|
||||
u32 otId = 0;
|
||||
u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u8 challengeNum = gSaveBlock2Ptr->frontier.factoryWinStreaks[battleMode][lvlMode] / 7;
|
||||
u8 rentalRank = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -877,7 +877,7 @@ static u32 ItemRestorePp(u32 battler, enum Item itemId)
|
|||
return effect;
|
||||
}
|
||||
|
||||
static enum ItemEffect HealConfuseBerry(u32 battler, enum Item itemId, u32 flavorId)
|
||||
static enum ItemEffect HealConfuseBerry(u32 battler, enum Item itemId, enum Flavor flavorId)
|
||||
{
|
||||
enum ItemEffect effect = ITEM_NO_EFFECT;
|
||||
u32 hpFraction = B_CONFUSE_BERRIES_HEAL >= GEN_7 ? 4 : 2;
|
||||
|
|
|
|||
|
|
@ -2603,7 +2603,7 @@ static void AskRecordBattle(void)
|
|||
static void TryCorrectShedinjaLanguage(struct Pokemon *mon)
|
||||
{
|
||||
u8 nickname[POKEMON_NAME_LENGTH + 1];
|
||||
u8 language = LANGUAGE_JAPANESE;
|
||||
enum Language language = LANGUAGE_JAPANESE;
|
||||
|
||||
if (GetMonData(mon, MON_DATA_SPECIES) == SPECIES_SHEDINJA
|
||||
&& GetMonData(mon, MON_DATA_LANGUAGE) != language)
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ void CallBattlePalaceFunction(void)
|
|||
|
||||
static void InitPalaceChallenge(void)
|
||||
{
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
|
||||
gSaveBlock2Ptr->frontier.challengeStatus = 0;
|
||||
|
|
@ -99,7 +99,7 @@ static void InitPalaceChallenge(void)
|
|||
|
||||
static void GetPalaceData(void)
|
||||
{
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
|
||||
switch (gSpecialVar_0x8005)
|
||||
|
|
@ -118,7 +118,7 @@ static void GetPalaceData(void)
|
|||
|
||||
static void SetPalaceData(void)
|
||||
{
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
|
||||
switch (gSpecialVar_0x8005)
|
||||
|
|
@ -141,7 +141,7 @@ static void SetPalaceData(void)
|
|||
static void GetPalaceCommentId(void)
|
||||
{
|
||||
u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
|
||||
if (gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][lvlMode] < 50)
|
||||
gSpecialVar_Result = Random() % 3;
|
||||
|
|
@ -165,7 +165,7 @@ static void BufferOpponentIntroSpeech(void)
|
|||
|
||||
static void IncrementPalaceStreak(void)
|
||||
{
|
||||
u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
|
||||
if (gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][lvlMode] < MAX_STREAK)
|
||||
|
|
@ -190,7 +190,7 @@ static void SavePalaceChallenge(void)
|
|||
static void SetRandomPalacePrize(void)
|
||||
{
|
||||
u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
|
||||
if (gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][lvlMode] > 41)
|
||||
gSaveBlock2Ptr->frontier.palacePrize = sBattlePalaceLatePrizes[Random() % ARRAY_COUNT(sBattlePalaceLatePrizes)];
|
||||
|
|
|
|||
|
|
@ -617,7 +617,7 @@ static void SetupRoomObjectEvents(void)
|
|||
|
||||
static void GetBattlePikeData(void)
|
||||
{
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
|
||||
switch (gSpecialVar_0x8005)
|
||||
{
|
||||
|
|
@ -644,7 +644,7 @@ static void GetBattlePikeData(void)
|
|||
|
||||
static void SetBattlePikeData(void)
|
||||
{
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
|
||||
switch (gSpecialVar_0x8005)
|
||||
{
|
||||
|
|
@ -1109,7 +1109,7 @@ bool32 TryGenerateBattlePikeWildMon(bool8 checkKeenEyeIntimidate)
|
|||
s32 i;
|
||||
s32 monLevel;
|
||||
u8 headerId = GetBattlePikeWildMonHeaderId();
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
const struct PikeWildMon *const *const wildMons = sWildMons[lvlMode];
|
||||
u32 abilityNum;
|
||||
s32 pikeMonId = GetMonData(&gEnemyParty[0], MON_DATA_SPECIES);
|
||||
|
|
@ -1156,7 +1156,7 @@ bool32 TryGenerateBattlePikeWildMon(bool8 checkKeenEyeIntimidate)
|
|||
u8 GetBattlePikeWildMonHeaderId(void)
|
||||
{
|
||||
u8 headerId;
|
||||
u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u16 winStreak = gSaveBlock2Ptr->frontier.pikeWinStreaks[lvlMode];
|
||||
|
||||
if (winStreak <= 20 * NUM_PIKE_ROOMS)
|
||||
|
|
@ -1381,7 +1381,7 @@ static void GetRoomTypeHint(void)
|
|||
static void PrepareOneTrainer(bool8 difficult)
|
||||
{
|
||||
int i;
|
||||
u8 lvlMode;
|
||||
enum FrontierLevelMode lvlMode;
|
||||
u8 battleNum;
|
||||
u16 challengeNum;
|
||||
u16 trainerId;
|
||||
|
|
@ -1414,7 +1414,7 @@ static void PrepareTwoTrainers(void)
|
|||
{
|
||||
int i;
|
||||
u16 trainerId;
|
||||
u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u16 challengeNum = gSaveBlock2Ptr->frontier.pikeWinStreaks[lvlMode] / NUM_PIKE_ROOMS;
|
||||
|
||||
gFacilityTrainers = gBattleFrontierTrainers;
|
||||
|
|
@ -1498,7 +1498,7 @@ static u8 GetPikeQueenFightType(u8 nextRoom)
|
|||
|
||||
u8 facility = FRONTIER_FACILITY_PIKE;
|
||||
u8 ret = FRONTIER_BRAIN_NOT_READY;
|
||||
u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u16 winStreak = gSaveBlock2Ptr->frontier.pikeWinStreaks[lvlMode];
|
||||
winStreak += nextRoom;
|
||||
numPikeSymbols = GetPlayerSymbolCountForFacility(FRONTIER_FACILITY_PIKE);
|
||||
|
|
@ -1607,7 +1607,7 @@ static void RestoreMonHeldItems(void)
|
|||
|
||||
static void InitPikeChallenge(void)
|
||||
{
|
||||
u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
|
||||
gSaveBlock2Ptr->frontier.challengeStatus = 0;
|
||||
gSaveBlock2Ptr->frontier.curChallengeBattleNum = 0;
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ static void ClearPyramidPartyHeldItems(void);
|
|||
static void SetPyramidFloorPalette(void);
|
||||
static void BattlePyramidStartMenu(void);
|
||||
static void RestorePyramidPlayerParty(void);
|
||||
static void InitPyramidBagItems(u8);
|
||||
static void InitPyramidBagItems(enum FrontierLevelMode lvlMode);
|
||||
static u8 GetPyramidFloorTemplateId(void);
|
||||
static u8 GetPostBattleDirectionHintTextIndex(int *, u8, u8);
|
||||
static void Task_SetPyramidFloorPalette(u8);
|
||||
|
|
@ -847,7 +847,7 @@ void CallBattlePyramidFunction(void)
|
|||
static void InitPyramidChallenge(void)
|
||||
{
|
||||
bool32 isCurrent;
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
|
||||
gSaveBlock2Ptr->frontier.challengeStatus = 0;
|
||||
gSaveBlock2Ptr->frontier.curChallengeBattleNum = 0;
|
||||
|
|
@ -870,7 +870,7 @@ static void InitPyramidChallenge(void)
|
|||
|
||||
static void GetBattlePyramidData(void)
|
||||
{
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
|
||||
switch (gSpecialVar_0x8005)
|
||||
{
|
||||
|
|
@ -903,7 +903,7 @@ static void GetBattlePyramidData(void)
|
|||
|
||||
static void SetBattlePyramidData(void)
|
||||
{
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
|
||||
switch (gSpecialVar_0x8005)
|
||||
{
|
||||
|
|
@ -947,7 +947,7 @@ static void SavePyramidChallenge(void)
|
|||
|
||||
static void SetBattlePyramidPrize(void)
|
||||
{
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
|
||||
if (gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvlMode] > 41)
|
||||
gSaveBlock2Ptr->frontier.pyramidPrize = sLongStreakRewardItems[Random() % ARRAY_COUNT(sLongStreakRewardItems)];
|
||||
|
|
@ -987,7 +987,7 @@ static void SetPickupItem(void)
|
|||
u32 randSeedIndex, randSeed;
|
||||
u8 id;
|
||||
rng_value_t rand;
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u32 floor = gSaveBlock2Ptr->frontier.curChallengeBattleNum;
|
||||
u32 round = (gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvlMode] / FRONTIER_STAGES_PER_CHALLENGE) % TOTAL_PYRAMID_ROUNDS;
|
||||
|
||||
|
|
@ -1119,7 +1119,7 @@ static void ShowPostBattleHintText(void)
|
|||
|
||||
static void UpdatePyramidWinStreak(void)
|
||||
{
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
|
||||
if (gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvlMode] < 999)
|
||||
gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvlMode]++;
|
||||
|
|
@ -1569,7 +1569,7 @@ void GenerateBattlePyramidWildMon(void)
|
|||
int i;
|
||||
const struct PyramidWildMon *wildMons;
|
||||
u32 id;
|
||||
u32 lvl = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvl = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u16 round = (gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvl] / FRONTIER_STAGES_PER_CHALLENGE) % TOTAL_PYRAMID_ROUNDS;
|
||||
|
||||
if (round >= TOTAL_PYRAMID_ROUNDS)
|
||||
|
|
@ -1712,7 +1712,7 @@ static u16 GetUniqueTrainerId(u8 objectEventId)
|
|||
{
|
||||
int i;
|
||||
u16 trainerId;
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u32 challengeNum = gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvlMode] / FRONTIER_STAGES_PER_CHALLENGE;
|
||||
u32 floor = gSaveBlock2Ptr->frontier.curChallengeBattleNum;
|
||||
if (floor == FRONTIER_STAGES_PER_CHALLENGE)
|
||||
|
|
@ -2166,7 +2166,7 @@ u8 GetNumBattlePyramidObjectEvents(void)
|
|||
return i;
|
||||
}
|
||||
|
||||
static void InitPyramidBagItems(u8 lvlMode)
|
||||
static void InitPyramidBagItems(enum FrontierLevelMode lvlMode)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
@ -2184,7 +2184,7 @@ u16 GetBattlePyramidPickupItemId(void)
|
|||
{
|
||||
int rand;
|
||||
u32 i;
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
int round = (gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvlMode] / FRONTIER_STAGES_PER_CHALLENGE);
|
||||
|
||||
if (round >= TOTAL_PYRAMID_ROUNDS)
|
||||
|
|
|
|||
|
|
@ -766,7 +766,7 @@ void CallBattleTowerFunc(void)
|
|||
|
||||
static void InitTowerChallenge(void)
|
||||
{
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
|
||||
gSaveBlock2Ptr->frontier.challengeStatus = CHALLENGE_STATUS_SAVING;
|
||||
|
|
@ -784,7 +784,7 @@ static void InitTowerChallenge(void)
|
|||
|
||||
static void GetTowerData(void)
|
||||
{
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
|
||||
switch (gSpecialVar_0x8005)
|
||||
|
|
@ -805,7 +805,7 @@ static void GetTowerData(void)
|
|||
|
||||
static void SetTowerData(void)
|
||||
{
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
|
||||
switch (gSpecialVar_0x8005)
|
||||
|
|
@ -849,7 +849,7 @@ static bool8 ChooseSpecialBattleTowerTrainer(void)
|
|||
s32 trainerIds[9];
|
||||
s32 idsCount = 0;
|
||||
s32 winStreak = 0;
|
||||
u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
|
||||
if (VarGet(VAR_FRONTIER_FACILITY) != FRONTIER_FACILITY_TOWER)
|
||||
|
|
@ -913,7 +913,7 @@ static bool8 ChooseSpecialBattleTowerTrainer(void)
|
|||
|
||||
static void SetNextTowerOpponent(void)
|
||||
{
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
if (lvlMode == FRONTIER_LVL_TENT)
|
||||
{
|
||||
SetNextBattleTentOpponent();
|
||||
|
|
@ -1091,7 +1091,7 @@ static void GetOpponentIntroSpeech(void)
|
|||
|
||||
static void SaveCurrentWinStreak(void)
|
||||
{
|
||||
u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
u16 winStreak = GetCurrentBattleTowerWinStreak(lvlMode, battleMode);
|
||||
|
||||
|
|
@ -1102,7 +1102,8 @@ static void SaveCurrentWinStreak(void)
|
|||
static void SaveBattleTowerRecord(void)
|
||||
{
|
||||
s32 i;
|
||||
u8 lvlMode, battleMode, class;
|
||||
enum FrontierLevelMode lvlMode;
|
||||
u8 battleMode, class;
|
||||
struct EmeraldBattleTowerRecord *playerRecord = &gSaveBlock2Ptr->frontier.towerPlayer;
|
||||
|
||||
ClearBattleTowerRecord(playerRecord);
|
||||
|
|
@ -1148,7 +1149,7 @@ static void SaveBattleTowerRecord(void)
|
|||
|
||||
static void SaveTowerChallenge(void)
|
||||
{
|
||||
u16 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u16 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
s32 challengeNum = (signed)(gSaveBlock2Ptr->frontier.towerWinStreaks[battleMode][lvlMode] / FRONTIER_STAGES_PER_CHALLENGE);
|
||||
|
||||
|
|
@ -1201,7 +1202,7 @@ static void GetRecordMixFriendMultiPartnerParty(u16 trainerId)
|
|||
{
|
||||
s32 i, count;
|
||||
u32 validSpecies[3];
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u16 species1 = GetMonData(&gPlayerParty[0], MON_DATA_SPECIES);
|
||||
u16 species2 = GetMonData(&gPlayerParty[1], MON_DATA_SPECIES);
|
||||
|
||||
|
|
@ -1232,7 +1233,8 @@ static void LoadMultiPartnerCandidatesData(void)
|
|||
s32 r10;
|
||||
u16 trainerId;
|
||||
u16 monId;
|
||||
u32 lvlMode, battleMode;
|
||||
enum FrontierLevelMode lvlMode;
|
||||
u32 battleMode;
|
||||
s32 challengeNum;
|
||||
u32 species1, species2;
|
||||
u32 UNUSED level;
|
||||
|
|
@ -1528,7 +1530,7 @@ static void LoadLinkMultiOpponentsData(void)
|
|||
s32 challengeNum;
|
||||
s32 i, j;
|
||||
s32 trainerId = 0;
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
u32 battleNum = gSaveBlock2Ptr->frontier.curChallengeBattleNum;
|
||||
GetMultiplayerId(); // Yet another pointless function call.
|
||||
|
|
@ -1695,7 +1697,7 @@ static void ClearBattleTowerRecord(struct EmeraldBattleTowerRecord *record)
|
|||
((u32 *)record)[i] = 0;
|
||||
}
|
||||
|
||||
u16 GetCurrentBattleTowerWinStreak(u8 lvlMode, u8 battleMode)
|
||||
u16 GetCurrentBattleTowerWinStreak(enum FrontierLevelMode lvlMode, u8 battleMode)
|
||||
{
|
||||
u16 winStreak = gSaveBlock2Ptr->frontier.towerWinStreaks[battleMode][lvlMode];
|
||||
|
||||
|
|
@ -1732,7 +1734,7 @@ static void AwardBattleTowerRibbons(void)
|
|||
struct RibbonCounter ribbons[3]; // BUG: 4 Pokémon can receive ribbons in a double battle mode.
|
||||
#endif
|
||||
u8 ribbonType = 0;
|
||||
u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
u8 monCount = GetMonCountForBattleMode(battleMode);
|
||||
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ struct BlenderBerry
|
|||
{
|
||||
enum Item itemId;
|
||||
u8 name[BERRY_NAME_LENGTH + 1];
|
||||
u8 flavors[FLAVOR_COUNT + 1]; // 5 flavors, + 1 for feel
|
||||
enum Flavor flavors[FLAVOR_COUNT + 1]; // 5 flavors, + 1 for feel
|
||||
};
|
||||
|
||||
struct TimeAndRPM
|
||||
|
|
@ -3442,7 +3442,7 @@ static bool8 PrintBlendingResults(void)
|
|||
s32 xPos, yPos;
|
||||
|
||||
struct Pokeblock pokeblock;
|
||||
u8 flavors[FLAVOR_COUNT + 1];
|
||||
enum Flavor flavors[FLAVOR_COUNT + 1];
|
||||
u8 text[40];
|
||||
u16 UNUSED berryIds[4];
|
||||
|
||||
|
|
|
|||
|
|
@ -447,7 +447,7 @@ static void PrintBerryFirmness(void)
|
|||
{
|
||||
const struct Berry *berry = GetBerryInfo(sBerryTag->berryId);
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, sText_FirmSlash, 0, 0x11, TEXT_SKIP_DRAW, NULL);
|
||||
if (berry->firmness != 0)
|
||||
if (berry->firmness != BERRY_FIRMNESS_UNKNOWN)
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, sBerryFirmnessStrings[berry->firmness], 0x28, 0x11, 0, NULL);
|
||||
else
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, sText_ThreeMarks, 0x28, 0x11, 0, NULL);
|
||||
|
|
|
|||
198
src/bike.c
198
src/bike.c
|
|
@ -11,45 +11,45 @@
|
|||
#include "constants/songs.h"
|
||||
|
||||
// this file's functions
|
||||
static void MovePlayerOnMachBike(u8, u16, u16);
|
||||
static u8 GetMachBikeTransition(u8 *);
|
||||
static void MachBikeTransition_FaceDirection(u8);
|
||||
static void MachBikeTransition_TurnDirection(u8);
|
||||
static void MachBikeTransition_TrySpeedUp(u8);
|
||||
static void MachBikeTransition_TrySlowDown(u8);
|
||||
static void MovePlayerOnAcroBike(u8, u16, u16);
|
||||
static u8 CheckMovementInputAcroBike(u8 *, u16, u16);
|
||||
static u8 AcroBikeHandleInputNormal(u8 *, u16, u16);
|
||||
static u8 AcroBikeHandleInputTurning(u8 *, u16, u16);
|
||||
static u8 AcroBikeHandleInputWheelieStanding(u8 *, u16, u16);
|
||||
static u8 AcroBikeHandleInputBunnyHop(u8 *, u16, u16);
|
||||
static u8 AcroBikeHandleInputWheelieMoving(u8 *, u16, u16);
|
||||
static u8 AcroBikeHandleInputSidewaysJump(u8 *, u16, u16);
|
||||
static u8 AcroBikeHandleInputTurnJump(u8 *, u16, u16);
|
||||
static void AcroBikeTransition_FaceDirection(u8);
|
||||
static void AcroBikeTransition_TurnDirection(u8);
|
||||
static void AcroBikeTransition_Moving(u8);
|
||||
static void AcroBikeTransition_NormalToWheelie(u8);
|
||||
static void AcroBikeTransition_WheelieToNormal(u8);
|
||||
static void AcroBikeTransition_WheelieIdle(u8);
|
||||
static void AcroBikeTransition_WheelieHoppingStanding(u8);
|
||||
static void AcroBikeTransition_WheelieHoppingMoving(u8);
|
||||
static void AcroBikeTransition_SideJump(u8);
|
||||
static void AcroBikeTransition_TurnJump(u8);
|
||||
static void AcroBikeTransition_WheelieMoving(u8);
|
||||
static void AcroBikeTransition_WheelieRisingMoving(u8);
|
||||
static void AcroBikeTransition_WheelieLoweringMoving(u8);
|
||||
static void MovePlayerOnMachBike(enum Direction, u16, u16);
|
||||
static enum MachTransition GetMachBikeTransition(enum Direction *);
|
||||
static void MachBikeTransition_FaceDirection(enum Direction);
|
||||
static void MachBikeTransition_TurnDirection(enum Direction);
|
||||
static void MachBikeTransition_TrySpeedUp(enum Direction);
|
||||
static void MachBikeTransition_TrySlowDown(enum Direction);
|
||||
static void MovePlayerOnAcroBike(enum Direction, u16, u16);
|
||||
static enum AcroTransition CheckMovementInputAcroBike(enum Direction *, u16, u16);
|
||||
static enum AcroTransition AcroBikeHandleInputNormal(enum Direction *, u16, u16);
|
||||
static enum AcroTransition AcroBikeHandleInputTurning(enum Direction *, u16, u16);
|
||||
static enum AcroTransition AcroBikeHandleInputWheelieStanding(enum Direction *, u16, u16);
|
||||
static enum AcroTransition AcroBikeHandleInputBunnyHop(enum Direction *, u16, u16);
|
||||
static enum AcroTransition AcroBikeHandleInputWheelieMoving(enum Direction *, u16, u16);
|
||||
static enum AcroTransition AcroBikeHandleInputSidewaysJump(enum Direction *, u16, u16);
|
||||
static enum AcroTransition AcroBikeHandleInputTurnJump(enum Direction *, u16, u16);
|
||||
static void AcroBikeTransition_FaceDirection(enum Direction);
|
||||
static void AcroBikeTransition_TurnDirection(enum Direction);
|
||||
static void AcroBikeTransition_Moving(enum Direction);
|
||||
static void AcroBikeTransition_NormalToWheelie(enum Direction);
|
||||
static void AcroBikeTransition_WheelieToNormal(enum Direction);
|
||||
static void AcroBikeTransition_WheelieIdle(enum Direction);
|
||||
static void AcroBikeTransition_WheelieHoppingStanding(enum Direction);
|
||||
static void AcroBikeTransition_WheelieHoppingMoving(enum Direction);
|
||||
static void AcroBikeTransition_SideJump(enum Direction);
|
||||
static void AcroBikeTransition_TurnJump(enum Direction);
|
||||
static void AcroBikeTransition_WheelieMoving(enum Direction);
|
||||
static void AcroBikeTransition_WheelieRisingMoving(enum Direction);
|
||||
static void AcroBikeTransition_WheelieLoweringMoving(enum Direction);
|
||||
static void AcroBike_TryHistoryUpdate(u16, u16);
|
||||
static u8 AcroBike_GetJumpDirection(void);
|
||||
static void Bike_UpdateDirTimerHistory(u8);
|
||||
static void Bike_UpdateDirTimerHistory(enum Direction);
|
||||
static void Bike_UpdateABStartSelectHistory(u8);
|
||||
static u8 Bike_DPadToDirection(u16);
|
||||
static u8 GetBikeCollision(u8);
|
||||
static u8 GetBikeCollisionAt(struct ObjectEvent *, s16, s16, u8, u8);
|
||||
static enum Direction Bike_DPadToDirection(u16);
|
||||
static enum Collision GetBikeCollision(enum Direction);
|
||||
static enum Collision GetBikeCollisionAt(struct ObjectEvent *, s16, s16, enum Direction, u8);
|
||||
static bool8 IsRunningDisallowedByMetatile(u8);
|
||||
static void Bike_TryAdvanceCyclingRoadCollisions();
|
||||
static u8 CanBikeFaceDirOnMetatile(u8, u8);
|
||||
static bool8 WillPlayerCollideWithCollision(u8, u8);
|
||||
static u8 CanBikeFaceDirOnMetatile(enum Direction, u8);
|
||||
static bool8 WillPlayerCollideWithCollision(enum Collision, enum Direction);
|
||||
static void Bike_SetBikeStill(void);
|
||||
|
||||
// const rom data
|
||||
|
|
@ -63,7 +63,7 @@ static void Bike_SetBikeStill(void);
|
|||
for its complex tricks and actions.
|
||||
*/
|
||||
|
||||
static void (*const sMachBikeTransitions[])(u8) =
|
||||
static void (*const sMachBikeTransitions[])(enum Direction) =
|
||||
{
|
||||
MachBikeTransition_FaceDirection, // Face vs Turn: Face has no anim while Turn does. Turn checks for collision because if you turn right as opposed to face right, if there is a wall there, turn will make a bonk sound effect while face will not.
|
||||
MachBikeTransition_TurnDirection,
|
||||
|
|
@ -72,14 +72,14 @@ static void (*const sMachBikeTransitions[])(u8) =
|
|||
};
|
||||
|
||||
// bikeFrameCounter is input which is represented by sMachBikeSpeeds in order
|
||||
static void (*const sMachBikeSpeedCallbacks[])(u8) =
|
||||
static void (*const sMachBikeSpeedCallbacks[])(enum Direction) =
|
||||
{
|
||||
PlayerWalkNormal,
|
||||
PlayerWalkFast,
|
||||
PlayerWalkFaster,
|
||||
};
|
||||
|
||||
static void (*const sAcroBikeTransitions[])(u8) =
|
||||
static void (*const sAcroBikeTransitions[])(enum Direction) =
|
||||
{
|
||||
AcroBikeTransition_FaceDirection,
|
||||
AcroBikeTransition_TurnDirection,
|
||||
|
|
@ -96,7 +96,7 @@ static void (*const sAcroBikeTransitions[])(u8) =
|
|||
AcroBikeTransition_WheelieLoweringMoving,
|
||||
};
|
||||
|
||||
static u8 (*const sAcroBikeInputHandlers[])(u8 *, u16, u16) =
|
||||
static enum AcroTransition (*const sAcroBikeInputHandlers[])(enum Direction *, u16, u16) =
|
||||
{
|
||||
AcroBikeHandleInputNormal,
|
||||
AcroBikeHandleInputTurning,
|
||||
|
|
@ -108,7 +108,7 @@ static u8 (*const sAcroBikeInputHandlers[])(u8 *, u16, u16) =
|
|||
};
|
||||
|
||||
// used with bikeFrameCounter from mach bike
|
||||
static const u16 sMachBikeSpeeds[] = {PLAYER_SPEED_NORMAL, PLAYER_SPEED_FAST, PLAYER_SPEED_FASTEST};
|
||||
static const enum PlayerSpeed sMachBikeSpeeds[] = {PLAYER_SPEED_NORMAL, PLAYER_SPEED_FAST, PLAYER_SPEED_FASTEST};
|
||||
|
||||
// this is a list of timers to compare against later, terminated with 0. the only timer being compared against is 4 frames in this list.
|
||||
static const u8 sAcroBikeJumpTimerList[] = {4, 0};
|
||||
|
|
@ -124,7 +124,7 @@ static const struct BikeHistoryInputInfo sAcroBikeTricksList[] =
|
|||
};
|
||||
|
||||
// code
|
||||
void MovePlayerOnBike(u8 direction, u16 newKeys, u16 heldKeys)
|
||||
void MovePlayerOnBike(enum Direction direction, u16 newKeys, u16 heldKeys)
|
||||
{
|
||||
if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_MACH_BIKE)
|
||||
MovePlayerOnMachBike(direction, newKeys, heldKeys);
|
||||
|
|
@ -132,16 +132,16 @@ void MovePlayerOnBike(u8 direction, u16 newKeys, u16 heldKeys)
|
|||
MovePlayerOnAcroBike(direction, newKeys, heldKeys);
|
||||
}
|
||||
|
||||
static void MovePlayerOnMachBike(u8 direction, u16 newKeys, u16 heldKeys)
|
||||
static void MovePlayerOnMachBike(enum Direction direction, u16 newKeys, u16 heldKeys)
|
||||
{
|
||||
sMachBikeTransitions[GetMachBikeTransition(&direction)](direction);
|
||||
}
|
||||
|
||||
// dirTraveling is a variable that is 0 when the player is standing still.
|
||||
static u8 GetMachBikeTransition(u8 *dirTraveling)
|
||||
// dirTraveling is a variable that is DIR_NONE when the player is standing still.
|
||||
static enum MachTransition GetMachBikeTransition(enum Direction *dirTraveling)
|
||||
{
|
||||
// if the dir updated before this function, get the relevent new direction to check later.
|
||||
u8 direction = GetPlayerMovementDirection();
|
||||
enum Direction direction = GetPlayerMovementDirection();
|
||||
|
||||
// fix direction when moving on sideways stairs
|
||||
switch (direction)
|
||||
|
|
@ -154,6 +154,8 @@ static u8 GetMachBikeTransition(u8 *dirTraveling)
|
|||
case DIR_NORTHEAST:
|
||||
direction = DIR_EAST;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// is the player standing still?
|
||||
|
|
@ -190,13 +192,13 @@ static u8 GetMachBikeTransition(u8 *dirTraveling)
|
|||
}
|
||||
|
||||
// the difference between face direction and turn direction is that one changes direction while the other does the animation of turning as well as changing direction.
|
||||
static void MachBikeTransition_FaceDirection(u8 direction)
|
||||
static void MachBikeTransition_FaceDirection(enum Direction direction)
|
||||
{
|
||||
PlayerFaceDirection(direction);
|
||||
Bike_SetBikeStill();
|
||||
}
|
||||
|
||||
static void MachBikeTransition_TurnDirection(u8 direction)
|
||||
static void MachBikeTransition_TurnDirection(enum Direction direction)
|
||||
{
|
||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
|
||||
|
|
@ -211,10 +213,10 @@ static void MachBikeTransition_TurnDirection(u8 direction)
|
|||
}
|
||||
}
|
||||
|
||||
static void MachBikeTransition_TrySpeedUp(u8 direction)
|
||||
static void MachBikeTransition_TrySpeedUp(enum Direction direction)
|
||||
{
|
||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
u8 collision;
|
||||
enum Collision collision;
|
||||
|
||||
if (CanBikeFaceDirOnMetatile(direction, playerObjEvent->currentMetatileBehavior) == FALSE)
|
||||
{
|
||||
|
|
@ -227,7 +229,7 @@ static void MachBikeTransition_TrySpeedUp(u8 direction)
|
|||
else
|
||||
{
|
||||
collision = GetBikeCollision(direction);
|
||||
if (collision > 0 && collision < COLLISION_VERTICAL_RAIL)
|
||||
if (collision > COLLISION_NONE && collision < COLLISION_VERTICAL_RAIL)
|
||||
{
|
||||
// we hit a solid object, but check to see if its a ledge and then jump.
|
||||
if (collision == COLLISION_LEDGE_JUMP)
|
||||
|
|
@ -258,9 +260,9 @@ static void MachBikeTransition_TrySpeedUp(u8 direction)
|
|||
}
|
||||
}
|
||||
|
||||
static void MachBikeTransition_TrySlowDown(u8 direction)
|
||||
static void MachBikeTransition_TrySlowDown(enum Direction direction)
|
||||
{
|
||||
u8 collision;
|
||||
enum Collision collision;
|
||||
|
||||
if (gPlayerAvatar.bikeSpeed != PLAYER_SPEED_STANDING)
|
||||
gPlayerAvatar.bikeFrameCounter = --gPlayerAvatar.bikeSpeed;
|
||||
|
|
@ -289,19 +291,19 @@ static void MachBikeTransition_TrySlowDown(u8 direction)
|
|||
}
|
||||
|
||||
// the acro bike requires the input handler to be executed before the transition can.
|
||||
static void MovePlayerOnAcroBike(u8 newDirection, u16 newKeys, u16 heldKeys)
|
||||
static void MovePlayerOnAcroBike(enum Direction newDirection, u16 newKeys, u16 heldKeys)
|
||||
{
|
||||
sAcroBikeTransitions[CheckMovementInputAcroBike(&newDirection, newKeys, heldKeys)](newDirection);
|
||||
}
|
||||
|
||||
static u8 CheckMovementInputAcroBike(u8 *newDirection, u16 newKeys, u16 heldKeys)
|
||||
static enum AcroTransition CheckMovementInputAcroBike(enum Direction *newDirection, u16 newKeys, u16 heldKeys)
|
||||
{
|
||||
return sAcroBikeInputHandlers[gPlayerAvatar.acroBikeState](newDirection, newKeys, heldKeys);
|
||||
}
|
||||
|
||||
static u8 AcroBikeHandleInputNormal(u8 *newDirection, u16 newKeys, u16 heldKeys)
|
||||
static enum AcroTransition AcroBikeHandleInputNormal(enum Direction *newDirection, u16 newKeys, u16 heldKeys)
|
||||
{
|
||||
u8 direction = GetPlayerMovementDirection();
|
||||
enum Direction direction = GetPlayerMovementDirection();
|
||||
|
||||
gPlayerAvatar.bikeFrameCounter = 0;
|
||||
if (*newDirection == DIR_NONE)
|
||||
|
|
@ -339,9 +341,9 @@ static u8 AcroBikeHandleInputNormal(u8 *newDirection, u16 newKeys, u16 heldKeys)
|
|||
return ACRO_TRANS_MOVING;
|
||||
}
|
||||
|
||||
static u8 AcroBikeHandleInputTurning(u8 *newDirection, u16 newKeys, u16 heldKeys)
|
||||
static enum AcroTransition AcroBikeHandleInputTurning(enum Direction *newDirection, u16 newKeys, u16 heldKeys)
|
||||
{
|
||||
u8 direction;
|
||||
enum Direction direction;
|
||||
|
||||
*newDirection = gPlayerAvatar.newDirBackup;
|
||||
gPlayerAvatar.bikeFrameCounter++;
|
||||
|
|
@ -378,9 +380,9 @@ static u8 AcroBikeHandleInputTurning(u8 *newDirection, u16 newKeys, u16 heldKeys
|
|||
return ACRO_TRANS_FACE_DIRECTION;
|
||||
}
|
||||
|
||||
static u8 AcroBikeHandleInputWheelieStanding(u8 *newDirection, u16 newKeys, u16 heldKeys)
|
||||
static enum AcroTransition AcroBikeHandleInputWheelieStanding(enum Direction *newDirection, u16 newKeys, u16 heldKeys)
|
||||
{
|
||||
u8 direction;
|
||||
enum Direction direction;
|
||||
struct ObjectEvent *playerObjEvent;
|
||||
|
||||
direction = GetPlayerMovementDirection();
|
||||
|
|
@ -428,9 +430,9 @@ static u8 AcroBikeHandleInputWheelieStanding(u8 *newDirection, u16 newKeys, u16
|
|||
return ACRO_TRANS_WHEELIE_IDLE;
|
||||
}
|
||||
|
||||
static u8 AcroBikeHandleInputBunnyHop(u8 *newDirection, u16 newKeys, u16 heldKeys)
|
||||
static enum AcroTransition AcroBikeHandleInputBunnyHop(enum Direction *newDirection, u16 newKeys, u16 heldKeys)
|
||||
{
|
||||
u8 direction;
|
||||
enum Direction direction;
|
||||
struct ObjectEvent *playerObjEvent;
|
||||
|
||||
direction = GetPlayerMovementDirection();
|
||||
|
|
@ -475,9 +477,9 @@ static u8 AcroBikeHandleInputBunnyHop(u8 *newDirection, u16 newKeys, u16 heldKey
|
|||
return ACRO_TRANS_WHEELIE_HOPPING_MOVING;
|
||||
}
|
||||
|
||||
static u8 AcroBikeHandleInputWheelieMoving(u8 *newDirection, u16 newKeys, u16 heldKeys)
|
||||
static enum AcroTransition AcroBikeHandleInputWheelieMoving(enum Direction *newDirection, u16 newKeys, u16 heldKeys)
|
||||
{
|
||||
u8 direction;
|
||||
enum Direction direction;
|
||||
struct ObjectEvent *playerObjEvent;
|
||||
|
||||
direction = GetPlayerFacingDirection();
|
||||
|
|
@ -530,7 +532,7 @@ static u8 AcroBikeHandleInputWheelieMoving(u8 *newDirection, u16 newKeys, u16 he
|
|||
return ACRO_TRANS_WHEELIE_MOVING;
|
||||
}
|
||||
|
||||
static u8 AcroBikeHandleInputSidewaysJump(u8 *ptr, u16 newKeys, u16 heldKeys)
|
||||
static enum AcroTransition AcroBikeHandleInputSidewaysJump(enum Direction *ptr, u16 newKeys, u16 heldKeys)
|
||||
{
|
||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
|
||||
|
|
@ -540,18 +542,18 @@ static u8 AcroBikeHandleInputSidewaysJump(u8 *ptr, u16 newKeys, u16 heldKeys)
|
|||
return CheckMovementInputAcroBike(ptr, newKeys, heldKeys);
|
||||
}
|
||||
|
||||
static u8 AcroBikeHandleInputTurnJump(u8 *ptr, u16 newKeys, u16 heldKeys)
|
||||
static enum AcroTransition AcroBikeHandleInputTurnJump(enum Direction *ptr, u16 newKeys, u16 heldKeys)
|
||||
{
|
||||
gPlayerAvatar.acroBikeState = ACRO_STATE_NORMAL;
|
||||
return CheckMovementInputAcroBike(ptr, newKeys, heldKeys);
|
||||
}
|
||||
|
||||
static void AcroBikeTransition_FaceDirection(u8 direction)
|
||||
static void AcroBikeTransition_FaceDirection(enum Direction direction)
|
||||
{
|
||||
PlayerFaceDirection(direction);
|
||||
}
|
||||
|
||||
static void AcroBikeTransition_TurnDirection(u8 direction)
|
||||
static void AcroBikeTransition_TurnDirection(enum Direction direction)
|
||||
{
|
||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
|
||||
|
|
@ -560,9 +562,9 @@ static void AcroBikeTransition_TurnDirection(u8 direction)
|
|||
PlayerFaceDirection(direction);
|
||||
}
|
||||
|
||||
static void AcroBikeTransition_Moving(u8 direction)
|
||||
static void AcroBikeTransition_Moving(enum Direction direction)
|
||||
{
|
||||
u8 collision;
|
||||
enum Collision collision;
|
||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
|
||||
if (CanBikeFaceDirOnMetatile(direction, playerObjEvent->currentMetatileBehavior) == 0)
|
||||
|
|
@ -571,7 +573,7 @@ static void AcroBikeTransition_Moving(u8 direction)
|
|||
return;
|
||||
}
|
||||
collision = GetBikeCollision(direction);
|
||||
if (collision > 0 && collision < COLLISION_VERTICAL_RAIL)
|
||||
if (collision > COLLISION_NONE && collision < COLLISION_VERTICAL_RAIL)
|
||||
{
|
||||
if (collision == COLLISION_LEDGE_JUMP)
|
||||
PlayerJumpLedge(direction);
|
||||
|
|
@ -589,7 +591,7 @@ static void AcroBikeTransition_Moving(u8 direction)
|
|||
}
|
||||
}
|
||||
|
||||
static void AcroBikeTransition_NormalToWheelie(u8 direction)
|
||||
static void AcroBikeTransition_NormalToWheelie(enum Direction direction)
|
||||
{
|
||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
|
||||
|
|
@ -598,7 +600,7 @@ static void AcroBikeTransition_NormalToWheelie(u8 direction)
|
|||
PlayerStartWheelie(direction);
|
||||
}
|
||||
|
||||
static void AcroBikeTransition_WheelieToNormal(u8 direction)
|
||||
static void AcroBikeTransition_WheelieToNormal(enum Direction direction)
|
||||
{
|
||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
|
||||
|
|
@ -607,7 +609,7 @@ static void AcroBikeTransition_WheelieToNormal(u8 direction)
|
|||
PlayerEndWheelie(direction);
|
||||
}
|
||||
|
||||
static void AcroBikeTransition_WheelieIdle(u8 direction)
|
||||
static void AcroBikeTransition_WheelieIdle(enum Direction direction)
|
||||
{
|
||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
|
||||
|
|
@ -616,7 +618,7 @@ static void AcroBikeTransition_WheelieIdle(u8 direction)
|
|||
PlayerIdleWheelie(direction);
|
||||
}
|
||||
|
||||
static void AcroBikeTransition_WheelieHoppingStanding(u8 direction)
|
||||
static void AcroBikeTransition_WheelieHoppingStanding(enum Direction direction)
|
||||
{
|
||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
|
||||
|
|
@ -625,9 +627,9 @@ static void AcroBikeTransition_WheelieHoppingStanding(u8 direction)
|
|||
PlayerStandingHoppingWheelie(direction);
|
||||
}
|
||||
|
||||
static void AcroBikeTransition_WheelieHoppingMoving(u8 direction)
|
||||
static void AcroBikeTransition_WheelieHoppingMoving(enum Direction direction)
|
||||
{
|
||||
u8 collision;
|
||||
enum Collision collision;
|
||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
|
||||
if (CanBikeFaceDirOnMetatile(direction, playerObjEvent->currentMetatileBehavior) == 0)
|
||||
|
|
@ -656,9 +658,9 @@ static void AcroBikeTransition_WheelieHoppingMoving(u8 direction)
|
|||
PlayerMovingHoppingWheelie(direction);
|
||||
}
|
||||
|
||||
static void AcroBikeTransition_SideJump(u8 direction)
|
||||
static void AcroBikeTransition_SideJump(enum Direction direction)
|
||||
{
|
||||
u8 collision;
|
||||
enum Collision collision;
|
||||
struct ObjectEvent *playerObjEvent;
|
||||
|
||||
collision = GetBikeCollision(direction);
|
||||
|
|
@ -683,14 +685,14 @@ static void AcroBikeTransition_SideJump(u8 direction)
|
|||
PlayerSetAnimId(GetJumpMovementAction(direction), COPY_MOVE_WALK);
|
||||
}
|
||||
|
||||
static void AcroBikeTransition_TurnJump(u8 direction)
|
||||
static void AcroBikeTransition_TurnJump(enum Direction direction)
|
||||
{
|
||||
PlayerAcroTurnJump(direction);
|
||||
}
|
||||
|
||||
static void AcroBikeTransition_WheelieMoving(u8 direction)
|
||||
static void AcroBikeTransition_WheelieMoving(enum Direction direction)
|
||||
{
|
||||
u8 collision;
|
||||
enum Collision collision;
|
||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
|
||||
if (CanBikeFaceDirOnMetatile(direction, playerObjEvent->currentMetatileBehavior) == 0)
|
||||
|
|
@ -699,7 +701,7 @@ static void AcroBikeTransition_WheelieMoving(u8 direction)
|
|||
return;
|
||||
}
|
||||
collision = GetBikeCollision(direction);
|
||||
if (collision > 0 && collision < COLLISION_VERTICAL_RAIL)
|
||||
if (collision > COLLISION_NONE && collision < COLLISION_VERTICAL_RAIL)
|
||||
{
|
||||
if (collision == COLLISION_LEDGE_JUMP)
|
||||
{
|
||||
|
|
@ -723,9 +725,9 @@ static void AcroBikeTransition_WheelieMoving(u8 direction)
|
|||
gPlayerAvatar.runningState = MOVING;
|
||||
}
|
||||
|
||||
static void AcroBikeTransition_WheelieRisingMoving(u8 direction)
|
||||
static void AcroBikeTransition_WheelieRisingMoving(enum Direction direction)
|
||||
{
|
||||
u8 collision;
|
||||
enum Collision collision;
|
||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
|
||||
if (CanBikeFaceDirOnMetatile(direction, playerObjEvent->currentMetatileBehavior) == 0)
|
||||
|
|
@ -734,7 +736,7 @@ static void AcroBikeTransition_WheelieRisingMoving(u8 direction)
|
|||
return;
|
||||
}
|
||||
collision = GetBikeCollision(direction);
|
||||
if (collision > 0 && collision < COLLISION_VERTICAL_RAIL)
|
||||
if (collision > COLLISION_NONE && collision < COLLISION_VERTICAL_RAIL)
|
||||
{
|
||||
if (collision == COLLISION_LEDGE_JUMP)
|
||||
{
|
||||
|
|
@ -758,9 +760,9 @@ static void AcroBikeTransition_WheelieRisingMoving(u8 direction)
|
|||
gPlayerAvatar.runningState = MOVING;
|
||||
}
|
||||
|
||||
static void AcroBikeTransition_WheelieLoweringMoving(u8 direction)
|
||||
static void AcroBikeTransition_WheelieLoweringMoving(enum Direction direction)
|
||||
{
|
||||
u8 collision;
|
||||
enum Collision collision;
|
||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
|
||||
if (CanBikeFaceDirOnMetatile(direction, playerObjEvent->currentMetatileBehavior) == 0)
|
||||
|
|
@ -769,7 +771,7 @@ static void AcroBikeTransition_WheelieLoweringMoving(u8 direction)
|
|||
return;
|
||||
}
|
||||
collision = GetBikeCollision(direction);
|
||||
if (collision > 0 && collision < COLLISION_VERTICAL_RAIL)
|
||||
if (collision > COLLISION_NONE && collision < COLLISION_VERTICAL_RAIL)
|
||||
{
|
||||
if (collision == COLLISION_LEDGE_JUMP)
|
||||
PlayerJumpLedge(direction);
|
||||
|
|
@ -789,7 +791,7 @@ void Bike_TryAcroBikeHistoryUpdate(u16 newKeys, u16 heldKeys)
|
|||
|
||||
static void AcroBike_TryHistoryUpdate(u16 newKeys, u16 heldKeys) // newKeys is unused
|
||||
{
|
||||
u8 direction = Bike_DPadToDirection(heldKeys);
|
||||
enum Direction direction = Bike_DPadToDirection(heldKeys);
|
||||
|
||||
if (direction == (gPlayerAvatar.directionHistory & 0xF))
|
||||
{
|
||||
|
|
@ -851,7 +853,7 @@ static u8 AcroBike_GetJumpDirection(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void Bike_UpdateDirTimerHistory(u8 dir)
|
||||
static void Bike_UpdateDirTimerHistory(enum Direction dir)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
|
|
@ -873,7 +875,7 @@ static void Bike_UpdateABStartSelectHistory(u8 input)
|
|||
gPlayerAvatar.abStartSelectTimerHistory[0] = 1;
|
||||
}
|
||||
|
||||
static u8 Bike_DPadToDirection(u16 heldKeys)
|
||||
static enum Direction Bike_DPadToDirection(u16 heldKeys)
|
||||
{
|
||||
if (heldKeys & DPAD_UP)
|
||||
return DIR_NORTH;
|
||||
|
|
@ -886,7 +888,7 @@ static u8 Bike_DPadToDirection(u16 heldKeys)
|
|||
return DIR_NONE;
|
||||
}
|
||||
|
||||
static u8 GetBikeCollision(u8 direction)
|
||||
static enum Collision GetBikeCollision(enum Direction direction)
|
||||
{
|
||||
u8 metatileBehavior;
|
||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
|
|
@ -897,9 +899,9 @@ static u8 GetBikeCollision(u8 direction)
|
|||
return GetBikeCollisionAt(playerObjEvent, x, y, direction, metatileBehavior);
|
||||
}
|
||||
|
||||
static u8 GetBikeCollisionAt(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 direction, u8 metatileBehavior)
|
||||
static enum Collision GetBikeCollisionAt(struct ObjectEvent *objectEvent, s16 x, s16 y, enum Direction direction, u8 metatileBehavior)
|
||||
{
|
||||
u8 collision = CheckForObjectEventCollision(objectEvent, x, y, direction, metatileBehavior);
|
||||
enum Collision collision = CheckForObjectEventCollision(objectEvent, x, y, direction, metatileBehavior);
|
||||
|
||||
if (collision > COLLISION_OBJECT_EVENT)
|
||||
return collision;
|
||||
|
|
@ -936,7 +938,7 @@ static void Bike_TryAdvanceCyclingRoadCollisions(void)
|
|||
gBikeCollisions++;
|
||||
}
|
||||
|
||||
static bool8 CanBikeFaceDirOnMetatile(u8 direction, u8 tile)
|
||||
static bool8 CanBikeFaceDirOnMetatile(enum Direction direction, u8 tile)
|
||||
{
|
||||
if (direction == DIR_EAST || direction == DIR_WEST)
|
||||
{
|
||||
|
|
@ -955,7 +957,7 @@ static bool8 CanBikeFaceDirOnMetatile(u8 direction, u8 tile)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static bool8 WillPlayerCollideWithCollision(u8 newTileCollision, u8 direction)
|
||||
static bool8 WillPlayerCollideWithCollision(enum Collision newTileCollision, enum Direction direction)
|
||||
{
|
||||
if (direction == DIR_NORTH || direction == DIR_SOUTH)
|
||||
{
|
||||
|
|
@ -1041,10 +1043,10 @@ static void Bike_SetBikeStill(void)
|
|||
gPlayerAvatar.bikeSpeed = PLAYER_SPEED_STANDING;
|
||||
}
|
||||
|
||||
s16 GetPlayerSpeed(void)
|
||||
enum PlayerSpeed GetPlayerSpeed(void)
|
||||
{
|
||||
// because the player pressed a direction, it won't ever return a speed of 0 since this function returns the player's current speed.
|
||||
s16 machSpeeds[3];
|
||||
enum PlayerSpeed machSpeeds[3];
|
||||
|
||||
memcpy(machSpeeds, sMachBikeSpeeds, sizeof(machSpeeds));
|
||||
|
||||
|
|
|
|||
|
|
@ -650,8 +650,8 @@ static void Task_ValidateMixingGameLanguage(u8 taskId)
|
|||
playerCount = GetLinkPlayerCount();
|
||||
for (i = 0; i < playerCount; i++)
|
||||
{
|
||||
u32 version = (u8)gLinkPlayers[i].version;
|
||||
u32 language = gLinkPlayers[i].language;
|
||||
enum GameVersion version = (u8)gLinkPlayers[i].version;
|
||||
enum Language language = gLinkPlayers[i].language;
|
||||
|
||||
if (version == VERSION_RUBY || version == VERSION_SAPPHIRE)
|
||||
{
|
||||
|
|
@ -956,7 +956,7 @@ static void CB2_ReturnFromUnionRoomBattle(void)
|
|||
linkedWithFRLG = FALSE;
|
||||
for (i = 0; i < playerCount; i++)
|
||||
{
|
||||
u32 version = (u8)gLinkPlayers[i].version;
|
||||
enum GameVersion version = (u8)gLinkPlayers[i].version;
|
||||
if (version == VERSION_FIRE_RED || version == VERSION_LEAF_GREEN)
|
||||
{
|
||||
linkedWithFRLG = TRUE;
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ static void SetConestLiveUpdateTVData(void);
|
|||
static void SetContestLiveUpdateFlags(u8);
|
||||
static void ContestDebugPrintBitStrings(void);
|
||||
static void StripPlayerNameForLinkContest(u8 *);
|
||||
static void StripMonNameForLinkContest(u8 *, s32);
|
||||
static void StripMonNameForLinkContest(u8 *, enum Language);
|
||||
static void SwapMoveDescAndContestTilemaps(void);
|
||||
|
||||
// An index into a palette where the text color for each contestant is stored.
|
||||
|
|
@ -347,7 +347,7 @@ EWRAM_DATA u8 gLinkContestFlags = 0;
|
|||
// Bit 0: Is a link contest
|
||||
// Bit 1: Link contest uses wireless adapter
|
||||
EWRAM_DATA u8 gContestLinkLeaderIndex = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_ContestCategory = 0;
|
||||
EWRAM_DATA enum ContestCategories gSpecialVar_ContestCategory = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_ContestRank = 0;
|
||||
EWRAM_DATA u8 gNumLinkContestPlayers = 0;
|
||||
EWRAM_DATA u8 gHighestRibbonRank = 0;
|
||||
|
|
@ -2901,7 +2901,7 @@ void CreateContestMonFromParty(u8 partyIndex)
|
|||
gContestMons[gContestPlayerMonIndex].tough = tough;
|
||||
}
|
||||
|
||||
void SetContestants(u8 contestType, u8 rank)
|
||||
void SetContestants(enum ContestCategories contestType, u8 rank)
|
||||
{
|
||||
s32 i;
|
||||
u8 opponentsCount = 0;
|
||||
|
|
@ -2957,7 +2957,7 @@ void SetContestants(u8 contestType, u8 rank)
|
|||
CreateContestMonFromParty(gContestMonPartyIndex);
|
||||
}
|
||||
|
||||
void SetLinkAIContestants(u8 contestType, u8 rank, bool32 isPostgame)
|
||||
void SetLinkAIContestants(enum ContestCategories contestType, u8 rank, bool32 isPostgame)
|
||||
{
|
||||
s32 i, j;
|
||||
u8 opponentsCount = 0;
|
||||
|
|
@ -3080,7 +3080,7 @@ static void PrintContestantMonNameWithColor(u8 contestant, u8 color)
|
|||
Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[contestant], gDisplayedStringBattle, 5, 1, GetFontIdToFit(gContestMons[contestant].nickname, FONT_NARROW, 0, 50));
|
||||
}
|
||||
|
||||
static u16 CalculateContestantRound1Points(u8 who, u8 contestCategory)
|
||||
static u16 CalculateContestantRound1Points(u8 who, enum ContestCategories contestCategory)
|
||||
{
|
||||
u8 statMain;
|
||||
u8 statSub1;
|
||||
|
|
@ -3118,7 +3118,7 @@ static u16 CalculateContestantRound1Points(u8 who, u8 contestCategory)
|
|||
return statMain + (statSub1 + statSub2 + gContestMons[who].sheen) / 2;
|
||||
}
|
||||
|
||||
void CalculateRound1Points(u8 contestCategory)
|
||||
void CalculateRound1Points(enum ContestCategories contestCategory)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
|
|
@ -6003,9 +6003,9 @@ static void ContestDebugPrintBitStrings(void)
|
|||
SwapMoveDescAndContestTilemaps();
|
||||
}
|
||||
|
||||
static u8 GetMonNicknameLanguage(u8 *nickname)
|
||||
static enum Language GetMonNicknameLanguage(u8 *nickname)
|
||||
{
|
||||
u8 ret = GAME_LANGUAGE;
|
||||
enum Language ret = GAME_LANGUAGE;
|
||||
|
||||
if (nickname[0] == EXT_CTRL_CODE_BEGIN && nickname[1] == EXT_CTRL_CODE_JPN)
|
||||
return GAME_LANGUAGE;
|
||||
|
|
@ -6060,7 +6060,7 @@ static void StripPlayerNameForLinkContest(u8 *playerName)
|
|||
playerName[PLAYER_NAME_LENGTH] = chr;
|
||||
}
|
||||
|
||||
static void StripMonNameForLinkContest(u8 *monName, s32 language)
|
||||
static void StripMonNameForLinkContest(u8 *monName, enum Language language)
|
||||
{
|
||||
u8 chr;
|
||||
|
||||
|
|
@ -6078,7 +6078,7 @@ static void StripMonNameForLinkContest(u8 *monName, s32 language)
|
|||
}
|
||||
}
|
||||
|
||||
void StripPlayerAndMonNamesForLinkContest(struct ContestPokemon *mon, s32 language)
|
||||
void StripPlayerAndMonNamesForLinkContest(struct ContestPokemon *mon, enum Language language)
|
||||
{
|
||||
u8 *name = mon->nickname;
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ static void ContestEffect_ExciteAudienceInAnyContest(void);
|
|||
static void ContestEffect_BadlyStartleMonsWithGoodAppeals(void);
|
||||
static void ContestEffect_BetterWhenAudienceExcited(void);
|
||||
static void ContestEffect_DontExciteAudience(void);
|
||||
static void JamByMoveCategory(u8);
|
||||
static void JamByMoveCategory(enum ContestCategories);
|
||||
static bool8 CanUnnerveContestant(u8);
|
||||
static u8 WasAtLeastOneOpponentJammed(void);
|
||||
static void JamContestant(u8, u8);
|
||||
|
|
@ -973,7 +973,7 @@ static void ContestEffect_DontExciteAudience(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void JamByMoveCategory(u8 category)
|
||||
static void JamByMoveCategory(enum ContestCategories category)
|
||||
{
|
||||
int i;
|
||||
int numJammed = 0;
|
||||
|
|
|
|||
|
|
@ -33,8 +33,9 @@ static void Task_LinkContest_CalculateTurnOrderEm(u8);
|
|||
void Task_LinkContest_StartCommunicationEm(u8 taskId)
|
||||
{
|
||||
int gameCleared;
|
||||
enum ContestCategories category = gTasks[taskId].tCategory;
|
||||
|
||||
switch (gTasks[taskId].tCategory)
|
||||
switch (category)
|
||||
{
|
||||
case CONTEST_CATEGORY_COOL:
|
||||
gHighestRibbonRank = GetMonData(&gPlayerParty[gContestMonPartyIndex], MON_DATA_COOL_RIBBON);
|
||||
|
|
|
|||
|
|
@ -396,7 +396,8 @@ static void LoadContestPaintingFrame(u8 contestWinnerId, bool8 isForArtist)
|
|||
if (isForArtist == TRUE)
|
||||
{
|
||||
// Load Artist's frame
|
||||
switch (gContestPaintingWinner->contestCategory / NUM_PAINTING_CAPTIONS)
|
||||
enum ContestCategories category = gContestPaintingWinner->contestCategory / NUM_PAINTING_CAPTIONS;
|
||||
switch (category)
|
||||
{
|
||||
case CONTEST_CATEGORY_COOL:
|
||||
DecompressDataWithHeaderVram(sPictureFrameTiles_Cool, (void *)VRAM);
|
||||
|
|
@ -418,6 +419,8 @@ static void LoadContestPaintingFrame(u8 contestWinnerId, bool8 isForArtist)
|
|||
DecompressDataWithHeaderVram(sPictureFrameTiles_Tough, (void *)VRAM);
|
||||
DecompressDataWithHeaderWram(sPictureFrameTilemap_Tough, gContestMonPixels);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Set the background
|
||||
|
|
@ -447,7 +450,8 @@ static void LoadContestPaintingFrame(u8 contestWinnerId, bool8 isForArtist)
|
|||
else
|
||||
{
|
||||
// Load Museum frame
|
||||
switch (gContestPaintingWinner->contestCategory / NUM_PAINTING_CAPTIONS)
|
||||
enum ContestCategories category = gContestPaintingWinner->contestCategory / NUM_PAINTING_CAPTIONS;
|
||||
switch (category)
|
||||
{
|
||||
case CONTEST_CATEGORY_COOL:
|
||||
DecompressDataWithHeaderVram(sPictureFrameTiles_Cool, (void *)VRAM);
|
||||
|
|
@ -469,6 +473,8 @@ static void LoadContestPaintingFrame(u8 contestWinnerId, bool8 isForArtist)
|
|||
DecompressDataWithHeaderVram(sPictureFrameTiles_Tough, (void *)VRAM);
|
||||
DecompressDataWithHeaderVram(sPictureFrameTilemap_Tough, (void *)(BG_SCREEN_ADDR(12)));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -494,7 +500,7 @@ static void InitPaintingMonOamData(u8 contestWinnerId)
|
|||
|
||||
static u8 GetImageEffectForContestWinner(u8 contestWinnerId)
|
||||
{
|
||||
u8 contestCategory;
|
||||
enum ContestCategories contestCategory;
|
||||
|
||||
if (contestWinnerId < MUSEUM_CONTEST_WINNERS_START)
|
||||
contestCategory = gContestPaintingWinner->contestCategory;
|
||||
|
|
@ -513,6 +519,8 @@ static u8 GetImageEffectForContestWinner(u8 contestWinnerId)
|
|||
return IMAGE_EFFECT_CHARCOAL;
|
||||
case CONTEST_CATEGORY_TOUGH:
|
||||
return IMAGE_EFFECT_GRAYSCALE_LIGHT;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return contestCategory;
|
||||
|
|
|
|||
|
|
@ -1973,6 +1973,8 @@ u16 HasMonWonThisContestBefore(void)
|
|||
if (GetMonData(mon, MON_DATA_TOUGH_RIBBON) > gSpecialVar_ContestRank)
|
||||
hasRankRibbon = TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return hasRankRibbon;
|
||||
|
|
@ -2037,6 +2039,8 @@ void GiveMonContestRibbon(void)
|
|||
TryPutSpotTheCutiesOnAir(&gPlayerParty[gContestMonPartyIndex], MON_DATA_TOUGH_RIBBON);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2467,7 +2471,7 @@ void SetLinkContestPlayerGfx(void)
|
|||
{
|
||||
for (i = 0; i < gNumLinkContestPlayers; i++)
|
||||
{
|
||||
int version = (u8)gLinkPlayers[i].version;
|
||||
enum GameVersion version = (u8)gLinkPlayers[i].version;
|
||||
if (version == VERSION_RUBY || version == VERSION_SAPPHIRE)
|
||||
{
|
||||
if (gLinkPlayers[i].gender == MALE)
|
||||
|
|
@ -2488,7 +2492,7 @@ void LoadLinkContestPlayerPalettes(void)
|
|||
{
|
||||
int i;
|
||||
u8 objectEventId;
|
||||
int version;
|
||||
enum GameVersion version;
|
||||
struct Sprite *sprite;
|
||||
static const u8 sContestantLocalIds[CONTESTANT_COUNT] = {
|
||||
LOCALID_CONTESTANT_1,
|
||||
|
|
|
|||
|
|
@ -679,7 +679,7 @@ u8 (*const gMovementActionFuncs_FaceRight[])(struct ObjectEvent *, struct Sprite
|
|||
MovementAction_PauseSpriteAnim,
|
||||
};
|
||||
|
||||
static u8 (*const sDirectionAnimFuncsBySpeed[])(u8) = {
|
||||
static u8 (*const sDirectionAnimFuncsBySpeed[])(enum Direction) = {
|
||||
[MOVE_SPEED_NORMAL] = GetMoveDirectionAnimNum,
|
||||
[MOVE_SPEED_FAST_1] = GetMoveDirectionFastAnimNum,
|
||||
[MOVE_SPEED_FAST_2] = GetMoveDirectionFastAnimNum,
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ u8 (*const gMovementTypeFuncs_WanderAround[])(struct ObjectEvent *, struct Sprit
|
|||
MovementType_WanderAround_Step6,
|
||||
};
|
||||
|
||||
const u8 gStandardDirections[] = {DIR_SOUTH, DIR_NORTH, DIR_WEST, DIR_EAST};
|
||||
const enum Direction gStandardDirections[] = {DIR_SOUTH, DIR_NORTH, DIR_WEST, DIR_EAST};
|
||||
|
||||
u8 (*const gGetVectorDirectionFuncs[])(s16, s16, s16, s16) = {
|
||||
enum Direction (*const gGetVectorDirectionFuncs[])(s16, s16, s16, s16) = {
|
||||
GetVectorDirection,
|
||||
GetLimitedVectorDirection_SouthNorth,
|
||||
GetLimitedVectorDirection_WestEast,
|
||||
|
|
@ -42,7 +42,7 @@ u8 (*const gMovementTypeFuncs_WanderUpAndDown[])(struct ObjectEvent *, struct Sp
|
|||
MovementType_WanderUpAndDown_Step6,
|
||||
};
|
||||
|
||||
const u8 gUpAndDownDirections[] = {DIR_SOUTH, DIR_NORTH};
|
||||
const enum Direction gUpAndDownDirections[] = {DIR_SOUTH, DIR_NORTH};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WanderLeftAndRight[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WanderLeftAndRight_Step0,
|
||||
|
|
@ -54,7 +54,7 @@ u8 (*const gMovementTypeFuncs_WanderLeftAndRight[])(struct ObjectEvent *, struct
|
|||
MovementType_WanderLeftAndRight_Step6,
|
||||
};
|
||||
|
||||
const u8 gLeftAndRightDirections[] = {DIR_WEST, DIR_EAST};
|
||||
const enum Direction gLeftAndRightDirections[] = {DIR_WEST, DIR_EAST};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_FaceDirection[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_FaceDirection_Step0,
|
||||
|
|
@ -94,7 +94,7 @@ u8 (*const gMovementTypeFuncs_FaceUpAndLeft[])(struct ObjectEvent *, struct Spri
|
|||
MovementType_FaceUpAndLeft_Step4,
|
||||
};
|
||||
|
||||
const u8 gUpAndLeftDirections[] = {DIR_NORTH, DIR_WEST};
|
||||
const enum Direction gUpAndLeftDirections[] = {DIR_NORTH, DIR_WEST};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_FaceUpAndRight[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_FaceUpAndRight_Step0,
|
||||
|
|
@ -104,7 +104,7 @@ u8 (*const gMovementTypeFuncs_FaceUpAndRight[])(struct ObjectEvent *, struct Spr
|
|||
MovementType_FaceUpAndRight_Step4,
|
||||
};
|
||||
|
||||
const u8 gUpAndRightDirections[] = {DIR_NORTH, DIR_EAST};
|
||||
const enum Direction gUpAndRightDirections[] = {DIR_NORTH, DIR_EAST};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_FaceDownAndLeft[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_FaceDownAndLeft_Step0,
|
||||
|
|
@ -114,7 +114,7 @@ u8 (*const gMovementTypeFuncs_FaceDownAndLeft[])(struct ObjectEvent *, struct Sp
|
|||
MovementType_FaceDownAndLeft_Step4,
|
||||
};
|
||||
|
||||
const u8 gDownAndLeftDirections[] = {DIR_SOUTH, DIR_WEST};
|
||||
const enum Direction gDownAndLeftDirections[] = {DIR_SOUTH, DIR_WEST};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_FaceDownAndRight[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_FaceDownAndRight_Step0,
|
||||
|
|
@ -124,7 +124,7 @@ u8 (*const gMovementTypeFuncs_FaceDownAndRight[])(struct ObjectEvent *, struct S
|
|||
MovementType_FaceDownAndRight_Step4,
|
||||
};
|
||||
|
||||
const u8 gDownAndRightDirections[] = {DIR_SOUTH, DIR_EAST};
|
||||
const enum Direction gDownAndRightDirections[] = {DIR_SOUTH, DIR_EAST};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_FaceDownUpAndLeft[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_FaceDownUpAndLeft_Step0,
|
||||
|
|
@ -134,7 +134,7 @@ u8 (*const gMovementTypeFuncs_FaceDownUpAndLeft[])(struct ObjectEvent *, struct
|
|||
MovementType_FaceDownUpAndLeft_Step4,
|
||||
};
|
||||
|
||||
const u8 gDownUpAndLeftDirections[] = {DIR_NORTH, DIR_SOUTH, DIR_WEST, DIR_SOUTH};
|
||||
const enum Direction gDownUpAndLeftDirections[] = {DIR_NORTH, DIR_SOUTH, DIR_WEST, DIR_SOUTH};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_FaceDownUpAndRight[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_FaceDownUpAndRight_Step0,
|
||||
|
|
@ -144,7 +144,7 @@ u8 (*const gMovementTypeFuncs_FaceDownUpAndRight[])(struct ObjectEvent *, struct
|
|||
MovementType_FaceDownUpAndRight_Step4,
|
||||
};
|
||||
|
||||
const u8 gDownUpAndRightDirections[] = {DIR_SOUTH, DIR_NORTH, DIR_EAST, DIR_SOUTH};
|
||||
const enum Direction gDownUpAndRightDirections[] = {DIR_SOUTH, DIR_NORTH, DIR_EAST, DIR_SOUTH};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_FaceUpLeftAndRight[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_FaceUpLeftAndRight_Step0,
|
||||
|
|
@ -154,7 +154,7 @@ u8 (*const gMovementTypeFuncs_FaceUpLeftAndRight[])(struct ObjectEvent *, struct
|
|||
MovementType_FaceUpLeftAndRight_Step4,
|
||||
};
|
||||
|
||||
const u8 gUpLeftAndRightDirections[] = {DIR_NORTH, DIR_WEST, DIR_EAST, DIR_NORTH};
|
||||
const enum Direction gUpLeftAndRightDirections[] = {DIR_NORTH, DIR_WEST, DIR_EAST, DIR_NORTH};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_FaceDownLeftAndRight[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_FaceDownLeftAndRight_Step0,
|
||||
|
|
@ -164,7 +164,7 @@ u8 (*const gMovementTypeFuncs_FaceDownLeftAndRight[])(struct ObjectEvent *, stru
|
|||
MovementType_FaceDownLeftAndRight_Step4,
|
||||
};
|
||||
|
||||
const u8 gDownLeftAndRightDirections[] = {DIR_WEST, DIR_EAST, DIR_SOUTH, DIR_SOUTH};
|
||||
const enum Direction gDownLeftAndRightDirections[] = {DIR_WEST, DIR_EAST, DIR_SOUTH, DIR_SOUTH};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_RotateCounterclockwise[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_RotateCounterclockwise_Step0,
|
||||
|
|
@ -173,7 +173,7 @@ u8 (*const gMovementTypeFuncs_RotateCounterclockwise[])(struct ObjectEvent *, st
|
|||
MovementType_RotateCounterclockwise_Step3,
|
||||
};
|
||||
|
||||
const u8 gCounterclockwiseDirections[] = {DIR_SOUTH, DIR_EAST, DIR_WEST, DIR_SOUTH, DIR_NORTH};
|
||||
const enum Direction gCounterclockwiseDirections[] = {DIR_SOUTH, DIR_EAST, DIR_WEST, DIR_SOUTH, DIR_NORTH};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_RotateClockwise[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_RotateClockwise_Step0,
|
||||
|
|
@ -182,7 +182,7 @@ u8 (*const gMovementTypeFuncs_RotateClockwise[])(struct ObjectEvent *, struct Sp
|
|||
MovementType_RotateClockwise_Step3,
|
||||
};
|
||||
|
||||
const u8 gClockwiseDirections[] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
|
||||
const enum Direction gClockwiseDirections[] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkBackAndForth[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkBackAndForth_Step0,
|
||||
|
|
@ -197,7 +197,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceUpRightLeftDown[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gUpRightLeftDownDirections[] = {DIR_NORTH, DIR_EAST, DIR_WEST, DIR_SOUTH};
|
||||
const enum Direction gUpRightLeftDownDirections[] = {DIR_NORTH, DIR_EAST, DIR_WEST, DIR_SOUTH};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceRightLeftDownUp[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -205,7 +205,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceRightLeftDownUp[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gRightLeftDownUpDirections[] = {DIR_EAST, DIR_WEST, DIR_SOUTH, DIR_NORTH};
|
||||
const enum Direction gRightLeftDownUpDirections[] = {DIR_EAST, DIR_WEST, DIR_SOUTH, DIR_NORTH};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceDownUpRightLeft[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -213,7 +213,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceDownUpRightLeft[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gDownUpRightLeftDirections[] = {DIR_SOUTH, DIR_NORTH, DIR_EAST, DIR_WEST};
|
||||
const enum Direction gDownUpRightLeftDirections[] = {DIR_SOUTH, DIR_NORTH, DIR_EAST, DIR_WEST};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceLeftDownUpRight[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -221,7 +221,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceLeftDownUpRight[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gLeftDownUpRightDirections[] = {DIR_WEST, DIR_SOUTH, DIR_NORTH, DIR_EAST};
|
||||
const enum Direction gLeftDownUpRightDirections[] = {DIR_WEST, DIR_SOUTH, DIR_NORTH, DIR_EAST};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceUpLeftRightDown[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -229,7 +229,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceUpLeftRightDown[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gUpLeftRightDownDirections[] = {DIR_NORTH, DIR_WEST, DIR_EAST, DIR_SOUTH};
|
||||
const enum Direction gUpLeftRightDownDirections[] = {DIR_NORTH, DIR_WEST, DIR_EAST, DIR_SOUTH};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceLeftRightDownUp[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -237,7 +237,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceLeftRightDownUp[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gLeftRightDownUpDirections[] = {DIR_WEST, DIR_EAST, DIR_SOUTH, DIR_NORTH};
|
||||
const enum Direction gLeftRightDownUpDirections[] = {DIR_WEST, DIR_EAST, DIR_SOUTH, DIR_NORTH};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceDownUpLeftRight[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -251,7 +251,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceRightDownUpLeft[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gRightDownUpLeftDirections[] = {DIR_EAST, DIR_SOUTH, DIR_NORTH, DIR_WEST};
|
||||
const enum Direction gRightDownUpLeftDirections[] = {DIR_EAST, DIR_SOUTH, DIR_NORTH, DIR_WEST};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceLeftUpDownRight[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -259,7 +259,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceLeftUpDownRight[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gLeftUpDownRightDirections[] = {DIR_WEST, DIR_NORTH, DIR_SOUTH, DIR_EAST};
|
||||
const enum Direction gLeftUpDownRightDirections[] = {DIR_WEST, DIR_NORTH, DIR_SOUTH, DIR_EAST};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceUpDownRightLeft[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -267,7 +267,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceUpDownRightLeft[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gUpDownRightLeftDirections[] = {DIR_NORTH, DIR_SOUTH, DIR_EAST, DIR_WEST};
|
||||
const enum Direction gUpDownRightLeftDirections[] = {DIR_NORTH, DIR_SOUTH, DIR_EAST, DIR_WEST};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceRightLeftUpDown[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -275,7 +275,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceRightLeftUpDown[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gRightLeftUpDownDirections[] = {DIR_EAST, DIR_WEST, DIR_NORTH, DIR_SOUTH};
|
||||
const enum Direction gRightLeftUpDownDirections[] = {DIR_EAST, DIR_WEST, DIR_NORTH, DIR_SOUTH};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceDownRightLeftUp[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -283,7 +283,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceDownRightLeftUp[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gDownRightLeftUpDirections[] = {DIR_SOUTH, DIR_EAST, DIR_WEST, DIR_NORTH};
|
||||
const enum Direction gDownRightLeftUpDirections[] = {DIR_SOUTH, DIR_EAST, DIR_WEST, DIR_NORTH};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceRightUpDownLeft[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -291,7 +291,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceRightUpDownLeft[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gRightUpDownLeftDirections[] = {DIR_EAST, DIR_NORTH, DIR_SOUTH, DIR_WEST};
|
||||
const enum Direction gRightUpDownLeftDirections[] = {DIR_EAST, DIR_NORTH, DIR_SOUTH, DIR_WEST};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceUpDownLeftRight[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -299,7 +299,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceUpDownLeftRight[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gUpDownLeftRightDirections[] = {DIR_NORTH, DIR_SOUTH, DIR_WEST, DIR_EAST};
|
||||
const enum Direction gUpDownLeftRightDirections[] = {DIR_NORTH, DIR_SOUTH, DIR_WEST, DIR_EAST};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceLeftRightUpDown[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -307,7 +307,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceLeftRightUpDown[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gLeftRightUpDownDirections[] = {DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
|
||||
const enum Direction gLeftRightUpDownDirections[] = {DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceDownLeftRightUp[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -315,7 +315,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceDownLeftRightUp[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gDownLeftRightUpDirections[] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH};
|
||||
const enum Direction gDownLeftRightUpDirections[] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceUpLeftDownRight[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -323,7 +323,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceUpLeftDownRight[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gUpLeftDownRightDirections[] = {DIR_NORTH, DIR_WEST, DIR_SOUTH, DIR_EAST};
|
||||
const enum Direction gUpLeftDownRightDirections[] = {DIR_NORTH, DIR_WEST, DIR_SOUTH, DIR_EAST};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceDownRightUpLeft[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -331,7 +331,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceDownRightUpLeft[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gDownRightUpLeftDirections[] = {DIR_SOUTH, DIR_EAST, DIR_NORTH, DIR_WEST};
|
||||
const enum Direction gDownRightUpLeftDirections[] = {DIR_SOUTH, DIR_EAST, DIR_NORTH, DIR_WEST};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceLeftDownRightUp[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -339,7 +339,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceLeftDownRightUp[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gLeftDownRightUpDirections[] = {DIR_WEST, DIR_SOUTH, DIR_EAST, DIR_NORTH};
|
||||
const enum Direction gLeftDownRightUpDirections[] = {DIR_WEST, DIR_SOUTH, DIR_EAST, DIR_NORTH};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceRightUpLeftDown[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -347,7 +347,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceRightUpLeftDown[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gRightUpLeftDownDirections[] = {DIR_EAST, DIR_NORTH, DIR_WEST, DIR_SOUTH};
|
||||
const enum Direction gRightUpLeftDownDirections[] = {DIR_EAST, DIR_NORTH, DIR_WEST, DIR_SOUTH};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceUpRightDownLeft[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -355,7 +355,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceUpRightDownLeft[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gUpRightDownLeftDirections[] = {DIR_NORTH, DIR_EAST, DIR_SOUTH, DIR_WEST};
|
||||
const enum Direction gUpRightDownLeftDirections[] = {DIR_NORTH, DIR_EAST, DIR_SOUTH, DIR_WEST};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceDownLeftUpRight[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -363,7 +363,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceDownLeftUpRight[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gDownLeftUpRightDirections[] = {DIR_SOUTH, DIR_WEST, DIR_NORTH, DIR_EAST};
|
||||
const enum Direction gDownLeftUpRightDirections[] = {DIR_SOUTH, DIR_WEST, DIR_NORTH, DIR_EAST};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceLeftUpRightDown[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -371,7 +371,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceLeftUpRightDown[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gLeftUpRightDownDirections[] = {DIR_WEST, DIR_NORTH, DIR_EAST, DIR_SOUTH};
|
||||
const enum Direction gLeftUpRightDownDirections[] = {DIR_WEST, DIR_NORTH, DIR_EAST, DIR_SOUTH};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSequenceRightDownLeftUp[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSequence_Step0,
|
||||
|
|
@ -379,7 +379,7 @@ u8 (*const gMovementTypeFuncs_WalkSequenceRightDownLeftUp[])(struct ObjectEvent
|
|||
MovementType_WalkSequence_Step2,
|
||||
};
|
||||
|
||||
const u8 gRightDownLeftUpDirections[] = {DIR_EAST, DIR_SOUTH, DIR_WEST, DIR_NORTH};
|
||||
const enum Direction gRightDownLeftUpDirections[] = {DIR_EAST, DIR_SOUTH, DIR_WEST, DIR_NORTH};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_CopyPlayer[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_CopyPlayer_Step0,
|
||||
|
|
@ -387,7 +387,7 @@ u8 (*const gMovementTypeFuncs_CopyPlayer[])(struct ObjectEvent *, struct Sprite
|
|||
MovementType_CopyPlayer_Step2,
|
||||
};
|
||||
|
||||
bool8 (*const gCopyPlayerMovementFuncs[])(struct ObjectEvent *, struct Sprite *, u8, bool8(u8)) = {
|
||||
bool8 (*const gCopyPlayerMovementFuncs[])(struct ObjectEvent *, struct Sprite *, enum Direction, bool8(u8)) = {
|
||||
[COPY_MOVE_NONE] = CopyablePlayerMovement_None,
|
||||
[COPY_MOVE_FACE] = CopyablePlayerMovement_FaceDirection,
|
||||
[COPY_MOVE_WALK] = CopyablePlayerMovement_WalkNormal,
|
||||
|
|
@ -407,7 +407,7 @@ u8 (*const gMovementTypeFuncs_FollowPlayer[])(struct ObjectEvent *, struct Sprit
|
|||
MovementType_FollowPlayer_Moving,
|
||||
};
|
||||
|
||||
bool8 (*const gFollowPlayerMovementFuncs[])(struct ObjectEvent *, struct Sprite *, u8, bool8(u8)) = {
|
||||
bool8 (*const gFollowPlayerMovementFuncs[])(struct ObjectEvent *, struct Sprite *, enum Direction, bool8(u8)) = {
|
||||
[COPY_MOVE_NONE] = FollowablePlayerMovement_Idle,
|
||||
[COPY_MOVE_FACE] = FollowablePlayerMovement_Idle,
|
||||
[COPY_MOVE_WALK] = FollowablePlayerMovement_Step,
|
||||
|
|
|
|||
|
|
@ -1129,7 +1129,7 @@ void CreateEgg(struct Pokemon *mon, u16 species, bool8 setHotSpringsLocation)
|
|||
{
|
||||
u8 metLevel;
|
||||
enum PokeBall ball;
|
||||
u8 language;
|
||||
enum Language language;
|
||||
metloc_u8_t metLocation;
|
||||
u8 isEgg;
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -9,7 +9,7 @@
|
|||
#include "constants/field_effects.h"
|
||||
#include "constants/metatile_behaviors.h"
|
||||
|
||||
static u8 GetValidMewMoveDirection(u8);
|
||||
static enum Direction GetValidMewMoveDirection(enum Direction);
|
||||
static bool8 ShouldMewMoveNorth(struct ObjectEvent *, u8);
|
||||
static bool8 ShouldMewMoveSouth(struct ObjectEvent *, u8);
|
||||
static bool8 ShouldMewMoveEast(struct ObjectEvent *, u8);
|
||||
|
|
@ -21,7 +21,7 @@ static EWRAM_DATA u8 sGrassSpriteId = 0;
|
|||
|
||||
static s16 sPlayerToMewDeltaX;
|
||||
static s16 sPlayerToMewDeltaY;
|
||||
static u8 sMewDirectionCandidates[4];
|
||||
static enum Direction sMewDirectionCandidates[4];
|
||||
|
||||
extern const struct SpritePalette gSpritePalette_GeneralFieldEffect1;
|
||||
extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[];
|
||||
|
|
@ -43,7 +43,7 @@ static u8 GetMewObjectEventId(void)
|
|||
|
||||
// When the player enters Faraway Island interior it begins a "hide and seek" minigame where Mew disappears into the grass
|
||||
// This function returns the direction Mew will take a step, and is run every time the player takes a step
|
||||
u32 GetMewMoveDirection(void)
|
||||
enum Direction GetMewMoveDirection(void)
|
||||
{
|
||||
u8 i;
|
||||
int mewSafeFromTrap;
|
||||
|
|
@ -279,7 +279,7 @@ static bool8 CanMewMoveToCoords(s16 x, s16 y)
|
|||
}
|
||||
|
||||
// Last ditch effort to move, clear move candidates and try all directions again
|
||||
static u8 GetValidMewMoveDirection(u8 ignoredDir)
|
||||
static enum Direction GetValidMewMoveDirection(enum Direction ignoredDir)
|
||||
{
|
||||
u8 i;
|
||||
u8 count = 0;
|
||||
|
|
|
|||
|
|
@ -50,22 +50,22 @@ COMMON_DATA u8 gSelectedObjectEvent = 0;
|
|||
static void GetPlayerPosition(struct MapPosition *);
|
||||
static void GetInFrontOfPlayerPosition(struct MapPosition *);
|
||||
static u16 GetPlayerCurMetatileBehavior(int);
|
||||
static bool8 TryStartInteractionScript(struct MapPosition *, u16, u8);
|
||||
static const u8 *GetInteractionScript(struct MapPosition *, u8, u8);
|
||||
static const u8 *GetInteractedObjectEventScript(struct MapPosition *, u8, u8);
|
||||
static const u8 *GetInteractedBackgroundEventScript(struct MapPosition *, u8, u8);
|
||||
static const u8 *GetInteractedMetatileScript(struct MapPosition *, u8, u8);
|
||||
static const u8 *GetInteractedWaterScript(struct MapPosition *, u8, u8);
|
||||
static bool8 TryStartInteractionScript(struct MapPosition *, u16, enum Direction);
|
||||
static const u8 *GetInteractionScript(struct MapPosition *, u8, enum Direction);
|
||||
static const u8 *GetInteractedObjectEventScript(struct MapPosition *, u8, enum Direction);
|
||||
static const u8 *GetInteractedBackgroundEventScript(struct MapPosition *, u8, enum Direction);
|
||||
static const u8 *GetInteractedMetatileScript(struct MapPosition *, u8, enum Direction);
|
||||
static const u8 *GetInteractedWaterScript(struct MapPosition *, u8, enum Direction);
|
||||
static bool32 TrySetupDiveDownScript(void);
|
||||
static bool32 TrySetupDiveEmergeScript(void);
|
||||
static bool8 TryStartStepBasedScript(struct MapPosition *, u16, u16);
|
||||
static bool8 TryStartStepBasedScript(struct MapPosition *, u16, enum Direction);
|
||||
static bool8 CheckStandardWildEncounter(u16);
|
||||
static bool8 TryArrowWarp(struct MapPosition *, u16, u8);
|
||||
static bool8 TryArrowWarp(struct MapPosition *, u16, enum Direction);
|
||||
static bool8 IsWarpMetatileBehavior(u16);
|
||||
static bool8 IsArrowWarpMetatileBehavior(u16, u8);
|
||||
static bool8 IsArrowWarpMetatileBehavior(u16, enum Direction);
|
||||
static s8 GetWarpEventAtMapPosition(struct MapHeader *, struct MapPosition *);
|
||||
static void SetupWarp(struct MapHeader *, s8, struct MapPosition *);
|
||||
static bool8 TryDoorWarp(struct MapPosition *, u16, u8);
|
||||
static bool8 TryDoorWarp(struct MapPosition *, u16, enum Direction);
|
||||
static s8 GetWarpEventAtPosition(struct MapHeader *, u16, u16, u8);
|
||||
static const u8 *GetCoordEventScriptAtPosition(struct MapHeader *, u16, u16, u8);
|
||||
static const struct BgEvent *GetBackgroundEventAtPosition(struct MapHeader *, u16, u16, u8);
|
||||
|
|
@ -78,10 +78,10 @@ static void UpdateFollowerStepCounter(void);
|
|||
#if OW_POISON_DAMAGE < GEN_5
|
||||
static bool8 UpdatePoisonStepCounter(void);
|
||||
#endif // OW_POISON_DAMAGE
|
||||
static bool32 TrySetUpWalkIntoSignpostScript(struct MapPosition * position, u32 metatileBehavior, u32 playerDirection);
|
||||
static void SetMsgSignPostAndVarFacing(u32 playerDirection);
|
||||
static void SetUpWalkIntoSignScript(const u8 *script, u32 playerDirection);
|
||||
static u32 GetFacingSignpostType(u16 metatileBehvaior, u32 direction);
|
||||
static bool32 TrySetUpWalkIntoSignpostScript(struct MapPosition *position, u32 metatileBehavior, enum Direction playerDirection);
|
||||
static void SetMsgSignPostAndVarFacing(enum Direction playerDirection);
|
||||
static void SetUpWalkIntoSignScript(const u8 *script, enum Direction playerDirection);
|
||||
static u32 GetFacingSignpostType(u16 metatileBehvaior, enum Direction direction);
|
||||
static const u8 *GetSignpostScriptAtMapPosition(struct MapPosition *position);
|
||||
|
||||
void FieldClearPlayerInput(struct FieldInput *input)
|
||||
|
|
@ -160,7 +160,7 @@ void FieldGetPlayerInput(struct FieldInput *input, u16 newKeys, u16 heldKeys)
|
|||
int ProcessPlayerFieldInput(struct FieldInput *input)
|
||||
{
|
||||
struct MapPosition position;
|
||||
u8 playerDirection;
|
||||
enum Direction playerDirection;
|
||||
u16 metatileBehavior;
|
||||
|
||||
gSpecialVar_LastTalked = LOCALID_NONE;
|
||||
|
|
@ -281,7 +281,7 @@ static u16 GetPlayerCurMetatileBehavior(int runningState)
|
|||
return MapGridGetMetatileBehaviorAt(x, y);
|
||||
}
|
||||
|
||||
static bool8 TryStartInteractionScript(struct MapPosition *position, u16 metatileBehavior, u8 direction)
|
||||
static bool8 TryStartInteractionScript(struct MapPosition *position, u16 metatileBehavior, enum Direction direction)
|
||||
{
|
||||
const u8 *script = GetInteractionScript(position, metatileBehavior, direction);
|
||||
if (script == NULL || Script_HasNoEffect(script))
|
||||
|
|
@ -301,7 +301,7 @@ static bool8 TryStartInteractionScript(struct MapPosition *position, u16 metatil
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static const u8 *GetInteractionScript(struct MapPosition *position, u8 metatileBehavior, u8 direction)
|
||||
static const u8 *GetInteractionScript(struct MapPosition *position, u8 metatileBehavior, enum Direction direction)
|
||||
{
|
||||
const u8 *script = GetInteractedObjectEventScript(position, metatileBehavior, direction);
|
||||
if (script != NULL)
|
||||
|
|
@ -322,7 +322,7 @@ static const u8 *GetInteractionScript(struct MapPosition *position, u8 metatileB
|
|||
return NULL;
|
||||
}
|
||||
|
||||
const u8 *GetInteractedLinkPlayerScript(struct MapPosition *position, u8 metatileBehavior, u8 direction)
|
||||
const u8 *GetInteractedLinkPlayerScript(struct MapPosition *position, u8 metatileBehavior, enum Direction direction)
|
||||
{
|
||||
u8 objectEventId;
|
||||
s32 i;
|
||||
|
|
@ -347,7 +347,7 @@ const u8 *GetInteractedLinkPlayerScript(struct MapPosition *position, u8 metatil
|
|||
return GetObjectEventScriptPointerByObjectEventId(objectEventId);
|
||||
}
|
||||
|
||||
static const u8 *GetInteractedObjectEventScript(struct MapPosition *position, u8 metatileBehavior, u8 direction)
|
||||
static const u8 *GetInteractedObjectEventScript(struct MapPosition *position, u8 metatileBehavior, enum Direction direction)
|
||||
{
|
||||
u8 objectEventId;
|
||||
const u8 *script;
|
||||
|
|
@ -410,7 +410,7 @@ static const u8 *GetInteractedObjectEventScript(struct MapPosition *position, u8
|
|||
return script;
|
||||
}
|
||||
|
||||
static const u8 *GetInteractedBackgroundEventScript(struct MapPosition *position, u8 metatileBehavior, u8 direction)
|
||||
static const u8 *GetInteractedBackgroundEventScript(struct MapPosition *position, u8 metatileBehavior, enum Direction direction)
|
||||
{
|
||||
const struct BgEvent *bgEvent = GetBackgroundEventAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->elevation);
|
||||
|
||||
|
|
@ -464,7 +464,7 @@ static const u8 *GetInteractedBackgroundEventScript(struct MapPosition *position
|
|||
return bgEvent->bgUnion.script;
|
||||
}
|
||||
|
||||
static const u8 *GetInteractedMetatileScript(struct MapPosition *position, u8 metatileBehavior, u8 direction)
|
||||
static const u8 *GetInteractedMetatileScript(struct MapPosition *position, u8 metatileBehavior, enum Direction direction)
|
||||
{
|
||||
s8 elevation;
|
||||
|
||||
|
|
@ -561,7 +561,7 @@ static const u8 *GetInteractedMetatileScript(struct MapPosition *position, u8 me
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static const u8 *GetInteractedWaterScript(struct MapPosition *unused1, u8 metatileBehavior, u8 direction)
|
||||
static const u8 *GetInteractedWaterScript(struct MapPosition *unused1, u8 metatileBehavior, enum Direction direction)
|
||||
{
|
||||
if (IsFieldMoveUnlocked(FIELD_MOVE_SURF) && PartyHasMonWithSurf() == TRUE && IsPlayerFacingSurfableFishableWater() == TRUE
|
||||
&& CheckFollowerNPCFlag(FOLLOWER_NPC_FLAG_CAN_SURF)
|
||||
|
|
@ -606,7 +606,7 @@ static bool32 TrySetupDiveEmergeScript(void)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static bool8 TryStartStepBasedScript(struct MapPosition *position, u16 metatileBehavior, u16 direction)
|
||||
static bool8 TryStartStepBasedScript(struct MapPosition *position, u16 metatileBehavior, enum Direction direction)
|
||||
{
|
||||
if (TryStartCoordEventScript(position) == TRUE)
|
||||
return TRUE;
|
||||
|
|
@ -843,7 +843,7 @@ static void StorePlayerStateAndSetupWarp(struct MapPosition *position, s32 warpE
|
|||
SetupWarp(&gMapHeader, warpEventId, position);
|
||||
}
|
||||
|
||||
static bool8 TryArrowWarp(struct MapPosition *position, u16 metatileBehavior, u8 direction)
|
||||
static bool8 TryArrowWarp(struct MapPosition *position, u16 metatileBehavior, enum Direction direction)
|
||||
{
|
||||
s32 warpEventId = GetWarpEventAtMapPosition(&gMapHeader, position);
|
||||
u32 delay;
|
||||
|
|
@ -938,7 +938,7 @@ static bool8 IsWarpMetatileBehavior(u16 metatileBehavior)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static bool8 IsArrowWarpMetatileBehavior(u16 metatileBehavior, u8 direction)
|
||||
static bool8 IsArrowWarpMetatileBehavior(u16 metatileBehavior, enum Direction direction)
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
|
|
@ -950,9 +950,10 @@ static bool8 IsArrowWarpMetatileBehavior(u16 metatileBehavior, u8 direction)
|
|||
return MetatileBehavior_IsWestArrowWarp(metatileBehavior);
|
||||
case DIR_EAST:
|
||||
return MetatileBehavior_IsEastArrowWarp(metatileBehavior);
|
||||
}
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static s8 GetWarpEventAtMapPosition(struct MapHeader *mapHeader, struct MapPosition *position)
|
||||
{
|
||||
|
|
@ -1004,7 +1005,7 @@ static void SetupWarp(struct MapHeader *unused, s8 warpEventId, struct MapPositi
|
|||
}
|
||||
}
|
||||
|
||||
static bool8 TryDoorWarp(struct MapPosition *position, u16 metatileBehavior, u8 direction)
|
||||
static bool8 TryDoorWarp(struct MapPosition *position, u16 metatileBehavior, enum Direction direction)
|
||||
{
|
||||
s8 warpEventId;
|
||||
|
||||
|
|
@ -1168,7 +1169,7 @@ u8 TrySetDiveWarp(void)
|
|||
|
||||
const u8 *GetObjectEventScriptPointerPlayerFacing(void)
|
||||
{
|
||||
u8 direction;
|
||||
enum Direction direction;
|
||||
struct MapPosition position;
|
||||
|
||||
direction = GetPlayerMovementDirection();
|
||||
|
|
@ -1187,7 +1188,7 @@ int SetCableClubWarp(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static bool32 TrySetUpWalkIntoSignpostScript(struct MapPosition *position, u32 metatileBehavior, u32 playerDirection)
|
||||
static bool32 TrySetUpWalkIntoSignpostScript(struct MapPosition *position, u32 metatileBehavior, enum Direction playerDirection)
|
||||
{
|
||||
const u8 *script;
|
||||
|
||||
|
|
@ -1213,7 +1214,7 @@ static bool32 TrySetUpWalkIntoSignpostScript(struct MapPosition *position, u32 m
|
|||
}
|
||||
}
|
||||
|
||||
static u32 GetFacingSignpostType(u16 metatileBehavior, u32 playerDirection)
|
||||
static u32 GetFacingSignpostType(u16 metatileBehavior, enum Direction playerDirection)
|
||||
{
|
||||
if (MetatileBehavior_IsPokemonCenterSign(metatileBehavior) == TRUE)
|
||||
return MB_POKEMON_CENTER_SIGN;
|
||||
|
|
@ -1225,7 +1226,7 @@ static u32 GetFacingSignpostType(u16 metatileBehavior, u32 playerDirection)
|
|||
return NOT_SIGNPOST;
|
||||
}
|
||||
|
||||
static void SetMsgSignPostAndVarFacing(u32 playerDirection)
|
||||
static void SetMsgSignPostAndVarFacing(enum Direction playerDirection)
|
||||
{
|
||||
gWalkAwayFromSignpostTimer = WALK_AWAY_SIGNPOST_FRAMES;
|
||||
gMsgBoxIsCancelable = TRUE;
|
||||
|
|
@ -1233,7 +1234,7 @@ static void SetMsgSignPostAndVarFacing(u32 playerDirection)
|
|||
gSpecialVar_Facing = playerDirection;
|
||||
}
|
||||
|
||||
static void SetUpWalkIntoSignScript(const u8 *script, u32 playerDirection)
|
||||
static void SetUpWalkIntoSignScript(const u8 *script, enum Direction playerDirection)
|
||||
{
|
||||
ScriptContext_SetupScript(script);
|
||||
SetMsgSignPostAndVarFacing(playerDirection);
|
||||
|
|
|
|||
|
|
@ -2441,7 +2441,7 @@ static void EscapeRopeWarpOutEffect_HideFollowerNPC(struct Task *task)
|
|||
static void EscapeRopeWarpOutEffect_Spin(struct Task *task)
|
||||
{
|
||||
struct ObjectEvent *objectEvent;
|
||||
u8 spinDirections[5] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
|
||||
enum Direction spinDirections[5] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
|
||||
if (task->tTimer != 0 && (--task->tTimer) == 0)
|
||||
{
|
||||
TryFadeOutOldMapMusic();
|
||||
|
|
@ -2502,7 +2502,7 @@ static void EscapeRopeWarpInEffect_Init(struct Task *task)
|
|||
|
||||
static void EscapeRopeWarpInEffect_Spin(struct Task *task)
|
||||
{
|
||||
u8 spinDirections[5] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
|
||||
enum Direction spinDirections[5] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
|
||||
struct ObjectEvent *player = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
struct ObjectEvent *follower = &gObjectEvents[GetFollowerNPCObjectId()];
|
||||
|
||||
|
|
@ -2595,7 +2595,7 @@ static void TeleportWarpOutFieldEffect_Init(struct Task *task)
|
|||
|
||||
static void TeleportWarpOutFieldEffect_SpinGround(struct Task *task)
|
||||
{
|
||||
u8 spinDirections[5] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
|
||||
enum Direction spinDirections[5] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
|
||||
struct ObjectEvent *objectEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
if (task->data[1] == 0 || (--task->data[1]) == 0)
|
||||
{
|
||||
|
|
@ -2615,7 +2615,7 @@ static void TeleportWarpOutFieldEffect_SpinGround(struct Task *task)
|
|||
|
||||
static void TeleportWarpOutFieldEffect_SpinExit(struct Task *task)
|
||||
{
|
||||
u8 spinDirections[5] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
|
||||
enum Direction spinDirections[5] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
|
||||
struct ObjectEvent *objectEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
struct Sprite *sprite = &gSprites[gPlayerAvatar.spriteId];
|
||||
if ((--task->data[1]) <= 0)
|
||||
|
|
@ -2706,7 +2706,7 @@ static void TeleportWarpInFieldEffect_Init(struct Task *task)
|
|||
|
||||
static void TeleportWarpInFieldEffect_SpinEnter(struct Task *task)
|
||||
{
|
||||
u8 spinDirections[5] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
|
||||
enum Direction spinDirections[5] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
|
||||
struct ObjectEvent *objectEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
struct Sprite *sprite = &gSprites[gPlayerAvatar.spriteId];
|
||||
if ((sprite->y2 += task->data[1]) >= -8)
|
||||
|
|
@ -2750,7 +2750,7 @@ static void TeleportWarpInFieldEffect_SpinGround(struct Task *task)
|
|||
struct ObjectEvent *player = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
struct ObjectEvent *follower = &gObjectEvents[GetFollowerNPCObjectId()];
|
||||
|
||||
u8 spinDirections[5] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
|
||||
enum Direction spinDirections[5] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
|
||||
if ((--task->data[1]) == 0 && task->data[3] == 0)
|
||||
{
|
||||
ObjectEventTurn(player, spinDirections[player->facingDirection]);
|
||||
|
|
@ -4338,7 +4338,7 @@ static const struct RockClimbRide sRockClimbMovement[] =
|
|||
[DIR_NORTHEAST] = {MOVEMENT_ACTION_WALK_FAST_DIAGONAL_UP_RIGHT, -1, 1, DIR_EAST},
|
||||
};
|
||||
|
||||
static void RockClimbDust(struct ObjectEvent *objectEvent, u8 direction)
|
||||
static void RockClimbDust(struct ObjectEvent *objectEvent, enum Direction direction)
|
||||
{
|
||||
s8 dx = sRockClimbMovement[direction].dx;
|
||||
s8 dy = sRockClimbMovement[direction].dy;
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ void SetSpriteInvisible(u8 spriteId)
|
|||
gSprites[spriteId].invisible = TRUE;
|
||||
}
|
||||
|
||||
void ShowWarpArrowSprite(u8 spriteId, u8 direction, s16 x, s16 y)
|
||||
void ShowWarpArrowSprite(u8 spriteId, enum Direction direction, s16 x, s16 y)
|
||||
{
|
||||
struct Sprite *sprite = &gSprites[spriteId];
|
||||
if (sprite->invisible || sprite->sPrevX != x || sprite->sPrevY != y)
|
||||
|
|
|
|||
|
|
@ -64,9 +64,9 @@ EWRAM_DATA struct SpinData gPlayerSpinData = {};
|
|||
|
||||
// static declarations
|
||||
static u8 ObjectEventCB2_NoMovement2(void);
|
||||
static bool8 TryInterruptObjectEventSpecialAnim(struct ObjectEvent *, u8);
|
||||
static bool8 TryInterruptObjectEventSpecialAnim(struct ObjectEvent *, enum Direction);
|
||||
static void npc_clear_strange_bits(struct ObjectEvent *);
|
||||
static void MovePlayerAvatarUsingKeypadInput(u8, u16, u16);
|
||||
static void MovePlayerAvatarUsingKeypadInput(enum Direction, u16, u16);
|
||||
static void PlayerAllowForcedMovementIfMovingSameDirection(void);
|
||||
static u8 GetForcedMovementByMetatileBehavior(void);
|
||||
|
||||
|
|
@ -88,18 +88,18 @@ static bool8 ForcedMovement_MatJump(void);
|
|||
static bool8 ForcedMovement_MatSpin(void);
|
||||
static bool8 ForcedMovement_MuddySlope(void);
|
||||
|
||||
static void MovePlayerNotOnBike(u8, u16);
|
||||
static u8 CheckMovementInputNotOnBike(u8);
|
||||
static void PlayerNotOnBikeNotMoving(u8, u16);
|
||||
static void PlayerNotOnBikeTurningInPlace(u8, u16);
|
||||
static void PlayerNotOnBikeMoving(u8, u16);
|
||||
static u8 CheckForPlayerAvatarCollision(u8);
|
||||
static u8 CheckForPlayerAvatarStaticCollision(u8);
|
||||
static u8 CheckForObjectEventStaticCollision(struct ObjectEvent *, s16, s16, u8, u8);
|
||||
static bool8 CanStopSurfing(s16, s16, u8);
|
||||
static bool8 ShouldJumpLedge(s16, s16, u8);
|
||||
static bool8 TryPushBoulder(s16, s16, u8);
|
||||
static void CheckAcroBikeCollision(s16, s16, u8, u8 *);
|
||||
static void MovePlayerNotOnBike(enum Direction, u16);
|
||||
static u8 CheckMovementInputNotOnBike(enum Direction);
|
||||
static void PlayerNotOnBikeNotMoving(enum Direction, u16);
|
||||
static void PlayerNotOnBikeTurningInPlace(enum Direction, u16);
|
||||
static void PlayerNotOnBikeMoving(enum Direction, u16);
|
||||
static enum Collision CheckForPlayerAvatarCollision(enum Direction);
|
||||
static enum Collision CheckForPlayerAvatarStaticCollision(enum Direction);
|
||||
static enum Collision CheckForObjectEventStaticCollision(struct ObjectEvent *, s16, s16, enum Direction, u8);
|
||||
static bool8 CanStopSurfing(s16, s16, enum Direction);
|
||||
static bool8 ShouldJumpLedge(s16, s16, enum Direction);
|
||||
static bool8 TryPushBoulder(s16, s16, enum Direction);
|
||||
static void CheckAcroBikeCollision(s16, s16, u8, enum Collision *);
|
||||
|
||||
static void DoPlayerAvatarTransition(void);
|
||||
static void PlayerAvatarTransition_Dummy(struct ObjectEvent *);
|
||||
|
|
@ -115,18 +115,18 @@ static bool8 PlayerAnimIsMultiFrameStationaryAndStateNotTurning(void);
|
|||
static bool8 PlayerIsAnimActive(void);
|
||||
static bool8 PlayerCheckIfAnimFinishedOrInactive(void);
|
||||
|
||||
static void PlayerWalkSlowStairs(u8 direction);
|
||||
static void UNUSED PlayerWalkSlow(u8 direction);
|
||||
static void PlayerRunSlow(u8 direction);
|
||||
static void PlayerRun(u8);
|
||||
static void PlayerNotOnBikeCollide(u8);
|
||||
static void PlayerNotOnBikeCollideWithFarawayIslandMew(u8);
|
||||
static void PlayerWalkSlowStairs(enum Direction direction);
|
||||
static void UNUSED PlayerWalkSlow(enum Direction direction);
|
||||
static void PlayerRunSlow(enum Direction direction);
|
||||
static void PlayerRun(enum Direction);
|
||||
static void PlayerNotOnBikeCollide(enum Direction);
|
||||
static void PlayerNotOnBikeCollideWithFarawayIslandMew(enum Direction);
|
||||
|
||||
static void PlayCollisionSoundIfNotFacingWarp(u8);
|
||||
static void PlayCollisionSoundIfNotFacingWarp(enum Direction);
|
||||
|
||||
static void HideShowWarpArrow(struct ObjectEvent *);
|
||||
|
||||
static void StartStrengthAnim(u8, u8);
|
||||
static void StartStrengthAnim(u8, enum Direction);
|
||||
static void Task_PushBoulder(u8);
|
||||
static bool8 PushBoulder_Start(struct Task *, struct ObjectEvent *, struct ObjectEvent *);
|
||||
static bool8 PushBoulder_Move(struct Task *, struct ObjectEvent *, struct ObjectEvent *);
|
||||
|
|
@ -143,7 +143,7 @@ static bool8 PlayerAvatar_SecretBaseMatSpinStep1(struct Task *, struct ObjectEve
|
|||
static bool8 PlayerAvatar_SecretBaseMatSpinStep2(struct Task *, struct ObjectEvent *);
|
||||
static bool8 PlayerAvatar_SecretBaseMatSpinStep3(struct Task *, struct ObjectEvent *);
|
||||
|
||||
static void CreateStopSurfingTask(u8);
|
||||
static void CreateStopSurfingTask(enum Direction);
|
||||
static void Task_StopSurfingInit(u8);
|
||||
static void Task_WaitStopSurfing(u8);
|
||||
|
||||
|
|
@ -195,7 +195,7 @@ static bool8 (*const sForcedMovementFuncs[NUM_FORCED_MOVEMENTS + 1])(void) =
|
|||
ForcedMovement_MuddySlope,
|
||||
};
|
||||
|
||||
static void (*const sPlayerNotOnBikeFuncs[])(u8, u16) =
|
||||
static void (*const sPlayerNotOnBikeFuncs[])(enum Direction, u16) =
|
||||
{
|
||||
[NOT_MOVING] = PlayerNotOnBikeNotMoving,
|
||||
[TURN_DIRECTION] = PlayerNotOnBikeTurningInPlace,
|
||||
|
|
@ -211,7 +211,7 @@ static bool8 (*const sAcroBikeTrickMetatiles[NUM_ACRO_BIKE_COLLISIONS])(u8) =
|
|||
MetatileBehavior_IsHorizontalRail,
|
||||
};
|
||||
|
||||
static const u8 sAcroBikeTrickCollisionTypes[NUM_ACRO_BIKE_COLLISIONS] = {
|
||||
static const enum Collision sAcroBikeTrickCollisionTypes[NUM_ACRO_BIKE_COLLISIONS] = {
|
||||
COLLISION_WHEELIE_HOP,
|
||||
COLLISION_ISOLATED_VERTICAL_RAIL,
|
||||
COLLISION_ISOLATED_HORIZONTAL_RAIL,
|
||||
|
|
@ -335,7 +335,7 @@ static u8 ObjectEventCB2_NoMovement2(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void PlayerStep(u8 direction, u16 newKeys, u16 heldKeys)
|
||||
void PlayerStep(enum Direction direction, u16 newKeys, u16 heldKeys)
|
||||
{
|
||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
|
||||
|
|
@ -366,7 +366,7 @@ void PlayerStep(u8 direction, u16 newKeys, u16 heldKeys)
|
|||
|
||||
#define sCounter data[3]
|
||||
|
||||
static bool8 TryInterruptObjectEventSpecialAnim(struct ObjectEvent *playerObjEvent, u8 direction)
|
||||
static bool8 TryInterruptObjectEventSpecialAnim(struct ObjectEvent *playerObjEvent, enum Direction direction)
|
||||
{
|
||||
if (ObjectEventIsMovementOverridden(playerObjEvent)
|
||||
&& !ObjectEventClearHeldMovementIfFinished(playerObjEvent))
|
||||
|
|
@ -419,7 +419,7 @@ static void npc_clear_strange_bits(struct ObjectEvent *objEvent)
|
|||
gPlayerAvatar.flags &= ~PLAYER_AVATAR_FLAG_DASH;
|
||||
}
|
||||
|
||||
static void MovePlayerAvatarUsingKeypadInput(u8 direction, u16 newKeys, u16 heldKeys)
|
||||
static void MovePlayerAvatarUsingKeypadInput(enum Direction direction, u16 newKeys, u16 heldKeys)
|
||||
{
|
||||
if (gPlayerAvatar.flags & (PLAYER_AVATAR_FLAG_MACH_BIKE | PLAYER_AVATAR_FLAG_ACRO_BIKE))
|
||||
MovePlayerOnBike(direction, newKeys, heldKeys);
|
||||
|
|
@ -469,10 +469,10 @@ static bool8 ForcedMovement_None(void)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static bool8 DoForcedMovement(u8 direction, void (*moveFunc)(u8))
|
||||
static bool8 DoForcedMovement(enum Direction direction, void (*moveFunc)(enum Direction))
|
||||
{
|
||||
struct PlayerAvatar *playerAvatar = &gPlayerAvatar;
|
||||
u8 collision;
|
||||
enum Collision collision;
|
||||
|
||||
// Check for sideways stairs onto ice movement.
|
||||
switch (direction)
|
||||
|
|
@ -485,6 +485,8 @@ static bool8 DoForcedMovement(u8 direction, void (*moveFunc)(u8))
|
|||
case DIR_SOUTHEAST:
|
||||
direction = DIR_EAST;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
collision = CheckForPlayerAvatarCollision(direction);
|
||||
|
|
@ -521,7 +523,7 @@ static bool8 DoForcedMovement(u8 direction, void (*moveFunc)(u8))
|
|||
}
|
||||
}
|
||||
|
||||
static bool8 DoForcedMovementInCurrentDirection(void (*moveFunc)(u8))
|
||||
static bool8 DoForcedMovementInCurrentDirection(void (*moveFunc)(enum Direction))
|
||||
{
|
||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
|
||||
|
|
@ -574,7 +576,7 @@ static bool8 ForcedMovement_PushedEastByCurrent(void)
|
|||
return DoForcedMovement(DIR_EAST, PlayerRideWaterCurrent);
|
||||
}
|
||||
|
||||
static bool8 ForcedMovement_Slide(u8 direction, void (*moveFunc)(u8))
|
||||
static bool8 ForcedMovement_Slide(enum Direction direction, void (*moveFunc)(enum Direction))
|
||||
{
|
||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
|
||||
|
|
@ -631,12 +633,12 @@ static bool8 ForcedMovement_MuddySlope(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void MovePlayerNotOnBike(u8 direction, u16 heldKeys)
|
||||
static void MovePlayerNotOnBike(enum Direction direction, u16 heldKeys)
|
||||
{
|
||||
sPlayerNotOnBikeFuncs[CheckMovementInputNotOnBike(direction)](direction, heldKeys);
|
||||
}
|
||||
|
||||
static u8 CheckMovementInputNotOnBike(u8 direction)
|
||||
static u8 CheckMovementInputNotOnBike(enum Direction direction)
|
||||
{
|
||||
if (direction == DIR_NONE)
|
||||
return gPlayerAvatar.runningState = NOT_MOVING;
|
||||
|
|
@ -646,7 +648,7 @@ static u8 CheckMovementInputNotOnBike(u8 direction)
|
|||
return gPlayerAvatar.runningState = MOVING;
|
||||
}
|
||||
|
||||
static void PlayerNotOnBikeNotMoving(u8 direction, u16 heldKeys)
|
||||
static void PlayerNotOnBikeNotMoving(enum Direction direction, u16 heldKeys)
|
||||
{
|
||||
PlayerFaceDirection(GetPlayerFacingDirection());
|
||||
}
|
||||
|
|
@ -690,7 +692,7 @@ static const u8 sCounterClockwiseDirections[4][4] =
|
|||
{ DIR_EAST, DIR_NORTH, DIR_WEST, DIR_SOUTH, },
|
||||
};
|
||||
|
||||
static void WindUpSpinTimer(u32 direction)
|
||||
static void WindUpSpinTimer(enum Direction direction)
|
||||
{
|
||||
gPlayerSpinData.spinTimeout = 60;
|
||||
gPlayerSpinData.spinHistory0 = gPlayerSpinData.spinHistory1;
|
||||
|
|
@ -770,15 +772,15 @@ bool32 CanTriggerSpinEvolution()
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static void PlayerNotOnBikeTurningInPlace(u8 direction, u16 heldKeys)
|
||||
static void PlayerNotOnBikeTurningInPlace(enum Direction direction, u16 heldKeys)
|
||||
{
|
||||
WindUpSpinTimer(direction);
|
||||
PlayerTurnInPlace(direction);
|
||||
}
|
||||
|
||||
static void PlayerNotOnBikeMoving(u8 direction, u16 heldKeys)
|
||||
static void PlayerNotOnBikeMoving(enum Direction direction, u16 heldKeys)
|
||||
{
|
||||
u8 collision = CheckForPlayerAvatarCollision(direction);
|
||||
enum Collision collision = CheckForPlayerAvatarCollision(direction);
|
||||
|
||||
if (collision)
|
||||
{
|
||||
|
|
@ -869,7 +871,7 @@ static void PlayerNotOnBikeMoving(u8 direction, u16 heldKeys)
|
|||
}
|
||||
}
|
||||
|
||||
static u8 CheckForPlayerAvatarCollision(u8 direction)
|
||||
static enum Collision CheckForPlayerAvatarCollision(enum Direction direction)
|
||||
{
|
||||
s16 x, y;
|
||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
|
|
@ -883,7 +885,7 @@ static u8 CheckForPlayerAvatarCollision(u8 direction)
|
|||
return CheckForObjectEventCollision(playerObjEvent, x, y, direction, MapGridGetMetatileBehaviorAt(x, y));
|
||||
}
|
||||
|
||||
static u8 CheckForPlayerAvatarStaticCollision(u8 direction)
|
||||
static enum Collision CheckForPlayerAvatarStaticCollision(enum Direction direction)
|
||||
{
|
||||
s16 x, y;
|
||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
|
|
@ -894,9 +896,9 @@ static u8 CheckForPlayerAvatarStaticCollision(u8 direction)
|
|||
return CheckForObjectEventStaticCollision(playerObjEvent, x, y, direction, MapGridGetMetatileBehaviorAt(x, y));
|
||||
}
|
||||
|
||||
u8 CheckForObjectEventCollision(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 direction, u8 metatileBehavior)
|
||||
enum Collision CheckForObjectEventCollision(struct ObjectEvent *objectEvent, s16 x, s16 y, enum Direction direction, u8 metatileBehavior)
|
||||
{
|
||||
u8 collision = GetCollisionAtCoords(objectEvent, x, y, direction);
|
||||
enum Collision collision = GetCollisionAtCoords(objectEvent, x, y, direction);
|
||||
|
||||
if (collision == COLLISION_ELEVATION_MISMATCH && CanStopSurfing(x, y, direction))
|
||||
return COLLISION_STOP_SURFING;
|
||||
|
|
@ -919,9 +921,9 @@ u8 CheckForObjectEventCollision(struct ObjectEvent *objectEvent, s16 x, s16 y, u
|
|||
return collision;
|
||||
}
|
||||
|
||||
static u8 CheckForObjectEventStaticCollision(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 direction, u8 metatileBehavior)
|
||||
static enum Collision CheckForObjectEventStaticCollision(struct ObjectEvent *objectEvent, s16 x, s16 y, enum Direction direction, u8 metatileBehavior)
|
||||
{
|
||||
u8 collision = GetCollisionAtCoords(objectEvent, x, y, direction);
|
||||
enum Collision collision = GetCollisionAtCoords(objectEvent, x, y, direction);
|
||||
|
||||
if (collision == COLLISION_NONE)
|
||||
{
|
||||
|
|
@ -932,7 +934,7 @@ static u8 CheckForObjectEventStaticCollision(struct ObjectEvent *objectEvent, s1
|
|||
return collision;
|
||||
}
|
||||
|
||||
static bool8 CanStopSurfing(s16 x, s16 y, u8 direction)
|
||||
static bool8 CanStopSurfing(s16 x, s16 y, enum Direction direction)
|
||||
{
|
||||
if ((gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING)
|
||||
&& MapGridGetElevationAt(x, y) == 3
|
||||
|
|
@ -949,7 +951,7 @@ static bool8 CanStopSurfing(s16 x, s16 y, u8 direction)
|
|||
}
|
||||
}
|
||||
|
||||
static bool8 ShouldJumpLedge(s16 x, s16 y, u8 direction)
|
||||
static bool8 ShouldJumpLedge(s16 x, s16 y, enum Direction direction)
|
||||
{
|
||||
if (GetLedgeJumpDirection(x, y, direction) != DIR_NONE)
|
||||
return TRUE;
|
||||
|
|
@ -957,7 +959,7 @@ static bool8 ShouldJumpLedge(s16 x, s16 y, u8 direction)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static bool8 TryPushBoulder(s16 x, s16 y, u8 direction)
|
||||
static bool8 TryPushBoulder(s16 x, s16 y, enum Direction direction)
|
||||
{
|
||||
if (FlagGet(FLAG_SYS_USE_STRENGTH))
|
||||
{
|
||||
|
|
@ -979,7 +981,7 @@ static bool8 TryPushBoulder(s16 x, s16 y, u8 direction)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static void CheckAcroBikeCollision(s16 x, s16 y, u8 metatileBehavior, u8 *collision)
|
||||
static void CheckAcroBikeCollision(s16 x, s16 y, u8 metatileBehavior, enum Collision *collision)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
|
|
@ -993,7 +995,7 @@ static void CheckAcroBikeCollision(s16 x, s16 y, u8 metatileBehavior, u8 *collis
|
|||
}
|
||||
}
|
||||
|
||||
bool8 IsPlayerCollidingWithFarawayIslandMew(u8 direction)
|
||||
bool8 IsPlayerCollidingWithFarawayIslandMew(enum Direction direction)
|
||||
{
|
||||
u8 mewObjectId;
|
||||
struct ObjectEvent *object;
|
||||
|
|
@ -1181,49 +1183,49 @@ void PlayerSetAnimId(u8 movementActionId, u8 copyableMovement)
|
|||
}
|
||||
|
||||
// slow stairs (from FRLG--faster than slow)
|
||||
static void PlayerWalkSlowStairs(u8 direction)
|
||||
static void PlayerWalkSlowStairs(enum Direction direction)
|
||||
{
|
||||
PlayerSetAnimId(GetWalkSlowStairsMovementAction(direction), COPY_MOVE_WALK);
|
||||
}
|
||||
|
||||
// slow
|
||||
static void UNUSED PlayerWalkSlow(u8 direction)
|
||||
static void UNUSED PlayerWalkSlow(enum Direction direction)
|
||||
{
|
||||
PlayerSetAnimId(GetWalkSlowMovementAction(direction), COPY_MOVE_WALK);
|
||||
}
|
||||
|
||||
static void PlayerRunSlow(u8 direction)
|
||||
static void PlayerRunSlow(enum Direction direction)
|
||||
{
|
||||
PlayerSetAnimId(GetPlayerRunSlowMovementAction(direction), COPY_MOVE_WALK);
|
||||
}
|
||||
|
||||
// normal speed (1 speed)
|
||||
void PlayerWalkNormal(u8 direction)
|
||||
void PlayerWalkNormal(enum Direction direction)
|
||||
{
|
||||
PlayerSetAnimId(GetWalkNormalMovementAction(direction), COPY_MOVE_WALK);
|
||||
}
|
||||
|
||||
void PlayerWalkFast(u8 direction)
|
||||
void PlayerWalkFast(enum Direction direction)
|
||||
{
|
||||
PlayerSetAnimId(GetWalkFastMovementAction(direction), COPY_MOVE_WALK);
|
||||
}
|
||||
|
||||
void PlayerRideWaterCurrent(u8 direction)
|
||||
void PlayerRideWaterCurrent(enum Direction direction)
|
||||
{
|
||||
PlayerSetAnimId(GetRideWaterCurrentMovementAction(direction), COPY_MOVE_WALK);
|
||||
}
|
||||
|
||||
void PlayerWalkFaster(u8 direction)
|
||||
void PlayerWalkFaster(enum Direction direction)
|
||||
{
|
||||
PlayerSetAnimId(GetWalkFasterMovementAction(direction), COPY_MOVE_WALK);
|
||||
}
|
||||
|
||||
static void PlayerRun(u8 direction)
|
||||
static void PlayerRun(enum Direction direction)
|
||||
{
|
||||
PlayerSetAnimId(GetPlayerRunMovementAction(direction), COPY_MOVE_WALK);
|
||||
}
|
||||
|
||||
void PlayerOnBikeCollide(u8 direction)
|
||||
void PlayerOnBikeCollide(enum Direction direction)
|
||||
{
|
||||
PlayCollisionSoundIfNotFacingWarp(direction);
|
||||
PlayerSetAnimId(GetWalkInPlaceNormalMovementAction(direction), COPY_MOVE_FACE);
|
||||
|
|
@ -1245,33 +1247,33 @@ void PlayerOnBikeCollide(u8 direction)
|
|||
}
|
||||
}
|
||||
|
||||
void PlayerOnBikeCollideWithFarawayIslandMew(u8 direction)
|
||||
void PlayerOnBikeCollideWithFarawayIslandMew(enum Direction direction)
|
||||
{
|
||||
PlayerSetAnimId(GetWalkInPlaceNormalMovementAction(direction), COPY_MOVE_FACE);
|
||||
}
|
||||
|
||||
static void PlayerNotOnBikeCollide(u8 direction)
|
||||
static void PlayerNotOnBikeCollide(enum Direction direction)
|
||||
{
|
||||
PlayCollisionSoundIfNotFacingWarp(direction);
|
||||
PlayerSetAnimId(GetWalkInPlaceSlowMovementAction(direction), COPY_MOVE_FACE);
|
||||
}
|
||||
|
||||
static void PlayerNotOnBikeCollideWithFarawayIslandMew(u8 direction)
|
||||
static void PlayerNotOnBikeCollideWithFarawayIslandMew(enum Direction direction)
|
||||
{
|
||||
PlayerSetAnimId(GetWalkInPlaceSlowMovementAction(direction), COPY_MOVE_FACE);
|
||||
}
|
||||
|
||||
void PlayerFaceDirection(u8 direction)
|
||||
void PlayerFaceDirection(enum Direction direction)
|
||||
{
|
||||
PlayerSetAnimId(GetFaceDirectionMovementAction(direction), COPY_MOVE_FACE);
|
||||
}
|
||||
|
||||
void PlayerTurnInPlace(u8 direction)
|
||||
void PlayerTurnInPlace(enum Direction direction)
|
||||
{
|
||||
PlayerSetAnimId(GetWalkInPlaceFastMovementAction(direction), COPY_MOVE_FACE);
|
||||
}
|
||||
|
||||
void PlayerJumpLedge(u8 direction)
|
||||
void PlayerJumpLedge(enum Direction direction)
|
||||
{
|
||||
PlaySE(SE_LEDGE);
|
||||
PlayerSetAnimId(GetJump2MovementAction(direction), COPY_MOVE_JUMP2);
|
||||
|
|
@ -1288,73 +1290,73 @@ void PlayerFreeze(void)
|
|||
}
|
||||
|
||||
// wheelie idle
|
||||
void PlayerIdleWheelie(u8 direction)
|
||||
void PlayerIdleWheelie(enum Direction direction)
|
||||
{
|
||||
PlayerSetAnimId(GetAcroWheelieFaceDirectionMovementAction(direction), COPY_MOVE_FACE);
|
||||
}
|
||||
|
||||
// normal to wheelie
|
||||
void PlayerStartWheelie(u8 direction)
|
||||
void PlayerStartWheelie(enum Direction direction)
|
||||
{
|
||||
PlayerSetAnimId(GetAcroPopWheelieFaceDirectionMovementAction(direction), COPY_MOVE_FACE);
|
||||
}
|
||||
|
||||
// wheelie to normal
|
||||
void PlayerEndWheelie(u8 direction)
|
||||
void PlayerEndWheelie(enum Direction direction)
|
||||
{
|
||||
PlayerSetAnimId(GetAcroEndWheelieFaceDirectionMovementAction(direction), COPY_MOVE_FACE);
|
||||
}
|
||||
|
||||
// wheelie hopping standing
|
||||
void PlayerStandingHoppingWheelie(u8 direction)
|
||||
void PlayerStandingHoppingWheelie(enum Direction direction)
|
||||
{
|
||||
PlaySE(SE_BIKE_HOP);
|
||||
PlayerSetAnimId(GetAcroWheelieHopFaceDirectionMovementAction(direction), COPY_MOVE_FACE);
|
||||
}
|
||||
|
||||
// wheelie hopping moving
|
||||
void PlayerMovingHoppingWheelie(u8 direction)
|
||||
void PlayerMovingHoppingWheelie(enum Direction direction)
|
||||
{
|
||||
PlaySE(SE_BIKE_HOP);
|
||||
PlayerSetAnimId(GetAcroWheelieHopDirectionMovementAction(direction), COPY_MOVE_WALK);
|
||||
}
|
||||
|
||||
// wheelie hopping ledge
|
||||
void PlayerLedgeHoppingWheelie(u8 direction)
|
||||
void PlayerLedgeHoppingWheelie(enum Direction direction)
|
||||
{
|
||||
PlaySE(SE_BIKE_HOP);
|
||||
PlayerSetAnimId(GetAcroWheelieJumpDirectionMovementAction(direction), COPY_MOVE_JUMP2);
|
||||
}
|
||||
|
||||
// acro turn jump
|
||||
void PlayerAcroTurnJump(u8 direction)
|
||||
void PlayerAcroTurnJump(enum Direction direction)
|
||||
{
|
||||
PlaySE(SE_BIKE_HOP);
|
||||
PlayerSetAnimId(GetJumpInPlaceTurnAroundMovementAction(direction), COPY_MOVE_FACE);
|
||||
}
|
||||
|
||||
void PlayerWheelieInPlace(u8 direction)
|
||||
void PlayerWheelieInPlace(enum Direction direction)
|
||||
{
|
||||
PlaySE(SE_WALL_HIT);
|
||||
PlayerSetAnimId(GetAcroWheelieInPlaceDirectionMovementAction(direction), COPY_MOVE_WALK);
|
||||
}
|
||||
|
||||
void PlayerPopWheelieWhileMoving(u8 direction)
|
||||
void PlayerPopWheelieWhileMoving(enum Direction direction)
|
||||
{
|
||||
PlayerSetAnimId(GetAcroPopWheelieMoveDirectionMovementAction(direction), COPY_MOVE_WALK);
|
||||
}
|
||||
|
||||
void PlayerWheelieMove(u8 direction)
|
||||
void PlayerWheelieMove(enum Direction direction)
|
||||
{
|
||||
PlayerSetAnimId(GetAcroWheelieMoveDirectionMovementAction(direction), COPY_MOVE_WALK);
|
||||
}
|
||||
|
||||
void PlayerEndWheelieWhileMoving(u8 direction)
|
||||
void PlayerEndWheelieWhileMoving(enum Direction direction)
|
||||
{
|
||||
PlayerSetAnimId(GetAcroEndWheelieMoveDirectionMovementAction(direction), COPY_MOVE_WALK);
|
||||
}
|
||||
|
||||
static void PlayCollisionSoundIfNotFacingWarp(u8 direction)
|
||||
static void PlayCollisionSoundIfNotFacingWarp(enum Direction direction)
|
||||
{
|
||||
s16 x, y;
|
||||
u8 metatileBehavior = gObjectEvents[gPlayerAvatar.objectEventId].currentMetatileBehavior;
|
||||
|
|
@ -1421,14 +1423,14 @@ u8 player_get_pos_including_state_based_drift(s16 *x, s16 *y)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
u8 GetPlayerFacingDirection(void)
|
||||
enum Direction GetPlayerFacingDirection(void)
|
||||
{
|
||||
Script_RequestEffects(SCREFF_V1);
|
||||
|
||||
return gObjectEvents[gPlayerAvatar.objectEventId].facingDirection;
|
||||
}
|
||||
|
||||
u8 GetPlayerMovementDirection(void)
|
||||
enum Direction GetPlayerMovementDirection(void)
|
||||
{
|
||||
return gObjectEvents[gPlayerAvatar.objectEventId].movementDirection;
|
||||
}
|
||||
|
|
@ -1477,22 +1479,22 @@ void StopPlayerAvatar(void)
|
|||
}
|
||||
}
|
||||
|
||||
u16 GetRivalAvatarGraphicsIdByStateIdAndGender(u8 state, u8 gender)
|
||||
u16 GetRivalAvatarGraphicsIdByStateIdAndGender(u8 state, enum Gender gender)
|
||||
{
|
||||
return sRivalAvatarGfxIds[state][gender];
|
||||
}
|
||||
|
||||
u16 GetPlayerAvatarGraphicsIdByStateIdAndGender(u8 state, u8 gender)
|
||||
u16 GetPlayerAvatarGraphicsIdByStateIdAndGender(u8 state, enum Gender gender)
|
||||
{
|
||||
return sPlayerAvatarGfxIds[state][gender];
|
||||
}
|
||||
|
||||
u16 GetFRLGAvatarGraphicsIdByGender(u8 gender)
|
||||
u16 GetFRLGAvatarGraphicsIdByGender(enum Gender gender)
|
||||
{
|
||||
return sFRLGAvatarGfxIds[gender];
|
||||
}
|
||||
|
||||
u16 GetRSAvatarGraphicsIdByGender(u8 gender)
|
||||
u16 GetRSAvatarGraphicsIdByGender(enum Gender gender)
|
||||
{
|
||||
return sRSAvatarGfxIds[gender];
|
||||
}
|
||||
|
|
@ -1502,7 +1504,7 @@ u16 GetPlayerAvatarGraphicsIdByStateId(u8 state)
|
|||
return GetPlayerAvatarGraphicsIdByStateIdAndGender(state, gPlayerAvatar.gender);
|
||||
}
|
||||
|
||||
u8 GetPlayerAvatarGenderByGraphicsId(u16 gfxId)
|
||||
enum Gender GetPlayerAvatarGenderByGraphicsId(u16 gfxId)
|
||||
{
|
||||
switch (gfxId)
|
||||
{
|
||||
|
|
@ -1604,7 +1606,7 @@ void SetPlayerAvatarExtraStateTransition(u16 graphicsId, u8 transitionFlag)
|
|||
DoPlayerAvatarTransition();
|
||||
}
|
||||
|
||||
void InitPlayerAvatar(s16 x, s16 y, u8 direction, u8 gender)
|
||||
void InitPlayerAvatar(s16 x, s16 y, enum Direction direction, enum Gender gender)
|
||||
{
|
||||
struct ObjectEventTemplate playerObjEventTemplate;
|
||||
u8 objectEventId;
|
||||
|
|
@ -1651,21 +1653,21 @@ void SetPlayerAvatarFieldMove(void)
|
|||
StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], ANIM_FIELD_MOVE);
|
||||
}
|
||||
|
||||
void SetPlayerAvatarFishing(u8 direction)
|
||||
void SetPlayerAvatarFishing(enum Direction direction)
|
||||
{
|
||||
EndORASDowsing();
|
||||
ObjectEventSetGraphicsId(&gObjectEvents[gPlayerAvatar.objectEventId], GetPlayerAvatarGraphicsIdByStateId(PLAYER_AVATAR_STATE_FISHING));
|
||||
StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingDirectionAnimNum(direction));
|
||||
}
|
||||
|
||||
void PlayerUseAcroBikeOnBumpySlope(u8 direction)
|
||||
void PlayerUseAcroBikeOnBumpySlope(enum Direction direction)
|
||||
{
|
||||
ObjectEventSetGraphicsId(&gObjectEvents[gPlayerAvatar.objectEventId], GetPlayerAvatarGraphicsIdByStateId(PLAYER_AVATAR_STATE_ACRO_BIKE));
|
||||
StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetAcroWheelieDirectionAnimNum(direction));
|
||||
SeekSpriteAnim(&gSprites[gPlayerAvatar.spriteId], 1);
|
||||
}
|
||||
|
||||
void SetPlayerAvatarWatering(u8 direction)
|
||||
void SetPlayerAvatarWatering(enum Direction direction)
|
||||
{
|
||||
EndORASDowsing();
|
||||
ObjectEventSetGraphicsId(&gObjectEvents[gPlayerAvatar.objectEventId], GetPlayerAvatarGraphicsIdByStateId(PLAYER_AVATAR_STATE_WATERING));
|
||||
|
|
@ -1676,7 +1678,7 @@ static void HideShowWarpArrow(struct ObjectEvent *objectEvent)
|
|||
{
|
||||
s16 x;
|
||||
s16 y;
|
||||
u8 direction;
|
||||
enum Direction direction;
|
||||
u8 metatileBehavior = objectEvent->currentMetatileBehavior;
|
||||
|
||||
for (x = 0, direction = DIR_SOUTH; x < 4; x++, direction++)
|
||||
|
|
@ -1700,7 +1702,7 @@ static void HideShowWarpArrow(struct ObjectEvent *objectEvent)
|
|||
#define tBoulderObjId data[1]
|
||||
#define tDirection data[2]
|
||||
|
||||
static void StartStrengthAnim(u8 objectEventId, u8 direction)
|
||||
static void StartStrengthAnim(u8 objectEventId, enum Direction direction)
|
||||
{
|
||||
u8 taskId = CreateTask(Task_PushBoulder, 0xFF);
|
||||
|
||||
|
|
@ -1828,11 +1830,11 @@ static bool8 PlayerAvatar_SecretBaseMatSpinStep0(struct Task *task, struct Objec
|
|||
|
||||
static bool8 PlayerAvatar_SecretBaseMatSpinStep1(struct Task *task, struct ObjectEvent *objectEvent)
|
||||
{
|
||||
u8 directions[] = {DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
|
||||
enum Direction directions[] = {DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
|
||||
|
||||
if (ObjectEventClearHeldMovementIfFinished(objectEvent))
|
||||
{
|
||||
u8 direction;
|
||||
enum Direction direction;
|
||||
|
||||
ObjectEventSetHeldMovement(objectEvent, GetFaceDirectionMovementAction(direction = directions[objectEvent->movementDirection - 1]));
|
||||
if (direction == (u8)task->data[1])
|
||||
|
|
@ -1874,7 +1876,7 @@ static bool8 PlayerAvatar_SecretBaseMatSpinStep3(struct Task *task, struct Objec
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static void CreateStopSurfingTask(u8 direction)
|
||||
static void CreateStopSurfingTask(enum Direction direction)
|
||||
{
|
||||
u8 taskId;
|
||||
|
||||
|
|
@ -1923,12 +1925,12 @@ static void Task_WaitStopSurfing(u8 taskId)
|
|||
}
|
||||
}
|
||||
|
||||
void SetSpinStartFacingDir(u8 direction)
|
||||
void SetSpinStartFacingDir(enum Direction direction)
|
||||
{
|
||||
sSpinStartFacingDir = direction;
|
||||
}
|
||||
|
||||
static u8 GetSpinStartFacingDir(void)
|
||||
static enum Direction GetSpinStartFacingDir(void)
|
||||
{
|
||||
if (sSpinStartFacingDir == DIR_NONE)
|
||||
return DIR_SOUTH;
|
||||
|
|
@ -2010,7 +2012,7 @@ bool32 IsPlayerSpinExitActive(void)
|
|||
return FuncIsActiveTask(Task_DoPlayerSpinExit);
|
||||
}
|
||||
|
||||
static const u8 sSpinDirections[] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
|
||||
static const enum Direction sSpinDirections[] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
|
||||
|
||||
static void Task_DoPlayerSpinEntrance(u8 taskId)
|
||||
{
|
||||
|
|
@ -2089,7 +2091,7 @@ static u8 TrySpinPlayerForWarp(struct ObjectEvent *object, s16 *delayTimer)
|
|||
}
|
||||
|
||||
//sideways stairs
|
||||
u8 GetRightSideStairsDirection(u8 direction)
|
||||
enum Direction GetRightSideStairsDirection(enum Direction direction)
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
|
|
@ -2104,7 +2106,7 @@ u8 GetRightSideStairsDirection(u8 direction)
|
|||
}
|
||||
}
|
||||
|
||||
u8 GetLeftSideStairsDirection(u8 direction)
|
||||
enum Direction GetLeftSideStairsDirection(enum Direction direction)
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
|
|
@ -2119,7 +2121,7 @@ u8 GetLeftSideStairsDirection(u8 direction)
|
|||
}
|
||||
}
|
||||
|
||||
bool8 ObjectMovingOnRockStairs(struct ObjectEvent *objectEvent, u8 direction)
|
||||
bool8 ObjectMovingOnRockStairs(struct ObjectEvent *objectEvent, enum Direction direction)
|
||||
{
|
||||
#if SLOW_MOVEMENT_ON_STAIRS == TRUE
|
||||
s16 x = objectEvent->currentCoords.x;
|
||||
|
|
|
|||
|
|
@ -1690,7 +1690,7 @@ void DoStairWarp(u16 metatileBehavior, u16 delay)
|
|||
#undef tTimer
|
||||
#undef tDelay
|
||||
|
||||
bool32 IsDirectionalStairWarpMetatileBehavior(u16 metatileBehavior, u8 playerDirection)
|
||||
bool32 IsDirectionalStairWarpMetatileBehavior(u16 metatileBehavior, enum Direction playerDirection)
|
||||
{
|
||||
if (playerDirection == DIR_WEST)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -563,7 +563,7 @@ void SpawnLinkPartnerObjectEvent(void)
|
|||
{-1, 0}
|
||||
};
|
||||
u8 myLinkPlayerNumber;
|
||||
u8 playerFacingDirection;
|
||||
enum Direction playerFacingDirection;
|
||||
u8 linkSpriteId;
|
||||
u8 i;
|
||||
|
||||
|
|
@ -589,12 +589,16 @@ void SpawnLinkPartnerObjectEvent(void)
|
|||
j = 3;
|
||||
x = gSaveBlock1Ptr->pos.x;
|
||||
y = gSaveBlock1Ptr->pos.y + 1;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
for (i = 0; i < gSpecialVar_0x8004; i++)
|
||||
{
|
||||
if (myLinkPlayerNumber != i)
|
||||
{
|
||||
switch ((u8)gLinkPlayers[i].version)
|
||||
enum GameVersion version = (u8)gLinkPlayers[i].version;
|
||||
switch (version)
|
||||
{
|
||||
case VERSION_RUBY:
|
||||
case VERSION_SAPPHIRE:
|
||||
|
|
@ -1069,7 +1073,7 @@ static void Task_PCTurnOnEffect(u8 taskId)
|
|||
|
||||
static void PCTurnOnEffect(struct Task *task)
|
||||
{
|
||||
u8 playerDirection;
|
||||
enum Direction playerDirection;
|
||||
s8 dx = 0;
|
||||
s8 dy = 0;
|
||||
if (task->tTimer == 6)
|
||||
|
|
@ -1092,6 +1096,8 @@ static void PCTurnOnEffect(struct Task *task)
|
|||
dx = 1;
|
||||
dy = -1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Update map
|
||||
|
|
@ -1146,7 +1152,7 @@ static void PCTurnOffEffect(void)
|
|||
u16 metatileId = 0;
|
||||
|
||||
// Get where the PC should be, depending on where the player is looking.
|
||||
u8 playerDirection = GetPlayerFacingDirection();
|
||||
enum Direction playerDirection = GetPlayerFacingDirection();
|
||||
|
||||
if (IsPlayerInFrontOfPC() == FALSE)
|
||||
return;
|
||||
|
|
@ -1164,6 +1170,8 @@ static void PCTurnOffEffect(void)
|
|||
dx = 1;
|
||||
dy = -1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (gSpecialVar_0x8004 == PC_LOCATION_OTHER)
|
||||
|
|
@ -2287,7 +2295,7 @@ void BufferBattleTowerElevatorFloors(void)
|
|||
|
||||
u8 i;
|
||||
u16 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
enum FrontierLevelMode lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
|
||||
if (battleMode == FRONTIER_MODE_MULTIS && !FlagGet(FLAG_CHOSEN_MULTI_BATTLE_NPC_PARTNER))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ static void FillEastConnection(struct MapHeader const *mapHeader, struct MapHead
|
|||
static void InitBackupMapLayoutConnections(struct MapHeader *mapHeader);
|
||||
static void LoadSavedMapView(void);
|
||||
static bool8 SkipCopyingMetatileFromSavedMap(u16 *mapBlock, u16 mapWidth, u8 yMode);
|
||||
static const struct MapConnection *GetIncomingConnection(u8 direction, int x, int y);
|
||||
static bool8 IsPosInIncomingConnectingMap(u8 direction, int x, int y, const struct MapConnection *connection);
|
||||
static const struct MapConnection *GetIncomingConnection(enum Connection direction, int x, int y);
|
||||
static bool8 IsPosInIncomingConnectingMap(enum Connection direction, int x, int y, const struct MapConnection *connection);
|
||||
static bool8 IsCoordInIncomingConnectingMap(int coord, int srcMax, int destMax, int offset);
|
||||
|
||||
static inline u16 GetBorderBlockAt(int x, int y)
|
||||
|
|
@ -505,7 +505,7 @@ static void LoadSavedMapView(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void MoveMapViewToBackup(u8 direction)
|
||||
static void MoveMapViewToBackup(enum Connection direction)
|
||||
{
|
||||
int width;
|
||||
u16 *mapView;
|
||||
|
|
@ -524,6 +524,7 @@ static void MoveMapViewToBackup(u8 direction)
|
|||
y0 = gSaveBlock1Ptr->pos.y;
|
||||
x2 = MAP_OFFSET_W;
|
||||
y2 = MAP_OFFSET_H;
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
case CONNECTION_NORTH:
|
||||
|
|
@ -542,7 +543,10 @@ static void MoveMapViewToBackup(u8 direction)
|
|||
r9 = 1;
|
||||
x2 = MAP_OFFSET_W - 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
for (y = 0; y < y2; y++)
|
||||
{
|
||||
i = 0;
|
||||
|
|
@ -558,10 +562,11 @@ static void MoveMapViewToBackup(u8 direction)
|
|||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
ClearSavedMapView();
|
||||
}
|
||||
|
||||
int GetMapBorderIdAt(int x, int y)
|
||||
enum Connection GetMapBorderIdAt(int x, int y)
|
||||
{
|
||||
if (GetMapGridBlockAt(x, y) == MAPGRID_UNDEFINED)
|
||||
return CONNECTION_INVALID;
|
||||
|
|
@ -600,12 +605,12 @@ int GetMapBorderIdAt(int x, int y)
|
|||
}
|
||||
}
|
||||
|
||||
int GetPostCameraMoveMapBorderId(int x, int y)
|
||||
enum Connection GetPostCameraMoveMapBorderId(int x, int y)
|
||||
{
|
||||
return GetMapBorderIdAt(gSaveBlock1Ptr->pos.x + MAP_OFFSET + x, gSaveBlock1Ptr->pos.y + MAP_OFFSET + y);
|
||||
}
|
||||
|
||||
bool32 CanCameraMoveInDirection(int direction)
|
||||
bool32 CanCameraMoveInDirection(enum Direction direction)
|
||||
{
|
||||
int x, y;
|
||||
x = gSaveBlock1Ptr->pos.x + MAP_OFFSET + gDirectionToVectors[direction].x;
|
||||
|
|
@ -617,7 +622,7 @@ bool32 CanCameraMoveInDirection(int direction)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static void SetPositionFromConnection(const struct MapConnection *connection, int direction, int x, int y)
|
||||
static void SetPositionFromConnection(const struct MapConnection *connection, enum Connection direction, int x, int y)
|
||||
{
|
||||
struct MapHeader const *mapHeader = GetMapHeaderFromConnection(connection);
|
||||
|
||||
|
|
@ -647,7 +652,7 @@ static void SetPositionFromConnection(const struct MapConnection *connection, in
|
|||
|
||||
bool8 CameraMove(int x, int y)
|
||||
{
|
||||
int direction;
|
||||
enum Connection direction;
|
||||
const struct MapConnection *connection;
|
||||
int old_x, old_y;
|
||||
gCamera.active = FALSE;
|
||||
|
|
@ -682,7 +687,7 @@ bool8 CameraMove(int x, int y)
|
|||
return gCamera.active;
|
||||
}
|
||||
|
||||
static const struct MapConnection *GetIncomingConnection(u8 direction, int x, int y)
|
||||
static const struct MapConnection *GetIncomingConnection(enum Connection direction, int x, int y)
|
||||
{
|
||||
int count;
|
||||
int i;
|
||||
|
|
@ -703,7 +708,7 @@ static const struct MapConnection *GetIncomingConnection(u8 direction, int x, in
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static bool8 IsPosInIncomingConnectingMap(u8 direction, int x, int y, const struct MapConnection *connection)
|
||||
static bool8 IsPosInIncomingConnectingMap(enum Connection direction, int x, int y, const struct MapConnection *connection)
|
||||
{
|
||||
struct MapHeader const *mapHeader;
|
||||
mapHeader = GetMapHeaderFromConnection(connection);
|
||||
|
|
@ -715,9 +720,10 @@ static bool8 IsPosInIncomingConnectingMap(u8 direction, int x, int y, const stru
|
|||
case CONNECTION_WEST:
|
||||
case CONNECTION_EAST:
|
||||
return IsCoordInIncomingConnectingMap(y, gMapHeader.mapLayout->height, mapHeader->mapLayout->height, connection->offset);
|
||||
}
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static bool8 IsCoordInIncomingConnectingMap(int coord, int srcMax, int destMax, int offset)
|
||||
{
|
||||
|
|
@ -765,7 +771,7 @@ const struct MapConnection *GetMapConnectionAtPos(s16 x, s16 y)
|
|||
int count;
|
||||
const struct MapConnection *connection;
|
||||
int i;
|
||||
u8 direction;
|
||||
enum Connection direction;
|
||||
if (!gMapHeader.connections)
|
||||
{
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -541,7 +541,8 @@ static u32 CalculateFishingFollowerBoost()
|
|||
static u32 CalculateFishingProximityBoost()
|
||||
{
|
||||
s16 bobber_x, bobber_y, tile_x, tile_y;
|
||||
u32 direction, facingDirection, numQualifyingTile = 0;
|
||||
enum Direction direction, facingDirection;
|
||||
u32 numQualifyingTile = 0;
|
||||
struct ObjectEvent *objectEvent;
|
||||
|
||||
if (!I_FISHING_PROXIMITY)
|
||||
|
|
@ -567,7 +568,7 @@ static u32 CalculateFishingProximityBoost()
|
|||
numQualifyingTile++;
|
||||
else if (MapGridGetCollisionAt(tile_x, tile_y))
|
||||
numQualifyingTile++;
|
||||
else if (GetMapBorderIdAt(tile_x, tile_y) == -1)
|
||||
else if (GetMapBorderIdAt(tile_x, tile_y) == CONNECTION_INVALID)
|
||||
numQualifyingTile++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -492,9 +492,10 @@ static void SetCurrentSecretBase(void)
|
|||
|
||||
static void AdjustSecretPowerSpritePixelOffsets(void)
|
||||
{
|
||||
enum Direction direction = gFieldEffectArguments[1];
|
||||
if (gPlayerAvatar.flags & (PLAYER_AVATAR_FLAG_MACH_BIKE | PLAYER_AVATAR_FLAG_ACRO_BIKE))
|
||||
{
|
||||
switch (gFieldEffectArguments[1])
|
||||
switch (direction)
|
||||
{
|
||||
case DIR_SOUTH:
|
||||
gFieldEffectArguments[5] = 16;
|
||||
|
|
@ -512,11 +513,13 @@ static void AdjustSecretPowerSpritePixelOffsets(void)
|
|||
gFieldEffectArguments[5] = 24;
|
||||
gFieldEffectArguments[6] = 24;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (gFieldEffectArguments[1])
|
||||
switch (direction)
|
||||
{
|
||||
case DIR_SOUTH:
|
||||
gFieldEffectArguments[5] = 8;
|
||||
|
|
@ -534,6 +537,8 @@ static void AdjustSecretPowerSpritePixelOffsets(void)
|
|||
gFieldEffectArguments[5] = 24;
|
||||
gFieldEffectArguments[6] = 24;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -929,7 +934,7 @@ static void Task_ShatterSecretBaseBreakableDoor(u8 taskId)
|
|||
|
||||
void ShatterSecretBaseBreakableDoor(s16 x, s16 y)
|
||||
{
|
||||
u8 dir = GetPlayerFacingDirection();
|
||||
enum Direction dir = GetPlayerFacingDirection();
|
||||
|
||||
if (dir == DIR_SOUTH)
|
||||
{
|
||||
|
|
@ -1066,6 +1071,8 @@ bool8 FldEff_SandPillar(void)
|
|||
gSprites[gPlayerAvatar.spriteId].oam.y + 16,
|
||||
148);
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,10 +54,10 @@ static void TurnNPCIntoFollower(u32 localId, u32 followerFlags, u32 setScript, c
|
|||
static u32 GetFollowerNPCSprite(void);
|
||||
static bool32 FollowerNPCHasRunningFrames(void);
|
||||
static bool32 IsStateMovement(u32 state);
|
||||
static u32 GetNewPlayerMovementDirection(u32 state);
|
||||
static bool32 IsPlayerForcedOntoSameTile(u8 metatileBehavior, u8 direction);
|
||||
static enum Direction GetNewPlayerMovementDirection(u32 state);
|
||||
static bool32 IsPlayerForcedOntoSameTile(u8 metatileBehavior, enum Direction direction);
|
||||
static u32 GetPlayerFaceToDoorDirection(struct ObjectEvent *player, struct ObjectEvent *follower);
|
||||
static u32 ReturnFollowerNPCDelayedState(u32 direction);
|
||||
static u32 ReturnFollowerNPCDelayedState(enum Direction direction);
|
||||
static void TryUpdateFollowerNPCSpriteUnderwater(void);
|
||||
static void SetSurfJump(void);
|
||||
static void SetUpSurfBlobFieldEffect(struct ObjectEvent *npc);
|
||||
|
|
@ -358,7 +358,7 @@ static bool32 IsStateMovement(u32 state)
|
|||
// Because we want the NPC follower's movements to happen simultaneously with the player's,
|
||||
// we need to set the follower's movement before the player object's movementDirection parameter gets set.
|
||||
// This function allows us to determine the player's new movement direction before it gets set.
|
||||
static u32 GetNewPlayerMovementDirection(u32 state)
|
||||
static enum Direction GetNewPlayerMovementDirection(u32 state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
|
|
@ -419,9 +419,9 @@ static u32 GetNewPlayerMovementDirection(u32 state)
|
|||
}
|
||||
}
|
||||
|
||||
static bool32 IsPlayerForcedOntoSameTile(u8 metatileBehavior, u8 direction)
|
||||
static bool32 IsPlayerForcedOntoSameTile(u8 metatileBehavior, enum Direction direction)
|
||||
{
|
||||
u8 oppositeDirection = DIR_NONE;
|
||||
enum Direction oppositeDirection = DIR_NONE;
|
||||
|
||||
switch (metatileBehavior)
|
||||
{
|
||||
|
|
@ -457,7 +457,7 @@ static bool32 IsPlayerForcedOntoSameTile(u8 metatileBehavior, u8 direction)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
void GetXYCoordsPlayerMovementDest(u32 direction, s16 *x, s16 *y)
|
||||
void GetXYCoordsPlayerMovementDest(enum Direction direction, s16 *x, s16 *y)
|
||||
{
|
||||
*x = gObjectEvents[gPlayerAvatar.objectEventId].currentCoords.x;
|
||||
*y = gObjectEvents[gPlayerAvatar.objectEventId].currentCoords.y;
|
||||
|
|
@ -476,7 +476,7 @@ static u32 GetPlayerFaceToDoorDirection(struct ObjectEvent *player, struct Objec
|
|||
return DIR_NORTH;
|
||||
}
|
||||
|
||||
static u32 ReturnFollowerNPCDelayedState(u32 direction)
|
||||
static u32 ReturnFollowerNPCDelayedState(enum Direction direction)
|
||||
{
|
||||
u32 newState = GetFollowerNPCData(FNPC_DATA_DELAYED_STATE);
|
||||
SetFollowerNPCData(FNPC_DATA_DELAYED_STATE, 0);
|
||||
|
|
@ -499,7 +499,7 @@ static void TryUpdateFollowerNPCSpriteUnderwater(void)
|
|||
static void SetSurfJump(void)
|
||||
{
|
||||
struct ObjectEvent *follower = &gObjectEvents[GetFollowerNPCObjectId()];
|
||||
u32 direction;
|
||||
enum Direction direction;
|
||||
u32 jumpState;
|
||||
|
||||
ObjectEventClearHeldMovement(follower);
|
||||
|
|
@ -547,7 +547,7 @@ static void SetUpSurfBlobFieldEffect(struct ObjectEvent *npc)
|
|||
static void SetSurfDismount(void)
|
||||
{
|
||||
struct ObjectEvent *follower = &gObjectEvents[GetFollowerNPCObjectId()];
|
||||
u32 direction;
|
||||
enum Direction direction;
|
||||
u32 jumpState;
|
||||
u32 task;
|
||||
|
||||
|
|
@ -863,10 +863,10 @@ void DestroyFollowerNPC(void)
|
|||
}
|
||||
|
||||
#define RETURN_STATE(state, dir) return newState == MOVEMENT_INVALID ? state + (dir - 1) : ReturnFollowerNPCDelayedState(dir - 1);
|
||||
u32 DetermineFollowerNPCState(struct ObjectEvent *follower, u32 state, u32 direction)
|
||||
u32 DetermineFollowerNPCState(struct ObjectEvent *follower, u32 state, enum Direction direction)
|
||||
{
|
||||
u32 newState = MOVEMENT_INVALID;
|
||||
u32 collision = COLLISION_NONE;
|
||||
enum Collision collision = COLLISION_NONE;
|
||||
s16 followerX = follower->currentCoords.x;
|
||||
s16 followerY = follower->currentCoords.y;
|
||||
u32 currentBehavior = MapGridGetMetatileBehaviorAt(followerX, followerY);
|
||||
|
|
@ -874,7 +874,7 @@ u32 DetermineFollowerNPCState(struct ObjectEvent *follower, u32 state, u32 direc
|
|||
u32 noSpecialAnimFrames = (GetFollowerNPCSprite() == GetFollowerNPCData(FNPC_DATA_GFX_ID));
|
||||
u32 delayedState = GetFollowerNPCData(FNPC_DATA_DELAYED_STATE);
|
||||
s16 playerDestX, playerDestY;
|
||||
u32 playerMoveDirection = GetNewPlayerMovementDirection(state);
|
||||
enum Direction playerMoveDirection = GetNewPlayerMovementDirection(state);
|
||||
u32 newPlayerMB;
|
||||
|
||||
MoveCoords(direction, &followerX, &followerY);
|
||||
|
|
@ -928,6 +928,8 @@ u32 DetermineFollowerNPCState(struct ObjectEvent *follower, u32 state, u32 direc
|
|||
case COLLISION_SIDEWAYS_STAIRS_TO_RIGHT:
|
||||
follower->directionOverwrite = GetRightSideStairsDirection(direction);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch (state)
|
||||
|
|
@ -1182,7 +1184,7 @@ void NPCFollow(struct ObjectEvent *npc, u32 state, bool32 ignoreScriptActive)
|
|||
{
|
||||
struct ObjectEvent *player = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
struct ObjectEvent *follower = &gObjectEvents[GetFollowerNPCObjectId()];
|
||||
u32 dir;
|
||||
enum Direction dir;
|
||||
u32 newState;
|
||||
u32 taskId;
|
||||
|
||||
|
|
@ -1328,6 +1330,8 @@ void CreateFollowerNPCAvatar(void)
|
|||
case DIR_EAST:
|
||||
clone.movementType = MOVEMENT_TYPE_FACE_RIGHT;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Create NPC and store ID.
|
||||
|
|
@ -1359,7 +1363,7 @@ void FollowerNPC_HandleSprite(void)
|
|||
}
|
||||
}
|
||||
|
||||
u32 DetermineFollowerNPCDirection(struct ObjectEvent *player, struct ObjectEvent *follower)
|
||||
enum Direction DetermineFollowerNPCDirection(struct ObjectEvent *player, struct ObjectEvent *follower)
|
||||
{
|
||||
s32 delta_x = follower->currentCoords.x - player->currentCoords.x;
|
||||
s32 delta_y = follower->currentCoords.y - player->currentCoords.y;
|
||||
|
|
@ -1611,6 +1615,8 @@ void FollowerNPCWalkIntoPlayerForLeaveMap(void)
|
|||
case DIR_WEST:
|
||||
ObjectEventSetHeldMovement(follower, MOVEMENT_ACTION_WALK_NORMAL_LEFT);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1820,7 +1826,7 @@ void ScriptFaceFollowerNPC(struct ScriptContext *ctx)
|
|||
if (!FNPC_ENABLE_NPC_FOLLOWERS || !PlayerHasFollowerNPC())
|
||||
return;
|
||||
|
||||
u32 playerDirection, followerDirection;
|
||||
enum Direction playerDirection, followerDirection;
|
||||
struct ObjectEvent *player, *follower;
|
||||
player = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
follower = &gObjectEvents[GetFollowerNPCData(FNPC_DATA_OBJ_ID)];
|
||||
|
|
@ -1845,6 +1851,8 @@ void ScriptFaceFollowerNPC(struct ScriptContext *ctx)
|
|||
case DIR_EAST:
|
||||
playerDirection = DIR_WEST;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
ObjectEventTurn(player, playerDirection);
|
||||
|
|
@ -1870,7 +1878,7 @@ void ScriptHideNPCFollower(struct ScriptContext *ctx)
|
|||
|
||||
if (npc->invisible == FALSE)
|
||||
{
|
||||
u32 direction = DetermineFollowerNPCDirection(&gObjectEvents[gPlayerAvatar.objectEventId], npc);
|
||||
enum Direction direction = DetermineFollowerNPCDirection(&gObjectEvents[gPlayerAvatar.objectEventId], npc);
|
||||
|
||||
if (walkSpeed > 3)
|
||||
walkSpeed = 3;
|
||||
|
|
|
|||
|
|
@ -1074,13 +1074,13 @@ static void TowerPrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y)
|
|||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SKIP_DRAW, NULL);
|
||||
}
|
||||
|
||||
static void TowerPrintRecordStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 y)
|
||||
static void TowerPrintRecordStreak(u8 battleMode, enum FrontierLevelMode lvlMode, u8 x1, u8 x2, u8 y)
|
||||
{
|
||||
u16 num = gSaveBlock2Ptr->frontier.towerRecordWinStreaks[battleMode][lvlMode];
|
||||
TowerPrintStreak(gText_Record, num, x1, x2, y);
|
||||
}
|
||||
|
||||
static u16 TowerGetWinStreak(u8 battleMode, u8 lvlMode)
|
||||
static u16 TowerGetWinStreak(u8 battleMode, enum FrontierLevelMode lvlMode)
|
||||
{
|
||||
u16 winStreak = gSaveBlock2Ptr->frontier.towerWinStreaks[battleMode][lvlMode];
|
||||
if (winStreak > MAX_STREAK)
|
||||
|
|
@ -1089,7 +1089,7 @@ static u16 TowerGetWinStreak(u8 battleMode, u8 lvlMode)
|
|||
return winStreak;
|
||||
}
|
||||
|
||||
static void TowerPrintPrevOrCurrentStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 y)
|
||||
static void TowerPrintPrevOrCurrentStreak(u8 battleMode, enum FrontierLevelMode lvlMode, u8 x1, u8 x2, u8 y)
|
||||
{
|
||||
bool8 isCurrent;
|
||||
u16 winStreak = TowerGetWinStreak(battleMode, lvlMode);
|
||||
|
|
@ -1155,7 +1155,7 @@ static void ShowTowerResultsWindow(u8 battleMode)
|
|||
}
|
||||
|
||||
// Battle Dome records.
|
||||
static u16 DomeGetWinStreak(u8 battleMode, u8 lvlMode)
|
||||
static u16 DomeGetWinStreak(u8 battleMode, enum FrontierLevelMode lvlMode)
|
||||
{
|
||||
u16 winStreak = gSaveBlock2Ptr->frontier.domeWinStreaks[battleMode][lvlMode];
|
||||
if (winStreak > MAX_STREAK)
|
||||
|
|
@ -1172,7 +1172,7 @@ static void PrintTwoStrings(const u8 *str1, const u8 *str2, u16 num, u8 x1, u8 x
|
|||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SKIP_DRAW, NULL);
|
||||
}
|
||||
|
||||
static void DomePrintPrevOrCurrentStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 y)
|
||||
static void DomePrintPrevOrCurrentStreak(u8 battleMode, enum FrontierLevelMode lvlMode, u8 x1, u8 x2, u8 y)
|
||||
{
|
||||
bool8 isCurrent;
|
||||
u16 winStreak = DomeGetWinStreak(battleMode, lvlMode);
|
||||
|
|
@ -1234,13 +1234,13 @@ static void PalacePrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y)
|
|||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SKIP_DRAW, NULL);
|
||||
}
|
||||
|
||||
static void PalacePrintRecordStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 y)
|
||||
static void PalacePrintRecordStreak(u8 battleMode, enum FrontierLevelMode lvlMode, u8 x1, u8 x2, u8 y)
|
||||
{
|
||||
u16 num = gSaveBlock2Ptr->frontier.palaceRecordWinStreaks[battleMode][lvlMode];
|
||||
PalacePrintStreak(gText_Record, num, x1, x2, y);
|
||||
}
|
||||
|
||||
static u16 PalaceGetWinStreak(u8 battleMode, u8 lvlMode)
|
||||
static u16 PalaceGetWinStreak(u8 battleMode, enum FrontierLevelMode lvlMode)
|
||||
{
|
||||
u16 winStreak = gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][lvlMode];
|
||||
if (winStreak > MAX_STREAK)
|
||||
|
|
@ -1249,7 +1249,7 @@ static u16 PalaceGetWinStreak(u8 battleMode, u8 lvlMode)
|
|||
return winStreak;
|
||||
}
|
||||
|
||||
static void PalacePrintPrevOrCurrentStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 y)
|
||||
static void PalacePrintPrevOrCurrentStreak(u8 battleMode, enum FrontierLevelMode lvlMode, u8 x1, u8 x2, u8 y)
|
||||
{
|
||||
bool8 isCurrent;
|
||||
u16 winStreak = PalaceGetWinStreak(battleMode, lvlMode);
|
||||
|
|
@ -1298,7 +1298,7 @@ static void ShowPalaceResultsWindow(u8 battleMode)
|
|||
}
|
||||
|
||||
// Battle Pike records.
|
||||
static u16 PikeGetWinStreak(u8 lvlMode)
|
||||
static u16 PikeGetWinStreak(enum FrontierLevelMode lvlMode)
|
||||
{
|
||||
u16 winStreak = gSaveBlock2Ptr->frontier.pikeWinStreaks[lvlMode];
|
||||
if (winStreak > MAX_STREAK)
|
||||
|
|
@ -1315,7 +1315,7 @@ static void PikePrintCleared(const u8 *str1, const u8 *str2, u16 num, u8 x1, u8
|
|||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SKIP_DRAW, NULL);
|
||||
}
|
||||
|
||||
static void PikePrintPrevOrCurrentStreak(u8 lvlMode, u8 x1, u8 x2, u8 y)
|
||||
static void PikePrintPrevOrCurrentStreak(enum FrontierLevelMode lvlMode, u8 x1, u8 x2, u8 y)
|
||||
{
|
||||
bool8 isCurrent;
|
||||
u16 winStreak = PikeGetWinStreak(lvlMode);
|
||||
|
|
@ -1362,13 +1362,13 @@ static void ArenaPrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y)
|
|||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SKIP_DRAW, NULL);
|
||||
}
|
||||
|
||||
static void ArenaPrintRecordStreak(u8 lvlMode, u8 x1, u8 x2, u8 y)
|
||||
static void ArenaPrintRecordStreak(enum FrontierLevelMode lvlMode, u8 x1, u8 x2, u8 y)
|
||||
{
|
||||
u16 num = gSaveBlock2Ptr->frontier.arenaRecordStreaks[lvlMode];
|
||||
ArenaPrintStreak(gText_Record, num, x1, x2, y);
|
||||
}
|
||||
|
||||
static u16 ArenaGetWinStreak(u8 lvlMode)
|
||||
static u16 ArenaGetWinStreak(enum FrontierLevelMode lvlMode)
|
||||
{
|
||||
u16 winStreak = gSaveBlock2Ptr->frontier.arenaWinStreaks[lvlMode];
|
||||
if (winStreak > MAX_STREAK)
|
||||
|
|
@ -1377,7 +1377,7 @@ static u16 ArenaGetWinStreak(u8 lvlMode)
|
|||
return winStreak;
|
||||
}
|
||||
|
||||
static void ArenaPrintPrevOrCurrentStreak(u8 lvlMode, u8 x1, u8 x2, u8 y)
|
||||
static void ArenaPrintPrevOrCurrentStreak(enum FrontierLevelMode lvlMode, u8 x1, u8 x2, u8 y)
|
||||
{
|
||||
bool8 isCurrent;
|
||||
u16 winStreak = ArenaGetWinStreak(lvlMode);
|
||||
|
|
@ -1426,14 +1426,14 @@ static void FactoryPrintStreak(const u8 *str, u16 num1, u16 num2, u8 x1, u8 x2,
|
|||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x3, y, TEXT_SKIP_DRAW, NULL);
|
||||
}
|
||||
|
||||
static void FactoryPrintRecordStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 x3, u8 y)
|
||||
static void FactoryPrintRecordStreak(u8 battleMode, enum FrontierLevelMode lvlMode, u8 x1, u8 x2, u8 x3, u8 y)
|
||||
{
|
||||
u16 num1 = gSaveBlock2Ptr->frontier.factoryRecordWinStreaks[battleMode][lvlMode];
|
||||
u16 num2 = gSaveBlock2Ptr->frontier.factoryRecordRentsCount[battleMode][lvlMode];
|
||||
FactoryPrintStreak(gText_Record, num1, num2, x1, x2, x3, y);
|
||||
}
|
||||
|
||||
static u16 FactoryGetWinStreak(u8 battleMode, u8 lvlMode)
|
||||
static u16 FactoryGetWinStreak(u8 battleMode, enum FrontierLevelMode lvlMode)
|
||||
{
|
||||
u16 winStreak = gSaveBlock2Ptr->frontier.factoryWinStreaks[battleMode][lvlMode];
|
||||
if (winStreak > MAX_STREAK)
|
||||
|
|
@ -1442,7 +1442,7 @@ static u16 FactoryGetWinStreak(u8 battleMode, u8 lvlMode)
|
|||
return winStreak;
|
||||
}
|
||||
|
||||
static u16 FactoryGetRentsCount(u8 battleMode, u8 lvlMode)
|
||||
static u16 FactoryGetRentsCount(u8 battleMode, enum FrontierLevelMode lvlMode)
|
||||
{
|
||||
u16 rents = gSaveBlock2Ptr->frontier.factoryRentsCount[battleMode][lvlMode];
|
||||
if (rents > MAX_STREAK)
|
||||
|
|
@ -1451,7 +1451,7 @@ static u16 FactoryGetRentsCount(u8 battleMode, u8 lvlMode)
|
|||
return rents;
|
||||
}
|
||||
|
||||
static void FactoryPrintPrevOrCurrentStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 x3, u8 y)
|
||||
static void FactoryPrintPrevOrCurrentStreak(u8 battleMode, enum FrontierLevelMode lvlMode, u8 x1, u8 x2, u8 x3, u8 y)
|
||||
{
|
||||
bool8 isCurrent;
|
||||
u16 winStreak = FactoryGetWinStreak(battleMode, lvlMode);
|
||||
|
|
@ -1513,13 +1513,13 @@ static void PyramidPrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y)
|
|||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SKIP_DRAW, NULL);
|
||||
}
|
||||
|
||||
static void PyramidPrintRecordStreak(u8 lvlMode, u8 x1, u8 x2, u8 y)
|
||||
static void PyramidPrintRecordStreak(enum FrontierLevelMode lvlMode, u8 x1, u8 x2, u8 y)
|
||||
{
|
||||
u16 num = gSaveBlock2Ptr->frontier.pyramidRecordStreaks[lvlMode];
|
||||
PyramidPrintStreak(gText_Record, num, x1, x2, y);
|
||||
}
|
||||
|
||||
static u16 PyramidGetWinStreak(u8 lvlMode)
|
||||
static u16 PyramidGetWinStreak(enum FrontierLevelMode lvlMode)
|
||||
{
|
||||
u16 winStreak = gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvlMode];
|
||||
if (winStreak > MAX_STREAK)
|
||||
|
|
@ -1528,7 +1528,7 @@ static u16 PyramidGetWinStreak(u8 lvlMode)
|
|||
return winStreak;
|
||||
}
|
||||
|
||||
static void PyramidPrintPrevOrCurrentStreak(u8 lvlMode, u8 x1, u8 x2, u8 y)
|
||||
static void PyramidPrintPrevOrCurrentStreak(enum FrontierLevelMode lvlMode, u8 x1, u8 x2, u8 y)
|
||||
{
|
||||
bool8 isCurrent;
|
||||
u16 winStreak = PyramidGetWinStreak(lvlMode);
|
||||
|
|
@ -2043,7 +2043,7 @@ static void AppendCaughtBannedMonSpeciesName(u16 species, u8 count, s32 numBanne
|
|||
StringAppend(gStringVar1, GetSpeciesName(species));
|
||||
}
|
||||
|
||||
static void AppendIfValid(u16 species, u16 heldItem, u16 hp, u8 lvlMode, u8 monLevel, u16 *speciesArray, u16 *itemsArray, u8 *count)
|
||||
static void AppendIfValid(u16 species, u16 heldItem, u16 hp, enum FrontierLevelMode lvlMode, u8 monLevel, u16 *speciesArray, u16 *itemsArray, u8 *count)
|
||||
{
|
||||
s32 i = 0;
|
||||
|
||||
|
|
@ -3269,7 +3269,7 @@ u8 SetFacilityPtrsGetLevel(void)
|
|||
}
|
||||
}
|
||||
|
||||
u8 GetFrontierEnemyMonLevel(u8 lvlMode)
|
||||
u8 GetFrontierEnemyMonLevel(enum FrontierLevelMode lvlMode)
|
||||
{
|
||||
u8 level;
|
||||
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ void TVShowConvertInternationalString(u8 *dest, const u8 *src, int language)
|
|||
}
|
||||
|
||||
// It's impossible to distinguish between Latin languages just from a string alone, so the function defaults to LANGUAGE_ENGLISH. This is the case in all of the versions of the game.
|
||||
int GetNicknameLanguage(u8 *str)
|
||||
enum Language GetNicknameLanguage(u8 *str)
|
||||
{
|
||||
if (str[0] == EXT_CTRL_CODE_BEGIN && str[1] == EXT_CTRL_CODE_JPN)
|
||||
return LANGUAGE_JAPANESE;
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ enum {
|
|||
#define TIMER_POKEBALL_FADE 28
|
||||
#define TIMER_START_LEGENDARIES 43
|
||||
|
||||
static EWRAM_DATA u16 sIntroCharacterGender = 0;
|
||||
static EWRAM_DATA enum Gender sIntroCharacterGender = 0;
|
||||
static EWRAM_DATA u16 sFlygonYOffset = 0;
|
||||
|
||||
COMMON_DATA u32 gIntroFrameCounter = 0;
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ static void Task_UseItemfinder(u8);
|
|||
static void Task_CloseItemfinderMessage(u8);
|
||||
static void Task_HiddenItemNearby(u8);
|
||||
static void Task_StandingOnHiddenItem(u8);
|
||||
static void PlayerFaceHiddenItem(u8);
|
||||
static void PlayerFaceHiddenItem(enum Direction);
|
||||
static void CheckForHiddenItemsInMapConnection(u8);
|
||||
static void Task_OpenRegisteredPokeblockCase(u8);
|
||||
static void Task_AccessPokemonBoxLink(u8);
|
||||
|
|
@ -621,7 +621,7 @@ static void SetDistanceOfClosestHiddenItem(u8 taskId, s16 itemDistanceX, s16 ite
|
|||
}
|
||||
}
|
||||
|
||||
u8 GetDirectionToHiddenItem(s16 itemDistanceX, s16 itemDistanceY)
|
||||
enum Direction GetDirectionToHiddenItem(s16 itemDistanceX, s16 itemDistanceY)
|
||||
{
|
||||
s16 absX, absY;
|
||||
|
||||
|
|
@ -667,7 +667,7 @@ u8 GetDirectionToHiddenItem(s16 itemDistanceX, s16 itemDistanceY)
|
|||
}
|
||||
}
|
||||
|
||||
static void PlayerFaceHiddenItem(u8 direction)
|
||||
static void PlayerFaceHiddenItem(enum Direction direction)
|
||||
{
|
||||
ObjectEventClearHeldMovementIfFinished(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0)]);
|
||||
ObjectEventClearHeldMovement(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0)]);
|
||||
|
|
|
|||
18
src/link.c
18
src/link.c
|
|
@ -734,7 +734,7 @@ u8 GetLinkPlayerCount(void)
|
|||
return EXTRACT_PLAYER_COUNT(gLinkStatus);
|
||||
}
|
||||
|
||||
static int AreAnyLinkPlayersUsingVersions(u32 version1, u32 version2)
|
||||
static int AreAnyLinkPlayersUsingVersions(enum GameVersion version1, enum GameVersion version2)
|
||||
{
|
||||
int i;
|
||||
u8 nPlayers;
|
||||
|
|
@ -765,23 +765,13 @@ static bool32 UNUSED IsFullLinkGroupWithNoRS(void)
|
|||
|
||||
bool32 Link_AnyPartnersPlayingRubyOrSapphire(void)
|
||||
{
|
||||
if (AreAnyLinkPlayersUsingVersions(VERSION_RUBY, VERSION_SAPPHIRE) >= 0)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
return (AreAnyLinkPlayersUsingVersions(VERSION_RUBY, VERSION_SAPPHIRE) >= 0);
|
||||
}
|
||||
|
||||
bool32 Link_AnyPartnersPlayingFRLG_JP(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = AreAnyLinkPlayersUsingVersions(VERSION_FIRE_RED, VERSION_LEAF_GREEN);
|
||||
if (i >= 0 && gLinkPlayers[i].language == LANGUAGE_JAPANESE)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
int i = AreAnyLinkPlayersUsingVersions(VERSION_FIRE_RED, VERSION_LEAF_GREEN);
|
||||
return (i >= 0 && gLinkPlayers[i].language == LANGUAGE_JAPANESE);
|
||||
}
|
||||
|
||||
void OpenLinkTimed(void)
|
||||
|
|
|
|||
|
|
@ -36,9 +36,9 @@ static void IntrDummy(void);
|
|||
extern void gInitialMainCB2(void);
|
||||
extern void CB2_FlashNotDetectedScreen(void);
|
||||
|
||||
const u8 gGameVersion = GAME_VERSION;
|
||||
const enum GameVersion gGameVersion = GAME_VERSION;
|
||||
|
||||
const u8 gGameLanguage = GAME_LANGUAGE; // English
|
||||
const enum Language gGameLanguage = GAME_LANGUAGE; // English
|
||||
|
||||
const char BuildDateTime[] = "2005 02 21 11:10";
|
||||
|
||||
|
|
|
|||
|
|
@ -1518,11 +1518,12 @@ static void Task_NewGameBirchSpeech_WaitToShowGenderMenu(u8 taskId)
|
|||
|
||||
static void Task_NewGameBirchSpeech_ChooseGender(u8 taskId)
|
||||
{
|
||||
int gender = NewGameBirchSpeech_ProcessGenderMenuInput();
|
||||
int gender2;
|
||||
enum Gender gender = NewGameBirchSpeech_ProcessGenderMenuInput();
|
||||
enum Gender gender2;
|
||||
|
||||
switch (gender)
|
||||
{
|
||||
default:
|
||||
case MALE:
|
||||
PlaySE(SE_SELECT);
|
||||
gSaveBlock2Ptr->playerGender = gender;
|
||||
|
|
|
|||
|
|
@ -786,7 +786,7 @@ void SanitizeMauvilleOldManForRuby(union OldMan *oldMan)
|
|||
}
|
||||
}
|
||||
|
||||
static void UNUSED SetMauvilleOldManLanguage(union OldMan *oldMan, u32 language1, u32 language2, u32 language3)
|
||||
static void UNUSED SetMauvilleOldManLanguage(union OldMan *oldMan, enum Language language1, enum Language language2, enum Language language3)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
|
|
@ -851,7 +851,7 @@ static void UNUSED SetMauvilleOldManLanguage(union OldMan *oldMan, u32 language1
|
|||
}
|
||||
}
|
||||
|
||||
void SanitizeReceivedEmeraldOldMan(union OldMan *oldMan, u32 version, u32 language)
|
||||
void SanitizeReceivedEmeraldOldMan(union OldMan *oldMan, enum Language language)
|
||||
{
|
||||
u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
s32 i;
|
||||
|
|
@ -874,7 +874,7 @@ void SanitizeReceivedEmeraldOldMan(union OldMan *oldMan, u32 version, u32 langua
|
|||
}
|
||||
}
|
||||
|
||||
void SanitizeReceivedRubyOldMan(union OldMan *oldMan, u32 version, u32 language)
|
||||
void SanitizeReceivedRubyOldMan(union OldMan *oldMan, enum GameVersion version, enum Language language)
|
||||
{
|
||||
bool32 isRuby = (version == VERSION_SAPPHIRE || version == VERSION_RUBY);
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
static void StartORASDowseFieldEffect(void);
|
||||
static void UpdateORASDowsingFieldEffect(struct Sprite *sprite);
|
||||
static void ChangeDowsingColor(u8 direction, struct Sprite *sprite);
|
||||
static void ChangeDowsingColor(enum Direction direction, struct Sprite *sprite);
|
||||
static void ClearDowsingColor(struct Sprite *sprite);
|
||||
static void PlayDowseSound(u32 dowseState);
|
||||
|
||||
|
|
@ -396,8 +396,8 @@ void UpdateDowseState(struct Sprite *sprite)
|
|||
{
|
||||
s8 distX = sprite->tItemDistanceX;
|
||||
s8 distY = sprite->tItemDistanceY;
|
||||
u8 directionToItem = CARDINAL_DIRECTION_COUNT;
|
||||
u8 playerDirToItem = GetDirectionToHiddenItem(distX, distY);
|
||||
enum Direction directionToItem = CARDINAL_DIRECTION_COUNT;
|
||||
enum Direction playerDirToItem = GetDirectionToHiddenItem(distX, distY);
|
||||
if (playerDirToItem != DIR_NONE)
|
||||
directionToItem = sClockwiseDirections[GetDirectionToHiddenItem(distX, distY) - 1];
|
||||
|
||||
|
|
@ -434,7 +434,7 @@ void UpdateDowseState(struct Sprite *sprite)
|
|||
UpdateDowsingAnimDirection(sprite, playerObj);
|
||||
}
|
||||
|
||||
static void ChangeDowsingColor(u8 direction, struct Sprite *sprite)
|
||||
static void ChangeDowsingColor(enum Direction direction, struct Sprite *sprite)
|
||||
{
|
||||
s16 distance;
|
||||
u16 color = I_ORAS_DOWSING_COLOR_NONE;
|
||||
|
|
|
|||
|
|
@ -142,9 +142,9 @@ static void ClearAllPlayerKeys(void);
|
|||
static void ResetAllPlayerLinkStates(void);
|
||||
static void UpdateHeldKeyCode(u16);
|
||||
static void UpdateAllLinkPlayers(u16 *, s32);
|
||||
static u8 FlipVerticalAndClearForced(u8, u8);
|
||||
static u8 LinkPlayerGetCollision(u8, u8, s16, s16);
|
||||
static void CreateLinkPlayerSprite(u8, u8);
|
||||
static enum Direction FlipVerticalAndClearForced(u8, u8);
|
||||
static u8 LinkPlayerGetCollision(u8, enum Direction, s16, s16);
|
||||
static void CreateLinkPlayerSprite(u8, enum GameVersion);
|
||||
static void GetLinkPlayerCoords(u8, s16 *, s16 *);
|
||||
static u8 GetLinkPlayerFacingDirection(u8);
|
||||
static u8 GetLinkPlayerElevation(u8);
|
||||
|
|
@ -182,7 +182,7 @@ static void SetFieldVBlankCallback(void);
|
|||
static void FieldClearVBlankHBlankCallbacks(void);
|
||||
static void TransitionMapMusic(void);
|
||||
static u8 GetAdjustedInitialTransitionFlags(struct InitialPlayerAvatarState *playerStruct, u16 metatileBehavior, enum MapType mapType);
|
||||
static u8 GetAdjustedInitialDirection(struct InitialPlayerAvatarState *playerStruct, u8 transitionFlags, u16 metatileBehavior, enum MapType mapType);
|
||||
static enum Direction GetAdjustedInitialDirection(struct InitialPlayerAvatarState *playerStruct, u8 transitionFlags, u16 metatileBehavior, enum MapType mapType);
|
||||
static u16 GetCenterScreenMetatileBehavior(void);
|
||||
|
||||
static void *sUnusedOverworldCallback;
|
||||
|
|
@ -332,23 +332,23 @@ static const struct ScanlineEffectParams sFlashEffectParams =
|
|||
0,
|
||||
};
|
||||
|
||||
static u8 MovementEventModeCB_Normal(struct LinkPlayerObjectEvent *, struct ObjectEvent *, u8);
|
||||
static u8 MovementEventModeCB_Ignored(struct LinkPlayerObjectEvent *, struct ObjectEvent *, u8);
|
||||
static u8 MovementEventModeCB_Scripted(struct LinkPlayerObjectEvent *, struct ObjectEvent *, u8);
|
||||
static u8 MovementEventModeCB_Normal(struct LinkPlayerObjectEvent *, struct ObjectEvent *, enum Direction);
|
||||
static u8 MovementEventModeCB_Ignored(struct LinkPlayerObjectEvent *, struct ObjectEvent *, enum Direction);
|
||||
static u8 MovementEventModeCB_Scripted(struct LinkPlayerObjectEvent *, struct ObjectEvent *, enum Direction);
|
||||
|
||||
static u8 (*const sLinkPlayerMovementModes[])(struct LinkPlayerObjectEvent *, struct ObjectEvent *, u8) =
|
||||
static u8 (*const sLinkPlayerMovementModes[])(struct LinkPlayerObjectEvent *, struct ObjectEvent *, enum Direction) =
|
||||
{
|
||||
[MOVEMENT_MODE_FREE] = MovementEventModeCB_Normal,
|
||||
[MOVEMENT_MODE_FROZEN] = MovementEventModeCB_Ignored,
|
||||
[MOVEMENT_MODE_SCRIPTED] = MovementEventModeCB_Scripted,
|
||||
};
|
||||
|
||||
static u8 FacingHandler_DoNothing(struct LinkPlayerObjectEvent *, struct ObjectEvent *, u8);
|
||||
static u8 FacingHandler_DpadMovement(struct LinkPlayerObjectEvent *, struct ObjectEvent *, u8);
|
||||
static u8 FacingHandler_ForcedFacingChange(struct LinkPlayerObjectEvent *, struct ObjectEvent *, u8);
|
||||
static u8 FacingHandler_DoNothing(struct LinkPlayerObjectEvent *, struct ObjectEvent *, enum Direction);
|
||||
static u8 FacingHandler_DpadMovement(struct LinkPlayerObjectEvent *, struct ObjectEvent *, enum Direction);
|
||||
static u8 FacingHandler_ForcedFacingChange(struct LinkPlayerObjectEvent *, struct ObjectEvent *, enum Direction);
|
||||
|
||||
// These handlers return TRUE if the movement was scripted and successful, and FALSE otherwise.
|
||||
static bool8 (*const sLinkPlayerFacingHandlers[])(struct LinkPlayerObjectEvent *, struct ObjectEvent *, u8) =
|
||||
static bool8 (*const sLinkPlayerFacingHandlers[])(struct LinkPlayerObjectEvent *, struct ObjectEvent *, enum Direction) =
|
||||
{
|
||||
FacingHandler_DoNothing,
|
||||
FacingHandler_DpadMovement,
|
||||
|
|
@ -803,7 +803,7 @@ const struct MapConnection *GetMapConnection(u8 dir)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static bool8 SetDiveWarp(u8 dir, u16 x, u16 y)
|
||||
static bool8 SetDiveWarp(enum Connection dir, u16 x, u16 y)
|
||||
{
|
||||
const struct MapConnection *connection = GetMapConnection(dir);
|
||||
|
||||
|
|
@ -998,7 +998,7 @@ static u8 GetAdjustedInitialTransitionFlags(struct InitialPlayerAvatarState *pla
|
|||
return PLAYER_AVATAR_FLAG_ACRO_BIKE;
|
||||
}
|
||||
|
||||
static u8 GetAdjustedInitialDirection(struct InitialPlayerAvatarState *playerStruct, u8 transitionFlags, u16 metatileBehavior, enum MapType mapType)
|
||||
static enum Direction GetAdjustedInitialDirection(struct InitialPlayerAvatarState *playerStruct, u8 transitionFlags, u16 metatileBehavior, enum MapType mapType)
|
||||
{
|
||||
if (FlagGet(FLAG_SYS_CRUISE_MODE) && mapType == MAP_TYPE_OCEAN_ROUTE)
|
||||
return DIR_EAST;
|
||||
|
|
@ -3226,7 +3226,7 @@ static void InitLinkPlayerObjectEventPos(struct ObjectEvent *objEvent, s16 x, s1
|
|||
ObjectEventUpdateElevation(objEvent, NULL);
|
||||
}
|
||||
|
||||
static void UNUSED SetLinkPlayerObjectRange(u8 linkPlayerId, u8 dir)
|
||||
static void UNUSED SetLinkPlayerObjectRange(u8 linkPlayerId, enum Direction dir)
|
||||
{
|
||||
if (gLinkPlayerObjectEvents[linkPlayerId].active)
|
||||
{
|
||||
|
|
@ -3327,28 +3327,28 @@ static void SetPlayerFacingDirection(u8 linkPlayerId, u8 facing)
|
|||
}
|
||||
|
||||
|
||||
static u8 MovementEventModeCB_Normal(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
|
||||
static u8 MovementEventModeCB_Normal(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, enum Direction dir)
|
||||
{
|
||||
return sLinkPlayerFacingHandlers[dir](linkPlayerObjEvent, objEvent, dir);
|
||||
}
|
||||
|
||||
static u8 MovementEventModeCB_Ignored(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
|
||||
static u8 MovementEventModeCB_Ignored(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, enum Direction dir)
|
||||
{
|
||||
return FACING_UP;
|
||||
}
|
||||
|
||||
// Identical to MovementEventModeCB_Normal
|
||||
static u8 MovementEventModeCB_Scripted(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
|
||||
static u8 MovementEventModeCB_Scripted(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, enum Direction dir)
|
||||
{
|
||||
return sLinkPlayerFacingHandlers[dir](linkPlayerObjEvent, objEvent, dir);
|
||||
}
|
||||
|
||||
static bool8 FacingHandler_DoNothing(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
|
||||
static bool8 FacingHandler_DoNothing(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, enum Direction dir)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static bool8 FacingHandler_DpadMovement(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
|
||||
static bool8 FacingHandler_DpadMovement(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, enum Direction dir)
|
||||
{
|
||||
s16 x, y;
|
||||
|
||||
|
|
@ -3368,7 +3368,7 @@ static bool8 FacingHandler_DpadMovement(struct LinkPlayerObjectEvent *linkPlayer
|
|||
}
|
||||
}
|
||||
|
||||
static bool8 FacingHandler_ForcedFacingChange(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
|
||||
static bool8 FacingHandler_ForcedFacingChange(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, enum Direction dir)
|
||||
{
|
||||
linkDirection(objEvent) = FlipVerticalAndClearForced(dir, linkDirection(objEvent));
|
||||
return FALSE;
|
||||
|
|
@ -3395,7 +3395,7 @@ static void MovementStatusHandler_TryAdvanceScript(struct LinkPlayerObjectEvent
|
|||
// Flip Up/Down facing codes. If newFacing doesn't specify a direction, default
|
||||
// to oldFacing. Note that this clears also the "FORCED" part of the facing code,
|
||||
// even for Left/Right codes.
|
||||
static u8 FlipVerticalAndClearForced(u8 newFacing, u8 oldFacing)
|
||||
static enum Direction FlipVerticalAndClearForced(u8 newFacing, u8 oldFacing)
|
||||
{
|
||||
switch (newFacing)
|
||||
{
|
||||
|
|
@ -3415,7 +3415,7 @@ static u8 FlipVerticalAndClearForced(u8 newFacing, u8 oldFacing)
|
|||
return oldFacing;
|
||||
}
|
||||
|
||||
static u8 LinkPlayerGetCollision(u8 selfObjEventId, u8 direction, s16 x, s16 y)
|
||||
static u8 LinkPlayerGetCollision(u8 selfObjEventId, enum Direction direction, s16 x, s16 y)
|
||||
{
|
||||
u8 i;
|
||||
for (i = 0; i < OBJECT_EVENTS_COUNT; i++)
|
||||
|
|
@ -3432,7 +3432,7 @@ static u8 LinkPlayerGetCollision(u8 selfObjEventId, u8 direction, s16 x, s16 y)
|
|||
return MapGridGetCollisionAt(x, y);
|
||||
}
|
||||
|
||||
static void CreateLinkPlayerSprite(u8 linkPlayerId, u8 gameVersion)
|
||||
static void CreateLinkPlayerSprite(u8 linkPlayerId, enum GameVersion gameVersion)
|
||||
{
|
||||
struct LinkPlayerObjectEvent *linkPlayerObjEvent = &gLinkPlayerObjectEvents[linkPlayerId];
|
||||
u8 objEventId = linkPlayerObjEvent->objEventId;
|
||||
|
|
@ -3454,6 +3454,8 @@ static void CreateLinkPlayerSprite(u8 linkPlayerId, u8 gameVersion)
|
|||
case VERSION_EMERALD:
|
||||
objEvent->spriteId = CreateObjectGraphicsSprite(GetRivalAvatarGraphicsIdByStateIdAndGender(PLAYER_AVATAR_STATE_NORMAL, linkGender(objEvent)), SpriteCB_LinkPlayer, 0, 0, 0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
sprite = &gSprites[objEvent->spriteId];
|
||||
|
|
|
|||
|
|
@ -1408,7 +1408,7 @@ s16 GetPokeblockData(const struct Pokeblock *pokeblock, u8 field)
|
|||
|
||||
s16 PokeblockGetGain(u8 nature, const struct Pokeblock *pokeblock)
|
||||
{
|
||||
u8 flavor;
|
||||
enum Flavor flavor;
|
||||
s16 curGain, totalGain = 0;
|
||||
|
||||
for (flavor = 0; flavor < FLAVOR_COUNT; flavor++)
|
||||
|
|
|
|||
|
|
@ -1256,7 +1256,7 @@ void CreateBattleTowerMon(struct Pokemon *mon, struct BattleTowerPokemon *src)
|
|||
{
|
||||
s32 i;
|
||||
u8 nickname[max(32, POKEMON_NAME_BUFFER_SIZE)];
|
||||
u8 language;
|
||||
enum Language language;
|
||||
u8 value;
|
||||
|
||||
CreateMon(mon, src->species, src->level, src->personality, OTID_STRUCT_PRESET(src->otId));
|
||||
|
|
@ -1311,7 +1311,7 @@ void CreateBattleTowerMon_HandleLevel(struct Pokemon *mon, struct BattleTowerPok
|
|||
s32 i;
|
||||
u8 nickname[max(32, POKEMON_NAME_BUFFER_SIZE)];
|
||||
u8 level;
|
||||
u8 language;
|
||||
enum Language language;
|
||||
u8 value;
|
||||
|
||||
if (gSaveBlock2Ptr->frontier.lvlMode != FRONTIER_LVL_50)
|
||||
|
|
@ -5972,13 +5972,13 @@ bool8 IsMonSpriteNotFlipped(u16 species)
|
|||
return gSpeciesInfo[species].noFlip;
|
||||
}
|
||||
|
||||
s8 GetMonFlavorRelation(struct Pokemon *mon, u8 flavor)
|
||||
s8 GetMonFlavorRelation(struct Pokemon *mon, enum Flavor flavor)
|
||||
{
|
||||
u8 nature = GetNature(mon);
|
||||
return gPokeblockFlavorCompatibilityTable[nature * FLAVOR_COUNT + flavor];
|
||||
}
|
||||
|
||||
s8 GetFlavorRelationByPersonality(u32 personality, u8 flavor)
|
||||
s8 GetFlavorRelationByPersonality(u32 personality, enum Flavor flavor)
|
||||
{
|
||||
u8 nature = GetNatureFromPersonality(personality);
|
||||
return gPokeblockFlavorCompatibilityTable[nature * FLAVOR_COUNT + flavor];
|
||||
|
|
@ -6333,7 +6333,7 @@ enum TrainerPicID FacilityClassToPicIndex(u16 facilityClass)
|
|||
return gFacilityClassToPicIndex[facilityClass];
|
||||
}
|
||||
|
||||
enum TrainerPicID PlayerGenderToFrontTrainerPicId(u8 playerGender)
|
||||
enum TrainerPicID PlayerGenderToFrontTrainerPicId(enum Gender playerGender)
|
||||
{
|
||||
if (playerGender != MALE)
|
||||
return FacilityClassToPicIndex(FACILITY_CLASS_MAY);
|
||||
|
|
|
|||
|
|
@ -630,7 +630,7 @@ static void ShufflePlayerIndices(u32 *data)
|
|||
|
||||
static void ReceiveOldManData(OldMan *records, size_t recordSize, u8 multiplayerId)
|
||||
{
|
||||
u8 version;
|
||||
enum GameVersion version;
|
||||
u16 language;
|
||||
OldMan *oldMan;
|
||||
u32 mixIndices[MAX_LINK_PLAYERS];
|
||||
|
|
@ -643,7 +643,7 @@ static void ReceiveOldManData(OldMan *records, size_t recordSize, u8 multiplayer
|
|||
if (Link_AnyPartnersPlayingRubyOrSapphire())
|
||||
SanitizeReceivedRubyOldMan(oldMan, version, language);
|
||||
else
|
||||
SanitizeReceivedEmeraldOldMan(oldMan, version, language);
|
||||
SanitizeReceivedEmeraldOldMan(oldMan, language);
|
||||
|
||||
memcpy(sOldManSave, (void *)records + recordSize * mixIndices[multiplayerId], sizeof(OldMan));
|
||||
ResetMauvilleOldManFlag();
|
||||
|
|
@ -787,7 +787,8 @@ static void ReceiveDaycareMailData(struct RecordMixingDaycareMail *records, size
|
|||
anyRS = Link_AnyPartnersPlayingRubyOrSapphire();
|
||||
for (i = 0; i < GetLinkPlayerCount(); i++)
|
||||
{
|
||||
u32 language, version;
|
||||
enum Language language;
|
||||
enum GameVersion version;
|
||||
|
||||
mixMail = (void *)records + i * recordSize;
|
||||
language = gLinkPlayers[i].language;
|
||||
|
|
@ -795,7 +796,7 @@ static void ReceiveDaycareMailData(struct RecordMixingDaycareMail *records, size
|
|||
|
||||
for (j = 0; j < mixMail->numDaycareMons; j++)
|
||||
{
|
||||
u16 otNameLanguage, nicknameLanguage;
|
||||
enum Language otNameLanguage, nicknameLanguage;
|
||||
struct DaycareMail *daycareMail = &mixMail->mail[j];
|
||||
|
||||
if (daycareMail->message.itemId == ITEM_NONE)
|
||||
|
|
|
|||
|
|
@ -911,7 +911,7 @@ static void RotatingGate_TriggerRotationAnimation(u8 gateId, s32 rotationDirecti
|
|||
}
|
||||
}
|
||||
|
||||
static u8 RotatingGate_GetRotationInfo(u8 direction, s16 x, s16 y)
|
||||
static u8 RotatingGate_GetRotationInfo(enum Direction direction, s16 x, s16 y)
|
||||
{
|
||||
const u8 *ptr;
|
||||
|
||||
|
|
@ -957,7 +957,7 @@ void RotatingGate_InitPuzzleAndGraphics(void)
|
|||
}
|
||||
}
|
||||
|
||||
bool32 CheckForRotatingGatePuzzleCollision(u8 direction, s16 x, s16 y)
|
||||
bool32 CheckForRotatingGatePuzzleCollision(enum Direction direction, s16 x, s16 y)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
|
|
@ -995,7 +995,7 @@ bool32 CheckForRotatingGatePuzzleCollision(u8 direction, s16 x, s16 y)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
bool32 CheckForRotatingGatePuzzleCollisionWithoutAnimation(u8 direction, s16 x, s16 y)
|
||||
bool32 CheckForRotatingGatePuzzleCollisionWithoutAnimation(enum Direction direction, s16 x, s16 y)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ void TurnRotatingTileObjects(void)
|
|||
if (objectEventId != OBJECT_EVENTS_COUNT)
|
||||
{
|
||||
const u8 *movementScript;
|
||||
u8 direction = gObjectEvents[objectEventId].facingDirection;
|
||||
enum Direction direction = gObjectEvents[objectEventId].facingDirection;
|
||||
if (rotation == ROTATE_COUNTERCLOCKWISE)
|
||||
{
|
||||
switch (direction)
|
||||
|
|
|
|||
|
|
@ -1542,6 +1542,8 @@ bool8 ScrCmd_faceplayer(struct ScriptContext *ctx)
|
|||
case DIR_WEST:
|
||||
ScriptMovement_StartObjectMovementScript(OBJ_EVENT_ID_NPC_FOLLOWER, npcFollower->mapGroup, npcFollower->mapNum, Common_Movement_FaceLeft);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -1553,7 +1555,7 @@ bool8 ScrCmd_faceplayer(struct ScriptContext *ctx)
|
|||
bool8 ScrCmd_turnobject(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 localId = VarGet(ScriptReadHalfword(ctx));
|
||||
u8 direction = ScriptReadByte(ctx);
|
||||
enum Direction direction = ScriptReadByte(ctx);
|
||||
|
||||
Script_RequestEffects(SCREFF_V1 | SCREFF_HARDWARE);
|
||||
|
||||
|
|
@ -1579,7 +1581,7 @@ bool8 ScrCmd_createvobject(struct ScriptContext *ctx)
|
|||
u16 x = VarGet(ScriptReadHalfword(ctx));
|
||||
u16 y = VarGet(ScriptReadHalfword(ctx));
|
||||
u8 elevation = ScriptReadByte(ctx);
|
||||
u8 direction = ScriptReadByte(ctx);
|
||||
enum Direction direction = ScriptReadByte(ctx);
|
||||
|
||||
Script_RequestEffects(SCREFF_V1 | SCREFF_HARDWARE);
|
||||
|
||||
|
|
@ -1590,7 +1592,7 @@ bool8 ScrCmd_createvobject(struct ScriptContext *ctx)
|
|||
bool8 ScrCmd_turnvobject(struct ScriptContext *ctx)
|
||||
{
|
||||
u8 virtualObjId = ScriptReadByte(ctx);
|
||||
u8 direction = ScriptReadByte(ctx);
|
||||
enum Direction direction = ScriptReadByte(ctx);
|
||||
|
||||
Script_RequestEffects(SCREFF_V1 | SCREFF_HARDWARE);
|
||||
|
||||
|
|
|
|||
|
|
@ -1332,7 +1332,7 @@ void SecretBasePerStepCallback(u8 taskId)
|
|||
#undef tPlayerY
|
||||
#undef tFldEff
|
||||
|
||||
static void SaveSecretBase(u8 secretBaseIdx, struct SecretBase *secretBase, u32 version, u32 language)
|
||||
static void SaveSecretBase(u8 secretBaseIdx, struct SecretBase *secretBase, enum GameVersion version, enum Language language)
|
||||
{
|
||||
int stringLength;
|
||||
u8 *name;
|
||||
|
|
|
|||
|
|
@ -1390,7 +1390,7 @@ static void Task_SaveAfterLinkBattle(u8 taskId)
|
|||
static void ShowSaveInfoWindow(void)
|
||||
{
|
||||
struct WindowTemplate saveInfoWindow = sSaveInfoWindowTemplate;
|
||||
u8 gender;
|
||||
enum Gender gender;
|
||||
u8 color;
|
||||
u32 xOffset;
|
||||
u32 yOffset;
|
||||
|
|
@ -1407,9 +1407,7 @@ static void ShowSaveInfoWindow(void)
|
|||
color = TEXT_COLOR_RED; // Red when female, blue when male.
|
||||
|
||||
if (gender == MALE)
|
||||
{
|
||||
color = TEXT_COLOR_BLUE;
|
||||
}
|
||||
|
||||
// Print region name
|
||||
yOffset = 1;
|
||||
|
|
|
|||
|
|
@ -772,7 +772,7 @@ s32 StringCompareWithoutExtCtrlCodes(const u8 *str1, const u8 *str2)
|
|||
return retVal;
|
||||
}
|
||||
|
||||
void ConvertInternationalString(u8 *s, u8 language)
|
||||
void ConvertInternationalString(u8 *s, enum Language language)
|
||||
{
|
||||
if (language == LANGUAGE_JAPANESE)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2446,7 +2446,7 @@ s32 GetGameProgressForLinkTrade(void)
|
|||
// The usage of this value is a little unusual given it's treated as a bool,
|
||||
// but it's the result of its usage in FRLG, where 0 is FRLG, 1 is RS, and 2 is Emerald.
|
||||
s32 versionId; // 0: RSE, 2: FRLG
|
||||
u16 version;
|
||||
enum GameVersion version;
|
||||
|
||||
if (gReceivedRemoteLinkPlayers)
|
||||
{
|
||||
|
|
@ -2488,7 +2488,7 @@ int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct Rf
|
|||
bool8 playerCanLinkNationally = player.canLinkNationally;
|
||||
bool8 partnerHasNationalDex = partner.hasNationalDex;
|
||||
bool8 partnerCanLinkNationally = partner.canLinkNationally;
|
||||
u8 partnerVersion = partner.version;
|
||||
enum GameVersion partnerVersion = partner.version;
|
||||
|
||||
// If partner is not using Emerald, both players must have progressed the story
|
||||
// to a certain point (becoming champion in RSE, finishing the Sevii islands in FRLG)
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ static u8 GetRubyTrainerStars(struct TrainerCard *);
|
|||
static u16 GetCaughtMonsCount(void);
|
||||
static void SetPlayerCardData(struct TrainerCard *, u8);
|
||||
static void TrainerCard_GenerateCardForPlayer(struct TrainerCard *);
|
||||
static u8 VersionToCardType(u8);
|
||||
static u8 VersionToCardType(enum GameVersion);
|
||||
static void SetDataFromTrainerCard(void);
|
||||
static void InitGpuRegs(void);
|
||||
static void ResetGpuRegs(void);
|
||||
|
|
@ -1870,7 +1870,7 @@ static u8 GetSetCardType(void)
|
|||
}
|
||||
}
|
||||
|
||||
static u8 VersionToCardType(u8 version)
|
||||
static u8 VersionToCardType(enum GameVersion version)
|
||||
{
|
||||
if (version == VERSION_FIRE_RED || version == VERSION_LEAF_GREEN)
|
||||
return CARD_TYPE_FRLG;
|
||||
|
|
|
|||
|
|
@ -348,7 +348,7 @@ u16 CreateTrainerCardTrainerPicSprite(u16 species, bool8 isFrontPic, u16 destX,
|
|||
return CreateTrainerCardSprite(species, FALSE, 0, isFrontPic, destX, destY, paletteSlot, windowId, TRUE);
|
||||
}
|
||||
|
||||
u16 PlayerGenderToFrontTrainerPicId_Debug(u8 gender, bool8 getClass)
|
||||
u16 PlayerGenderToFrontTrainerPicId_Debug(enum Gender gender, bool8 getClass)
|
||||
{
|
||||
if (getClass == TRUE)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
// this file's functions
|
||||
static u8 CheckTrainer(u8 objectEventId);
|
||||
static u8 GetTrainerApproachDistance(struct ObjectEvent *trainerObj);
|
||||
static u8 CheckPathBetweenTrainerAndPlayer(struct ObjectEvent *trainerObj, u8 approachDistance, u8 direction);
|
||||
static u8 CheckPathBetweenTrainerAndPlayer(struct ObjectEvent *trainerObj, u8 approachDistance, enum Direction direction);
|
||||
static void InitTrainerApproachTask(struct ObjectEvent *trainerObj, u8 range);
|
||||
static void Task_RunTrainerSeeFuncList(u8 taskId);
|
||||
static void Task_EndTrainerApproach(u8 taskId);
|
||||
|
|
@ -629,12 +629,12 @@ static u8 GetTrainerApproachDistanceEast(struct ObjectEvent *trainerObj, s16 ran
|
|||
return 0;
|
||||
}
|
||||
|
||||
static u8 CheckPathBetweenTrainerAndPlayer(struct ObjectEvent *trainerObj, u8 approachDistance, u8 direction)
|
||||
static u8 CheckPathBetweenTrainerAndPlayer(struct ObjectEvent *trainerObj, u8 approachDistance, enum Direction direction)
|
||||
{
|
||||
s16 x, y;
|
||||
u8 rangeX, rangeY;
|
||||
u8 i;
|
||||
u8 collision;
|
||||
enum Collision collision;
|
||||
|
||||
if (approachDistance == 0)
|
||||
return 0;
|
||||
|
|
@ -723,7 +723,7 @@ static bool8 TrainerSeeIdle(u8 taskId, struct Task *task, struct ObjectEvent *tr
|
|||
// TRSEE_EXCLAMATION
|
||||
static bool8 TrainerExclamationMark(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj)
|
||||
{
|
||||
u8 direction;
|
||||
enum Direction direction;
|
||||
|
||||
ObjectEventGetLocalIdAndMap(trainerObj, &gFieldEffectArguments[0], &gFieldEffectArguments[1], &gFieldEffectArguments[2]);
|
||||
FieldEffectStart(FLDEFF_EXCLAMATION_MARK_ICON);
|
||||
|
|
|
|||
36
src/tv.c
36
src/tv.c
|
|
@ -1108,7 +1108,7 @@ void TryPutPokemonTodayOnAir(void)
|
|||
u8 i;
|
||||
u16 ballsUsed;
|
||||
TVShow *show;
|
||||
u32 language2;
|
||||
enum Language language2;
|
||||
enum Item itemLastUsed;
|
||||
|
||||
ballsUsed = 0;
|
||||
|
|
@ -1296,7 +1296,7 @@ void PutBattleUpdateOnTheAir(u8 opponentLinkPlayerId, enum Move move, u16 specie
|
|||
}
|
||||
}
|
||||
|
||||
bool8 Put3CheersForPokeblocksOnTheAir(const u8 *partnersName, u8 flavor, u8 color, u8 sheen, u8 language)
|
||||
bool8 Put3CheersForPokeblocksOnTheAir(const u8 *partnersName, enum Flavor flavor, u8 color, u8 sheen, u8 language)
|
||||
{
|
||||
TVShow *show;
|
||||
u8 name[32];
|
||||
|
|
@ -2737,7 +2737,7 @@ void CopyContestRankToStringVar(u8 varIdx, u8 rank)
|
|||
}
|
||||
}
|
||||
|
||||
void CopyContestCategoryToStringVar(u8 varIdx, u8 category)
|
||||
void CopyContestCategoryToStringVar(u8 varIdx, enum ContestCategories category)
|
||||
{
|
||||
switch (category)
|
||||
{
|
||||
|
|
@ -2756,6 +2756,8 @@ void CopyContestCategoryToStringVar(u8 varIdx, u8 category)
|
|||
case CONTEST_CATEGORY_TOUGH:
|
||||
StringCopy(gTVStringVarPtrs[varIdx], gStdStrings[STDSTRING_TOUGH]);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3442,7 +3444,7 @@ void HideBattleTowerReporter(void)
|
|||
void ReceiveTvShowsData(void *src, u32 size, u8 playersLinkId)
|
||||
{
|
||||
u8 i;
|
||||
u16 version;
|
||||
enum GameVersion version;
|
||||
TVShow (*rmBuffer2)[MAX_LINK_PLAYERS][TV_SHOWS_COUNT];
|
||||
TVShow (*rmBuffer)[MAX_LINK_PLAYERS][TV_SHOWS_COUNT];
|
||||
|
||||
|
|
@ -4053,7 +4055,7 @@ static void TranslateRubyShows(TVShow *shows)
|
|||
}
|
||||
}
|
||||
|
||||
static u8 GetStringLanguage(u8 *str)
|
||||
static enum Language GetStringLanguage(u8 *str)
|
||||
{
|
||||
return IsStringJapanese(str) ? LANGUAGE_JAPANESE : GAME_LANGUAGE;
|
||||
}
|
||||
|
|
@ -5340,21 +5342,23 @@ static void DoTVShow3CheersForPokeblocks(void)
|
|||
case 1:
|
||||
switch (show->threeCheers.flavor)
|
||||
{
|
||||
case 0:
|
||||
case FLAVOR_SPICY:
|
||||
StringCopy(gStringVar1, gText_Spicy2);
|
||||
break;
|
||||
case 1:
|
||||
case FLAVOR_DRY:
|
||||
StringCopy(gStringVar1, gText_Dry2);
|
||||
break;
|
||||
case 2:
|
||||
case FLAVOR_SWEET:
|
||||
StringCopy(gStringVar1, gText_Sweet2);
|
||||
break;
|
||||
case 3:
|
||||
case FLAVOR_BITTER:
|
||||
StringCopy(gStringVar1, gText_Bitter2);
|
||||
break;
|
||||
case 4:
|
||||
case FLAVOR_SOUR:
|
||||
StringCopy(gStringVar1, gText_Sour2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (show->threeCheers.sheen > 24)
|
||||
{
|
||||
|
|
@ -5378,21 +5382,23 @@ static void DoTVShow3CheersForPokeblocks(void)
|
|||
case 3:
|
||||
switch (show->threeCheers.flavor)
|
||||
{
|
||||
case 0:
|
||||
case FLAVOR_SPICY:
|
||||
StringCopy(gStringVar1, gText_Spicy2);
|
||||
break;
|
||||
case 1:
|
||||
case FLAVOR_DRY:
|
||||
StringCopy(gStringVar1, gText_Dry2);
|
||||
break;
|
||||
case 2:
|
||||
case FLAVOR_SWEET:
|
||||
StringCopy(gStringVar1, gText_Sweet2);
|
||||
break;
|
||||
case 3:
|
||||
case FLAVOR_BITTER:
|
||||
StringCopy(gStringVar1, gText_Bitter2);
|
||||
break;
|
||||
case 4:
|
||||
case FLAVOR_SOUR:
|
||||
StringCopy(gStringVar1, gText_Sour2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (show->threeCheers.sheen > 16)
|
||||
|
|
|
|||
|
|
@ -2483,7 +2483,7 @@ static void Task_RunUnionRoom(u8 taskId)
|
|||
{
|
||||
u32 id = 0;
|
||||
s32 input = 0;
|
||||
s32 playerGender = MALE;
|
||||
enum Gender playerGender = MALE;
|
||||
struct WirelessLink_URoom *uroom = sWirelessLinkMain.uRoom;
|
||||
s16 *taskData = gTasks[taskId].data;
|
||||
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ void SetTilesAroundUnionRoomPlayersPassable(void)
|
|||
}
|
||||
}
|
||||
|
||||
static u8 GetNewFacingDirectionForUnionRoomPlayer(u32 memberId, u32 leaderId, struct RfuGameData *gameData)
|
||||
static enum Direction GetNewFacingDirectionForUnionRoomPlayer(u32 memberId, u32 leaderId, struct RfuGameData *gameData)
|
||||
{
|
||||
if (memberId) // If not leader
|
||||
return sMemberFacingDirections[memberId];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user