mirror of
https://github.com/rh-hideout/pokeemerald-expansion.git
synced 2026-03-21 18:04:50 -05:00
refactor(graphics): move spot templates to main file
This commit is contained in:
parent
b3f6e22962
commit
45e1af321a
|
|
@ -1,36 +0,0 @@
|
|||
#ifndef GUARD_POKEMON_SPOT_TEMPLATES_H
|
||||
#define GUARD_POKEMON_SPOT_TEMPLATES_H
|
||||
|
||||
#include "global.h"
|
||||
#include "pokemon_spots.h"
|
||||
|
||||
#define MON_SPOT(name, idx, _x, _y) \
|
||||
{.x = _x, .y =_y, .image = s##name##SpotImages[idx]},
|
||||
|
||||
/* Define Spots Below */
|
||||
|
||||
// SPECIES_SPINDA
|
||||
static const u32 sSpindaSpotImages[4][8] = {
|
||||
INCBIN_U32("graphics/pokemon/spinda/spots/spot_0.1bpp"),
|
||||
INCBIN_U32("graphics/pokemon/spinda/spots/spot_1.1bpp"),
|
||||
INCBIN_U32("graphics/pokemon/spinda/spots/spot_2.1bpp"),
|
||||
INCBIN_U32("graphics/pokemon/spinda/spots/spot_3.1bpp"),
|
||||
};
|
||||
static const struct MonSpot sSpindaSpots[] = {
|
||||
MON_SPOT(Spinda, 0, 16, 7)
|
||||
MON_SPOT(Spinda, 1, 40, 8)
|
||||
MON_SPOT(Spinda, 2, 22, 27)
|
||||
MON_SPOT(Spinda, 3, 34, 26)
|
||||
};
|
||||
const struct MonSpotTemplate gSpindaSpotTemplate = {
|
||||
.spots = sSpindaSpots,
|
||||
.count = ARRAY_COUNT(sSpindaSpots),
|
||||
.scale = 1,
|
||||
.xOffsetFrame2 = -4,
|
||||
.yOffsetFrame2 = 0,
|
||||
.firstColor = 1,
|
||||
.lastColor = 3,
|
||||
.colorAdjust = 4,
|
||||
};
|
||||
|
||||
#endif /* end of include guard: GUARD_POKEMON_SPOT_TEMPLATES_H */
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "constants/species.h"
|
||||
#include "data/pokemon/pokemon_spot_templates.h"
|
||||
#include "pokemon.h"
|
||||
#include "pokemon_spots.h"
|
||||
|
||||
|
|
@ -8,6 +7,37 @@
|
|||
#define ODD_PIXEL_SHIFT 4
|
||||
#define FRAME_SIZE 64
|
||||
|
||||
#define MON_SPOT(name, idx, _x, _y) \
|
||||
{.x = _x, .y =_y, .image = s##name##SpotImages[idx]},
|
||||
|
||||
/* Define Spots Below */
|
||||
|
||||
// SPECIES_SPINDA
|
||||
static const u32 sSpindaSpotImages[4][8] = {
|
||||
INCBIN_U32("graphics/pokemon/spinda/spots/spot_0.1bpp"),
|
||||
INCBIN_U32("graphics/pokemon/spinda/spots/spot_1.1bpp"),
|
||||
INCBIN_U32("graphics/pokemon/spinda/spots/spot_2.1bpp"),
|
||||
INCBIN_U32("graphics/pokemon/spinda/spots/spot_3.1bpp"),
|
||||
};
|
||||
static const struct MonSpot sSpindaSpots[] = {
|
||||
MON_SPOT(Spinda, 0, 16, 7)
|
||||
MON_SPOT(Spinda, 1, 40, 8)
|
||||
MON_SPOT(Spinda, 2, 22, 27)
|
||||
MON_SPOT(Spinda, 3, 34, 26)
|
||||
};
|
||||
const struct MonSpotTemplate gSpindaSpotTemplate = {
|
||||
.spots = sSpindaSpots,
|
||||
.count = ARRAY_COUNT(sSpindaSpots),
|
||||
.scale = 1,
|
||||
.xOffsetFrame2 = -4,
|
||||
.yOffsetFrame2 = 0,
|
||||
.firstColor = 1,
|
||||
.lastColor = 3,
|
||||
.colorAdjust = 4,
|
||||
};
|
||||
|
||||
/* End of Spot Defintions */
|
||||
|
||||
const struct MonSpotTemplate* const gSpottedSpecies[NUM_SPECIES] = {[SPECIES_SPINDA] = &gSpindaSpotTemplate};
|
||||
|
||||
static inline void TryDrawSpotPixel(u8* pixels, u8 pixelShift, u8 firstColor, u8 lastColor, u8 spotColorAdjust)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user