Alchemy
Loading...
Searching...
No Matches

kolima_forest_bend.h

Go to the documentation of this file.
1#ifndef ALCHEMY_UNIT_SCENE_KOLIMA_FOREST_BEND_H
2#define ALCHEMY_UNIT_SCENE_KOLIMA_FOREST_BEND_H
3
4#include "types.h"
5#include "field_scene.h"
6
7struct FieldActor;
8
9/// A log's saved record: its sprite, first map cell and orientation, then its
10/// actor once created.
11struct BendLog {
12 s16 sprite; ///< sprite number; -1 ends the list
13 s16 x; ///< map cells
14 s16 z; ///< map cells
15 s16 vertical; ///< nonzero runs north to south; zero west to east
16 struct FieldActor *actor; ///< created for this row; NULL in the defaults
17};
18
19STATIC_ASSERT(sizeof(struct BendLog) == 12);
21STATIC_ASSERT(offsetof(struct BendLog, vertical) == 6);
22STATIC_ASSERT(offsetof(struct BendLog, actor) == 8);
23
28const struct SceneEvent *KolimaForestBend_GetEvents(void);
30// Native calls precede this definition; see MATCHING.md.
31#ifdef UBFIX
32void State_StampRecordCells(const struct BendLog *records, s32 value);
33#endif
42
43#endif
The scene table formats: entrances, exits, placements and events, and the macros that write them.
const struct SceneRegion * KolimaForestBend_GetRegions(void)
struct SceneEvent gKolimaForestBendEvents[]
u8 gKolimaForestBend_PushAnimations[]
const struct SceneEntrance * KolimaForestBend_GetEntrances(void)
Where the party enters from the river and from Tret's tree.
struct BendLog gKolimaForestBend_DefaultRecords[]
The logs on a first visit, as struct BendLog: sprite 0xcd runs north to south and 0xcf west to east.
u32 gKolimaForestBendExits[]
Exit 1 to the river (scene 42), exit 2 to Tret's tree (scene 44).
struct ScenePlacement gKolimaForestBendPlacements[]
struct SceneEntrance gKolimaForestBendEntrances[]
s8 gKolimaForestBend_PushStepX[]
s32 KolimaForestBend_Initialize(void)
On entry: the logs' records come back from gSceneState, or on a first visit from the defaults with th...
const struct SceneEvent * KolimaForestBend_GetEvents(void)
The logs, the switch, the sign, the jump and the chest.
const u32 * KolimaForestBend_GetExits(void)
The paths back to the river and on to Tret's tree.
void State_StampRecordCells(const struct BendLog *records, s32 value)
Writes a collision code into the four cells of each log.
s8 gKolimaForestBend_PushStepZ[]
const struct ScenePlacement * KolimaForestBend_GetPlacements(void)
The short log, the switch and the sign.
#define STATIC_ASSERT(condition)
C89 permits repeated extern declarations of the same array.
#define offsetof(type, member)
Definition stddef.h:19
A log's saved record: its sprite, first map cell and orientation, then its actor once created.
s16 sprite
sprite number; -1 ends the list
struct FieldActor * actor
created for this row; NULL in the defaults
s16 z
map cells
s16 x
map cells
s16 vertical
nonzero runs north to south; zero west to east
A field actor: a person or thing on the field with a position, motion toward a target,...
Definition field_obj.h:30
union FieldCoordinate x
16.16 fixed-point pixels
Definition field_obj.h:35
A scene entrance: where and facing which way the party arrives, and the camera's bounds there (-1 for...
Definition field_scene.h:54
A scene event: its kind and detail, the trigger it answers, its condition and its value (a message or...
u32 value
A message below 0x10000, else an event function; for an exit, the exit kind its scene's exit table ma...
An actor a scene places: its sprite, the condition for placing it, how it behaves,...
Definition field_scene.h:81
A scene's exit region: the box that, while its condition holds, takes the party leader out through it...
The integer types, TRUE, UNUSED and the fixed-address macros.
signed int s32
Definition types.h:14
unsigned int u32
Definition types.h:15
signed char s8
Definition types.h:10
signed short s16
Definition types.h:12
unsigned char u8
Definition types.h:11