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

Manager of the remix catalogue. More...

#include <metremixmanager.h>

Inheritance diagram for MetRemixManager:
Collaboration diagram for MetRemixManager:

Public Member Functions

 MetRemixManager (MetRenderer *pRenderer, int nPriority)
 Construct the manager.
virtual ~MetRemixManager ()
MetRemixRecord * GetRecord ()
 Report the current remix record.
void SetRecord (const MetRemixRecord &record)
 Replace the current remix record.
MetRemixRecord * FindRecord (const HxStr &name)
 Look a remix up by name in the catalogue.
MetRemixRecord * LookupRemix (const HxStr &name)
 Look a remix up by name for the playlist editor.
void PrunePlayList ()
 Drop the playlist entries the catalogue no longer knows.
void PlayCurrentTrack ()
 Start loading the current playlist track.
void PreviousTrack ()
 Step to the previous playlist track, or to a random one in shuffle mode.
void NextTrack ()
 Step to the next playlist track, or to a random one in shuffle mode.
void RandomTrack ()
 Pick a random track that has not played since the last reset.
void StartPlayList (const std::vector< HxStr > &returnScreens, int nShuffle)
 Start playing the playlist.
void SavePlayList (const std::vector< HxStr > &returnScreens)
 Save the playlist to the first memory-card slot.
void BeginRemixLoad (const std::vector< HxStr > &returnScreens, const std::vector< HxStr > &restoreScreens, const MetRemixRecord &record, int nFactory)
 Raise the load warning and start loading one remix.
void ListRemixes (const std::vector< HxStr > &returnScreens, std::vector< MemcardConnectState > slots, int bLoadPlayList)
 Rebuild the catalogue from the factory set and the given memory-card slots.
void LeaveJukeboxMode ()
 Clear the jukebox flag in the game parameters and rewind the playlist.
virtual void EnterAndShow ()
 Hide the dialogue view instead of showing it.
virtual void OnExitFinished ()
 Slot 36, overridden empty.
virtual void OnMsgScreenDismissed (const HxStr &name, int nChoice)
 Act on the choice the user made in one of the manager's dialogues.
virtual void OnCardFormatted (int nPortSlot, int nStatus)
 Act on the format the card reported.
virtual void OnJukeboxPlayListSaved (int nPortSlot, int nStatus)
 Act on the playlist save the card reported.
virtual void OnRemixesListed (int nPortSlot, int nStatus)
 Record the remixes one card slot reported.
virtual void OnRemixLoaded (int nPortSlot, int nStatus)
 Act on the remix load the card reported.
virtual void OnJukeboxPlayListLoaded (int nPortSlot, int nStatus)
 Act on the playlist load the card reported.
virtual void Done (int nHandle, int nFile, void *pBuffer, int nLength, int nStatus)
 Act on the asynchronous read the file layer finished.
Public Member Functions inherited from MetScreen
 MetScreen (MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &directory, const HxStr &file)
 Construct a screen and start its container load.
virtual ~MetScreen ()
 Unregister from the renderer and release the container.
void DeliverCommand (const MetScreenCommand *pCommand)
 Play the sound one navigation command calls for and then act on the command.
void UpdateAnimationFrame (float flTime)
 Drive the frame of whichever animation is running and run the idle hook when none is.
void UpdateFrame (float flTime)
 Advance one screen by one frame.
virtual void PushNamedScreen (const HxStr &name)
 Bring one named screen onto the renderer's screen stack.
virtual void ActivateNamedPanel (const HxStr &name)
 Make one named screen the renderer's active panel.
virtual void OnPanelActivated ()
 Act on this screen having become the renderer's active panel.
virtual void ExitScreenByName (const HxStr &name)
 Start one named screen's exit animation.
virtual void BeginExit ()
 Start this screen's exit animation at the renderer's current time.
virtual void OnUnusedHook ()
 Do nothing.
virtual void OnKeyboardDismissed ()
 Take control back after the keyboard screen has finished.
virtual void OnDrawPass ()
 Contribute to the renderer's draw pass.
virtual void OnDestroying ()
 Release what the screen acquired, ahead of the rest of destruction.
virtual int PollContainerLoad ()
 Advance this screen's container load and resolve its views once the load finishes.
virtual void OnMsgScreenShown (const HxStr &name)
 Act on a message dialogue becoming visible.
virtual void SetShowing (int nShowing)
 Show or hide the view and every drawable the container loaded.
virtual void BeginContainerLoad (const HxStr &directory, const HxStr &file)
 Intern a container load under this screen's container name and enqueue it.
virtual void HandleCommand (const MetScreenCommand *pCommand)
 Act on a navigation command.
virtual void PlaySlideSound (int nSelector)
 Play the sound that accompanies sliding between screens.
virtual void PlayLeaveSound (int nSelector)
 Play the sound that accompanies departing a screen.
virtual void PlayHighSound (int nSelector)
 Play the sound that accompanies the emphasised selection.
virtual void PlayCycleLeftSound (int nSelector)
 Play the sound that accompanies cycling a value to the left.
virtual void PlayCycleRightSound (int nSelector)
 Play the sound that accompanies cycling a value to the right.
virtual void PlayErrorSound (int nSelector)
 Play the sound that accompanies a rejected input.
virtual void UpdateIdle (float flTime)
 Advance whatever the screen updates once per frame while it is idle.
virtual void UpdateIdleAnimation (float flTime)
 Advance whatever the screen animates while it is neither entering nor exiting.
virtual void StartRepeatingSound (float flStartTime, float flInterval, Rnd::Button *pButton, int nCycles)
 Start alternating one button between its states 2 and 1.
virtual void UpdateRepeatingSound (float flTime)
 Advance the alternation that StartRepeatingSound() started.
virtual void OnRepeatingSoundFinished (Rnd::Button *pButton)
 Act on the alternation that StartRepeatingSound() started having finished.
virtual void StartEnterAnimation (float flTime)
 Rewind the enter animation and record the time it starts at.
virtual void UpdateEnterAnimation (float flTime)
 Drive the enter animation and finish it once it passes its end.
virtual void OnEnterFinished ()
 Act on the enter animation having finished.
virtual void StartExitAnimation (float flTime)
 Record the time the exit animation starts at.
virtual void UpdateExitAnimation (float flTime)
 Drive the exit animation and hide the screen once it passes its end.
virtual void Draw ()
 Draw the view.
virtual void ResolveContainerViews ()
 Resolve the three views the container produced and hide the screen.
Public Member Functions inherited from MsgSink
void * operator new (size_t nSize)
 Allocate a sink from the tagged heap under the tag "MsgSink".
void operator delete (void *pBlock)
 Release a sink to the tagged heap.
virtual ~MsgSink ()
virtual void Dispatch (Message *pMsg)
 Accept a message.
Public Member Functions inherited from MemcardUser
virtual ~MemcardUser ()
 Release the receiver.
virtual void OnConnectState (MemcardConnectState state, int nStatus)
 Report the state of one slot.
virtual void OnAllConnectStates ()
 Report that every slot has been enquired about.
virtual void OnMinimumSaveSpace (int nPortSlot, int nSpace)
 Report the space a save would need against the space a card has.
virtual void OnCardUnformatted (int nPortSlot, int nStatus)
 Report a finished unformat.
virtual void OnPersonasSaved (int nPortSlot, int nStatus)
 Report a finished save of the FreQ roster.
virtual void OnRemixSaved (int nPortSlot, int nStatus)
 Report a finished save of one remix.
virtual void OnGlobalSettingsSaved (int nPortSlot, int nStatus)
 Report a finished save of the global settings.
virtual void OnPersonasLoaded (int nPortSlot, int nStatus)
 Report a finished load of the FreQ roster.
virtual void OnGlobalSettingsLoaded (int nPortSlot, int nStatus)
 Report a finished load of the global settings.
virtual void OnRemixDeleted (int nPortSlot, int nStatus)
 Report a finished deletion of one remix.
virtual void UnusedFirstReport (int nPortSlot, int nStatus)
 Do nothing.
virtual void UnusedSecondReport (int nPortSlot, int nStatus)
 Do nothing.
virtual void OnFileLoaded (int nStatus)
 Report a finished load of one file.
virtual void OnFileSaved (int nStatus)
 Report a finished save of one file.
Public Member Functions inherited from AsyncCallback
virtual ~AsyncCallback ()
 Release the receiver.

Static Public Member Functions

static MetRemixManager * New (MetRenderer *pRenderer, int nPriority)
 Build the manager on the heap.
static MetRemixManager * shared ()
 Return the one instance, resolving it through the screen registry on first use.
Static Public Member Functions inherited from MetScreen
static std::map< HxStr, MetContainerLoad * > & ContainerLoaderMap ()
 Shared table of container loads, interned under the container name.
static std::map< HxStr, MetScreenEntry > & ScreenRegistry ()
 Shared table of live screens, interned under the screen registry key.
static MetScreen * FindScreenByName (const HxStr &name)
 Resolve one screen by its registry key.
static MetScreen * FindEndScreen (MetRenderer *pRenderer, const HxStr &name)
 Resolve one end-of-game screen by its registry key, failing fatally when it is absent.
static void CreateMainMenuScreens (MetRenderer *pRenderer)
 Create the main-menu screens.
static void DestroyAllScreens ()
 Delete every registered screen and release every container loader.
static void CreateStartupScreens (MetRenderer *pRenderer)
 Create the four screens the front end needs before its containers have loaded.
static void CreateFrontEndScreens (MetRenderer *pRenderer)
 Create every remaining front-end screen, once.
static void DestroyCategory2Screens ()
 Delete and unregister every screen in category 2.
static void DestroyCategory1Screens ()
 Delete and unregister every screen in category 1.
static void DestroyNonDefaultScreens ()
 Delete and unregister every screen outside category 0, then rewind the rndMetLocAndNet zone.
static void PollContainerLoads ()
 Poll every container load that has not finished, and hide the drawables of each that does.

Public Attributes

std::map< int, std::vector< MetRemixRecord > > mRemixes
 The remix lists, keyed by card slot, with -1 for the factory remixes.
std::map< int, int > mListStatus
 The listing status of each card, keyed by port and slot.
JukeboxPlayList mPlayList
 The jukebox playlist.
Public Attributes inherited from MetScreen
Rnd::View * mView
 The container's root view.
int mEnterPending
 Set when the screen was pushed before its container load finished.
int mActivatePending
 Set when the screen was activated as a panel before its container load finished.
float mRepeatScale
 Scale on the input auto-repeat interval.

Static Public Attributes

static constexpr int kFactorySlot = -1
 The key of the factory remixes in mRemixes.

Additional Inherited Members

Protected Member Functions inherited from MetScreen
virtual void DispatchPriv (Message *pMsg)
 Act on a message.
void ResolveAnimationViews ()
 Resolves the two animation views from the screen name and records the enter animation's end frame.
Protected Attributes inherited from MetScreen
float mAnimEndFrame
float mEnterStartTime
MetRenderer * mRenderer
int mExitChoice
int mAcceptsCommands
Rnd::View * mEnterAnim
std::vector< HxStr > mHelpKeys
int mViewsUnresolved
int mPlaysCommandSounds
int mShowsLoadedDrawables

Detailed Description

Manager of the remix catalogue.

It also presents itself as a dialogue screen.

Its RTTI descriptor is at 0x008efc50. It has three public non-virtual bases at fixed offsets, MetScreen at +0x00, MemcardUser at +140, and AsyncCallback at +144. Its asserts record its file, MetRemixManager.cpp, at 0x00807bb0. It is one of only two classes in the subsystem whose file name remains in the image.

The object is 0x14c bytes. The factory at 0x00361020 requests exactly that many with the tag MsgSink. The figure agrees with the recovered member map below, whose last member ends at +0x14b. The tag is MsgSink's rather than this class's, because MsgSink is the base that declares operator new.

The rest of the game resolves the one instance through shared(). shared() resolves it lazily by handing the registry key MetRemixManager to MetScreen::FindScreenByName(). The manager is a registered screen rather than a separately constructed singleton.

Three vtables belong to the class, the 39-entry primary at 0x00807de0, the 21-entry MemcardUser table at 0x00807d30 that adjusts this by -140, and the three-entry AsyncCallback table at 0x00807d10 that adjusts it by -144. The primary is the same length as the MetScreen table. The class declares no new virtual.

Five entries of the primary table differ from the MetScreen table. A comparison of the two tables establishes them, not the title of each routine. They are 0 0x00360788, the compiler-generated GetTypeInfo, 1 0x00355070 the destructor, 5 0x00361518, 15 0x003555c0, and 36 0x00361550. Slot 36 is a two-instruction bare return at an address the base table does not include. The base's empty stubs are out-of-line definitions that every derived table shares. A separate address is therefore an empty override in this class, declared below.

The MemcardUser table overrides five slots at 0x003569d0, 0x003573e8, 0x003553e8, 0x00355ff0, and 0x003563e0, and the AsyncCallback table overrides its one slot at 0x00358310. All six are declared below with the spelling their base gives them.

One of those spellings is now contradicted by the image. The MemcardUser slot 12 override opens with a printf() of the literal at 0x00807a88. The literal reads in MetRemixManager::LoadRemixCB(). Return code . The method is therefore named LoadRemixCB, and MemcardUser declares slot 12 as OnRemixLoaded, a title that header records as inferred from the task that reports through the slot rather than from any string. The declaration below retains the base spelling, because an override that differs from its base by one letter is a new virtual, and correcting the base is a change to MemcardUser and to every other class that overrides the slot.

The constructor at 0x00352b80 is member initialisation after the three vptr writes, and the destructor at 0x00355070 is compiler-generated member destruction in reverse order. The member list below reproduces both. The vector at +0xf8 is the g++ 2.x bit_vector, whose two iterators each include an empty base word. The vector therefore spans 0x1c bytes. The first tree's teardown at 0x0035ef90 releases a vector of MetRemixRecord in each node, and the second's at 0x003619a0 releases nothing. The two teardowns fix the value types of the trees.

Constructor & Destructor Documentation

◆ MetRemixManager()

MetRemixManager::MetRemixManager ( MetRenderer * pRenderer,
int nPriority )

Construct the manager.

Supplies dlg for the screen name, metagame/Shared for the directory, and dialogue for the container.

Parameters
pRendererThe front-end renderer this screen registers on.
nPriorityThe load priority.
Ghidra address:
NTSC-U/C: 0x00352b80
Ghidra address:
PAL: 0x0037ed28

◆ ~MetRemixManager()

virtual MetRemixManager::~MetRemixManager ( )
virtual
Ghidra address:
NTSC-U/C: 0x00355070
Ghidra address:
PAL: 0x00381570

Member Function Documentation

◆ New()

MetRemixManager * MetRemixManager::New ( MetRenderer * pRenderer,
int nPriority )
static

Build the manager on the heap.

The routine at 0x00385180 that creates every front-end screen is the caller.

Parameters
pRendererThe front-end renderer the screen registers on.
nPriorityThe load priority.
Returns
The new manager.
Ghidra address:
NTSC-U/C: 0x00361020
Ghidra address:
PAL: 0x0038e4e0

◆ shared()

MetRemixManager * MetRemixManager::shared ( )
static

Return the one instance, resolving it through the screen registry on first use.

Returns
The registered manager, or null before it is registered.
Ghidra address:
NTSC-U/C: 0x00361000
Ghidra address:
PAL: 0x0038e4c0

◆ GetRecord()

MetRemixRecord * MetRemixManager::GetRecord ( )

Report the current remix record.

The stats screens and MetSaveRemixScreen read it. The title is inferred.

Returns
The record at +0x114.
Ghidra address:
NTSC-U/C: 0x00361558
Ghidra address:
PAL: 0x0038ea38

◆ SetRecord()

void MetRemixManager::SetRecord ( const MetRemixRecord & record)

Replace the current remix record.

MetRemixLoadScreen::OnExitFinished() is the caller. The title is inferred.

Parameters
recordThe record to copy.
Ghidra address:
NTSC-U/C: 0x00361560
Ghidra address:
PAL: 0x0038ea40

◆ FindRecord()

MetRemixRecord * MetRemixManager::FindRecord ( const HxStr & name)

Look a remix up by name in the catalogue.

A record whose word at +0x24 is non-zero matches only in the factory set, keyed -1, and a record whose word is zero matches only in a card slot's set. The title is inferred.

Parameters
nameThe name compared against each record's second string.
Returns
The first matching record, or null.
Ghidra address:
NTSC-U/C: 0x00359230
Ghidra address:
PAL: 0x00386388

◆ LookupRemix()

MetRemixRecord * MetRemixManager::LookupRemix ( const HxStr & name)

Look a remix up by name for the playlist editor.

The body is FindRecord() alone. MetJukeboxEditPlaylistScreen is the caller. The title is inferred.

Parameters
nameThe remix name.
Returns
The matching record, or null.
Ghidra address:
NTSC-U/C: 0x003612c0
Ghidra address:
PAL: 0x0038e7a0

◆ PrunePlayList()

void MetRemixManager::PrunePlayList ( )

Drop the playlist entries the catalogue no longer knows.

MetJukeboxTopButtonsScreen is the caller. The title is inferred.

Ghidra address:
NTSC-U/C: 0x003612a0
Ghidra address:
PAL: 0x0038e780

◆ PlayCurrentTrack()

void MetRemixManager::PlayCurrentTrack ( )

Start loading the current playlist track.

The title is inferred.

Ghidra address:
NTSC-U/C: 0x003612e0
Ghidra address:
PAL: 0x0038e7c0

◆ PreviousTrack()

void MetRemixManager::PreviousTrack ( )

Step to the previous playlist track, or to a random one in shuffle mode.

The step stops at the first track. The image records no caller. The title is inferred.

Ghidra address:
NTSC-U/C: 0x00361300
Ghidra address:
PAL: 0x0038e7e0

◆ NextTrack()

void MetRemixManager::NextTrack ( )
inline

Step to the next playlist track, or to a random one in shuffle mode.

The step wraps from the last track to the first. Inline. StartLoadedRemix() expands it, and the out-of-line copy has no caller. The title is inferred.

Ghidra address:
NTSC-U/C: 0x00361358
Ghidra address:
PAL: 0x0038e838

◆ RandomTrack()

void MetRemixManager::RandomTrack ( )

Pick a random track that has not played since the last reset.

Every track is marked unplayed again once all have played. The title and the member it sets are attested by the log line the routine writes.

Ghidra address:
NTSC-U/C: 0x0035a7e0
Ghidra address:
PAL: 0x00387a40

◆ StartPlayList()

void MetRemixManager::StartPlayList ( const std::vector< HxStr > & returnScreens,
int nShuffle )

Start playing the playlist.

Records MetJukeboxTopButtonsScreen and MetHelpScreen as the screens to restore after a track, clears one played flag per track, rewinds, picks a random first track in shuffle mode, records the caller's screens, and loads the current track. MetJukeboxEditPlaylistScreenDone slot 36 is the caller. The title is inferred.

Parameters
returnScreensThe screens the caller wants restored.
nShuffleNon-zero to play in random order.
Ghidra address:
NTSC-U/C: 0x003593d0
Ghidra address:
PAL: 0x00386528

◆ SavePlayList()

void MetRemixManager::SavePlayList ( const std::vector< HxStr > & returnScreens)

Save the playlist to the first memory-card slot.

Records the caller's screens, raises the mem_save warning with the slot's name formatted into its text, and queues a SaveJukeboxPlayListMCT that reports to this manager. The European release identifies the card in port 1, or 1 when GlobalSettings records another card. MetJukeboxEditPlaylistScreenDone slot 36 and OnMsgScreenDismissed() call it. The title is inferred.

Parameters
returnScreensThe screens the caller wants restored.
Ghidra address:
NTSC-U/C: 0x00356508
Ghidra address:
PAL: 0x00382fc8

◆ BeginRemixLoad()

void MetRemixManager::BeginRemixLoad ( const std::vector< HxStr > & returnScreens,
const std::vector< HxStr > & restoreScreens,
const MetRemixRecord & record,
int nFactory )

Raise the load warning and start loading one remix.

The warning text identifies the factory set or the first memory-card slot, and its wording follows the play mode. mAfterLoadAction is set to exit the dialogue once the load completes, both screen lists are replaced, and the load runs through LoadRemix(). MetRemixLoadScreen::OnExitFinished() is the caller. The title is inferred.

Parameters
returnScreensThe screens mReturnScreens receives.
restoreScreensThe screens mRestoreScreens receives.
recordThe remix to load.
nFactoryNon-zero for a factory remix.
Ghidra address:
NTSC-U/C: 0x003548e8
Ghidra address:
PAL: 0x00380cd8

◆ ListRemixes()

void MetRemixManager::ListRemixes ( const std::vector< HxStr > & returnScreens,
std::vector< MemcardConnectState > slots,
int bLoadPlayList )

Rebuild the catalogue from the factory set and the given memory-card slots.

Raises the mem_load warning identifying the sources, empties both trees, starts the factory index read for the factory entry and a ListRemixesMCT for every card slot, empties the playlist without releasing its entries, and optionally queues a playlist load. The two remix screens, MetMemCardTypeScreen, and MetRemixDelScreen call it. The title is inferred.

Parameters
returnScreensThe screens mReturnScreens receives.
slotsThe locations to list, the factory set having a port and slot of -1.
bLoadPlayListNon-zero to also load the playlist from the first slot.
Ghidra address:
NTSC-U/C: 0x00353350
Ghidra address:
PAL: 0x0037f5a8

◆ LeaveJukeboxMode()

void MetRemixManager::LeaveJukeboxMode ( )

Clear the jukebox flag in the game parameters and rewind the playlist.

The title is inferred.

Ghidra address:
NTSC-U/C: 0x0035a6b0
Ghidra address:
PAL: 0x003878a0

◆ EnterAndShow()

virtual void MetRemixManager::EnterAndShow ( )
virtual

Hide the dialogue view instead of showing it.

Slot 5.

The whole body is one call. It dispatches Rnd::Drawable::SetShowing() with a zero argument on the Drawable subobject of MetScreen::mView, at +0x18 within the view, the same subobject MetScreen::Draw() forwards to. The view is dereferenced with no null check, and nothing is shown. The manager registers as a screen only to receive messages.

Ghidra address:
NTSC-U/C: 0x00361518
Ghidra address:
PAL: 0x0038e9f8

Reimplemented from MetScreen.

◆ OnExitFinished()

virtual void MetRemixManager::OnExitFinished ( )
virtual

Slot 36, overridden empty.

Ghidra address:
NTSC-U/C: 0x00361550
Ghidra address:
PAL: 0x0038ea30

Reimplemented from MetScreen.

◆ OnMsgScreenDismissed()

virtual void MetRemixManager::OnMsgScreenDismissed ( const HxStr & name,
int nChoice )
virtual

Act on the choice the user made in one of the manager's dialogues.

Slot 15.

The dialogue name selects the reaction. Most dismissals restore the screens in mReturnScreens. A failed or unformatted save retries the playlist save on the first choice, the format check queues a format on the second, a failed remix load abandons the jukebox game, and a finished format retries the save. In the European release the first choice of the format check raises save_fail_no_format instead, whose choices act as those of format_fail do.

Parameters
nameThe dialogue the screen requested, as the message screen reports it back.
nChoiceWhich of the dialogue's buttons the user chose, counted from zero.
Ghidra address:
NTSC-U/C: 0x003555c0
Ghidra address:
PAL: 0x00381b20

Reimplemented from MetScreen.

◆ OnCardFormatted()

virtual void MetRemixManager::OnCardFormatted ( int nPortSlot,
int nStatus )
virtual

Act on the format the card reported.

MemcardUser slot 5.

A zero status and a status of 13 both raise the mem_format_done dialogue, with the format_success and format_already texts respectively, and make it the active panel. Any other status raises format_fail with retry and continue buttons. The port and slot argument is not read.

Parameters
nPortSlotWhich card port and slot reported. The body does not read it.
nStatusZero on success, and 13 for the one failure the second path covers.
Ghidra address:
NTSC-U/C: 0x003569d0
Ghidra address:
PAL: 0x00383638

Reimplemented from MemcardUser.

◆ OnJukeboxPlayListSaved()

virtual void MetRemixManager::OnJukeboxPlayListSaved ( int nPortSlot,
int nStatus )
virtual

Act on the playlist save the card reported.

MemcardUser slot 10.

A zero status exits MetMsgScreen. An unformatted card raises mem_format_check, a missing card or a full one raises playlist_save_failed_tryagain, and any other status raises playlist_save_failed. The port and slot argument is not read. The European release calls the card 1 in the missing-card text, and gives the full-card text nKilobytes.

Parameters
nPortSlotWhich card port and slot reported. The body does not read it.
nStatusZero on success.
nKilobytesThe kilobytes the card lacked. European release only.
Ghidra address:
NTSC-U/C: 0x003573e8
Ghidra address:
PAL: 0x003841e0

Reimplemented from MemcardUser.

◆ OnRemixesListed()

virtual void MetRemixManager::OnRemixesListed ( int nPortSlot,
int nStatus )
virtual

Record the remixes one card slot reported.

MemcardUser slot 11.

Records the status under the port and slot in mListStatus and counts one more listing in mListingsDone. Once mListingsDone equals mListingsExpected while mPlayListReady is set, the MetMsgScreen dialogue is exited. The status branches against 0 and 3 lead to the same code.

Parameters
nPortSlotWhich card port and slot reported.
nStatusZero on success.
Ghidra address:
NTSC-U/C: 0x003553e8
Ghidra address:
PAL: 0x00381918

Reimplemented from MemcardUser.

◆ OnRemixLoaded()

virtual void MetRemixManager::OnRemixLoaded ( int nPortSlot,
int nStatus )
virtual

Act on the remix load the card reported.

MemcardUser slot 12.

The image identifies this method as LoadRemixCB, and the class documentation records why the declaration retains the base spelling.

It opens by writing the status to the log through the literal at 0x00807a88. A zero status starts the remix or exits MetMsgScreen, as mAfterLoadAction selects. A non-zero status logs Failed to load remix from memory card slot i. and raises the remix_load_failed dialogue. The port and slot argument is used only by the diagnostic message. The European release shows load_fail_jukebox instead of load_fail when mAfterLoadAction selects starting the remix.

Parameters
nPortSlotWhich card port and slot reported. Only the failure message formats it.
nStatusZero on success.
Ghidra address:
NTSC-U/C: 0x00355ff0
Ghidra address:
PAL: 0x00382920

Reimplemented from MemcardUser.

◆ OnJukeboxPlayListLoaded()

virtual void MetRemixManager::OnJukeboxPlayListLoaded ( int nPortSlot,
int nStatus )
virtual

Act on the playlist load the card reported.

MemcardUser slot 15.

Sets mPlayListReady on every path, and exits MetMsgScreen when the two counters mListingsDone and mListingsExpected agree. The zero and non-zero status branches lead to the same code. The port and slot argument is not read.

Parameters
nPortSlotWhich card port and slot reported. The body does not read it.
nStatusZero on success.
Ghidra address:
NTSC-U/C: 0x003563e0
Ghidra address:
PAL: 0x00382e70

Reimplemented from MemcardUser.

◆ Done()

virtual void MetRemixManager::Done ( int nHandle,
int nFile,
void * pBuffer,
int nLength,
int nStatus )
virtual

Act on the asynchronous read the file layer finished.

AsyncCallback slot 2.

A completed remix read is copied into the reset log and started, or its dialogue exited, as mAfterLoadAction selects. A completed index read is parsed into records filed under the slot key mIndexSlot, the buffer is released, and the listing is counted as OnRemixesListed() counts it. Any other handle is ignored.

Parameters
nHandleThe request the completion belongs to, compared against the word at +0xe4.
nFileThe file the request read from.
pBufferThe bytes the request read.
nLengthHow many bytes arrived.
nStatusZero on success.
Ghidra address:
NTSC-U/C: 0x00358310
Ghidra address:
PAL: 0x00385380

Implements AsyncCallback.

Member Data Documentation

◆ kFactorySlot

int MetRemixManager::kFactorySlot = -1
staticconstexpr

The key of the factory remixes in mRemixes.

Card slots use port-and-slot keys.

Public because MetRemixLoadScreen indexes mRemixes with it when the factory catalogue is chosen.

◆ mRemixes

std::map<int, std::vector<MetRemixRecord> > MetRemixManager::mRemixes

The remix lists, keyed by card slot, with -1 for the factory remixes.

Public because MetJukeboxBaseScreen::BindLists() and EnterAndShow() index it directly through an inline operator[], and the image has no accessor. +0x94

◆ mListStatus

std::map<int, int> MetRemixManager::mListStatus

The listing status of each card, keyed by port and slot.

Public because MetRemixDelScreen::EnterAndShow() indexes it directly through an inline operator[], and the image has no accessor. +0xa0

◆ mPlayList

JukeboxPlayList MetRemixManager::mPlayList

The jukebox playlist.

Public because MetJukeboxBaseScreen::BindLists() and EnterAndShow() take its address, and MetJukeboxEditPlaylistScreenDone::OnRepeatingSoundFinished() reads its entry count, with no accessor in the image. +0xc4


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