diff --git a/common_syms/overworld.txt b/common_syms/overworld.txt index cc92cee1e2..3cea73ccd3 100644 --- a/common_syms/overworld.txt +++ b/common_syms/overworld.txt @@ -6,5 +6,4 @@ gFieldCallback gFieldCallback2 gLocalLinkPlayerId gFieldLinkPlayerCount -gTimeOfDay currentTimeBlend diff --git a/include/event_object_movement.h b/include/event_object_movement.h index 98e5fd784e..a59203f84b 100644 --- a/include/event_object_movement.h +++ b/include/event_object_movement.h @@ -100,7 +100,6 @@ void UpdateFollowingPokemon(void); void RemoveFollowingPokemon(void); struct ObjectEvent * GetFollowerObject(void); u8 GetDirectionToFace(s16, s16, s16, s16); -void UpdateLightSprite(struct Sprite *); void TrySpawnObjectEvents(s16, s16); u8 CreateObjectGraphicsSprite(u16, void (*)(struct Sprite *), s16 x, s16 y, u8 subpriority); u8 TrySpawnObjectEvent(u8, u8, u8); diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 24e9e9ea53..424fd46d57 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -183,7 +183,7 @@ struct ObjectEvent u32 inShallowFlowingWater:1; u32 inSandPile:1; u32 inHotSprings:1; - u32 noShadow:1; + u32 hasShadow:1; u32 spriteAnimPausedBackup:1; /*0x03*/ u32 spriteAffineAnimPausedBackup:1; u32 disableJumpLandingGroundEffect:1; diff --git a/include/global.h b/include/global.h index c4094ffc25..13bdf02823 100644 --- a/include/global.h +++ b/include/global.h @@ -497,7 +497,6 @@ struct SaveBlock2 extern struct SaveBlock2 *gSaveBlock2Ptr; -extern u8 UpdateSpritePaletteWithTime(u8); extern bool8 IsAccurateGBA(void); struct SecretBaseParty @@ -872,7 +871,7 @@ struct MysteryGiftSave struct WonderCardMetadata cardMetadata; u16 questionnaireWords[NUM_QUESTIONNAIRE_WORDS]; struct WonderNewsMetadata newsMetadata; - u32 trainerIds[2][5]; // Saved ids for 10 trainers, 5 each for battles and trades + u32 trainerIds[2][5]; // Saved ids for 10 trainers, 5 each for battles and trades }; // 0x36C 0x3598 // For external event data storage. The majority of these may have never been used. diff --git a/include/overworld.h b/include/overworld.h index 80aa51e33d..246d63e29f 100644 --- a/include/overworld.h +++ b/include/overworld.h @@ -63,7 +63,6 @@ extern bool8 (*gFieldCallback2)(void); extern u8 gLocalLinkPlayerId; extern u8 gFieldLinkPlayerCount; -extern u8 gTimeOfDay; extern struct TimeBlendSettings currentTimeBlend; // Exported ROM declarations diff --git a/include/palette.h b/include/palette.h index 7e9ed0cae0..f9f42990e0 100644 --- a/include/palette.h +++ b/include/palette.h @@ -69,7 +69,6 @@ void TransferPlttBuffer(void); u8 UpdatePaletteFade(void); void ResetPaletteFade(void); bool8 BeginNormalPaletteFade(u32, s8, u8, u8, u16); -bool8 BeginTimeOfDayPaletteFade(u32, s8, u8, u8, struct BlendSettings *, struct BlendSettings *, u16, u16); void PaletteStruct_ResetById(u16); void ResetPaletteFadeControl(void); void InvertPlttBuffer(u32); diff --git a/src/data/field_effects/field_effect_object_template_pointers.h b/src/data/field_effects/field_effect_object_template_pointers.h index eb8e52029d..41d6271bf2 100755 --- a/src/data/field_effects/field_effect_object_template_pointers.h +++ b/src/data/field_effects/field_effect_object_template_pointers.h @@ -35,7 +35,6 @@ const struct SpriteTemplate gFieldEffectObjectTemplate_AshLaunch; const struct SpriteTemplate gFieldEffectObjectTemplate_Bubbles; const struct SpriteTemplate gFieldEffectObjectTemplate_SmallSparkle; const struct SpriteTemplate gFieldEffectObjectTemplate_Rayquaza; -const struct SpriteTemplate gFieldEffectObjectTemplate_BallLight; const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[] = { [FLDEFFOBJ_SHADOW_S] = &gFieldEffectObjectTemplate_ShadowSmall, diff --git a/src/data/field_effects/field_effect_objects.h b/src/data/field_effects/field_effect_objects.h index aa4bc624d2..da688f2cfa 100755 --- a/src/data/field_effects/field_effect_objects.h +++ b/src/data/field_effects/field_effect_objects.h @@ -28,12 +28,6 @@ static const struct SpriteFrameImage sPicTable_ShadowExtraLarge[] = { obj_frame_tiles(gFieldEffectObjectPic_ShadowExtraLarge), }; -const struct SpriteFrameImage gFieldEffectObjectPicTable_BallLight[] = { - obj_frame_tiles(gFieldEffectObjectPic_BallLight), -}; - -const struct SpriteTemplate gFieldEffectObjectTemplate_BallLight = {TAG_NONE, OBJ_EVENT_PAL_TAG_LIGHT, &gObjectEventBaseOam_32x32, sAnimTable_Inanimate, gFieldEffectObjectPicTable_BallLight, gDummySpriteAffineAnimTable, UpdateLightSprite}; - const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowSmall = { .tileTag = TAG_NONE, .paletteTag = TAG_WEATHER_START, diff --git a/src/data/object_events/object_event_graphics.h b/src/data/object_events/object_event_graphics.h index 51ad7d3937..43ccdcff77 100755 --- a/src/data/object_events/object_event_graphics.h +++ b/src/data/object_events/object_event_graphics.h @@ -281,7 +281,6 @@ 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 gFieldEffectObjectPic_BallLight[] = INCBIN_U32("graphics/object_events/pics/misc/light.4bpp"); 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"); @@ -779,5 +778,4 @@ const u32 gObjectEventPic_RayquazaCutscene[] = INCBIN_U32("graphics/object_event const u16 gObjectEventPal_HoOh[] = INCBIN_U16("graphics/object_events/palettes/ho_oh.gbapal"); const u16 gObjectEventPal_Lugia[] = INCBIN_U16("graphics/object_events/palettes/lugia.gbapal"); -const u16 gObjectEventPaletteLight[] = INCBIN_U16("graphics/object_events/palettes/light.gbapal"); const u16 gObjectEventPaletteEmotes[] = INCBIN_U16("graphics/misc/emotes.gbapal"); diff --git a/src/event_object_movement.c b/src/event_object_movement.c index f9ec12b8df..6ef1bd15e1 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -448,7 +448,6 @@ const u8 gInitialMovementTypeFacingDirections[] = { #define OBJ_EVENT_PAL_TAG_RS_BRENDAN 0x1122 #define OBJ_EVENT_PAL_TAG_RS_MAY 0x1123 #define OBJ_EVENT_PAL_TAG_DYNAMIC 0x1124 -#define OBJ_EVENT_PAL_TAG_LIGHT 0x8001 #define OBJ_EVENT_PAL_TAG_EMOTES 0x8002 #define OBJ_EVENT_PAL_TAG_NONE 0x11FF @@ -498,7 +497,6 @@ static const struct SpritePalette sObjectEventSpritePalettes[] = { {gObjectEventPal_RubySapphireBrendan, OBJ_EVENT_PAL_TAG_RS_BRENDAN}, {gObjectEventPal_RubySapphireMay, OBJ_EVENT_PAL_TAG_RS_MAY}, {gObjectEventPal_Npc1, OBJ_EVENT_PAL_TAG_DYNAMIC}, - {gObjectEventPaletteLight, OBJ_EVENT_PAL_TAG_LIGHT}, {gObjectEventPaletteEmotes, OBJ_EVENT_PAL_TAG_EMOTES}, {NULL, 0x0000}, }; @@ -2056,7 +2054,6 @@ void TrySpawnObjectEvents(s16 cameraX, s16 cameraY) TrySpawnObjectEventTemplate(template, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, cameraX, cameraY); } } - TrySpawnLightSprites(cameraX, cameraY); } void RemoveObjectEventsOutsideView(void) @@ -2110,7 +2107,6 @@ void SpawnObjectEventsOnReturnToField(s16 x, s16 y) SpawnObjectEventOnReturnToField(i, x, y); } CreateReflectionEffectSprites(); - TrySpawnLightSprites(x, y); } static void SpawnObjectEventOnReturnToField(u8 objectEventId, s16 x, s16 y) @@ -2174,7 +2170,7 @@ static void ResetObjectEventFldEffData(struct ObjectEvent *objectEvent) { objectEvent->singleMovementActive = FALSE; objectEvent->triggerGroundEffectsOnMove = TRUE; - objectEvent->noShadow = FALSE; + objectEvent->hasShadow = FALSE; objectEvent->hasReflection = FALSE; objectEvent->inShortGrass = FALSE; objectEvent->inShallowFlowingWater = FALSE; @@ -6164,7 +6160,7 @@ bool8 MovementAction_Jump2Down_Step1(struct ObjectEvent *objectEvent, struct Spr { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = FALSE; + objectEvent->hasShadow = FALSE; sprite->sActionFuncId = 2; return TRUE; } @@ -6181,7 +6177,7 @@ bool8 MovementAction_Jump2Up_Step1(struct ObjectEvent *objectEvent, struct Sprit { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = FALSE; + objectEvent->hasShadow = FALSE; sprite->sActionFuncId = 2; return TRUE; } @@ -6198,7 +6194,7 @@ bool8 MovementAction_Jump2Left_Step1(struct ObjectEvent *objectEvent, struct Spr { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = FALSE; + objectEvent->hasShadow = FALSE; sprite->sActionFuncId = 2; return TRUE; } @@ -6215,7 +6211,7 @@ bool8 MovementAction_Jump2Right_Step1(struct ObjectEvent *objectEvent, struct Sp { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = FALSE; + objectEvent->hasShadow = FALSE; sprite->sActionFuncId = 2; return TRUE; } @@ -6986,7 +6982,7 @@ bool8 MovementAction_JumpDown_Step1(struct ObjectEvent *objectEvent, struct Spri { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = 0; + objectEvent->hasShadow = 0; sprite->sActionFuncId = 2; return TRUE; } @@ -7003,7 +6999,7 @@ bool8 MovementAction_JumpUp_Step1(struct ObjectEvent *objectEvent, struct Sprite { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = 0; + objectEvent->hasShadow = 0; sprite->sActionFuncId = 2; return TRUE; } @@ -7020,7 +7016,7 @@ bool8 MovementAction_JumpLeft_Step1(struct ObjectEvent *objectEvent, struct Spri { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = 0; + objectEvent->hasShadow = 0; sprite->sActionFuncId = 2; return TRUE; } @@ -7037,7 +7033,7 @@ bool8 MovementAction_JumpRight_Step1(struct ObjectEvent *objectEvent, struct Spr { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = 0; + objectEvent->hasShadow = 0; sprite->sActionFuncId = 2; return TRUE; } @@ -7054,7 +7050,7 @@ bool8 MovementAction_JumpInPlaceDown_Step1(struct ObjectEvent *objectEvent, stru { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = 0; + objectEvent->hasShadow = 0; sprite->sActionFuncId = 2; return TRUE; } @@ -7071,7 +7067,7 @@ bool8 MovementAction_JumpInPlaceUp_Step1(struct ObjectEvent *objectEvent, struct { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = 0; + objectEvent->hasShadow = 0; sprite->sActionFuncId = 2; return TRUE; } @@ -7088,7 +7084,7 @@ bool8 MovementAction_JumpInPlaceLeft_Step1(struct ObjectEvent *objectEvent, stru { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = 0; + objectEvent->hasShadow = 0; sprite->sActionFuncId = 2; return TRUE; } @@ -7105,7 +7101,7 @@ bool8 MovementAction_JumpInPlaceRight_Step1(struct ObjectEvent *objectEvent, str { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = 0; + objectEvent->hasShadow = 0; sprite->sActionFuncId = 2; return TRUE; } @@ -7122,7 +7118,7 @@ bool8 MovementAction_JumpInPlaceDownUp_Step1(struct ObjectEvent *objectEvent, st { if (DoJumpInPlaceAnim(objectEvent, sprite)) { - objectEvent->noShadow = 0; + objectEvent->hasShadow = 0; sprite->sActionFuncId = 2; return TRUE; } @@ -7139,7 +7135,7 @@ bool8 MovementAction_JumpInPlaceUpDown_Step1(struct ObjectEvent *objectEvent, st { if (DoJumpInPlaceAnim(objectEvent, sprite)) { - objectEvent->noShadow = 0; + objectEvent->hasShadow = 0; sprite->sActionFuncId = 2; return TRUE; } @@ -7156,7 +7152,7 @@ bool8 MovementAction_JumpInPlaceLeftRight_Step1(struct ObjectEvent *objectEvent, { if (DoJumpInPlaceAnim(objectEvent, sprite)) { - objectEvent->noShadow = 0; + objectEvent->hasShadow = 0; sprite->sActionFuncId = 2; return TRUE; } @@ -7173,7 +7169,7 @@ bool8 MovementAction_JumpInPlaceRightLeft_Step1(struct ObjectEvent *objectEvent, { if (DoJumpInPlaceAnim(objectEvent, sprite)) { - objectEvent->noShadow = 0; + objectEvent->hasShadow = 0; sprite->sActionFuncId = 2; return TRUE; } @@ -7618,7 +7614,7 @@ bool8 MovementAction_AcroWheelieHopFaceDown_Step1(struct ObjectEvent *objectEven { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = FALSE; + objectEvent->hasShadow = FALSE; sprite->sActionFuncId = 2; return TRUE; } @@ -7635,7 +7631,7 @@ bool8 MovementAction_AcroWheelieHopFaceUp_Step1(struct ObjectEvent *objectEvent, { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = FALSE; + objectEvent->hasShadow = FALSE; sprite->sActionFuncId = 2; return TRUE; } @@ -7652,7 +7648,7 @@ bool8 MovementAction_AcroWheelieHopFaceLeft_Step1(struct ObjectEvent *objectEven { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = FALSE; + objectEvent->hasShadow = FALSE; sprite->sActionFuncId = 2; return TRUE; } @@ -7669,7 +7665,7 @@ bool8 MovementAction_AcroWheelieHopFaceRight_Step1(struct ObjectEvent *objectEve { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = FALSE; + objectEvent->hasShadow = FALSE; sprite->sActionFuncId = 2; return TRUE; } @@ -7686,7 +7682,7 @@ bool8 MovementAction_AcroWheelieHopDown_Step1(struct ObjectEvent *objectEvent, s { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = FALSE; + objectEvent->hasShadow = FALSE; sprite->sActionFuncId = 2; return TRUE; } @@ -7703,7 +7699,7 @@ bool8 MovementAction_AcroWheelieHopUp_Step1(struct ObjectEvent *objectEvent, str { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = FALSE; + objectEvent->hasShadow = FALSE; sprite->sActionFuncId = 2; return TRUE; } @@ -7720,7 +7716,7 @@ bool8 MovementAction_AcroWheelieHopLeft_Step1(struct ObjectEvent *objectEvent, s { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = FALSE; + objectEvent->hasShadow = FALSE; sprite->sActionFuncId = 2; return TRUE; } @@ -7737,7 +7733,7 @@ bool8 MovementAction_AcroWheelieHopRight_Step1(struct ObjectEvent *objectEvent, { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = FALSE; + objectEvent->hasShadow = FALSE; sprite->sActionFuncId = 2; return TRUE; } @@ -7754,7 +7750,7 @@ bool8 MovementAction_AcroWheelieJumpDown_Step1(struct ObjectEvent *objectEvent, { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = FALSE; + objectEvent->hasShadow = FALSE; sprite->sActionFuncId = 2; return TRUE; } @@ -7771,7 +7767,7 @@ bool8 MovementAction_AcroWheelieJumpUp_Step1(struct ObjectEvent *objectEvent, st { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = FALSE; + objectEvent->hasShadow = FALSE; sprite->sActionFuncId = 2; return TRUE; } @@ -7788,7 +7784,7 @@ bool8 MovementAction_AcroWheelieJumpLeft_Step1(struct ObjectEvent *objectEvent, { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = FALSE; + objectEvent->hasShadow = FALSE; sprite->sActionFuncId = 2; return TRUE; } @@ -7805,7 +7801,7 @@ bool8 MovementAction_AcroWheelieJumpRight_Step1(struct ObjectEvent *objectEvent, { if (DoJumpAnim(objectEvent, sprite)) { - objectEvent->noShadow = FALSE; + objectEvent->hasShadow = FALSE; sprite->sActionFuncId = 2; return TRUE; } @@ -9522,9 +9518,9 @@ u32 StartFieldEffectForObjectEvent(u8 fieldEffectId, struct ObjectEvent *objectE static void DoShadowFieldEffect(struct ObjectEvent *objectEvent) { - if (objectEvent->noShadow) + if (!objectEvent->hasShadow) { - objectEvent->noShadow = FALSE; + objectEvent->hasShadow = 1; StartFieldEffectForObjectEvent(FLDEFF_SHADOW, objectEvent); } } diff --git a/src/field_effect.c b/src/field_effect.c index afc25f757c..d97d86cd82 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -3270,7 +3270,7 @@ static void FlyOutFieldEffect_FlyOffWithBird(struct Task *task) struct ObjectEvent *objectEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; ObjectEventClearHeldMovementIfActive(objectEvent); objectEvent->inanimate = FALSE; - objectEvent->noShadow = TRUE; // TODO: Make shadow smaller instead of disappearing completely ? + objectEvent->hasShadow = FALSE; SetFlyBirdPlayerSpriteId(task->tBirdSpriteId, objectEvent->spriteId); CameraObjectReset2(); task->tState++; @@ -3490,7 +3490,6 @@ static void FlyInFieldEffect_BirdSwoopDown(struct Task *task) ObjectEventTurn(objectEvent, DIR_WEST); StartSpriteAnim(&gSprites[objectEvent->spriteId], ANIM_GET_ON_OFF_POKEMON_WEST); objectEvent->invisible = FALSE; - objectEvent->noShadow = TRUE; task->tBirdSpriteId = CreateFlyBirdSprite(); StartFlyBirdSwoopDown(task->tBirdSpriteId); SetFlyBirdPlayerSpriteId(task->tBirdSpriteId, objectEvent->spriteId);