Alchemy
Loading...
Searching...
No Matches

staged_actor.h

Go to the documentation of this file.
1#ifndef ALCHEMY_STAGED_ACTOR_H
2#define ALCHEMY_STAGED_ACTOR_H
3
4/// @file
5/// The pushable actors' movement probes and footprint bounds.
6
7#include "types.h"
8#include "field_obj.h"
9#include "field_runtime.h"
10#include "static_assert.h"
11
12/// Where a large thing ahead of the leader would roll to: its footprint, its
13/// actor, that position, and a callback during the leader's follow-through.
15 /// The large thing's row in gStagedActor_FootprintKinds and
16 /// gStagedActor_FootprintBounds, 0 to 5.
18 s32 actorSlot; ///< the large thing's actor number, 8 to 65
19 /// 16.16 pixels while moving; converted to cells by footprint redraws.
21 /// Run as the leader follows the rolling thing, when not null; the probe
22 /// clears it.
23 void (*callback)(void);
24};
25
26/// A footprint's bounds, as gStagedActor_FootprintBounds holds four words a
27/// footprint; no TBS code names this struct.
29 s32 x0; ///< left edge, pixels from the thing's position
30 s32 z0; ///< top edge, pixels from the thing's position
31 s32 x1; ///< right edge, pixels from the thing's position
32 s32 z1; ///< bottom edge, pixels from the thing's position
33};
34
35STATIC_ASSERT(sizeof(struct StagedActorProbe) == 0x18);
36STATIC_ASSERT(offsetof(struct StagedActorProbe, position.x) == 0x08);
37STATIC_ASSERT(offsetof(struct StagedActorProbe, position.z) == 0x10);
38
39STATIC_ASSERT(sizeof(struct StagedActorFootprint) == 0x10);
40
41#endif
Field objects and actors, and the scene transition styles.
The field's runtime work: map cells, scene records and regions, map markers and FieldWork.
STATIC_ASSERT, a compile-time check that emits nothing.
#define STATIC_ASSERT(condition)
C89 permits repeated extern declarations of the same array.
#define offsetof(type, member)
Definition stddef.h:19
A position on the field.
A footprint's bounds, as gStagedActor_FootprintBounds holds four words a footprint; no TBS code names...
s32 z0
top edge, pixels from the thing's position
s32 x0
left edge, pixels from the thing's position
s32 z1
bottom edge, pixels from the thing's position
s32 x1
right edge, pixels from the thing's position
Where a large thing ahead of the leader would roll to: its footprint, its actor, that position,...
struct FieldPosition position
16.16 pixels while moving; converted to cells by footprint redraws.
void(*) callback(void)
Run as the leader follows the rolling thing, when not null; the probe clears it.
s32 actorSlot
the large thing's actor number, 8 to 65
s32 footprintIndex
The large thing's row in gStagedActor_FootprintKinds and gStagedActor_FootprintBounds,...
The integer types, TRUE, UNUSED and the fixed-address macros.
signed int s32
Definition types.h:14