Merge branch 'romhack-no-lighting' into lighting
This commit is contained in:
commit
e1c56d76ac
11 changed files with 34 additions and 53 deletions
|
@ -6,5 +6,4 @@ gFieldCallback
|
||||||
gFieldCallback2
|
gFieldCallback2
|
||||||
gLocalLinkPlayerId
|
gLocalLinkPlayerId
|
||||||
gFieldLinkPlayerCount
|
gFieldLinkPlayerCount
|
||||||
gTimeOfDay
|
|
||||||
currentTimeBlend
|
currentTimeBlend
|
||||||
|
|
|
@ -100,7 +100,6 @@ void UpdateFollowingPokemon(void);
|
||||||
void RemoveFollowingPokemon(void);
|
void RemoveFollowingPokemon(void);
|
||||||
struct ObjectEvent * GetFollowerObject(void);
|
struct ObjectEvent * GetFollowerObject(void);
|
||||||
u8 GetDirectionToFace(s16, s16, s16, s16);
|
u8 GetDirectionToFace(s16, s16, s16, s16);
|
||||||
void UpdateLightSprite(struct Sprite *);
|
|
||||||
void TrySpawnObjectEvents(s16, s16);
|
void TrySpawnObjectEvents(s16, s16);
|
||||||
u8 CreateObjectGraphicsSprite(u16, void (*)(struct Sprite *), s16 x, s16 y, u8 subpriority);
|
u8 CreateObjectGraphicsSprite(u16, void (*)(struct Sprite *), s16 x, s16 y, u8 subpriority);
|
||||||
u8 TrySpawnObjectEvent(u8, u8, u8);
|
u8 TrySpawnObjectEvent(u8, u8, u8);
|
||||||
|
|
|
@ -183,7 +183,7 @@ struct ObjectEvent
|
||||||
u32 inShallowFlowingWater:1;
|
u32 inShallowFlowingWater:1;
|
||||||
u32 inSandPile:1;
|
u32 inSandPile:1;
|
||||||
u32 inHotSprings:1;
|
u32 inHotSprings:1;
|
||||||
u32 noShadow:1;
|
u32 hasShadow:1;
|
||||||
u32 spriteAnimPausedBackup:1;
|
u32 spriteAnimPausedBackup:1;
|
||||||
/*0x03*/ u32 spriteAffineAnimPausedBackup:1;
|
/*0x03*/ u32 spriteAffineAnimPausedBackup:1;
|
||||||
u32 disableJumpLandingGroundEffect:1;
|
u32 disableJumpLandingGroundEffect:1;
|
||||||
|
|
|
@ -497,7 +497,6 @@ struct SaveBlock2
|
||||||
|
|
||||||
extern struct SaveBlock2 *gSaveBlock2Ptr;
|
extern struct SaveBlock2 *gSaveBlock2Ptr;
|
||||||
|
|
||||||
extern u8 UpdateSpritePaletteWithTime(u8);
|
|
||||||
extern bool8 IsAccurateGBA(void);
|
extern bool8 IsAccurateGBA(void);
|
||||||
|
|
||||||
struct SecretBaseParty
|
struct SecretBaseParty
|
||||||
|
|
|
@ -63,7 +63,6 @@ extern bool8 (*gFieldCallback2)(void);
|
||||||
extern u8 gLocalLinkPlayerId;
|
extern u8 gLocalLinkPlayerId;
|
||||||
extern u8 gFieldLinkPlayerCount;
|
extern u8 gFieldLinkPlayerCount;
|
||||||
|
|
||||||
extern u8 gTimeOfDay;
|
|
||||||
extern struct TimeBlendSettings currentTimeBlend;
|
extern struct TimeBlendSettings currentTimeBlend;
|
||||||
|
|
||||||
// Exported ROM declarations
|
// Exported ROM declarations
|
||||||
|
|
|
@ -69,7 +69,6 @@ void TransferPlttBuffer(void);
|
||||||
u8 UpdatePaletteFade(void);
|
u8 UpdatePaletteFade(void);
|
||||||
void ResetPaletteFade(void);
|
void ResetPaletteFade(void);
|
||||||
bool8 BeginNormalPaletteFade(u32, s8, u8, u8, u16);
|
bool8 BeginNormalPaletteFade(u32, s8, u8, u8, u16);
|
||||||
bool8 BeginTimeOfDayPaletteFade(u32, s8, u8, u8, struct BlendSettings *, struct BlendSettings *, u16, u16);
|
|
||||||
void PaletteStruct_ResetById(u16);
|
void PaletteStruct_ResetById(u16);
|
||||||
void ResetPaletteFadeControl(void);
|
void ResetPaletteFadeControl(void);
|
||||||
void InvertPlttBuffer(u32);
|
void InvertPlttBuffer(u32);
|
||||||
|
|
|
@ -35,7 +35,6 @@ const struct SpriteTemplate gFieldEffectObjectTemplate_AshLaunch;
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_Bubbles;
|
const struct SpriteTemplate gFieldEffectObjectTemplate_Bubbles;
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_SmallSparkle;
|
const struct SpriteTemplate gFieldEffectObjectTemplate_SmallSparkle;
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_Rayquaza;
|
const struct SpriteTemplate gFieldEffectObjectTemplate_Rayquaza;
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_BallLight;
|
|
||||||
|
|
||||||
const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[] = {
|
const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[] = {
|
||||||
[FLDEFFOBJ_SHADOW_S] = &gFieldEffectObjectTemplate_ShadowSmall,
|
[FLDEFFOBJ_SHADOW_S] = &gFieldEffectObjectTemplate_ShadowSmall,
|
||||||
|
|
|
@ -28,12 +28,6 @@ static const struct SpriteFrameImage sPicTable_ShadowExtraLarge[] = {
|
||||||
obj_frame_tiles(gFieldEffectObjectPic_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 = {
|
const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowSmall = {
|
||||||
.tileTag = TAG_NONE,
|
.tileTag = TAG_NONE,
|
||||||
.paletteTag = TAG_WEATHER_START,
|
.paletteTag = TAG_WEATHER_START,
|
||||||
|
|
|
@ -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_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_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_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] = {};
|
static const u32 sFiller[0x48] = {};
|
||||||
const u8 gFieldEffectPic_CutGrass[] = INCBIN_U8("graphics/field_effects/pics/cut_grass.4bpp");
|
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 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_HoOh[] = INCBIN_U16("graphics/object_events/palettes/ho_oh.gbapal");
|
||||||
const u16 gObjectEventPal_Lugia[] = INCBIN_U16("graphics/object_events/palettes/lugia.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");
|
const u16 gObjectEventPaletteEmotes[] = INCBIN_U16("graphics/misc/emotes.gbapal");
|
||||||
|
|
|
@ -448,7 +448,6 @@ const u8 gInitialMovementTypeFacingDirections[] = {
|
||||||
#define OBJ_EVENT_PAL_TAG_RS_BRENDAN 0x1122
|
#define OBJ_EVENT_PAL_TAG_RS_BRENDAN 0x1122
|
||||||
#define OBJ_EVENT_PAL_TAG_RS_MAY 0x1123
|
#define OBJ_EVENT_PAL_TAG_RS_MAY 0x1123
|
||||||
#define OBJ_EVENT_PAL_TAG_DYNAMIC 0x1124
|
#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_EMOTES 0x8002
|
||||||
#define OBJ_EVENT_PAL_TAG_NONE 0x11FF
|
#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_RubySapphireBrendan, OBJ_EVENT_PAL_TAG_RS_BRENDAN},
|
||||||
{gObjectEventPal_RubySapphireMay, OBJ_EVENT_PAL_TAG_RS_MAY},
|
{gObjectEventPal_RubySapphireMay, OBJ_EVENT_PAL_TAG_RS_MAY},
|
||||||
{gObjectEventPal_Npc1, OBJ_EVENT_PAL_TAG_DYNAMIC},
|
{gObjectEventPal_Npc1, OBJ_EVENT_PAL_TAG_DYNAMIC},
|
||||||
{gObjectEventPaletteLight, OBJ_EVENT_PAL_TAG_LIGHT},
|
|
||||||
{gObjectEventPaletteEmotes, OBJ_EVENT_PAL_TAG_EMOTES},
|
{gObjectEventPaletteEmotes, OBJ_EVENT_PAL_TAG_EMOTES},
|
||||||
{NULL, 0x0000},
|
{NULL, 0x0000},
|
||||||
};
|
};
|
||||||
|
@ -2056,7 +2054,6 @@ void TrySpawnObjectEvents(s16 cameraX, s16 cameraY)
|
||||||
TrySpawnObjectEventTemplate(template, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, cameraX, cameraY);
|
TrySpawnObjectEventTemplate(template, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, cameraX, cameraY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TrySpawnLightSprites(cameraX, cameraY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoveObjectEventsOutsideView(void)
|
void RemoveObjectEventsOutsideView(void)
|
||||||
|
@ -2110,7 +2107,6 @@ void SpawnObjectEventsOnReturnToField(s16 x, s16 y)
|
||||||
SpawnObjectEventOnReturnToField(i, x, y);
|
SpawnObjectEventOnReturnToField(i, x, y);
|
||||||
}
|
}
|
||||||
CreateReflectionEffectSprites();
|
CreateReflectionEffectSprites();
|
||||||
TrySpawnLightSprites(x, y);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SpawnObjectEventOnReturnToField(u8 objectEventId, s16 x, s16 y)
|
static void SpawnObjectEventOnReturnToField(u8 objectEventId, s16 x, s16 y)
|
||||||
|
@ -2174,7 +2170,7 @@ static void ResetObjectEventFldEffData(struct ObjectEvent *objectEvent)
|
||||||
{
|
{
|
||||||
objectEvent->singleMovementActive = FALSE;
|
objectEvent->singleMovementActive = FALSE;
|
||||||
objectEvent->triggerGroundEffectsOnMove = TRUE;
|
objectEvent->triggerGroundEffectsOnMove = TRUE;
|
||||||
objectEvent->noShadow = FALSE;
|
objectEvent->hasShadow = FALSE;
|
||||||
objectEvent->hasReflection = FALSE;
|
objectEvent->hasReflection = FALSE;
|
||||||
objectEvent->inShortGrass = FALSE;
|
objectEvent->inShortGrass = FALSE;
|
||||||
objectEvent->inShallowFlowingWater = FALSE;
|
objectEvent->inShallowFlowingWater = FALSE;
|
||||||
|
@ -6164,7 +6160,7 @@ bool8 MovementAction_Jump2Down_Step1(struct ObjectEvent *objectEvent, struct Spr
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = FALSE;
|
objectEvent->hasShadow = FALSE;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -6181,7 +6177,7 @@ bool8 MovementAction_Jump2Up_Step1(struct ObjectEvent *objectEvent, struct Sprit
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = FALSE;
|
objectEvent->hasShadow = FALSE;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -6198,7 +6194,7 @@ bool8 MovementAction_Jump2Left_Step1(struct ObjectEvent *objectEvent, struct Spr
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = FALSE;
|
objectEvent->hasShadow = FALSE;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -6215,7 +6211,7 @@ bool8 MovementAction_Jump2Right_Step1(struct ObjectEvent *objectEvent, struct Sp
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = FALSE;
|
objectEvent->hasShadow = FALSE;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -6986,7 +6982,7 @@ bool8 MovementAction_JumpDown_Step1(struct ObjectEvent *objectEvent, struct Spri
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = 0;
|
objectEvent->hasShadow = 0;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7003,7 +6999,7 @@ bool8 MovementAction_JumpUp_Step1(struct ObjectEvent *objectEvent, struct Sprite
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = 0;
|
objectEvent->hasShadow = 0;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7020,7 +7016,7 @@ bool8 MovementAction_JumpLeft_Step1(struct ObjectEvent *objectEvent, struct Spri
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = 0;
|
objectEvent->hasShadow = 0;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7037,7 +7033,7 @@ bool8 MovementAction_JumpRight_Step1(struct ObjectEvent *objectEvent, struct Spr
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = 0;
|
objectEvent->hasShadow = 0;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7054,7 +7050,7 @@ bool8 MovementAction_JumpInPlaceDown_Step1(struct ObjectEvent *objectEvent, stru
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = 0;
|
objectEvent->hasShadow = 0;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7071,7 +7067,7 @@ bool8 MovementAction_JumpInPlaceUp_Step1(struct ObjectEvent *objectEvent, struct
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = 0;
|
objectEvent->hasShadow = 0;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7088,7 +7084,7 @@ bool8 MovementAction_JumpInPlaceLeft_Step1(struct ObjectEvent *objectEvent, stru
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = 0;
|
objectEvent->hasShadow = 0;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7105,7 +7101,7 @@ bool8 MovementAction_JumpInPlaceRight_Step1(struct ObjectEvent *objectEvent, str
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = 0;
|
objectEvent->hasShadow = 0;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7122,7 +7118,7 @@ bool8 MovementAction_JumpInPlaceDownUp_Step1(struct ObjectEvent *objectEvent, st
|
||||||
{
|
{
|
||||||
if (DoJumpInPlaceAnim(objectEvent, sprite))
|
if (DoJumpInPlaceAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = 0;
|
objectEvent->hasShadow = 0;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7139,7 +7135,7 @@ bool8 MovementAction_JumpInPlaceUpDown_Step1(struct ObjectEvent *objectEvent, st
|
||||||
{
|
{
|
||||||
if (DoJumpInPlaceAnim(objectEvent, sprite))
|
if (DoJumpInPlaceAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = 0;
|
objectEvent->hasShadow = 0;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7156,7 +7152,7 @@ bool8 MovementAction_JumpInPlaceLeftRight_Step1(struct ObjectEvent *objectEvent,
|
||||||
{
|
{
|
||||||
if (DoJumpInPlaceAnim(objectEvent, sprite))
|
if (DoJumpInPlaceAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = 0;
|
objectEvent->hasShadow = 0;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7173,7 +7169,7 @@ bool8 MovementAction_JumpInPlaceRightLeft_Step1(struct ObjectEvent *objectEvent,
|
||||||
{
|
{
|
||||||
if (DoJumpInPlaceAnim(objectEvent, sprite))
|
if (DoJumpInPlaceAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = 0;
|
objectEvent->hasShadow = 0;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7618,7 +7614,7 @@ bool8 MovementAction_AcroWheelieHopFaceDown_Step1(struct ObjectEvent *objectEven
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = FALSE;
|
objectEvent->hasShadow = FALSE;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7635,7 +7631,7 @@ bool8 MovementAction_AcroWheelieHopFaceUp_Step1(struct ObjectEvent *objectEvent,
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = FALSE;
|
objectEvent->hasShadow = FALSE;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7652,7 +7648,7 @@ bool8 MovementAction_AcroWheelieHopFaceLeft_Step1(struct ObjectEvent *objectEven
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = FALSE;
|
objectEvent->hasShadow = FALSE;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7669,7 +7665,7 @@ bool8 MovementAction_AcroWheelieHopFaceRight_Step1(struct ObjectEvent *objectEve
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = FALSE;
|
objectEvent->hasShadow = FALSE;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7686,7 +7682,7 @@ bool8 MovementAction_AcroWheelieHopDown_Step1(struct ObjectEvent *objectEvent, s
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = FALSE;
|
objectEvent->hasShadow = FALSE;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7703,7 +7699,7 @@ bool8 MovementAction_AcroWheelieHopUp_Step1(struct ObjectEvent *objectEvent, str
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = FALSE;
|
objectEvent->hasShadow = FALSE;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7720,7 +7716,7 @@ bool8 MovementAction_AcroWheelieHopLeft_Step1(struct ObjectEvent *objectEvent, s
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = FALSE;
|
objectEvent->hasShadow = FALSE;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7737,7 +7733,7 @@ bool8 MovementAction_AcroWheelieHopRight_Step1(struct ObjectEvent *objectEvent,
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = FALSE;
|
objectEvent->hasShadow = FALSE;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7754,7 +7750,7 @@ bool8 MovementAction_AcroWheelieJumpDown_Step1(struct ObjectEvent *objectEvent,
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = FALSE;
|
objectEvent->hasShadow = FALSE;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7771,7 +7767,7 @@ bool8 MovementAction_AcroWheelieJumpUp_Step1(struct ObjectEvent *objectEvent, st
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = FALSE;
|
objectEvent->hasShadow = FALSE;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7788,7 +7784,7 @@ bool8 MovementAction_AcroWheelieJumpLeft_Step1(struct ObjectEvent *objectEvent,
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = FALSE;
|
objectEvent->hasShadow = FALSE;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -7805,7 +7801,7 @@ bool8 MovementAction_AcroWheelieJumpRight_Step1(struct ObjectEvent *objectEvent,
|
||||||
{
|
{
|
||||||
if (DoJumpAnim(objectEvent, sprite))
|
if (DoJumpAnim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = FALSE;
|
objectEvent->hasShadow = FALSE;
|
||||||
sprite->sActionFuncId = 2;
|
sprite->sActionFuncId = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -9522,9 +9518,9 @@ u32 StartFieldEffectForObjectEvent(u8 fieldEffectId, struct ObjectEvent *objectE
|
||||||
|
|
||||||
static void DoShadowFieldEffect(struct ObjectEvent *objectEvent)
|
static void DoShadowFieldEffect(struct ObjectEvent *objectEvent)
|
||||||
{
|
{
|
||||||
if (objectEvent->noShadow)
|
if (!objectEvent->hasShadow)
|
||||||
{
|
{
|
||||||
objectEvent->noShadow = FALSE;
|
objectEvent->hasShadow = 1;
|
||||||
StartFieldEffectForObjectEvent(FLDEFF_SHADOW, objectEvent);
|
StartFieldEffectForObjectEvent(FLDEFF_SHADOW, objectEvent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3270,7 +3270,7 @@ static void FlyOutFieldEffect_FlyOffWithBird(struct Task *task)
|
||||||
struct ObjectEvent *objectEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
struct ObjectEvent *objectEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||||
ObjectEventClearHeldMovementIfActive(objectEvent);
|
ObjectEventClearHeldMovementIfActive(objectEvent);
|
||||||
objectEvent->inanimate = FALSE;
|
objectEvent->inanimate = FALSE;
|
||||||
objectEvent->noShadow = TRUE; // TODO: Make shadow smaller instead of disappearing completely ?
|
objectEvent->hasShadow = FALSE;
|
||||||
SetFlyBirdPlayerSpriteId(task->tBirdSpriteId, objectEvent->spriteId);
|
SetFlyBirdPlayerSpriteId(task->tBirdSpriteId, objectEvent->spriteId);
|
||||||
CameraObjectReset2();
|
CameraObjectReset2();
|
||||||
task->tState++;
|
task->tState++;
|
||||||
|
@ -3490,7 +3490,6 @@ static void FlyInFieldEffect_BirdSwoopDown(struct Task *task)
|
||||||
ObjectEventTurn(objectEvent, DIR_WEST);
|
ObjectEventTurn(objectEvent, DIR_WEST);
|
||||||
StartSpriteAnim(&gSprites[objectEvent->spriteId], ANIM_GET_ON_OFF_POKEMON_WEST);
|
StartSpriteAnim(&gSprites[objectEvent->spriteId], ANIM_GET_ON_OFF_POKEMON_WEST);
|
||||||
objectEvent->invisible = FALSE;
|
objectEvent->invisible = FALSE;
|
||||||
objectEvent->noShadow = TRUE;
|
|
||||||
task->tBirdSpriteId = CreateFlyBirdSprite();
|
task->tBirdSpriteId = CreateFlyBirdSprite();
|
||||||
StartFlyBirdSwoopDown(task->tBirdSpriteId);
|
StartFlyBirdSwoopDown(task->tBirdSpriteId);
|
||||||
SetFlyBirdPlayerSpriteId(task->tBirdSpriteId, objectEvent->spriteId);
|
SetFlyBirdPlayerSpriteId(task->tBirdSpriteId, objectEvent->spriteId);
|
||||||
|
|
Loading…
Reference in a new issue