|
wavelength 1.0.0
|
Head-up display of a game, drawn over the tunnel. More...
#include <overlay.h>


Public Member Functions | |
| Overlay (DataArray *pConfig, DataArray *pDefaults) | |
| Build the display of the game about to start. | |
| ~Overlay () override | |
| Destroy the display and turn the screen blur off. | |
| bool | DispatchPriv (Message *pMsg) override |
| Ignore a message. | |
| void | CreateTutorialParts () |
| Build the picture of the controller and the panel of text a tutorial uses. | |
| OvyLocalPlayer * | FindLocal (int nPlayer) |
| Find the local parts of a player. | |
| OvyAllPlayer * | FindAll (int nPlayer) |
| Find the parts every player has. | |
| void | AddCheckpoint (float fPos, const char *pszLabel) |
| Add a checkpoint to the song position bar. | |
| void | ClearCheckpoints () |
| Remove the checkpoints of the song position bar. | |
| void | SetEnergy (float fLevel, int nColor) |
| Set the level of the energy bar. | |
| void | SetEnergyWarning (bool bWarn) |
| Start or stop the warning of the energy bar. | |
| void | SetScore (int nPlayer, int nScore) |
| Show the score of a player, or the letters of a duel player. | |
| void | SetMultiplier (int nPlayer, int nMultiplier, int bHot, const char *pszText) |
| Show the multiplier of a player's pending points. | |
| void | ShowPoints (int nPlayer, int nPoints, const char *pszText) |
| Show a player's pending points, or reveal letters in a duel. | |
| void | HideMultiplier (int nPlayer) |
| Hide the multiplier of a player's pending points. | |
| void | EndPoints (int nPlayer, int nResult) |
| End a player's pending points, or fly the letters of a duel. | |
| void | ShowCapture (int nPlayer) |
| Show a player catching a phrase. | |
| void | SetPlaying (int nPlayer, bool bPlaying) |
| Mark a player as playing or not. | |
| void | ShowPowerup (int nPlayer, int nPowerup) |
| Show the power-up a player holds. | |
| void | SetPowerupEnabled (int nPlayer, int nEnabled) |
| Let a player's power-up icon slide into view or not. | |
| void | ShowTextMessage (const char *pszText, const char *pszSmallText, float fDuration, float fScale, int nPlayer, float fX, float fZ) |
| Fly a message of two lines across the display. | |
| void | SetMessage (const char *pszText, bool bFirstLine) |
| Show a line of text, or hide it for a null or empty text. | |
| void | SetLetterbox (bool bClosed) |
| Close or open the letterbox bars. | |
| float | GetLetterbox () |
| Report how far the letterbox bars are closed. | |
| void | SetPartsShown (bool bShow, int nUnused) |
| Show or hide the parts of the display the game shows during play. | |
| void | ShowEnergy (bool bShow) |
| Slide the energy bar in or out. | |
| void | ShowScore (int nPlayer, bool bShow) |
| Show or hide a player's score and pending points. | |
| void | ShowBox (bool bShow) |
| Fade the tutorial highlight in or out. | |
| void | ShowArrow (bool bShow) |
| Fade the tutorial arrow in or out. | |
| void | ShowAvatar (int nPlayer, bool bShow) |
| Show or hide a player's avatar, or the leader avatar for player 0 when the player has none. | |
| void | ShowSongPos (bool bShow) |
| Slide the song position bar in or out. | |
| void | ShowTrackLabel (bool bShow) |
| Show or hide the track label. | |
| void | SetFreqSize (int nPlayer, int nFreqSize) |
| Choose the size of a player's avatar display. | |
| void | SetTrack (int nPlayer, int nInstrument, int nTrackKind) |
| Label the track a player moved to. | |
| void | FlashPoints (int nPlayer, float fValue) |
| Flash a player's pending points, or time the letter banner of a duel. | |
| void | SetBoxRect (float fX0, float fY0, float fX1, float fY1, float fDuration) |
| Move the tutorial highlight to a rectangle of the screen. | |
| void | SetArrowTarget (float fX, float fY, float fAngle, float fDuration) |
| Move the tutorial arrow to point at a place of the screen. | |
| void | FlyButton (int nLane, const Vector2 *pFrom, const Vector2 *pTo) |
| Fly the button icon of a lane. | |
| void | SetButtonPulse (int nLane, bool bPulse) |
| Start or stop the pulse of the button icon of a lane. | |
| void | HideButton (int nLane) |
| Hide the button icon of a lane. | |
| void | SetButtonGlyph (int nLane, const char *pszGlyph) |
| Change the glyph of the button icon of a lane. | |
| void | ShowController (bool bShow, float fPosition) |
| Slide the picture of the controller in or out and place it. | |
| void | SetControllerHighlight (bool bHighlight) |
| Light or darken the picture of the controller. | |
| void | ShowControllerButton (int nButton, bool bShow) |
| Show or hide a button of the picture of the controller. | |
| void | OpenDialog (const char *pszText, float fSize, float fPosition) |
| Fill the panel of text and slide it in. | |
| void | CloseDialog () |
| Slide the panel of text out. | |
| void | ShowPlayerOnTrack (int nPlayer, int nIndex) |
| Show a player on a track. | |
| void | SetSectionCount (int nCount) |
| Show one blank entry per section of a remix. | |
| void | SetSectionLabel (int nIndex, const char *pszLabel) |
| Set the label of a section of a remix. | |
| void | ShowSections (bool bShow) |
| Slide the sections of a remix in or out. | |
| void | HighlightSection (int nIndex) |
| Light the entry of a section of a remix. | |
| void | SetRemixPanelText (int nPlayer, int nIndex, const char *pszText, int nPanel) |
| Set the text of an entry of a player's remix panel. | |
| void | SelectRemixPanelEntry (int nPlayer, int nIndex, int nPanel) |
| Move the cursor of a player's remix panel to an entry. | |
| void | FlashRemixPanel (int nPlayer, int nPanel) |
| Blink the cursor of a player's remix panel. | |
| void | SetRemixPanelLit (int nPlayer, int nIndex, int bLit, int nPanel) |
| Light or darken an entry of a player's remix panel. | |
| void | ShowRemixPanel (int nPlayer, int nPanel) |
| Slide out a panel of a player's remix menu. | |
| void | ShowRemix (int nPlayer, bool bShow) |
| Slide a player's remix menu in or out. | |
| void | ShowStick (int nDirection, const Vector2 *pPosition) |
| Show the stick marker of a remix. | |
| void | HideStick () |
| Hide the stick marker of a remix. | |
| void | SetCameraOffset (const Vector3 *pOffset) |
| Move the display camera by an offset from its place in the layout. | |
| void | Reset () |
| Return every part to its state at the start of a song, hidden. | |
| void | ClearStarted () |
| Let the parts show again once the song starts. | |
| void | ShowCheckpoint () |
| Show every score of a shared-screen game at its place in the ranking, with the bar of its share of the points. | |
| void | ShowResult (bool bWon, int nMode) |
| Show the result of a song: hide the energy bar of a lost song, or clear the pending points of a won one. | |
| void | Poll (float fFrame, float fSongDelta, float fUnused, float fRealDelta, float fFuture) |
| Advance the display, and show its parts once the song is about to start. | |
| void | Draw () |
| Draw the display: the layout, the common parts, the parts of every player, and the avatars, the winner's last. | |
| Public Member Functions inherited from MsgSink | |
| void * | operator new (size_t nSize) |
| Allocate a sink from the pool heaps under the tag "MsgSink". | |
| void | operator delete (void *pBlock) |
| Return a sink to the pool heaps. | |
| virtual | ~MsgSink () |
| virtual bool | Dispatch (Message *pMsg) |
| Accept a message. | |
| void * | operator new (size_t size) |
| Allocate from the main heap under the name MsgSink. | |
| void | operator delete (void *mem) |
| Return memory to its heap. | |
| virtual | ~MsgSink () |
| Destroy the sink. | |
| virtual bool | Dispatch (Message *msg) |
| Handle a message. | |
Static Public Member Functions | |
| static void | LoadConfig (DataArray *pConfig, DataArray *pDefaults, bool bUnused) |
| Read the settings of the display from a configuration section and its defaults. | |
| static void | SetHudPrefix () |
| Choose the head-up display layout from the community and the rule set of the game. | |
Static Public Attributes | |
| static char | sHudLetter |
| The letter of the head-up display layout, 1, d, or m. | |
| static const char * | sHudPrefix |
| The prefix of the head-up display layout's scene objects, HUD1, HUDd, or HUDm. | |
| static float | sAssemblyTime |
| The time the head-up display takes to assemble, assembly_time. | |
| static Vector2 | sHudZ |
| The depth range the display camera draws into, hud_z. | |
| static float | sPointsScale |
| The scale of the points that fly off a score, hud_points_scale. | |
| static float | sDuelPointsMoveTicks |
| The ticks the points of a duel take to move, duel_points_move_ticks. | |
| static float | sDuelPointsMoveRate |
| One over sDuelPointsMoveTicks. | |
Head-up display of a game, drawn over the tunnel.
The RTTI records the class as deriving from MsgSink. The vtable is at 0x003d19d8, and the object is 0x50 bytes. The display keeps the parts of the whole game in one HudCommon, the parts of each player on this console in an OvyLocalPlayer, and the score and the avatar of every player in an OvyAllPlayer. A duel orders its players by slot, and any other game puts the local players first.
Build the display of the game about to start.
The layout is _hud<letter>.view, which joins hud.view. Every child of the layout but hud.cam and hud.env starts hidden, and the camera draws into the depth range sHudZ.
| pConfig | The configuration section of the game mode. |
| pDefaults | The section of defaults. |
|
override |
Destroy the display and turn the screen blur off.
|
overridevirtual |
Ignore a message.
| pMsg | The message. |
Implements MsgSink.
| void Overlay::CreateTutorialParts | ( | ) |
Build the picture of the controller and the panel of text a tutorial uses.
| OvyLocalPlayer * Overlay::FindLocal | ( | int | nPlayer | ) |
Find the local parts of a player.
| nPlayer | The player. |
| OvyAllPlayer * Overlay::FindAll | ( | int | nPlayer | ) |
Find the parts every player has.
| nPlayer | The player. |
| void Overlay::AddCheckpoint | ( | float | fPos, |
| const char * | pszLabel ) |
Add a checkpoint to the song position bar.
| fPos | The place on the bar, from 0 to 1. |
| pszLabel | The label, or null. |
| void Overlay::ClearCheckpoints | ( | ) |
Remove the checkpoints of the song position bar.
| void Overlay::SetEnergy | ( | float | fLevel, |
| int | nColor ) |
Set the level of the energy bar.
| fLevel | The level, from 0 to 1. |
| nColor | The colour of the bar. |
| void Overlay::SetEnergyWarning | ( | bool | bWarn | ) |
Start or stop the warning of the energy bar.
| bWarn | Whether the warning shows. |
| void Overlay::SetScore | ( | int | nPlayer, |
| int | nScore ) |
Show the score of a player, or the letters of a duel player.
| nPlayer | The player. |
| nScore | The score, or the number of letters. |
| void Overlay::SetMultiplier | ( | int | nPlayer, |
| int | nMultiplier, | ||
| int | bHot, | ||
| const char * | pszText ) |
Show the multiplier of a player's pending points.
| nPlayer | The player. |
| nMultiplier | The multiplier. |
| bHot | Whether the points take the hot colour. |
| pszText | The text of the multiplier. |
| void Overlay::ShowPoints | ( | int | nPlayer, |
| int | nPoints, | ||
| const char * | pszText ) |
Show a player's pending points, or reveal letters in a duel.
| nPlayer | The player. |
| nPoints | The points. |
| pszText | The text of the points. |
| void Overlay::HideMultiplier | ( | int | nPlayer | ) |
Hide the multiplier of a player's pending points.
| nPlayer | The player. |
| void Overlay::EndPoints | ( | int | nPlayer, |
| int | nResult ) |
End a player's pending points, or fly the letters of a duel.
| nPlayer | The player. |
| nResult | One of GfxManager::PendingPointsResult. |
|
inline |
Show a player catching a phrase.
The body is empty.
| nPlayer | The player. |
| void Overlay::SetPlaying | ( | int | nPlayer, |
| bool | bPlaying ) |
Mark a player as playing or not.
| nPlayer | The player. |
| bPlaying | Whether the player plays. |
| void Overlay::ShowPowerup | ( | int | nPlayer, |
| int | nPowerup ) |
Show the power-up a player holds.
| nPlayer | The player. |
| nPowerup | The power-up, one of GameLogic::Powerup. |
| void Overlay::SetPowerupEnabled | ( | int | nPlayer, |
| int | nEnabled ) |
Let a player's power-up icon slide into view or not.
| nPlayer | The player. |
| nEnabled | Non-zero to let the icon show. |
| void Overlay::ShowTextMessage | ( | const char * | pszText, |
| const char * | pszSmallText, | ||
| float | fDuration, | ||
| float | fScale, | ||
| int | nPlayer, | ||
| float | fX, | ||
| float | fZ ) |
Fly a message of two lines across the display.
| pszText | The large line. |
| pszSmallText | The small line. |
| fDuration | The time the message rests in view, in milliseconds. |
| fScale | The scale of the lines. |
| nPlayer | The player whose colour the lines take, or a negative value for the default. |
| fX | The horizontal place of the message. |
| fZ | The vertical place of the message. |
| void Overlay::SetMessage | ( | const char * | pszText, |
| bool | bFirstLine ) |
Show a line of text, or hide it for a null or empty text.
| pszText | The line, or null. |
| bFirstLine | Whether the line is HUD genmsg.txt rather than HUD genmsg2.txt. |
| void Overlay::SetLetterbox | ( | bool | bClosed | ) |
Close or open the letterbox bars.
| bClosed | Whether to close the bars. |
| float Overlay::GetLetterbox | ( | ) |
Report how far the letterbox bars are closed.
| void Overlay::SetPartsShown | ( | bool | bShow, |
| int | nUnused ) |
Show or hide the parts of the display the game shows during play.
A remix that plays back without editing shows the song position and the avatars only. The tutorial does not show the song position, the avatars, or the scores, and practice does not show the energy bar.
| bShow | Whether to show the parts. |
| nUnused | Not read. |
| void Overlay::ShowEnergy | ( | bool | bShow | ) |
Slide the energy bar in or out.
| bShow | Whether to show the bar. |
| void Overlay::ShowScore | ( | int | nPlayer, |
| bool | bShow ) |
Show or hide a player's score and pending points.
| nPlayer | The player. |
| bShow | Whether to show them. |
| void Overlay::ShowBox | ( | bool | bShow | ) |
Fade the tutorial highlight in or out.
| bShow | Whether to show the highlight. |
| void Overlay::ShowArrow | ( | bool | bShow | ) |
Fade the tutorial arrow in or out.
| bShow | Whether to show the arrow. |
| void Overlay::ShowAvatar | ( | int | nPlayer, |
| bool | bShow ) |
Show or hide a player's avatar, or the leader avatar for player 0 when the player has none.
| nPlayer | The player. |
| bShow | Whether to show the avatar. |
| void Overlay::ShowSongPos | ( | bool | bShow | ) |
Slide the song position bar in or out.
| bShow | Whether to show the bar. |
| void Overlay::ShowTrackLabel | ( | bool | bShow | ) |
Show or hide the track label.
| bShow | Whether to show the label. |
| void Overlay::SetFreqSize | ( | int | nPlayer, |
| int | nFreqSize ) |
Choose the size of a player's avatar display.
| nPlayer | The player. |
| nFreqSize | One of GameOptions::FreqSize. |
| void Overlay::SetTrack | ( | int | nPlayer, |
| int | nInstrument, | ||
| int | nTrackKind ) |
Label the track a player moved to.
| nPlayer | The player. |
| nInstrument | The instrument of the track, one of GfxManager::Instrument. |
| nTrackKind | The kind of the track. |
| void Overlay::FlashPoints | ( | int | nPlayer, |
| float | fValue ) |
Flash a player's pending points, or time the letter banner of a duel.
| nPlayer | The player. |
| fValue | The minimum swell of the flash, or the time of the banner. Nothing happens unless it is positive. |
| void Overlay::SetBoxRect | ( | float | fX0, |
| float | fY0, | ||
| float | fX1, | ||
| float | fY1, | ||
| float | fDuration ) |
Move the tutorial highlight to a rectangle of the screen.
| fX0 | The left edge, in the unit square of the screen. |
| fY0 | The top edge. |
| fX1 | The right edge. |
| fY1 | The bottom edge. |
| fDuration | The ticks the move takes. |
| void Overlay::SetArrowTarget | ( | float | fX, |
| float | fY, | ||
| float | fAngle, | ||
| float | fDuration ) |
Move the tutorial arrow to point at a place of the screen.
| fX | The horizontal place, in the unit square of the screen. |
| fY | The vertical place. |
| fAngle | The direction of the arrow, in degrees. |
| fDuration | The ticks the move takes. |
Fly the button icon of a lane.
| nLane | The lane. |
| pFrom | The place the flight starts at. |
| pTo | The place the flight ends at. |
| void Overlay::SetButtonPulse | ( | int | nLane, |
| bool | bPulse ) |
Start or stop the pulse of the button icon of a lane.
| nLane | The lane. |
| bPulse | Whether the icon pulses. |
| void Overlay::HideButton | ( | int | nLane | ) |
Hide the button icon of a lane.
| nLane | The lane. |
| void Overlay::SetButtonGlyph | ( | int | nLane, |
| const char * | pszGlyph ) |
Change the glyph of the button icon of a lane.
| nLane | The lane. |
| pszGlyph | The glyph. |
| void Overlay::ShowController | ( | bool | bShow, |
| float | fPosition ) |
Slide the picture of the controller in or out and place it.
| bShow | Whether to show the picture. |
| fPosition | The frame of HUD controller map pos.tnm, or a negative value to retain it. |
| void Overlay::SetControllerHighlight | ( | bool | bHighlight | ) |
Light or darken the picture of the controller.
| bHighlight | Whether to light the picture. |
| void Overlay::ShowControllerButton | ( | int | nButton, |
| bool | bShow ) |
Show or hide a button of the picture of the controller.
| nButton | The button, one of JoypadButton. |
| bShow | Whether to show the button. |
| void Overlay::OpenDialog | ( | const char * | pszText, |
| float | fSize, | ||
| float | fPosition ) |
Fill the panel of text and slide it in.
| pszText | The text. |
| fSize | The frame of the size of the panel. |
| fPosition | The frame of the place of the panel, or a negative value to retain it. |
| void Overlay::CloseDialog | ( | ) |
Slide the panel of text out.
|
inline |
Show a player on a track.
The body is empty.
| nPlayer | The player. |
| nIndex | The place of the player among those on the track. |
| void Overlay::SetSectionCount | ( | int | nCount | ) |
Show one blank entry per section of a remix.
| nCount | The number of sections. |
| void Overlay::SetSectionLabel | ( | int | nIndex, |
| const char * | pszLabel ) |
Set the label of a section of a remix.
| nIndex | The section. |
| pszLabel | The label. |
| void Overlay::ShowSections | ( | bool | bShow | ) |
Slide the sections of a remix in or out.
| bShow | Whether to show the sections. |
| void Overlay::HighlightSection | ( | int | nIndex | ) |
Light the entry of a section of a remix.
| nIndex | The section. |
| void Overlay::SetRemixPanelText | ( | int | nPlayer, |
| int | nIndex, | ||
| const char * | pszText, | ||
| int | nPanel ) |
Set the text of an entry of a player's remix panel.
| nPlayer | The player. |
| nIndex | The entry. |
| pszText | The text. |
| nPanel | The panel, one of GfxManager::RemixSubPanel. |
| void Overlay::SelectRemixPanelEntry | ( | int | nPlayer, |
| int | nIndex, | ||
| int | nPanel ) |
Move the cursor of a player's remix panel to an entry.
| nPlayer | The player. |
| nIndex | The entry, or a negative value for none. |
| nPanel | The panel, one of GfxManager::RemixSubPanel. |
| void Overlay::FlashRemixPanel | ( | int | nPlayer, |
| int | nPanel ) |
Blink the cursor of a player's remix panel.
| nPlayer | The player. |
| nPanel | The panel, one of GfxManager::RemixSubPanel. |
| void Overlay::SetRemixPanelLit | ( | int | nPlayer, |
| int | nIndex, | ||
| int | bLit, | ||
| int | nPanel ) |
Light or darken an entry of a player's remix panel.
| nPlayer | The player. |
| nIndex | The entry. |
| bLit | Whether to light the entry. |
| nPanel | The panel, one of GfxManager::RemixSubPanel. |
| void Overlay::ShowRemixPanel | ( | int | nPlayer, |
| int | nPanel ) |
Slide out a panel of a player's remix menu.
| nPlayer | The player. |
| nPanel | The panel, one of GfxManager::RemixSubPanel. |
| void Overlay::ShowRemix | ( | int | nPlayer, |
| bool | bShow ) |
Slide a player's remix menu in or out.
| nPlayer | The player. |
| bShow | Whether to show the menu. |
| void Overlay::ShowStick | ( | int | nDirection, |
| const Vector2 * | pPosition ) |
Show the stick marker of a remix.
| nDirection | The material, one of HudStick::Direction. |
| pPosition | The place on the diagram. |
| void Overlay::HideStick | ( | ) |
Hide the stick marker of a remix.
| void Overlay::SetCameraOffset | ( | const Vector3 * | pOffset | ) |
Move the display camera by an offset from its place in the layout.
| pOffset | The offset. |
| void Overlay::Reset | ( | ) |
Return every part to its state at the start of a song, hidden.
| void Overlay::ClearStarted | ( | ) |
Let the parts show again once the song starts.
| void Overlay::ShowCheckpoint | ( | ) |
Show every score of a shared-screen game at its place in the ranking, with the bar of its share of the points.
| void Overlay::ShowResult | ( | bool | bWon, |
| int | nMode ) |
Show the result of a song: hide the energy bar of a lost song, or clear the pending points of a won one.
| bWon | Whether the song was won. |
| nMode | Not read. |
| void Overlay::Poll | ( | float | fFrame, |
| float | fSongDelta, | ||
| float | fUnused, | ||
| float | fRealDelta, | ||
| float | fFuture ) |
Advance the display, and show its parts once the song is about to start.
| fFrame | The frame of hud.view, the song position in ticks. |
| fSongDelta | The song time since the last poll. |
| fUnused | Passed to OvyLocalPlayer::Poll(), which does not read it. |
| fRealDelta | The time since the last poll. |
| fFuture | The length of the future part of the song position bar. |
| void Overlay::Draw | ( | ) |
Draw the display: the layout, the common parts, the parts of every player, and the avatars, the winner's last.
Read the settings of the display from a configuration section and its defaults.
| pConfig | The configuration section, or null. |
| pDefaults | The section of defaults, or null. |
| bUnused | Passed to OvyRemixPanel::LoadPositions(), which does not read it. |
|
static |
Choose the head-up display layout from the community and the rule set of the game.
A solo game and an online remix use HUD1, any other duel HUDd, and any other game HUDm.
|
static |
The letter of the head-up display layout, 1, d, or m.
|
static |
The prefix of the head-up display layout's scene objects, HUD1, HUDd, or HUDm.
|
static |
The time the head-up display takes to assemble, assembly_time.
|
static |
The depth range the display camera draws into, hud_z.
|
static |
The scale of the points that fly off a score, hud_points_scale.
|
static |
The ticks the points of a duel take to move, duel_points_move_ticks.
|
static |
One over sDuelPointsMoveTicks.