Fixed bird fly sprite shadow position.
Object event shadows are now displayed by default.
This commit is contained in:
parent
a15b0de70e
commit
7bcd2c8fb5
@ -177,7 +177,7 @@ struct ObjectEvent
|
||||
u32 inShallowFlowingWater:1;
|
||||
u32 inSandPile:1;
|
||||
u32 inHotSprings:1;
|
||||
u32 hasShadow:1;
|
||||
u32 noShadow:1;
|
||||
u32 spriteAnimPausedBackup:1;
|
||||
/*0x03*/ u32 spriteAffineAnimPausedBackup:1;
|
||||
u32 disableJumpLandingGroundEffect:1;
|
||||
|
||||
@ -2016,7 +2016,7 @@ static void sub_808E38C(struct ObjectEvent *objectEvent)
|
||||
{
|
||||
objectEvent->singleMovementActive = FALSE;
|
||||
objectEvent->triggerGroundEffectsOnMove = TRUE;
|
||||
objectEvent->hasShadow = FALSE;
|
||||
objectEvent->noShadow = FALSE;
|
||||
objectEvent->hasReflection = FALSE;
|
||||
objectEvent->inShortGrass = FALSE;
|
||||
objectEvent->inShallowFlowingWater = FALSE;
|
||||
@ -6159,7 +6159,7 @@ bool8 MovementAction_Jump2Down_Step1(struct ObjectEvent *objectEvent, struct Spr
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = FALSE;
|
||||
objectEvent->noShadow = FALSE;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -6176,7 +6176,7 @@ bool8 MovementAction_Jump2Up_Step1(struct ObjectEvent *objectEvent, struct Sprit
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = FALSE;
|
||||
objectEvent->noShadow = FALSE;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -6193,7 +6193,7 @@ bool8 MovementAction_Jump2Left_Step1(struct ObjectEvent *objectEvent, struct Spr
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = FALSE;
|
||||
objectEvent->noShadow = FALSE;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -6210,7 +6210,7 @@ bool8 MovementAction_Jump2Right_Step1(struct ObjectEvent *objectEvent, struct Sp
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = FALSE;
|
||||
objectEvent->noShadow = FALSE;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -6932,7 +6932,7 @@ bool8 MovementAction_JumpDown_Step1(struct ObjectEvent *objectEvent, struct Spri
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = 0;
|
||||
objectEvent->noShadow = 0;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -6949,7 +6949,7 @@ bool8 MovementAction_JumpUp_Step1(struct ObjectEvent *objectEvent, struct Sprite
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = 0;
|
||||
objectEvent->noShadow = 0;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -6966,7 +6966,7 @@ bool8 MovementAction_JumpLeft_Step1(struct ObjectEvent *objectEvent, struct Spri
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = 0;
|
||||
objectEvent->noShadow = 0;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -6983,7 +6983,7 @@ bool8 MovementAction_JumpRight_Step1(struct ObjectEvent *objectEvent, struct Spr
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = 0;
|
||||
objectEvent->noShadow = 0;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -7000,7 +7000,7 @@ bool8 MovementAction_JumpInPlaceDown_Step1(struct ObjectEvent *objectEvent, stru
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = 0;
|
||||
objectEvent->noShadow = 0;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -7017,7 +7017,7 @@ bool8 MovementAction_JumpInPlaceUp_Step1(struct ObjectEvent *objectEvent, struct
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = 0;
|
||||
objectEvent->noShadow = 0;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -7034,7 +7034,7 @@ bool8 MovementAction_JumpInPlaceLeft_Step1(struct ObjectEvent *objectEvent, stru
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = 0;
|
||||
objectEvent->noShadow = 0;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -7051,7 +7051,7 @@ bool8 MovementAction_JumpInPlaceRight_Step1(struct ObjectEvent *objectEvent, str
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = 0;
|
||||
objectEvent->noShadow = 0;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -7068,7 +7068,7 @@ bool8 MovementAction_JumpInPlaceDownUp_Step1(struct ObjectEvent *objectEvent, st
|
||||
{
|
||||
if (sub_80941E0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = 0;
|
||||
objectEvent->noShadow = 0;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -7085,7 +7085,7 @@ bool8 MovementAction_JumpInPlaceUpDown_Step1(struct ObjectEvent *objectEvent, st
|
||||
{
|
||||
if (sub_80941E0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = 0;
|
||||
objectEvent->noShadow = 0;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -7102,7 +7102,7 @@ bool8 MovementAction_JumpInPlaceLeftRight_Step1(struct ObjectEvent *objectEvent,
|
||||
{
|
||||
if (sub_80941E0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = 0;
|
||||
objectEvent->noShadow = 0;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -7119,7 +7119,7 @@ bool8 MovementAction_JumpInPlaceRightLeft_Step1(struct ObjectEvent *objectEvent,
|
||||
{
|
||||
if (sub_80941E0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = 0;
|
||||
objectEvent->noShadow = 0;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -7563,7 +7563,7 @@ bool8 MovementAction_AcroWheelieHopFaceDown_Step1(struct ObjectEvent *objectEven
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = FALSE;
|
||||
objectEvent->noShadow = FALSE;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -7580,7 +7580,7 @@ bool8 MovementAction_AcroWheelieHopFaceUp_Step1(struct ObjectEvent *objectEvent,
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = FALSE;
|
||||
objectEvent->noShadow = FALSE;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -7597,7 +7597,7 @@ bool8 MovementAction_AcroWheelieHopFaceLeft_Step1(struct ObjectEvent *objectEven
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = FALSE;
|
||||
objectEvent->noShadow = FALSE;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -7614,7 +7614,7 @@ bool8 MovementAction_AcroWheelieHopFaceRight_Step1(struct ObjectEvent *objectEve
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = FALSE;
|
||||
objectEvent->noShadow = FALSE;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -7631,7 +7631,7 @@ bool8 MovementAction_AcroWheelieHopDown_Step1(struct ObjectEvent *objectEvent, s
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = FALSE;
|
||||
objectEvent->noShadow = FALSE;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -7648,7 +7648,7 @@ bool8 MovementAction_AcroWheelieHopUp_Step1(struct ObjectEvent *objectEvent, str
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = FALSE;
|
||||
objectEvent->noShadow = FALSE;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -7665,7 +7665,7 @@ bool8 MovementAction_AcroWheelieHopLeft_Step1(struct ObjectEvent *objectEvent, s
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = FALSE;
|
||||
objectEvent->noShadow = FALSE;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -7682,7 +7682,7 @@ bool8 MovementAction_AcroWheelieHopRight_Step1(struct ObjectEvent *objectEvent,
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = FALSE;
|
||||
objectEvent->noShadow = FALSE;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -7699,7 +7699,7 @@ bool8 MovementAction_AcroWheelieJumpDown_Step1(struct ObjectEvent *objectEvent,
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = FALSE;
|
||||
objectEvent->noShadow = FALSE;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -7716,7 +7716,7 @@ bool8 MovementAction_AcroWheelieJumpUp_Step1(struct ObjectEvent *objectEvent, st
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = FALSE;
|
||||
objectEvent->noShadow = FALSE;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -7733,7 +7733,7 @@ bool8 MovementAction_AcroWheelieJumpLeft_Step1(struct ObjectEvent *objectEvent,
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = FALSE;
|
||||
objectEvent->noShadow = FALSE;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -7750,7 +7750,7 @@ bool8 MovementAction_AcroWheelieJumpRight_Step1(struct ObjectEvent *objectEvent,
|
||||
{
|
||||
if (sub_80941B0(objectEvent, sprite))
|
||||
{
|
||||
objectEvent->hasShadow = FALSE;
|
||||
objectEvent->noShadow = FALSE;
|
||||
sprite->data[2] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
@ -9443,9 +9443,9 @@ u32 StartFieldEffectForObjectEvent(u8 fieldEffectId, struct ObjectEvent *objectE
|
||||
|
||||
void DoShadowFieldEffect(struct ObjectEvent *objectEvent)
|
||||
{
|
||||
if (!objectEvent->hasShadow)
|
||||
if (objectEvent->noShadow)
|
||||
{
|
||||
objectEvent->hasShadow = 1;
|
||||
objectEvent->noShadow = FALSE;
|
||||
StartFieldEffectForObjectEvent(FLDEFF_SHADOW, objectEvent);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3259,7 +3259,7 @@ static void FlyOutFieldEffect_FlyOffWithBird(struct Task *task)
|
||||
struct ObjectEvent *objectEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
ObjectEventClearHeldMovementIfActive(objectEvent);
|
||||
objectEvent->inanimate = FALSE;
|
||||
objectEvent->hasShadow = FALSE;
|
||||
objectEvent->noShadow = TRUE; // TODO: Make shadow smaller instead of disappearing completely ?
|
||||
SetFlyBirdPlayerSpriteId(task->tBirdSpriteId, objectEvent->spriteId);
|
||||
CameraObjectReset2();
|
||||
task->tState++;
|
||||
@ -3479,6 +3479,7 @@ static void FlyInFieldEffect_BirdSwoopDown(struct Task *task)
|
||||
ObjectEventTurn(objectEvent, DIR_WEST);
|
||||
StartSpriteAnim(&gSprites[objectEvent->spriteId], 0x16);
|
||||
objectEvent->invisible = FALSE;
|
||||
objectEvent->noShadow = TRUE;
|
||||
task->tBirdSpriteId = CreateFlyBirdSprite();
|
||||
StartFlyBirdSwoopDown(task->tBirdSpriteId);
|
||||
SetFlyBirdPlayerSpriteId(task->tBirdSpriteId, objectEvent->spriteId);
|
||||
|
||||
@ -342,6 +342,7 @@ void UpdateShadowFieldEffect(struct Sprite *sprite)
|
||||
sprite->pos1.y = linkedSprite->pos1.y + sprite->data[3];
|
||||
sprite->invisible = linkedSprite->invisible;
|
||||
if (!objectEvent->active
|
||||
|| objectEvent->noShadow
|
||||
|| MetatileBehavior_IsPokeGrass(objectEvent->currentMetatileBehavior)
|
||||
|| MetatileBehavior_IsSurfableWaterOrUnderwater(objectEvent->currentMetatileBehavior)
|
||||
|| MetatileBehavior_IsSurfableWaterOrUnderwater(objectEvent->previousMetatileBehavior))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user