mirror of
https://github.com/n64decomp/mk64
synced 2026-08-10 02:45:20 -04:00
More matching in code_800AF9B0 (#131)
* Name variables related to selecting a game from the main menu * Match a couple functions requiring jumptable * Match func_800B4728 * Match func_800B536C, func_800B5888, func_800B5AAC, and func_800B5AD8 * Name functions related to loading and validating SaveData * Match func_800B4CB4 * Update selected player defines * Match func_800B5404 * Match func_800B6088
This commit is contained in:
@@ -358,20 +358,19 @@ typedef struct {
|
||||
// Lowest dibit is the Mushroom Cup, 2nd dibit is the Flower Cup, etc
|
||||
u8 grandPrixPoints[4];
|
||||
u8 soundMode;
|
||||
// Its unknown what these bytes are used for
|
||||
u8 unknownBytes[3];
|
||||
// It's unknown what the first byte is used for
|
||||
u8 checksum[3];
|
||||
// For some reason there's 2 entries covering 4 cups
|
||||
// Instead of 4 entries, one per cup. Or even just one big entry for all 4 cups
|
||||
// Its also unknown why these are here when they're identical to the values found
|
||||
// in allCourseTimeTrialRecords
|
||||
OnlyBestTimeTrialRecords onlyBestTimeTrialRecords[2];
|
||||
// Its unknown why these last bytes exist as they appear to be copies of
|
||||
// of their non-Backup counterparts.
|
||||
// They could be some form of data coherency. If these don't match the non-Backup
|
||||
// versions that may indicate corrupt save data?
|
||||
// If checksum[1] or checksum[2] does not match their expected value,
|
||||
// the grandPrixPoints and soundMode are reset. Then if the backup data's
|
||||
// checksums are valid, copy the backup data to the main data.
|
||||
u8 grandPrixPointsBackup[4];
|
||||
u8 soundModeBackup;
|
||||
u8 unknownBytesBackup[3];
|
||||
u8 checksumBackup[3];
|
||||
} SaveData; // size = 0x200
|
||||
|
||||
typedef struct {
|
||||
@@ -399,6 +398,12 @@ typedef struct {
|
||||
char unk_10[0x10];
|
||||
} struct_D_8018CE10; // size = 0x20
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// Something related to time trial ghost data?
|
||||
char unk_00[0x80];
|
||||
} struct_8018EE10_entry;
|
||||
|
||||
typedef struct {
|
||||
char unk_00[0x920];
|
||||
} struct_D_802DFB80; // size = 0x920
|
||||
|
||||
@@ -21,6 +21,16 @@
|
||||
// Compiles to -0x1000 in diff.py
|
||||
#define PLAYER_HUMAN_AND_CPU PLAYER_EXISTS | PLAYER_HUMAN | PLAYER_CPU | PLAYER_START_SEQUENCE
|
||||
|
||||
#define ZERO_PLAYERS_SELECTED 0
|
||||
#define ONE_PLAYERS_SELECTED 1
|
||||
#define TWO_PLAYERS_SELECTED 2
|
||||
#define THREE_PLAYERS_SELECTED 3
|
||||
#define FOUR_PLAYERS_SELECTED 4
|
||||
#define SELECTED_PLAYER_DEFINES_TOTAL 5
|
||||
|
||||
// 2P Game has Grand Prix, VS, and Battle as available game types
|
||||
#define MAX_NUM_MAIN_MENU_GAME_TYPES 3
|
||||
|
||||
/**
|
||||
* Options for gModeSelection
|
||||
**/
|
||||
|
||||
Reference in New Issue
Block a user