Cleanup pt2
- Reverted GetPlayerAvatarGenderByGraphicsId return type - Removed IsAccurateGBA - Removed TIME_OF_DAY constants
This commit is contained in:
parent
e7a1c93774
commit
148641da15
5 changed files with 2 additions and 18 deletions
|
@ -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 *);
|
||||
|
|
|
@ -540,8 +540,6 @@ struct SaveBlock2
|
|||
|
||||
extern struct SaveBlock2 *gSaveBlock2Ptr;
|
||||
|
||||
extern bool8 IsAccurateGBA(void);
|
||||
|
||||
struct SecretBaseParty
|
||||
{
|
||||
u32 personality[PARTY_SIZE];
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -1237,7 +1237,7 @@ u16 GetPlayerAvatarGraphicsIdByStateId(u8 state)
|
|||
return GetPlayerAvatarGraphicsIdByStateIdAndGender(state, gPlayerAvatar.gender);
|
||||
}
|
||||
|
||||
u16 GetPlayerAvatarGenderByGraphicsId(u16 gfxId)
|
||||
u8 GetPlayerAvatarGenderByGraphicsId(u16 gfxId)
|
||||
{
|
||||
switch (gfxId)
|
||||
{
|
||||
|
|
10
src/main.c
10
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue