|
resonance 1.0.1
|
Measure the space a full save would need on one card. More...
#include <minimumsavespacemct.h>


Public Member Functions | |
| MinimumSaveSpaceMCT (MemcardUser *pUser, Memcard *pCard, int nPortSlot, int nCookie) | |
| Construct an idle measurement. | |
| virtual | ~MinimumSaveSpaceMCT () |
| void | RunStep () |
| Run the step mStep selects and advance to the step after it. | |
| virtual void | OnCheckInfo (CheckInfoOp *pOp) |
| Ignore the finished enquiry and run the next step. | |
| virtual void | OnOpenRead (OpenReadOp *pOp) |
| virtual void | OnClose (CloseOp *pOp) |
| virtual void | Finish () |
| Report mSpace through MemcardUser::OnMinimumSaveSpace(). | |
| virtual void | Execute () |
| Build both paths, seed the measurement, and run the first step. | |
| 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 | 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 | 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 | |
| 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 |
Measure the space a full save would need on one card.
Its RTTI descriptor is at 0x008ef280. It has single inheritance from MemcardTask at offset 0. An instance is 0x38 bytes and the vtable is at 0x007dac58. In the European release an instance is 0x40 bytes and the vtable is at 0x0081eaa0.
The task probes rather than counts. It tries to open the roster file and the settings file in turn and charges kMinimumSaveSpaceExistingFile for each one that opens and kMinimumSaveSpaceNewFile for each one that does not, starting from a base the game supplies. The total goes to the user through MemcardUser::OnMinimumSaveSpace(), the only notification that receives a measurement rather than a status.
The task never reads the card's free-cluster count. Its OnCheckInfo() ignores the finished enquiry entirely, not even reading its status. SaveRemixMCT is the only task in the subsystem that reads CheckInfoOp::mFree. The asymmetry matches the shipped program.
Both paths are built from the file-scope string globals at 0x00888940 onward. The roster path is /BASCUS-97125 plus gen plus /pers.dat and the settings path is /BASCUS-97125 plus glo plus /globset.dat.
| MinimumSaveSpaceMCT::MinimumSaveSpaceMCT | ( | MemcardUser * | pUser, |
| Memcard * | pCard, | ||
| int | nPortSlot, | ||
| int | nCookie ) |
Construct an idle measurement.
The constructor is inlined at every site and the image has no out-of-line copy.
| pUser | The receiver Finish() reports to. |
| pCard | The queue the task submits operations to. |
| nPortSlot | The packed port and slot. |
| nCookie | The tag that abandons exactly this task's operations. |
|
virtual |
| void MinimumSaveSpaceMCT::RunStep | ( | ) |
Run the step mStep selects and advance to the step after it.
|
virtual |
Ignore the finished enquiry and run the next step.
The body does not read the operation, not even its status. The free-cluster count therefore plays no part in the measurement.
Reimplemented from MemcardCBHandler.
|
virtual |
Reimplemented from MemcardCBHandler.
|
virtual |
Reimplemented from MemcardCBHandler.
|
virtual |
Report mSpace through MemcardUser::OnMinimumSaveSpace().
The European release also passes mSkipWarning and mCampaign.
Implements MemcardTask.
|
virtual |
Build both paths, seed the measurement, and run the first step.
The body seeds mSpace from GlobalSettings::mRequiredSaveSpace less 100, builds both paths, clears mStep, and runs RunStep(). The European release subtracts 87 instead, and puts a / between each directory and its file name.
Implements MemcardTask.