Mario Kart 64
Loading...
Searching...
No Matches
save_data.h
Go to the documentation of this file.
1#ifndef SAVE_DATA_H
2#define SAVE_DATA_H
3
4#include <common_structs.h>
5
6typedef struct {
7 // 6 little endian 3-byte records.
8 // When converted to big endian the bottom 5 nibbles can be interpreted as the centisecond count for that record.
9 // The top nibble is the character ID of the charcter used to set that record
10 // The first 5 records are the top 5 3-lap records
11 // The 6th record is the best 1-lap record
12 u8 records[6][3];
13 // It's unknown what these bytes are used for
14 // Byte 1 might be an indicator that there is a ghost available for that course
15 u8 unknownBytes[5];
17} CourseTimeTrialRecords; // size = 0x18
18
19typedef struct {
20 // Each cup is made up of 4 courses
21 CourseTimeTrialRecords courseRecords[4];
22} CupTimeTrialRecords; // size = 0x60
23
24typedef struct {
25 // There are 4 cups total
26 CupTimeTrialRecords cupRecords[4];
27} AllCourseTimeTrialRecords; // size = 0x180
28
29typedef struct {
30 // Records 0 through 3 are for the first cup's courses
31 // Records 4 through 7 are for the second cup's courses
32 u8 bestThreelaps[8][3];
33 u8 bestSinglelaps[8][3];
34 // It's unknown what these bytes are used for
35 u8 unknownBytes[8];
36} OnlyBestTimeTrialRecords; // size = 0x38
37
38
39typedef struct {
40 // GP Points scored for each CC mode
41 // 1st place is 3 points, 2nd is 2, etc.
42 // Lowest dibit is the Mushroom Cup, 2nd dibit is the Flower Cup, etc
43 u8 grandPrixPoints[4];
45} SaveInfo;
46
47typedef struct {
49 // It's unknown what the first byte is used for
50 u8 checksum[3];
51} Stuff; // size = 0x8
52
53typedef struct {
55 /* 0x180 */ Stuff main;
62 /* 0x188 */ OnlyBestTimeTrialRecords onlyBestTimeTrialRecords[2];
68 /* 0x1F8 */ Stuff backup;
69} SaveData; // size = 0x200
70
71extern SaveData gSaveData;
72
73#endif
SaveData gSaveData
Definition code_80091750.c:92
Definition save_data.h:24
Definition save_data.h:6
u8 checksum
Definition save_data.h:16
Definition save_data.h:19
Definition save_data.h:29
Definition save_data.h:53
Stuff backup
Definition save_data.h:68
Stuff main
Definition save_data.h:55
AllCourseTimeTrialRecords allCourseTimeTrialRecords
Definition save_data.h:54
Definition save_data.h:39
u8 soundMode
Definition save_data.h:44
Definition save_data.h:47
SaveInfo saveInfo
Definition save_data.h:48
unsigned char u8
Definition ultratypes.h:12