summaryrefslogtreecommitdiff
path: root/include/screen.h
blob: fd0dd0b7b5df4cdb7b70806d1f8ccd8c25d2e677 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#ifndef SCREEN_H
#define SCREEN_H

#include "global.h"

typedef struct {
    /*0x00*/ u16 displayControl;
    /*0x02*/ u8 filler2[0x2];
    /*0x04*/ u16 unk4;
    /*0x06*/ u16 displayControlMask;
} LcdControls;

typedef struct {
    u16 control;
    u16 xOffset;
    u16 yOffset;
    u16 updated;
    void* subTileMap;
} BgSettings;

typedef struct {
    u16 control;
    s16 xOffset;
    s16 yOffset;
    u16 updated;
    void* subTileMap;
} BgAffSettings;

typedef struct {
    u16 dx;
    u16 dmx;
    u16 dy;
    u16 dmy;
    u16 xPointLeastSig;
    u16 xPointMostSig;
    u16 yPointLeastSig;
    u16 yPointMostSig;
} BgTransformationSettings;

typedef struct {
    BgTransformationSettings bg2;
    BgTransformationSettings bg3;
    u16 window0HorizontalDimensions;
    u16 window1HorizontalDimensions;
    u16 window0VerticalDimensions;
    u16 window1VerticalDimensions;
    u16 windowInsideControl;
    u16 windowOutsideControl;
    u16 mosaicSize;
    u16 layerFXControl;
    u16 alphaBlend;
    u16 layerBrightness;
} BgControls;

typedef struct {
    bool8 ready;
    bool8 readyBackup;
    u16 unused;
    u16* src;
    u16* dest;
    u32 size;
} VBlankDMA;

typedef struct {
    /*0x00*/ LcdControls lcd;
    /*0x08*/ BgSettings bg0;
    /*0x14*/ BgSettings bg1;
    /*0x20*/ BgAffSettings bg2;
    /*0x2c*/ BgAffSettings bg3;
    /*0x38*/ BgControls controls;
    /*0x6c*/ VBlankDMA vBlankDMA;
    // /*0x6d*/ u8 _6d;
    // /*0x70*/ void* _70;
    // /*0x74*/ u32 _74;
    // /*0x78*/ u32 _78;
} Screen;

extern Screen gScreen;

#endif // SCREEN_H