|
resonance 1.0.1
|
Canvas of the FreQ maker, the screen the avatar under edit is drawn on. More...
#include <metfreqmakercanvasscreen.h>


Public Member Functions | |
| MetFreqMakerCanvasScreen (MetRenderer *pRenderer, int nPriority) | |
| Construct the screen. | |
| virtual | ~MetFreqMakerCanvasScreen () |
| virtual void | EnterAndShow () |
| Show the screen and hang the avatar view from fm_canvas.view again. | |
| virtual int | PollContainerLoad () |
| Report the container load finished once the FreQ maker assets are resident as well. | |
| virtual void | HandleCommand (const MetScreenCommand *pCommand) |
| Ignore the command. | |
| virtual void | PlayCycleLeftSound (int nSelector) |
| Play nothing. | |
| virtual void | PlayCycleRightSound (int nSelector) |
| Play nothing. | |
| virtual void | OnRepeatingSoundFinished (Rnd::Button *pButton) |
| Do nothing. | |
| virtual void | OnExitFinished () |
| Unhang the avatar view from fm_canvas.view. | |
| virtual void | ResolveContainerViews () |
| Resolve the base views, hang the avatar view from fm_canvas.view, and record that it is hung. | |
| void | CommitPersona () |
| Write the avatar and its name into the persona being edited, or into a new one, and make that persona the game manager's one persona. | |
| void | SetFreqName (const HxStr &name) |
| Rename the avatar and show the name on FREQ_NAME.txt. | |
| void | SelectTemplate (const HxStr &name) |
| Start placing a part of one template. | |
| void | PlaceCursor () |
| Place the previewed part, or stop editing the selected one, and mark the canvas modified. | |
| void | ResetCursor () |
| Return the placement state to its unset values. | |
| void | HandleCanvasCommand (const MetScreenCommand *pCommand) |
| Apply one of the canvas editing commands, codes 13 through 21, to the avatar. | |
| void | SetColor (const Color &color, const Vector2 &palettePosition) |
| Apply a colour to the previewed or selected part. | |
| std::list< FreqPart * > & | GetParts () |
| Report the parts of the avatar. | |
| FreqPart * | SelectPart (int nIndex) |
| Mark the canvas modified and start editing one part. | |
| void | LoadPersona (MetPersonaData *pPersona) |
| Load one persona's avatar and name for editing. | |
| void | LoadPrefab (MetPersonaData *pSource, int nRandomize) |
| Start a new persona from a pre-fab one's avatar, optionally randomised. | |
| void | RevertSelection () |
| Restore the selected part from the copy taken when it was selected. | |
| HxStr * | GetFreqName () |
| Report the avatar's name. | |
| void | DeletePart (int nIndex) |
| Delete one part and mark the canvas modified. | |
| void | Randomize () |
| Randomise the avatar and mark the canvas modified. | |
| void | RecentrePart (int nIndex) |
| Move one part to the origin, bring it to the front, and mark the canvas modified. | |
| 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 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 | 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 | 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 | 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. | |
| 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 | OnCardFormatted (int nPortSlot, int nStatus) |
| Report a finished format. | |
| 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 | OnJukeboxPlayListSaved (int nPortSlot, int nStatus) |
| Report a finished save of a jukebox playlist. | |
| virtual void | OnRemixesListed (int nPortSlot, int nStatus) |
| Report a finished listing of the saved remixes. | |
| virtual void | OnRemixLoaded (int nPortSlot, int nStatus) |
| Report a finished load of one remix. | |
| 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 | OnJukeboxPlayListLoaded (int nPortSlot, int nStatus) |
| Report a finished load of a jukebox playlist. | |
| 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. | |
Static Public Member Functions | |
| static MetFreqMakerCanvasScreen * | 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. | |
Public Attributes | |
| MetPersonaData * | mPersona |
| The persona being edited, or null for a new one. | |
| int | mModified |
| Non-zero after any edit, and cleared on commit or load. | |
| 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. | |
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 |
Canvas of the FreQ maker, the screen the avatar under edit is drawn on.
Its RTTI descriptor is at 0x00902a60. It has two public non-virtual bases at fixed offsets, MetScreen at +0x00, and MemcardUser at +140.
The 39-entry primary vtable is at 0x007f1cd8, the same length as the MetScreen table, so the class declares no virtual of its own.
The twenty-one-entry MemcardUser table at 0x007f1c28 adjusts this by -140 in every entry.
The object is 0x160 bytes, which the allocation in New() fixes. It embeds the avatar under edit as a FreqAppearanceDetail at +0xa0, and the inventory and buttons screens drive that avatar through the members below. Every edit that changes the avatar marks the canvas modified.
The translation unit spans 0x0025e5a8 to 0x00262810. Besides the members below, it has the static initialiser at 0x00261d50, which builds the default name player1, per-unit copies of MsgSink and MemcardUser routines, and template library emissions.
Apart from the type function and the destructor, the slots that differ from the MetScreen table are 5, 14, 19, 23, 24, 30, 36, and 38.
| MetFreqMakerCanvasScreen::MetFreqMakerCanvasScreen | ( | MetRenderer * | pRenderer, |
| int | nPriority ) |
Construct the screen.
Supplies fm_canvas for the screen name, metagame/persona for the directory, and freq_maker_canvas for the container, builds an empty avatar, and calls it player1. The European release takes the name from its text table instead, in this routine and in the two that load an avatar.
| pRenderer | The front-end renderer this screen registers on. |
| nPriority | The load priority. |
|
virtual |
|
static |
Build the screen on the heap.
The routine at 0x00385180 that creates every front-end screen is the caller.
| pRenderer | The front-end renderer the screen registers on. |
| nPriority | The load priority. |
|
virtual |
Show the screen and hang the avatar view from fm_canvas.view again.
Slot 5.
Reimplemented from MetScreen.
|
virtual |
Report the container load finished once the FreQ maker assets are resident as well.
Slot 14.
Reimplemented from MetScreen.
|
virtual |
Ignore the command.
Slot 19. The body is empty.
| pCommand | The command. |
Reimplemented from MetScreen.
|
virtual |
Play nothing.
Slot 23. The body is empty.
| nSelector | The value the override compares against its own recorded selector. |
Reimplemented from MetScreen.
|
virtual |
Play nothing.
Slot 24. The body is empty.
| nSelector | The value the override compares against its own recorded selector. |
Reimplemented from MetScreen.
|
virtual |
Do nothing.
Slot 30. The body is empty.
| pButton | The button slot 29 finished with. |
Reimplemented from MetScreen.
|
virtual |
Unhang the avatar view from fm_canvas.view.
Slot 36.
Reimplemented from MetScreen.
|
virtual |
Resolve the base views, hang the avatar view from fm_canvas.view, and record that it is hung.
Slot 38. The European release also fills FREQ CANVAS.txt with the canvas title from its text table.
Reimplemented from MetScreen.
| void MetFreqMakerCanvasScreen::CommitPersona | ( | ) |
Write the avatar and its name into the persona being edited, or into a new one, and make that persona the game manager's one persona.
A new persona also takes the current date and time when they are available, and the copy the game manager keeps becomes the persona being edited. The canvas is then marked unmodified. MetFreqMakerButtonsScreen's slots 15 and 19 call it. The title is inferred.
| void MetFreqMakerCanvasScreen::SetFreqName | ( | const HxStr & | name | ) |
Rename the avatar and show the name on FREQ_NAME.txt.
The canvas is marked modified. The title is inferred.
| name | The new name. |
| void MetFreqMakerCanvasScreen::SelectTemplate | ( | const HxStr & | name | ) |
Start placing a part of one template.
The title is inferred.
| name | The template name. |
| void MetFreqMakerCanvasScreen::PlaceCursor | ( | ) |
Place the previewed part, or stop editing the selected one, and mark the canvas modified.
The title is inferred.
| void MetFreqMakerCanvasScreen::ResetCursor | ( | ) |
Return the placement state to its unset values.
The title is inferred.
| void MetFreqMakerCanvasScreen::HandleCanvasCommand | ( | const MetScreenCommand * | pCommand | ) |
Apply one of the canvas editing commands, codes 13 through 21, to the avatar.
The inventory screen forwards the commands. The title is inferred.
| pCommand | The command. |
Apply a colour to the previewed or selected part.
The title is inferred.
| color | The colour. |
| palettePosition | The palette position the colour came from. |
| std::list< FreqPart * > & MetFreqMakerCanvasScreen::GetParts | ( | ) |
Report the parts of the avatar.
The title is inferred.
| FreqPart * MetFreqMakerCanvasScreen::SelectPart | ( | int | nIndex | ) |
Mark the canvas modified and start editing one part.
The title is inferred.
| nIndex | The part's position in the part list. |
| void MetFreqMakerCanvasScreen::LoadPersona | ( | MetPersonaData * | pPersona | ) |
Load one persona's avatar and name for editing.
With a null persona the avatar is emptied and named player1. The canvas is marked unmodified. The title is inferred.
| pPersona | The persona to edit, or null. |
| void MetFreqMakerCanvasScreen::LoadPrefab | ( | MetPersonaData * | pSource, |
| int | nRandomize ) |
Start a new persona from a pre-fab one's avatar, optionally randomised.
The persona being edited is cleared, the avatar is copied from pSource and named player1, and with nRandomize set randomize() runs a random number of times from 0 to 9. The canvas is marked modified. The title is inferred.
| pSource | The pre-fab persona. |
| nRandomize | Non-zero to randomise the copy. |
| void MetFreqMakerCanvasScreen::RevertSelection | ( | ) |
Restore the selected part from the copy taken when it was selected.
The title is inferred.
| HxStr * MetFreqMakerCanvasScreen::GetFreqName | ( | ) |
Report the avatar's name.
The title is inferred.
| void MetFreqMakerCanvasScreen::DeletePart | ( | int | nIndex | ) |
Delete one part and mark the canvas modified.
The title is inferred.
| nIndex | The part's position in the part list. |
| void MetFreqMakerCanvasScreen::Randomize | ( | ) |
Randomise the avatar and mark the canvas modified.
The title is inferred.
| void MetFreqMakerCanvasScreen::RecentrePart | ( | int | nIndex | ) |
Move one part to the origin, bring it to the front, and mark the canvas modified.
The title is inferred.
| nIndex | The part's position in the part list. |
| MetPersonaData* MetFreqMakerCanvasScreen::mPersona |
The persona being edited, or null for a new one.
Public because MetFreqMakerButtonsScreen's slots 15 and 36 pass it to MetPersonaSaverScreen::StartSave(), and the image has no accessor. +0x90
| int MetFreqMakerCanvasScreen::mModified |
Non-zero after any edit, and cleared on commit or load.
Public because MetFreqMakerButtonsScreen's slot 36 reads it to decide whether to raise the save-before-leaving dialogue, and the image has no accessor. +0x150