You've already forked SpaghettiKart
mirror of
https://github.com/izzy2lost/SpaghettiKart.git
synced 2026-03-26 16:57:37 -07:00
a1f0d32d66
* Update menus.c (#634) * Update common_data.yml (#635) * Renames for screenId and other changes (#636) * screenId renames * Rename surface map to collision mesh (#637) * Rename some stack vars (#638) * Fix syntax error (#639) * Rename some stack vars * Update collision.c * Collision Documentation (#640) * Collision related renames * update doxygen (#649) * change bool (#644) Co-authored-by: MegaMech <MegaMech@users.noreply.github.com> * Update (#642) * Delete trig_tables_bss.c (#650) * fix typo audio (#656) * fix typo src actor (#657) Co-authored-by: MegaMech <MegaMech@users.noreply.github.com> * fix typo include (#658) * fix course (#659) * fix typo debug (#660) * fix typo data (#661) * replace number with const (#665) * fix typo buffers (#655) * fix typo buffers * tweak ld file * rename to sMemoryPool * add a warning --------- * fix typo src (#654) * fix typo src * fix non matcing * Update code_80091750.c --------- * fix typo racing (#653) * fix typo racing * get it match * replace G_LINE3D to G_QUAD --------- * fix typo src (#652) * fix ending typo (#651) * Action more info when it doesn't match and fix first diff (#662) * Update linux-compile.yml * fix first-diff * Update first-diff.py --------- * document texture of kart (#663) * document texture of kart * change screenPlayerId to screenId * some documentation around object * Revert "some documentation around object" This reverts commit cbb39078e036bf2a417bed67359e910213acab28. * more rename --------- * Make evaluate_collision_players_palm_tree better (#667) This matches just the same as before, but using those two casts instead of shifts seems more likely to be accurate to the original source code Signed-off-by: Gabriel Ravier <gabravier@gmail.com> * add fedora instruciton (#666) * start documenting animation (#668) * start documenting animation * Update course_data.c * change comment * update libultra asm (#648) * update libultra asm * fix gcc __osThreadTail --------- * Document Vehicles (#641) * start doc collision * fix merge * finish rename fonction related to vehicle * document around waypoint of vehicle * make some modification * make some change and rename one * copy_ to oldPos * doc smoke ferry and train * some rename * fix some renaming * precise index * rename a funciton * simplify waypoint_vehicles * change some name * change some name * rename move_to_point_direction * fix some conflict * Update code_80005FD0.c * Update code_80005FD0.h --------- * Label a save info loop (#645) * save info * more gcc progress * fix a value and do a rename (#669) * update clang and add action (#664) * update clang and add action * try clang on course folder only * forget two file * Update course_displaylists.inc.c * forget few other file * Update course_vertices.inc.c * format all code while get it match * second pass * format other dir * disable clang format on bad ido code * fix some tabulation * revert format on tool dir * Update clang-format.yml * ignore gbi.h * add some read me instruction * fix error * format and fixing error * Update README.md --------- * Update linkonly_generator.py (#670) * format more file * update * fix compilation issue * remove course_metadata folder * re add course metadata folder * fix banshee bordwalk crash * fix windows eurk * Update CMakeLists.txt ---------
73 lines
2.4 KiB
C
73 lines
2.4 KiB
C
#ifndef SAVE_DATA_H
|
|
#define SAVE_DATA_H
|
|
|
|
#include <common_structs.h>
|
|
|
|
typedef struct {
|
|
// 6 little endian 3-byte records.
|
|
// When converted to big endian the bottom 5 nibbles can be interpreted as the centisecond count for that record.
|
|
// The top nibble is the character ID of the charcter used to set that record
|
|
// The first 5 records are the top 5 3-lap records
|
|
// The 6th record is the best 1-lap record
|
|
u8 records[6][3];
|
|
// It's unknown what these bytes are used for
|
|
// Byte 1 might be an indicator that there is a ghost available for that course
|
|
u8 unknownBytes[5];
|
|
u8 checksum;
|
|
} CourseTimeTrialRecords; // size = 0x18
|
|
|
|
typedef struct {
|
|
// Each cup is made up of 4 courses
|
|
CourseTimeTrialRecords courseRecords[4];
|
|
} CupTimeTrialRecords; // size = 0x60
|
|
|
|
typedef struct {
|
|
// There are 4 cups total
|
|
CupTimeTrialRecords cupRecords[4];
|
|
} AllCourseTimeTrialRecords; // size = 0x180
|
|
|
|
typedef struct {
|
|
// Records 0 through 3 are for the first cup's courses
|
|
// Records 4 through 7 are for the second cup's courses
|
|
u8 bestThreelaps[8][3];
|
|
u8 bestSinglelaps[8][3];
|
|
// It's unknown what these bytes are used for
|
|
u8 unknownBytes[8];
|
|
} OnlyBestTimeTrialRecords; // size = 0x38
|
|
|
|
typedef struct {
|
|
// GP Points scored for each CC mode
|
|
// 1st place is 3 points, 2nd is 2, etc.
|
|
// Lowest dibit is the Mushroom Cup, 2nd dibit is the Flower Cup, etc
|
|
u8 grandPrixPoints[4];
|
|
u8 soundMode;
|
|
} SaveInfo;
|
|
|
|
typedef struct {
|
|
SaveInfo saveInfo;
|
|
// It's unknown what the first byte is used for
|
|
u8 checksum[3];
|
|
} Stuff; // size = 0x8
|
|
|
|
typedef struct {
|
|
/* 0x000 */ AllCourseTimeTrialRecords allCourseTimeTrialRecords;
|
|
/* 0x180 */ Stuff main;
|
|
/**
|
|
* 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
|
|
**/
|
|
/* 0x188 */ OnlyBestTimeTrialRecords onlyBestTimeTrialRecords[2];
|
|
/**
|
|
* 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.
|
|
**/
|
|
/* 0x1F8 */ Stuff backup;
|
|
} SaveData; // size = 0x200
|
|
|
|
extern SaveData gSaveData;
|
|
|
|
#endif
|