Work that chooses the remix directory a remix is saved to, measures the space the save needs, and checks it against the free space of the card.
More...
#include <mccheckremixspaceneededtask.h>
|
| | ~MCCheckRemixSpaceNeededTask () override=default |
| | Destroy the object.
|
| | MCCheckRemixSpaceNeededTask () |
| | Construct the steps, one listing for each remix directory.
|
| void | Set (SaveSpaceUser *pUser, int nPort, const char *pszName, int nFileSize, int nOverwrite) |
| | Prepare the work, and clear g_MemcardPath.
|
| void | OnDirListed () override |
| | Search one listed directory for the file, and measure the space once every directory is listed.
|
| | ~MemcardSerialTask () override=default |
| | Destroy the object.
|
| int | GetResult () |
| | Report the outcome of the work.
|
| virtual void | OnCardInfo () |
| | Learn that a card information step ended.
|
| virtual void | OnFileLoaded () |
| | Learn that a file load step ended.
|
| | ~SerialTasks () override |
| | Release the list and every task in it.
|
| void | Add (Task *pTask) |
| | Append a task, which the list then manages.
|
| | Task () |
| | Construct an idle task.
|
| virtual | ~Task () |
| | Release the task.
|
| int | Poll () |
| | Report the state after giving a running task one poll.
|
| void | Start () |
| | Enter the running state and call OnStart(), unless the task is already running.
|
| void | Stop () |
| | Call OnStop() when the task is running, and return to the idle state.
|
| void | Finish (bool bSucceeded) |
| | End the task from outside its poll, and call OnStop() when it was running.
|
| int | GetState () const |
| | Report mState.
|
|
| void | OnStop () override |
| | End with the outcome, and report it to mUser.
|
| void | OnStop () override |
| | Record MemcardTask::sStatus in mResult.
|
| void | OnStart () override |
| | Start the first task, or finish with success when the list is empty.
|
| void | OnStop () override |
| | Stop the task that runs now.
|
| void | OnPoll () override |
| | Poll the task that runs now, start the next one after it is done, and finish after the last one or after a failure.
|
| const std::vector< std::unique_ptr< Task > > & | GetTasks () const |
Work that chooses the remix directory a remix is saved to, measures the space the save needs, and checks it against the free space of the card.
The RTTI records the class as deriving from MemcardSerialTask. The object is 0x64 bytes, and 0x84 in the PAL build. The PAL build first checks every directory with an MCCheckDirExistsTask. The directories are listed in order. A directory that includes the file is chosen; otherwise the first directory with room is, and g_MemcardPath records it. When the work ends, OnStop() reports the outcome to mUser. The outcome is MemcardTask::kStatusLimit when the card includes g_nMaxRemixes remixes already, MemcardTask::kStatusExists when the file exists and may not be replaced, and MemcardTask::kStatusFull when the card lacks the space.
◆ ~MCCheckRemixSpaceNeededTask()
| MCCheckRemixSpaceNeededTask::~MCCheckRemixSpaceNeededTask |
( |
| ) |
|
|
overridedefault |
Destroy the object.
- Ghidra address:
- NTSC-U/C: 0x00352548
- Ghidra address:
- PAL: 0x003bf7c8
◆ MCCheckRemixSpaceNeededTask()
| MCCheckRemixSpaceNeededTask::MCCheckRemixSpaceNeededTask |
( |
| ) |
|
Construct the steps, one listing for each remix directory.
- Ghidra address:
- NTSC-U/C: 0x0015ef00
- Ghidra address:
- PAL: 0x00160818
◆ Set()
| void MCCheckRemixSpaceNeededTask::Set |
( |
SaveSpaceUser * | pUser, |
|
|
int | nPort, |
|
|
const char * | pszName, |
|
|
int | nFileSize, |
|
|
int | nOverwrite ) |
Prepare the work, and clear g_MemcardPath.
- Parameters
-
| pUser | The receiver of the outcome. |
| nPort | The memory card slot. |
| pszName | The name of the remix file, without its extension. |
| nFileSize | The size of the file in bytes. |
| nOverwrite | Non-zero when an existing file may be replaced. |
- Ghidra address:
- NTSC-U/C: 0x0015f0e0
- Ghidra address:
- PAL: 0x00160ba0
◆ OnDirListed()
| void MCCheckRemixSpaceNeededTask::OnDirListed |
( |
| ) |
|
|
overridevirtual |
Search one listed directory for the file, and measure the space once every directory is listed.
- Ghidra address:
- NTSC-U/C: 0x0015f278
- Ghidra address:
- PAL: 0x00160df8
Reimplemented from MemcardSerialTask.
◆ OnStop()
| void MCCheckRemixSpaceNeededTask::OnStop |
( |
| ) |
|
|
overrideprotectedvirtual |
End with the outcome, and report it to mUser.
- Ghidra address:
- NTSC-U/C: 0x0015f4a8
- Ghidra address:
- PAL: 0x00161138
Reimplemented from Task.
The documentation for this class was generated from the following file: