Alchemy
Loading...
Searching...
No Matches

object_dispatch.h

Go to the documentation of this file.
1#ifndef ALCHEMY_OBJECT_DISPATCH_H
2#define ALCHEMY_OBJECT_DISPATCH_H
3
4/// @file
5/// The object dispatcher's scripts: key checks, the player, the world map and
6/// the camera.
7
8#include "unit/field/field.h"
9#include "types.h"
10
11/// A field object as the object dispatcher's far calls take it.
13 u32 value00; ///< the object script's address
14 s16 value04; ///< the script cursor, in words
15 u8 unk06[0x2a]; ///< facing, position, scales and motion; not named here
16 s32 value30; ///< speed limit, 16.16 fixed-point pixels per frame
17 s32 value34; ///< acceleration, 16.16 fixed point
18 u8 unk38[0x18]; ///< the target, bounce, gravity and a spare word
19 union {
20 struct AnimationObject *child; ///< kind 1
21 void **children; ///< kind 2: four sprites, empty ones null
23 u8 kind; ///< low four bits: 0 no sprite, 1 one, 2 up to four
24 u8 unk55[2]; ///< motion flags and arrival axis; not named here
25 u8 value57; ///< the script's last flag test; cleared with a new script
26 u8 unk58[3]; ///< snap, collision and steering flags; not named here
27 u8 value5b; ///< paused; cleared with a new script
28 u8 unk5c; ///< nonzero keeps its sprite's VRAM; not named here
29 u8 value5d; ///< the script's SC_LOOP count; cleared with a new script
30 u8 unk5e[6]; ///< the script's wait, refusals, frozen; not named here
31 s16 value64; ///< the action script's parameter; the camera clears it
32 u8 unk66[2]; ///< the player's footprint side; not named here
33 s32 argument; ///< the linked object a script approaches or follows
34 u8 unk6c[4]; ///< the update hook; not named here
35};
36
38extern const s32 gObjectDispatch_KeysScript[];
43extern const s32 gObjectDispatch_EndScript[];
44
45#endif
const s32 gObjectDispatch_EndScript[]
The idle script ObjectDispatch_StartIdle gives an object.
const s32 gObjectDispatch_KeysScript[]
Started by ObjectDispatch_StartMoveByKeys.
const s32 gObjectDispatch_ApproachLinkScript[]
Started by ObjectDispatch_StartApproachLink.
const s32 gObjectDispatch_CameraScript[]
Started by ObjectDispatch_StartCamera.
const s32 gObjectDispatch_PlayerScript[]
Started by ObjectDispatch_StartPlayerControl.
const s32 gObjectDispatch_KeyCheckScript[]
Runs SC_KEY_COUNT every frame; started by ObjectDispatch_StartKeyCheck.
const s32 gObjectDispatch_WorldMapScript[]
Started by ObjectDispatch_StartWorldMapControl.
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
Definition animspr.h:108
A field object as the object dispatcher's far calls take it.
s32 argument
the linked object a script approaches or follows
u8 value57
the script's last flag test; cleared with a new script
u8 unk5c
nonzero keeps its sprite's VRAM; not named here
u8 kind
low four bits: 0 no sprite, 1 one, 2 up to four
s16 value64
the action script's parameter; the camera clears it
s16 value04
the script cursor, in words
u8 unk5e[6]
the script's wait, refusals, frozen; not named here
u8 unk66[2]
the player's footprint side; not named here
u32 value00
the object script's address
s32 value34
acceleration, 16.16 fixed point
u8 unk06[0x2a]
facing, position, scales and motion; not named here
u8 value5d
the script's SC_LOOP count; cleared with a new script
union DispatchObject::@360171073024331352270206224065071342064266305270 target
u8 unk55[2]
motion flags and arrival axis; not named here
u8 unk38[0x18]
the target, bounce, gravity and a spare word
s32 value30
speed limit, 16.16 fixed-point pixels per frame
u8 unk58[3]
snap, collision and steering flags; not named here
u8 value5b
paused; cleared with a new script
u8 unk6c[4]
the update hook; not named here
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 short s16
Definition types.h:12
unsigned char u8
Definition types.h:11
void ** children
kind 2: four sprites, empty ones null
struct AnimationObject * child
kind 1