blob: b50aa7d2ff52e272d63db9be9be5a95efd7cff88 (
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
#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]))
#define POKEMON_NAME_LENGTH 10
#define OT_NAME_LENGTH 7
extern u8 gStringVar1[];
extern u8 gStringVar2[];
extern u8 gStringVar3[];
extern u8 gStringVar4[];
enum
{
VERSION_SAPPHIRE = 1,
VERSION_RUBY = 2,
};
enum
{
MALE,
FEMALE
};
enum
{
OPTIONS_BUTTON_MODE_NORMAL,
OPTIONS_BUTTON_MODE_LR,
OPTIONS_BUTTON_MODE_L_EQUALS_A
};
enum
{
OPTIONS_TEXT_SPEED_SLOW,
OPTIONS_TEXT_SPEED_MID,
OPTIONS_TEXT_SPEED_FAST
};
struct Coords16
{
s16 x;
s16 y;
};
struct UCoords16
{
u16 x;
u16 y;
};
struct SecretBaseRecord
{
u8 sbr_field_0; // ID?
u8 sbr_field_1_0:4;
u8 gender:1;
u8 sbr_field_1_5:1;
u8 sbr_field_2[7]; // 0xFF bytes?
u8 trainerId[4]; // byte 0 is used for determining trainer class
u16 sbr_field_e;
u8 sbr_field_10;
u8 sbr_field_11;
u8 decorations[16];
u8 sbr_field_22[16];
u32 partyPersonality[6];
u16 partyMoves[6 * 4];
u16 partySpecies[6];
u16 partyHeldItems[6];
u8 partyLevels[6];
u8 partyEVs[6];
};
struct WarpData
{
s8 mapGroup;
s8 mapNum;
u8 warpId;
s16 x, y;
};
struct RamScriptData
{
u8 magic;
u8 mapGroup;
u8 mapNum;
u8 objectId;
u8 script[995];
};
struct RamScript
{
u32 checksum;
struct RamScriptData data;
};
struct SaveBlock1
{
struct Coords16 pos;
struct WarpData location;
u8 filler_C[0x484];
u32 money;
u16 coins;
u8 filler_496[0x31FA];
struct RamScript ramScript;
u8 filler_3A7C[0x44];
};
extern struct SaveBlock1 gSaveBlock1;
struct Time
{
s16 days;
s8 hours;
s8 minutes;
s8 seconds;
};
struct SaveBlock2
{
u8 playerName[8];
u8 playerGender; // MALE, FEMALE
u8 sb2_field_9;
u8 playerTrainerId[4];
u16 playTimeHours;
u8 playTimeMinutes;
u8 playTimeSeconds;
u8 playTimeVBlanks;
u8 optionsButtonMode; // OPTIONS_BUTTON_MODE_[NORMAL/LR/L_EQUALS_A]
u8 optionsTextSpeed:3; // OPTIONS_TEXT_SPEED_[SLOW/MID/FAST]
u8 optionsWindowFrameType:5; // Specifies one of the 20 decorative borders for text boxes
u8 filler_15[0x83];
struct Time localTimeOffset;
u8 filler_A0[0x7F0];
};
extern struct SaveBlock2 gSaveBlock2;
#endif // GUARD_GLOBAL_H
|