Alchemy
Loading...
Searching...
No Matches

object_staged_actor.h File Reference

Go to the source code of this file.

Functions

static struct FieldActor * StagedActor_FindAtTile (const struct FieldPosition *position, const struct FieldActor *origin)
 Returns the placed actor on the cell of the 16.16 position and at its height (in whole pixels), or 0.
static UNUSED void StagedActor_AdvancePair (void)
 The leader pushes the block in front of them a cell on, unless something solid is beyond it or on top of it, the ground beyond refuses it or it is still moving: after a quarter second's push (mode 8) the block and the leader slide one cell together, with SE_185.
static s32 StagedActor_FillGridAttributeRectangle (u32 layer, s32 x, s32 z, u32 width, u32 height, s32 value)
 Sets the collision code of a width by height rectangle of cells, from cell (x, z), to value, on map layer 0 to 2, or (3 and up) in gMapCellBuffer.
static s32 StagedActor_StopBlockedMotion (struct FieldActor *actor)
 The leader's movement callback while pushing a large thing: stop the leader when another actor that is not a large thing, or a wall, is in the way.
static struct FieldActor * FieldScene_FindActorRegion (s32 *direction, s32 *slot, s32 *footprint)
 Returns the large thing whose footprint covers the cell ahead of the leader (the leader not standing in line with its first column or row), with the leader's direction, its actor number and its footprint; or NULL.
static UNUSED s32 StagedActor_FindClearPosition (struct StagedActorProbe *probe)
 Finds where the large thing ahead of the leader would roll to: step its footprint on, a cell at a time the way the leader faces, until a cell of it meets something (a collision result of 2).
static UNUSED void SceneActor_MoveAndRedraw (struct StagedActorProbe probe)
 Rolls the large thing to the position probe found: the leader pushes (animation 8), the thing rolls (mode 3 or 2 by the direction) with SE_239 while the leader follows half a cell, and it stops with SE_288 and SE_213.
static UNUSED s32 FieldScene_RedrawActorFootprint (s32 id)
 Block large thing id's cells (collision 255) where it stands, through the map's layer 1 offset; returns 0 when its sprite is no large thing.

Variables

s32 gStagedActor_DirectionSteps []
 Pixel step by direction: X in the upper halfword, Z in the lower.
s32 gStagedActor_FootprintBounds []

Function Documentation

◆ StagedActor_FindAtTile()

struct FieldActor * StagedActor_FindAtTile ( const struct FieldPosition * position,
const struct FieldActor * origin )
static

Returns the placed actor on the cell of the 16.16 position and at its height (in whole pixels), or 0.

origin is not read.

Definition at line 46 of file object_staged_actor.h.

Referenced by StagedActor_AdvancePair(), and StagedActor_StopBlockedMotion().

◆ StagedActor_AdvancePair()

UNUSED void StagedActor_AdvancePair ( void )
static

The leader pushes the block in front of them a cell on, unless something solid is beyond it or on top of it, the ground beyond refuses it or it is still moving: after a quarter second's push (mode 8) the block and the leader slide one cell together, with SE_185.

Definition at line 75 of file object_staged_actor.h.

◆ StagedActor_FillGridAttributeRectangle()

◆ StagedActor_StopBlockedMotion()

s32 StagedActor_StopBlockedMotion ( struct FieldActor * actor)
static

The leader's movement callback while pushing a large thing: stop the leader when another actor that is not a large thing, or a wall, is in the way.

Definition at line 187 of file object_staged_actor.h.

Referenced by SceneActor_MoveAndRedraw(), and StagedActor_StopBlockedMotion().

◆ FieldScene_FindActorRegion()

struct FieldActor * FieldScene_FindActorRegion ( s32 * direction,
s32 * slot,
s32 * footprint )
static

Returns the large thing whose footprint covers the cell ahead of the leader (the leader not standing in line with its first column or row), with the leader's direction, its actor number and its footprint; or NULL.

Definition at line 240 of file object_staged_actor.h.

Referenced by FieldScene_FindActorRegion(), and StagedActor_FindClearPosition().

◆ StagedActor_FindClearPosition()

UNUSED s32 StagedActor_FindClearPosition ( struct StagedActorProbe * probe)
static

Finds where the large thing ahead of the leader would roll to: step its footprint on, a cell at a time the way the leader faces, until a cell of it meets something (a collision result of 2).

Fills probe with the thing, its footprint and that position; returns 0 when there is no thing or it cannot move.

Definition at line 305 of file object_staged_actor.h.

◆ SceneActor_MoveAndRedraw()

UNUSED void SceneActor_MoveAndRedraw ( struct StagedActorProbe probe)
static

Rolls the large thing to the position probe found: the leader pushes (animation 8), the thing rolls (mode 3 or 2 by the direction) with SE_239 while the leader follows half a cell, and it stops with SE_288 and SE_213.

Its cells are blocked (collision 255) at its new place, through the map's layer 1 offset, and its old place is given back what was under it.

Definition at line 397 of file object_staged_actor.h.

◆ FieldScene_RedrawActorFootprint()

UNUSED s32 FieldScene_RedrawActorFootprint ( s32 id)
static

Block large thing id's cells (collision 255) where it stands, through the map's layer 1 offset; returns 0 when its sprite is no large thing.

Definition at line 564 of file object_staged_actor.h.

Variable Documentation

◆ gStagedActor_DirectionSteps

s32 gStagedActor_DirectionSteps[]
extern

Pixel step by direction: X in the upper halfword, Z in the lower.

Definition at line 2131 of file altmiller_cave.c.

◆ gStagedActor_FootprintBounds

s32 gStagedActor_FootprintBounds[]
extern

Definition at line 2144 of file altmiller_cave.c.