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

Load the FreQ roster from a card. More...

#include <loadpersonasmct.h>

Inheritance diagram for LoadPersonasMCT:
Collaboration diagram for LoadPersonasMCT:

Public Member Functions

 LoadPersonasMCT (MemcardUser *pUser, Memcard *pCard, int nPortSlot, int nCookie, std::vector< MetPersonaData * > *pRoster)
 Construct an idle load.
virtual ~LoadPersonasMCT ()
virtual void Finish ()
 Rebuild the roster from the buffer and report through MemcardUser::OnPersonasLoaded().
virtual void Execute ()
 Aim the load at the roster file and g_abRemixStagingBuffer, and enquire about the card.
Public Member Functions inherited from LoadFileMCT
 LoadFileMCT (MemcardUser *pUser, Memcard *pCard, int nPortSlot, int nCookie)
 Construct an idle load task.
virtual ~LoadFileMCT ()
void Load (const HxStr &path, void *pBuffer, int nLength)
 Record what to read and start the sequence.
void RunStep ()
 Run the step mState selects and advance to the state after it.
void SetState (int nState)
 Record the next state.
virtual void OnCheckInfo (CheckInfoOp *pOp)
virtual void OnRead (ReadOp *pOp)
virtual void OnOpenRead (OpenReadOp *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 OnCreateDir (CreateDirOp *pOp)
 Report a finished directory creation.
virtual void OnListDir (ListDirOp *pOp)
 Report a finished directory listing.
virtual void OnWrite (WriteOp *pOp)
 Report a finished write.
virtual void OnOpenWrite (OpenWriteOp *pOp)
 Report a finished open for writing.
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

Public Attributes inherited from LoadFileMCT
int mBytesRead
 Bytes the read transferred, valid once the task has reported kMemcardStatusOk.
Protected Member Functions inherited from MemcardTask
void HandleError ()
 Abandon the task when the last operation reported a failure.
Protected Attributes inherited from LoadFileMCT
int mState
void * mBuffer
int mLength
HxStr mPath
int mFile
Protected Attributes inherited from MemcardTask
MemcardUser * mUser
Memcard * mCard
int mCookie
int mPortSlot
int mState
int mStatus

Detailed Description

Load the FreQ roster from a card.

It has single inheritance from LoadFileMCT at offset 0. An instance is 0x3c bytes and the vtable is at 0x007da3f8.

Execute() reads the roster file into g_abRemixStagingBuffer through the inherited load sequence. Finish() then rebuilds each persona from the buffer and appends it to mRoster before reporting.

Constructor & Destructor Documentation

◆ LoadPersonasMCT()

LoadPersonasMCT::LoadPersonasMCT ( MemcardUser * pUser,
Memcard * pCard,
int nPortSlot,
int nCookie,
std::vector< MetPersonaData * > * pRoster )

Construct an idle load.

The constructor is inlined into MemcardManager::CreateLoadPersonasTask() at 0x001f37f8, its one site, and the image has no out-of-line copy.

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.
pRosterWhere the loaded personas are appended. Borrowed. The task does not free it.

◆ ~LoadPersonasMCT()

virtual LoadPersonasMCT::~LoadPersonasMCT ( )
virtual
Ghidra address:
NTSC-U/C: 0x00185828
Ghidra address:
PAL: 0x0018b210

Member Function Documentation

◆ Finish()

virtual void LoadPersonasMCT::Finish ( )
virtual

Rebuild the roster from the buffer and report through MemcardUser::OnPersonasLoaded().

On kMemcardStatusOk the buffer is read back as a persona count followed by that many personas, each allocated and filled through MetPersonaData::Load() and appended to mRoster. Any other status reports without touching mRoster.

Ghidra address:
NTSC-U/C: 0x00179360
Ghidra address:
PAL: 0x0017d160

Reimplemented from LoadFileMCT.

◆ Execute()

virtual void LoadPersonasMCT::Execute ( )
virtual

Aim the load at the roster file and g_abRemixStagingBuffer, and enquire about the card.

The European release puts a / between the directory and the file name.

Ghidra address:
NTSC-U/C: 0x00179178
Ghidra address:
PAL: 0x0017ce28

Reimplemented from LoadFileMCT.


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