88% match Inventory::Save

This commit is contained in:
Aetias
2023-12-20 10:45:27 +01:00
parent e6257e902b
commit e5cfa5950c
9 changed files with 289 additions and 249 deletions
+29 -28
View File
@@ -1,7 +1,7 @@
#pragma once
#include "types.h"
#include "SysNew.hpp"
#pragma once
#include "types.h"
#include "SysNew.hpp"
#include "Player/EquipItem.hpp"
#include "Actors/Navi/Navi.hpp"
@@ -161,10 +161,10 @@ struct SaveInventory {
/* 9f */ unk8 unk_9f[6];
/* a5 */ u8 equippedFairy;
/* a6 */
};
class Inventory : public SysObject {
private:
};
class Inventory : public SysObject {
private:
/* 000 */ ItemFlag mEquippedItem;
/* 004 */ ItemFlag mPrevEquippedItem;
/* 008 */ ItemFlag mForcedItem; // game crashes when any item besides this one is equipped
@@ -173,8 +173,8 @@ private:
/* 014 */ Navi *mNaviCourage;
/* 018 */ Navi *mNaviPower;
/* 01c */ Navi *mNaviWisdom;
/* 020 */ u16 mEquipLoadTimer;
/* 022 */ u16 mNumRupees;
/* 020 */ u16 mEquipLoadTimer;
/* 022 */ u16 mNumRupees;
/* 024 */ u8 mNumGems[Gem_COUNT];
/* 027 */ unk8 mUnk_027; // padding?
/* 028 */ ShipType mEquippedShipParts[ShipPart_COUNT];
@@ -185,33 +185,34 @@ private:
/* 0a6 */ unk16 mUnk_0a6; // padding?
/* 0ac */ EquipItem *(*mEquipItems)[ItemFlag_EQUIP_COUNT];
/* 0b0 */ u16 (*mAmmo)[ItemFlag_EQUIP_COUNT];
/* 0b4 */ u16 mQuiverSize;
/* 0b6 */ u16 mBombBagSize;
/* 0b8 */ u16 mBombchuBagSize;
/* 0b4 */ u16 mQuiverSize;
/* 0b6 */ u16 mBombBagSize;
/* 0b8 */ u16 mBombchuBagSize;
/* 0ba */ unk16 mUnk_0ba; // only between 0 and 9
/* 0bc */ Potion mPotions[2];
/* 0be */ unk8 mUnk_0be[2]; // padding?
/* 0c0 */ void *mIslandData[16];
/* 100 */ void *mDungeonData[5]; // non-null in dungeons/caves, similar struct to mIslandData
/* 114 */ void *mUnk_114;
/* 114 */ void *mUnk_114;
/* 118 */ unk32 mUnk_118;
/* 11c */ unk32 mUnk_11c;
/* 120 */ void *mUnk_120;
/* 124 */ void *mUnk_124;
/* 120 */ void *mUnk_120;
/* 124 */ void *mUnk_124;
/* 128 */ ItemFlags mItemFlags;
/* 138 */ u32 mSalvagedTreasureFlags;
/* 13c */ ShipPartPricesShown mShipPartPricesShown;
/* 148 */ u32 mTreasurePriceShownFlags[CEIL_DIV(Treasure_COUNT, 32)];
/* 14c */ unk8 mUnk_14c[0x4];
/* 150 */
public:
static Inventory* Create();
static void Destroy();
Inventory();
~Inventory();
void ClearPrevEquippedItem();
};
extern Inventory *gInventory;
/* 150 */
public:
static Inventory* Create();
static void Destroy();
Inventory();
~Inventory();
void ClearPrevEquippedItem();
void Save(SaveInventory *save);
};
extern Inventory *gInventory;
+9 -9
View File
@@ -1,9 +1,9 @@
#pragma once
#include "types.h"
class SysObject {
public:
static void* operator new(unsigned long length, u32 *id, u32 idLength);
static void operator delete(void *ptr);
};
#pragma once
#include "types.h"
class SysObject {
public:
static void* operator new(unsigned long length, u32 *id, u32 idLength);
static void operator delete(void *ptr);
};