mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 12:14:20 +01:00
Add Spinda spot color constants
This commit is contained in:
parent
177863da47
commit
313f14ed63
@ -5653,9 +5653,12 @@ u16 SpeciesToCryId(u16 species)
|
|||||||
return gSpeciesIdToCryId[species - (SPECIES_TREECKO - 1)];
|
return gSpeciesIdToCryId[species - (SPECIES_TREECKO - 1)];
|
||||||
}
|
}
|
||||||
|
|
||||||
// To draw the spot, add 4 to the color indexes
|
// Spots can be drawn on Spinda's color indexes 1, 2, or 3
|
||||||
#define SPOT_COLOR_ADJUSTMENT 4
|
#define FIRST_SPOT_COLOR 1
|
||||||
|
#define LAST_SPOT_COLOR 3
|
||||||
|
|
||||||
|
// To draw a spot pixel, add 4 to the color index
|
||||||
|
#define SPOT_COLOR_ADJUSTMENT 4
|
||||||
/*
|
/*
|
||||||
The macro below handles drawing the randomly-placed spots on Spinda's front sprite.
|
The macro below handles drawing the randomly-placed spots on Spinda's front sprite.
|
||||||
Spinda has 4 spots, each with an entry in gSpindaSpotGraphics. Each entry contains
|
Spinda has 4 spots, each with an entry in gSpindaSpotGraphics. Each entry contains
|
||||||
@ -5711,13 +5714,15 @@ u16 SpeciesToCryId(u16 species)
|
|||||||
if (column & 1) \
|
if (column & 1) \
|
||||||
{ \
|
{ \
|
||||||
/* Draw spot pixel if this is Spinda's body color */ \
|
/* Draw spot pixel if this is Spinda's body color */ \
|
||||||
if ((u8)((*destPixels & 0xF0) - (1 << 4)) <= (2 << 4)) \
|
if ((u8)((*destPixels & 0xF0) - (FIRST_SPOT_COLOR << 4))\
|
||||||
|
<= ((LAST_SPOT_COLOR - FIRST_SPOT_COLOR) << 4))\
|
||||||
*destPixels += (SPOT_COLOR_ADJUSTMENT << 4); \
|
*destPixels += (SPOT_COLOR_ADJUSTMENT << 4); \
|
||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
/* Draw spot pixel if this is Spinda's body color */ \
|
/* Draw spot pixel if this is Spinda's body color */ \
|
||||||
if ((u8)((*destPixels & 0xF) - 1) <= 2) \
|
if ((u8)((*destPixels & 0xF) - FIRST_SPOT_COLOR) \
|
||||||
|
<= (LAST_SPOT_COLOR - FIRST_SPOT_COLOR)) \
|
||||||
*destPixels += SPOT_COLOR_ADJUSTMENT; \
|
*destPixels += SPOT_COLOR_ADJUSTMENT; \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
|
Loading…
Reference in New Issue
Block a user