|
resonance 1.0.1
|
Game-wide owner of the memory-card queue and of the tasks that drive it. More...
#include <memcardmanager.h>

Public Member Functions | |
| MemcardManager () | |
| Construct an empty manager that owns a new MemcardPS2. | |
| ~MemcardManager () | |
| Delete the queue and release the task list. | |
| void | Update () |
| Advance the memory-card work by one frame. | |
| void | CreateGetConnectStateTask (int nPortSlot) |
| Queue a GetConnectStateMCT for one slot. | |
| void | CreateGetAllConnectStatesTask (std::vector< MemcardConnectState > *pStates) |
| Queue a GetAllConnectStatesMCT. | |
| void | CreateMinimumSaveSpaceTask (int nPortSlot) |
| Queue a MinimumSaveSpaceMCT for one slot. | |
| void | CreateFormatTask (int nPortSlot) |
| Queue a FormatCardMCT that formats one slot. | |
| void | CreateUnformatTask (int nPortSlot) |
| Queue a FormatCardMCT that unformats one slot. | |
| void | CreateSavePersonasTask (int nPortSlot, const std::vector< MetPersonaData * > &roster) |
| Queue a SavePersonasMCT, which serialises the roster at once. | |
| void | CreateSaveGlobalSettingsTask (int nPortSlot, GlobalSettings *pSettings) |
| Queue a SaveGlobalSettingsMCT, which serialises the settings at once. | |
| void | CreateSaveJukeboxPlayListTask (int nPortSlot, JukeboxPlayList *pPlayList, int nIndex) |
| Queue a SaveJukeboxPlayListMCT, which serialises the playlist at once. | |
| void | CreateLoadPersonasTask (int nPortSlot, std::vector< MetPersonaData * > *pRoster) |
| Queue a LoadPersonasMCT. | |
| void | CreateLoadGlobalSettingsTask (int nPortSlot, GlobalSettings *pSettings) |
| Queue a LoadGlobalSettingsMCT. | |
| void | CreateLoadJukeboxPlayListTask (int nPortSlot, JukeboxPlayList *pPlayList, int nIndex) |
| Queue a LoadJukeboxPlayListMCT. | |
| void | CreateSaveRemixTask (int nPortSlot, const HxStr &remixName, const std::vector< FreqAppearance > &appearances, const HxStr &levelName, int nAlbumNum) |
| Queue a SaveRemixMCT. | |
| void | CreateListRemixesTask (int nPortSlot, std::vector< MetRemixRecord > *pRecords) |
| Queue a ListRemixesMCT. | |
| void | CreateLoadRemixTask (int nPortSlot, const HxStr &remixName) |
| Queue a LoadRemixMCT. | |
| void | CreateDeleteRemixTask (int nPortSlot, const HxStr &remixName) |
| Queue a DeleteRemixMCT. | |
Static Public Member Functions | |
| static MemcardManager * | shared () |
| Resolve the one instance, constructing it on first use. | |
Public Attributes | |
| MemcardUser * | mUser |
| The receiver each new task reports to. | |
Game-wide owner of the memory-card queue and of the tasks that drive it.
The class is not polymorphic, emits no RTTI, and has no embedded file path. The name is inferred from the task factory at 0x001f37f8. The one instance is the function-local static that shared() vends at 0x00891a80.
The fifteen routines from 0x001f2ae0 to 0x001f3b80 each build one MemcardTask subclass, stamp it with mUser, mCard, and the next ticket, and append it to mTasks. Update() starts the task at the front and retires it once it has finished.
| MemcardManager::MemcardManager | ( | ) |
Construct an empty manager that owns a new MemcardPS2.
| MemcardManager::~MemcardManager | ( | ) |
Delete the queue and release the task list.
|
static |
Resolve the one instance, constructing it on first use.
The guard word is at 0x00695698, and the destructor is registered to run at exit through 0x001f6530.
| void MemcardManager::Update | ( | ) |
Advance the memory-card work by one frame.
With no task queued, only the queue is updated. Otherwise a front task whose state is kMemcardTaskFinished is deleted and dropped. When a task then remains, the front task is started if it is still idle, and the queue is updated. Dropping the last task therefore skips the queue's update for that frame. GameManagerImpl::DrawFrame() calls it once per frame while the front end is active. The title is inferred.
| void MemcardManager::CreateGetConnectStateTask | ( | int | nPortSlot | ) |
Queue a GetConnectStateMCT for one slot.
| nPortSlot | The packed port and slot. |
| void MemcardManager::CreateGetAllConnectStatesTask | ( | std::vector< MemcardConnectState > * | pStates | ) |
Queue a GetAllConnectStatesMCT.
| pStates | Where the answers are appended. Borrowed, not owned. |
| void MemcardManager::CreateMinimumSaveSpaceTask | ( | int | nPortSlot | ) |
Queue a MinimumSaveSpaceMCT for one slot.
| nPortSlot | The packed port and slot. |
| void MemcardManager::CreateFormatTask | ( | int | nPortSlot | ) |
Queue a FormatCardMCT that formats one slot.
| nPortSlot | The packed port and slot. |
| void MemcardManager::CreateUnformatTask | ( | int | nPortSlot | ) |
Queue a FormatCardMCT that unformats one slot.
Nothing in the image calls it.
| nPortSlot | The packed port and slot. |
| void MemcardManager::CreateSavePersonasTask | ( | int | nPortSlot, |
| const std::vector< MetPersonaData * > & | roster ) |
Queue a SavePersonasMCT, which serialises the roster at once.
| nPortSlot | The packed port and slot. |
| roster | The personas to save. |
| void MemcardManager::CreateSaveGlobalSettingsTask | ( | int | nPortSlot, |
| GlobalSettings * | pSettings ) |
Queue a SaveGlobalSettingsMCT, which serialises the settings at once.
| nPortSlot | The packed port and slot. |
| pSettings | The settings to save. |
| void MemcardManager::CreateSaveJukeboxPlayListTask | ( | int | nPortSlot, |
| JukeboxPlayList * | pPlayList, | ||
| int | nIndex ) |
Queue a SaveJukeboxPlayListMCT, which serialises the playlist at once.
| nPortSlot | The packed port and slot. |
| pPlayList | The playlist to save. |
| nIndex | The playlist number the file name carries. |
| void MemcardManager::CreateLoadPersonasTask | ( | int | nPortSlot, |
| std::vector< MetPersonaData * > * | pRoster ) |
Queue a LoadPersonasMCT.
| nPortSlot | The packed port and slot. |
| pRoster | Where the loaded personas are appended. |
| void MemcardManager::CreateLoadGlobalSettingsTask | ( | int | nPortSlot, |
| GlobalSettings * | pSettings ) |
Queue a LoadGlobalSettingsMCT.
| nPortSlot | The packed port and slot. |
| pSettings | The settings to fill. |
| void MemcardManager::CreateLoadJukeboxPlayListTask | ( | int | nPortSlot, |
| JukeboxPlayList * | pPlayList, | ||
| int | nIndex ) |
Queue a LoadJukeboxPlayListMCT.
| nPortSlot | The packed port and slot. |
| pPlayList | The playlist to fill. |
| nIndex | The playlist number the file name carries. |
| void MemcardManager::CreateSaveRemixTask | ( | int | nPortSlot, |
| const HxStr & | remixName, | ||
| const std::vector< FreqAppearance > & | appearances, | ||
| const HxStr & | levelName, | ||
| int | nAlbumNum ) |
Queue a SaveRemixMCT.
| nPortSlot | The packed port and slot. |
| remixName | The remix's name. |
| appearances | The players' appearances. |
| levelName | The level the remix was built over. |
| nAlbumNum | The album number the index entry records. |
| void MemcardManager::CreateListRemixesTask | ( | int | nPortSlot, |
| std::vector< MetRemixRecord > * | pRecords ) |
Queue a ListRemixesMCT.
| nPortSlot | The packed port and slot. |
| pRecords | The collection the listing fills. |
| void MemcardManager::CreateLoadRemixTask | ( | int | nPortSlot, |
| const HxStr & | remixName ) |
Queue a LoadRemixMCT.
| nPortSlot | The packed port and slot. |
| remixName | The remix to read. |
| void MemcardManager::CreateDeleteRemixTask | ( | int | nPortSlot, |
| const HxStr & | remixName ) |
Queue a DeleteRemixMCT.
| nPortSlot | The packed port and slot. |
| remixName | The remix to remove. |
| MemcardUser* MemcardManager::mUser |
The receiver each new task reports to.
Every task factory copies it into the task. +0x00
Public because MetRemixManager's remix loaders at 0x00361418 and 0x00361480, and MetSaveRemix::OnRemixSaved(), OnRemixesListed(), and OnMsgScreenDismissed(), store themselves here directly before queueing a task, and the image has no setter for it.