Added OBJ_EVENT_GFX_SPECIES_SHINY
This commit is contained in:
parent
d88834dd58
commit
e6e2285c44
4 changed files with 11 additions and 1 deletions
|
@ -282,6 +282,7 @@
|
|||
|
||||
// Used to call a specific species' follower graphics. Useful for static encounters.
|
||||
#define OBJ_EVENT_GFX_SPECIES(name) (SPECIES_##name + OBJ_EVENT_GFX_MON_BASE)
|
||||
#define OBJ_EVENT_GFX_SPECIES_SHINY(name) (SPECIES_##name + OBJ_EVENT_GFX_MON_BASE + SPECIES_SHINY_TAG)
|
||||
|
||||
#define OW_SPECIES(x) (((x)->graphicsId & OBJ_EVENT_GFX_SPECIES_MASK) - OBJ_EVENT_GFX_MON_BASE)
|
||||
#define OW_FORM(x) ((x)->graphicsId >> OBJ_EVENT_GFX_SPECIES_BITS)
|
||||
|
|
|
@ -419,6 +419,8 @@
|
|||
|
||||
#define NUM_SPECIES SPECIES_EGG
|
||||
|
||||
#define SPECIES_SHINY_TAG 500
|
||||
|
||||
#define SPECIES_UNOWN_B (NUM_SPECIES + 1)
|
||||
#define SPECIES_UNOWN_C (SPECIES_UNOWN_B + 1)
|
||||
#define SPECIES_UNOWN_D (SPECIES_UNOWN_B + 2)
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include "constants/moves.h"
|
||||
|
||||
#define SPECIES_SHINY_TAG 500
|
||||
#define N_FOLLOWER_HAPPY_MESSAGES 31
|
||||
#define N_FOLLOWER_NEUTRAL_MESSAGES 14
|
||||
#define N_FOLLOWER_SAD_MESSAGES 3
|
||||
|
|
|
@ -1672,6 +1672,12 @@ static u8 TrySetupObjectEventSprite(const struct ObjectEventTemplate *objectEven
|
|||
spriteTemplate->tileTag = LoadSheetGraphicsInfo(graphicsInfo, objectEvent->graphicsId, NULL);
|
||||
#endif
|
||||
|
||||
if (objectEvent->graphicsId >= OBJ_EVENT_GFX_MON_BASE + SPECIES_SHINY_TAG)
|
||||
{
|
||||
objectEvent->shiny = TRUE;
|
||||
objectEvent->graphicsId -= SPECIES_SHINY_TAG;
|
||||
}
|
||||
|
||||
spriteId = CreateSprite(spriteTemplate, 0, 0, 0);
|
||||
if (spriteId == MAX_SPRITES)
|
||||
{
|
||||
|
@ -2749,6 +2755,8 @@ const struct ObjectEventGraphicsInfo *GetObjectEventGraphicsInfo(u16 graphicsId)
|
|||
if (graphicsId >= OBJ_EVENT_GFX_VARS && graphicsId <= OBJ_EVENT_GFX_VAR_F)
|
||||
graphicsId = VarGetObjectEventGraphicsId(graphicsId - OBJ_EVENT_GFX_VARS);
|
||||
|
||||
if (graphicsId >= OBJ_EVENT_GFX_MON_BASE + SPECIES_SHINY_TAG)
|
||||
graphicsId -= SPECIES_SHINY_TAG;
|
||||
// graphicsId may contain mon form info
|
||||
if (graphicsId > OBJ_EVENT_GFX_SPECIES_MASK) {
|
||||
form = graphicsId >> OBJ_EVENT_GFX_SPECIES_BITS;
|
||||
|
|
Loading…
Reference in a new issue