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

Load the global settings from a card. More...

#include <loadglobalsettingsmct.h>

Inheritance diagram for LoadGlobalSettingsMCT:
Collaboration diagram for LoadGlobalSettingsMCT:

Public Member Functions

 LoadGlobalSettingsMCT (MemcardUser *pUser, Memcard *pCard, int nPortSlot, int nCookie, GlobalSettings *pSettings)
 Construct an idle load.
virtual ~LoadGlobalSettingsMCT ()
virtual void Finish ()
 Fill mSettings from the buffer and report through MemcardUser::OnGlobalSettingsLoaded().
virtual void Execute ()
 Aim the load at the settings file and mStream's buffer, 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 global settings from a card.

It has single inheritance from LoadFileMCT at offset 0. An instance is 0x5c bytes, from MemcardManager::CreateLoadGlobalSettingsTask()'s allocation, and the vtable is at 0x007da358.

Execute() reads the settings file into g_abRemixStagingBuffer, over which mStream sits, through the inherited load sequence. Finish() then fills mSettings from mStream before reporting.

Constructor & Destructor Documentation

◆ LoadGlobalSettingsMCT()

LoadGlobalSettingsMCT::LoadGlobalSettingsMCT ( MemcardUser * pUser,
Memcard * pCard,
int nPortSlot,
int nCookie,
GlobalSettings * pSettings )

Construct an idle load.

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.
pSettingsThe settings to fill.
Ghidra address:
NTSC-U/C: 0x00179518
Ghidra address:
PAL: 0x0017d318

◆ ~LoadGlobalSettingsMCT()

virtual LoadGlobalSettingsMCT::~LoadGlobalSettingsMCT ( )
virtual
Ghidra address:
NTSC-U/C: 0x00185898
Ghidra address:
PAL: 0x0018b290

Member Function Documentation

◆ Finish()

virtual void LoadGlobalSettingsMCT::Finish ( )
virtual

Fill mSettings from the buffer and report through MemcardUser::OnGlobalSettingsLoaded().

Any status other than kMemcardStatusOk reports without touching mSettings.

Ghidra address:
NTSC-U/C: 0x00186728
Ghidra address:
PAL: 0x0018c020

Reimplemented from LoadFileMCT.

◆ Execute()

virtual void LoadGlobalSettingsMCT::Execute ( )
virtual

Aim the load at the settings file and mStream's buffer, and enquire about the card.

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

Ghidra address:
NTSC-U/C: 0x00179600
Ghidra address:
PAL: 0x0017d418

Reimplemented from LoadFileMCT.


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