Work that measures the space a save to the Freq directory needs, and checks it against the free space of the card.
More...
#include <mcchecksavespaceneededtask.h>
|
| | ~MCCheckSaveSpaceNeededTask () override=default |
| | Destroy the object.
|
| | MCCheckSaveSpaceNeededTask () |
| | Construct the steps.
|
| void | Set (SaveSpaceUser *pUser, int nPort, const char *pszName, const char *pszExt, int nMaxFiles, int nFileSize, int nOverwrite) |
| | Prepare the work, and make g_MemcardPath the Freq directory.
|
| void | OnDirListed () override |
| | Record whether the directory exists, then measure the space once the files are 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 measures the space a save to the Freq directory needs, and checks it against the free space of the card.
The RTTI records the class as deriving from MemcardSerialTask. The object is 0x58 bytes, and 0x5c in the PAL build. The PAL build first checks the directory with an MCCheckDirExistsTask. When the work ends, OnStop() reports the outcome to mUser. The outcome is MemcardTask::kStatusLimit when the directory includes mMaxFiles files of the kind already, MemcardTask::kStatusExists when the file exists and may not be replaced, and MemcardTask::kStatusFull when the card lacks the space.
◆ ~MCCheckSaveSpaceNeededTask()
| MCCheckSaveSpaceNeededTask::~MCCheckSaveSpaceNeededTask |
( |
| ) |
|
|
overridedefault |
Destroy the object.
- Ghidra address:
- NTSC-U/C: 0x00352278
- Ghidra address:
- PAL: 0x003bf4f8
◆ MCCheckSaveSpaceNeededTask()
| MCCheckSaveSpaceNeededTask::MCCheckSaveSpaceNeededTask |
( |
| ) |
|
Construct the steps.
- Ghidra address:
- NTSC-U/C: 0x0015ea48
- Ghidra address:
- PAL: 0x00160288
◆ Set()
| void MCCheckSaveSpaceNeededTask::Set |
( |
SaveSpaceUser * | pUser, |
|
|
int | nPort, |
|
|
const char * | pszName, |
|
|
const char * | pszExt, |
|
|
int | nMaxFiles, |
|
|
int | nFileSize, |
|
|
int | nOverwrite ) |
Prepare the work, and make g_MemcardPath the Freq directory.
- Parameters
-
| pUser | The receiver of the outcome. |
| nPort | The memory card slot. |
| pszName | The name of the file, without its extension. |
| pszExt | The extension of the file. |
| nMaxFiles | The files of the extension the directory may include. |
| nFileSize | The size of the file in bytes. |
| nOverwrite | Non-zero when an existing file may be replaced. |
- Ghidra address:
- NTSC-U/C: 0x0015eba0
- Ghidra address:
- PAL: 0x00160490
◆ OnDirListed()
| void MCCheckSaveSpaceNeededTask::OnDirListed |
( |
| ) |
|
|
overridevirtual |
Record whether the directory exists, then measure the space once the files are listed.
- Ghidra address:
- NTSC-U/C: 0x0015ece8
- Ghidra address:
- PAL: 0x001605f0
Reimplemented from MemcardSerialTask.
◆ OnStop()
| void MCCheckSaveSpaceNeededTask::OnStop |
( |
| ) |
|
|
overrideprotectedvirtual |
End with the outcome, and report it to mUser.
- Ghidra address:
- NTSC-U/C: 0x0015ee98
- Ghidra address:
- PAL: 0x001607b0
Reimplemented from Task.
The documentation for this class was generated from the following file: