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

Enumerate every remix saved on one card. More...

#include <listremixesmct.h>

Inheritance diagram for ListRemixesMCT:
Collaboration diagram for ListRemixesMCT:

Public Member Functions

 ListRemixesMCT (MemcardUser *pUser, Memcard *pCard, int nPortSlot, int nCookie, std::vector< MetRemixRecord > *pRecords)
 Construct an idle listing.
virtual ~ListRemixesMCT ()
void ListRemixDir ()
 List every remix save directory on the card.
virtual void OnCheckInfo (CheckInfoOp *pOp)
virtual void OnListDir (ListDirOp *pOp)
 Collect the listed directories and read the first one's index.
virtual void Finish ()
 Report the finished listing through MemcardUser::OnRemixesListed().
virtual void Execute ()
 Enquire about the card and start the listing.
virtual void OnFileLoaded (int nStatus)
 Collect the records of one directory's index and read the next directory's.
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 OnRead (ReadOp *pOp)
 Report a finished read.
virtual void OnWrite (WriteOp *pOp)
 Report a finished write.
virtual void OnOpenWrite (OpenWriteOp *pOp)
 Report a finished open for writing.
virtual void OnOpenRead (OpenReadOp *pOp)
 Report a finished open for reading.
virtual void OnClose (CloseOp *pOp)
 Report a finished close.
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.
Public Member Functions inherited from MemcardUser
virtual ~MemcardUser ()
 Release the receiver.
virtual void OnConnectState (MemcardConnectState state, int nStatus)
 Report the state of one slot.
virtual void OnAllConnectStates ()
 Report that every slot has been enquired about.
virtual void OnMinimumSaveSpace (int nPortSlot, int nSpace)
 Report the space a save would need against the space a card has.
virtual void OnCardFormatted (int nPortSlot, int nStatus)
 Report a finished format.
virtual void OnCardUnformatted (int nPortSlot, int nStatus)
 Report a finished unformat.
virtual void OnPersonasSaved (int nPortSlot, int nStatus)
 Report a finished save of the FreQ roster.
virtual void OnRemixSaved (int nPortSlot, int nStatus)
 Report a finished save of one remix.
virtual void OnGlobalSettingsSaved (int nPortSlot, int nStatus)
 Report a finished save of the global settings.
virtual void OnJukeboxPlayListSaved (int nPortSlot, int nStatus)
 Report a finished save of a jukebox playlist.
virtual void OnRemixesListed (int nPortSlot, int nStatus)
 Report a finished listing of the saved remixes.
virtual void OnRemixLoaded (int nPortSlot, int nStatus)
 Report a finished load of one remix.
virtual void OnPersonasLoaded (int nPortSlot, int nStatus)
 Report a finished load of the FreQ roster.
virtual void OnGlobalSettingsLoaded (int nPortSlot, int nStatus)
 Report a finished load of the global settings.
virtual void OnJukeboxPlayListLoaded (int nPortSlot, int nStatus)
 Report a finished load of a jukebox playlist.
virtual void OnRemixDeleted (int nPortSlot, int nStatus)
 Report a finished deletion of one remix.
virtual void UnusedFirstReport (int nPortSlot, int nStatus)
 Do nothing.
virtual void UnusedSecondReport (int nPortSlot, int nStatus)
 Do nothing.
virtual void OnFileSaved (int nStatus)
 Report a finished save of one file.

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 MemcardTask
MemcardUser * mUser
Memcard * mCard
int mCookie
int mPortSlot
int mState
int mStatus

Detailed Description

Enumerate every remix saved on one card.

Its RTTI descriptor is at 0x00902a10. It has two public non-virtual bases, MemcardTask at offset 0 and MemcardUser at offset 28. Two vtables belong to the class, the 19-entry primary at 0x007da548 and the 21-entry MemcardUser table at 0x007da498, whose first two and whose slot 19 entries adjust this back by 28. The constructor's highest store at +0x60 bounds an instance from below at 0x64 bytes. Nothing derives from the class, and no derived first member pins the size from outside. The size 0x64 is therefore a lower bound rather than a settled size.

The task enquires about the card, lists /BASCUS-97125r* to find every remix save directory, and then reads the index file out of each one through a LoadFileMCT of its own, receiving that inner task's report as a MemcardUser. That arrangement is why the class derives from both interfaces.

Each index is parsed as a RemixIndex, and every RemixIndexElement becomes one MetRemixRecord appended to mRecords. The element's Version is not carried over.

The method titles ListRemixDir(), Execute(), and Finish() are inferred. No string in the image identifies any of them.

Constructor & Destructor Documentation

◆ ListRemixesMCT()

ListRemixesMCT::ListRemixesMCT ( MemcardUser * pUser,
Memcard * pCard,
int nPortSlot,
int nCookie,
std::vector< MetRemixRecord > * pRecords )

Construct an idle listing.

MemcardManager::CreateListRemixesTask() at 0x001f3598 is the one caller.

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.
pRecordsThe collection the parse fills, stored in mRecords.
Ghidra address:
NTSC-U/C: 0x0017e528
Ghidra address:
PAL: 0x00182f30

◆ ~ListRemixesMCT()

virtual ListRemixesMCT::~ListRemixesMCT ( )
virtual
Ghidra address:
NTSC-U/C: 0x001856a8
Ghidra address:
PAL: 0x0018b060

Member Function Documentation

◆ ListRemixDir()

void ListRemixesMCT::ListRemixDir ( )

List every remix save directory on the card.

The pattern is g_saveDirBase followed by g_remixDirSuffix and a *, so it enumerates the top-level save directories rather than the files inside one. The mode argument is 0, which starts a fresh listing.

Ghidra address:
NTSC-U/C: 0x0017e708
Ghidra address:
PAL: 0x00183140

◆ OnCheckInfo()

virtual void ListRemixesMCT::OnCheckInfo ( CheckInfoOp * pOp)
virtual
Ghidra address:
NTSC-U/C: 0x00186e28
Ghidra address:
PAL: 0x0018c600

Reimplemented from MemcardCBHandler.

◆ OnListDir()

virtual void ListRemixesMCT::OnListDir ( ListDirOp * pOp)
virtual

Collect the listed directories and read the first one's index.

A failed listing abandons the task. Otherwise every entry's name, prefixed with /, is appended to mDirNames, and an empty listing reports at once. The first name then moves into mCurrentDir, and a fresh LoadFileMCT reads <dir>/index into mBuffer, reporting back through this object's MemcardUser part.

Parameters
pOpThe finished listing.
Ghidra address:
NTSC-U/C: 0x0017e8b8
Ghidra address:
PAL: 0x00183368

Reimplemented from MemcardCBHandler.

◆ Finish()

virtual void ListRemixesMCT::Finish ( )
virtual

Report the finished listing through MemcardUser::OnRemixesListed().

Ghidra address:
NTSC-U/C: 0x00186ea8
Ghidra address:
PAL: 0x0018c680

Implements MemcardTask.

◆ Execute()

virtual void ListRemixesMCT::Execute ( )
virtual

Enquire about the card and start the listing.

Ghidra address:
NTSC-U/C: 0x00186df8
Ghidra address:
PAL: 0x0018c5d0

Implements MemcardTask.

◆ OnFileLoaded()

virtual void ListRemixesMCT::OnFileLoaded ( int nStatus)
virtual

Collect the records of one directory's index and read the next directory's.

A failed read abandons the task. Otherwise the index is parsed from mStream and each element appended to mRecords. With no directory left the task reports. Otherwise the next name moves into mCurrentDir, mStream is rewound, and a fresh LoadFileMCT replaces the previous one.

Parameters
nStatusThe inner read's status.
Ghidra address:
NTSC-U/C: 0x0017ece0
Ghidra address:
PAL: 0x00183868

Reimplemented from MemcardUser.


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