|
resonance 1.0.1
|
Screen that picks an arena. More...
#include <metarenasscreen.h>


Public Member Functions | |
| MetArenasScreen (MetRenderer *pRenderer, int nPriority) | |
| Construct the screen. | |
| virtual | ~MetArenasScreen () |
| virtual void | EnterAndShow () |
| Title the screen from the session's mode and play mode, and show it. | |
| virtual void | HandleCommand (const MetScreenCommand *pCommand) |
| Route one command to the button ring, the selection, or the departure. | |
| virtual void | PlaySlideSound (int nSelector) |
| Play the slide sound only for a selectable index. | |
| virtual void | PlayCycleLeftSound (int nSelector) |
| Play no left cycle sound. | |
| virtual void | PlayCycleRightSound (int nSelector) |
| Play no right cycle sound. | |
| virtual void | UpdateIdle (float flTime) |
| Advance the arena screenshot pair and hand the current texture to the panel mesh. | |
| virtual void | OnRepeatingSoundFinished (Rnd::Button *pButton) |
| Commit the chosen arena and depart, or activate the panel for a disabled entry. | |
| virtual void | OnEnterFinished () |
| Post the first prompt. | |
| virtual void | OnExitFinished () |
| Go on to whichever screen the departure was for. | |
| virtual void | ResolveContainerViews () |
| Resolve the arena buttons, the screenshot material, and the button view. | |
| 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 | 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 | 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 | 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 | 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 | 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. | |
Static Public Member Functions | |
| static MetArenasScreen * | New (MetRenderer *pRenderer, int nPriority) |
| Allocate and construct the screen. | |
| 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 MetScreen | |
| float | mAnimEndFrame |
| float | mEnterStartTime |
| MetRenderer * | mRenderer |
| int | mExitChoice |
| int | mAcceptsCommands |
| Rnd::View * | mEnterAnim |
| std::vector< HxStr > | mHelpKeys |
| int | mViewsUnresolved |
| int | mPlaysCommandSounds |
| int | mShowsLoadedDrawables |
Screen that picks an arena.
Its RTTI descriptor is at 0x00901e80. It has MetScreen as its one public non-virtual base at offset 0.
The 39-entry primary vtable is at 0x007e8ba0, the same length as the MetScreen table, so the class declares no virtual of its own.
The constructor at 0x001f65a0 takes only the renderer and the load priority, and supplies as for the screen name, metagame/_Solo for the directory, and arena_sel for the container. It pushes the object name arenas into the container object-name vector that MetScreen owns, and allocates a MetButtonList into mArenaButtons.
The object is 0xd4 bytes, which the allocation in New() fixes rather than the constructor's highest store.
Eleven entries of the primary table differ from the MetScreen table, which a diff of the two settles rather than the title each routine carries. Apart from the type function they are 1 0x001f70f0 the destructor, 5 0x001f7750, 19 0x001f7310, 20 0x001fc718, 23 0x001fc680, 24 0x001fc688, 26 0x001f8af0, 30 0x001f8378, 33 0x001fc758, 36 0x001f8658, and 38 0x001f6a08. All ten behaviour slots are declared below.
Slots 23 and 24 are two-instruction empty bodies at distinct addresses, and each is a genuine override rather than an inherited empty body, because MetScreen's own slot 23 and 24 both play a named sound. The class therefore silences both cycle sounds while overriding the slide sound with a conditional one.
An index below mUnlockedCount is an unlocked arena, and mNoArenaIndex is the last button, the entry for no arena. Both are selectable, and every other button is shown disabled.
| MetArenasScreen::MetArenasScreen | ( | MetRenderer * | pRenderer, |
| int | nPriority ) |
Construct the screen.
| pRenderer | The front-end renderer this screen registers on. |
| nPriority | The load priority. |
|
virtual |
|
static |
Allocate and construct the screen.
The allocation is 0xd4 bytes under MsgSink's tag. The screen factory at 0x00385180 is the caller.
| pRenderer | The front-end renderer this screen registers on. |
| nPriority | The load priority. |
|
virtual |
Title the screen from the session's mode and play mode, and show it.
Slot 5.
The title is the configuration string 0x269 for solo or multi, a space, the one for game or remix, and the one for arenas. The screenshot pair is invalidated, the buttons are set up through SetupArenaButtons(), the prompt layout standard_title is selected, and MetScreen::EnterAndShow() runs. The European release looks each part up in the current language and, in Spanish, places the game or remix part before the mode.
Reimplemented from MetScreen.
|
virtual |
Route one command to the button ring, the selection, or the departure.
Slot 19.
Commands 1 and 2 step the ring and then run UpdateScreenshot(). Command 5 is accepted only for a selectable index, and it then clears the prompt, activates the empty panel name, and starts the selected button alternating with an interval of 30.0f and two cycles. Command 6 clears the prompt, clears MetScreen::mExitChoice, exits MetScreenTitleScreen, and starts the exit animation.
| pCommand | The command to route. |
Reimplemented from MetScreen.
|
virtual |
Play the slide sound only for a selectable index.
Slot 20.
The base implementation is called directly rather than dispatched.
| nSelector | The controller index. |
Reimplemented from MetScreen.
|
virtual |
Play no left cycle sound.
Slot 23.
| nSelector | The controller index, which the body does not read. |
Reimplemented from MetScreen.
|
virtual |
Play no right cycle sound.
Slot 24.
| nSelector | The controller index, which the body does not read. |
Reimplemented from MetScreen.
|
virtual |
Advance the arena screenshot pair and hand the current texture to the panel mesh.
Slot 26.
The mesh as_arena_panel.mesh is hidden before the read. A read that reports a texture shows the mesh again and hands the texture to the first stage of mScreenshotMat. A read that does not report a texture returns with the mesh hidden. The screen looks the same while the screenshot is still loading.
| flTime | The current renderer frame position, which the body does not read. |
Reimplemented from MetScreen.
|
virtual |
Commit the chosen arena and depart, or activate the panel for a disabled entry.
Slot 30.
MetScreen slot 29 runs the slot once the selection has finished alternating. A selectable index copies the game manager's GameParams, sets GameParams::mArenaName from the arena table, hands the copy back, sets MetScreen::mExitChoice to 2, exits MetHelpScreen and MetScreenTitleScreen, and starts the exit animation. Any other index activates the panel named MetArenasScreen.
| pButton | The button slot 29 finished with, which the body does not read. |
Reimplemented from MetScreen.
|
virtual |
Post the first prompt.
Slot 33.
MetScreen slot 32 runs the slot once the enter animation has finished. The prompt is MetScreen::mHelpKeys's first element rather than the selected one, as in the binary.
Reimplemented from MetScreen.
|
virtual |
Go on to whichever screen the departure was for.
Slot 36.
MetScreen slot 35 runs the slot once the exit animation has finished. With MetScreen::mExitChoice clear, the screen came from the remix load screen or from the stages, and it goes back there. Otherwise it records MetArenasScreen as the return screen and goes on to MetLoadGameScreen. Every path ends by selecting -1 on the ring.
Reimplemented from MetScreen.
|
virtual |
Resolve the arena buttons, the screenshot material, and the button view.
Slot 38.
The four palette vectors take the materials and fonts of as_01.but (the unlocked look) and as_02.but (the locked look). Buttons as_01.but through as_09.but join the ring. The routine ends by allocating the TexturePairRecord at mScreenshots from gArena1.tex and gArena2.tex.
Reimplemented from MetScreen.