mirror of
https://github.com/zeldaret/st
synced 2026-08-21 22:40:41 -04:00
Misc stuff 4 (#59)
* playrget progress and match treasuremanager remaining functions * some docs * fix build issues * random docs * match func_ov094_02172290 * random docs * actor cleanup * match freestanding item funcs * mType -> mpProfile * decompile random functions * docs and start of wip chest stuff * random docs * more random docs * match func_ov036_0211d0a8 * match func_ov036_0211d2dc & func_ov036_0211d570 * match func_ov110_02184a40 * random doc * document letter/stamps system * match func_ov001_020bb9f8 * fix build issues * decompile tres * start decomp chest base * fix regressions * name TRES * name UnkStruct_ov024_020d86b0 * name stamp types and update save struct stuff * name things and document BMG IDs
This commit is contained in:
+37
-46
@@ -18,46 +18,47 @@
|
||||
#define OV040_ARM ARM
|
||||
#endif
|
||||
|
||||
class Actor_5c_Base {
|
||||
class ActorParams {
|
||||
public:
|
||||
/* 00 */ Vec3p mUnk_00;
|
||||
/* 0C */ s16 mUnk_0C;
|
||||
/* 0E */ unk16 mUnk_0E; // padding?
|
||||
/* 10 */
|
||||
|
||||
Actor_5c_Base() {};
|
||||
};
|
||||
|
||||
class Actor_5c : public Actor_5c_Base {
|
||||
public:
|
||||
/* 00 (base) */
|
||||
// /* 04 */ STRUCT_PAD(0x04, 0x28);
|
||||
// /* 28 */ unk32 mUnk_28;
|
||||
|
||||
Actor_5c() {};
|
||||
void func_ov000_020975f8();
|
||||
};
|
||||
|
||||
class Actor_5c_temp : public Actor_5c_Base {
|
||||
public:
|
||||
/* 00 (base) */
|
||||
/* 10 */ unk16 mUnk_10[3];
|
||||
/* 16 */ STRUCT_PAD(0x16, 0x28);
|
||||
/* 00 */ Vec3p mInitialPos;
|
||||
/* 0C */ s16 mInitialAngle;
|
||||
/* 0E */ s8 mUnk_0E;
|
||||
/* 0F */ bool mUnk_0F;
|
||||
/* 10 */ u16 mParams[4];
|
||||
/* 18 */ Vec2b mUnk_18;
|
||||
/* 1A */ u16 mUnk_1A;
|
||||
/* 1C */ union {
|
||||
unk32 mUnk_1C;
|
||||
u16 mUnk_1C_0;
|
||||
u16 mUnk_1C_2;
|
||||
};
|
||||
/* 20 */ union {
|
||||
unk32 mUnk_20;
|
||||
unk16 mUnk_20_0;
|
||||
unk16 mUnk_20_2;
|
||||
};
|
||||
/* 24 */ unk16 mUnk_24;
|
||||
/* 26 */ union {
|
||||
unk16 mUnk_26;
|
||||
unk8 mUnk_26_0;
|
||||
unk8 mUnk_26_1;
|
||||
};
|
||||
/* 28 */ unk32 mUnk_28;
|
||||
/* 2C */ unk32 mUnk_2C;
|
||||
/* 30 */
|
||||
|
||||
Actor_5c_temp() {};
|
||||
void func_ov000_020975f8();
|
||||
};
|
||||
|
||||
class UnkStruct_ov000_020b539c {
|
||||
public:
|
||||
/* 00 */ Actor_5c_Base mUnk_00[3];
|
||||
/* 00 */ ActorParams mUnk_00;
|
||||
/* 30 */ ActorProfile *mUnk_30;
|
||||
/* 34 */
|
||||
|
||||
ActorProfile **func_ov000_02073dc();
|
||||
ActorProfile **func_ov000_02073e8();
|
||||
ActorProfile *func_ov000_020974dc(u32 id);
|
||||
ActorProfile *GetProfileFromId(ActorId actorId);
|
||||
};
|
||||
|
||||
typedef u32 ActorFlags;
|
||||
@@ -123,23 +124,9 @@ public:
|
||||
/* 52 */ u16 mUnk_52;
|
||||
/* 54 */ unk32 mUnk_54;
|
||||
/* 58 */ ActorFlags mFlags[1];
|
||||
/* 5C */ Actor_5c mUnk_5C;
|
||||
/* 6C */ u16 mUnk_6C; // actor user id?
|
||||
/* 6E */ u16 mUnk_6E;
|
||||
/* 70 */ u16 mUnk_70;
|
||||
/* 70 */ u16 mUnk_72;
|
||||
/* 74 */ u8 mUnk_74;
|
||||
/* 74 */ u8 mUnk_75;
|
||||
/* 76 */ u16 mUnk_76;
|
||||
/* 78 */ u16 mUnk_78;
|
||||
/* 7A */ unk16 mUnk_7A;
|
||||
/* 7C */ unk32 mUnk_7C;
|
||||
/* 80 */ s16 mUnk_80;
|
||||
/* 80 */ unk16 mUnk_82;
|
||||
/* 84 */ unk32 mUnk_84;
|
||||
/* 88 */ unk32 mUnk_88;
|
||||
/* 5C */ ActorParams mUnk_5C;
|
||||
/* 8C */ ActorRef mRef;
|
||||
/* 90 */ ActorProfile *mType;
|
||||
/* 90 */ ActorProfile *mpProfile;
|
||||
/* 94 */
|
||||
|
||||
/* 00 */ virtual void vfunc_00(Vec3p *param1);
|
||||
@@ -170,6 +157,10 @@ public:
|
||||
*(u32 *) this->mFlags = 0;
|
||||
}
|
||||
|
||||
void Kill() {
|
||||
UNSET_FLAG(this->mFlags, ActorFlag_Alive);
|
||||
}
|
||||
|
||||
Actor();
|
||||
|
||||
ActorId GetActorId();
|
||||
@@ -195,9 +186,9 @@ public:
|
||||
s32 func_ov000_020985f0(void *param1);
|
||||
void func_ov000_0209862c(unk32 param1);
|
||||
|
||||
void func_ov000_020973f4(UnkStruct_ov000_020b539c *param1, ActorId param2, Actor_5c *param3, unk32 param4);
|
||||
void func_ov000_020973f4(UnkStruct_ov000_020b539c *param1, ActorId param2, Actor_5c *param3);
|
||||
void func_ov000_020973f4(UnkStruct_ov000_020b539c *param1, ActorId param2, Actor_5c param3);
|
||||
void func_ov000_020973f4(UnkStruct_ov000_020b539c *param1, ActorId param2, ActorParams *param3, unk32 param4);
|
||||
void func_ov000_020973f4(UnkStruct_ov000_020b539c *param1, ActorId param2, ActorParams *param3);
|
||||
void func_ov000_020973f4(UnkStruct_ov000_020b539c *param1, ActorId param2, ActorParams param3);
|
||||
void func_ov000_020989e0();
|
||||
|
||||
bool func_ov000_02098a60(unk32 param1);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "Actor/Actor.hpp"
|
||||
#include "Actor/ActorProfile.hpp"
|
||||
#include "Item/Item.hpp"
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
@@ -28,7 +29,7 @@ public:
|
||||
|
||||
void func_ov036_0211bc20(void);
|
||||
void func_ov036_0211bc84(void);
|
||||
void func_ov036_0211bcb0(void);
|
||||
ItemId func_ov036_0211bcb0(unk32 param1);
|
||||
};
|
||||
|
||||
class ActorProfileUnkGORY : public ActorProfile_Derived1 {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "Actor/Actor.hpp"
|
||||
#include "Actor/ActorProfile.hpp"
|
||||
#include "Item/Item.hpp"
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
@@ -20,7 +21,8 @@ public:
|
||||
class ActorUnkKEYN : public Actor {
|
||||
public:
|
||||
/* 00 (base) */
|
||||
/* 94 */
|
||||
/* 94 */ STRUCT_PAD(0x94, 0xA0);
|
||||
/* A0 */ ItemId mItemId;
|
||||
|
||||
ActorUnkKEYN();
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "Actor/Actor.hpp"
|
||||
#include "Actor/ActorProfile.hpp"
|
||||
#include "Item/Item.hpp"
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
@@ -19,8 +20,11 @@ public:
|
||||
|
||||
class ActorUnkSHIT : public Actor {
|
||||
public:
|
||||
/* 00 (base) */
|
||||
/* 94 */
|
||||
/* 000 (base) */
|
||||
/* 094 */ STRUCT_PAD(0x94, 0xE4);
|
||||
/* 0E4 */ ItemId mItemId;
|
||||
/* 0E8 */ STRUCT_PAD(0xE8, 0x2D3);
|
||||
/* 2D3 */ bool mUnk_2D3;
|
||||
|
||||
ActorUnkSHIT();
|
||||
|
||||
@@ -46,17 +50,17 @@ public:
|
||||
void func_ov036_0211c9ac(void);
|
||||
void func_ov036_0211c9cc(void);
|
||||
void func_ov036_0211c9d4(void);
|
||||
void func_ov036_0211cddc(void);
|
||||
unk32 func_ov036_0211cddc(void);
|
||||
void func_ov036_0211cdfc(void);
|
||||
void func_ov036_0211ceec(void);
|
||||
void func_ov036_0211d0a8(void);
|
||||
u16 func_ov036_0211ceec(void);
|
||||
unk32 func_ov036_0211d0a8(void);
|
||||
void func_ov036_0211d22c(void);
|
||||
void func_ov036_0211d254(void);
|
||||
void func_ov036_0211d270(void);
|
||||
void func_ov036_0211d28c(void);
|
||||
void func_ov036_0211d2a8(void);
|
||||
void func_ov036_0211d2dc(void);
|
||||
void func_ov036_0211d570(void);
|
||||
bool func_ov036_0211d2dc(void);
|
||||
void func_ov036_0211d570(unk32 param1);
|
||||
void func_ov036_0211d75c(void);
|
||||
void func_ov036_0211d774(void);
|
||||
void func_ov036_0211d790(void);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "Actor/Actor.hpp"
|
||||
#include "Actor/ActorProfile.hpp"
|
||||
#include "Item/Item.hpp"
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
@@ -20,7 +21,8 @@ public:
|
||||
class ActorUnkSZKU : public Actor {
|
||||
public:
|
||||
/* 00 (base) */
|
||||
/* 94 */
|
||||
/* 94 */ STRUCT_PAD(0x94, 0xA0);
|
||||
/* A0 */ ItemId mItemId;
|
||||
|
||||
ActorUnkSZKU();
|
||||
|
||||
|
||||
@@ -126,11 +126,11 @@ enum ItemId_ {
|
||||
/* 0x16 */ ItemId_SnowGlyph = 22,
|
||||
/* 0x17 */ ItemId_OceanGlyph = 23,
|
||||
/* 0x18 */ ItemId_FireGlyph = 24,
|
||||
/* 0x19 */ ItemId_25 = 25,
|
||||
/* 0x1A */ ItemId_26 = 26,
|
||||
/* 0x1B */ ItemId_27 = 27,
|
||||
/* 0x1C */ ItemId_28 = 28,
|
||||
/* 0x1D */ ItemId_29 = 29,
|
||||
/* 0x19 */ ItemId_25 = 25, // glyph after forest restoration song
|
||||
/* 0x1A */ ItemId_26 = 26, // glyph after restoration song
|
||||
/* 0x1B */ ItemId_27 = 27, // glyph after restoration song
|
||||
/* 0x1C */ ItemId_28 = 28, // glyph after restoration song
|
||||
/* 0x1D */ ItemId_29 = 29, // glyph after restoration song
|
||||
/* 0x1E */ ItemId_FinalTrack = 30, // unlocks the endgame portal
|
||||
/* 0x1F */ ItemId_31 = 31,
|
||||
/* 0x20 */ ItemId_32 = 32,
|
||||
@@ -221,7 +221,7 @@ enum ItemId_ {
|
||||
};
|
||||
|
||||
#define MAX_TREASURE 99
|
||||
typedef s16 TreasureType;
|
||||
typedef s32 TreasureType;
|
||||
enum TreasureType_ {
|
||||
TreasureType_None = -1,
|
||||
TreasureType_DemonFossil = 0,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "Item/Item.hpp"
|
||||
#include "Save/AdventureFlags.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
@@ -108,9 +109,11 @@ public:
|
||||
unk32 func_ov000_020a8ab8();
|
||||
unk32 func_ov000_020a8acc();
|
||||
|
||||
void func_ov001_020bb9f8();
|
||||
|
||||
bool func_ov110_02184a40(ItemId itemId);
|
||||
static ItemId func_ov110_02185da4(ItemId itemId);
|
||||
static ItemFlag func_ov110_02185db4(ItemId itemId);
|
||||
static u32 GetBmgIDFromItem(ItemId itemId);
|
||||
static AdventureFlag GetAdvFlagFromItem(ItemId itemId);
|
||||
};
|
||||
|
||||
class TreasureManager : public ItemManager {
|
||||
@@ -126,15 +129,16 @@ public:
|
||||
TreasureManager();
|
||||
~TreasureManager();
|
||||
|
||||
void func_ov000_020a9b10();
|
||||
void func_ov000_020a9b2c();
|
||||
void func_ov000_020a9b3c();
|
||||
void func_ov000_020a9b4c();
|
||||
void func_ov000_020a9b10(void *param1);
|
||||
static unk32 func_ov000_020a9b2c(unk32 param1);
|
||||
static unk32 func_ov000_020a9b3c(unk32 param1);
|
||||
unk32 func_ov000_020a9b4c(unk32 param1);
|
||||
bool func_ov000_020a9c4c(TreasureType type);
|
||||
bool func_ov000_020a9c64();
|
||||
unk32 func_ov000_020a9c90(TreasureType type);
|
||||
bool func_ov000_020a9ca4(TreasureType type);
|
||||
void func_ov000_020a9cbc(TreasureType type, s32 amount);
|
||||
static u32 func_ov000_020a9cfc(u8 *param1, u8 param2);
|
||||
static unk32 func_ov000_020a9d78(unk32 param1);
|
||||
static unk32 func_ov000_020a9e14(unk32 param1);
|
||||
static unk32 func_ov000_020a9eb0(unk32 param1);
|
||||
@@ -142,7 +146,7 @@ public:
|
||||
ItemId func_ov000_020aa02c(ItemId itemId);
|
||||
void func_ov000_020aa0ac(ItemId itemId);
|
||||
void func_ov000_020aa200();
|
||||
void func_ov000_020aa210();
|
||||
bool func_ov000_020aa210();
|
||||
};
|
||||
|
||||
extern TreasureManager *data_ov000_020b6510;
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
#pragma once
|
||||
|
||||
#include "Item/Item.hpp"
|
||||
#include "Save/AdventureFlags.hpp"
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
#include <nitro/math.h>
|
||||
|
||||
#define MAX_PRICECARDS 99
|
||||
|
||||
enum LetterType_ {
|
||||
/* -1 */ LetterType_None = -1,
|
||||
/* 0 */ LetterType_MetPostmanFirst = 0, // AdventureFlag_MetPostmanFirstLetter
|
||||
/* 1 */ LetterType_ReceivedZeldas = 1, // AdventureFlag_ReceivedZeldasLetter
|
||||
/* 2 */ LetterType_ReceivedAlfonzos = 2, // AdventureFlag_ReceivedAlfonzosLetter
|
||||
/* 3 */ LetterType_ReceivedRussells = 3, // AdventureFlag_ReceivedRussellsLetter
|
||||
/* 4 */ LetterType_ObtainedLinebecks = 4, // AdventureFlag_ObtainedLinebecksLetter
|
||||
/* 5 */ LetterType_ReceivedBeedlesFirst = 5, // AdventureFlag_ReceivedBeedlesFirstLetter
|
||||
/* 6 */ LetterType_Unk_03E = 6, // AdventureFlag_Unk_03E
|
||||
/* 7 */ LetterType_Unk_03F = 7, // AdventureFlag_Unk_03F
|
||||
/* 8 */ LetterType_Unk_040 = 8, // AdventureFlag_Unk_040
|
||||
/* 9 */ LetterType_Unk_041 = 9, // AdventureFlag_Unk_041
|
||||
/* 10 */ LetterType_Unk_042 = 10, // AdventureFlag_Unk_042
|
||||
/* 11 */ LetterType_Unk_043 = 11, // AdventureFlag_Unk_043
|
||||
/* 12 */ LetterType_Unk_044 = 12, // AdventureFlag_Unk_044
|
||||
/* 13 */ LetterType_Unk_045 = 13, // AdventureFlag_Unk_045
|
||||
/* 14 */ LetterType_ReceivedCarbens = 14, // AdventureFlag_ReceivedCarbensLetter
|
||||
/* 15 */ LetterType_ReceivedNikos = 15, // AdventureFlag_ReceivedNikosLetter
|
||||
/* 16 */ LetterType_ReceivedFerrus1 = 16, // AdventureFlag_ReceivedFerrusLetter1
|
||||
/* 17 */ LetterType_ReceivedFerrus2 = 17, // AdventureFlag_ReceivedFerrusLetter2
|
||||
/* 18 */ LetterType_ReceivedFerrus3 = 18, // AdventureFlag_ReceivedFerrusLetter3
|
||||
/* 19 */ LetterType_ReceivedKagorons = 19, // AdventureFlag_ReceivedKagoronsLetter
|
||||
/* 20 */ LetterType_Max = 20,
|
||||
};
|
||||
|
||||
enum StampType_ {
|
||||
/* -1 */ StampType_None = -1,
|
||||
/* 0 */ StampType_TowerOfSpirits = 0,
|
||||
/* 1 */ StampType_CastleTown = 1,
|
||||
/* 2 */ StampType_OutsetVillage = 2,
|
||||
/* 3 */ StampType_Mayscore = 3,
|
||||
/* 4 */ StampType_WoodlandSanctuary = 4,
|
||||
/* 5 */ StampType_AnoukiVillage = 5,
|
||||
/* 6 */ StampType_SnowfallSanctuary = 6,
|
||||
/* 7 */ StampType_PapuziaVillage = 7,
|
||||
/* 8 */ StampType_IslandSanctuary = 8,
|
||||
/* 9 */ StampType_GoronVillage = 9,
|
||||
/* 10 */ StampType_ValleySanctuary = 10,
|
||||
/* 11 */ StampType_DuneSanctuary = 11,
|
||||
/* 12 */ StampType_WoodedTemple = 12,
|
||||
/* 13 */ StampType_BlizzardTemple = 13,
|
||||
/* 14 */ StampType_MarineTemple = 14,
|
||||
/* 15 */ StampType_MountainTemple = 15,
|
||||
/* 16 */ StampType_DesertTemple = 16,
|
||||
/* 17 */ StampType_PirateHideout = 17,
|
||||
/* 18 */ StampType_TradingPost = 18,
|
||||
/* 19 */ StampType_IcySpring = 19,
|
||||
/* 20 */ StampType_Max = 20,
|
||||
};
|
||||
|
||||
class MiscAdvManager {
|
||||
public:
|
||||
/* 00 */ u16 mStampDates[StampType_Max];
|
||||
/* 28 */ u16 mUnk_28;
|
||||
/* 2A */ u16 mPostDate;
|
||||
/* 2C */ Vec2b mStampPositions[StampType_Max];
|
||||
/* 54 */ s8 mObtainedLetters[LetterType_Max];
|
||||
/* 68 */ s8 mObtainedStamps[StampType_Max];
|
||||
/* 7C */ u8 mLastRandomNum;
|
||||
/* 7D */ u8 mRandomNum;
|
||||
/* 7E */ s8 mNumPriceCards; // current amount of price cards
|
||||
/* 7F */ s8 mNumPostedPriceCards; // current amount of posted price cards
|
||||
/* 80 */ unk8 mUnk_80;
|
||||
/* 81 */ unk8 mUnk_81; // pad?
|
||||
/* 82 */ unk8 mUnk_82; // pad?
|
||||
/* 83 */ unk8 mUnk_83; // pad?
|
||||
/* 84 */ unk32 mLettersRead; // bitfield
|
||||
/* 88 */ unk32 mStampsFlag; // bitfield, related to the checkmarks from the stampbook
|
||||
/* 8C */ unk16 mSongs; // bitfield
|
||||
/* 8E */ unk16 mUnk_8E; // pad?
|
||||
/* 90 */
|
||||
|
||||
MiscAdvManager();
|
||||
~MiscAdvManager();
|
||||
|
||||
bool GotMaxPriceCards() {
|
||||
return this->GetNumPostcards() >= MAX_PRICECARDS ? true : false;
|
||||
}
|
||||
|
||||
void func_ov024_020d6310(MiscAdvManager *pSrc);
|
||||
void GiveLetterOrPriceCard(ItemId itemId);
|
||||
void GiveLetter(AdventureFlag_Half flag);
|
||||
unk32 GetObtainedLetterCount();
|
||||
bool GotUnreadLetters();
|
||||
unk32 func_ov024_020d6468();
|
||||
unk32 GetStamp(unk32 index);
|
||||
u16 *GetStampDate(unk32 index);
|
||||
Vec2b *GetStampPos(unk32 index);
|
||||
void func_ov024_020d64b4(unk32 param1, unk32 param2, u16 *param3);
|
||||
void func_ov024_020d6530();
|
||||
unk32 GetNumPostcards();
|
||||
void GivePriceCard(unk32 amount);
|
||||
void PostPriceCard(unk32 amount, unk32 param2);
|
||||
void func_ov024_020d6610();
|
||||
|
||||
static MiscAdvManager *Create();
|
||||
static void SetInstance(MiscAdvManager *pInstance);
|
||||
static int ClearInstance();
|
||||
};
|
||||
|
||||
extern MiscAdvManager *gpMiscAdvManager;
|
||||
@@ -201,7 +201,7 @@ DEFINE_MAP_OBJECT_TYPE('TRDT', TRDT)
|
||||
DEFINE_MAP_OBJECT_TYPE('TRED', TRED)
|
||||
DEFINE_MAP_OBJECT_TYPE('TREE', TREE)
|
||||
DEFINE_MAP_OBJECT_TYPE('TREN', TREN)
|
||||
DEFINE_MAP_OBJECT_TYPE('TRES', TRES)
|
||||
DEFINE_MAP_OBJECT_TYPE('TRES', TreasureSpawned)
|
||||
DEFINE_MAP_OBJECT_TYPE('TRET', TRET)
|
||||
DEFINE_MAP_OBJECT_TYPE('TREW', TREW)
|
||||
DEFINE_MAP_OBJECT_TYPE('TRFI', TRFI)
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
|
||||
class MapObject_20 {
|
||||
public:
|
||||
/* 00 */ u16 mUnk_00[4];
|
||||
/* 00 */ u16 mUnk_00[4]; // parameters
|
||||
/* 08 */ u8 mUnk_08[2];
|
||||
/* 0A */ u16 mUnk_0A[2];
|
||||
/* 0E */ unk16 mUnk_0E;
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
/* 1B */ unk8 mUnk_1B;
|
||||
/* 1C */ MapObjFlags mFlags[1];
|
||||
/* 1E */ unk16 mUnk_1E;
|
||||
/* 20 */ MapObject_20 mUnk_20;
|
||||
/* 20 */ MapObject_20 mUnk_20; // parameters
|
||||
/* 38 */ unk8 mUnk_38;
|
||||
/* 39 */ unk8 mUnk_39;
|
||||
/* 3A */ Vec2b mUnk_3A;
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
/* 40 */
|
||||
|
||||
// data_ov000_020b3590
|
||||
/* 00 */ virtual bool vfunc_00();
|
||||
/* 00 */ virtual bool vfunc_00(); // Init? the newly-created map object is deleted if this returns false
|
||||
/* 04 */ virtual void vfunc_04();
|
||||
/* 08 */ virtual void vfunc_08();
|
||||
/* 0C */ virtual void vfunc_0C();
|
||||
@@ -183,8 +183,6 @@ public:
|
||||
bool func_ov000_0209d668();
|
||||
void func_ov000_0209d6ac(Vec3p *param1);
|
||||
|
||||
void func_ov031_02103878();
|
||||
|
||||
static void func_ov000_0209d0bc(Vec2b *param1, MapObject *thisx);
|
||||
static void func_ov000_0209d22c(unk16 *param1, MapObject *thisx, unk32 param2);
|
||||
static void func_ov000_0209d54c(void *param1, MapObject *thisx, unk32 param2, Vec3p *param3, unk32 param4, unk32 param5);
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
#pragma once
|
||||
|
||||
#include "Item/Item.hpp"
|
||||
#include "MapObject/MapObject.hpp"
|
||||
#include "Unknown/Common.hpp"
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
class MapObjectTreasureSpawned_74 : public UnkSystem4 {
|
||||
public:
|
||||
/* 00 (base) */
|
||||
/* 60 */ bool mUnk_60;
|
||||
/* 61 */ unk8 mUnk_61; // pad?
|
||||
/* 62 */ unk8 mUnk_62; // pad?
|
||||
/* 63 */ unk8 mUnk_63; // pad?
|
||||
/* 64 */
|
||||
|
||||
MapObjectTreasureSpawned_74(unk32 param1);
|
||||
|
||||
// data_ov031_02115844
|
||||
/* 00 */ virtual ~MapObjectTreasureSpawned_74() override {}
|
||||
/* 1C */ virtual void vfunc_1C(UnkSystem4_vfunc_1C *param1) override;
|
||||
|
||||
void func_ov000_0209dde0(void);
|
||||
|
||||
void func_ov031_0210306c(void);
|
||||
};
|
||||
|
||||
class MapObjectChestBase : public MapObject {
|
||||
public:
|
||||
/* 000 (base) */
|
||||
/* 040 */ unk32 mUnk_040;
|
||||
/* 044 */ unk32 mUnk_044;
|
||||
/* 048 */ unk32 mUnk_048;
|
||||
/* 04C */ unk8 mUnk_04C;
|
||||
/* 04D */ unk8 mUnk_04D;
|
||||
/* 04E */ unk8 mUnk_04E; // pad?
|
||||
/* 04F */ unk8 mUnk_04F; // pad?
|
||||
/* 050 */ MapObject_10 mUnk_050;
|
||||
/* 074 */ MapObjectTreasureSpawned_74 mUnk_074;
|
||||
/* 0D8 */ ItemId mItemId;
|
||||
/* 0DC */ UnkSubStruct19 mUnk_0DC;
|
||||
/* 154 */
|
||||
|
||||
MapObjectChestBase(unk32 param1); // func_ov031_0210307c
|
||||
|
||||
/* 00 */ virtual bool vfunc_00() override;
|
||||
/* 04 */ virtual void vfunc_04() override;
|
||||
/* 08 */ virtual void vfunc_08() override;
|
||||
/* 0C */ virtual void vfunc_0C() override;
|
||||
/* 14 */ virtual void vfunc_14() override;
|
||||
/* 18 */ virtual void vfunc_18(s8 *param1, s8 param2) override;
|
||||
/* 28 */ virtual ItemId vfunc_28() override;
|
||||
/* 30 */ virtual ~MapObjectChestBase() override;
|
||||
/* 38 */ virtual void vfunc_38(unk32 param1, unk32 param2);
|
||||
/* 3C */ virtual unk32 vfunc_3C();
|
||||
/* 40 */ virtual bool vfunc_40();
|
||||
/* 44 */ virtual bool vfunc_44();
|
||||
/* 4C */ virtual void vfunc_4C();
|
||||
/* 50 */ virtual void vfunc_50();
|
||||
/* 54 */ virtual Vec2p *vfunc_54();
|
||||
/* 58 */
|
||||
|
||||
unk32 func_ov031_021037d0();
|
||||
bool func_ov031_02103864();
|
||||
void func_ov031_02103878();
|
||||
void func_ov031_02103f48();
|
||||
};
|
||||
@@ -4,12 +4,9 @@
|
||||
#include "Unknown/UnkStruct_ov000_020b34c4.hpp"
|
||||
#include "types.h"
|
||||
|
||||
typedef void (*UnkCallback_func_01fff4cc)(void *, void *);
|
||||
#include <nitro/math.h>
|
||||
|
||||
struct UnkStruct_func_01fff498 {
|
||||
u8 ptrIndex;
|
||||
u8 valueIndex;
|
||||
};
|
||||
typedef void (*UnkCallback_func_01fff4cc)(void *, void *);
|
||||
|
||||
class MapObjectManager {
|
||||
public:
|
||||
@@ -29,12 +26,12 @@ public:
|
||||
/* 6C */ void *mUnk_6C;
|
||||
/* 70 */
|
||||
|
||||
MapObject *func_01fff498(UnkStruct_func_01fff498 param1);
|
||||
MapObject *func_01fff498(Vec2b param1);
|
||||
void func_01fff4cc(UnkCallback_func_01fff4cc param1, void *param2);
|
||||
MapObject **func_01fff520(UnkStruct_ov000_020b34c4 *param1, MapObject **param2);
|
||||
void func_01fff6d0(Vec3p *param1, s32 *param2, s32 *param3);
|
||||
|
||||
void func_ov000_0209c3a8();
|
||||
MapObjectId func_ov000_0209c3a8(Vec2b *param1);
|
||||
void func_ov000_0209c3e8();
|
||||
void func_ov000_0209c444();
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
/* 0E */ unk8 mUnk_0E;
|
||||
/* 0F */ u8 mUnk_0F;
|
||||
/* 10 */ MapObjectId mMapObjId;
|
||||
/* 14 */ unk32 mUnk_14;
|
||||
/* 14 */ MapObjectId mUnk_14;
|
||||
/* 18 */ unk32 mUnk_18;
|
||||
/* 1C */ unk8 mUnk_1C;
|
||||
/* 1D */ unk8 mUnk_1D;
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include "MapObject/MapObjectChestBase.hpp"
|
||||
#include "MapObject/MapObjectProfile.hpp"
|
||||
|
||||
class MapObjectTreasureSpawned : public MapObjectChestBase {
|
||||
public:
|
||||
/* 00 (base) */
|
||||
|
||||
MapObjectTreasureSpawned();
|
||||
|
||||
// data_ov031_021157dc
|
||||
/* 30 */ virtual ~MapObjectTreasureSpawned() override;
|
||||
/* 3C */ virtual unk32 vfunc_3C() override;
|
||||
/* 40 */ virtual bool vfunc_40() override;
|
||||
/* 54 */ virtual Vec2p *vfunc_54() override;
|
||||
|
||||
void func_ov031_02102f64(void);
|
||||
void func_ov031_02102f90(void);
|
||||
void func_ov031_02102f98(void);
|
||||
};
|
||||
|
||||
class MapObjectProfileTreasureSpawned : public MapObjectProfile_Derived2 {
|
||||
public:
|
||||
/* 00 (base) */
|
||||
|
||||
MapObjectProfileTreasureSpawned();
|
||||
~MapObjectProfileTreasureSpawned();
|
||||
|
||||
/* 0C */ virtual MapObject *Create();
|
||||
|
||||
static MapObjectProfileTreasureSpawned *GetProfile();
|
||||
};
|
||||
@@ -1,34 +0,0 @@
|
||||
//! TODO: This file was generated automatically and might contain errors
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "MapObject/MapObject.hpp"
|
||||
#include "MapObject/MapObjectProfile.hpp"
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
class MapObjectUnkTRES : public MapObject {
|
||||
public:
|
||||
/* 00 (base) */
|
||||
/* 40 */
|
||||
|
||||
MapObjectUnkTRES();
|
||||
|
||||
/* 30 */ virtual ~MapObjectUnkTRES() override;
|
||||
|
||||
void func_ov031_02102f64(void);
|
||||
void func_ov031_02102f90(void);
|
||||
void func_ov031_02102f98(void);
|
||||
};
|
||||
|
||||
class MapObjectProfileUnkTRES : public MapObjectProfile {
|
||||
public:
|
||||
/* 00 (base) */
|
||||
|
||||
MapObjectProfileUnkTRES();
|
||||
~MapObjectProfileUnkTRES();
|
||||
|
||||
/* 0C */ virtual MapObject *Create();
|
||||
|
||||
static MapObjectProfileUnkTRES *GetProfile();
|
||||
};
|
||||
@@ -10,7 +10,8 @@
|
||||
class MapObjectUnkWDST : public MapObject {
|
||||
public:
|
||||
/* 00 (base) */
|
||||
/* 40 */
|
||||
/* 40 */ STRUCT_PAD(0x40, 0xB8);
|
||||
/* B8 */ unk32 mUnk_B8;
|
||||
|
||||
MapObjectUnkWDST();
|
||||
|
||||
@@ -34,7 +35,7 @@ public:
|
||||
void func_ov094_02172ae0(void);
|
||||
void func_ov094_02172af4(void);
|
||||
void func_ov094_02172bfc(void);
|
||||
void func_ov094_02172c94(void);
|
||||
void func_ov094_02172c94(unk32 param1);
|
||||
void func_ov094_0217310c(void);
|
||||
void func_ov094_021731e4(void);
|
||||
void func_ov094_02173464(void);
|
||||
|
||||
@@ -10,6 +10,42 @@
|
||||
#define BMG_GET_MSG_ADDR(pGroups, flags) \
|
||||
((u32) (pGroups)->entries[(flags) >> 0x10].pDAT1 + (BMG_GET_MSG_OFFSET((pGroups), (flags)) & ~1))
|
||||
|
||||
#define BMG_ID(group, infIndex) (((group) << 16) | (infIndex))
|
||||
|
||||
enum BMGGroup_ {
|
||||
BMGGroup_regular = 0x00,
|
||||
BMGGroup_select = 0x02,
|
||||
BMGGroup_maingame = 0x03,
|
||||
BMGGroup_battle_parent = 0x04,
|
||||
BMGGroup_battle_common = 0x05,
|
||||
BMGGroup_field = 0x07,
|
||||
BMGGroup_dungeon = 0x08,
|
||||
BMGGroup_train = 0x09,
|
||||
BMGGroup_demo = 0x0A,
|
||||
BMGGroup_castle = 0x0B,
|
||||
BMGGroup_castle_town = 0x0C,
|
||||
BMGGroup_tower = 0x0D,
|
||||
BMGGroup_tower_lobby = 0x0E,
|
||||
BMGGroup_forest = 0x0F,
|
||||
BMGGroup_snow = 0x10,
|
||||
BMGGroup_water = 0x11,
|
||||
BMGGroup_flame = 0x12,
|
||||
BMGGroup_intrain = 0x13,
|
||||
BMGGroup_village = 0x14,
|
||||
BMGGroup_collect = 0x15,
|
||||
BMGGroup_demo01_05 = 0x16,
|
||||
BMGGroup_demo06_10 = 0x17,
|
||||
BMGGroup_demo11_15 = 0x18,
|
||||
BMGGroup_demo16_20 = 0x19,
|
||||
BMGGroup_demo21_25 = 0x1A,
|
||||
BMGGroup_shop = 0x1B,
|
||||
BMGGroup_flame_fld = 0x1C,
|
||||
BMGGroup_post = 0x1D,
|
||||
BMGGroup_desert = 0x1E,
|
||||
BMGGroup_staff = 0x1F,
|
||||
BMGGroup_train_extra = 0x20,
|
||||
};
|
||||
|
||||
enum BMGTag {
|
||||
/* "INF1" */ BMG_TAG_INF1 = '1FNI',
|
||||
/* "FLW1" */ BMG_TAG_FLW1 = '1WLF',
|
||||
|
||||
@@ -9,6 +9,80 @@
|
||||
#include "Unknown/UnkStruct_ov000_0208f820.hpp"
|
||||
#include <nitro/math.h>
|
||||
|
||||
enum GIModel_ {
|
||||
GIModel_None = 0,
|
||||
GIModel_stmp = 'stmp',
|
||||
GIModel_shdA = 'shdA',
|
||||
GIModel_rupR = 'rupR',
|
||||
GIModel_trnd = 'trnd',
|
||||
GIModel_litA = 'litA',
|
||||
GIModel_stlb = 'stlb',
|
||||
GIModel_keyB = 'keyB',
|
||||
GIModel_ring = 'ring',
|
||||
GIModel_gold = 'gold',
|
||||
GIModel_bmst = 'bmst',
|
||||
GIModel_makA = 'makA',
|
||||
GIModel_bmrn = 'bmrn',
|
||||
GIModel_ptmL = 'ptmL',
|
||||
GIModel_star = 'star',
|
||||
GIModel_poit = 'poit',
|
||||
GIModel_cloB = 'cloB',
|
||||
GIModel_crwn = 'crwn',
|
||||
GIModel_rupL = 'rupL',
|
||||
GIModel_mons = 'mons',
|
||||
GIModel_swdA = 'swdA',
|
||||
GIModel_beee = 'beee',
|
||||
GIModel_makB = 'makB',
|
||||
GIModel_szku = 'szku',
|
||||
GIModel_keyN = 'keyN',
|
||||
GIModel_srod = 'srod',
|
||||
GIModel_pnec = 'pnec',
|
||||
GIModel_frcY = 'frcY',
|
||||
GIModel_prlA = 'prlA',
|
||||
GIModel_poiF = 'poiF',
|
||||
GIModel_bowB = 'bowB',
|
||||
GIModel_sold = 'sold',
|
||||
GIModel_apdM = 'apdM',
|
||||
GIModel_hrtu = 'hrtu',
|
||||
GIModel_poiD = 'poiD',
|
||||
GIModel_poi5 = 'poi5',
|
||||
GIModel_pflt = 'pflt',
|
||||
GIModel_rbnt = 'rbnt',
|
||||
GIModel_cloA = 'cloA',
|
||||
GIModel_arst = 'arst',
|
||||
GIModel_revY = 'revY',
|
||||
GIModel_swdB = 'swdB',
|
||||
GIModel_bomb = 'bomb',
|
||||
GIModel_litD = 'litD',
|
||||
GIModel_revP = 'revP',
|
||||
GIModel_rupB = 'rupB',
|
||||
GIModel_Lcmp = 'Lcmp',
|
||||
GIModel_shdB = 'shdB',
|
||||
GIModel_gdpf = 'gdpf',
|
||||
GIModel_bmbM = 'bmbM',
|
||||
GIModel_przC = 'przC',
|
||||
GIModel_prlB = 'prlB',
|
||||
GIModel_poiP = 'poiP',
|
||||
GIModel_rupG = 'rupG',
|
||||
GIModel_revR = 'revR',
|
||||
GIModel_mrrn = 'mrrn',
|
||||
GIModel_zola = 'zola',
|
||||
GIModel_bowA = 'bowA',
|
||||
GIModel_bmbL = 'bmbL',
|
||||
GIModel_litC = 'litC',
|
||||
GIModel_bowl = 'bowl',
|
||||
GIModel_whip = 'whip',
|
||||
GIModel_coin = 'coin',
|
||||
GIModel_apdL = 'apdL',
|
||||
GIModel_poiS = 'poiS',
|
||||
GIModel_jade = 'jade',
|
||||
GIModel_glon = 'glon',
|
||||
GIModel_poiG = 'poiG',
|
||||
GIModel_litB = 'litB',
|
||||
};
|
||||
|
||||
u32 func_ov000_020a4c00(ItemId itemId);
|
||||
|
||||
struct UnkStruct_ov110_02185dc8 {
|
||||
u16 mItemId;
|
||||
u16 mItemFlag;
|
||||
@@ -64,15 +138,15 @@ public:
|
||||
|
||||
class UnkStruct_PlayerGet_48 {
|
||||
public:
|
||||
/* 00 */ unk8 mUnk_00[0x40];
|
||||
/* 00 */ unk32 mUnk_00;
|
||||
/* 04 */ STRUCT_PAD(0x04, 0x40);
|
||||
/* 40 */ unk16 mUnk_40;
|
||||
/* 42 */ unk16 mUnk_42;
|
||||
/* 43 */ unk8 mUnk_43;
|
||||
/* 44 */ unk8 mUnk_44;
|
||||
/* 45 */ unk8 mUnk_45;
|
||||
/* 46 */ unk8 mUnk_46;
|
||||
/* 47 */ unk8 mUnk_47;
|
||||
/* 48 */ unk8 mUnk_48[0x5E - 0x48];
|
||||
/* 48 */ STRUCT_PAD(0x48, 0x5E);
|
||||
/* 5E */ unk16 mUnk_5E;
|
||||
/* 60 */ unk8 mUnk_60;
|
||||
/* 61 */ unk8 mUnk_61;
|
||||
@@ -87,7 +161,7 @@ public:
|
||||
/* 04C */ unk32 *mUnk_4C;
|
||||
/* 050 */ UnkStruct_PlayerGet_50 *mUnk_50;
|
||||
/* 054 */ UnkStruct_ov000_0208f820_04 mUnk_54;
|
||||
/* 064 */ UnkStruct_PlayerGet_64 mUnk_64;
|
||||
/* 064 */ UnkStruct_PlayerGet_64_2 mUnk_64;
|
||||
/* 068 */ unk32 mUnk_68;
|
||||
/* 06C */ unk32 mUnk_6C; // scale
|
||||
/* 070 */ unk16 mUnk_70; // angle/rotation
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
typedef u32 AdventureFlag;
|
||||
typedef u16 AdventureFlag_Half;
|
||||
enum AdventureFlag_ {
|
||||
/* 0x000 */ AdventureFlag_Unk_000 = FLAG(0, 0),
|
||||
/* 0x000 */ AdventureFlag_Nothing = FLAG(0, 0),
|
||||
/* 0x001 */ AdventureFlag_Unk_001 = FLAG(0, 1),
|
||||
/* 0x002 */ AdventureFlag_ObtainedSpiritTrain = FLAG(0, 2),
|
||||
/* 0x003 */ AdventureFlag_ObtainedRecruitSword = FLAG(0, 3),
|
||||
@@ -292,7 +292,7 @@ enum AdventureFlag_ {
|
||||
/* 0x10D */ AdventureFlag_OpenedLargeDoorsTOS23F = FLAG(8, 13),
|
||||
/* 0x10E */ AdventureFlag_Unk_10E = FLAG(8, 14),
|
||||
/* 0x10F */ AdventureFlag_Unk_10F = FLAG(8, 15),
|
||||
/* 0x110 */ AdventureFlag_Unk_110 = FLAG(8, 16),
|
||||
/* 0x110 */ AdventureFlag_BoughtGoronShopQuiver = FLAG(8, 16),
|
||||
/* 0x111 */ AdventureFlag_BoughtBombBagFromBeedle = FLAG(8, 17),
|
||||
/* 0x112 */ AdventureFlag_WatchedFireLandVolcanoEruptionCS = FLAG(8, 18),
|
||||
/* 0x113 */ AdventureFlag_PurchasedLumberFirstTime = FLAG(8, 19),
|
||||
@@ -307,7 +307,7 @@ enum AdventureFlag_ {
|
||||
/* 0x11C */ AdventureFlag_Unk_11C = FLAG(8, 28),
|
||||
/* 0x11D */ AdventureFlag_Unk_11D = FLAG(8, 29),
|
||||
/* 0x11E */ AdventureFlag_Unk_11E = FLAG(8, 30),
|
||||
/* 0x11F */ ZeldaTextVisitPirateHideoutFirstTime = FLAG(8, 31),
|
||||
/* 0x11F */ AdventureFlag_ZeldaTextVisitPirateHideoutFirstTime = FLAG(8, 31),
|
||||
|
||||
/* 0x120 */ AdventureFlag_Unk_120 = FLAG(9, 0),
|
||||
/* 0x121 */ AdventureFlag_WadatsumiBoardsTrain2 = FLAG(9, 1),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "Item/ItemManager.hpp"
|
||||
#include "MainGame/MiscAdvManager.hpp"
|
||||
#include "Save/AdventureFlags.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/UnkMemFuncs.h"
|
||||
@@ -155,11 +156,7 @@ public:
|
||||
|
||||
/* 184 */ SaveUnknown184 mUnk_184;
|
||||
|
||||
/* C94 */ unk8 mUnk_C94[0x84];
|
||||
/* D18 */ unk32 mUnk_D18;
|
||||
/* D1C */ unk32 mUnk_D1C;
|
||||
/* D20 */ unk16 mSongs;
|
||||
/* D22 */ unk16 mUnk_D22;
|
||||
/* C94 */ MiscAdvManager mMiscAdvManager;
|
||||
/* D24 */ unk8 mUnk_00_SaveUnknownD24[0x48];
|
||||
/* D6C */ unk8 mUnk_48_SaveUnknownD24[8];
|
||||
/* D74 */ unk16 mUnk_50_SaveUnknownD24;
|
||||
@@ -168,9 +165,9 @@ public:
|
||||
/* D8C */
|
||||
|
||||
SaveUnknown14C() {
|
||||
mUnk_D18 = 0;
|
||||
mUnk_D1C = 0;
|
||||
mSongs = 0;
|
||||
this->mMiscAdvManager.mLettersRead = 0;
|
||||
this->mMiscAdvManager.mStampsFlag = 0;
|
||||
this->mMiscAdvManager.mSongs = 0;
|
||||
MI_CpuFill32(0, this->mUnk_48_SaveUnknownD24, sizeof(this->mUnk_48_SaveUnknownD24));
|
||||
this->mUnk_50_SaveUnknownD24 = 0;
|
||||
}
|
||||
@@ -361,10 +358,31 @@ public:
|
||||
void func_ov019_020d1b14(unk32 param1);
|
||||
};
|
||||
|
||||
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 */
|
||||
/* BB8 */
|
||||
};
|
||||
|
||||
class SaveManager {
|
||||
public:
|
||||
/* 000 */ void *mUnk_000; // related to mUnk_184
|
||||
/* 000 */ unk8 mUnk_004[0x204 - 0x004];
|
||||
/* 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;
|
||||
@@ -374,7 +392,8 @@ public:
|
||||
/* 210 */ unk32 mUnk_210;
|
||||
/* 214 */ unk32 mUnk_214;
|
||||
/* 218 */ SaveFile *mpSaveFile;
|
||||
/* 21C */ unk8 mUnk_21C[0x23C - 0x21C];
|
||||
/* 21C */ SaveManager_21C mUnk_21C;
|
||||
/* 220 */ STRUCT_PAD(0x220, 0x23C);
|
||||
/* 23C */ PTMF<SaveFile>::PTMFCallback mUnk_23C;
|
||||
/* 244 */ unk32 mUnk_244;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ struct Random {
|
||||
return (((this->GetRandomValue() >> 32) * (max - min)) >> 32) + min;
|
||||
}
|
||||
|
||||
u32 ConditionalNext32(u32 value) {
|
||||
u16 ConditionalNext16(u32 value) {
|
||||
this->UpdateRandomValue();
|
||||
|
||||
u64 result = this->GetRandomValue() >> 32;
|
||||
@@ -52,6 +52,18 @@ struct Random {
|
||||
return result;
|
||||
}
|
||||
|
||||
u32 ConditionalNext32(u32 value) {
|
||||
this->UpdateRandomValue();
|
||||
|
||||
u32 result = this->GetRandomValue() >> 32;
|
||||
|
||||
if (value != 0) {
|
||||
return ((u64) result * value) >> 32;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void Init();
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
class UnkStruct_02049bac {
|
||||
public:
|
||||
/* 00 */ unk32 mUnk_00;
|
||||
|
||||
UnkStruct_02049bac();
|
||||
~UnkStruct_02049bac();
|
||||
|
||||
void func_02014a34(void *param1);
|
||||
};
|
||||
|
||||
// some time system?
|
||||
extern UnkStruct_02049bac data_02049bac;
|
||||
@@ -3,9 +3,76 @@
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
struct UnkStruct_func_ov000_0207029c {
|
||||
/* 00 */ STRUCT_PAD(0x00, 0x1D);
|
||||
/* 20 */ u8 mUnk_1D;
|
||||
enum SaveCourseIndex_ {
|
||||
SaveCourseIndex_None = 0xFF,
|
||||
SaveCourseIndex_t_area0 = 0x00,
|
||||
SaveCourseIndex_t_area1 = 0x01,
|
||||
SaveCourseIndex_t_area2 = 0x02,
|
||||
SaveCourseIndex_t_area3 = 0x03,
|
||||
SaveCourseIndex_t_tutorial = 0x04,
|
||||
SaveCourseIndex_t_forest = 0x05,
|
||||
SaveCourseIndex_t_smarine = 0x06,
|
||||
SaveCourseIndex_t_smount = 0x07,
|
||||
SaveCourseIndex_t_smount2 = 0x08,
|
||||
SaveCourseIndex_t_smount3 = 0x09,
|
||||
SaveCourseIndex_t_eviltrain = 0x0A,
|
||||
SaveCourseIndex_d_main = 0x0B,
|
||||
SaveCourseIndex_d_main_f = 0x0C,
|
||||
SaveCourseIndex_d_main_s = 0x0D,
|
||||
SaveCourseIndex_d_main_a = 0x0E,
|
||||
SaveCourseIndex_d_main_w = 0x0F,
|
||||
SaveCourseIndex_d_tutorial = 0x10,
|
||||
SaveCourseIndex_d_forest = 0x11,
|
||||
SaveCourseIndex_d_snow = 0x12,
|
||||
SaveCourseIndex_d_water = 0x13,
|
||||
SaveCourseIndex_d_flame = 0x14,
|
||||
SaveCourseIndex_d_sand = 0x15,
|
||||
SaveCourseIndex_b_forest = 0x16,
|
||||
SaveCourseIndex_b_snow = 0x17,
|
||||
SaveCourseIndex_b_water = 0x18,
|
||||
SaveCourseIndex_b_flame = 0x19,
|
||||
SaveCourseIndex_b_sand = 0x1A,
|
||||
SaveCourseIndex_b_deago = 0x1B,
|
||||
SaveCourseIndex_b_last1 = 0x1C,
|
||||
SaveCourseIndex_b_last2 = 0x1D,
|
||||
SaveCourseIndex_b_last22 = 0x1E,
|
||||
SaveCourseIndex_b_last23 = 0x1F,
|
||||
SaveCourseIndex_f_hyral = 0x20,
|
||||
SaveCourseIndex_f_htown = 0x21,
|
||||
SaveCourseIndex_f_forest1 = 0x22,
|
||||
SaveCourseIndex_f_snow = 0x23,
|
||||
SaveCourseIndex_f_water = 0x24,
|
||||
SaveCourseIndex_f_flame = 0x25,
|
||||
SaveCourseIndex_f_flame5 = 0x26,
|
||||
SaveCourseIndex_f_first = 0x27,
|
||||
SaveCourseIndex_f_forest2 = 0x28,
|
||||
SaveCourseIndex_f_snow2 = 0x29,
|
||||
SaveCourseIndex_f_water2 = 0x2A,
|
||||
SaveCourseIndex_f_flame2 = 0x2B,
|
||||
SaveCourseIndex_f_sand = 0x2C,
|
||||
SaveCourseIndex_f_tetsuo = 0x2D,
|
||||
SaveCourseIndex_f_bridge = 0x2E,
|
||||
SaveCourseIndex_f_bridge2 = 0x2F,
|
||||
SaveCourseIndex_f_forest3 = 0x30,
|
||||
SaveCourseIndex_f_water3 = 0x31,
|
||||
SaveCourseIndex_f_ajito = 0x32,
|
||||
SaveCourseIndex_f_ajito2 = 0x33,
|
||||
SaveCourseIndex_f_flame3 = 0x34,
|
||||
SaveCourseIndex_f_flame4 = 0x35,
|
||||
SaveCourseIndex_f_rabbit = 0x36,
|
||||
SaveCourseIndex_f_kakushi1 = 0x37,
|
||||
SaveCourseIndex_f_kakushi2 = 0x38,
|
||||
SaveCourseIndex_f_kakushi3 = 0x39,
|
||||
SaveCourseIndex_f_kakushi4 = 0x3A,
|
||||
SaveCourseIndex_f_pirate = 0x3B,
|
||||
SaveCourseIndex_f_passenger = 0x3C,
|
||||
SaveCourseIndex_f_trnnpc = 0x3D,
|
||||
SaveCourseIndex_e3_train = 0x3E,
|
||||
SaveCourseIndex_e3_dungeon = 0x3F,
|
||||
SaveCourseIndex_e3_boss = 0x40,
|
||||
SaveCourseIndex_e3_bossm = 0x41,
|
||||
SaveCourseIndex_e3_smount = 0x42,
|
||||
SaveCourseIndex_Max = 0x60,
|
||||
};
|
||||
|
||||
struct UnkStruct_func_ov000_020702a8 {
|
||||
@@ -13,14 +80,24 @@ struct UnkStruct_func_ov000_020702a8 {
|
||||
/* 20 */ unk16 mUnk_20;
|
||||
};
|
||||
|
||||
class CourseEntry {
|
||||
public:
|
||||
/* 00 */ STRUCT_PAD(0x00, 0x17);
|
||||
/* 17 */ u8 mSaveCourseIndex;
|
||||
/* 18 */ STRUCT_PAD(0x18, 0x1D);
|
||||
/* 1D */ u8 mUnk_1D;
|
||||
/* 1E */ STRUCT_PAD(0x1E, 0x2C);
|
||||
/* 2C */
|
||||
};
|
||||
|
||||
class UnkStruct_027e09a0 {
|
||||
public:
|
||||
/* 00 */ unk32 mUnk_00;
|
||||
/* 00 */ CourseEntry **mUnk_00; // elements from courselist.clb
|
||||
|
||||
UnkStruct_027e09a0();
|
||||
~UnkStruct_027e09a0();
|
||||
|
||||
UnkStruct_func_ov000_0207029c *func_ov000_0207029c(unk32 param1);
|
||||
CourseEntry *func_ov000_0207029c(unk32 param1);
|
||||
UnkStruct_func_ov000_020702a8 *func_ov000_020702a8(unk32 param1);
|
||||
};
|
||||
|
||||
|
||||
@@ -204,9 +204,9 @@ class UnkStruct_WarpUnk1 : public UnkStruct_0204a060_Base {
|
||||
public:
|
||||
/* 00 (base) */
|
||||
/* 24 */ STRUCT_PAD(0x24, 0x78);
|
||||
/* 78 */ UnkStruct_SceneChange1 mUnk_78;
|
||||
/* 8C */ unk32 mNextSceneIndex;
|
||||
/* 90 */ STRUCT_PAD(0x90, 0xB4);
|
||||
/* 78 */ UnkStruct_SceneChange1 mUnk_78; // current scene?
|
||||
/* 8C */ UnkStruct_SceneChange1 mUnk_8C; // next scene
|
||||
/* A0 */ STRUCT_PAD(0xA0, 0xB4);
|
||||
/* B4 */ unk32 mSpawnTransitionType; // the behavior of Link when entering a new scene
|
||||
};
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
class UnkStruct_027e0cec {
|
||||
public:
|
||||
void func_ov000_0209feac(unk32 param1, Vec3p *param2, unk32 param3, unk32 param4, unk32 param5);
|
||||
void func_ov000_0209ff8c(UnkStruct_PlayerGet_ec *param1, unk32 param2, Vec3p *param3, unk32 param4);
|
||||
void func_ov000_020a0000(UnkStruct_PlayerGet_ec *param1, void *param2, unk32 *param3, Vec3p *param4, unk32 param5);
|
||||
void func_ov000_020a0110(UnkStruct_PlayerGet_ec *param1);
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
class UnkStruct_027e0cf8 {
|
||||
public:
|
||||
/* 00 */ unk32 mUnk_00;
|
||||
|
||||
UnkStruct_027e0cf8();
|
||||
~UnkStruct_027e0cf8();
|
||||
|
||||
void func_ov024_020c7828(unk32 param1);
|
||||
};
|
||||
|
||||
extern UnkStruct_027e0cf8 *data_027e0cf8;
|
||||
@@ -1,16 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include "Item/Item.hpp"
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
class UnkStruct_027e0d34_04 {
|
||||
public:
|
||||
bool func_ov000_02093bc8(unk32 param1);
|
||||
};
|
||||
|
||||
class UnkStruct_027e0d34 {
|
||||
public:
|
||||
/* 00 */ unk32 mUnk_00;
|
||||
/* 04 */ UnkStruct_027e0d34_04 *mUnk_04;
|
||||
|
||||
UnkStruct_027e0d34();
|
||||
~UnkStruct_027e0d34();
|
||||
|
||||
void func_ov031_020d9844();
|
||||
bool TryItemGive(ItemId itemId);
|
||||
};
|
||||
|
||||
extern UnkStruct_027e0d34 *data_027e0d34;
|
||||
|
||||
@@ -78,12 +78,22 @@ public:
|
||||
|
||||
typedef void (*UnkCallback2)();
|
||||
|
||||
class BMGEntry {
|
||||
public:
|
||||
/* 00 */ SectionINF1 *mpINF1;
|
||||
/* 04 */ SectionFLW1 *mpFLW1;
|
||||
/* 08 */ SectionFLI1 *mpFLI1;
|
||||
/* 0C */ SectionDAT1 *mpDAT1;
|
||||
/* 10 */ unk32 mBMGGroup;
|
||||
/* 14 */
|
||||
};
|
||||
|
||||
class UnkStruct_ov000_020b504c_Sub3 : public SysObject {
|
||||
public:
|
||||
/* 00 */ SectionINF1 *mUnk_00;
|
||||
/* 04 */ BMGHeader *mUnk_04;
|
||||
/* 08 */ BMGHeader *mUnk_08;
|
||||
/* 0C */ unk32 mUnk_0C;
|
||||
/* 00 */ BMGEntry **mpBMGTable;
|
||||
/* 04 */ BMGHeader **mUnk_04;
|
||||
/* 08 */ BMGHeader **mUnk_08;
|
||||
/* 0C */ SectionINF1 *mUnk_0C;
|
||||
/* 10 */ unk32 mUnk_10;
|
||||
/* 14 */
|
||||
|
||||
@@ -117,7 +127,7 @@ public:
|
||||
|
||||
void *func_ov000_02067bb4(unk32 param1);
|
||||
UnkStruct_ov000_02067bc4 *func_ov000_02067bc4(unk32);
|
||||
unk8 func_ov000_02067cf8(unk32 param1, unk32 param2, UnkStruct_ov000_02067bc4::UnkStruct1 *param3);
|
||||
unk8 func_ov000_02067cf8(unk32 param1, unk32 param2, UnkStruct_ov000_02067bc4::UnkStruct1 *param3); // ShowText?
|
||||
void func_ov000_02067e60(u8 param1, unk32 param2);
|
||||
unk32 func_ov000_020682c0(unk32 param1);
|
||||
|
||||
@@ -134,4 +144,5 @@ public:
|
||||
void func_ov001_020be6f4(void);
|
||||
};
|
||||
|
||||
// gMessageManager?
|
||||
extern UnkStruct_ov000_020b504c data_ov000_020b504c;
|
||||
|
||||
@@ -26,19 +26,34 @@ public:
|
||||
class UnkStruct_PlayerGet_64 {
|
||||
public:
|
||||
/* 00 */ unk32 mUnk_00;
|
||||
/* 3C */ unk32 mUnk_3C;
|
||||
/* 40 */ u16 mUnk_40;
|
||||
|
||||
UnkStruct_PlayerGet_64(unk32 *param1, unk32 param2);
|
||||
UnkStruct_PlayerGet_64(void *param1, unk32 param2);
|
||||
~UnkStruct_PlayerGet_64();
|
||||
|
||||
void func_ov000_0208a100();
|
||||
};
|
||||
|
||||
class UnkStruct_PlayerGet_64_2 {
|
||||
public:
|
||||
/* 00 */ unk32 mUnk_00;
|
||||
|
||||
UnkStruct_PlayerGet_64_2(void *param1, unk32 param2);
|
||||
~UnkStruct_PlayerGet_64_2();
|
||||
|
||||
void func_ov000_0208a100();
|
||||
};
|
||||
|
||||
class UnkStruct_ov000_0208f820_28_98 {
|
||||
public:
|
||||
/* 00 */ unk8 mUnk_00[0x38];
|
||||
/* 00 */ unk32 mUnk_00;
|
||||
/* 00 */ unk32 mUnk_04;
|
||||
/* 00 */ u16 mUnk_08;
|
||||
/* 0C */ STRUCT_PAD(0x0C, 0x38);
|
||||
/* 38 */ UnkStruct_PlayerGet_64 mUnk_38;
|
||||
/* 3C */ unk32 mUnk_3C;
|
||||
/* 40 */ u16 mUnk_40;
|
||||
// /* 3C */ unk32 mUnk_3C;
|
||||
// /* 40 */ u16 mUnk_40;
|
||||
|
||||
void func_ov093_0216f76c(Vec3p *param1, unk32 param2);
|
||||
};
|
||||
@@ -47,9 +62,7 @@ class UnkStruct_ov000_0208f820_28 {
|
||||
public:
|
||||
/* 00 */ STRUCT_PAD(0x00, 0x38);
|
||||
/* 38 */ UnkStruct_PlayerGet_64 mUnk_38;
|
||||
/* 3C */ unk32 mUnk_3C;
|
||||
/* 40 */ u16 mUnk_40;
|
||||
/* 42 */ STRUCT_PAD(0x42, 0x48);
|
||||
/* 42 */ STRUCT_PAD(0x44, 0x48);
|
||||
/* 48 */ unk32 mUnk_48;
|
||||
/* 48 */ unk32 mUnk_4C;
|
||||
/* 48 */ unk32 mUnk_50;
|
||||
@@ -147,11 +160,19 @@ public:
|
||||
|
||||
class UnkStruct_ov000_0208f820_04 {
|
||||
public:
|
||||
/* 00 */ u8 mUnk_00[4];
|
||||
/* 04 */ u8 mUnk_04[4];
|
||||
/* 00 */ union {
|
||||
u8 mUnk_00[4];
|
||||
u16 mUnk_00_s16;
|
||||
u32 mUnk_00_s32;
|
||||
};
|
||||
/* 04 */ union {
|
||||
u8 mUnk_04[4];
|
||||
u16 mUnk_04_s16;
|
||||
u32 mUnk_04_s32;
|
||||
};
|
||||
/* 08 */ unk32 mUnk_08;
|
||||
/* 0C */ ItemId mItemId;
|
||||
/* 14 */
|
||||
/* 10 */
|
||||
|
||||
UnkStruct_ov000_0208f820_04(unk32 param1, unk32 param2, unk32 param3, ItemId itemId) {
|
||||
*(u32 *) this->mUnk_00 = param1;
|
||||
@@ -163,6 +184,11 @@ public:
|
||||
UnkStruct_ov000_0208f820_04() {}
|
||||
};
|
||||
|
||||
class UnkStruct_ov000_0208f820_44 {
|
||||
public:
|
||||
void *mUnk_00;
|
||||
};
|
||||
|
||||
class UnkStruct_ov000_0208f820 {
|
||||
public:
|
||||
/* 00 (vtable) */
|
||||
@@ -182,7 +208,7 @@ public:
|
||||
/* 38 */ Vec3p *mUnk_38;
|
||||
/* 3C */ Vec3p *mUnk_3C;
|
||||
/* 40 */ UnkStruct_ov000_0208f820_40 *mUnk_40;
|
||||
/* 44 */ unk32 *mUnk_44;
|
||||
/* 44 */ UnkStruct_ov000_0208f820_44 *mUnk_44;
|
||||
/* 48 */
|
||||
|
||||
/* 00 */ virtual void vfunc_00();
|
||||
|
||||
@@ -28,8 +28,8 @@ public:
|
||||
|
||||
~UnkStruct_ov000_020b5d34() {}
|
||||
|
||||
MapObjectProfile *func_ov000_0209c6b8(unk32 param1);
|
||||
void func_ov000_0209c6f0();
|
||||
MapObjectProfile *GetProfileFromId(MapObjectId mapObjId);
|
||||
MapObject *CreateMapObject(MapObjectId mapObjId);
|
||||
|
||||
static unk32 func_ov000_0209c718(u32 param1);
|
||||
};
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
class UnkStruct_ov024_020d86b0 {
|
||||
public:
|
||||
/* 00 */ STRUCT_PAD(0x00, 0x7E);
|
||||
/* 7E */ s8 mNumPostcards; // current amount of postcards
|
||||
/* 7F */ s8 mNumPostedCards; // current amount of posted postcards
|
||||
/* 80 */ STRUCT_PAD(0x80, 0x90);
|
||||
/* 90 */
|
||||
};
|
||||
|
||||
extern UnkStruct_ov024_020d86b0 *data_ov024_020d86b0;
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
|
||||
#define GET_FLAG(arr, pos) (((arr)[((u32) (pos)) >> 5] & (1 << ((pos) & 0x1F))) != 0)
|
||||
#define GET_FLAG2(var, pos) ((var) & (1 << pos))
|
||||
#define SET_FLAG(arr, pos) ((arr)[((u32) (pos)) >> 5] |= 1 << ((pos) & 0x1F))
|
||||
#define UNSET_FLAG(arr, pos) ((arr)[((u32) (pos)) >> 5] &= ~(1 << ((pos) & 0x1F)))
|
||||
#define FLAG(index, pos) (((index) << 5) | ((pos) & 0x1F))
|
||||
|
||||
Reference in New Issue
Block a user