mirror of
https://github.com/zeldaret/st
synced 2026-06-17 23:21:10 -04:00
5e934a8c9b
* name func_01ffd3d8 and func_01ffd400 * name func_01ffd3b0 * match func_ov024_020cf9d4 + improve the Random struct * UnkStruct_027e0cf8_00_0C_024 45% * match PassengerManager::GetRandomIndex * UnkStruct_027e0cf8_00_0C_024 OK * UnkStruct_027e0cf8_00_0C_024: do other sections * UnkStruct_027e0cf8_08_024 55% * cleanup: remplace delete into null by the delete macro * UnkStruct_027e0cf8_08_024 OK * fix build issues * UnkStruct_ov024_020d86a0_024 OK * PlayerActor_A0_38_024 .text OK, CreditsEndingType OK * tools: create courselist.py to convert .CLB data to yaml * UnkDataStruct4_14 OK * UnkDataStruct4 17% * UnkDataStruct4 OK * MiscAdvManager OK * PassengerManager OK * fix build issues * ZeldaTrainBinary OK * mark PassengerManager as complete and adjust delinks * UnkStruct_027e0cf8_08_00_024 OK * document more of UnkStruct_027e0ce0 * savefile hotfixes * UnkStruct_027e0ce0_34_024 OK * code_020d46b4_024 OK * UnkStruct_027e0d00 & UnkStruct_027e0d00_20 OK * code_020d51dc_024 OK * fix weird formatting * UnkTrainSystem1 OK * fix jp broken match * UnkTrainSystem2 OK * UnkStruct_027e0d08_024 31% * fix build issues * UnkStruct_027e0d08 OK!!! * remove useless parenthesis * ActorUnk_ov000_020a8bb0_EC OK * move ActorUnk_ov000_020a8bb0_EC to MainGame/Actor/ * ActorUnkOBPC OK * add sjiswrap support * solve remaining gaps and fix build issues * reorganise files + counter docs * tools: remove format command execution from defaults
100 lines
2.5 KiB
C++
100 lines
2.5 KiB
C++
#pragma once
|
|
|
|
#include "Item/ItemManager.hpp"
|
|
#include "MainGame/MiscAdvManager.hpp"
|
|
#include "Save/AdventureFlags.hpp"
|
|
#include "Save/SaveFile.hpp"
|
|
#include "System/SysNew.hpp"
|
|
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
|
|
#include "global.h"
|
|
#include "types.h"
|
|
|
|
#define SAVE_DATA_SIZE (sizeof(SaveSlot) + sizeof(u8) * NUM_UNK_BLOCKS * SIZE_UNK_BLOCK)
|
|
|
|
enum {
|
|
SaveDataIndex_SaveInfo,
|
|
SaveDataIndex_Treasures,
|
|
SaveDataIndex_02,
|
|
SaveDataIndex_03,
|
|
SaveDataIndex_04,
|
|
};
|
|
|
|
class SaveManager_21C {
|
|
public:
|
|
/* 00 */ unk32 mUnk_00;
|
|
|
|
unk32 func_ov000_020a1000();
|
|
};
|
|
|
|
struct SaveManager_36 {
|
|
/* 00 */ u8 mKeyAmount;
|
|
/* 01 */ STRUCT_PAD(0x01, 0x08);
|
|
/* 08 */
|
|
};
|
|
|
|
struct SaveManager_00 {
|
|
/* 000 */ STRUCT_PAD(0x00, 0x36);
|
|
/* 036 */ SaveManager_36 mUnk_36[0x60];
|
|
/* 336 */ STRUCT_PAD(0x336, 0xB30);
|
|
/* B30 */ unk32 mUnk_B30[1]; // flags, at least 1
|
|
/* BB8 */
|
|
};
|
|
|
|
class SaveManager {
|
|
public:
|
|
/* 000 */ SaveManager_00 *mUnk_000; // related to mUnk_184, allocated from func_ov001_020ba670
|
|
/* 004 */ unk32 mUnk_004;
|
|
/* 008 */ STRUCT_PAD(0x08, 0x204);
|
|
/* 204 */ unk16 mUnk_204;
|
|
/* 206 */ unk16 mUnk_206;
|
|
/* 208 */ unk16 mUnk_208;
|
|
/* 20A */ u8 mUnk_20A; // bool?
|
|
/* 20B */ unk8 mUnk_20B;
|
|
/* 20C */ unk32 mUnk_20C;
|
|
/* 210 */ unk32 mUnk_210;
|
|
/* 214 */ unk32 mUnk_214;
|
|
/* 218 */ SaveFile *mpSaveFile;
|
|
/* 21C */ SaveManager_21C mUnk_21C;
|
|
/* 220 */ STRUCT_PAD(0x220, 0x23C);
|
|
/* 23C */ PTMF<SaveFile>::PTMFCallback mUnk_23C;
|
|
/* 244 */ unk32 mUnk_244;
|
|
|
|
bool IsUnk20A() {
|
|
return this->mUnk_20A == 0;
|
|
}
|
|
|
|
BOOL IsUnk210() {
|
|
return this->mUnk_210 == 0;
|
|
}
|
|
|
|
SaveSlot *GetSaveSlot(int saveSlotIndex) {
|
|
return &this->mpSaveFile->mSlots[saveSlotIndex];
|
|
}
|
|
|
|
SaveSlot *GetSaveSlots() {
|
|
return this->mpSaveFile->mSlots;
|
|
}
|
|
|
|
SaveManager();
|
|
|
|
void func_ov000_020a0b2c(UnkCallback param1, unk32 param2);
|
|
bool func_ov000_020a0b70(void *param1, unk32 param2);
|
|
|
|
void func_ov001_020ba670();
|
|
void func_ov001_020ba7a8();
|
|
void func_ov001_020ba7c8(u16 saveSlotIndex);
|
|
|
|
void func_ov017_020c3040(void *param1, unk32 param2);
|
|
|
|
void func_ov019_020d08fc(unk32 param1, PTMF<SaveFile>::PTMFCallback param2);
|
|
bool func_ov019_020d0964(void);
|
|
void func_ov019_020d09dc(u16 saveSlotIndex);
|
|
void func_ov019_020d0a04(u16 saveSlotIndex);
|
|
void func_ov019_020d0ae0(unk32 param1);
|
|
|
|
static void func_ov019_020d086c(u16 param1);
|
|
static void func_ov019_020d0a2c(u16 param1);
|
|
};
|
|
|
|
extern SaveManager gSaveManager;
|