resonance 1.0.1
Loading...
Searching...
No Matches
metpersonadata.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <iostream>
5#include <vector>
6
9#include "os/hxstr.h"
10#include "stream/ibstream.h"
11#include "stream/obstream.h"
12
40public:
49 void *operator new(size_t nSize);
50
58 void operator delete(void *pBlock);
59
70
88 static std::vector<MetPersonaData *> *loadList() {
89 return &LoadListStorage();
90 }
91
106 static std::vector<MetPersonaData *> *savedList() {
107 return &SavedListStorage();
108 }
109
120 static std::vector<MetPersonaData *> &LoadListStorage();
121
132 static std::vector<MetPersonaData *> &SavedListStorage();
133
143 static void ClearLoadList();
144
153 static void ClearSavedList();
154
166 static void CopyList(std::vector<MetPersonaData *> *pDestination,
167 const std::vector<MetPersonaData *> *pSource);
168
174
189
204 virtual void Save(OBStream *pStream);
205
219 virtual void Load(IBStream *pStream);
220
232
243 void AttachToBurnSlot(int nSlot);
244
256
267 void SetName(const HxStr &name);
268
280 void Print(std::ostream &stream);
281
290
299 HxStr mBirthday; // +0x154, the birthday Print() labels, starting as `0/0/00, 12:00`
300
307
308 // +0x160, the username as Load() last read it. MetPersonaSaverScreen compares it against the
309 // present username to detect a rename.
311};
Persisted progress across the whole campaign.
Definition campaignstats.h:35
Appearance of a player's avatar.
Definition freqappearance.h:39
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Input half of the byte stream interface.
Definition ibstream.h:36
virtual void Load(IBStream *pStream)
Read the record back from a stream.
virtual void Save(OBStream *pStream)
Write the record to a stream.
HxStr mBirthday
Definition metpersonadata.h:299
CampaignStats mStats
Campaign progress of this persona.
Definition metpersonadata.h:289
static std::vector< MetPersonaData * > * savedList()
Resolve the list of records the player has saved.
Definition metpersonadata.h:106
static std::vector< MetPersonaData * > & SavedListStorage()
Hold the list savedList() reports.
virtual ~MetPersonaData()
void AttachToBurnSlot(int nSlot)
Hang this persona's avatar in one of the four persona burn slots.
void Print(std::ostream &stream)
Write the record to a diagnostic stream.
static void ClearLoadList()
Delete every record in loadList() and empty it.
MetPersonaData()
Construct an empty record.
int mIsPrefab
Set to 1 by MetFreqLoader's parser on every pre-fab persona it reads.
Definition metpersonadata.h:306
void SetName(const HxStr &name)
Replace the username in the embedded appearance.
int GetSkillStatus()
Report the skill status recorded in the appearance.
static void ClearSavedList()
Delete every record in savedList() and empty it.
static std::vector< MetPersonaData * > * loadList()
Resolve the list of records the memory-card path last read.
Definition metpersonadata.h:88
void UpdateSkillStatus()
Record in the appearance the highest skill the campaign has reached.
HxStr mSavedName
Definition metpersonadata.h:310
static std::vector< MetPersonaData * > & LoadListStorage()
Hold the list loadList() reports.
MetPersonaData & operator=(const MetPersonaData &other)
Copy every member from another record.
FreqAppearance mAppearance
Appearance the front end displays and edits.
Definition metpersonadata.h:298
static void CopyList(std::vector< MetPersonaData * > *pDestination, const std::vector< MetPersonaData * > *pSource)
Replace one list with fresh copies of the records in another.
Output half of the byte stream interface.
Definition obstream.h:25