resonance 1.0.1
Loading...
Searching...
No Matches
SavePersonasMCT Class Reference

Save the FreQ roster to a card. More...

#include <savepersonasmct.h>

Inheritance diagram for SavePersonasMCT:
Collaboration diagram for SavePersonasMCT:

Public Member Functions

 SavePersonasMCT (MemcardUser *pUser, Memcard *pCard, int nPortSlot, int nCookie, const std::vector< MetPersonaData * > &roster)
 Construct an idle save and serialise the roster.
virtual ~SavePersonasMCT ()
virtual void OnCheckInfo (CheckInfoOp *pOp)
 Start the save sequence once the card enquiry succeeds.
virtual void Finish ()
 Report the result through MemcardUser::OnPersonasSaved().
virtual void Execute ()
 Aim the save at the roster directory and file, and enquire about the card.
Public Member Functions inherited from SaveFileMCT
 SaveFileMCT (MemcardUser *pUser, Memcard *pCard, int nPortSlot, int nCookie)
 Construct an idle save task.
virtual ~SaveFileMCT ()
void Save (const HxStr &dirName, const HxStr &fileName, const HxStr &iconTitle, const void *pData, int nLength, int bSkipIconFiles)
 Record what to write and start the sequence.
void RunStep ()
 Run the step mStep selects and advance to the step after it.
void BuildIconSys (const char *pszTitle)
 Fill mIconSys with the browser icon header.
virtual void OnCreateDir (CreateDirOp *pOp)
virtual void OnWrite (WriteOp *pOp)
virtual void OnOpenWrite (OpenWriteOp *pOp)
virtual void OnClose (CloseOp *pOp)
Public Member Functions inherited from MemcardTask
 MemcardTask (MemcardUser *pUser, Memcard *pCard, int nPortSlot, int nCookie)
 Construct an idle task against one card slot.
 MemcardTask (MemcardUser *pUser, Memcard *pCard, int nCookie)
 Construct an idle task that does not address a single card slot.
virtual void UnusedHook ()
 Do nothing.
Public Member Functions inherited from MemcardCBHandler
virtual ~MemcardCBHandler ()
 Release the receiver.
virtual void OnEntSpace (EntSpaceOp *pOp)
 Report a finished free-entry enquiry.
virtual void OnFormat (FormatOp *pOp)
 Report a finished format.
virtual void OnUnformat (UnformatOp *pOp)
 Report a finished unformat.
virtual void OnListDir (ListDirOp *pOp)
 Report a finished directory listing.
virtual void OnRead (ReadOp *pOp)
 Report a finished read.
virtual void OnOpenRead (OpenReadOp *pOp)
 Report a finished open for reading.
virtual void OnSeek (SeekOp *pOp)
 Report a finished seek.
virtual void OnDeleteFile (DeleteFileOp *pOp)
 Report a finished file deletion.
virtual void OnRenameFile (RenameFileOp *pOp)
 Report a finished rename.

Additional Inherited Members

Protected Member Functions inherited from MemcardTask
void HandleError ()
 Abandon the task when the last operation reported a failure.
Protected Attributes inherited from SaveFileMCT
int mFile
sceMcIconSys mIconSys
HxStr mDirName
HxStr mFileName
HxStr mIconTitle
int mStep
const void * mData
int mDataLength
int mSkipIconFiles
Protected Attributes inherited from MemcardTask
MemcardUser * mUser
Memcard * mCard
int mCookie
int mPortSlot
int mState
int mStatus

Detailed Description

Save the FreQ roster to a card.

It has single inheritance from SaveFileMCT at offset 0. An instance is 0x42c bytes, from MemcardManager::CreateSavePersonasTask()'s allocation, and the vtable is at 0x007dab18. In the European release an instance is 0x43c bytes and the vtable is at 0x0081e970.

The constructor serialises the roster into g_abRemixStagingBuffer through mStream at once. The save therefore writes the roster as it stood when the task was queued. Execute() then points the inherited save sequence at that buffer and starts it with a card enquiry.

Constructor & Destructor Documentation

◆ SavePersonasMCT()

SavePersonasMCT::SavePersonasMCT ( MemcardUser * pUser,
Memcard * pCard,
int nPortSlot,
int nCookie,
const std::vector< MetPersonaData * > & roster )

Construct an idle save and serialise the roster.

Writes the persona count and then each persona through MetPersonaData::Save().

Parameters
pUserThe receiver Finish() reports to.
pCardThe queue the task submits operations to.
nPortSlotThe packed port and slot.
nCookieThe tag that abandons exactly this task's operations.
rosterThe personas to save.
Ghidra address:
NTSC-U/C: 0x00178798
Ghidra address:
PAL: 0x0017be58

◆ ~SavePersonasMCT()

virtual SavePersonasMCT::~SavePersonasMCT ( )
virtual
Ghidra address:
NTSC-U/C: 0x00184d98
Ghidra address:
PAL: 0x0018a2e8

Member Function Documentation

◆ OnCheckInfo()

virtual void SavePersonasMCT::OnCheckInfo ( CheckInfoOp * pOp)
virtual

Start the save sequence once the card enquiry succeeds.

A status of kMemcardStatusUnknown or kMemcardStatusNotFormatted abandons the task with that status, and fewer than kSaveFileMinimumFreeClusters free clusters abandon it with kMemcardStatusCardFull. Any other status starts the sequence from its first step. The European release inherits SaveFileMCT::OnCheckInfo() instead.

Parameters
pOpThe finished enquiry.
Ghidra address:
NTSC-U/C: 0x001864a0

Reimplemented from MemcardCBHandler.

◆ Finish()

virtual void SavePersonasMCT::Finish ( )
virtual

Report the result through MemcardUser::OnPersonasSaved().

Ghidra address:
NTSC-U/C: 0x00186538
Ghidra address:
PAL: 0x0018bf60

Reimplemented from SaveFileMCT.

◆ Execute()

virtual void SavePersonasMCT::Execute ( )
virtual

Aim the save at the roster directory and file, and enquire about the card.

The European release adds the roster to SaveFileMCT::mFiles and runs SaveFileMCT::Execute().

Ghidra address:
NTSC-U/C: 0x00178960
Ghidra address:
PAL: 0x0017c110

Reimplemented from SaveFileMCT.


The documentation for this class was generated from the following file: