mirror of
https://github.com/pret/pokeemerald.git
synced 2026-09-28 04:46:53 -05:00
Replace Get(Box)MonData2 aliases with functions in UBFIX builds
This commit is contained in:
@@ -3707,7 +3707,14 @@ u32 GetMonData3(struct Pokemon *mon, s32 field, u8 *data)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifndef UBFIX
|
||||
u32 GetMonData2(struct Pokemon *mon, s32 field) __attribute__((alias("GetMonData3")));
|
||||
#else
|
||||
u32 GetMonData2(struct Pokemon *mon, s32 field)
|
||||
{
|
||||
return GetMonData3(mon, field, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* GameFreak called GetBoxMonData with either 2 or 3 arguments, for type
|
||||
* safety we have a GetBoxMonData macro (in include/pokemon.h) which
|
||||
@@ -4069,7 +4076,14 @@ u32 GetBoxMonData3(struct BoxPokemon *boxMon, s32 field, u8 *data)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
#ifndef UBFIX
|
||||
u32 GetBoxMonData2(struct BoxPokemon *boxMon, s32 field) __attribute__((alias("GetBoxMonData3")));
|
||||
#else
|
||||
u32 GetBoxMonData2(struct BoxPokemon *boxMon, s32 field)
|
||||
{
|
||||
return GetBoxMonData3(boxMon, field, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
#define SET8(lhs) (lhs) = *data
|
||||
#define SET16(lhs) (lhs) = data[0] + (data[1] << 8)
|
||||
|
||||
Reference in New Issue
Block a user