Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved mon pic tables to gSpeciesInfo + macro cleanup #5597

Open
wants to merge 7 commits into
base: upcoming
Choose a base branch
from
6,632 changes: 0 additions & 6,632 deletions src/data/object_events/object_event_pic_tables_followers.h

This file was deleted.

92 changes: 28 additions & 64 deletions src/data/pokemon/species_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,77 +42,41 @@
#define OVERWORLD_PAL_FEMALE(...)
#endif //OW_PKMN_OBJECTS_SHARE_PALETTES == FALSE

#define OVERWORLD(picTable, _size, shadow, _tracks, ...) \
.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 = sAnimTable_Following, \
.images = picTable, \
.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, \
}, \
#define OVERWORLD_DATA(objEventPic, _size, shadow, _tracks, _anims) \
{ \
.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 = (const struct SpriteFrameImage[]) { overworld_ascending_frames(objEventPic, SIZE_32x32 ? 4 : 8, SIZE_32x32 ? 4 : 8), }, \
.affineAnims = gDummySpriteAffineAnimTable, \
}

#define OVERWORLD(objEventPic, _size, shadow, _tracks, _anims, ...) \
.overworldData = OVERWORLD_DATA(objEventPic, _size, shadow, _tracks, _anims), \
OVERWORLD_PAL(__VA_ARGS__)

#if P_GENDER_DIFFERENCES
#define OVERWORLD_FEMALE(picTable, _size, shadow, _tracks, ...) \
.overworldDataFemale = { \
.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 = sAnimTable_Following, \
.images = picTable, \
.affineAnims = gDummySpriteAffineAnimTable, \
}, \
#define OVERWORLD_FEMALE(objEventPic, _size, shadow, _tracks, _anims, ...) \
.overworldDataFemale = OVERWORLD_DATA(objEventPic, _size, shadow, _tracks, _anims), \
OVERWORLD_PAL_FEMALE(__VA_ARGS__)
#else
#define OVERWORLD_FEMALE(picTable, _size, shadow, _tracks, ...)
#define OVERWORLD_FEMALE(...)
#endif //P_GENDER_DIFFERENCES

#else
#define OVERWORLD(picTable, _size, shadow, _tracks, ...)
#define OVERWORLD_SET_ANIM(picTable, _size, shadow, _tracks, _anims, ...)
#define OVERWORLD_FEMALE(picTable, _size, shadow, _tracks, ...)
#define OVERWORLD(...)
#define OVERWORLD_FEMALE(...)
#define OVERWORLD_PAL(...)
#define OVERWORLD_PAL_FEMALE(...)
#endif //OW_POKEMON_OBJECT_EVENTS
Expand Down Expand Up @@ -172,7 +136,7 @@ const struct SpeciesInfo gSpeciesInfo[] =
.oam = &gObjectEventBaseOam_32x32,
.subspriteTables = sOamTables_32x32,
.anims = sAnimTable_Following,
.images = sPicTable_Substitute,
.images = (const struct SpriteFrameImage[]) { overworld_ascending_frames(gObjectEventPic_Substitute, 4, 4), },
.affineAnims = gDummySpriteAffineAnimTable,
},
#endif
Expand Down
Loading
Loading