|
resonance 1.0.1
|
Base of the three jukebox screens. More...
#include <metjukeboxbasescreen.h>


Public Member Functions | |
| 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 | OnPanelActivated () |
| Refresh the details and the help text, then show the playlist. | |
| virtual void | HandleCommand (const MetScreenCommand *pCommand) |
| Act on a command. | |
| virtual void | UpdateIdle (float flTime) |
| Advance the two song pictures while the view is showing and the details are current. | |
| virtual void | OnEnterFinished () |
| Bind the lists again and refresh both. | |
| virtual void | OnExitFinished () |
| Hide the five detail texts. | |
| virtual void | ResolveContainerViews () |
| Resolve the container views and the two fonts. | |
| 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 int | GetItemCount ()=0 |
| Report the number of rows the list displays. | |
| virtual void | ShowRemixDetails () |
| Fill the detail texts from the selected catalogue row. | |
| virtual void | UpdateHelpText () |
| Select the help text for the playlist's state. | |
| virtual void | BindLists () |
| Bind the catalogue and the playlist from the shared MetRemixManager. | |
| virtual int | ProvideText (int nItem, int nColumn, Rnd::Text *pText, int nContext) |
| Show one row of whichever list the context selects. | |
| 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 () |
Protected Attributes | |
| 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 |
Additional Inherited Members | |
| 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 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. | |
Base of the three jukebox screens.
Its RTTI descriptor is at 0x00902330. It has two public non-virtual bases at fixed offsets, MetScreen at +0x00 and ListDataProvider at +140. The class therefore starts its members at +144. The constructor fixes the object at 0x150 bytes by writing +0x14c as its last member.
The constructor is at 0x0021dcc0. It takes the renderer, the load priority, and the three names, and all three children run it rather than inlining it.
Three classes derive from the class, MetJukeboxCustomRemixesScreen, MetJukeboxEditPlaylistScreen, and MetJukeboxFactoryRemixesScreen. None of the three declares a data member. Each writes mCatalogueKey in its constructor, and those writes make mCatalogueKey protected.
Two vtables belong to the class. The primary table at 0x007ec6d0 has 43 entries, four more than the MetScreen table, so the class declares four virtuals of its own at slots 39 through 42. Slot 39 stores the __pure_virtual handler at 0x005381a8, which makes the original class abstract, and the three children supply it. The secondary table at 0x007ec6a8 has four entries, is addressed by the ListDataProvider vptr, adjusts this by -140 in every entry, and supplies the two ListDataProvider pure virtuals at 0x0021ef30 and 0x00224ae8. The ListDataProvider table itself is at 0x007ec830, also with four entries, and its slots 2 and 3 are the two pure ones.
The constructor resolves no object name. It builds the two TexturePairRecord members from gSongLogo1.tex with gSongLogo2.tex and gSongLabel1.tex with gSongLabel2.tex, at 0x007ec520 through 0x007ec550.
Fifteen slots of the primary table differ from the MetScreen table. Slots 20 through 24 are two-instruction jr ra stubs, so a jukebox screen plays none of those five sounds. Slot 25 is inherited unchanged, so the error sound still plays.
Every member of the class is protected. The slot 33, 38, 39, 40, and 41 overrides of the three children read or write most of the block directly, including the two scrolling lists, the five drawables, the two row-count pointers, and the three words at +0x140. A few members appear only in this class's own code, and they are not separated out, because the register attribution in the larger child overrides is not firm enough to assert that a given member is untouched there.
| 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.
The five drawables from mGenreText through mRemixTitleText start null and slot 5 runs Rnd::Drawable::SetShowing() on each without a null check, so a screen whose slot 38 has not run yet faults there.
| pRenderer | The front-end renderer this screen registers on. |
| nPriority | The load priority. |
| name | The screen name. |
| directory | The directory the container loads from. |
| file | The container name, without the .rnd suffix. |
|
virtual |
Release the two scrolling lists.
|
virtual |
Show the five detail texts, bind the lists, and select the first catalogue row.
Slot 5. The MetScreen body runs first. The playlist selection moves to its last entry, both lists are refreshed, the two song pictures are hidden, and slot 40 fills the details.
Reimplemented from MetScreen.
|
virtual |
Refresh the details and the help text, then show the playlist.
Slot 7. Runs slot 33, then slot 41, then shows mPlayListList.
Reimplemented from MetScreen.
Reimplemented in MetJukeboxEditPlaylistScreen.
|
virtual |
Act on a command.
Previous and next move the catalogue selection and refresh the details and the help text. Select refreshes the help text and, while the playlist has room for another entry, appends the selected remix when its album is the one the jukebox plays. Every other command is ignored.
| pCommand | The command. |
Reimplemented from MetScreen.
Reimplemented in MetJukeboxEditPlaylistScreen.
|
virtual |
Advance the two song pictures while the view is showing and the details are current.
Each TexturePairRecord that advances hides its mesh, and shows it again with the new texture on the first stage of its material when the list has rows and the selected remix belongs to the jukebox album. mPicturesPending is cleared once both pictures are shown.
| flTime | The renderer's current animation frame position, which the body does not read. |
Reimplemented from MetScreen.
|
virtual |
Bind the lists again and refresh both.
Slot 33. Runs slot 42, then refreshes mCatalogueList when it exists and mPlayListList without a null check.
Reimplemented from MetScreen.
Reimplemented in MetJukeboxEditPlaylistScreen.
|
virtual |
Hide the five detail texts.
Slot 36.
Reimplemented from MetScreen.
|
virtual |
Resolve the container views and the two fonts.
Slot 38. The MetScreen body runs first, then font1_pink_2 and font1_pinkgrey_2 are resolved into mAvailableFont and mUnavailableFont.
Reimplemented from MetScreen.
Reimplemented in MetJukeboxCustomRemixesScreen, MetJukeboxEditPlaylistScreen, and MetJukeboxFactoryRemixesScreen.
|
virtual |
Show or hide the view, both scrolling lists, and the list frame.
Slot 17. The base implementation runs first and the rest of the body is skipped while the container load has not finished. MetScreen::mViewsUnresolved records the unfinished load, and this read is the evidence that makes MetScreen::mViewsUnresolved protected. Hiding the screen passes zero to mPlayListList without a null check, so a screen hidden before slot 38 has run faults.
| nShowing | Non-zero to draw the screen. |
Reimplemented from MetScreen.
|
virtual |
Overridden empty, so a jukebox screen plays no slide sound.
| nSelector | Declared by the slot and ignored. |
Reimplemented from MetScreen.
|
virtual |
Overridden empty, so a jukebox screen plays no departure sound.
| nSelector | The pad index of the command, which the body does not read. |
Reimplemented from MetScreen.
|
virtual |
Overridden empty, so a jukebox screen plays no emphasis sound.
| nSelector | Declared by the slot and ignored. |
Reimplemented from MetScreen.
|
virtual |
Overridden empty, so a jukebox screen plays no left-cycle sound.
| nSelector | Declared by the slot and ignored. |
Reimplemented from MetScreen.
|
virtual |
Overridden empty, so a jukebox screen plays no right-cycle sound.
| nSelector | Declared by the slot and ignored. |
Reimplemented from MetScreen.
|
pure virtual |
Report the number of rows the list displays.
Slot 39, pure here. Each of the three children divides the byte span of one vector by its element size and returns the quotient, which is what fixes both the return type and the empty argument list. The name is inferred from that arithmetic and from the ListDataProvider role of the class.
Implemented in MetJukeboxCustomRemixesScreen, MetJukeboxEditPlaylistScreen, and MetJukeboxFactoryRemixesScreen.
|
virtual |
Fill the detail texts from the selected catalogue row.
Slot 40. Every detail text is emptied, the warning text mWarningText is hidden, and mPicturesPending is cleared. An empty or absent catalogue stops there. A remix from another album shows the warning and hides both song pictures. Otherwise both TexturePairRecord members load the song's logo and picture paths, and the genre and tempo texts take the configuration values of codes 0x321 and 0x322 for the record's level name, the tempo followed by bpm. Every remix shows its name, the user name of each player appearance, and its date. A remix of the jukebox album also shows the value of code 0x325, or of code 0x327 when the first is wider than the text wraps at, and sets mPicturesPending. The selected row is read without testing mCatalogueList for null. The title is inferred.
Reimplemented in MetJukeboxEditPlaylistScreen.
|
virtual |
Select the help text for the playlist's state.
Slot 41. A playlist below the limit at 0x0069ad78 selects the met_jukebox_base_screen_help_tab layout and posts met_jukebox_base_screen_ticker_tape. A full playlist selects met_jukebox_base_screen_error_tab and posts met_jukebox_base_screen_error_ticker_tape. The title is inferred. The European release looks the layouts and the texts up in the current language.
Reimplemented in MetJukeboxEditPlaylistScreen.
|
virtual |
Bind the catalogue and the playlist from the shared MetRemixManager.
Slot 42. mPlayList becomes the manager's playlist and mCatalogue the manager's remix list for the slot mCatalogueKey identifies, inserted empty when absent. The row counts are pushed into both scrolling lists, and the playlist selection moves to its last entry. SetShowing() runs it before anything else it does. The title is inferred.
|
virtual |
Show one row of whichever list the context selects.
Context 0 is the remix catalogue at mCatalogue. Its row shows the record's name, in mAvailableFont when the record's albumNumber matches GetAlbumJukeboxValue() and in mUnavailableFont otherwise. Context 1 is the playlist at mPlayList. The body copies the whole entry vector first and shows the indexed name from the copy. An index past the end empties the text in both contexts, and any other context does not change the cell. The column is not read.
| nItem | The row. |
| nColumn | The cell index, which the body does not read. |
| pText | The cell. |
| nContext | 0 for the catalogue and 1 for the playlist. |
Implements ListDataProvider.
Reimplemented in MetJukeboxEditPlaylistScreen.
|
virtual |
Leave the cell as it is.
| nItem | The row, which the body does not read. |
| nColumn | The cell index, which the body does not read. |
| pMesh | The cell, which the body does not read. |
| nContext | The list context, which the body does not read. |
Implements ListDataProvider.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |