resonance 1.0.1
Loading...
Searching...
No Matches
MetFrontEndState Class Reference

Front-end state shared by every screen for the lifetime of the front-end renderer. More...

#include <metfrontendstate.h>

Collaboration diagram for MetFrontEndState:

Public Member Functions

 MetFrontEndState ()
 Start with no persona, an empty screen name, and every flag clear.
 ~MetFrontEndState ()
 Delete every persona and release the screen name.
void Reset ()
 Clear every flag.
MetPersonaData * GetFirstPersona ()
 Report the first persona the game manager records.

Static Public Member Functions

static MetFrontEndState * shared ()
 Report the instance Create() allocated.
static void Create ()
 Allocate the instance.
static void Destroy ()
 Delete the instance and clear the pointer shared() reports.

Public Attributes

std::vector< MetPersonaData * > mPersonas
 Personas this object owns.
int mUsingMemcard
 Set while the game saves to a memory card.
int mSettingsDirty
 Set by the configuration screens when a setting changed while mUsingMemcard is set, and cleared by MetMainScreen::EnterAndShow() once it has saved.
int mUnlockAll
 Set to 1 by MetLogoScreen::RecordUnlock().
int mPendingTransition
 How the front end was departed for a game (the tutorial, a game, or a quit from the pause screen).
int mLastTransition
 The previous value of mPendingTransition.
int mUnusedFlag
HxStr mReturnScreen
 The name of the screen to return to, which several exit hooks record.
int mPlayerCount
 The number of players MetLocNumPlayScreen slot 36 recorded and its slot 5 selects again.

Detailed Description

Front-end state shared by every screen for the lifetime of the front-end renderer.

The class is not polymorphic and emits no RTTI descriptor, and no literal or file path in the image records it, so the name is inferred from its use. MetRenderer's constructor creates the one instance through Create() and its destructor releases it through Destroy(). About a hundred routines across the front-end screens reach it through shared() and read or write its flags directly, which is why every member is public.

The object is 0x30 bytes, which the allocation in Create() fixes. The constructor starts the persona vector and the screen name empty and then runs Reset() on every other member.

Constructor & Destructor Documentation

◆ MetFrontEndState()

MetFrontEndState::MetFrontEndState ( )

Start with no persona, an empty screen name, and every flag clear.

Ghidra address:
NTSC-U/C: 0x00215488
Ghidra address:
PAL: 0x0021f0b8

◆ ~MetFrontEndState()

MetFrontEndState::~MetFrontEndState ( )

Delete every persona and release the screen name.

Ghidra address:
NTSC-U/C: 0x00215568
Ghidra address:
PAL: 0x0021f1b0

Member Function Documentation

◆ shared()

MetFrontEndState * MetFrontEndState::shared ( )
static

Report the instance Create() allocated.

Returns
The instance, or null outside the lifetime of the front-end renderer.
Ghidra address:
NTSC-U/C: 0x00217f30
Ghidra address:
PAL: 0x00221bb8

◆ Create()

void MetFrontEndState::Create ( )
static

Allocate the instance.

MetRenderer's constructor is the one caller. An existing instance is overwritten rather than released.

Ghidra address:
NTSC-U/C: 0x00217f40
Ghidra address:
PAL: 0x00221bc8

◆ Destroy()

void MetFrontEndState::Destroy ( )
static

Delete the instance and clear the pointer shared() reports.

MetRenderer's destructor is the one caller.

Ghidra address:
NTSC-U/C: 0x00217fa0
Ghidra address:
PAL: 0x00221c28

◆ Reset()

void MetFrontEndState::Reset ( )

Clear every flag.

The persona vector and the screen name are not touched.

Ghidra address:
NTSC-U/C: 0x00217fd8
Ghidra address:
PAL: 0x00221c60

◆ GetFirstPersona()

MetPersonaData * MetFrontEndState::GetFirstPersona ( )

Report the first persona the game manager records.

The body copies the game manager's whole persona vector and reads the first element of the copy. It does not read this object.

Returns
The persona, or null when the game manager records none.
Ghidra address:
NTSC-U/C: 0x002156b0
Ghidra address:
PAL: 0x0021f310

Member Data Documentation

◆ mPersonas

std::vector<MetPersonaData *> MetFrontEndState::mPersonas

Personas this object owns.

The destructor deletes each one. +0x00

◆ mUsingMemcard

int MetFrontEndState::mUsingMemcard

Set while the game saves to a memory card.

MetMemDetectScreen sets it once a card is found and clears it when the user continues without one, and about a dozen screens test it before offering a save. +0x0c

◆ mSettingsDirty

int MetFrontEndState::mSettingsDirty

Set by the configuration screens when a setting changed while mUsingMemcard is set, and cleared by MetMainScreen::EnterAndShow() once it has saved.

+0x10

◆ mUnlockAll

int MetFrontEndState::mUnlockAll

Set to 1 by MetLogoScreen::RecordUnlock().

MetArenasScreen slot 5 and MetSoloStagesScreen read it to unlock every arena and stage. +0x14

◆ mPendingTransition

int MetFrontEndState::mPendingTransition

How the front end was departed for a game (the tutorial, a game, or a quit from the pause screen).

The screen entered on return acts on it and clears it after copying the value into mLastTransition. +0x18

◆ mLastTransition

int MetFrontEndState::mLastTransition

The previous value of mPendingTransition.

+0x1c

◆ mUnusedFlag

int MetFrontEndState::mUnusedFlag

Cleared by Reset(). No reader is identified. +0x20

◆ mReturnScreen

HxStr MetFrontEndState::mReturnScreen

The name of the screen to return to, which several exit hooks record.

+0x24

◆ mPlayerCount

int MetFrontEndState::mPlayerCount

The number of players MetLocNumPlayScreen slot 36 recorded and its slot 5 selects again.

+0x2c


The documentation for this class was generated from the following file: