diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index dae0f6c0db..caf28afb87 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -4,7 +4,7 @@ void PlayerStep(u8 direction, u16 newKeys, u16 heldKeys); void ClearPlayerAvatarInfo(void); void SetPlayerAvatarExtraStateTransition(u16, u8); -u16 GetPlayerAvatarGenderByGraphicsId(u16); +u8 GetPlayerAvatarGenderByGraphicsId(u16); bool8 TestPlayerAvatarFlags(u8); u8 GetPlayerAvatarSpriteId(void); void PlayerGetDestCoords(s16 *, s16 *); diff --git a/include/global.h b/include/global.h index e30fcfb531..eca45bdb63 100644 --- a/include/global.h +++ b/include/global.h @@ -540,8 +540,6 @@ struct SaveBlock2 extern struct SaveBlock2 *gSaveBlock2Ptr; -extern bool8 IsAccurateGBA(void); - struct SecretBaseParty { u32 personality[PARTY_SIZE]; diff --git a/include/overworld.h b/include/overworld.h index 1bd0bdd110..adaa6aad04 100644 --- a/include/overworld.h +++ b/include/overworld.h @@ -25,10 +25,6 @@ #define MOVEMENT_MODE_SCRIPTED 2 #define SKIP_OBJECT_EVENT_LOAD 1 -#define TIME_OF_DAY_NIGHT 0 -#define TIME_OF_DAY_TWILIGHT 1 -#define TIME_OF_DAY_DAY 2 -#define TIME_OF_DAY_MAX TIME_OF_DAY_DAY struct InitialPlayerAvatarState { diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 54e43a5387..cc025591ab 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -1237,7 +1237,7 @@ u16 GetPlayerAvatarGraphicsIdByStateId(u8 state) return GetPlayerAvatarGraphicsIdByStateIdAndGender(state, gPlayerAvatar.gender); } -u16 GetPlayerAvatarGenderByGraphicsId(u16 gfxId) +u8 GetPlayerAvatarGenderByGraphicsId(u16 gfxId) { switch (gfxId) { diff --git a/src/main.c b/src/main.c index b320d676ec..69c6c7a16b 100644 --- a/src/main.c +++ b/src/main.c @@ -447,13 +447,3 @@ void ClearPokemonCrySongs(void) { CpuFill16(0, gPokemonCrySongs, MAX_POKEMON_CRIES * sizeof(struct PokemonCrySong)); } - -// TODO: Needs to be updated if compiling for a different processor than the GBA's -bool8 IsAccurateGBA(void) { // tests to see whether running on either an accurate emulator in >=2020, or real hardware - u32 code[5] = {0xFF1EE12F, 0xE1DF00B0, 0xE12FFF1E, 0xAAAABBBB, 0xCCCCDDDD}; // ARM: _;ldrh r0, [pc];bx lr - u32 func = (u32) &code[0]; - if (func & 3) // not word aligned; safer to just return false here - return FALSE; - func = (func & ~3) | 0x2; // misalign PC to test PC-relative loading - return ((u32 (*)(void)) func)() == code[3] >> 16; -}