summaryrefslogtreecommitdiff
path: root/include/global.h
blob: 65700837f806bc073fe004ef65835f1feb504d7e (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
#ifndef GUARD_GLOBAL_H
#define GUARD_GLOBAL_H

#include "gba/gba.h"

#ifndef REVISION
#define REVISION 0
#endif

// Prevent cross-jump optimization.
#define BLOCK_CROSS_JUMP asm("");

#define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0]))

extern u8 gStringVar1[];
extern u8 gStringVar2[];
extern u8 gStringVar3[];

enum
{
    MALE,
    FEMALE
};

struct Coords16
{
    s16 x;
    s16 y;
};

struct Time
{
    s16 days;
    s8 hours;
    s8 minutes;
    s8 seconds;
};

struct SaveBlock2
{
    u8 playerName[8];

    // 0 = Male
    // 1 = Female
    u8 playerGender;
    u8 sb2_field_9;
    u8 playerTrainerId[4];
    u16 playTimeHours;
    u8 playTimeMinutes;
    u8 playTimeSeconds;
    u8 playTimeVBlanks;

    // 0 = "NORMAL"
    // 1 = "LR"
    // 2 = "L=A"
    u8 optionsButtonMode;

    // 0 = "SLOW"
    // 1 = "MID"
    // 2 = "FAST"
    u8 optionsTextSpeed:3;

    // Specifies one of the 20 decorative borders for text boxes
    u8 optionsTextBoxFrameType:5;
    u8 filler[0x83];
    struct Time localTimeOffset;
};

extern struct SaveBlock2 gSaveBlock2;

#endif // GUARD_GLOBAL_H