Showing followers in debug menu (no animation yet)
This commit is contained in:
parent
d53d34b3c5
commit
5233d0dc97
@ -4,10 +4,12 @@
|
||||
//Defines
|
||||
#define DEBUG_MON_BACK_X 62
|
||||
#define DEBUG_MON_BACK_Y 80
|
||||
#define DEBUG_ICON_X 220
|
||||
#define DEBUG_ICON_Y 140
|
||||
#define DEBUG_ICON_X 224
|
||||
#define DEBUG_ICON_Y 144
|
||||
#define DEBUG_MON_SHINY 0
|
||||
#define DEBUG_MON_NORMAL 9
|
||||
#define DEBUG_FOLLOWER_X 192
|
||||
#define DEBUG_FOLLOWER_Y 144
|
||||
|
||||
#define MODIFY_DIGITS_MAX 4
|
||||
#define MODIFY_DIGITS_ARROW_X 129
|
||||
|
||||
@ -51,6 +51,7 @@ struct PokemonDebugMenu
|
||||
u8 frontspriteId;
|
||||
u8 backspriteId;
|
||||
u8 iconspriteId;
|
||||
u8 followerspriteId;
|
||||
u8 frontShadowSpriteId;
|
||||
bool8 isShiny;
|
||||
bool8 isFemale;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#define COMP OW_GFX_COMPRESS
|
||||
|
||||
// Species-indexed pokemon object event table
|
||||
const struct ObjectEventGraphicsInfo gPokemonObjectGraphics[] =
|
||||
const struct ObjectEventGraphicsInfo gPokemonObjectGraphics[NUM_SPECIES] =
|
||||
{
|
||||
[SPECIES_BULBASAUR] = {0xFFFF, OBJ_EVENT_PAL_TAG_DYNAMIC, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, FALSE, COMP, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Following, sPicTable_Bulbasaur, gDummySpriteAffineAnimTable},
|
||||
[SPECIES_IVYSAUR] = {0xFFFF, OBJ_EVENT_PAL_TAG_DYNAMIC, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, FALSE, COMP, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Following, sPicTable_Ivysaur, gDummySpriteAffineAnimTable},
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
#include "constants/songs.h"
|
||||
#include "data.h"
|
||||
#include "decompress.h"
|
||||
#include "event_object_movement.h"
|
||||
#include "field_weather.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "graphics.h"
|
||||
@ -38,6 +39,7 @@
|
||||
#include "trainer_pokemon_sprites.h"
|
||||
|
||||
#include "constants/items.h"
|
||||
#include "constants/event_objects.h"
|
||||
|
||||
#if DEBUG_POKEMON_MENU == TRUE
|
||||
extern const struct BattleBackground sBattleTerrainTable[];
|
||||
@ -1119,6 +1121,10 @@ void CB2_Debug_Pokemon(void)
|
||||
data->iconspriteId = CreateMonIcon(species, SpriteCB_MonIcon, DEBUG_ICON_X, DEBUG_ICON_Y, 4, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY));
|
||||
gSprites[data->iconspriteId].oam.priority = 0;
|
||||
|
||||
//Follower Sprite
|
||||
data->followerspriteId = CreateObjectGraphicsSprite(OBJ_EVENT_GFX_MON_BASE + species, SpriteCallbackDummy, DEBUG_FOLLOWER_X, DEBUG_FOLLOWER_Y, 0);
|
||||
gSprites[data->followerspriteId].oam.priority = 0;
|
||||
|
||||
//Modify Arrows
|
||||
SetUpModifyArrows(data);
|
||||
PrintDigitChars(data);
|
||||
@ -1625,6 +1631,7 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data)
|
||||
DestroySprite(&gSprites[data->frontspriteId]);
|
||||
DestroySprite(&gSprites[data->backspriteId]);
|
||||
DestroySprite(&gSprites[data->iconspriteId]);
|
||||
DestroySprite(&gSprites[data->followerspriteId]);
|
||||
|
||||
FreeMonSpritesGfx();
|
||||
ResetSpriteData();
|
||||
@ -1669,6 +1676,10 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data)
|
||||
data->iconspriteId = CreateMonIcon(species, SpriteCB_MonIcon, DEBUG_ICON_X, DEBUG_ICON_Y, 4, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY));
|
||||
gSprites[data->iconspriteId].oam.priority = 0;
|
||||
|
||||
//Follower Sprite
|
||||
data->followerspriteId = CreateObjectGraphicsSprite(OBJ_EVENT_GFX_MON_BASE + species, SpriteCallbackDummy, DEBUG_FOLLOWER_X, DEBUG_FOLLOWER_Y, 0);
|
||||
gSprites[data->followerspriteId].oam.priority = 0;
|
||||
|
||||
//Modify Arrows
|
||||
LoadSpritePalette(&gSpritePalette_Arrow);
|
||||
data->modifyArrows.arrowSpriteId[0] = CreateSprite(&gSpriteTemplate_Arrow, MODIFY_DIGITS_ARROW_X + (data->modifyArrows.currentDigit * 6), MODIFY_DIGITS_ARROW1_Y, 0);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user