-
Notifications
You must be signed in to change notification settings - Fork 0
/
super-mario-64.bt
148 lines (135 loc) · 3.6 KB
/
super-mario-64.bt
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
//------------------------------------------------
//--- 010 Editor v12.0.1 Binary Template
//
// File: Super Mario 64 Save File
// Authors: Shadow-Link
// Version: 1.0
// Purpose:
// Category:
// File Mask:
// ID Bytes:
// History:
//------------------------------------------------
//-------------------
// Common structs
//-------------------
typedef struct {
byte courseId;
byte areaId;
short positionX;
short positionY;
short positionZ;
} MarioCapLocation;
typedef struct {
byte unknown : 1;
byte unknown : 1;
byte unknown : 1;
byte seenStarDoorAnimationThirdFloor : 1;
byte lostCapInSnowmansLand : 1;
byte lostCapInTallTallMountain : 1;
byte lostCapInShiftingSandLand : 1;
byte lostCapInLevelId : 1;
byte seenStarDoorAnimationBowserInTheFireSea : 1;
byte seenStarDoorAnimationBowserInTheDarkWorld : 1;
byte seenStarDoorAnimationSeenJollyRogerBay : 1;
byte seenStarDoorAnimationSeenCoolCoolMountain : 1;
byte seenStarDoorAnimationSeenWhompsFortress : 1;
byte seenStarDoorAnimationSeenSecretSlide : 1;
byte isCastleMoatDrained : 1;
byte isPortalMovedBack : 1;
byte isSecondFloorUnlocked : 1;
byte isBasementUnlocked : 1;
byte hasSecondFloorKey : 1;
byte hasBasementKey : 1;
byte isVanishCapActivated : 1;
byte isMetalCapActivated : 1;
byte isWingCapActivated : 1;
byte isSaveSlotInUse : 1;
} MiscFlags;
typedef struct {
byte cannonUnlockedForPreviousLevel : 1;
byte star1 : 1;
byte star2 : 1;
byte star3 : 1;
byte star4 : 1;
byte star5 : 1;
byte star6 : 1;
byte star7 : 1;
} LevelFlags;
typedef struct {
LevelFlags castle;
MiscFlags miscFlags;
LevelFlags bobombBattlefield;
LevelFlags whompsFortress;
LevelFlags jollyRogerBay;
LevelFlags coolCoolMountain;
LevelFlags bigBoosHaunt;
LevelFlags hazyMazeCave;
LevelFlags lethalLavaLand;
LevelFlags shiftingSandLand;
LevelFlags direDireDocks;
LevelFlags snowmansLand;
LevelFlags wetDryLand;
LevelFlags tallTallMountain;
LevelFlags tinyHugeIsland;
LevelFlags tickTockClock;
LevelFlags rainbowRide;
LevelFlags bowserDarkWorld;
LevelFlags bowserFireSea;
LevelFlags bowserSky;
LevelFlags princessSecretSlide;
LevelFlags cavernOfTheMetalCap;
LevelFlags towerOfTheWingCap;
LevelFlags vanishCapUnderTheMoat;
LevelFlags wingMarioOverTheRainbow;
LevelFlags secretAquarium;
LevelFlags theEnd;
} Flags;
typedef struct {
byte bobombBattlefield;
byte whompsFortress;
byte jollyRogerBay; byte coolCoolMountain; byte bigBoosHaunt; byte hazyMazeCave; byte lethalLavaLand; byte shiftingSandLand; byte direDireDocks; byte snowmansLand; byte wetDryLand; byte tallTallMountain; byte tinyHugeIsland; byte tickTockClock; byte rainbowRide;
} CoinScores;
typedef struct {
byte coinHighScores[16];
short soundSetting;
short languageSetting;
byte unknown[8];
char magic[2]; // HI
ushort checksum;
} GlobalData;
typedef struct {
MarioCapLocation marioCapLocation;
Flags flags;
CoinScores coinScores;
char magic[2]; // DA
ushort checksum;
} GameData;
//-------------------
// Start file
//-------------------
typedef struct {
GameData gameDataSlot1;
GameData gameDataSlot1Backup;
GameData gameDataSlot2;
GameData gameDataSlot2Backup;
GameData gameDataSlot3;
GameData gameDataSlot3Backup;
GameData gameDataSlot4;
GameData gameDataSlot5Backup;
GlobalData globalData;
GlobalData globalDataBackup;
} MarioSaveFile;
MarioSaveFile file;