Skip to content
🌋️
Alchemy
Theme: Weyard
Theme: Modern
Mode: Auto
Mode: Light
Mode: Dark
Alchemy
Source
Reference
Loading...
Searching...
No Matches
overlay_object.h
Go to the documentation of this file.
1
#ifndef ALCHEMY_OVERLAY_OBJECT_H
2
#define ALCHEMY_OVERLAY_OBJECT_H
3
4
/// @file
5
/// Overlay objects and their records.
6
7
#include "
types.h
"
8
#include "
static_assert.h
"
9
10
struct
OverlayObjectRecord
{
11
u8
unk00
[9];
12
u8
flags
;
13
};
14
15
/// A field object as a Mercury Lighthouse beacon spark sees it: its position
16
/// and target, its angle round the flame and the flame it is linked to.
17
struct
OverlayObject
{
18
u8
unk00
[6];
19
u16
angle
;
///< 1/65536 turns
20
s32
coordinate08
;
///< 16.16 fixed-point pixels
21
u8
unk0c
[4];
22
s32
coordinate10
;
///< 16.16 fixed-point pixels
23
u8
unk14
[0x1c];
24
s32
field30
;
25
u8
unk34
[4];
26
s32
coordinate38
;
///< 16.16 fixed-point pixels
27
u8
unk3c
[4];
28
s32
coordinate40
;
///< 16.16 fixed-point pixels
29
u8
unk44
[0x0c];
30
struct
OverlayObjectRecord
*
record
;
31
u8
unk54
;
32
u8
unk55
;
33
u8
unk56
[3];
34
u8
unk59
;
35
u8
steeringFlags
;
36
u8
unk5b
[9];
37
u16
angle64
;
///< 1/65536 turns
38
u8
unk66
[2];
39
struct
OverlayObject
*
linkedObject
;
40
};
41
42
STATIC_ASSERT
(
offsetof
(
struct
OverlayObjectRecord
, flags) == 0x09);
43
STATIC_ASSERT
(
offsetof
(
struct
OverlayObject
,
record
) == 0x50);
44
STATIC_ASSERT
(
offsetof
(
struct
OverlayObject
,
angle
) == 0x06);
45
STATIC_ASSERT
(
offsetof
(
struct
OverlayObject
,
coordinate08
) == 0x08);
46
STATIC_ASSERT
(
offsetof
(
struct
OverlayObject
,
coordinate10
) == 0x10);
47
STATIC_ASSERT
(
offsetof
(
struct
OverlayObject
,
field30
) == 0x30);
48
STATIC_ASSERT
(
offsetof
(
struct
OverlayObject
,
coordinate38
) == 0x38);
49
STATIC_ASSERT
(
offsetof
(
struct
OverlayObject
,
coordinate40
) == 0x40);
50
STATIC_ASSERT
(
offsetof
(
struct
OverlayObject
,
unk55
) == 0x55);
51
STATIC_ASSERT
(
offsetof
(
struct
OverlayObject
,
unk59
) == 0x59);
52
STATIC_ASSERT
(
offsetof
(
struct
OverlayObject
,
steeringFlags
) == 0x5a);
53
STATIC_ASSERT
(
offsetof
(
struct
OverlayObject
,
angle64
) == 0x64);
54
STATIC_ASSERT
(
offsetof
(
struct
OverlayObject
,
linkedObject
) == 0x68);
55
56
#endif
static_assert.h
STATIC_ASSERT, a compile-time check that emits nothing.
STATIC_ASSERT
#define STATIC_ASSERT(condition)
C89 permits repeated extern declarations of the same array.
Definition
static_assert.h:15
offsetof
#define offsetof(type, member)
Definition
stddef.h:19
OverlayObjectRecord
Definition
overlay_object.h:10
OverlayObjectRecord::unk00
u8 unk00[9]
Definition
overlay_object.h:11
OverlayObjectRecord::flags
u8 flags
Definition
overlay_object.h:12
OverlayObject
A field object as a Mercury Lighthouse beacon spark sees it: its position and target,...
Definition
overlay_object.h:17
OverlayObject::unk66
u8 unk66[2]
Definition
overlay_object.h:38
OverlayObject::coordinate08
s32 coordinate08
16.16 fixed-point pixels
Definition
overlay_object.h:20
OverlayObject::coordinate10
s32 coordinate10
16.16 fixed-point pixels
Definition
overlay_object.h:22
OverlayObject::unk59
u8 unk59
Definition
overlay_object.h:34
OverlayObject::field30
s32 field30
Definition
overlay_object.h:24
OverlayObject::unk00
u8 unk00[6]
Definition
overlay_object.h:18
OverlayObject::linkedObject
struct OverlayObject * linkedObject
Definition
overlay_object.h:39
OverlayObject::steeringFlags
u8 steeringFlags
Definition
overlay_object.h:35
OverlayObject::angle64
u16 angle64
1/65536 turns
Definition
overlay_object.h:37
OverlayObject::unk54
u8 unk54
Definition
overlay_object.h:31
OverlayObject::record
struct OverlayObjectRecord * record
Definition
overlay_object.h:30
OverlayObject::angle
u16 angle
1/65536 turns
Definition
overlay_object.h:19
OverlayObject::unk56
u8 unk56[3]
Definition
overlay_object.h:33
OverlayObject::unk14
u8 unk14[0x1c]
Definition
overlay_object.h:23
OverlayObject::unk3c
u8 unk3c[4]
Definition
overlay_object.h:27
OverlayObject::unk55
u8 unk55
Definition
overlay_object.h:32
OverlayObject::unk34
u8 unk34[4]
Definition
overlay_object.h:25
OverlayObject::unk44
u8 unk44[0x0c]
Definition
overlay_object.h:29
OverlayObject::unk5b
u8 unk5b[9]
Definition
overlay_object.h:36
OverlayObject::unk0c
u8 unk0c[4]
Definition
overlay_object.h:21
OverlayObject::coordinate38
s32 coordinate38
16.16 fixed-point pixels
Definition
overlay_object.h:26
OverlayObject::coordinate40
s32 coordinate40
16.16 fixed-point pixels
Definition
overlay_object.h:28
types.h
The integer types, TRUE, UNUSED and the fixed-address macros.
s32
signed int s32
Definition
types.h:14
u16
unsigned short u16
Definition
types.h:13
u8
unsigned char u8
Definition
types.h:11
include
overlay_object.h