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
38typedef struct {
39 // GP Points scored for each CC mode
40 // 1st place is 3 points, 2nd is 2, etc.
41 // Lowest dibit is the Mushroom Cup, 2nd dibit is the Flower Cup, etc
42 u8 grandPrixPoints[4];
44} SaveInfo;
45
46typedef struct {
48 // It's unknown what the first byte is used for
49 u8 checksum[3];
50} Stuff; // size = 0x8
51
52typedef struct {
54 /* 0x180 */ Stuff main;
61 /* 0x188 */ OnlyBestTimeTrialRecords onlyBestTimeTrialRecords[2];
67 /* 0x1F8 */ Stuff backup;
68} SaveData; // size = 0x200
69
70extern SaveData gSaveData;
71
72#endif
SaveData gSaveData
Definition code_80091750.c:91
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:52
Stuff backup
Definition save_data.h:67
Stuff main
Definition save_data.h:54
AllCourseTimeTrialRecords allCourseTimeTrialRecords
Definition save_data.h:53
Definition save_data.h:38
u8 soundMode
Definition save_data.h:43
Definition save_data.h:46
SaveInfo saveInfo
Definition save_data.h:47
unsigned char u8
Definition ultratypes.h:12