Skip to content

Commit

Permalink
Unified object event data macros for oveworld mon
Browse files Browse the repository at this point in the history
  • Loading branch information
AsparagusEduardo committed Oct 29, 2024
1 parent b30ab59 commit b11f4a1
Show file tree
Hide file tree
Showing 7 changed files with 204 additions and 122 deletions.
38 changes: 11 additions & 27 deletions src/data/pokemon/species_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@
#define OVERWORLD_PAL_FEMALE(...)
#endif //OW_PKMN_OBJECTS_SHARE_PALETTES == FALSE

#define OVERWORLD_TEMP()

#define OVERWORLD(objEventPic, _size, shadow, _tracks, _anims, ...) \
.overworldData = { \
#define OVERWORLD_DATA(objEventPic, _size, shadow, _tracks, _anims) \
{ \
.tileTag = TAG_NONE, \
.paletteTag = OBJ_EVENT_PAL_TAG_DYNAMIC, \
.reflectionPaletteTag = OBJ_EVENT_PAL_TAG_NONE, \
Expand All @@ -62,37 +60,23 @@
.anims = _anims, \
.images = (const struct SpriteFrameImage[]) { overworld_ascending_frames(objEventPic, 4, 4), }, \
.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(objEventPic, _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 = (const struct SpriteFrameImage[]) { overworld_ascending_frames(objEventPic, 4, 4), }, \
.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, _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
84 changes: 56 additions & 28 deletions src/data/pokemon/species_info/gen_1_families.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_VenusaurF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
.levelUpLearnset = sVenusaurLevelUpLearnset,
.teachableLearnset = sVenusaurTeachableLearnset,
Expand Down Expand Up @@ -1231,7 +1232,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_ButterfreeF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
.levelUpLearnset = sButterfreeLevelUpLearnset,
.teachableLearnset = sButterfreeTeachableLearnset,
Expand Down Expand Up @@ -1916,7 +1918,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_RattataF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
.levelUpLearnset = sRattataLevelUpLearnset,
.teachableLearnset = sRattataTeachableLearnset,
Expand Down Expand Up @@ -1993,7 +1996,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_RaticateF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
.levelUpLearnset = sRaticateLevelUpLearnset,
.teachableLearnset = sRaticateTeachableLearnset,
Expand Down Expand Up @@ -2665,7 +2669,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_PikachuF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
FOOTPRINT(Pikachu)
.levelUpLearnset = sPikachuLevelUpLearnset,
Expand Down Expand Up @@ -3642,7 +3647,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_RaichuF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
.levelUpLearnset = sRaichuLevelUpLearnset,
.teachableLearnset = sRaichuTeachableLearnset,
Expand Down Expand Up @@ -5192,7 +5198,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_ZubatF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
.levelUpLearnset = sZubatLevelUpLearnset,
.teachableLearnset = sZubatTeachableLearnset,
Expand Down Expand Up @@ -5269,7 +5276,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_GolbatF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
.levelUpLearnset = sGolbatLevelUpLearnset,
.teachableLearnset = sGolbatTeachableLearnset,
Expand Down Expand Up @@ -5483,7 +5491,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_GloomF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
.levelUpLearnset = sGloomLevelUpLearnset,
.teachableLearnset = sGloomTeachableLearnset,
Expand Down Expand Up @@ -5568,7 +5577,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_VileplumeF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
.levelUpLearnset = sVileplumeLevelUpLearnset,
.teachableLearnset = sVileplumeTeachableLearnset,
Expand Down Expand Up @@ -7554,7 +7564,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_PolitoedF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
.levelUpLearnset = sPolitoedLevelUpLearnset,
.teachableLearnset = sPolitoedTeachableLearnset,
Expand Down Expand Up @@ -7704,7 +7715,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_KadabraF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_NONE
TRACKS_NONE,
sAnimTable_Following
)
.levelUpLearnset = sKadabraLevelUpLearnset,
.teachableLearnset = sKadabraTeachableLearnset,
Expand Down Expand Up @@ -7791,7 +7803,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_AlakazamF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_NONE
TRACKS_NONE,
sAnimTable_Following
)
.levelUpLearnset = sAlakazamLevelUpLearnset,
.teachableLearnset = sAlakazamTeachableLearnset,
Expand Down Expand Up @@ -10105,7 +10118,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_DoduoF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
.levelUpLearnset = sDoduoLevelUpLearnset,
.teachableLearnset = sDoduoTeachableLearnset,
Expand Down Expand Up @@ -10188,7 +10202,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_DodrioF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
.levelUpLearnset = sDodrioLevelUpLearnset,
.teachableLearnset = sDodrioTeachableLearnset,
Expand Down Expand Up @@ -11204,7 +11219,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_SteelixF,
SIZE_64x64,
SHADOW_SIZE_M,
TRACKS_SLITHER
TRACKS_SLITHER,
sAnimTable_Following
)
.levelUpLearnset = sSteelixLevelUpLearnset,
.teachableLearnset = sSteelixTeachableLearnset,
Expand Down Expand Up @@ -11416,7 +11432,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_HypnoF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
.levelUpLearnset = sHypnoLevelUpLearnset,
.teachableLearnset = sHypnoTeachableLearnset,
Expand Down Expand Up @@ -13038,7 +13055,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_RhyhornF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
.levelUpLearnset = sRhyhornLevelUpLearnset,
.teachableLearnset = sRhyhornTeachableLearnset,
Expand Down Expand Up @@ -13114,7 +13132,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_RhydonF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
.levelUpLearnset = sRhydonLevelUpLearnset,
.teachableLearnset = sRhydonTeachableLearnset,
Expand Down Expand Up @@ -13197,7 +13216,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_RhyperiorF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
.levelUpLearnset = sRhyperiorLevelUpLearnset,
.teachableLearnset = sRhyperiorTeachableLearnset,
Expand Down Expand Up @@ -13541,7 +13561,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_TangrowthF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
.levelUpLearnset = sTangrowthLevelUpLearnset,
.teachableLearnset = sTangrowthTeachableLearnset,
Expand Down Expand Up @@ -13963,7 +13984,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_GoldeenF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_SPOT
TRACKS_SPOT,
sAnimTable_Following
)
.levelUpLearnset = sGoldeenLevelUpLearnset,
.teachableLearnset = sGoldeenTeachableLearnset,
Expand Down Expand Up @@ -14040,7 +14062,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_SeakingF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_SPOT
TRACKS_SPOT,
sAnimTable_Following
)
.levelUpLearnset = sSeakingLevelUpLearnset,
.teachableLearnset = sSeakingTeachableLearnset,
Expand Down Expand Up @@ -14525,7 +14548,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_ScytherF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
.levelUpLearnset = sScytherLevelUpLearnset,
.teachableLearnset = sScytherTeachableLearnset,
Expand Down Expand Up @@ -14607,7 +14631,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_ScizorF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
.levelUpLearnset = sScizorLevelUpLearnset,
.teachableLearnset = sScizorTeachableLearnset,
Expand Down Expand Up @@ -15760,7 +15785,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_MagikarpF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_SPOT
TRACKS_SPOT,
sAnimTable_Following
)
.tmIlliterate = TRUE,
.levelUpLearnset = sMagikarpLevelUpLearnset,
Expand Down Expand Up @@ -15836,7 +15862,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_GyaradosF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_SLITHER
TRACKS_SLITHER,
sAnimTable_Following
)
.levelUpLearnset = sGyaradosLevelUpLearnset,
.teachableLearnset = sGyaradosTeachableLearnset,
Expand Down Expand Up @@ -16170,7 +16197,8 @@ const struct SpeciesInfo gSpeciesInfoGen1[] =
gObjectEventPic_EeveeF,
SIZE_32x32,
SHADOW_SIZE_M,
TRACKS_FOOT
TRACKS_FOOT,
sAnimTable_Following
)
.levelUpLearnset = sEeveeLevelUpLearnset,
.teachableLearnset = sEeveeTeachableLearnset,
Expand Down
Loading

0 comments on commit b11f4a1

Please sign in to comment.