Document some weather, field effects
This commit is contained in:
@@ -7919,11 +7919,11 @@ void GroundEffect_SpawnOnTallGrass(struct ObjectEvent *objEvent, struct Sprite *
|
||||
gFieldEffectArguments[0] = objEvent->currentCoords.x;
|
||||
gFieldEffectArguments[1] = objEvent->currentCoords.y;
|
||||
gFieldEffectArguments[2] = objEvent->previousElevation;
|
||||
gFieldEffectArguments[3] = 2;
|
||||
gFieldEffectArguments[3] = 2; // priority
|
||||
gFieldEffectArguments[4] = objEvent->localId << 8 | objEvent->mapNum;
|
||||
gFieldEffectArguments[5] = objEvent->mapGroup;
|
||||
gFieldEffectArguments[6] = (u8)gSaveBlock1Ptr->location.mapNum << 8 | (u8)gSaveBlock1Ptr->location.mapGroup;
|
||||
gFieldEffectArguments[7] = 1;
|
||||
gFieldEffectArguments[7] = TRUE; // skip to end of anim
|
||||
FieldEffectStart(FLDEFF_TALL_GRASS);
|
||||
}
|
||||
|
||||
@@ -7932,11 +7932,11 @@ void GroundEffect_StepOnTallGrass(struct ObjectEvent *objEvent, struct Sprite *s
|
||||
gFieldEffectArguments[0] = objEvent->currentCoords.x;
|
||||
gFieldEffectArguments[1] = objEvent->currentCoords.y;
|
||||
gFieldEffectArguments[2] = objEvent->previousElevation;
|
||||
gFieldEffectArguments[3] = 2;
|
||||
gFieldEffectArguments[3] = 2; // priority
|
||||
gFieldEffectArguments[4] = objEvent->localId << 8 | objEvent->mapNum;
|
||||
gFieldEffectArguments[5] = objEvent->mapGroup;
|
||||
gFieldEffectArguments[6] = (u8)gSaveBlock1Ptr->location.mapNum << 8 | (u8)gSaveBlock1Ptr->location.mapGroup;
|
||||
gFieldEffectArguments[7] = 0;
|
||||
gFieldEffectArguments[7] = FALSE; // don't skip to end of anim
|
||||
FieldEffectStart(FLDEFF_TALL_GRASS);
|
||||
}
|
||||
|
||||
@@ -8621,7 +8621,7 @@ bool8 SpriteAnimEnded(struct Sprite *sprite)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void UpdateObjectEventSpriteVisibility(struct Sprite *sprite, bool8 invisible)
|
||||
void UpdateObjectEventSpriteInvisibility(struct Sprite *sprite, bool8 invisible)
|
||||
{
|
||||
u16 x, y;
|
||||
s16 x2, y2;
|
||||
@@ -8642,9 +8642,9 @@ void UpdateObjectEventSpriteVisibility(struct Sprite *sprite, bool8 invisible)
|
||||
x2 = x - (sprite->centerToCornerVecX >> 1);
|
||||
y2 = y - (sprite->centerToCornerVecY >> 1);
|
||||
|
||||
if ((s16)x > 255 || x2 < -16)
|
||||
if ((s16)x >= DISPLAY_WIDTH + 16 || x2 < -16)
|
||||
sprite->invisible = TRUE;
|
||||
if ((s16)y > 175 || y2 < -16)
|
||||
if ((s16)y >= DISPLAY_HEIGHT + 16 || y2 < -16)
|
||||
sprite->invisible = TRUE;
|
||||
}
|
||||
|
||||
@@ -8656,7 +8656,7 @@ static void UpdateObjectEventSprite(struct Sprite *sprite)
|
||||
{
|
||||
UpdateObjectEventSpritePosition(sprite);
|
||||
SetObjectSubpriorityByZCoord(sprite->data[1], sprite, 1);
|
||||
UpdateObjectEventSpriteVisibility(sprite, sprite->tInvisible);
|
||||
UpdateObjectEventSpriteInvisibility(sprite, sprite->tInvisible);
|
||||
}
|
||||
|
||||
// Unused
|
||||
|
||||
Reference in New Issue
Block a user