Files
st/include/MainGame/MiscAdvManager.hpp
T
Yanis 5e934a8c9b Decompile overlay 24 (Part 3) (#68)
* 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
2026-06-09 23:01:32 +02:00

114 lines
4.7 KiB
C++

#pragma once
#include "Item/Item.hpp"
#include "Save/AdventureFlags.hpp"
#include "global.h"
#include "types.h"
#include "math.hpp"
#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 AutoInstance<MiscAdvManager> {
public:
/* 00 */ u16 mStampDates[StampType_Max];
/* 28 */ u16 mUnk_28;
/* 2A */ u16 mPostDate;
/* 2C */ union {
Vec2b mStampPositions[StampType_Max];
u16 mStampPos[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(s8 param1, unk32 param2, const 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();
};
extern MiscAdvManager *gpMiscAdvManager;