mirror of
https://github.com/rh-hideout/pokeemerald-expansion.git
synced 2026-04-26 02:14:22 -05:00
Adding move animation backgrounds to the Pokemon Sprite Visualizer (#8764)
This commit is contained in:
parent
6aaf5d43dc
commit
a15d9a81f9
|
|
@ -1830,7 +1830,7 @@ SetGigaImpactPlayerBG:
|
|||
fadetobg BG_GIGA_IMPACT_PLAYER
|
||||
goto GigaImpactContinuity
|
||||
SetGigaImpactContestsBG:
|
||||
fadetobg BG_GIGA_IMPACT_CONTEST
|
||||
fadetobg BG_GIGA_IMPACT_CONTESTS
|
||||
goto GigaImpactContinuity
|
||||
GigaImpactContinuity:
|
||||
playsewithpan SE_M_TAKE_DOWN, SOUND_PAN_ATTACKER
|
||||
|
|
@ -3585,7 +3585,7 @@ gBattleAnimMove_SpacialRend::
|
|||
delay 2
|
||||
createsprite gSpacialRendBladesTemplate, ANIM_ATTACKER, 3, 0, 0, 0x38, 12
|
||||
waitforvisualfinish
|
||||
fadetobgfromset BG_SPACIAL_REND_ON_OPPONENT BG_SPACIAL_REND_ON_PLAYER BG_SPACIAL_REND_ON_OPPONENT
|
||||
fadetobgfromset BG_SPACIAL_REND_OPPONENT BG_SPACIAL_REND_PLAYER BG_SPACIAL_REND_OPPONENT
|
||||
waitbgfadein
|
||||
loopsewithpan SE_M_RAZOR_WIND, SOUND_PAN_TARGET, 3, 5
|
||||
createsprite gSpacialRendBladesTemplate2, ANIM_TARGET, 1, 0, 10, SOUND_PAN_ATTACKER, 0xb0, 0x28
|
||||
|
|
@ -14293,7 +14293,7 @@ gBattleAnimMove_Eternabeam::
|
|||
createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_HYDRO_PUMP, 0, 12, 12, RGB(31, 4, 10) @Pinkish Red
|
||||
createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_ROUND_SHADOW, 0, 13, 13, RGB(31, 4, 10) @Pinkish Red
|
||||
createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_EXPLOSION, 0, 12, 12, RGB(11, 1, 22)
|
||||
fadetobgfromset BG_SPACIAL_REND_ON_OPPONENT BG_SPACIAL_REND_ON_PLAYER BG_SPACIAL_REND_ON_OPPONENT
|
||||
fadetobgfromset BG_SPACIAL_REND_OPPONENT BG_SPACIAL_REND_PLAYER BG_SPACIAL_REND_OPPONENT
|
||||
playsewithpan SE_M_FLY, SOUND_PAN_ATTACKER
|
||||
invisible ANIM_ATTACKER
|
||||
createsprite gDevastatingDrakeDrakeUpSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 0x04E0, 36, 21, 1, ANIM_ATTACKER
|
||||
|
|
@ -18337,7 +18337,7 @@ FickleBeamRegular:
|
|||
end
|
||||
FickleBeamIntense:
|
||||
loadspritegfx ANIM_TAG_ORBS
|
||||
fadetobgfromset BG_SPACIAL_REND_ON_OPPONENT BG_SPACIAL_REND_ON_PLAYER BG_SPACIAL_REND_ON_OPPONENT
|
||||
fadetobgfromset BG_SPACIAL_REND_OPPONENT BG_SPACIAL_REND_PLAYER BG_SPACIAL_REND_OPPONENT
|
||||
waitbgfadein
|
||||
delay 10
|
||||
playsewithpan SE_M_HYPER_BEAM, SOUND_PAN_ATTACKER
|
||||
|
|
@ -34363,7 +34363,7 @@ gBattleAnimMove_BlackHoleEclipse::
|
|||
delay 3
|
||||
createsprite gBlackHoleEclipseWispSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x10, 0x3
|
||||
waitforvisualfinish
|
||||
fadetobg BG_BLACKHOLE_ECLIPSE
|
||||
fadetobg BG_BLACK_HOLE_ECLIPSE
|
||||
playsewithpan SE_M_SACRED_FIRE2, SOUND_PAN_TARGET
|
||||
loadspritegfx ANIM_TAG_VERTICAL_HEX @red
|
||||
createsprite gBlackHoleEclipseRedRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x100, 0x0
|
||||
|
|
|
|||
|
|
@ -591,4 +591,6 @@ void AnimIceBeamParticle(struct Sprite *sprite);
|
|||
// battle_anim_bug.c
|
||||
void AnimTranslateStinger(struct Sprite *sprite);
|
||||
|
||||
extern const struct BattleAnimBackground gBattleAnimBackgroundTable[];
|
||||
|
||||
#endif // GUARD_BATTLE_ANIM_H
|
||||
|
|
|
|||
|
|
@ -483,11 +483,11 @@
|
|||
#define BG_MAGMA_STORM 27
|
||||
#define BG_GIGA_IMPACT_OPPONENT 28
|
||||
#define BG_GIGA_IMPACT_PLAYER 29
|
||||
#define BG_GIGA_IMPACT_CONTEST 30
|
||||
#define BG_GIGA_IMPACT_CONTESTS 30
|
||||
#define BG_TRICK_ROOM 31
|
||||
#define BG_ROCK_WRECKER 32
|
||||
#define BG_SPACIAL_REND_ON_OPPONENT 33
|
||||
#define BG_SPACIAL_REND_ON_PLAYER 34
|
||||
#define BG_SPACIAL_REND_OPPONENT 33
|
||||
#define BG_SPACIAL_REND_PLAYER 34
|
||||
#define BG_DARK_VOID 35
|
||||
#define BG_WATER 36
|
||||
#define BG_NIGHTMARE 37
|
||||
|
|
@ -521,7 +521,7 @@
|
|||
#define BG_BLOOM_DOOM 65
|
||||
#define BG_SHATTERED_PSYCHE 66
|
||||
#define BG_TWINKLE_TACKLE 67
|
||||
#define BG_BLACKHOLE_ECLIPSE 68
|
||||
#define BG_BLACK_HOLE_ECLIPSE 68
|
||||
#define BG_SOULSTEALING_7STAR_STRIKE 69
|
||||
#define BG_MALICIOUS_MOONSAULT 70
|
||||
#define BG_CLANGOROUS_SOULBLAZE 71
|
||||
|
|
@ -537,6 +537,7 @@
|
|||
#define BG_RAINBOW_PLAYER 81
|
||||
#define BG_RAINBOW_OPPONENT 82
|
||||
#define BG_SWAMP 83
|
||||
#define BG_COUNT 84
|
||||
|
||||
// table ids for general animations (sBattleAnims_General)
|
||||
#define B_ANIM_STATS_CHANGE 0
|
||||
|
|
|
|||
|
|
@ -34,4 +34,17 @@
|
|||
#define WIN_FOOTPRINT 4
|
||||
#define WIN_END 5
|
||||
|
||||
//Background positions
|
||||
#define BACKGROUND_1_CHAR_BASE 1
|
||||
#define BACKGROUND_1_MAP_BASE 28
|
||||
#define BACKGROUND_3_CHAR_BASE 2
|
||||
#define BACKGROUND_3_MAP_BASE 26
|
||||
|
||||
//Submenus
|
||||
#define SUBMENU_SPECIES 0
|
||||
#define SUBMENU_ANIMS_BG 1
|
||||
#define SUBMENU_SPRITE_COORDS 2
|
||||
#define SUBMENU_SHADOW_COORDS 3
|
||||
#define SUBMENU_MOVE_BACKGROUNDS 4
|
||||
|
||||
#endif // GUARD_CONSTANTS_POKEMON_SPRITE_VISUALIZER_H
|
||||
|
|
|
|||
|
|
@ -190,6 +190,7 @@ enum AnimFunctionIDs
|
|||
ANIM_SHAKE_GLOW_BLACK_SLOW,
|
||||
ANIM_SHAKE_GLOW_WHITE_SLOW,
|
||||
ANIM_SHAKE_GLOW_PURPLE_SLOW,
|
||||
ANIM_COUNT,
|
||||
};
|
||||
|
||||
enum BackAnim GetSpeciesBackAnimSet(u16 species);
|
||||
|
|
|
|||
|
|
@ -81,10 +81,18 @@ struct PokemonSpriteVisualizer
|
|||
u8 animIdBack;
|
||||
u8 animIdFront;
|
||||
u8 battleEnvironment;
|
||||
u8 moveBackground;
|
||||
u8 currentSubmenu;
|
||||
u8 submenuYpos[3];
|
||||
};
|
||||
|
||||
struct SubmenuText
|
||||
{
|
||||
const u8 *instructions;
|
||||
const u8 *instructionsGender;
|
||||
const u8 *bottomLeft;
|
||||
};
|
||||
|
||||
void CB2_Pokemon_Sprite_Visualizer(void);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1467,11 +1467,11 @@ const struct BattleAnimBackground gBattleAnimBackgroundTable[] =
|
|||
[BG_MAGMA_STORM] = {gBattleAnimBgImage_InAir, gBattleAnimBgPalette_MagmaStorm, gBattleAnimBgTilemap_InAir},
|
||||
[BG_GIGA_IMPACT_OPPONENT] = {gBattleAnimBgImage_GigaImpact, gBattleAnimBgPalette_GigaImpact, gBattleAnimBgTilemap_GigaImpactOpponent},
|
||||
[BG_GIGA_IMPACT_PLAYER] = {gBattleAnimBgImage_GigaImpact, gBattleAnimBgPalette_GigaImpact, gBattleAnimBgTilemap_GigaImpactPlayer},
|
||||
[BG_GIGA_IMPACT_CONTEST] = {gBattleAnimBgImage_GigaImpactContest, gBattleAnimBgPalette_GigaImpact, gBattleAnimBgTilemap_GigaImpactContest},
|
||||
[BG_GIGA_IMPACT_CONTESTS] = {gBattleAnimBgImage_GigaImpactContest, gBattleAnimBgPalette_GigaImpact, gBattleAnimBgTilemap_GigaImpactContest},
|
||||
[BG_TRICK_ROOM] = {gBattleAnimBgImage_TrickRoom, gBattleAnimBgPalette_TrickRoom, gBattleAnimBgTilemap_TrickRoom},
|
||||
[BG_ROCK_WRECKER] = {gBattleAnimBgImage_Hurricane, gBattleAnimBgPalette_RockWrecker, gBattleAnimBgTilemap_Hurricane},
|
||||
[BG_SPACIAL_REND_ON_OPPONENT] = {gBattleAnimBgImage_SpacialRend, gBattleAnimBgPalette_SpacialRend, gBattleAnimBgTilemap_GigaImpactOpponent},
|
||||
[BG_SPACIAL_REND_ON_PLAYER] = {gBattleAnimBgImage_SpacialRend, gBattleAnimBgPalette_SpacialRend, gBattleAnimBgTilemap_GigaImpactPlayer},
|
||||
[BG_SPACIAL_REND_OPPONENT] = {gBattleAnimBgImage_SpacialRend, gBattleAnimBgPalette_SpacialRend, gBattleAnimBgTilemap_GigaImpactOpponent},
|
||||
[BG_SPACIAL_REND_PLAYER] = {gBattleAnimBgImage_SpacialRend, gBattleAnimBgPalette_SpacialRend, gBattleAnimBgTilemap_GigaImpactPlayer},
|
||||
[BG_DARK_VOID] = {gBattleAnimBgImage_Waterfall, gBattleAnimBgPalette_DarkVoid, gBattleAnimBgTilemap_DarkVoid},
|
||||
[BG_WATER] = {gBattleAnimBgImage_HydroPump, gBattleAnimBgPalette_HydroPump, gBattleAnimBgTilemap_HydroPump},
|
||||
[BG_NIGHTMARE] = {gBattleAnimBgImage_Nightmare, gBattleAnimBgPalette_Nightmare, gBattleAnimBgTilemap_Nightmare},
|
||||
|
|
@ -1505,7 +1505,7 @@ const struct BattleAnimBackground gBattleAnimBackgroundTable[] =
|
|||
[BG_BLOOM_DOOM] = {gBattleAnimBgImage_BloomDoom, gBattleAnimBgPalette_BloomDoom, gBattleAnimBgTilemap_BloomDoom},
|
||||
[BG_SHATTERED_PSYCHE] = {gBattleAnimBgImage_ShatteredPsyche, gBattleAnimBgPalette_ShatteredPsyche, gBattleAnimBgTilemap_ShatteredPsyche},
|
||||
[BG_TWINKLE_TACKLE] = {gBattleAnimBgImage_TwinkleTackle, gBattleAnimBgPalette_TwinkleTackle, gBattleAnimBgTilemap_TwinkleTackle},
|
||||
[BG_BLACKHOLE_ECLIPSE] = {gBattleAnimBgImage_BlackholeEclipse, gBattleAnimBgPalette_BlackholeEclipse, gBattleAnimBgTilemap_BlackholeEclipse},
|
||||
[BG_BLACK_HOLE_ECLIPSE] = {gBattleAnimBgImage_BlackholeEclipse, gBattleAnimBgPalette_BlackholeEclipse, gBattleAnimBgTilemap_BlackholeEclipse},
|
||||
[BG_SOULSTEALING_7STAR_STRIKE] = {gBattleAnimBgImage_SoulStealing7StarStrike, gBattleAnimBgPalette_SoulStealing7StarStrike, gBattleAnimBgTilemap_SoulStealing7StarStrike},
|
||||
[BG_MALICIOUS_MOONSAULT] = {gBattleAnimBgImage_MaliciousMoonsault, gBattleAnimBgPalette_MaliciousMoonsault, gBattleAnimBgTilemap_MaliciousMoonsault},
|
||||
[BG_CLANGOROUS_SOULBLAZE] = {gBattleAnimBgImage_ClangorousSoulblaze, gBattleAnimBgPalette_ClangorousSoulblaze, gBattleAnimBgTilemap_ClangorousSoulblaze},
|
||||
|
|
|
|||
|
|
@ -37,8 +37,9 @@
|
|||
#include "trainer_pokemon_sprites.h"
|
||||
|
||||
#include "constants/global.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/battle_anim.h"
|
||||
#include "constants/event_objects.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
|
|
@ -71,8 +72,8 @@ static const struct BgTemplate sBgTemplates[] =
|
|||
},
|
||||
{
|
||||
.bg = 1,
|
||||
.charBaseIndex = 1,
|
||||
.mapBaseIndex = 28,
|
||||
.charBaseIndex = BACKGROUND_1_CHAR_BASE,
|
||||
.mapBaseIndex = BACKGROUND_1_MAP_BASE,
|
||||
.screenSize = 2,
|
||||
.paletteMode = 0,
|
||||
.priority = 0,
|
||||
|
|
@ -89,8 +90,8 @@ static const struct BgTemplate sBgTemplates[] =
|
|||
},
|
||||
{
|
||||
.bg = 3,
|
||||
.charBaseIndex = 2,
|
||||
.mapBaseIndex = 26,
|
||||
.charBaseIndex = BACKGROUND_3_CHAR_BASE,
|
||||
.mapBaseIndex = BACKGROUND_3_MAP_BASE,
|
||||
.screenSize = 1,
|
||||
.paletteMode = 0,
|
||||
.priority = 3,
|
||||
|
|
@ -98,10 +99,14 @@ static const struct BgTemplate sBgTemplates[] =
|
|||
},
|
||||
};
|
||||
|
||||
#define TEXT_AREA_Y 14
|
||||
#define TEXT_AREA_HEIGHT 6
|
||||
|
||||
//WindowTemplates
|
||||
static const struct WindowTemplate sPokemonSpriteVisualizerWindowTemplate[] =
|
||||
{
|
||||
[WIN_NAME_NUMBERS] = {
|
||||
[WIN_NAME_NUMBERS] =
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 15,
|
||||
.tilemapTop = 12,
|
||||
|
|
@ -110,7 +115,8 @@ static const struct WindowTemplate sPokemonSpriteVisualizerWindowTemplate[] =
|
|||
.paletteNum = 0xF,
|
||||
.baseBlock = 1
|
||||
},
|
||||
[WIN_INSTRUCTIONS] = {
|
||||
[WIN_INSTRUCTIONS] =
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 0,
|
||||
.tilemapTop = 0,
|
||||
|
|
@ -119,21 +125,23 @@ static const struct WindowTemplate sPokemonSpriteVisualizerWindowTemplate[] =
|
|||
.paletteNum = 0xF,
|
||||
.baseBlock = 1 + 30
|
||||
},
|
||||
[WIN_BOTTOM_LEFT] = {
|
||||
[WIN_BOTTOM_LEFT] =
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 14,
|
||||
.tilemapTop = TEXT_AREA_Y,
|
||||
.width = 6,
|
||||
.height = 6,
|
||||
.height = TEXT_AREA_HEIGHT,
|
||||
.paletteNum = 0xF,
|
||||
.baseBlock = 1 + 30 + 60
|
||||
},
|
||||
[WIN_BOTTOM_RIGHT] = {
|
||||
[WIN_BOTTOM_RIGHT] =
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 7,
|
||||
.tilemapTop = 14,
|
||||
.tilemapTop = TEXT_AREA_Y,
|
||||
.width = 24,
|
||||
.height = 6,
|
||||
.height = TEXT_AREA_HEIGHT,
|
||||
.paletteNum = 0xF,
|
||||
.baseBlock = 1 + 30 + 60 + 36
|
||||
},
|
||||
|
|
@ -141,7 +149,7 @@ static const struct WindowTemplate sPokemonSpriteVisualizerWindowTemplate[] =
|
|||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 27,
|
||||
.tilemapTop = 14,
|
||||
.tilemapTop = TEXT_AREA_Y,
|
||||
.width = 2,
|
||||
.height = 2,
|
||||
.paletteNum = 0xF,
|
||||
|
|
@ -338,6 +346,95 @@ const u8 gFrontAnimNames[][34] =
|
|||
[ANIM_SHAKE_GLOW_PURPLE_SLOW] = _("SHAKE GLOW PURPLE SLOW"),
|
||||
};
|
||||
|
||||
#define MOVE_BACKGROUND_NAME_LENGTH 28
|
||||
const u8 gMoveBackgroundNames[BG_COUNT][MOVE_BACKGROUND_NAME_LENGTH] =
|
||||
{
|
||||
[BG_NONE] = _("None"),
|
||||
[BG_DARK] = _("Dark"),
|
||||
[BG_GHOST] = _("Ghost"),
|
||||
[BG_PSYCHIC] = _("Psychic"),
|
||||
[BG_IMPACT_OPPONENT] = _("Impact - Opponent"),
|
||||
[BG_IMPACT_PLAYER] = _("Impact - Player"),
|
||||
[BG_IMPACT_CONTESTS] = _("Impact - Contests"),
|
||||
[BG_DRILL] = _("Drill"),
|
||||
[BG_DRILL_CONTESTS] = _("Drill - Contests"),
|
||||
[BG_HIGHSPEED_OPPONENT] = _("High-Speed - Opponent"),
|
||||
[BG_HIGHSPEED_PLAYER] = _("High-Speed - Player"),
|
||||
[BG_THUNDER] = _("Thunder"),
|
||||
[BG_GUILLOTINE_OPPONENT] = _("Guillotine - Opponent"),
|
||||
[BG_GUILLOTINE_PLAYER] = _("Guillotine - Player"),
|
||||
[BG_GUILLOTINE_CONTESTS] = _("Guillotine - Contests"),
|
||||
[BG_ICE] = _("Ice"),
|
||||
[BG_COSMIC] = _("Cosmic"),
|
||||
[BG_IN_AIR] = _("In Air"),
|
||||
[BG_SKY] = _("Sky"),
|
||||
[BG_SKY_CONTESTS] = _("Sky - Contests"),
|
||||
[BG_AURORA] = _("Aurora"),
|
||||
[BG_FISSURE] = _("Fissure"),
|
||||
[BG_BUG_OPPONENT] = _("Bug - Opponent"),
|
||||
[BG_BUG_PLAYER] = _("Bug - Player"),
|
||||
[BG_SOLAR_BEAM_OPPONENT] = _("Solar Beam - Opponent"),
|
||||
[BG_SOLAR_BEAM_PLAYER] = _("Solar Beam - Player"),
|
||||
[BG_SOLAR_BEAM_CONTESTS] = _("Solar Beam - Contests"),
|
||||
[BG_MAGMA_STORM] = _("Magma Storm"),
|
||||
[BG_GIGA_IMPACT_OPPONENT] = _("Giga Impact - Opponent"),
|
||||
[BG_GIGA_IMPACT_PLAYER] = _("Giga Impact - Player"),
|
||||
[BG_GIGA_IMPACT_CONTESTS] = _("Giga Impact - Contests"),
|
||||
[BG_TRICK_ROOM] = _("Trick Room"),
|
||||
[BG_ROCK_WRECKER] = _("Rock Wrecker"),
|
||||
[BG_SPACIAL_REND_OPPONENT] = _("Spacial Rend - Opponent"),
|
||||
[BG_SPACIAL_REND_PLAYER] = _("Spacial Rend - Player"),
|
||||
[BG_DARK_VOID] = _("Dark Void"),
|
||||
[BG_WATER] = _("Water"),
|
||||
[BG_NIGHTMARE] = _("Nightmare"),
|
||||
[BG_LEAF_STORM] = _("Leaf Storm"),
|
||||
[BG_FIRE] = _("Fire"),
|
||||
[BG_FIRE_2] = _("Fire 2"),
|
||||
[BG_WATER_2] = _("Water 2"),
|
||||
[BG_POISON] = _("Poison"),
|
||||
[BG_AEROBLAST] = _("Aeroblast"),
|
||||
[BG_HURRICANE] = _("Hurricane"),
|
||||
[BG_ELECTRIC_TERRAIN] = _("Electric Terrain"),
|
||||
[BG_GRASSY_TERRAIN] = _("Grassy Terrain"),
|
||||
[BG_MISTY_TERRAIN] = _("Misty Terrain"),
|
||||
[BG_PSYCHIC_TERRAIN] = _("Psychic Terrain"),
|
||||
[BG_FOCUS_BLAST] = _("Focus Blast"),
|
||||
[BG_GUNK_SHOT] = _("Gunk Shot"),
|
||||
[BG_HYDRO_CANNON] = _("Hydro Cannon"),
|
||||
[BG_WONDER_ROOM] = _("Wonder Room"),
|
||||
[BG_MAGIC_ROOM] = _("Magic Room"),
|
||||
[BG_HYPERSPACE_FURY] = _("Hyperspace Fury"),
|
||||
[BG_BOLT_STRIKE] = _("Bolt Strike"),
|
||||
[BG_ZMOVE_ACTIVATE] = _("Z-Move Activate"),
|
||||
[BG_TECTONIC_RAGE] = _("Tectonic Rage"),
|
||||
[BG_ROCK_FIELD_DAY] = _("Rock Field - Day"),
|
||||
[BG_ROCK_FIELD_AFTERNOON] = _("Rock Field - Afternoon"),
|
||||
[BG_ROCK_FIELD_NIGHT] = _("Rock Field - Night"),
|
||||
[BG_ZMOVE_MOUNTAIN] = _("Z-Move Mountain"),
|
||||
[BG_NEVERENDING_NIGHTMARE] = _("Never-Ending Nightmare"),
|
||||
[BG_WATER_PULSE] = _("Water Pulse"),
|
||||
[BG_INFERNO_OVERDRIVE] = _("Inferno Overdrive"),
|
||||
[BG_BLOOM_DOOM] = _("Bloom Doom"),
|
||||
[BG_SHATTERED_PSYCHE] = _("Shattered Psyche"),
|
||||
[BG_TWINKLE_TACKLE] = _("Twinkle Tackle"),
|
||||
[BG_BLACK_HOLE_ECLIPSE] = _("Black Hole Eclipse"),
|
||||
[BG_SOULSTEALING_7STAR_STRIKE] = _("Soul-Stealing 7-Star Strike"),
|
||||
[BG_MALICIOUS_MOONSAULT] = _("Malicious Moonsault"),
|
||||
[BG_CLANGOROUS_SOULBLAZE] = _("Clangorous Soulblaze"),
|
||||
[BG_SNUGGLE_FOREVER] = _("Snuggle Forever"),
|
||||
[BG_MAX_LIGHTNING] = _("Max Lightning"),
|
||||
[BG_GARBAGE_FALLS] = _("Garbage Falls"),
|
||||
[BG_HYPER_BEAM] = _("Hyper Beam"),
|
||||
[BG_DYNAMAX_CANNON] = _("Dynamax Cannon"),
|
||||
[BG_AURA_SPHERE] = _("Aura Sphere"),
|
||||
[BG_STEEL_BEAM_OPPONENT] = _("Steel Beam - Opponent"),
|
||||
[BG_STEEL_BEAM_PLAYER] = _("Steel Beam - Player"),
|
||||
[BG_CHLOROBLAST] = _("Chloroblast"),
|
||||
[BG_RAINBOW_PLAYER] = _("Rainbow - Player"),
|
||||
[BG_RAINBOW_OPPONENT] = _("Rainbow - Opponent"),
|
||||
[BG_SWAMP] = _("Swamp"),
|
||||
};
|
||||
|
||||
const u8 sShadowSizeLabels[][4] =
|
||||
{
|
||||
[SHADOW_SIZE_S] = _(" S"),
|
||||
|
|
@ -372,71 +469,77 @@ static void UNUSED PadString(const u8 *src, u8 *dst)
|
|||
dst[i] = EOS;
|
||||
}
|
||||
|
||||
static const struct SubmenuText sSubmenuText[] =
|
||||
{
|
||||
[SUBMENU_SPECIES] =
|
||||
{
|
||||
.instructions = COMPOUND_STRING("{START_BUTTON} Shiny\n{B_BUTTON} Exit {A_BUTTON} Anims and BG$"),
|
||||
.instructionsGender = COMPOUND_STRING("{START_BUTTON} Shiny {SELECT_BUTTON} Gender\n{B_BUTTON} Exit {A_BUTTON} Anims and BG$"),
|
||||
},
|
||||
|
||||
[SUBMENU_ANIMS_BG] =
|
||||
{
|
||||
.instructions = COMPOUND_STRING("{START_BUTTON} Shiny\n{B_BUTTON} Back {A_BUTTON} Sprite Coords$"),
|
||||
.instructionsGender = COMPOUND_STRING("{START_BUTTON} Shiny {SELECT_BUTTON} Gender\n{B_BUTTON} Back {A_BUTTON} Sprite Coords$"),
|
||||
},
|
||||
|
||||
[SUBMENU_SPRITE_COORDS] =
|
||||
{
|
||||
#if B_ENEMY_MON_SHADOW_STYLE >= GEN_4 && P_GBA_STYLE_SPECIES_GFX == FALSE
|
||||
.instructions = COMPOUND_STRING("{START_BUTTON} Shiny\n{B_BUTTON} Back {A_BUTTON} Shadow Coords$"),
|
||||
.instructionsGender = COMPOUND_STRING("{START_BUTTON} Shiny {SELECT_BUTTON} Gender\n{B_BUTTON} Back {A_BUTTON} Shadow Coords$"),
|
||||
#else
|
||||
.instructions = COMPOUND_STRING("{START_BUTTON} Shiny\n{B_BUTTON} Back {A_BUTTON} Move BGs$"),
|
||||
.instructionsGender = COMPOUND_STRING("{START_BUTTON} Shiny {SELECT_BUTTON} Gender\n{B_BUTTON} Back {A_BUTTON} Move BGs$"),
|
||||
#endif
|
||||
.bottomLeft = COMPOUND_STRING("B coords:\nF coords:\nF elev:"),
|
||||
},
|
||||
|
||||
[SUBMENU_SHADOW_COORDS] =
|
||||
{
|
||||
#if B_ENEMY_MON_SHADOW_STYLE >= GEN_4 && P_GBA_STYLE_SPECIES_GFX == FALSE
|
||||
.instructions = COMPOUND_STRING("{START_BUTTON} Shiny\n{B_BUTTON} Back {A_BUTTON} Move BGs$"),
|
||||
.instructionsGender = COMPOUND_STRING("{START_BUTTON} Shiny\n{B_BUTTON} Back {A_BUTTON} Move BGs$"),
|
||||
#else
|
||||
.instructions = COMPOUND_STRING("$"),
|
||||
.instructionsGender = COMPOUND_STRING("$"),
|
||||
#endif
|
||||
.bottomLeft = COMPOUND_STRING("X coords:\nY coords:\nSize:"),
|
||||
},
|
||||
|
||||
[SUBMENU_MOVE_BACKGROUNDS] =
|
||||
{
|
||||
.instructions = COMPOUND_STRING("{START_BUTTON} Shiny\n{B_BUTTON} Back$"),
|
||||
.instructionsGender = COMPOUND_STRING("{START_BUTTON} Shiny {SELECT_BUTTON} Gender\n{B_BUTTON} Back$"),
|
||||
.bottomLeft = COMPOUND_STRING("Move BG:"),
|
||||
},
|
||||
};
|
||||
|
||||
static void PrintInstructionsOnWindow(struct PokemonSpriteVisualizer *data)
|
||||
{
|
||||
u8 fontId = 0;
|
||||
u8 fontId = FONT_SMALL;
|
||||
u8 x = 2;
|
||||
u8 textInstructions[] = _("{START_BUTTON} Shiny\n{B_BUTTON} Exit {A_BUTTON} Anims and BG$");
|
||||
u8 textInstructionsGender[] = _("{START_BUTTON} Shiny {SELECT_BUTTON} Gender\n{B_BUTTON} Exit {A_BUTTON} Anims and BG$");
|
||||
u8 textInstructionsSubmenuOne[] = _("{START_BUTTON} Shiny\n{B_BUTTON} Back {A_BUTTON} Sprite Coords$");
|
||||
u8 textInstructionsSubmenuOneGender[] = _("{START_BUTTON} Shiny {SELECT_BUTTON} Gender\n{B_BUTTON} Back {A_BUTTON} Sprite Coords$");
|
||||
#if B_ENEMY_MON_SHADOW_STYLE >= GEN_4 && P_GBA_STYLE_SPECIES_GFX == FALSE
|
||||
u8 textInstructionsSubmenuTwo[] = _("{START_BUTTON} Shiny\n{B_BUTTON} Back {A_BUTTON} Shadow Coords$");
|
||||
u8 textInstructionsSubmenuTwoGender[] = _("{START_BUTTON} Shiny {SELECT_BUTTON} Gender\n{B_BUTTON} Back {A_BUTTON} Shadow Coords$");
|
||||
u8 textInstructionsSubmenuThree[] = _("{START_BUTTON} Shiny\n{B_BUTTON} Back");
|
||||
u8 textInstructionsSubmenuThreeGender[] = _("{START_BUTTON} Shiny {SELECT_BUTTON} Gender\n{B_BUTTON} Back$");
|
||||
#else
|
||||
u8 textInstructionsSubmenuTwo[] = _("{START_BUTTON} Shiny\n{B_BUTTON} Back$");
|
||||
u8 textInstructionsSubmenuTwoGender[] = _("{START_BUTTON} Shiny {SELECT_BUTTON} Gender\n{B_BUTTON} Back$");
|
||||
u8 textInstructionsSubmenuThree[] = _("$");
|
||||
u8 textInstructionsSubmenuThreeGender[] = _("$");
|
||||
#endif
|
||||
|
||||
u16 species = data->modifyArrows.currValue;
|
||||
|
||||
u8 textBottom[] = _("BACK:\nFRONT:\nBG:$");
|
||||
u8 textBottomForms[] = _("BACK:\nFRONT:\nBG:\nFORMS:$");
|
||||
u8 textBottomSubmenuTwo[] = _("B coords:\nF coords:\nF elev:");
|
||||
u8 textBottomSubmenuThree[] = _("X coords:\nY coords:\nSize:");
|
||||
u16 species = data->modifyArrows.currValue;
|
||||
|
||||
u8 textL[] = _("{L_BUTTON}");
|
||||
u8 textR[] = _("{R_BUTTON}");
|
||||
|
||||
//Instruction window
|
||||
FillWindowPixelBuffer(WIN_INSTRUCTIONS, 0x11);
|
||||
if (data->currentSubmenu == 0)
|
||||
{
|
||||
if (SpeciesHasGenderDifferences(species))
|
||||
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsGender, x, 0, 0, NULL);
|
||||
else
|
||||
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructions, x, 0, 0, NULL);
|
||||
}
|
||||
else if (data->currentSubmenu == 1)
|
||||
{
|
||||
if (SpeciesHasGenderDifferences(species))
|
||||
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuOneGender, x, 0, 0, NULL);
|
||||
else
|
||||
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuOne, x, 0, 0, NULL);
|
||||
}
|
||||
else if (data->currentSubmenu == 2)
|
||||
{
|
||||
if (SpeciesHasGenderDifferences(species))
|
||||
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuTwoGender, x, 0, 0, NULL);
|
||||
else
|
||||
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuTwo, x, 0, 0, NULL);
|
||||
}
|
||||
else if (data->currentSubmenu == 3)
|
||||
{
|
||||
if (SpeciesHasGenderDifferences(species))
|
||||
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuThreeGender, x, 0, 0, NULL);
|
||||
else
|
||||
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuThree, x, 0, 0, NULL);
|
||||
}
|
||||
|
||||
if (SpeciesHasGenderDifferences(species))
|
||||
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, sSubmenuText[data->currentSubmenu].instructionsGender, x, 0, 0, NULL);
|
||||
else
|
||||
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, sSubmenuText[data->currentSubmenu].instructions, x, 0, 0, NULL);
|
||||
|
||||
CopyWindowToVram(WIN_INSTRUCTIONS, COPYWIN_FULL);
|
||||
|
||||
//Bottom left text
|
||||
FillWindowPixelBuffer(WIN_BOTTOM_LEFT, PIXEL_FILL(0));
|
||||
if (data->currentSubmenu < 2)
|
||||
if ((data->currentSubmenu == SUBMENU_SPECIES) || (data->currentSubmenu == SUBMENU_ANIMS_BG))
|
||||
{
|
||||
AddTextPrinterParameterized(WIN_BOTTOM_LEFT, fontId, textL, 30, 0, 0, NULL);
|
||||
AddTextPrinterParameterized(WIN_BOTTOM_LEFT, fontId, textR, 30, 12, 0, NULL);
|
||||
|
|
@ -445,10 +548,8 @@ static void PrintInstructionsOnWindow(struct PokemonSpriteVisualizer *data)
|
|||
else
|
||||
AddTextPrinterParameterized(WIN_BOTTOM_LEFT, fontId, textBottom, 0, 0, 0, NULL);
|
||||
}
|
||||
else if (data->currentSubmenu == 2)
|
||||
AddTextPrinterParameterized(WIN_BOTTOM_LEFT, fontId, textBottomSubmenuTwo, 0, 0, 0, NULL);
|
||||
else if (data->currentSubmenu == 3)
|
||||
AddTextPrinterParameterized(WIN_BOTTOM_LEFT, fontId, textBottomSubmenuThree, 0, 0, 0, NULL);
|
||||
else
|
||||
AddTextPrinterParameterized(WIN_BOTTOM_LEFT, fontId, sSubmenuText[data->currentSubmenu].bottomLeft, 0, 0, 0, NULL);
|
||||
}
|
||||
|
||||
static void VBlankCB(void)
|
||||
|
|
@ -544,20 +645,21 @@ static void SetArrowInvisibility(struct PokemonSpriteVisualizer *data)
|
|||
{
|
||||
switch (data->currentSubmenu)
|
||||
{
|
||||
case 0:
|
||||
case SUBMENU_SPECIES:
|
||||
gSprites[data->modifyArrows.arrowSpriteId[0]].invisible = FALSE;
|
||||
gSprites[data->modifyArrows.arrowSpriteId[1]].invisible = FALSE;
|
||||
gSprites[data->optionArrows.arrowSpriteId[0]].invisible = TRUE;
|
||||
gSprites[data->yPosModifyArrows.arrowSpriteId[0]].invisible = TRUE;
|
||||
break;
|
||||
case 1:
|
||||
case SUBMENU_ANIMS_BG:
|
||||
case SUBMENU_MOVE_BACKGROUNDS:
|
||||
gSprites[data->modifyArrows.arrowSpriteId[0]].invisible = TRUE;
|
||||
gSprites[data->modifyArrows.arrowSpriteId[1]].invisible = TRUE;
|
||||
gSprites[data->optionArrows.arrowSpriteId[0]].invisible = FALSE;
|
||||
gSprites[data->yPosModifyArrows.arrowSpriteId[0]].invisible = TRUE;
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case SUBMENU_SPRITE_COORDS:
|
||||
case SUBMENU_SHADOW_COORDS:
|
||||
gSprites[data->modifyArrows.arrowSpriteId[0]].invisible = TRUE;
|
||||
gSprites[data->modifyArrows.arrowSpriteId[1]].invisible = TRUE;
|
||||
gSprites[data->optionArrows.arrowSpriteId[0]].invisible = TRUE;
|
||||
|
|
@ -864,8 +966,8 @@ static void LoadAndCreateEnemyShadowSpriteCustom(struct PokemonSpriteVisualizer
|
|||
//Battle background functions
|
||||
static void LoadBattleBg(enum BattleEnvironments battleEnvironment)
|
||||
{
|
||||
DecompressDataWithHeaderVram(gBattleEnvironmentInfo[battleEnvironment].background.tileset, (void *)(BG_CHAR_ADDR(2)));
|
||||
DecompressDataWithHeaderVram(gBattleEnvironmentInfo[battleEnvironment].background.tilemap, (void *)(BG_SCREEN_ADDR(26)));
|
||||
DecompressDataWithHeaderVram(gBattleEnvironmentInfo[battleEnvironment].background.tileset, (void *)(BG_CHAR_ADDR(BACKGROUND_3_CHAR_BASE)));
|
||||
DecompressDataWithHeaderVram(gBattleEnvironmentInfo[battleEnvironment].background.tilemap, (void *)(BG_SCREEN_ADDR(BACKGROUND_3_MAP_BASE)));
|
||||
LoadPalette(gBattleEnvironmentInfo[battleEnvironment].background.palette, BG_PLTT_ID(2), 3 * PLTT_SIZE_4BPP);
|
||||
}
|
||||
|
||||
|
|
@ -898,6 +1000,44 @@ static void UpdateBattleBg(u8 taskId, bool8 increment)
|
|||
LoadBattleBg(data->battleEnvironment);
|
||||
}
|
||||
|
||||
//Move background functions
|
||||
static void LoadMoveBackground(u8 moveBackground)
|
||||
{
|
||||
DecompressDataWithHeaderVram(gBattleAnimBackgroundTable[moveBackground].tilemap, (void *)BG_SCREEN_ADDR(BACKGROUND_3_MAP_BASE));
|
||||
DecompressDataWithHeaderVram(gBattleAnimBackgroundTable[moveBackground].image, (void *)BG_CHAR_ADDR(BACKGROUND_3_CHAR_BASE));
|
||||
LoadPalette(gBattleAnimBackgroundTable[moveBackground].palette, BG_PLTT_ID(2), PLTT_SIZE_4BPP);
|
||||
//Fill text area with white to avoid overlap with backgrounds
|
||||
CpuFill32(0x11111111, (void *)(BG_CHAR_ADDR(BACKGROUND_1_CHAR_BASE) + TILE_OFFSET_4BPP(1)), TILE_SIZE_4BPP);
|
||||
CpuFill32(0xF001F001, (void *)(BG_SCREEN_ADDR(BACKGROUND_1_MAP_BASE) + sizeof(u16) * 32 * TEXT_AREA_Y), sizeof(u16) * 32 * TEXT_AREA_HEIGHT);
|
||||
}
|
||||
|
||||
static void PrintMoveBackgroundName(u8 moveBackground)
|
||||
{
|
||||
FillWindowPixelBuffer(WIN_BOTTOM_RIGHT, PIXEL_FILL(0));
|
||||
AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, FONT_SMALL, gMoveBackgroundNames[moveBackground], 0, 0, 0, NULL);
|
||||
}
|
||||
|
||||
static void UpdateMoveBackground(u8 taskId, bool8 increment)
|
||||
{
|
||||
struct PokemonSpriteVisualizer *data = GetStructPtr(taskId);
|
||||
|
||||
if (increment)
|
||||
{
|
||||
data->moveBackground = (data->moveBackground + 1) % BG_COUNT;
|
||||
if (data->moveBackground == BG_NONE)
|
||||
data->moveBackground = BG_DARK;
|
||||
}
|
||||
else
|
||||
{
|
||||
data->moveBackground -= 1;
|
||||
if (data->moveBackground == BG_NONE)
|
||||
data->moveBackground = BG_SWAMP;
|
||||
}
|
||||
|
||||
PrintMoveBackgroundName(data->moveBackground);
|
||||
LoadMoveBackground(data->moveBackground);
|
||||
}
|
||||
|
||||
static void DrawFollowerSprite(struct PokemonSpriteVisualizer *data)
|
||||
{
|
||||
if (!OW_POKEMON_OBJECT_EVENTS)
|
||||
|
|
@ -1254,7 +1394,7 @@ static void ApplyOffsetSpriteValues(struct PokemonSpriteVisualizer *data)
|
|||
//Front
|
||||
gSprites[data->frontspriteId].y = GetBattlerSpriteFinal_YCustom(species, data->offsetsSpriteValues.offset_front_picCoords, data->offsetsSpriteValues.offset_front_elevation);
|
||||
|
||||
if (data->currentSubmenu == 2)
|
||||
if (data->currentSubmenu == SUBMENU_SPRITE_COORDS)
|
||||
UpdateShadowSpriteInvisible(data);
|
||||
}
|
||||
|
||||
|
|
@ -1285,15 +1425,10 @@ static void UpdateSubmenuOneOptionValue(u8 taskId, bool8 increment)
|
|||
break;
|
||||
case 1:
|
||||
if (increment)
|
||||
{
|
||||
if (data->animIdFront >= ANIM_SHAKE_GLOW_PURPLE_SLOW)
|
||||
data->animIdFront = 0;
|
||||
else
|
||||
data->animIdFront += 1;
|
||||
}
|
||||
data->animIdFront = (data->animIdFront + 1) % ANIM_COUNT;
|
||||
else
|
||||
{
|
||||
if (data->animIdFront <= 0)
|
||||
if (data->animIdFront == ANIM_V_SQUISH_AND_BOUNCE)
|
||||
data->animIdFront = ANIM_SHAKE_GLOW_PURPLE_SLOW;
|
||||
else
|
||||
data->animIdFront -= 1;
|
||||
|
|
@ -1496,15 +1631,29 @@ static void UpdateShadowSizeValue(u8 taskId, bool8 increment)
|
|||
gSprites[data->frontShadowSpriteIdSecondary].oam.tileNum += (8 * update);
|
||||
}
|
||||
|
||||
#define READ_PTR_FROM_TASK(taskId, dataId) \
|
||||
(void *)( \
|
||||
((u16)(gTasks[taskId].data[dataId]) | \
|
||||
static void UpdateSubmenuFourOptionValue(u8 taskId, bool8 increment)
|
||||
{
|
||||
struct PokemonSpriteVisualizer *data = GetStructPtr(taskId);
|
||||
|
||||
switch (data->submenuYpos[1])
|
||||
{
|
||||
case 0:
|
||||
UpdateMoveBackground(taskId, increment);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#define READ_PTR_FROM_TASK(taskId, dataId) \
|
||||
(void *)( \
|
||||
((u16)(gTasks[taskId].data[dataId]) | \
|
||||
((u16)(gTasks[taskId].data[dataId + 1]) << 16)))
|
||||
|
||||
#define STORE_PTR_IN_TASK(ptr, taskId, dataId) \
|
||||
{ \
|
||||
gTasks[taskId].data[dataId] = (u32)(ptr); \
|
||||
gTasks[taskId].data[dataId + 1] = (u32)(ptr) >> 16; \
|
||||
#define STORE_PTR_IN_TASK(ptr, taskId, dataId) \
|
||||
{ \
|
||||
gTasks[taskId].data[dataId] = (u32)(ptr); \
|
||||
gTasks[taskId].data[dataId + 1] = (u32)(ptr) >> 16; \
|
||||
}
|
||||
|
||||
#define sAnimId data[2]
|
||||
|
|
@ -1519,6 +1668,41 @@ static void Task_AnimateAfterDelay(u8 taskId)
|
|||
}
|
||||
}
|
||||
|
||||
static void OpenSubmenu(u32 submenu, u8 taskId)
|
||||
{
|
||||
struct PokemonSpriteVisualizer *data = GetStructPtr(taskId);
|
||||
data->currentSubmenu = submenu;
|
||||
PrintInstructionsOnWindow(data);
|
||||
SetArrowInvisibility(data);
|
||||
|
||||
switch(submenu)
|
||||
{
|
||||
case SUBMENU_SPECIES:
|
||||
case SUBMENU_ANIMS_BG:
|
||||
break;
|
||||
case SUBMENU_SPRITE_COORDS:
|
||||
SetConstSpriteValues(data);
|
||||
UpdateYPosOffsetText(data);
|
||||
break;
|
||||
case SUBMENU_SHADOW_COORDS:
|
||||
UpdateShadowSettingsText(data);
|
||||
break;
|
||||
case SUBMENU_MOVE_BACKGROUNDS:
|
||||
if (data->submenuYpos[1] > 0)
|
||||
data->submenuYpos[1] = 0;
|
||||
|
||||
data->optionArrows.currentDigit = data->submenuYpos[1];
|
||||
gSprites[data->optionArrows.arrowSpriteId[0]].y = OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12;
|
||||
data->moveBackground = BG_DARK;
|
||||
PrintMoveBackgroundName(data->moveBackground);
|
||||
LoadMoveBackground(data->moveBackground);
|
||||
break;
|
||||
default:
|
||||
errorf("Invalid submenu index %d", submenu);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void HandleInput_PokemonSpriteVisualizer(u8 taskId)
|
||||
{
|
||||
struct PokemonSpriteVisualizer *data = GetStructPtr(taskId);
|
||||
|
|
@ -1572,13 +1756,11 @@ static void HandleInput_PokemonSpriteVisualizer(u8 taskId)
|
|||
PlaySE(SE_DEX_SCROLL);
|
||||
}
|
||||
|
||||
if (data->currentSubmenu == 0)
|
||||
if (data->currentSubmenu == SUBMENU_SPECIES)
|
||||
{
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
data->currentSubmenu = 1;
|
||||
SetArrowInvisibility(data);
|
||||
PrintInstructionsOnWindow(data);
|
||||
OpenSubmenu(SUBMENU_ANIMS_BG, taskId);
|
||||
}
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
|
|
@ -1638,32 +1820,25 @@ static void HandleInput_PokemonSpriteVisualizer(u8 taskId)
|
|||
gSprites[data->modifyArrows.arrowSpriteId[1]].x2 += 6;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if (data->currentSubmenu == 1) //Submenu 1
|
||||
else if (data->currentSubmenu == SUBMENU_ANIMS_BG)
|
||||
{
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
data->currentSubmenu = 2;
|
||||
PrintInstructionsOnWindow(data);
|
||||
SetArrowInvisibility(data);
|
||||
SetConstSpriteValues(data);
|
||||
UpdateYPosOffsetText(data);
|
||||
OpenSubmenu(SUBMENU_SPRITE_COORDS, taskId);
|
||||
|
||||
if (data->followerspriteId != 0)
|
||||
gSprites[data->followerspriteId].invisible = TRUE;
|
||||
}
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
data->currentSubmenu = 0;
|
||||
OpenSubmenu(SUBMENU_SPECIES, taskId);
|
||||
if (data->submenuYpos[1] == 3)
|
||||
{
|
||||
data->submenuYpos[1] = 2;
|
||||
data->optionArrows.currentDigit = data->submenuYpos[1];
|
||||
gSprites[data->optionArrows.arrowSpriteId[0]].y = OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12;
|
||||
}
|
||||
SetArrowInvisibility(data);
|
||||
PrintInstructionsOnWindow(data);
|
||||
}
|
||||
else if (JOY_NEW(DPAD_DOWN))
|
||||
{
|
||||
|
|
@ -1700,21 +1875,18 @@ static void HandleInput_PokemonSpriteVisualizer(u8 taskId)
|
|||
UpdateSubmenuOneOptionValue(taskId, TRUE);
|
||||
}
|
||||
}
|
||||
else if (data->currentSubmenu == 2) //Submenu 2
|
||||
else if (data->currentSubmenu == SUBMENU_SPRITE_COORDS)
|
||||
{
|
||||
if (JOY_NEW(A_BUTTON) && B_ENEMY_MON_SHADOW_STYLE >= GEN_4 && P_GBA_STYLE_SPECIES_GFX == FALSE)
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
data->currentSubmenu = 3;
|
||||
PrintInstructionsOnWindow(data);
|
||||
SetArrowInvisibility(data);
|
||||
UpdateShadowSettingsText(data);
|
||||
if (B_ENEMY_MON_SHADOW_STYLE >= GEN_4 && P_GBA_STYLE_SPECIES_GFX == FALSE)
|
||||
OpenSubmenu(SUBMENU_SHADOW_COORDS, taskId);
|
||||
else
|
||||
OpenSubmenu(SUBMENU_MOVE_BACKGROUNDS, taskId);
|
||||
}
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
data->currentSubmenu = 1;
|
||||
|
||||
SetArrowInvisibility(data);
|
||||
PrintInstructionsOnWindow(data);
|
||||
OpenSubmenu(SUBMENU_ANIMS_BG, taskId);
|
||||
UpdateMonAnimNames(taskId);
|
||||
|
||||
if (data->followerspriteId != 0)
|
||||
|
|
@ -1732,7 +1904,7 @@ static void HandleInput_PokemonSpriteVisualizer(u8 taskId)
|
|||
else if (JOY_NEW(DPAD_UP))
|
||||
{
|
||||
if (data->submenuYpos[2] == 0)
|
||||
data->submenuYpos[2] = 2;
|
||||
data->submenuYpos[2] = 2;
|
||||
else
|
||||
data->submenuYpos[2] -= 1;
|
||||
|
||||
|
|
@ -1748,15 +1920,15 @@ static void HandleInput_PokemonSpriteVisualizer(u8 taskId)
|
|||
UpdateSubmenuTwoOptionValue(taskId, TRUE);
|
||||
}
|
||||
}
|
||||
else if (data->currentSubmenu == 3) // Submenu 3
|
||||
else if (data->currentSubmenu == SUBMENU_SHADOW_COORDS)
|
||||
{
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
data->currentSubmenu = 2;
|
||||
PrintInstructionsOnWindow(data);
|
||||
SetArrowInvisibility(data);
|
||||
SetConstSpriteValues(data);
|
||||
UpdateYPosOffsetText(data);
|
||||
OpenSubmenu(SUBMENU_MOVE_BACKGROUNDS, taskId);
|
||||
}
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
OpenSubmenu(SUBMENU_SPRITE_COORDS, taskId);
|
||||
}
|
||||
else if (JOY_NEW(DPAD_DOWN))
|
||||
{
|
||||
|
|
@ -1792,6 +1964,25 @@ static void HandleInput_PokemonSpriteVisualizer(u8 taskId)
|
|||
UpdateShadowSizeValue(taskId, TRUE);
|
||||
}
|
||||
}
|
||||
else if (data->currentSubmenu == SUBMENU_MOVE_BACKGROUNDS)
|
||||
{
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
if (B_ENEMY_MON_SHADOW_STYLE >= GEN_4 && P_GBA_STYLE_SPECIES_GFX == FALSE)
|
||||
OpenSubmenu(SUBMENU_SHADOW_COORDS, taskId);
|
||||
else
|
||||
OpenSubmenu(SUBMENU_SPRITE_COORDS, taskId);
|
||||
LoadBattleBg(data->battleEnvironment);
|
||||
}
|
||||
else if (JOY_NEW(DPAD_LEFT))
|
||||
{
|
||||
UpdateSubmenuFourOptionValue(taskId, FALSE);
|
||||
}
|
||||
else if (JOY_NEW(DPAD_RIGHT))
|
||||
{
|
||||
UpdateSubmenuFourOptionValue(taskId, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
#undef sDelay
|
||||
#undef sAnimId
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user