resonance 1.0.1
Loading...
Searching...
No Matches
minimumsavespacemct.h
Go to the documentation of this file.
1#pragma once
2
4#include "os/hxstr.h"
5
20
27
29constexpr int kMinimumSaveSpaceNewFile = 50;
30
53public:
64 MinimumSaveSpaceMCT(MemcardUser *pUser, Memcard *pCard, int nPortSlot, int nCookie);
65
71
78 void RunStep();
79
89 virtual void OnCheckInfo(CheckInfoOp *pOp);
90
95 virtual void OnOpenRead(OpenReadOp *pOp);
96
101 virtual void OnClose(CloseOp *pOp);
102
111 virtual void Finish();
112
123 virtual void Execute();
124
125private:
126 // One of MinimumSaveSpaceStep, storing the step to run next. +0x1c
127 int mStep;
128
129 // The descriptor the current open delivered, negative when the file is absent. +0x20
130 int mFile;
131
132 // Clusters the save is estimated to need. Reported to the user by Finish(). +0x24
133 int mSpace;
134
135 // `/BASCUS-97125` plus `gen` plus `/pers.dat`. +0x28
136 HxStr mPersonaPath;
137
138 // `/BASCUS-97125` plus `glo` plus `/globset.dat`. +0x30
139 HxStr mSettingsPath;
140
141#ifdef VIDEO_STANDARD_PAL
142 // Passed to MemcardUser::OnMinimumSaveSpace() as nSkipWarning. Only the constructor writes it,
143 // with zero. +0x38
144 int mSkipWarning;
145
146 // Passed to MemcardUser::OnMinimumSaveSpace() as nCampaign. Only the constructor writes it,
147 // with zero. +0x3c
148 int mCampaign;
149#endif
150};
Enquiry about the card in one slot.
Definition checkinfoop.h:13
Close of an open memory-card file.
Definition closeop.h:14
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
MemcardTask(MemcardUser *pUser, Memcard *pCard, int nPortSlot, int nCookie)
Construct an idle task against one card slot.
Receiver notified once a memory-card task has finished.
Definition memcarduser.h:24
Queue of memory-card operations, with one entry point per libmc call.
Definition memcard.h:29
MinimumSaveSpaceMCT(MemcardUser *pUser, Memcard *pCard, int nPortSlot, int nCookie)
Construct an idle measurement.
virtual void Execute()
Build both paths, seed the measurement, and run the first step.
virtual void OnCheckInfo(CheckInfoOp *pOp)
Ignore the finished enquiry and run the next step.
virtual ~MinimumSaveSpaceMCT()
virtual void OnClose(CloseOp *pOp)
void RunStep()
Run the step mStep selects and advance to the step after it.
virtual void OnOpenRead(OpenReadOp *pOp)
virtual void Finish()
Report mSpace through MemcardUser::OnMinimumSaveSpace().
Open of one memory-card file for reading.
Definition openreadop.h:15
MinimumSaveSpaceStep
Steps MinimumSaveSpaceMCT::mStep selects between.
Definition minimumsavespacemct.h:12
@ kMinimumSaveSpaceStepOpenPersonas
Definition minimumsavespacemct.h:14
@ kMinimumSaveSpaceStepCheckInfo
Definition minimumsavespacemct.h:13
@ kMinimumSaveSpaceStepOpenSettings
Definition minimumsavespacemct.h:16
@ kMinimumSaveSpaceStepAfterSettings
Definition minimumsavespacemct.h:17
@ kMinimumSaveSpaceStepReport
Definition minimumsavespacemct.h:18
@ kMinimumSaveSpaceStepAfterPersonas
Definition minimumsavespacemct.h:15
constexpr int kMinimumSaveSpaceNewFile
Clusters a save would need if a file has to be created.
Definition minimumsavespacemct.h:29
constexpr int kMinimumSaveSpaceExistingFile
Clusters a save would need if a file already exists on the card.
Definition minimumsavespacemct.h:26