|
resonance 1.0.1
|
Settings shared by every player and saved to the memory card apart from any persona. More...
#include <globalsettings.h>

Public Member Functions | |
| void * | operator new (size_t nSize) |
| Allocate an instance from the tagged heap under the tag GlobalSettings. | |
| void | operator delete (void *pBlock) |
| Release an instance to the tagged heap. | |
| GlobalSettings () | |
| Start with the default mappings, options, and keyboard macros, the address 127.0.0.2, the port 2000, and one memory-card location, 1. | |
| virtual | ~GlobalSettings () |
| virtual void | Save (OBStream &stream) |
| Write the settings. | |
| virtual void | Load (IBStream &stream) |
| Read the settings back. | |
| void | SetMacros (std::vector< HxStr > macros) |
| Replace the keyboard macros with a list. | |
| void | Print (std::ostream &stream) |
| Write the address, the port, the four mapping labels, and the tutorial flag to a stream. | |
| void | operator= (const GlobalSettings &other) |
| Copy another instance's settings, except the memory-card locations. | |
Static Public Member Functions | |
| static GlobalSettings * | shared () |
| Report the instance. | |
| static void | Create () |
| Allocate the instance. | |
| static void | Destroy () |
| Delete the instance and clear the pointer shared() reports. | |
Public Attributes | |
| ControllerConfig | mControllers [kControllerCount] |
| The four controller mappings. | |
| GameOptions | mGameOptions |
| The game options. | |
| int | mTutorialComplete |
| Non-zero once the tutorial is complete, labelled by Print(). | |
| std::vector< MemcardConnectState > | mCardSlots |
| The memory-card locations. | |
| int | mRequiredSaveSpace |
| The free space the game needs on the first card. | |
| int | mMinimumFreeClusters |
| The free space a remix save needs. | |
| int | mPersonaMinimumFreeClusters |
| The free space a persona save needs. | |
| int | mTeamFreqUnlocked |
| Non-zero to offer the team FreQ identities instead of the pre-fab ones. | |
Static Public Attributes | |
| static constexpr int | kControllerCount = 4 |
| The number of controller mappings. | |
Settings shared by every player and saved to the memory card apart from any persona.
It is a leaf class with no base. Following the g++ 2.x layout for a class with no base, the vptr sits after the data at +0x7c. The allocation in Create() fixes the object at 0x80 bytes. The vtable at 0x007db970 runs the type function at 0x0018b948, the destructor, Save(), and Load().
The one instance lives at 0x0067ea38. MetRenderer's constructor creates it through Create(), and about a hundred routines reach it through shared().
The translation unit spans 0x00187c00 to 0x0018bc28. Besides the members below, it holds template library emissions (0x00188e88, 0x00189060, 0x0018a158, 0x0018a840, 0x0018adb8, 0x0018b0e8, 0x0018b528, and 0x0018bc28), copies of routines defined elsewhere, and the printer at 0x00187c60, which writes a network server record rather than this class. None of those is declared here.
| GlobalSettings::GlobalSettings | ( | ) |
Start with the default mappings, options, and keyboard macros, the address 127.0.0.2, the port 2000, and one memory-card location, 1.
|
virtual |
| void * GlobalSettings::operator new | ( | size_t | nSize | ) |
Allocate an instance from the tagged heap under the tag GlobalSettings.
| nSize | The object size, which the compiler supplies. |
| void GlobalSettings::operator delete | ( | void * | pBlock | ) |
Release an instance to the tagged heap.
| pBlock | The block. |
|
virtual |
Write the settings.
Slot 2. The record version 4 comes first, then the address, the port, the four mappings, the options, the macro count and the keyboard macros, and the tutorial flag.
| stream | The stream to write to. |
|
virtual |
Read the settings back.
Slot 3. A record older than version 2 has another string where the port belongs, which is discarded in favour of the default port. A version 0 record has one mapping. A record older than version 3 has an older macro list, which SkipLegacyMacros() discards. Only a version 4 record has the tutorial flag.
| stream | The stream to read from. |
|
static |
Report the instance.
|
static |
Allocate the instance.
|
static |
Delete the instance and clear the pointer shared() reports.
| void GlobalSettings::SetMacros | ( | std::vector< HxStr > | macros | ) |
Replace the keyboard macros with a list.
The list arrives by value. Only as many macros as the list has are replaced. The image has no caller.
| macros | The macros. |
| void GlobalSettings::Print | ( | std::ostream & | stream | ) |
Write the address, the port, the four mapping labels, and the tutorial flag to a stream.
The image has no caller.
| stream | The stream to write to. |
| void GlobalSettings::operator= | ( | const GlobalSettings & | other | ) |
Copy another instance's settings, except the memory-card locations.
Exactly twelve macros are copied, whatever either list holds, and the routine returns nothing. The image has no caller.
| other | The settings to copy. |
|
staticconstexpr |
The number of controller mappings.
| ControllerConfig GlobalSettings::mControllers[kControllerCount] |
The four controller mappings.
InputMap::Rebuild() reads them. +0x00
| GameOptions GlobalSettings::mGameOptions |
The game options.
+0x30
| int GlobalSettings::mTutorialComplete |
Non-zero once the tutorial is complete, labelled by Print().
+0x5c
| std::vector<MemcardConnectState> GlobalSettings::mCardSlots |
The memory-card locations.
MetStageFinishScreen's slot 5 and FirstCardSlotName() read them. +0x60
| int GlobalSettings::mRequiredSaveSpace |
The free space the game needs on the first card.
Starts at 256, or 128 in the PAL build. +0x6c
MinimumSaveSpaceMCT seeds its measurement from it, and MetMemDetectScreen raises the no-space message when the reported requirement equals it.
| int GlobalSettings::mMinimumFreeClusters |
The free space a remix save needs.
Starts at 60. MetRemixTypeScreen::OnExitFinished() (0x00363920) raises warn_remix_no_space when the first card slot's MemcardConnectState::mFree is below it. The name is inferred from that comparison and from the matching kSaveFileMinimumFreeClusters. +0x70
| int GlobalSettings::mPersonaMinimumFreeClusters |
The free space a persona save needs.
Starts at 24, or 2 in the PAL build. +0x74
Public because MetPersonaSaverScreen::OnConnectState() and OnPersonasSaved() compare the target card's MemcardConnectState::mFree against it and write it into the copy warning, and the image has no accessor.
| int GlobalSettings::mTeamFreqUnlocked |
Non-zero to offer the team FreQ identities instead of the pre-fab ones.
Starts at 0. +0x78
Public because MetFreqMakerAssetManager::GetIdentityList() reads it directly, and the image has no accessor. The name is inferred from that one use.