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

Jukebox playlist editor. More...

#include <metjukeboxeditplaylistscreen.h>

Inheritance diagram for MetJukeboxEditPlaylistScreen:
Collaboration diagram for MetJukeboxEditPlaylistScreen:

Public Member Functions

 MetJukeboxEditPlaylistScreen (MetRenderer *pRenderer, int nPriority)
 Construct the screen.
virtual ~MetJukeboxEditPlaylistScreen ()
virtual void OnPanelActivated ()
 Run the base slot and nothing else.
virtual void HandleCommand (const MetScreenCommand *pCommand)
 Edit the playlist.
virtual void OnEnterFinished ()
 Forget the catalogue and refresh the playlist.
virtual void ResolveContainerViews ()
 Resolve the base views, build the playlist list, and resolve every detail object.
virtual int GetItemCount ()
 Report the number of entries in the playlist under edit.
virtual void ShowRemixDetails ()
 Fill the detail texts from the selected playlist entry.
virtual void UpdateHelpText ()
 Select the editor's help text.
virtual int ProvideText (int nItem, int nColumn, Rnd::Text *pText, int nContext)
 Show one row of the playlist.
Public Member Functions inherited from MetJukeboxBaseScreen
 MetJukeboxBaseScreen (MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &directory, const HxStr &file)
 Construct the screen with no list and no resolved object.
virtual ~MetJukeboxBaseScreen ()
 Release the two scrolling lists.
virtual void EnterAndShow ()
 Show the five detail texts, bind the lists, and select the first catalogue row.
virtual void UpdateIdle (float flTime)
 Advance the two song pictures while the view is showing and the details are current.
virtual void OnExitFinished ()
 Hide the five detail texts.
virtual void SetShowing (int nShowing)
 Show or hide the view, both scrolling lists, and the list frame.
virtual void PlaySlideSound (int nSelector)
 Overridden empty, so a jukebox screen plays no slide sound.
virtual void PlayLeaveSound (int nSelector)
 Overridden empty, so a jukebox screen plays no departure sound.
virtual void PlayHighSound (int nSelector)
 Overridden empty, so a jukebox screen plays no emphasis sound.
virtual void PlayCycleLeftSound (int nSelector)
 Overridden empty, so a jukebox screen plays no left-cycle sound.
virtual void PlayCycleRightSound (int nSelector)
 Overridden empty, so a jukebox screen plays no right-cycle sound.
virtual void BindLists ()
 Bind the catalogue and the playlist from the shared MetRemixManager.
virtual int ProvideMesh (int nItem, int nColumn, Rnd::Mesh *pMesh, int nContext)
 Leave the cell as it is.
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 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 OnMsgScreenDismissed (const HxStr &name, int nChoice)
 Act on the choice the user made in a message dialogue.
virtual void OnMsgScreenShown (const HxStr &name)
 Act on a message dialogue becoming visible.
virtual void BeginContainerLoad (const HxStr &directory, const HxStr &file)
 Intern a container load under this screen's container name and enqueue it.
virtual void PlayErrorSound (int nSelector)
 Play the sound that accompanies a rejected input.
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 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.
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 ListDataProvider
virtual ~ListDataProvider ()

Static Public Member Functions

static MetJukeboxEditPlaylistScreen * New (MetRenderer *pRenderer, int nPriority)
 Build the screen on the heap.
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.

Additional Inherited Members

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.
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 MetJukeboxBaseScreen
int mListRowPitch
int mListRowCount
ScrollingList * mCatalogueList
ScrollingList * mPlayListList
std::vector< MetRemixRecord > * mCatalogue
Rnd::Text * mGenreText
Rnd::Text * mTempoText
Rnd::Text * mSongTitleText
Rnd::Text * mDateText
Rnd::Text * mRemixTitleText
Rnd::Text * mPlayListCaption
Rnd::Mat * mPictureMaterial
Rnd::Mat * mLogoMaterial
JukeboxPlayList * mPlayList
int mCatalogueKey
std::vector< Rnd::Text * > mAppearanceTexts
Rnd::Font * mAvailableFont
Rnd::Font * mUnavailableFont
TexturePairRecord mLogoTextures
TexturePairRecord mPictureTextures
Rnd::Mesh * mPictureMesh
Rnd::Mesh * mLogoMesh
Rnd::Text * mWarningText
int mPicturesPending
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

Jukebox playlist editor.

Its RTTI descriptor is at 0x008ef4e0. It has MetJukeboxBaseScreen as its one public non-virtual base at offset 0. The class declares no data member, and the object is the 0x150 bytes of MetJukeboxBaseScreen alone. The 43-entry primary vtable is at 0x007ed8d0, the same length as the MetJukeboxBaseScreen table, and the class declares no new virtual. The four-entry ListDataProvider table at 0x007ed8a8 adjusts this by -140 in every entry and overrides slot 2 at 0x0022ba08.

The constructor at 0x0022acf8 takes only the renderer and the load priority. It runs the MetJukeboxBaseScreen constructor at 0x0021dcc0 with jbep for the screen name, metagame/Shared for the directory, and juke_edit_playlist for the container, and clears mCatalogueKey. The destructor at 0x00231228 releases the object with the tag MsgSink and does nothing of its own.

The screen builds only the playlist list, as mPlayListList, and mCatalogueList stays null. Its rows and details come from the playlist rather than the catalogue.

Seven inherited slots differ from the MetJukeboxBaseScreen table beyond the destructor. They are 7 0x002313d0, 19 0x0022bdb8, 33 0x00231388, 38 0x0022ae78, 39 0x002312e8, 40 0x0022bfd8, and 41 0x0022c7f0. Slot 42 is inherited unchanged.

Constructor & Destructor Documentation

◆ MetJukeboxEditPlaylistScreen()

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

Construct the screen.

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

◆ ~MetJukeboxEditPlaylistScreen()

virtual MetJukeboxEditPlaylistScreen::~MetJukeboxEditPlaylistScreen ( )
virtual
Ghidra address:
NTSC-U/C: 0x00231228
Ghidra address:
PAL: 0x00244b48

Member Function Documentation

◆ New()

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

Build the screen 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 screen.
Ghidra address:
NTSC-U/C: 0x00231300
Ghidra address:
PAL: 0x00244c20

◆ OnPanelActivated()

virtual void MetJukeboxEditPlaylistScreen::OnPanelActivated ( )
virtual

Run the base slot and nothing else.

Slot 7. The override adds no behaviour.

Ghidra address:
NTSC-U/C: 0x002313d0
Ghidra address:
PAL: 0x00244cf0

Reimplemented from MetJukeboxBaseScreen.

◆ HandleCommand()

virtual void MetJukeboxEditPlaylistScreen::HandleCommand ( const MetScreenCommand * pCommand)
virtual

Edit the playlist.

Slot 19. Previous and next move the selection. Select removes the selected entry and keeps the selection on the row that follows it, or on the last row. Command 8 empties the playlist, and commands 11 and 12 move the selected entry up or down by one. Every command that changes the list refreshes it and runs slot 40.

Parameters
pCommandThe command.
Ghidra address:
NTSC-U/C: 0x0022bdb8
Ghidra address:
PAL: 0x0023f3e8

Reimplemented from MetJukeboxBaseScreen.

◆ OnEnterFinished()

virtual void MetJukeboxEditPlaylistScreen::OnEnterFinished ( )
virtual

Forget the catalogue and refresh the playlist.

Slot 33. mCatalogue becomes null, and the playlist list takes the entry count.

Ghidra address:
NTSC-U/C: 0x00231388
Ghidra address:
PAL: 0x00244ca8

Reimplemented from MetJukeboxBaseScreen.

◆ ResolveContainerViews()

virtual void MetJukeboxEditPlaylistScreen::ResolveContainerViews ( )
virtual

Resolve the base views, build the playlist list, and resolve every detail object.

Slot 38. The list clones jbep_remix_factory_01.view with the highlight and both arrows, becomes mPlayListList, and uses context 0. mCatalogueList stays null.

Ghidra address:
NTSC-U/C: 0x0022ae78
Ghidra address:
PAL: 0x0023e2a0

Reimplemented from MetJukeboxBaseScreen.

◆ GetItemCount()

virtual int MetJukeboxEditPlaylistScreen::GetItemCount ( )
virtual

Report the number of entries in the playlist under edit.

Slot 39. The entry count of the playlist mPlayList addresses, read without a null check.

Returns
The row count.
Ghidra address:
NTSC-U/C: 0x002312e8
Ghidra address:
PAL: 0x00244c08

Implements MetJukeboxBaseScreen.

◆ ShowRemixDetails()

virtual void MetJukeboxEditPlaylistScreen::ShowRemixDetails ( )
virtual

Fill the detail texts from the selected playlist entry.

Slot 40. The same layout as the base slot, for the record MetRemixManager::LookupRemix() finds by the entry's name. There is no album test, so the lock text never shows, and the result of the lookup is not tested for null.

Ghidra address:
NTSC-U/C: 0x0022bfd8
Ghidra address:
PAL: 0x0023f608

Reimplemented from MetJukeboxBaseScreen.

◆ UpdateHelpText()

virtual void MetJukeboxEditPlaylistScreen::UpdateHelpText ( )
virtual

Select the editor's help text.

Slot 41. Selects the met_jukebox_edit_screen_help_tab layout and posts met_jukebox_edit_screen_ticker_tape. The European release looks the layout and the text up in the current language.

Ghidra address:
NTSC-U/C: 0x0022c7f0
Ghidra address:
PAL: 0x00240000

Reimplemented from MetJukeboxBaseScreen.

◆ ProvideText()

virtual int MetJukeboxEditPlaylistScreen::ProvideText ( int nItem,
int nColumn,
Rnd::Text * pText,
int nContext )
virtual

Show one row of the playlist.

ListDataProvider slot 2. Context 0 shows the indexed entry's name from a copy of the entry vector, and an index past the end empties the text. Any other context leaves the cell as it is. The column is not read.

Parameters
nItemThe row.
nColumnThe cell index, which the body does not read.
pTextThe cell.
nContext0 for the playlist.
Returns
Always 1.
Ghidra address:
NTSC-U/C: 0x0022ba08
Ghidra address:
PAL: 0x0023f018

Reimplemented from MetJukeboxBaseScreen.


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