Custom anim table follower macro & Farfetch'd example (#5309)
Co-authored-by: Hedara <hedara90@gmail.com>
This commit is contained in:
parent
3d8b73300a
commit
9633cefd11
@ -113,6 +113,7 @@ extern const struct OamData gObjectEventBaseOam_64x64;
|
||||
extern const struct SubspriteTable sOamTables_32x32[];
|
||||
extern const struct SubspriteTable sOamTables_64x64[];
|
||||
extern const union AnimCmd *const sAnimTable_Following[];
|
||||
extern const union AnimCmd *const sAnimTable_Following_Asym[];
|
||||
extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[];
|
||||
extern const u8 gReflectionEffectPaletteMap[];
|
||||
|
||||
|
||||
@ -1173,7 +1173,7 @@ const union AnimCmd *const sAnimTable_Following[] = {
|
||||
};
|
||||
|
||||
// Like the above, but has separate frames for facing right
|
||||
static const union AnimCmd *const sAnimTable_Following_Asym[] = {
|
||||
const union AnimCmd *const sAnimTable_Following_Asym[] = {
|
||||
[ANIM_STD_FACE_SOUTH] = sAnim_FaceSouth,
|
||||
[ANIM_STD_FACE_NORTH] = sAnim_FaceNorth2F,
|
||||
[ANIM_STD_FACE_WEST] = sAnim_FaceWest2F,
|
||||
|
||||
@ -46,8 +46,30 @@
|
||||
.affineAnims = gDummySpriteAffineAnimTable, \
|
||||
}, \
|
||||
OVERWORLD_PAL(__VA_ARGS__)
|
||||
|
||||
#define OVERWORLD_SET_ANIM(picTable, _size, shadow, _tracks, _anims, ...) \
|
||||
.overworldData = { \
|
||||
.tileTag = TAG_NONE, \
|
||||
.paletteTag = OBJ_EVENT_PAL_TAG_DYNAMIC, \
|
||||
.reflectionPaletteTag = OBJ_EVENT_PAL_TAG_NONE, \
|
||||
.size = (_size == SIZE_32x32 ? 512 : 2048), \
|
||||
.width = (_size == SIZE_32x32 ? 32 : 64), \
|
||||
.height = (_size == SIZE_32x32 ? 32 : 64), \
|
||||
.paletteSlot = PALSLOT_NPC_1, \
|
||||
.shadowSize = shadow, \
|
||||
.inanimate = FALSE, \
|
||||
.compressed = COMP, \
|
||||
.tracks = _tracks, \
|
||||
.oam = (_size == SIZE_32x32 ? &gObjectEventBaseOam_32x32 : &gObjectEventBaseOam_64x64), \
|
||||
.subspriteTables = (_size == SIZE_32x32 ? sOamTables_32x32 : sOamTables_64x64), \
|
||||
.anims = _anims, \
|
||||
.images = picTable, \
|
||||
.affineAnims = gDummySpriteAffineAnimTable, \
|
||||
}, \
|
||||
OVERWORLD_PAL(__VA_ARGS__)
|
||||
#else
|
||||
#define OVERWORLD(picTable, _size, shadow, _tracks, ...)
|
||||
#define OVERWORLD_SET_ANIM(picTable, _size, shadow, _tracks, _anims, ...)
|
||||
#endif //OW_POKEMON_OBJECT_EVENTS
|
||||
|
||||
// Maximum value for a female Pokémon is 254 (MON_FEMALE) which is 100% female.
|
||||
|
||||
@ -9515,11 +9515,12 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
|
||||
.iconSprite = gMonIcon_Farfetchd,
|
||||
.iconPalIndex = 1,
|
||||
FOOTPRINT(Farfetchd)
|
||||
OVERWORLD(
|
||||
OVERWORLD_SET_ANIM(
|
||||
sPicTable_Farfetchd,
|
||||
SIZE_32x32,
|
||||
SHADOW_SIZE_M,
|
||||
TRACKS_NONE,
|
||||
sAnimTable_Following_Asym,
|
||||
gOverworldPalette_Farfetchd,
|
||||
gShinyOverworldPalette_Farfetchd
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user