Clean up field effect doc

This commit is contained in:
GriffinR 2020-07-02 04:59:52 -04:00
parent 8589e138a8
commit 1ce929157f
37 changed files with 226 additions and 245 deletions

View File

@ -24,9 +24,9 @@ gFieldEffectScriptPointers:: @ 82DB9D4
.4byte gFieldEffectScript_JumpSmallSplash @ FLDEFF_JUMP_SMALL_SPLASH
.4byte gFieldEffectScript_LongGrass @ FLDEFF_LONG_GRASS
.4byte gFieldEffectScript_JumpLongGrass @ FLDEFF_JUMP_LONG_GRASS
.4byte gFieldEffectScript_Unknown19 @ FLDEFF_UNKNOWN_19
.4byte gFieldEffectScript_UnusedGrass @ FLDEFF_UNUSED_GRASS
.4byte gFieldEffectScript_UnusedGrass2 @ FLDEFF_UNUSED_GRASS_2
.4byte gFieldEffectScript_Unknown21 @ FLDEFF_UNKNOWN_21
.4byte gFieldEffectScript_UnusedSand @ FLDEFF_UNUSED_SAND
.4byte gFieldEffectScript_WaterSurfacing @ FLDEFF_WATER_SURFACING
.4byte gFieldEffectScript_BerryTreeGrowthSparkle @ FLDEFF_BERRY_TREE_GROWTH_SPARKLE
.4byte gFieldEffectScript_DeepSandFootprints @ FLDEFF_DEEP_SAND_FOOTPRINTS
@ -90,11 +90,11 @@ gFieldEffectScript_Shadow:: @ 82DBAF2
field_eff_end
gFieldEffectScript_TallGrass:: @ 82DBAF8
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo1, FldEff_TallGrass
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_TallGrass
field_eff_end
gFieldEffectScript_Ripple:: @ 82DBB02
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo1, FldEff_Ripple
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_Ripple
field_eff_end
gFieldEffectScript_FieldMoveShowMon:: @ 82DBB0C
@ -102,7 +102,7 @@ gFieldEffectScript_FieldMoveShowMon:: @ 82DBB0C
field_eff_end
gFieldEffectScript_Ash:: @ 82DBB12
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo1, FldEff_Ash
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_Ash
field_eff_end
gFieldEffectScript_SurfBlob:: @ 82DBB1C
@ -114,7 +114,7 @@ gFieldEffectScript_UseSurf:: @ 82DBB22
field_eff_end
gFieldEffectScript_GroundImpactDust:: @ 82DBB28
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_Dust
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_Dust
field_eff_end
gFieldEffectScript_UseSecretPowerCave:: @ 82DBB32
@ -122,47 +122,47 @@ gFieldEffectScript_UseSecretPowerCave:: @ 82DBB32
field_eff_end
gFieldEffectScript_JumpTallGrass:: @ 82DBB38
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo1, FldEff_JumpTallGrass
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_JumpTallGrass
field_eff_end
gFieldEffectScript_SandFootprints:: @ 82DBB42
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_SandFootprints
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_SandFootprints
field_eff_end
gFieldEffectScript_JumpBigSplash:: @ 82DBB4C
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_JumpBigSplash
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_JumpBigSplash
field_eff_end
gFieldEffectScript_Splash:: @ 82DBB56
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_Splash
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_Splash
field_eff_end
gFieldEffectScript_JumpSmallSplash:: @ 82DBB60
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_JumpSmallSplash
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_JumpSmallSplash
field_eff_end
gFieldEffectScript_LongGrass:: @ 82DBB6A
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo1, FldEff_LongGrass
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_LongGrass
field_eff_end
gFieldEffectScript_JumpLongGrass:: @ 82DBB74
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo1, FldEff_JumpLongGrass
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_JumpLongGrass
field_eff_end
gFieldEffectScript_Unknown19:: @ 82DBB7E
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo1, FldEff_Unknown19
gFieldEffectScript_UnusedGrass:: @ 82DBB7E
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_UnusedGrass
field_eff_end
gFieldEffectScript_UnusedGrass2:: @ 82DBB88
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo1, FldEff_UnusedGrass2
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_UnusedGrass2
field_eff_end
gFieldEffectScript_Unknown21:: @ 82DBB92
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_Unknown21
gFieldEffectScript_UnusedSand:: @ 82DBB92
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_UnusedSand
field_eff_end
gFieldEffectScript_WaterSurfacing:: @ 82DBB9C
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_WaterSurfacing
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_WaterSurfacing
field_eff_end
gFieldEffectScript_BerryTreeGrowthSparkle:: @ 82DBBA6
@ -170,12 +170,12 @@ gFieldEffectScript_BerryTreeGrowthSparkle:: @ 82DBBA6
field_eff_end
gFieldEffectScript_DeepSandFootprints:: @ 82DBBAC
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_DeepSandFootprints
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_DeepSandFootprints
field_eff_end
gFieldEffectScript_PokeCenterHeal:: @ 82DBBB6
field_eff_loadfadedpal gFieldEffectObjectPaletteInfo4
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_PokecenterHeal
field_eff_loadfadedpal gSpritePalette_PokeballGlow
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_PokecenterHeal
field_eff_end
gFieldEffectScript_UseSecretPowerTree:: @ 82DBBC5
@ -211,11 +211,11 @@ gFieldEffectScript_QuestionMarkIcon:: @ 82DBBEF
field_eff_end
gFieldEffectScript_FeetInFlowingWater:: @ 82DBBF5
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_FeetInFlowingWater
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_FeetInFlowingWater
field_eff_end
gFieldEffectScript_BikeTireTracks:: @ 82DBBFF
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_BikeTireTracks
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_BikeTireTracks
field_eff_end
gFieldEffectScript_SandDisguisePlaceholder:: @ 82DBC09
@ -227,7 +227,7 @@ gFieldEffectScript_UseRockSmash:: @ 82DBC0F
field_eff_end
gFieldEffectScript_UseStrength:: @ 82DBC15
field_eff_callnative sub_8145E2C
field_eff_callnative FldEff_UseStrength
field_eff_end
gFieldEffectScript_UseDig:: @ 82DBC1B
@ -235,15 +235,15 @@ gFieldEffectScript_UseDig:: @ 82DBC1B
field_eff_end
gFieldEffectScript_SandPile:: @ 82DBC21
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_SandPile
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_SandPile
field_eff_end
gFieldEffectScript_ShortGrass:: @ 82DBC2B
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo1, FldEff_ShortGrass
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_ShortGrass
field_eff_end
gFieldEffectScript_HotSpringsWater:: @ 82DBC35
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo1, FldEff_HotSpringsWater
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_HotSpringsWater
field_eff_end
gFieldEffectScript_UseWaterfall:: @ 82DBC3F
@ -255,12 +255,12 @@ gFieldEffectScript_UseDive:: @ 82DBC45
field_eff_end
gFieldEffectScript_Pokeball:: @ 82DBC4B
field_eff_loadpal gFieldEffectObjectPaletteInfo10
field_eff_loadpal gSpritePalette_Pokeball
field_eff_callnative FldEff_Pokeball
field_eff_end
gFieldEffectScript_HeartIcon:: @ 82DBC56
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_HeartIcon
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_HeartIcon
field_eff_end
gFieldEffectScript_Nop47:: @ 82DBC60
@ -272,11 +272,11 @@ gFieldEffectScript_Nop48:: @ 82DBC66
field_eff_end
gFieldEffectScript_AshPuff:: @ 82DBC6C
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo2, FldEff_AshPuff
field_eff_loadfadedpal_callnative gSpritePalette_Ash, FldEff_AshPuff
field_eff_end
gFieldEffectScript_AshLaunch:: @ 82DBC76
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo2, FldEff_AshLaunch
field_eff_loadfadedpal_callnative gSpritePalette_Ash, FldEff_AshLaunch
field_eff_end
gFieldEffectScript_SweetScent:: @ 82DBC80
@ -288,11 +288,11 @@ gFieldEffectScript_SandPillar:: @ 82DBC86
field_eff_end
gFieldEffectScript_Bubbles:: @ 82DBC90
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_Bubbles
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_Bubbles
field_eff_end
gFieldEffectScript_Sparkle:: @ 82DBC9A
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo3, FldEff_Sparkle
field_eff_loadfadedpal_callnative gSpritePalette_SmallSparkle, FldEff_Sparkle
field_eff_end
gFieldEffectScript_ShowSecretPowerCave:: @ 82DBCA4
@ -308,7 +308,7 @@ gFieldEffectScript_ShowSecretPowerShrub:: @ 82DBCB8
field_eff_end
gFieldEffectScript_ShowCutGrass:: @ 82DBCC2
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo6, FldEff_CutGrass
field_eff_loadfadedpal_callnative gSpritePalette_CutGrass, FldEff_CutGrass
field_eff_end
gFieldEffectScript_FieldMoveShowMonInit:: @ 82DBCCC
@ -324,8 +324,8 @@ gFieldEffectScript_SecretBaseBootPC:: @ 82DBCD8
field_eff_end
gFieldEffectScript_HallOfFameRecord:: @ 82DBCDE
field_eff_loadfadedpal gFieldEffectObjectPaletteInfo4
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo5, FldEff_HallOfFameRecord
field_eff_loadfadedpal gSpritePalette_PokeballGlow
field_eff_loadfadedpal_callnative gSpritePalette_HofMonitor, FldEff_HallOfFameRecord
field_eff_end
gFieldEffectScript_UseTeleport:: @ 82DBCED

View File

@ -1,4 +1,4 @@
@ Interact with cuttable tree
EventScript_CutTree:: @ 82906BB
lockall
goto_if_unset FLAG_BADGE01_GET, EventScript_CheckTreeCantCut
@ -18,7 +18,8 @@ EventScript_CutTree:: @ 82906BB
goto EventScript_CutTreeDown
end
EventScript_FldEffCut:: @ 8290705
@ Use cut from party menu
EventScript_UseCut:: @ 8290705
lockall
dofieldeffect FLDEFF_USE_CUT_ON_TREE
waitstate
@ -58,6 +59,7 @@ Text_CantCut: @ 829077D
.string "This tree looks like it can be\n"
.string "CUT down!$"
@ Interact with smashable rock
EventScript_RockSmash:: @ 82907A6
lockall
goto_if_unset FLAG_BADGE03_GET, EventScript_CantSmashRock
@ -77,7 +79,8 @@ EventScript_RockSmash:: @ 82907A6
goto EventScript_SmashRock
end
EventScript_RockSmashFromPartyMenu:: @ 82907F0
@ Use rock smash from party menu
EventScript_UseRockSmash:: @ 82907F0
lockall
dofieldeffect FLDEFF_USE_ROCK_SMASH
waitstate
@ -141,7 +144,7 @@ EventScript_StrengthBoulder:: @ 82908BA
goto EventScript_ActivateStrength
end
EventScript_FldEffStrength:: @ 82908FD
EventScript_UseStrength:: @ 82908FD
lockall
dofieldeffect FLDEFF_USE_STRENGTH
waitstate

View File

@ -1,4 +1,4 @@
EventScript_FldEffFlash:: @ 82926F8
EventScript_UseFlash:: @ 82926F8
animateflash 1
setflashradius 1
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 673 B

View File

Before

Width:  |  Height:  |  Size: 272 B

After

Width:  |  Height:  |  Size: 272 B

View File

@ -9,7 +9,7 @@ bool8 FldEff_Pokeball(void);
void TransitionPhase1_Task_RunFuncs(u8 taskId);
void GetBg0TilesDst(u16 **tilemap, u16 **tileset);
extern const struct SpritePalette gFieldEffectObjectPaletteInfo10;
extern const struct SpritePalette gSpritePalette_Pokeball;
enum // TRANSITION_MUGSHOT
{

View File

@ -20,9 +20,9 @@
#define FLDEFF_JUMP_SMALL_SPLASH 16
#define FLDEFF_LONG_GRASS 17
#define FLDEFF_JUMP_LONG_GRASS 18
#define FLDEFF_UNKNOWN_19 19
#define FLDEFF_UNUSED_GRASS 19
#define FLDEFF_UNUSED_GRASS_2 20
#define FLDEFF_UNKNOWN_21 21
#define FLDEFF_UNUSED_SAND 21
#define FLDEFF_WATER_SURFACING 22
#define FLDEFF_BERRY_TREE_GROWTH_SPARKLE 23
#define FLDEFF_DEEP_SAND_FOOTPRINTS 24
@ -86,9 +86,9 @@
#define FLDEFFOBJ_JUMP_SMALL_SPLASH 14
#define FLDEFFOBJ_LONG_GRASS 15
#define FLDEFFOBJ_JUMP_LONG_GRASS 16
#define FLDEFFOBJ_17 17
#define FLDEFFOBJ_UNUSED_GRASS 17
#define FLDEFFOBJ_UNUSED_GRASS_2 18
#define FLDEFFOBJ_19 19
#define FLDEFFOBJ_UNUSED_SAND 19
#define FLDEFFOBJ_WATER_SURFACING 20
#define FLDEFFOBJ_REFLECTION_DISTORTION 21
#define FLDEFFOBJ_SPARKLE 22
@ -107,19 +107,17 @@
#define FLDEFFOBJ_SMALL_SPARKLE 35
#define FLDEFFOBJ_RAYQUAZA 36
#define FLDEFF_PAL_TAG_0 0x1000
#define FLDEFF_PAL_TAG_3 0x1003
#define FLDEFF_PAL_TAG_4 0x1004
#define FLDEFF_PAL_TAG_5 0x1005
#define FLDEFF_PAL_TAG_6 0x1006
#define FLDEFF_PAL_TAG_7 0x1007
#define FLDEFF_PAL_TAG_8 0x1008
#define FLDEFF_PAL_TAG_9 0x1009
#define FLDEFF_PAL_TAG_10 0x100A
#define FLDEFF_PAL_TAG_13 0x100D
#define FLDEFF_PAL_TAG_14 0x100E
#define FLDEFF_PAL_TAG_15 0x100F
#define FLDEFF_PAL_TAG_16 0x1010
#define FLDEFF_PAL_TAG_17 0x1011
#define FLDEFF_PAL_TAG_CUT_GRASS 0x1000
#define FLDEFF_PAL_TAG_SECRET_POWER_TREE 0x1003
#define FLDEFF_PAL_TAG_GENERAL_0 0x1004
#define FLDEFF_PAL_TAG_GENERAL_1 0x1005
#define FLDEFF_PAL_TAG_POKEBALL_GLOW 0x1007
#define FLDEFF_PAL_TAG_SECRET_POWER_PLANT 0x1008
#define FLDEFF_PAL_TAG_POKEBALL 0x1009
#define FLDEFF_PAL_TAG_ASH 0x100D
#define FLDEFF_PAL_TAG_SAND_PILLAR 0x100E
#define FLDEFF_PAL_TAG_SMALL_SPARKLE 0x100F
#define FLDEFF_PAL_TAG_HOF_MONITOR 0x1010
#define FLDEFF_PAL_TAG_UNKNOWN 0x1011
#endif // GUARD_FIELD_EFFECT_CONSTANTS_H

View File

@ -100,7 +100,7 @@ void ObjectEventTurnByLocalIdAndMap(u8, u8, u8, u8);
const struct ObjectEventGraphicsInfo *GetObjectEventGraphicsInfo(u8 graphicsId);
void npc_by_local_id_and_map_set_field_1_bit_x20(u8, u8, u8, u8);
void FreeAndReserveObjectSpritePalettes(void);
void sub_808E82C(u8, u8, u8, s16, s16);
void SetObjectEventSpritePosByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y);
void sub_808E7E4(u8, u8, u8);
void sub_808E78C(u8, u8, u8, u8);
void sub_808E75C(s16, s16);

View File

@ -372,10 +372,11 @@ extern const u8 SecretBase_Text_Trainer8Defeated[];
extern const u8 SecretBase_Text_Trainer9Defeated[];
//field effects
extern const u8 EventScript_FldEffStrength[];
extern const u8 EventScript_UseStrength[];
extern const u8 EventScript_FailSweetScent[];
extern const u8 EventScript_FldEffFlash[];
extern const u8 EventScript_RockSmashFromPartyMenu[];
extern const u8 EventScript_UseFlash[];
extern const u8 EventScript_UseCut[];
extern const u8 EventScript_UseRockSmash[];
//player pc
extern const u8 LittlerootTown_BrendansHouse_2F_EventScript_TurnOffPlayerPC[];

View File

@ -9,18 +9,9 @@ bool8 FldEff_CutGrass(void);
void FixLongGrassMetatilesWindowTop(s16 x, s16 y);
void FixLongGrassMetatilesWindowBottom(s16 x, s16 y);
extern const struct SpritePalette gFieldEffectObjectPaletteInfo6;
extern const struct SpritePalette gSpritePalette_CutGrass;
extern struct MapPosition gPlayerFacingPosition;
// groundshake
bool8 sub_81BE66C(void);
void sub_81BE6AC(void);
void sub_81BE6B8(void);
void sub_81BE72C(void);
void sub_81BE79C(void);
void sub_81BE7F4(void);
void sub_81BE994(void);
// escalator
void StartEscalator(bool8 var);
void StopEscalator(void);
@ -39,7 +30,7 @@ bool8 GetMapPairFadeFromType(u8 a1, u8 a2);
// strength
bool8 SetUpFieldMove_Strength(void);
bool8 sub_8145E2C(void);
bool8 FldEff_UseStrength(void);
// sweet scent
bool8 SetUpFieldMove_SweetScent(void);

View File

@ -645,7 +645,7 @@ $(FLDEFFGFXDIR)/unknown_17.4bpp: %.4bpp: %.png
$(FLDEFFGFXDIR)/unused_grass_2.4bpp: %.4bpp: %.png
$(GFX) $< $@ -mwidth 2 -mheight 2
$(FLDEFFGFXDIR)/unknown_19.4bpp: %.4bpp: %.png
$(FLDEFFGFXDIR)/unused_sand.4bpp: %.4bpp: %.png
$(GFX) $< $@ -mwidth 2 -mheight 2
$(FLDEFFGFXDIR)/water_surfacing.4bpp: %.4bpp: %.png
@ -672,8 +672,5 @@ $(FLDEFFGFXDIR)/secret_power_shrub.4bpp: %.4bpp: %.png
$(FLDEFFGFXDIR)/secret_power_tree.4bpp: %.4bpp: %.png
$(GFX) $< $@ -mwidth 2 -mheight 2
$(FLDEFFGFXDIR)/sand_pillar.4bpp: %.4bpp: %.png
$(GFX) $< $@ -mwidth 2 -mheight 4
$(FLDEFFGFXDIR)/record_mix_lights.4bpp: %.4bpp: %.png
$(GFX) $< $@ -mwidth 4 -mheight 1

View File

@ -749,7 +749,7 @@ static const union AffineAnimCmd *const sSpriteAffineAnimTable_Pokeball[] =
static const struct SpriteTemplate sSpriteTemplate_Pokeball =
{
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_9,
.paletteTag = FLDEFF_PAL_TAG_POKEBALL,
.oam = &gObjectEventBaseOam_32x32,
.anims = sSpriteAnimTable_Pokeball,
.images = sSpriteImage_Pokeball,
@ -798,7 +798,7 @@ static const union AnimCmd *const sSpriteAnimTable_UnusedBrendanLass[] =
static const struct SpriteTemplate sSpriteTemplate_UnusedBrendan =
{
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_10,
.paletteTag = 0x100A,
.oam = &sOam_UnusedBrendanLass,
.anims = sSpriteAnimTable_UnusedBrendanLass,
.images = sImageTable_UnusedBrendan,
@ -809,7 +809,7 @@ static const struct SpriteTemplate sSpriteTemplate_UnusedBrendan =
static const struct SpriteTemplate sSpriteTemplate_UnusedLass =
{
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_10,
.paletteTag = 0x100A,
.oam = &sOam_UnusedBrendanLass,
.anims = sSpriteAnimTable_UnusedBrendanLass,
.images = sImageTable_UnusedLass,
@ -817,12 +817,9 @@ static const struct SpriteTemplate sSpriteTemplate_UnusedLass =
.callback = SpriteCb_TrainerPic
};
static const u16 gFieldEffectObjectPalette10[] = INCBIN_U16("graphics/field_effects/palettes/10.gbapal");
static const u16 sFieldEffectPal_Pokeball[] = INCBIN_U16("graphics/field_effects/palettes/pokeball.gbapal");
const struct SpritePalette gFieldEffectObjectPaletteInfo10 =
{
gFieldEffectObjectPalette10, FLDEFF_PAL_TAG_9
};
const struct SpritePalette gSpritePalette_Pokeball = {sFieldEffectPal_Pokeball, FLDEFF_PAL_TAG_POKEBALL};
static const u16 sMugshotPal_Sidney[] = INCBIN_U16("graphics/battle_transitions/sidney_bg.gbapal");
static const u16 sMugshotPal_Phoebe[] = INCBIN_U16("graphics/battle_transitions/phoebe_bg.gbapal");
@ -848,10 +845,7 @@ static const u16 *const sPlayerMugshotsPals[GENDER_COUNT] =
};
static const u16 sUnusedTrainerPalette[] = INCBIN_U16("graphics/battle_transitions/unused_trainer.gbapal");
static const struct SpritePalette sSpritePalette_UnusedTrainer =
{
sUnusedTrainerPalette, FLDEFF_PAL_TAG_10
};
static const struct SpritePalette sSpritePalette_UnusedTrainer = {sUnusedTrainerPalette, 0x100A};
static const u16 sBigPokeball_Tilemap[] = INCBIN_U16("graphics/battle_transitions/big_pokeball_map.bin");
static const u16 sMugshotsTilemap[] = INCBIN_U16("graphics/battle_transitions/elite_four_bg_map.bin");
@ -1323,7 +1317,7 @@ static bool8 Phase2_BigPokeball_Func1(struct Task *task)
GetBg0TilesDst(&tilemap, &tileset);
CpuFill16(0, tilemap, 0x800);
CpuCopy16(sBigPokeball_Tileset, tileset, 0x580);
LoadPalette(gFieldEffectObjectPalette10, 0xF0, 0x20);
LoadPalette(sFieldEffectPal_Pokeball, 0xF0, 0x20);
task->tState++;
return FALSE;
@ -1629,7 +1623,7 @@ static bool8 Phase2_PokeballsTrail_Func1(struct Task *task)
GetBg0TilesDst(&tilemap, &tileset);
CpuSet(sPokeballTrail_Tileset, tileset, 0x20);
CpuFill32(0, tilemap, 0x800);
LoadPalette(gFieldEffectObjectPalette10, 0xF0, 0x20);
LoadPalette(sFieldEffectPal_Pokeball, 0xF0, 0x20);
task->tState++;
return FALSE;
@ -2919,7 +2913,7 @@ static bool8 Phase2_RectangularSpiral_Func1(struct Task *task)
CpuCopy16(sShrinkingBoxTileset, tileset, 0x20);
CpuCopy16(sShrinkingBoxTileset + 0x70, tileset + 0x20, 0x20);
CpuFill16(0xF000, tilemap, 0x800);
LoadPalette(gFieldEffectObjectPalette10, 0xF0, 0x20);
LoadPalette(sFieldEffectPal_Pokeball, 0xF0, 0x20);
task->tData3 = 1;
task->tState++;
@ -3428,7 +3422,7 @@ static bool8 Phase2_GridSquares_Func1(struct Task *task)
GetBg0TilesDst(&tilemap, &tileset);
CpuSet(sShrinkingBoxTileset, tileset, 0x10);
CpuFill16(0xF000, tilemap, 0x800);
LoadPalette(gFieldEffectObjectPalette10, 0xF0, 0x20);
LoadPalette(sFieldEffectPal_Pokeball, 0xF0, 0x20);
task->tState++;
return FALSE;

View File

@ -15,9 +15,9 @@ const struct SpriteTemplate gFieldEffectObjectTemplate_Splash;
const struct SpriteTemplate gFieldEffectObjectTemplate_JumpSmallSplash;
const struct SpriteTemplate gFieldEffectObjectTemplate_LongGrass;
const struct SpriteTemplate gFieldEffectObjectTemplate_JumpLongGrass;
const struct SpriteTemplate gFieldEffectObjectTemplate_Unknown17;
const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedGrass;
const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedGrass2;
const struct SpriteTemplate gFieldEffectObjectTemplate_Unknown19;
const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedSand;
const struct SpriteTemplate gFieldEffectObjectTemplate_WaterSurfacing;
const struct SpriteTemplate gFieldEffectObjectTemplate_ReflectionDistortion;
const struct SpriteTemplate gFieldEffectObjectTemplate_Sparkle;
@ -54,9 +54,9 @@ const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[] = {
[FLDEFFOBJ_JUMP_SMALL_SPLASH] = &gFieldEffectObjectTemplate_JumpSmallSplash,
[FLDEFFOBJ_LONG_GRASS] = &gFieldEffectObjectTemplate_LongGrass,
[FLDEFFOBJ_JUMP_LONG_GRASS] = &gFieldEffectObjectTemplate_JumpLongGrass,
[FLDEFFOBJ_17] = &gFieldEffectObjectTemplate_Unknown17,
[FLDEFFOBJ_UNUSED_GRASS] = &gFieldEffectObjectTemplate_UnusedGrass,
[FLDEFFOBJ_UNUSED_GRASS_2] = &gFieldEffectObjectTemplate_UnusedGrass2,
[FLDEFFOBJ_19] = &gFieldEffectObjectTemplate_Unknown19,
[FLDEFFOBJ_UNUSED_SAND] = &gFieldEffectObjectTemplate_UnusedSand,
[FLDEFFOBJ_WATER_SURFACING] = &gFieldEffectObjectTemplate_WaterSurfacing,
[FLDEFFOBJ_REFLECTION_DISTORTION] = &gFieldEffectObjectTemplate_ReflectionDistortion,
[FLDEFFOBJ_SPARKLE] = &gFieldEffectObjectTemplate_Sparkle,

View File

@ -1,6 +1,5 @@
const struct SpritePalette gFieldEffectObjectPaletteInfo0 = {gFieldEffectObjectPalette0, FLDEFF_PAL_TAG_4};
const struct SpritePalette gFieldEffectObjectPaletteInfo1 = {gFieldEffectObjectPalette1, FLDEFF_PAL_TAG_5};
const struct SpritePalette gSpritePalette_GeneralFieldEffect0 = {gFieldEffectObjectPalette0, FLDEFF_PAL_TAG_GENERAL_0};
const struct SpritePalette gSpritePalette_GeneralFieldEffect1 = {gFieldEffectObjectPalette1, FLDEFF_PAL_TAG_GENERAL_1};
static const union AnimCmd sAnim_Shadow[] =
{
@ -94,7 +93,7 @@ static const union AnimCmd *const sAnimTable_TallGrass[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_TallGrass = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_5,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_1,
.oam = &gObjectEventBaseOam_16x16,
.anims = sAnimTable_TallGrass,
.images = sPicTable_TallGrass,
@ -130,7 +129,7 @@ static const union AnimCmd *const sAnimTable_Ripple[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_Ripple = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_5,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_1,
.oam = &gObjectEventBaseOam_16x16,
.anims = sAnimTable_Ripple,
.images = sPicTable_Ripple,
@ -163,7 +162,7 @@ static const union AnimCmd *const sAnimTable_Ash[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_Ash = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_5,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_1,
.oam = &gObjectEventBaseOam_16x16,
.anims = sAnimTable_Ash,
.images = sPicTable_Ash,
@ -297,7 +296,7 @@ static const union AnimCmd *const sAnimTable_GroundImpactDust[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_GroundImpactDust = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_4,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_0,
.oam = &gObjectEventBaseOam_16x8,
.anims = sAnimTable_GroundImpactDust,
.images = sPicTable_GroundImpactDust,
@ -328,7 +327,7 @@ static const union AnimCmd *const sAnimTable_JumpTallGrass[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_JumpTallGrass = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_5,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_1,
.oam = &gObjectEventBaseOam_16x8,
.anims = sAnimTable_JumpTallGrass,
.images = sPicTable_JumpTallGrass,
@ -376,7 +375,7 @@ static const union AnimCmd *const sAnimTable_SandFootprints[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_SandFootprints = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_4,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_0,
.oam = &gObjectEventBaseOam_16x16,
.anims = sAnimTable_SandFootprints,
.images = sPicTable_SandFootprints,
@ -424,7 +423,7 @@ static const union AnimCmd *const sAnimTable_DeepSandFootprints[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_DeepSandFootprints = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_4,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_0,
.oam = &gObjectEventBaseOam_16x16,
.anims = sAnimTable_DeepSandFootprints,
.images = sPicTable_DeepSandFootprints,
@ -502,7 +501,7 @@ static const union AnimCmd *const sAnimTable_BikeTireTracks[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_BikeTireTracks = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_4,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_0,
.oam = &gObjectEventBaseOam_16x16,
.anims = sAnimTable_BikeTireTracks,
.images = sPicTable_BikeTireTracks,
@ -533,7 +532,7 @@ static const union AnimCmd *const sAnimTable_JumpBigSplash[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_JumpBigSplash = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_4,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_0,
.oam = &gObjectEventBaseOam_16x16,
.anims = sAnimTable_JumpBigSplash,
.images = sPicTable_JumpBigSplash,
@ -574,7 +573,7 @@ static const union AnimCmd *const sAnimTable_Splash[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_Splash = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_4,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_0,
.oam = &gObjectEventBaseOam_16x8,
.anims = sAnimTable_Splash,
.images = sPicTable_Splash,
@ -603,7 +602,7 @@ static const union AnimCmd *const sAnimTable_JumpSmallSplash[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_JumpSmallSplash = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_4,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_0,
.oam = &gObjectEventBaseOam_16x8,
.anims = sAnimTable_JumpSmallSplash,
.images = sPicTable_JumpSmallSplash,
@ -637,7 +636,7 @@ static const union AnimCmd *const sAnimTable_LongGrass[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_LongGrass = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_5,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_1,
.oam = &gObjectEventBaseOam_16x16,
.anims = sAnimTable_LongGrass,
.images = sPicTable_LongGrass,
@ -672,7 +671,7 @@ static const union AnimCmd *const sAnimTable_JumpLongGrass[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_JumpLongGrass = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_5,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_1,
.oam = &gObjectEventBaseOam_16x16,
.anims = sAnimTable_JumpLongGrass,
.images = sPicTable_JumpLongGrass,
@ -680,7 +679,7 @@ const struct SpriteTemplate gFieldEffectObjectTemplate_JumpLongGrass = {
.callback = UpdateJumpImpactEffect,
};
static const struct SpriteFrameImage sPicTable_Unknown17[] = {
static const struct SpriteFrameImage sPicTable_UnusedGrass[] = {
overworld_frame(gFieldEffectObjectPic_JumpLongGrass, 2, 2, 6),
overworld_frame(gFieldEffectObjectPic_Unknown17, 2, 2, 0),
overworld_frame(gFieldEffectObjectPic_Unknown17, 2, 2, 1),
@ -692,7 +691,7 @@ static const struct SpriteFrameImage sPicTable_Unknown17[] = {
overworld_frame(gFieldEffectObjectPic_Unknown17, 2, 2, 7),
};
static const union AnimCmd sAnim_Unknown17[] =
static const union AnimCmd sAnim_UnusedGrass[] =
{
ANIMCMD_FRAME(0, 10),
ANIMCMD_FRAME(1, 4),
@ -706,17 +705,17 @@ static const union AnimCmd sAnim_Unknown17[] =
ANIMCMD_JUMP(7),
};
static const union AnimCmd *const sAnimTable_Unknown17[] =
static const union AnimCmd *const sAnimTable_UnusedGrass[] =
{
sAnim_Unknown17,
sAnim_UnusedGrass,
};
const struct SpriteTemplate gFieldEffectObjectTemplate_Unknown17 = {
const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedGrass = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_5,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_1,
.oam = &gObjectEventBaseOam_16x16,
.anims = sAnimTable_Unknown17,
.images = sPicTable_Unknown17,
.anims = sAnimTable_UnusedGrass,
.images = sPicTable_UnusedGrass,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = WaitFieldEffectSpriteAnim,
};
@ -746,7 +745,7 @@ static const union AnimCmd *const sAnimTable_UnusedGrass2[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedGrass2 = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_5,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_1,
.oam = &gObjectEventBaseOam_16x16,
.anims = sAnimTable_UnusedGrass2,
.images = sPicTable_UnusedGrass2,
@ -754,14 +753,14 @@ const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedGrass2 = {
.callback = WaitFieldEffectSpriteAnim,
};
static const struct SpriteFrameImage sPicTable_Unknown19[] = {
overworld_frame(gFieldEffectObjectPic_Unknown19, 2, 2, 0),
overworld_frame(gFieldEffectObjectPic_Unknown19, 2, 2, 1),
overworld_frame(gFieldEffectObjectPic_Unknown19, 2, 2, 2),
overworld_frame(gFieldEffectObjectPic_Unknown19, 2, 2, 3),
static const struct SpriteFrameImage sPicTable_UnusedSand[] = {
overworld_frame(gFieldEffectObjectPic_UnusedSand, 2, 2, 0),
overworld_frame(gFieldEffectObjectPic_UnusedSand, 2, 2, 1),
overworld_frame(gFieldEffectObjectPic_UnusedSand, 2, 2, 2),
overworld_frame(gFieldEffectObjectPic_UnusedSand, 2, 2, 3),
};
static const union AnimCmd sAnim_Unknown19[] =
static const union AnimCmd sAnim_UnusedSand[] =
{
ANIMCMD_FRAME(0, 4),
ANIMCMD_FRAME(1, 4),
@ -770,17 +769,17 @@ static const union AnimCmd sAnim_Unknown19[] =
ANIMCMD_JUMP(0),
};
static const union AnimCmd *const sAnimTable_Unknown19[] =
static const union AnimCmd *const sAnimTable_UnusedSand[] =
{
sAnim_Unknown19,
sAnim_UnusedSand,
};
const struct SpriteTemplate gFieldEffectObjectTemplate_Unknown19 = {
const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedSand = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_4,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_0,
.oam = &gObjectEventBaseOam_16x16,
.anims = sAnimTable_Unknown19,
.images = sPicTable_Unknown19,
.anims = sAnimTable_UnusedSand,
.images = sPicTable_UnusedSand,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = WaitFieldEffectSpriteAnim,
};
@ -806,7 +805,7 @@ static const union AnimCmd *const sAnimTable_SandPile[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_SandPile = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_4,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_0,
.oam = &gObjectEventBaseOam_16x8,
.anims = sAnimTable_SandPile,
.images = sPicTable_SandPile,
@ -839,7 +838,7 @@ static const union AnimCmd *const sAnimTable_WaterSurfacing[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_WaterSurfacing = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_4,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_0,
.oam = &gObjectEventBaseOam_16x16,
.anims = sAnimTable_WaterSurfacing,
.images = sPicTable_WaterSurfacing,
@ -1092,7 +1091,7 @@ static const union AnimCmd *const sAnimTable_ShortGrass[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_ShortGrass = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_5,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_1,
.oam = &gObjectEventBaseOam_16x16,
.anims = sAnimTable_ShortGrass,
.images = sPicTable_ShortGrass,
@ -1117,7 +1116,7 @@ static const union AnimCmd *const sAnimTable_HotSpringsWater[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_HotSpringsWater = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_5,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_1,
.oam = &gObjectEventBaseOam_16x16,
.anims = sAnimTable_HotSpringsWater,
.images = sPicTable_HotSpringsWater,
@ -1151,7 +1150,7 @@ static const union AnimCmd *const sAnimTable_AshPuff[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_AshPuff =
{
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_13,
.paletteTag = FLDEFF_PAL_TAG_ASH,
.oam = &gObjectEventBaseOam_16x16,
.anims = sAnimTable_AshPuff,
.images = sPicTable_AshPuff,
@ -1159,7 +1158,7 @@ const struct SpriteTemplate gFieldEffectObjectTemplate_AshPuff =
.callback = SpriteCB_AshPuff
};
const struct SpritePalette gFieldEffectObjectPaletteInfo2 = {gFieldEffectObjectPalette2, FLDEFF_PAL_TAG_13};
const struct SpritePalette gSpritePalette_Ash = {gFieldEffectPal_Ash, FLDEFF_PAL_TAG_ASH};
static const struct SpriteFrameImage sPicTable_AshLaunch[] = {
overworld_frame(gFieldEffectObjectPic_AshLaunch, 2, 2, 0),
@ -1187,7 +1186,7 @@ static const union AnimCmd *const sAnimTable_AshLaunch[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_AshLaunch =
{
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_13,
.paletteTag = FLDEFF_PAL_TAG_ASH,
.oam = &gObjectEventBaseOam_16x16,
.anims = sAnimTable_AshLaunch,
.images = sPicTable_AshLaunch,
@ -1226,7 +1225,7 @@ static const union AnimCmd *const sAnimTable_Bubbles[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_Bubbles = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_4,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_0,
.oam = &gObjectEventBaseOam_16x32,
.anims = sAnimTable_Bubbles,
.images = sPicTable_Bubbles,
@ -1254,7 +1253,7 @@ static const union AnimCmd *const sAnimTable_SmallSparkle[] =
const struct SpriteTemplate gFieldEffectObjectTemplate_SmallSparkle = {
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_15,
.paletteTag = FLDEFF_PAL_TAG_SMALL_SPARKLE,
.oam = &gObjectEventBaseOam_16x16,
.anims = sAnimTable_SmallSparkle,
.images = sPicTable_SmallSparkle,
@ -1262,7 +1261,7 @@ const struct SpriteTemplate gFieldEffectObjectTemplate_SmallSparkle = {
.callback = UpdateSparkleFieldEffect,
};
const struct SpritePalette gFieldEffectObjectPaletteInfo3 = {gFieldEffectObjectPalette3, FLDEFF_PAL_TAG_15};
const struct SpritePalette gSpritePalette_SmallSparkle = {gFieldEffectPal_SmallSparkle, FLDEFF_PAL_TAG_SMALL_SPARKLE};
static const union AnimCmd sAnim_Rayquaza[] = {
ANIMCMD_FRAME(0, 1),
@ -1287,4 +1286,4 @@ const struct SpriteTemplate gFieldEffectObjectTemplate_Rayquaza = {
.callback = UpdateRayquazaSpotlightEffect,
};
const struct SpritePalette gFieldEffectObjectPaletteInfoUnused = {gObjectEventPalette2, FLDEFF_PAL_TAG_17};
static const struct SpritePalette sSpritePalette_Unused = {gObjectEventPalette2, FLDEFF_PAL_TAG_UNKNOWN};

View File

@ -293,15 +293,15 @@ const u32 gFieldEffectObjectPic_ShadowSmall[] = INCBIN_U32("graphics/field_effec
const u32 gFieldEffectObjectPic_ShadowMedium[] = INCBIN_U32("graphics/field_effects/pics/shadow_medium.4bpp");
const u32 gFieldEffectObjectPic_ShadowLarge[] = INCBIN_U32("graphics/field_effects/pics/shadow_large.4bpp");
const u32 gFieldEffectObjectPic_ShadowExtraLarge[] = INCBIN_U32("graphics/field_effects/pics/shadow_extra_large.4bpp");
const u32 filler_8368A08[0x48] = {};
static const u32 sFiller[0x48] = {};
const u8 gFieldEffectPic_CutGrass[] = INCBIN_U8("graphics/field_effects/pics/cut_grass.4bpp");
const u32 gFieldEffectPic_CutGrass_Copy[] = INCBIN_U32("graphics/field_effects/pics/cut_grass.4bpp");
const u16 gFieldEffectObjectPalette6[] = INCBIN_U16("graphics/field_effects/palettes/06.gbapal");
const u16 gFieldEffectPal_CutGrass[] = INCBIN_U16("graphics/field_effects/palettes/cut_grass.gbapal");
const u32 gFieldEffectObjectPic_Ripple[] = INCBIN_U32("graphics/field_effects/pics/ripple.4bpp");
const u32 gFieldEffectObjectPic_Ash[] = INCBIN_U32("graphics/field_effects/pics/ash.4bpp");
const u32 gFieldEffectObjectPic_Arrow[] = INCBIN_U32("graphics/field_effects/pics/arrow.4bpp");
const u16 gFieldEffectObjectPalette0[] = INCBIN_U16("graphics/field_effects/palettes/00.gbapal");
const u16 gFieldEffectObjectPalette1[] = INCBIN_U16("graphics/field_effects/palettes/01.gbapal");
const u16 gFieldEffectObjectPalette0[] = INCBIN_U16("graphics/field_effects/palettes/general_0.gbapal");
const u16 gFieldEffectObjectPalette1[] = INCBIN_U16("graphics/field_effects/palettes/general_1.gbapal");
const u32 gFieldEffectObjectPic_GroundImpactDust[] = INCBIN_U32("graphics/field_effects/pics/ground_impact_dust.4bpp");
const u32 gFieldEffectObjectPic_JumpTallGrass[] = INCBIN_U32("graphics/field_effects/pics/jump_tall_grass.4bpp");
const u32 gUnusedGrass3[] = INCBIN_U32("graphics/field_effects/pics/unused_grass_3.4bpp");
@ -314,7 +314,7 @@ const u32 gFieldEffectObjectPic_ShortGrass[] = INCBIN_U32("graphics/field_effect
const u32 gFieldEffectObjectPic_SandFootprints[] = INCBIN_U32("graphics/field_effects/pics/sand_footprints.4bpp");
const u32 gFieldEffectObjectPic_DeepSandFootprints[] = INCBIN_U32("graphics/field_effects/pics/deep_sand_footprints.4bpp");
const u32 gFieldEffectObjectPic_BikeTireTracks[] = INCBIN_U32("graphics/field_effects/pics/bike_tire_tracks.4bpp");
const u32 gFieldEffectObjectPic_Unknown19[] = INCBIN_U32("graphics/field_effects/pics/unknown_19.4bpp");
const u32 gFieldEffectObjectPic_UnusedSand[] = INCBIN_U32("graphics/field_effects/pics/unused_sand.4bpp");
const u32 gFieldEffectObjectPic_SandPile[] = INCBIN_U32("graphics/field_effects/pics/sand_pile.4bpp");
const u32 gFieldEffectObjectPic_JumpBigSplash[] = INCBIN_U32("graphics/field_effects/pics/jump_big_splash.4bpp");
const u32 gFieldEffectObjectPic_Splash[] = INCBIN_U32("graphics/field_effects/pics/splash.4bpp");
@ -324,12 +324,12 @@ const u32 gFieldEffectObjectPic_TreeDisguise[] = INCBIN_U32("graphics/field_effe
const u32 gFieldEffectObjectPic_MountainDisguise[] = INCBIN_U32("graphics/field_effects/pics/mountain_disguise.4bpp");
const u32 gFieldEffectObjectPic_SandDisguisePlaceholder[] = INCBIN_U32("graphics/field_effects/pics/sand_disguise_placeholder.4bpp");
const u32 gFieldEffectObjectPic_HotSpringsWater[] = INCBIN_U32("graphics/field_effects/pics/hot_springs_water.4bpp");
const u16 gFieldEffectObjectPalette2[] = INCBIN_U16("graphics/field_effects/palettes/02.gbapal");
const u16 gFieldEffectPal_Ash[] = INCBIN_U16("graphics/field_effects/palettes/ash.gbapal");
const u32 gFieldEffectObjectPic_AshPuff[] = INCBIN_U32("graphics/field_effects/pics/ash_puff.4bpp");
const u32 gFieldEffectObjectPic_AshLaunch[] = INCBIN_U32("graphics/field_effects/pics/ash_launch.4bpp");
const u32 gFieldEffectObjectPic_Bubbles[] = INCBIN_U32("graphics/field_effects/pics/bubbles.4bpp");
const u32 gFieldEffectObjectPic_SmallSparkle[] = INCBIN_U32("graphics/field_effects/pics/small_sparkle.4bpp");
const u16 gFieldEffectObjectPalette3[] = INCBIN_U16("graphics/field_effects/palettes/03.gbapal");
const u16 gFieldEffectPal_SmallSparkle[] = INCBIN_U16("graphics/field_effects/palettes/small_sparkle.gbapal");
const u32 gFieldEffectObjectPic_Bird[] = INCBIN_U32("graphics/field_effects/pics/bird.4bpp");
const u32 gObjectEventPic_Juan[] = INCBIN_U32("graphics/object_events/pics/people/gym_leaders/juan.4bpp");
const u32 gObjectEventPic_Scott[] = INCBIN_U32("graphics/object_events/pics/people/scott.4bpp");

View File

@ -1948,7 +1948,7 @@ void sub_808E7E4(u8 localId, u8 mapNum, u8 mapGroup)
}
}
void sub_808E82C(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y)
void SetObjectEventSpritePosByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y)
{
u8 objectEventId;
struct Sprite *sprite;

View File

@ -26,7 +26,7 @@ static s16 sPlayerToMewDeltaX;
static s16 sPlayerToMewDeltaY;
static u8 sMewDirectionCandidates[4];
extern const struct SpritePalette gFieldEffectObjectPaletteInfo1;
extern const struct SpritePalette gSpritePalette_GeneralFieldEffect1;
extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[];
static const s16 sFarawayIslandRockCoords[4][2] =
@ -374,8 +374,8 @@ void sub_81D4A90(void)
if (gSpecialVar_Facing != DIR_NORTH)
gSprites[mew->spriteId].subpriority = 1;
LoadSpritePalette(&gFieldEffectObjectPaletteInfo1);
UpdateSpritePaletteWithWeather(IndexOfSpritePaletteTag(gFieldEffectObjectPaletteInfo1.tag));
LoadSpritePalette(&gSpritePalette_GeneralFieldEffect1);
UpdateSpritePaletteWithWeather(IndexOfSpritePaletteTag(gSpritePalette_GeneralFieldEffect1.tag));
x = mew->currentCoords.x;
y = mew->currentCoords.y;

View File

@ -246,12 +246,12 @@ static const u32 sNewGameBirch_Gfx[] = INCBIN_U32("graphics/birch_speech/birch.4
static const u32 sUnusedBirchBeauty[] = INCBIN_U32("graphics/unused/intro_birch_beauty.4bpp");
static const u16 sNewGameBirch_Pal[16] = INCBIN_U16("graphics/birch_speech/birch.gbapal");
static const u32 sPokeballGlow_Gfx[] = INCBIN_U32("graphics/misc/pokeball_glow.4bpp");
static const u16 sFieldEffectObjectPalette4[16] = INCBIN_U16("graphics/field_effects/palettes/04.gbapal");
static const u16 sPokeballGlow_Pal[16] = INCBIN_U16("graphics/field_effects/palettes/pokeball_glow.gbapal");
static const u32 sPokecenterMonitor0_Gfx[] = INCBIN_U32("graphics/misc/pokecenter_monitor/0.4bpp");
static const u32 sPokecenterMonitor1_Gfx[] = INCBIN_U32("graphics/misc/pokecenter_monitor/1.4bpp");
static const u32 sHofMonitorBig_Gfx[] = INCBIN_U32("graphics/misc/hof_monitor_big.4bpp");
static const u8 sHofMonitorSmall_Gfx[] = INCBIN_U8("graphics/misc/hof_monitor_small.4bpp");
static const u16 sFieldEffectObjectPalette5[16] = INCBIN_U16("graphics/field_effects/palettes/05.gbapal");
static const u16 sHofMonitor_Pal[16] = INCBIN_U16("graphics/field_effects/palettes/hof_monitor.gbapal");
// Graphics for the lights streaking past your Pokemon when it uses a field move.
static const u32 sFieldMoveStreaksOutdoors_Gfx[] = INCBIN_U32("graphics/misc/field_move_streaks.4bpp");
@ -332,7 +332,7 @@ static const struct SpriteFrameImage sPicTable_NewGameBirch[] =
static const struct SpritePalette sSpritePalette_NewGameBirch =
{
.data = sNewGameBirch_Pal,
.tag = FLDEFF_PAL_TAG_6
.tag = 0x1006
};
static const union AnimCmd sAnim_NewGameBirch[] =
@ -349,7 +349,7 @@ static const union AnimCmd *const sAnimTable_NewGameBirch[] =
static const struct SpriteTemplate sSpriteTemplate_NewGameBirch =
{
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_6,
.paletteTag = 0x1006,
.oam = &sOam_64x64,
.anims = sAnimTable_NewGameBirch,
.images = sPicTable_NewGameBirch,
@ -357,16 +357,16 @@ static const struct SpriteTemplate sSpriteTemplate_NewGameBirch =
.callback = SpriteCallbackDummy
};
const struct SpritePalette gFieldEffectObjectPaletteInfo4 =
const struct SpritePalette gSpritePalette_PokeballGlow =
{
.data = sFieldEffectObjectPalette4,
.tag = FLDEFF_PAL_TAG_7
.data = sPokeballGlow_Pal,
.tag = FLDEFF_PAL_TAG_POKEBALL_GLOW
};
const struct SpritePalette gFieldEffectObjectPaletteInfo5 =
const struct SpritePalette gSpritePalette_HofMonitor =
{
.data = sFieldEffectObjectPalette5,
.tag = FLDEFF_PAL_TAG_16
.data = sHofMonitor_Pal,
.tag = FLDEFF_PAL_TAG_HOF_MONITOR
};
static const struct OamData sOam_32x16 =
@ -513,7 +513,7 @@ static const union AnimCmd *const sAnimTable_HofMonitor[] =
static const struct SpriteTemplate sSpriteTemplate_PokeballGlow =
{
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_7,
.paletteTag = FLDEFF_PAL_TAG_POKEBALL_GLOW,
.oam = &sOam_8x8,
.anims = gSpriteAnimTable_855C2F8,
.images = sPicTable_PokeballGlow,
@ -524,7 +524,7 @@ static const struct SpriteTemplate sSpriteTemplate_PokeballGlow =
static const struct SpriteTemplate sSpriteTemplate_PokecenterMonitor =
{
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_4,
.paletteTag = FLDEFF_PAL_TAG_GENERAL_0,
.oam = &sOam_16x16,
.anims = gSpriteAnimTable_855C2F8,
.images = sPicTable_PokecenterMonitor,
@ -535,7 +535,7 @@ static const struct SpriteTemplate sSpriteTemplate_PokecenterMonitor =
static const struct SpriteTemplate sSpriteTemplate_HofMonitorBig =
{
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_16,
.paletteTag = FLDEFF_PAL_TAG_HOF_MONITOR,
.oam = &sOam_16x16,
.anims = sAnimTable_HofMonitor,
.images = sPicTable_HofMonitorBig,
@ -546,7 +546,7 @@ static const struct SpriteTemplate sSpriteTemplate_HofMonitorBig =
static const struct SpriteTemplate sSpriteTemplate_HofMonitorSmall =
{
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_16,
.paletteTag = FLDEFF_PAL_TAG_HOF_MONITOR,
.oam = &sOam_32x16,
.anims = sAnimTable_HofMonitor,
.images = sPicTable_HofMonitorSmall,
@ -1178,14 +1178,14 @@ static void PokeballGlowEffect_Flash1(struct Sprite *sprite)
sprite->data[3]++;
}
phase = (sprite->sCounter + 3) & 3;
MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_7) << 4) + 0x108, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW) << 4) + 0x108, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
phase = (sprite->sCounter + 2) & 3;
MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_7) << 4) + 0x106, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW) << 4) + 0x106, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
phase = (sprite->sCounter + 1) & 3;
MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_7) << 4) + 0x102, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW) << 4) + 0x102, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
phase = sprite->sCounter;
MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_7) << 4) + 0x105, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_7) << 4) + 0x103, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW) << 4) + 0x105, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW) << 4) + 0x103, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
if (sprite->data[3] > 2)
{
sprite->sState++;
@ -1209,11 +1209,11 @@ static void PokeballGlowEffect_Flash2(struct Sprite *sprite)
}
}
phase = sprite->sCounter;
MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_7) << 4) + 0x108, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_7) << 4) + 0x106, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_7) << 4) + 0x102, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_7) << 4) + 0x105, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_7) << 4) + 0x103, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW) << 4) + 0x108, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW) << 4) + 0x106, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW) << 4) + 0x102, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW) << 4) + 0x105, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW) << 4) + 0x103, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
}
static void PokeballGlowEffect_WaitAfterFlash(struct Sprite *sprite)

View File

@ -348,7 +348,7 @@ u32 FldEff_JumpTallGrass(void)
sprite->coordOffsetEnabled = TRUE;
sprite->oam.priority = gFieldEffectArguments[3];
sprite->data[0] = gFieldEffectArguments[2];
sprite->data[1] = 12;
sprite->data[1] = FLDEFF_JUMP_TALL_GRASS;
}
return 0;
}
@ -451,7 +451,7 @@ u32 FldEff_JumpLongGrass(void)
sprite->coordOffsetEnabled = TRUE;
sprite->oam.priority = gFieldEffectArguments[3];
sprite->data[0] = gFieldEffectArguments[2];
sprite->data[1] = 18;
sprite->data[1] = FLDEFF_JUMP_LONG_GRASS;
}
return 0;
}
@ -800,19 +800,19 @@ void UpdateHotSpringsWaterFieldEffect(struct Sprite *sprite)
}
}
u32 FldEff_Unknown19(void)
u32 FldEff_UnusedGrass(void)
{
u8 spriteId;
struct Sprite *sprite;
sub_80930E0((s16 *)&gFieldEffectArguments[0], (s16 *)&gFieldEffectArguments[1], 8, 8);
spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_17], gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2]);
spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_UNUSED_GRASS], gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2]);
if (spriteId != MAX_SPRITES)
{
sprite = &gSprites[spriteId];
sprite->coordOffsetEnabled = TRUE;
sprite->oam.priority = gFieldEffectArguments[3];
sprite->data[0] = FLDEFF_UNKNOWN_19;
sprite->data[0] = FLDEFF_UNUSED_GRASS;
}
return 0;
}
@ -834,19 +834,19 @@ u32 FldEff_UnusedGrass2(void)
return 0;
}
u32 FldEff_Unknown21(void)
u32 FldEff_UnusedSand(void)
{
u8 spriteId;
struct Sprite *sprite;
sub_80930E0((s16 *)&gFieldEffectArguments[0], (s16 *)&gFieldEffectArguments[1], 8, 8);
spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_19], gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2]);
spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_UNUSED_SAND], gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2]);
if (spriteId != MAX_SPRITES)
{
sprite = &gSprites[spriteId];
sprite->coordOffsetEnabled = TRUE;
sprite->oam.priority = gFieldEffectArguments[3];
sprite->data[0] = FLDEFF_UNKNOWN_21;
sprite->data[0] = FLDEFF_UNUSED_SAND;
}
return 0;
}
@ -1115,7 +1115,7 @@ u32 FldEff_Dust(void)
sprite->coordOffsetEnabled = TRUE;
sprite->oam.priority = gFieldEffectArguments[3];
sprite->data[0] = gFieldEffectArguments[2];
sprite->data[1] = 10;
sprite->data[1] = FLDEFF_DUST;
}
return 0;
}

View File

@ -36,11 +36,9 @@
#include "fldeff.h"
// This file's functions.
static void sub_8080B9C(u8);
static void Task_ExitNonAnimDoor(u8);
static void Task_ExitNonDoor(u8);
static void Task_DoContestHallWarp(u8);
static void sub_808115C(u8);
static void FillPalBufferWhite(void);
static void Task_ExitDoor(u8);
static bool32 WaitForWeatherFadeIn(void);

View File

@ -74,11 +74,11 @@ void Task_Truck1(u8 taskId)
s16 box1, box2, box3;
box1 = GetTruckBoxMovement(data[0] + 30) * 4; // top box.
sub_808E82C(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3 - cameraXpan, box1 + 3);
SetObjectEventSpritePosByLocalIdAndMap(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3 - cameraXpan, box1 + 3);
box2 = GetTruckBoxMovement(data[0]) * 2; // bottom left box.
sub_808E82C(2, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -cameraXpan, box2 - 3);
SetObjectEventSpritePosByLocalIdAndMap(2, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -cameraXpan, box2 - 3);
box3 = GetTruckBoxMovement(data[0]) * 4; // bottom right box.
sub_808E82C(3, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -3 - cameraXpan, box3);
SetObjectEventSpritePosByLocalIdAndMap(3, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -3 - cameraXpan, box3);
if (++data[0] == SECONDS(500)) // this will never run
data[0] = 0; // reset the timer if it gets stuck.
@ -117,11 +117,11 @@ void Task_Truck2(u8 taskId)
cameraYpan = GetTruckCameraBobbingY(data[2]);
SetCameraPanning(cameraXpan, cameraYpan);
box1 = GetTruckBoxMovement(data[2] + 30) * 4;
sub_808E82C(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3 - cameraXpan, box1 + 3);
SetObjectEventSpritePosByLocalIdAndMap(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3 - cameraXpan, box1 + 3);
box2 = GetTruckBoxMovement(data[2]) * 2;
sub_808E82C(2, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -cameraXpan, box2 - 3);
SetObjectEventSpritePosByLocalIdAndMap(2, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -cameraXpan, box2 - 3);
box3 = GetTruckBoxMovement(data[2]) * 4;
sub_808E82C(3, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -3 - cameraXpan, box3);
SetObjectEventSpritePosByLocalIdAndMap(3, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -3 - cameraXpan, box3);
}
}
@ -148,9 +148,9 @@ static void Task_Truck3(u8 taskId)
cameraXpan = gTruckCamera_HorizontalTable[data[1]];
cameraYpan = 0;
SetCameraPanning(cameraXpan, 0);
sub_808E82C(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3 - cameraXpan, cameraYpan + 3);
sub_808E82C(2, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -cameraXpan, cameraYpan - 3);
sub_808E82C(3, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -3 - cameraXpan, cameraYpan);
SetObjectEventSpritePosByLocalIdAndMap(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3 - cameraXpan, cameraYpan + 3);
SetObjectEventSpritePosByLocalIdAndMap(2, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -cameraXpan, cameraYpan - 3);
SetObjectEventSpritePosByLocalIdAndMap(3, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -3 - cameraXpan, cameraYpan);
}
}
@ -243,9 +243,9 @@ void EndTruckSequence(u8 taskId)
{
if (!FuncIsActiveTask(Task_HandleTruckSequence))
{
sub_808E82C(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3, 3);
sub_808E82C(2, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 0, -3);
sub_808E82C(3, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -3, 0);
SetObjectEventSpritePosByLocalIdAndMap(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3, 3);
SetObjectEventSpritePosByLocalIdAndMap(2, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 0, -3);
SetObjectEventSpritePosByLocalIdAndMap(3, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -3, 0);
}
}

View File

@ -1,6 +1,7 @@
#include "global.h"
#include "event_object_lock.h"
#include "event_object_movement.h"
#include "event_scripts.h"
#include "faraway_island.h"
#include "field_camera.h"
#include "field_effect.h"
@ -24,11 +25,10 @@
extern struct MapPosition gPlayerFacingPosition;
extern const u8 EventScript_FldEffCut[];
extern const u8 FarawayIsland_Interior_EventScript_HideMewWhenGrassCut[];
extern const u8 gFieldEffectPic_CutGrass[];
extern const u16 gFieldEffectObjectPalette6[];
extern const u16 gFieldEffectPal_CutGrass[];
// cut 'square' defines
#define CUT_NORMAL_SIDE 3
@ -122,12 +122,12 @@ static const struct SpriteFrameImage sSpriteImageTable_CutGrass[] =
{gFieldEffectPic_CutGrass, 0x20},
};
const struct SpritePalette gFieldEffectObjectPaletteInfo6 = {gFieldEffectObjectPalette6, FLDEFF_PAL_TAG_0};
const struct SpritePalette gSpritePalette_CutGrass = {gFieldEffectPal_CutGrass, FLDEFF_PAL_TAG_CUT_GRASS};
static const struct SpriteTemplate sSpriteTemplate_CutGrass =
{
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_0,
.paletteTag = FLDEFF_PAL_TAG_CUT_GRASS,
.oam = &sOamData_CutGrass,
.anims = sSpriteAnimTable_CutGrass,
.images = sSpriteImageTable_CutGrass,
@ -292,7 +292,7 @@ bool8 FldEff_UseCutOnGrass(void)
static void FieldCallback_CutTree(void)
{
gFieldEffectArguments[0] = GetCursorSelectionMonId();
ScriptContext1_SetupScript(EventScript_FldEffCut);
ScriptContext1_SetupScript(EventScript_UseCut);
}
bool8 FldEff_UseCutOnTree(void)

View File

@ -10,8 +10,8 @@
#include "constants/field_effects.h"
// static functions
static void hm2_dig(void);
static void sub_8135780(void);
static void FieldCallback_Dig(void);
static void StartDigFieldEffect(void);
// text
bool8 SetUpFieldMove_Dig(void)
@ -19,7 +19,7 @@ bool8 SetUpFieldMove_Dig(void)
if (CanUseDigOrEscapeRopeOnCurMap() == TRUE)
{
gFieldCallback2 = FieldCallback_PrepareFadeInFromMenu;
gPostMenuFieldCallback = hm2_dig;
gPostMenuFieldCallback = FieldCallback_Dig;
return TRUE;
}
else
@ -28,7 +28,7 @@ bool8 SetUpFieldMove_Dig(void)
}
}
static void hm2_dig(void)
static void FieldCallback_Dig(void)
{
Overworld_ResetStateAfterDigEscRope();
FieldEffectStart(FLDEFF_USE_DIG);
@ -39,14 +39,14 @@ bool8 FldEff_UseDig(void)
{
u8 taskId = CreateFieldMoveTask();
gTasks[taskId].data[8] = (u32)sub_8135780 >> 16;
gTasks[taskId].data[9] = (u32)sub_8135780;
gTasks[taskId].data[8] = (u32)StartDigFieldEffect >> 16;
gTasks[taskId].data[9] = (u32)StartDigFieldEffect;
if (!ShouldDoBrailleDigEffect())
SetPlayerAvatarTransitionFlags(PLAYER_AVATAR_FLAG_ON_FOOT);
return FALSE;
}
static void sub_8135780(void)
static void StartDigFieldEffect(void)
{
u8 taskId;

View File

@ -106,7 +106,7 @@ static void FldEff_UseFlash(void)
{
PlaySE(SE_W115);
FlagSet(FLAG_SYS_USE_FLASH);
ScriptContext1_SetupScript(EventScript_FldEffFlash);
ScriptContext1_SetupScript(EventScript_UseFlash);
}
static void CB2_ChangeMapMain(void)

View File

@ -65,12 +65,12 @@ static void SpriteCB_SandPillar_End(struct Sprite *);
static const u8 sSecretPowerCave_Gfx[] = INCBIN_U8("graphics/field_effects/pics/secret_power_cave.4bpp");
static const u8 sFiller[32] = {0};
static const u16 sSecretPowerCave_Pal[] = INCBIN_U16("graphics/field_effects/palettes/07.gbapal");
static const u16 sSecretPowerCave_Pal[] = INCBIN_U16("graphics/field_effects/palettes/secret_power_cave.gbapal");
static const u8 sSecretPowerShrub_Gfx[] = INCBIN_U8("graphics/field_effects/pics/secret_power_shrub.4bpp");
static const u8 sSecretPowerTree_Gfx[] = INCBIN_U8("graphics/field_effects/pics/secret_power_tree.4bpp");
static const u16 sSecretPowerPlant_Pal[] = INCBIN_U16("graphics/field_effects/palettes/08.gbapal");
static const u16 sSecretPowerPlant_Pal[] = INCBIN_U16("graphics/field_effects/palettes/secret_power_plant.gbapal");
// TODO: These should also be combined into a single image
// TODO: These should also be combined into a single image, not matching for some reason
static const u8 sSandPillar0_Gfx[] = INCBIN_U8("graphics/field_effects/pics/sand_pillar/0.4bpp");
static const u8 sSandPillar1_Gfx[] = INCBIN_U8("graphics/field_effects/pics/sand_pillar/1.4bpp");
static const u8 sSandPillar2_Gfx[] = INCBIN_U8("graphics/field_effects/pics/sand_pillar/2.4bpp");
@ -196,7 +196,7 @@ static const struct SpriteFrameImage sPicTable_SecretPowerShrub[] =
static const struct SpriteTemplate sSpriteTemplate_SecretPowerCave =
{
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_3,
.paletteTag = FLDEFF_PAL_TAG_SECRET_POWER_TREE,
.oam = &sOam_SecretPower,
.anims = sAnimTable_SecretPowerCave,
.images = sPicTable_SecretPowerCave,
@ -207,7 +207,7 @@ static const struct SpriteTemplate sSpriteTemplate_SecretPowerCave =
static const struct SpriteTemplate sSpriteTemplate_SecretPowerTree =
{
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_8,
.paletteTag = FLDEFF_PAL_TAG_SECRET_POWER_PLANT,
.oam = &sOam_SecretPower,
.anims = sAnimTable_SecretPowerTree,
.images = sPicTable_SecretPowerTree,
@ -218,7 +218,7 @@ static const struct SpriteTemplate sSpriteTemplate_SecretPowerTree =
static const struct SpriteTemplate sSpriteTemplate_SecretPowerShrub =
{
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_8,
.paletteTag = FLDEFF_PAL_TAG_SECRET_POWER_PLANT,
.oam = &sOam_SecretPower,
.anims = sAnimTable_SecretPowerShrub,
.images = sPicTable_SecretPowerShrub,
@ -226,8 +226,8 @@ static const struct SpriteTemplate sSpriteTemplate_SecretPowerShrub =
.callback = SpriteCB_ShrubEntranceInit,
};
const struct SpritePalette gSpritePalette_SecretPower_Cave = {sSecretPowerCave_Pal, FLDEFF_PAL_TAG_3};
const struct SpritePalette gSpritePalette_SecretPower_Plant = {sSecretPowerPlant_Pal, FLDEFF_PAL_TAG_8};
const struct SpritePalette gSpritePalette_SecretPower_Cave = {sSecretPowerCave_Pal, FLDEFF_PAL_TAG_SECRET_POWER_TREE};
const struct SpritePalette gSpritePalette_SecretPower_Plant = {sSecretPowerPlant_Pal, FLDEFF_PAL_TAG_SECRET_POWER_PLANT};
static const struct OamData sOam_SandPillar =
{
@ -256,15 +256,15 @@ static const union AnimCmd *const sAnimTable_SandPillar[] =
static const struct SpriteFrameImage sPicTable_SandPillar[] =
{
{sSandPillar0_Gfx, 0x100},
{sSandPillar1_Gfx, 0x100},
{sSandPillar2_Gfx, 0x100},
{sSandPillar0_Gfx, sizeof(sSandPillar0_Gfx)},
{sSandPillar1_Gfx, sizeof(sSandPillar1_Gfx)},
{sSandPillar2_Gfx, sizeof(sSandPillar2_Gfx)},
};
static const struct SpriteTemplate sSpriteTemplate_SandPillar =
{
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_14,
.paletteTag = FLDEFF_PAL_TAG_SAND_PILLAR,
.oam = &sOam_SandPillar,
.anims = sAnimTable_SandPillar,
.images = sPicTable_SandPillar,
@ -272,8 +272,7 @@ static const struct SpriteTemplate sSpriteTemplate_SandPillar =
.callback = SpriteCB_SandPillar_BreakTop,
};
// This uses one of the secret base palettes, so there is no "graphics/field_effects/palettes/09.pal" file.
const struct SpritePalette gSpritePalette_SandPillar = {gTilesetPalettes_SecretBase[5], FLDEFF_PAL_TAG_14};
const struct SpritePalette gSpritePalette_SandPillar = {gTilesetPalettes_SecretBase[5], FLDEFF_PAL_TAG_SAND_PILLAR};
static const u8 sRecordMixLights_Gfx[] = INCBIN_U8("graphics/field_effects/pics/record_mix_lights.4bpp");
static const u16 sRecordMixLights_Pal[] = INCBIN_U16("graphics/field_effects/palettes/record_mix_lights.gbapal");
@ -285,7 +284,7 @@ static const struct SpriteFrameImage sPicTable_RecordMixLights[] =
overworld_frame(sRecordMixLights_Gfx, 4, 1, 2),
};
static const struct SpritePalette sSpritePalette_RecordMixLights = {sRecordMixLights_Pal, FLDEFF_PAL_TAG_0};
static const struct SpritePalette sSpritePalette_RecordMixLights = {sRecordMixLights_Pal, 0x1000};
static const union AnimCmd sAnim_RecordMixLights[] =
{
@ -303,7 +302,7 @@ static const union AnimCmd *const sAnimTable_RecordMixLights[] =
static const struct SpriteTemplate sSpriteTemplate_RecordMixLights =
{
.tileTag = 0xFFFF,
.paletteTag = FLDEFF_PAL_TAG_0,
.paletteTag = 0x1000,
.oam = &gObjectEventBaseOam_32x8,
.anims = sAnimTable_RecordMixLights,
.images = sPicTable_RecordMixLights,

View File

@ -146,7 +146,7 @@ bool8 SetUpFieldMove_RockSmash(void)
static void FieldCallback_RockSmash(void)
{
gFieldEffectArguments[0] = GetCursorSelectionMonId();
ScriptContext1_SetupScript(EventScript_RockSmashFromPartyMenu);
ScriptContext1_SetupScript(EventScript_UseRockSmash);
}
bool8 FldEff_UseRockSmash(void)

View File

@ -11,8 +11,8 @@
#include "constants/field_effects.h"
// static functions
static void FldEff_UseStrength(void);
static void sub_8145E74(void);
static void FieldCallback_Strength(void);
static void StartStrengthFieldEffect(void);
// text
bool8 SetUpFieldMove_Strength(void)
@ -21,28 +21,29 @@ bool8 SetUpFieldMove_Strength(void)
{
gSpecialVar_Result = GetCursorSelectionMonId();
gFieldCallback2 = FieldCallback_PrepareFadeInFromMenu;
gPostMenuFieldCallback = FldEff_UseStrength;
gPostMenuFieldCallback = FieldCallback_Strength;
return TRUE;
}
return FALSE;
}
static void FldEff_UseStrength(void)
static void FieldCallback_Strength(void)
{
gFieldEffectArguments[0] = GetCursorSelectionMonId();
ScriptContext1_SetupScript(EventScript_FldEffStrength);
ScriptContext1_SetupScript(EventScript_UseStrength);
}
bool8 sub_8145E2C(void)
bool8 FldEff_UseStrength(void)
{
u8 taskId = CreateFieldMoveTask();
gTasks[taskId].data[8] = (u32)sub_8145E74 >> 16;
gTasks[taskId].data[9] = (u32)sub_8145E74;
gTasks[taskId].data[8] = (u32)StartStrengthFieldEffect >> 16;
gTasks[taskId].data[9] = (u32)StartStrengthFieldEffect;
GetMonNickname(&gPlayerParty[gFieldEffectArguments[0]], gStringVar1);
return FALSE;
}
static void sub_8145E74(void)
// Just passes control back to EventScript_UseStrength
static void StartStrengthFieldEffect(void)
{
FieldEffectActiveListRemove(FLDEFF_USE_STRENGTH);
EnableBothScriptContexts();