Alchemy
Loading...
Searching...
No Matches

staged_actor_effect.h

Go to the documentation of this file.
1#ifndef ALCHEMY_STAGED_ACTOR_EFFECT_H
2#define ALCHEMY_STAGED_ACTOR_EFFECT_H
3
4/// @file
5/// A staged actor's effect and its request.
6
7#include "types.h"
8#include "static_assert.h"
9
10/// The party leader's actor as Kolima Forest's hop sees it: the coordinates
11/// it nudges, its jump speeds and its motion flags.
13 /// FieldActor's script pointer, cursor, facing and x; not named here.
14 u8 unk00[0x0c];
15 /// FieldActor's y, in 16.16 fixed-point pixels: after landing the hop
16 /// lowers it a pixel twice and raises it back.
18 u8 unk10[4]; ///< FieldActor's z; not named here
19 /// FieldActor's terrainHeight, in 16.16 fixed-point pixels, moved with
20 /// positionX.
22 u8 unk18[0x10]; ///< FieldActor's scales to velocityX; not named here
23 /// FieldActor's velocityY, in 16.16 fixed-point pixels per frame: 4 pixels
24 /// as the hop starts.
26 u8 unk2c[4]; ///< FieldActor's velocityZ; not named here
27 /// FieldActor's speed, in 16.16 fixed-point pixels per frame: 3 pixels for
28 /// the hop.
30 /// FieldActor's acceleration, in 16.16 fixed-point pixels per frame: 2
31 /// pixels for the hop.
33 u8 unk38[0x1d]; ///< FieldActor's targets to its sprite storage kind
34 /// ActorMotionFlag bits: the hop clears bits 7 and 0, zeroes them all when
35 /// it lands, then restores them.
37};
38
39/// The hop's destination, a 16.16 position read as its whole pixels.
41 u8 unk00[2]; ///< x's fraction; not named by TBS code
42 s16 cellX; ///< pixels
43 u8 unk04[6]; ///< y and z's fraction; read whole as a position
44 s16 cellZ; ///< pixels
45};
46
47STATIC_ASSERT(offsetof(struct StagedActorEffect, positionX) == 0x0c);
48STATIC_ASSERT(offsetof(struct StagedActorEffect, elevationRate) == 0x28);
49STATIC_ASSERT(offsetof(struct StagedActorEffect, motionFlags) == 0x55);
52
53#endif
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
The hop's destination, a 16.16 position read as its whole pixels.
u8 unk00[2]
x's fraction; not named by TBS code
u8 unk04[6]
y and z's fraction; read whole as a position
The party leader's actor as Kolima Forest's hop sees it: the coordinates it nudges,...
s32 moveRateZ
FieldActor's acceleration, in 16.16 fixed-point pixels per frame: 2 pixels for the hop.
u8 unk00[0x0c]
FieldActor's script pointer, cursor, facing and x; not named here.
u8 unk18[0x10]
FieldActor's scales to velocityX; not named here.
s32 positionZ
FieldActor's terrainHeight, in 16.16 fixed-point pixels, moved with positionX.
s32 positionX
FieldActor's y, in 16.16 fixed-point pixels: after landing the hop lowers it a pixel twice and raises...
u8 unk10[4]
FieldActor's z; not named here.
s32 moveRateX
FieldActor's speed, in 16.16 fixed-point pixels per frame: 3 pixels for the hop.
u8 motionFlags
ActorMotionFlag bits: the hop clears bits 7 and 0, zeroes them all when it lands, then restores them.
u8 unk2c[4]
FieldActor's velocityZ; not named here.
s32 elevationRate
FieldActor's velocityY, in 16.16 fixed-point pixels per frame: 4 pixels as the hop starts.
u8 unk38[0x1d]
FieldActor's targets to its sprite storage kind.
The integer types, TRUE, UNUSED and the fixed-address macros.
signed int s32
Definition types.h:14
signed short s16
Definition types.h:12
unsigned char u8
Definition types.h:11