Alchemy
Loading...
Searching...
No Matches

mapframe.h

Go to the documentation of this file.
1#ifndef ALCHEMY_MAPFRAME_H
2#define ALCHEMY_MAPFRAME_H
3
4/// @file
5/// The map frame's scanlines and affine lines.
6
7#include "unit/field/field.h"
8#include "types.h"
9#include "static_assert.h"
10
11/// One screen line's ground-plane terms on the world map: its width scale and
12/// distance, from which its affine parameters are built.
17};
18
19/// One screen line's affine parameters for a background, as the HBlank DMA
20/// copies them into the BG2 or BG3 registers.
24};
25
26/// One screen line's affine parameters for BG2 and BG3.
28 struct MapAffineLine bg2, bg3;
29};
30
31/// The world map's frame work in heap slot 7: the scanline terms and two pages
32/// of per-line affine parameters, one built while the other is shown.
35 struct MapAffinePair pages[2][160];
37};
38
39STATIC_ASSERT(sizeof(struct MapScanline) == 20);
41STATIC_ASSERT(sizeof(struct MapAffineLine) == 16);
42STATIC_ASSERT(sizeof(struct MapAffinePair) == 32);
43STATIC_ASSERT(offsetof(struct MapFrameWork, pages) == 0xc80);
44STATIC_ASSERT(offsetof(struct MapFrameWork, unk3480) == 0x3480);
45STATIC_ASSERT(sizeof(struct MapFrameWork) == 0x3484);
46
47#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
One screen line's affine parameters for a background, as the HBlank DMA copies them into the BG2 or B...
Definition mapframe.h:21
One screen line's affine parameters for BG2 and BG3.
Definition mapframe.h:27
struct MapAffineLine bg2 bg3
Definition mapframe.h:28
The world map's frame work in heap slot 7: the scanline terms and two pages of per-line affine parame...
Definition mapframe.h:33
struct MapScanline scanlines[160]
Definition mapframe.h:34
u8 unk3480[4]
Definition mapframe.h:36
struct MapAffinePair pages[2][160]
Definition mapframe.h:35
One screen line's ground-plane terms on the world map: its width scale and distance,...
Definition mapframe.h:13
s32 offsetX
Definition mapframe.h:15
s32 offsetY
Definition mapframe.h:15
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