wavelength 1.0.0
Loading...
Searching...
No Matches
gfxmanager.h
Go to the documentation of this file.
1#pragma once
2
3#include <list>
4#include <memory>
5#include <vector>
6
7#include "app/overlay.h"
8#include "gfx/gfxarena.h"
9#include "gfx/gfxtunnel.h"
10#include "gfx/ship.h"
11#include "gfx/vortex.h"
12#include "math/color.h"
13#include "math/vector2.h"
14#include "math/vector3.h"
15#include "os/asyncstream.h"
16#include "os/prnstream.h"
17#include "os/string.h"
18#include "rnd/rndloader.h"
19#include "rnd/rndview.h"
20#include "script/dataarray.h"
21
29class GfxManager : public PrnStream {
30public:
36
44
51
53 static constexpr int kMaxPlayers = 4;
54
65
76
83
99
109 public:
119 GfxLoader(bool bDone, bool bMergeAll, DataArray *pForceMerge);
120
127 ~GfxLoader() override;
128
139 int ShouldLoad(RndObject *pExisting, const char *pszName, const char *pszClass) override;
140
149 void Start(const char *pszFile, int nFlags);
150
157 void Finish();
158
160 std::unique_ptr<RndLoader> mLoader;
162 int mDone;
164 };
165
180
186 struct DebugMsg {
187 int mReserved00; // +0x00, not yet identified.
188 int mReserved04; // +0x04, not yet identified.
190 int mReserved1C; // +0x1c, not yet identified.
191 };
192
200
207 ~GfxManager() override;
208
216 void Print([[maybe_unused]] const char *pszText) override {
217 }
218
226 void Init();
227
234 void Terminate();
235
242 void Reset();
243
251 void Load(float fTime);
252
266 void BuildTracks(float fStartTick,
267 float fEndTick,
268 const float *pMsPerTick,
269 const std::vector<int> &instruments,
270 const std::vector<int> &trackTypes,
271 int nOption,
272 const std::vector<bool> &unlocked);
273
280 void Unload();
281
290 int Poll(float fTime);
291
300 void Draw(float fTick);
301
310 float StartIntro(float fLength);
311
319 bool IsIntroFinished() const;
320
329
339 float StartOutro(float fLength);
340
349
357 void AddPreload(const char *pszFile);
358
367 AsyncStream *FindPreload(const char *pszFile);
368
377 int GetTrackInstrument(int nTrack);
378
387 int GetTrackType(int nTrack);
388
396 void HandleBeat(signed char nEvent);
397
405
414
422 bool IsIdle();
423
434 void SetEnergy(int nPlayer, float fEnergy);
435
444 void SetDying(int nPlayer, bool bDying);
445
457 void SetScore(int nPlayer, int nScore, int nMultiplier, int nPoints);
458
472 void SetStreakMultiplier(int nPlayer, int nMultiplier, int nNextMultiplier, bool bBoosted);
473
482 void ShowPendingPoints(int nPlayer, int nPoints);
483
491 void HidePendingPoints(int nPlayer);
492
502
511 void SetLeader(int nPlayer, bool bLeader);
512
520 void ShowSongPos(bool bShow);
521
529 void ShowTrackLabels(bool bShow);
530
540 void ShowPowerup(int nPlayer, int nPowerup);
541
550 void SetMultiplierEndTick(int nPlayer, float fTick);
551
562 void ShowSlowdown(int nPlayer, float fStartTick, float fEndTick, float fStopTick);
563
572 void ShowCripple(int nAttacker, int nVictim);
573
583 void ShowBump(int nAttacker, int nVictim, int nTrack);
584
598 void ShowMessage(const char *pszLine,
599 const char *pszSecondLine,
600 int nPlayer,
601 float fDurationMs,
602 float fScale,
603 float fOffsetY,
604 float fOffsetX);
605
614 void SetLyricText(const char *pszText, bool bFirstLine);
615
625 void ShowButtonIcon(int nLane, const Vector2 *pPosition, const Vector2 *pTarget);
626
635 void SetButtonIconHighlight(int nLane, int nHighlight);
636
644 void HideButtonIcon(int nLane);
645
654 void SetButtonIconGlyph(int nLane, const char *pszGlyph);
655
664 void ShowController(bool bShow, float fPosition);
665
673 void SetControllerHighlight(bool bHighlight);
674
683 void ShowControllerButton(int nButton, bool bShow);
684
694 void OpenDialog(const char *pszText, float fSize, int nPosition);
695
703
711 void SetLetterbox(bool bClosed);
712
720 void ShowBox(bool bShow);
721
729 void ShowArrow(bool bShow);
730
742 void SetBoxRect(float fX0, float fY0, float fX1, float fY1, float fDuration);
743
754 void SetArrowTarget(float fX, float fY, float fAngle, float fDuration);
755
764 void ShowStick(int nDirection, const Vector2 *pPosition);
765
772 void HideStick();
773
781 void SetSectionCount(int nCount);
782
791 void SetSectionLabel(int nIndex, const char *pszLabel);
792
800 void ShowSections(bool bShow);
801
809 void HighlightSection(int nIndex);
810
821 void SetRemixPanelText(int nPlayer, int nIndex, const char *pszText, RemixSubPanel ePanel);
822
832 void SelectRemixPanelEntry(int nPlayer, int nIndex, RemixSubPanel ePanel);
833
842 void FlashRemixPanel(int nPlayer, RemixSubPanel ePanel);
843
854 void SetRemixPanelLit(int nPlayer, int nIndex, int nLit, RemixSubPanel ePanel);
855
864 void ShowRemixPanel(int nPlayer, RemixSubPanel ePanel);
865
874 void ShowRemix(int nPlayer, bool bShow);
875
884 void SetFreqSize(int nPlayer, int nSize);
885
893 void SetWinner(int nPlayer);
894
904 void SetTrackPlayers(int nTrack, int nPlayers, const int *pPlayers);
905
914 void ShowPlayerOnTrack(int nPlayer, int nTrack);
915
924 void SetTrackInstrument(int nTrack, int nInstrument);
925
938 int nPlayer, int nType, int nInstrument, bool bVictory, int nReserved);
939
948 int GetViewedTrack(int nPlayer);
949
958 void SetFreestylePosition(int nPlayer, const Vector3 &position);
959
970 void SetFreestyleSecondPosition([[maybe_unused]] int nPlayer,
971 [[maybe_unused]] const Vector3 &position) {
972 }
973
983 void ShowScratchNote(int nPlayer, float fTick, float fDuration);
984
997 void PlaceGem(int nTrack, int nSlot, int nPlayer, float fTick, int nStyle, int nFlags);
998
1008 void RemoveGem(int nTrack, int nSlot, float fTick);
1009
1020 void ClearGems(int nTrack, bool bAll, float fStartTick, float fEndTick);
1021
1029 void HideNextPhrase(int nPlayer);
1030
1040 void ShowNextPhrase(int nTrack, float fTick, int nGemType);
1041
1050 void SetCatchMeter(int nPlayer, float fLevel);
1051
1066 void ShowGemResult(int nTrack, int nSlot, bool bHit, int nPlayer, int nFlags, float fTick);
1067
1078 void HitGem(int nPlayer, int nTrack, int nSlot, float fTick);
1079
1089 void SetFreestyle(int nPlayer, bool bActive, int nColumn);
1090
1098 void ResetFreestyle(int nPlayer);
1099
1112 void
1113 ShowCapture(int nPlayer, int nTrack, int nStyle, bool bQuiet, float fStartTick, float fEndTick);
1114
1124 void CompleteStage(int nPlayer, int nSection);
1125
1135 void ShowResult(bool bWon, int nPlayer, bool bUnlocked);
1136
1150 void ShowPhrase(int nPlayer,
1151 int nTrack,
1152 bool bPlayable,
1153 float fStartTick,
1154 float fEndTick,
1155 int nStyle,
1156 bool bSlide);
1157
1173 void SetBar(int nTrack,
1174 int nPlayer,
1175 int nOwner,
1176 bool bInSong,
1177 bool bVisible,
1178 int nFlags,
1179 signed char nRiff,
1180 float fTick,
1181 float fTicks);
1182
1191 void DimBar(int nTrack, float fTick);
1192
1201 void SetTrackEnabled(int nTrack, bool bEnabled);
1202
1216 void AddCheckpoint(const char *pszLabel, float fTick, float fOffset, float fScale);
1217
1225
1233 void SetOption(bool bOption);
1234
1243
1251 void SetScrollSpeed(float fSpeed);
1252
1262 void BlendToArenaPath(bool bArena);
1263
1272 void SetPlayerShown(int nPlayer, bool bShown);
1273
1282 void SetCatcherShown(int nPlayer, bool bShown);
1283
1292 void SetEnergyShown(int nPlayer, bool bShown);
1293
1302 void SetScoreShown(int nPlayer, bool bShown);
1303
1312 void SetLaneShown(int nPlayer, bool bShown);
1313
1321 void ShowHud(bool bShow);
1322
1330
1338 void ClearAll();
1339
1347 void SetActive(bool bActive);
1348
1357 const Color *GetInstrumentColor(int nInstrument) const;
1358
1367 const Color *GetInstrumentBgColor(int nInstrument) const;
1368
1377 const Color *GetPlayerColor(int nPlayer) const;
1378
1387 const Color *GetPlayerBgColor(int nPlayer) const;
1388
1395
1402
1409
1416
1424
1431 static float sEnergyHighZone;
1432
1439 static float sEnergyLowZone;
1440
1447 static int sInitialized;
1448
1455 static int sTerminated;
1456
1459 return mVortex.get();
1460 }
1461
1464 return mVortexAfterViews;
1465 }
1466
1472 void SetVortexAfterViews(int nValue) {
1473 mVortexAfterViews = nValue;
1474 }
1475
1477 const std::list<GfxLoader> &GetLoaders() const {
1478 return mLoaders;
1479 }
1480
1482 const std::list<std::unique_ptr<AsyncStream>> &GetPreloads() const {
1483 return mPreloads;
1484 }
1485
1487 int GetLoadStage() const {
1488 return mLoadStage;
1489 }
1490
1493 return mHudLoader;
1494 }
1495
1497 int GetLoaded() const {
1498 return mLoaded;
1499 }
1500
1502 float GetLoadStartMs() const {
1503 return mLoadStartMs;
1504 }
1505
1507 int GetState() const {
1508 return mState;
1509 }
1510
1512 float GetLastTick() const {
1513 return mLastTick;
1514 }
1515
1517 float GetLastTime() const {
1518 return mLastTime;
1519 }
1520
1522 float GetScrollSpeed() const {
1523 return mScrollSpeed;
1524 }
1525
1527 float GetInvScrollSpeed() const {
1528 return mInvScrollSpeed;
1529 }
1530
1532 float GetSongTicks() const {
1533 return mSongTicks;
1534 }
1535
1541 void SetSongTicks(float fValue) {
1542 mSongTicks = fValue;
1543 }
1544
1546 float GetCamPathScale() const {
1547 return mCamPathScale;
1548 }
1549
1551 int GetVictoryLap() const {
1552 return mVictoryLap;
1553 }
1554
1560 void SetVictoryLap(int nValue) {
1561 mVictoryLap = nValue;
1562 }
1563
1565 int GetArenaUnlocked() const {
1566 return mArenaUnlocked;
1567 }
1568
1570 int GetNoArena() const {
1571 return mNoArena;
1572 }
1573
1575 int GetMonkeyGems() const {
1576 return mMonkeyGems;
1577 }
1578
1580 int GetDrugs() const {
1581 return mDrugs;
1582 }
1583
1585 int GetBlackPanels() const {
1586 return mBlackPanels;
1587 }
1588
1590 int GetNoPanels() const {
1591 return mNoPanels;
1592 }
1593
1595 signed char GetTunnelShape() const {
1596 return mTunnelShape;
1597 }
1598
1600 int GetHudFlags() const {
1601 return mHudFlags;
1602 }
1603
1606 return mTunnel.get();
1607 }
1608
1611 return mOverlay.get();
1612 }
1613
1616 return mArena.get();
1617 }
1618
1621 return mTunnelView;
1622 }
1623
1626 return mMainView;
1627 }
1628
1630 const std::vector<LocalViews> &GetLocalViews() const {
1631 return mLocalViews;
1632 }
1633
1636 return mPanelView;
1637 }
1638
1640 const std::unique_ptr<Ship> *GetShips() const {
1641 return mShips;
1642 }
1643
1650 Ship *GetShip(int nPlayer) const {
1651 return mShips[nPlayer].get();
1652 }
1653
1655 int GetLeader() const {
1656 return mLeader;
1657 }
1658
1664 void SetLeader(int nValue) {
1665 mLeader = nValue;
1666 }
1667
1669 int GetWinnerDrawn() const {
1670 return mWinnerDrawn;
1671 }
1672
1678 void SetWinnerDrawn(int nValue) {
1679 mWinnerDrawn = nValue;
1680 }
1681
1683 int GetWinner() const {
1684 return mWinner;
1685 }
1686
1688 const float *GetMsPerTick() const {
1689 return mMsPerTick;
1690 }
1691
1693 const char *GetMultiplierFormat() const {
1694 return mMultiplierFormat;
1695 }
1696
1698 const std::list<DebugMsg> &GetDebugMsgs() const {
1699 return mDebugMsgs;
1700 }
1701
1703 const std::list<DebugMsg> &GetDebugMsgs2() const {
1704 return mDebugMsgs2;
1705 }
1706
1707private:
1716 void LoadConfig(bool bReload);
1717
1724 void Teardown();
1725
1734 void UpdateScrollSpeed(float fSongTicks);
1735
1743 void DrawLocalViews(bool bDrawVortex);
1744
1752 bool CheckLoaders();
1753
1761 void Show(DataArray *pCommand);
1762
1770 void Cheat(DataArray *pCommand);
1771
1779 void Debug(DataArray *pCommand);
1780
1787 static void DrawDrugs();
1788
1797 static void OnHandleBeat(DataArray *pCommand, void *pUserData);
1798
1807 static void OnDebug(DataArray *pCommand, void *pUserData);
1808
1817 static void OnCheat(DataArray *pCommand, void *pUserData);
1818
1827 static void OnShow(DataArray *pCommand, void *pUserData);
1828
1837 static void OnAddCheckpoint(DataArray *pCommand, void *pUserData);
1838
1847 static void OnViewPullback(DataArray *pCommand, void *pUserData);
1848
1857 static void OnButtonIcon(DataArray *pCommand, void *pUserData);
1858
1867 static void OnPlaceBox(DataArray *pCommand, void *pUserData);
1868
1877 static void OnPlaceArrow(DataArray *pCommand, void *pUserData);
1878
1887 static void OnSetJuice(DataArray *pCommand, void *pUserData);
1888
1897 static void OnController(DataArray *pCommand, void *pUserData);
1898
1907 static void OnDialog(DataArray *pCommand, void *pUserData);
1908
1917 static void OnShowMessage(DataArray *pCommand, void *pUserData);
1918
1927 static void OnStickDiagram(DataArray *pCommand, void *pUserData);
1928
1929 std::unique_ptr<Vortex> mVortex;
1930 int mVortexAfterViews;
1931 std::list<GfxLoader> mLoaders;
1932 std::list<std::unique_ptr<AsyncStream>> mPreloads;
1933 int mLoadStage;
1934 RndLoader *mHudLoader;
1935 int mLoaded;
1936 float mLoadStartMs;
1937 int mReserved34; // +0x34, cleared by the constructor and never read.
1938 int mState;
1939 float mLastTick;
1940 float mLastTime;
1941 float mScrollSpeed;
1942 float mInvScrollSpeed;
1943 float mSongTicks;
1944 float mCamPathScale;
1945 int mVictoryLap;
1946 int mArenaUnlocked;
1947 int mNoArena;
1948 int mMonkeyGems;
1949 int mDrugs;
1950 int mBlackPanels;
1951 int mNoPanels;
1952 signed char mTunnelShape;
1953 int mHudFlags;
1954 std::unique_ptr<GfxTunnel> mTunnel;
1955 std::unique_ptr<Overlay> mOverlay;
1956 std::unique_ptr<GfxArena> mArena;
1957 RndView *mTunnelView;
1958 RndView *mMainView;
1959 std::vector<LocalViews> mLocalViews;
1960 RndView *mPanelView;
1961 std::unique_ptr<Ship> mShips[kMaxPlayers];
1962 int mLeader;
1963 int mWinnerDrawn;
1964 int mWinner;
1965 const float *mMsPerTick;
1966 const char *mMultiplierFormat;
1967 std::list<DebugMsg> mDebugMsgs;
1968 std::list<DebugMsg> mDebugMsgs2;
1969};
1970
BinStream over a file read into a buffer in the background.
Definition asyncstream.h:16
Reference-counted array of script data nodes.
Definition dataarray.h:20
Stream for diagnostic text, written to standard output or to a log file.
Definition debug.h:18
Arena the play field flies through, with its camera path, its triggers, and the movies and the freque...
Definition gfxarena.h:28
int mDone
Definition gfxmanager.h:162
std::unique_ptr< RndLoader > mLoader
Definition gfxmanager.h:160
GfxLoader(bool bDone, bool bMergeAll, DataArray *pForceMerge)
Construct a loader that has not started.
void Start(const char *pszFile, int nFlags)
Start to load a file.
int ShouldLoad(RndObject *pExisting, const char *pszName, const char *pszClass) override
Decide whether the file loads an object.
void Finish()
Mark the load as finished and report the objects that were skipped.
int mMergeAll
Definition gfxmanager.h:163
String mSkipped
Definition gfxmanager.h:159
DataArray * mForceMerge
Definition gfxmanager.h:161
~GfxLoader() override
Destroy the loader.
Display of the play field and the heads-up display of every player.
Definition gfxmanager.h:29
void SetLeader(int nPlayer, bool bLeader)
Mark whether a player leads the score.
void ShowSongPos(bool bShow)
Show or hide the position in the song.
int GetNoArena() const
Definition gfxmanager.h:1570
void SetTrackInstrument(int nTrack, int nInstrument)
Show the instrument a track changed to, on the track and on every player on it.
void SetWinner(int nPlayer)
Mark the winner of a song.
RndView * GetPanelView() const
Definition gfxmanager.h:1635
void ShowNextPhrase(int nTrack, float fTick, int nGemType)
Point at the next phrase on a track.
void ShowPendingPoints(int nPlayer, int nPoints)
Show the points a player's current phrase is worth.
float GetInvScrollSpeed() const
Definition gfxmanager.h:1527
static Color sInstrumentColors[kNumInstruments]
The colours of the instruments, indexed by Instrument.
Definition gfxmanager.h:1394
int GetDrugs() const
Definition gfxmanager.h:1580
void HideButtonIcon(int nLane)
Hide the controller button icon of a lane.
void HitGem(int nPlayer, int nTrack, int nSlot, float fTick)
Show a player hitting a gem.
void SetOption(bool bOption)
Set the display option a solo player toggles.
void BuildTracks(float fStartTick, float fEndTick, const float *pMsPerTick, const std::vector< int > &instruments, const std::vector< int > &trackTypes, int nOption, const std::vector< bool > &unlocked)
Build the display of the tracks of a song.
void SetSectionCount(int nCount)
Set the number of sections of the song the remix display lists.
const Color * GetPlayerBgColor(int nPlayer) const
Report the background colour of a player, player_bg_color_<colour>.
void Terminate()
Tear down a loaded world, destroy the vortex, and unregister what Init() registered.
void SetBoxRect(float fX0, float fY0, float fX1, float fY1, float fDuration)
Move the highlight box.
float StartIntro(float fLength)
Start the run of the vortex into the play field.
int GetLeader() const
Definition gfxmanager.h:1655
Instrument
The instruments of the tracks, known to scripts as kDrum through kFX.
Definition gfxmanager.h:56
@ kInstrumentDrum
Definition gfxmanager.h:57
@ kNumInstruments
Definition gfxmanager.h:63
@ kInstrumentVocal
Definition gfxmanager.h:61
@ kInstrumentFx
Definition gfxmanager.h:62
@ kInstrumentGuitar
Definition gfxmanager.h:60
@ kInstrumentBass
Definition gfxmanager.h:58
@ kInstrumentSynth
Definition gfxmanager.h:59
void RemoveGem(int nTrack, int nSlot, float fTick)
Take a gem off the play field.
void BlendToArenaPath(bool bArena)
Blend the camera of the tunnel towards the arena path or back.
int GetVortexAfterViews() const
Definition gfxmanager.h:1463
void SetEnergyShown(int nPlayer, bool bShown)
Show or hide the energy meter.
int GetState() const
Definition gfxmanager.h:1507
void SetEnergy(int nPlayer, float fEnergy)
Show the energy of the play field of a solo game.
void SetControllerHighlight(bool bHighlight)
Highlight the diagram of the controller, or clear the highlight.
const std::list< GfxLoader > & GetLoaders() const
Definition gfxmanager.h:1477
void Draw(float fTick)
Draw the display.
const char * GetMultiplierFormat() const
Definition gfxmanager.h:1693
PlayerColor
The colours of the player slots.
Definition gfxmanager.h:67
@ kPlayerColorNull
Definition gfxmanager.h:72
@ kPlayerColorYellow
Definition gfxmanager.h:71
@ kPlayerColorUnknown
Definition gfxmanager.h:73
@ kPlayerColorPurple
Definition gfxmanager.h:69
@ kPlayerColorGreen
Definition gfxmanager.h:68
@ kNumPlayerColors
Definition gfxmanager.h:74
@ kPlayerColorRed
Definition gfxmanager.h:70
void ShowCripple(int nAttacker, int nVictim)
Show a player crippling another.
void AddCheckpoint(const char *pszLabel, float fTick, float fOffset, float fScale)
Place a checkpoint on the tracks and on the position in the song.
float GetCamPathScale() const
Definition gfxmanager.h:1546
void SetButtonIconGlyph(int nLane, const char *pszGlyph)
Set the glyph the controller button icon of a lane shows.
void SetPlayerShown(int nPlayer, bool bShown)
Show or hide the ship of a player.
static float sEnergyHighZone
The energy at which the top zone of the meter starts.
Definition gfxmanager.h:1431
int GetNoPanels() const
Definition gfxmanager.h:1590
Vortex * GetVortex() const
Definition gfxmanager.h:1458
void SetPendingPointsResult(int nPlayer, PendingPointsResult result)
Show what happened to a player's pending points.
void DimBar(int nTrack, float fTick)
Dim one bar of a track.
void SetFreestyle(int nPlayer, bool bActive, int nColumn)
Show or hide a player's freestyle effect.
void ShowRemix(int nPlayer, bool bShow)
Show or hide a player's remix menu.
AsyncStream * FindPreload(const char *pszFile)
Find the stream of a queued file and wait for it to finish.
void Print(const char *pszText) override
Discard text written to the display as a stream.
Definition gfxmanager.h:216
GfxManager()
Construct an idle display.
int IsBossJourneyDone()
Report whether the journey StartBossJourney() started is done.
void SetRemixPanelLit(int nPlayer, int nIndex, int nLit, RemixSubPanel ePanel)
Light or darken an entry of a remix sub-panel.
float GetLastTick() const
Definition gfxmanager.h:1512
GfxArena * GetArena() const
Definition gfxmanager.h:1615
void ClearGems(int nTrack, bool bAll, float fStartTick, float fEndTick)
Remove the gems of a track in a range of ticks.
void SetBar(int nTrack, int nPlayer, int nOwner, bool bInSong, bool bVisible, int nFlags, signed char nRiff, float fTick, float fTicks)
Set the look of one bar of a track.
static Color sPlayerBgColors[kNumPlayerColors]
The background colours of the player slots, indexed by PlayerColor.
Definition gfxmanager.h:1415
static Color sInstrumentBgColors[kNumInstruments]
The background colours of the instruments, indexed by Instrument.
Definition gfxmanager.h:1401
void SelectRemixPanelEntry(int nPlayer, int nIndex, RemixSubPanel ePanel)
Move the cursor of a remix sub-panel to an entry.
void ShowController(bool bShow, float fPosition)
Show or hide the diagram of the controller.
void ShowPlayerOnTrack(int nPlayer, int nTrack)
Move a player to a track.
static constexpr int kMaxPlayers
The number of ships the display has, one for each player.
Definition gfxmanager.h:53
const std::vector< LocalViews > & GetLocalViews() const
Definition gfxmanager.h:1630
void CompleteStage(int nPlayer, int nSection)
Rank the score bars at the end of a section and, in a solo game, fire the triggers that wait on it.
void ShowTrackLabels(bool bShow)
Show or hide the labels of the tracks.
void SetSectionLabel(int nIndex, const char *pszLabel)
Set the label of a section of the song.
void ShowPlayerOnFreestyleTrack(int nPlayer, int nType, int nInstrument, bool bVictory, int nReserved)
Show a player on the freestyle track.
static Color sPlayerColors[kNumPlayerColors]
The colours of the player slots, indexed by PlayerColor.
Definition gfxmanager.h:1408
void SetScore(int nPlayer, int nScore, int nMultiplier, int nPoints)
Show a player's score.
RndView * GetTunnelView() const
Definition gfxmanager.h:1620
Overlay * GetOverlay() const
Definition gfxmanager.h:1610
int GetWinner() const
Definition gfxmanager.h:1683
void ShowPhrase(int nPlayer, int nTrack, bool bPlayable, float fStartTick, float fEndTick, int nStyle, bool bSlide)
Show the bars of a phrase on a track, from the camera of a player.
LoadStage
The values of mLoadStage.
Definition gfxmanager.h:46
@ kLoadStageObjects
Definition gfxmanager.h:49
@ kLoadStageConfig
Definition gfxmanager.h:47
@ kLoadStageHud
Definition gfxmanager.h:48
void HideNextPhrase(int nPlayer)
Hide the pointers to the next phrase.
void Init()
Load the cache of textures, register the display script commands, and read the configuration.
void SetActive(bool bActive)
Start or stop the victory lap.
void ShowPowerup(int nPlayer, int nPowerup)
Show the power-up icon of a player.
void HandleBeat(signed char nEvent)
Run the arena effect of a beat event of the song.
void AddPreload(const char *pszFile)
Queue a file to stream before the world loads.
void CloseDialog()
Close the dialog box.
int GetWinnerDrawn() const
Definition gfxmanager.h:1669
int GetLoadStage() const
Definition gfxmanager.h:1487
Ship * GetShip(int nPlayer) const
Report the ship of a player.
Definition gfxmanager.h:1650
void SetArrowTarget(float fX, float fY, float fAngle, float fDuration)
Move the highlight arrow.
RndLoader * GetHudLoader() const
Definition gfxmanager.h:1492
void ShowHud(bool bShow)
Show or hide the display of the players' scores and meters over the tracks.
void SetTrackEnabled(int nTrack, bool bEnabled)
Show a track as enabled or disabled.
void ShowScratchNote(int nPlayer, float fTick, float fDuration)
Show a note a scratch plays on a player's track.
void StartBossJourney()
Start the journey to the boss arena that follows the boss unlock.
const Color * GetPlayerColor(int nPlayer) const
Report the colour of a player, player_color_<colour>.
void PlaceGem(int nTrack, int nSlot, int nPlayer, float fTick, int nStyle, int nFlags)
Place a gem on the play field.
void SetVortexAfterViews(int nValue)
Set whether the vortex draws after the head-up display.
Definition gfxmanager.h:1472
void ShowCapture(int nPlayer, int nTrack, int nStyle, bool bQuiet, float fStartTick, float fEndTick)
Show a player catching a phrase.
void ShowButtonIcon(int nLane, const Vector2 *pPosition, const Vector2 *pTarget)
Fly the controller button icon of a lane across the screen.
void ShowSections(bool bShow)
Show or hide the sections of the song.
int GetTrackInstrument(int nTrack)
Report the instrument of a track.
void SetRemixPanelText(int nPlayer, int nIndex, const char *pszText, RemixSubPanel ePanel)
Set the text of an entry of a remix sub-panel.
const float * GetMsPerTick() const
Definition gfxmanager.h:1688
int GetViewedTrack(int nPlayer)
Report the track the camera of a player shows.
void SetFreestyleSecondPosition(int nPlayer, const Vector3 &position)
Ignore a position of the second stick for a player's freestyle effect.
Definition gfxmanager.h:970
int GetLoaded() const
Definition gfxmanager.h:1497
int GetBlackPanels() const
Definition gfxmanager.h:1585
const std::list< DebugMsg > & GetDebugMsgs2() const
Definition gfxmanager.h:1703
void HideStick()
Hide the diagram of a stick.
void SetCatchMeter(int nPlayer, float fLevel)
Set the meter that shows how much of a phrase a player has caught.
GfxTunnel * GetTunnel() const
Definition gfxmanager.h:1605
int GetHudFlags() const
Definition gfxmanager.h:1600
RemixSubPanel
Sub-panel of a player's remix menu.
Definition gfxmanager.h:90
@ kRemixSubPanelMain
Definition gfxmanager.h:91
@ kRemixSubPanelTempo
Definition gfxmanager.h:97
@ kRemixSubPanelBoot
Definition gfxmanager.h:96
@ kRemixSubPanelPattern
Definition gfxmanager.h:92
@ kRemixSubPanelStutter
Definition gfxmanager.h:94
@ kRemixSubPanelEcho
Definition gfxmanager.h:95
@ kRemixSubPanelChorus
Definition gfxmanager.h:93
void ClearCheckpoints()
Remove every checkpoint.
float GetScrollSpeed() const
Definition gfxmanager.h:1522
State
The values of mState.
Definition gfxmanager.h:38
@ kStatePlaying
Definition gfxmanager.h:41
@ kStateIdle
Definition gfxmanager.h:39
@ kStateLoading
Definition gfxmanager.h:40
@ kStateUnloading
Definition gfxmanager.h:42
void SetButtonIconHighlight(int nLane, int nHighlight)
Highlight the controller button icon of a lane, or clear the highlight.
void ShowControllerButton(int nButton, bool bShow)
Show or hide one button of the diagram of the controller.
void OpenDialog(const char *pszText, float fSize, int nPosition)
Open the dialog box with a text.
void SetScoreShown(int nPlayer, bool bShown)
Show or hide the score of a player.
void ClearAll()
Clear every effect of the tunnel, reset the ships and the panels of the arena, and clear the start of...
bool IsIntroFinished() const
Report whether the run StartIntro() began has ended.
int GetVictoryLap() const
Definition gfxmanager.h:1551
float GetLoadStartMs() const
Definition gfxmanager.h:1502
int GetMonkeyGems() const
Definition gfxmanager.h:1575
static int sTerminated
Whether Terminate() ran.
Definition gfxmanager.h:1455
void SetLetterbox(bool bClosed)
Close or open the letterbox.
void ShowGemResult(int nTrack, int nSlot, bool bHit, int nPlayer, int nFlags, float fTick)
Show the result of a gem a player played or removed.
float GetLastTime() const
Definition gfxmanager.h:1517
bool IsOutroDone()
Report whether the run StartOutro() started is done.
void Unload()
Start changing the display back after the world was destroyed.
PollResult
The values of Poll() that WorldMgr tests.
Definition gfxmanager.h:32
@ kPollWorldReady
Definition gfxmanager.h:33
@ kPollUnloaded
Definition gfxmanager.h:34
void SetVictoryLap(int nValue)
Set whether the victory lap runs.
Definition gfxmanager.h:1560
void ShowArrow(bool bShow)
Show or hide the highlight arrow.
const std::list< DebugMsg > & GetDebugMsgs() const
Definition gfxmanager.h:1698
void SetTrackPlayers(int nTrack, int nPlayers, const int *pPlayers)
Show which players are on a track.
int GetTrackType(int nTrack)
Report the type of a track.
void SetFreqSize(int nPlayer, int nSize)
Set the size of the display of the tracks of a player.
void Load(float fTime)
Start to load the files of the display for a world.
bool IsIdle()
Report whether the tunnel finished its effects.
void ShowBump(int nAttacker, int nVictim, int nTrack)
Show a player knocking another off a track with a bumper.
void SetScrollSpeed(float fSpeed)
Set the scroll speed of the lanes.
PendingPointsResult
What SetPendingPointsResult() shows happened to a player's pending points.
Definition gfxmanager.h:78
@ kPendingPointsCaptured
Definition gfxmanager.h:80
@ kPendingPointsLost
Definition gfxmanager.h:81
@ kPendingPointsCleared
Definition gfxmanager.h:79
int Poll(float fTime)
Advance the display.
void HidePendingPoints(int nPlayer)
Hide a player's pending points.
float StartOutro(float fLength)
Start the run of the vortex at the end of a song.
float RestartIntro()
Start the run of the vortex out of the play field.
void SetFreestylePosition(int nPlayer, const Vector3 &position)
Move a player's freestyle effect to a position of the first stick.
void SetMultiplierEndTick(int nPlayer, float fTick)
Show the song tick a player's multiplier power-up ends at.
signed char GetTunnelShape() const
Definition gfxmanager.h:1595
void ShowRemixPanel(int nPlayer, RemixSubPanel ePanel)
Show one sub-panel of a player's remix menu.
~GfxManager() override
Release the display.
static int sInitialized
Whether Init() ran.
Definition gfxmanager.h:1447
void SetLeader(int nValue)
Set the player in the lead.
Definition gfxmanager.h:1664
void SetSongTicks(float fValue)
Set the length of the song in ticks.
Definition gfxmanager.h:1541
void ResetFreestyle(int nPlayer)
Return a player's freestyle effect to its idle state.
void ClearLanes()
Clear the highlights of the cameras and reset the head-up display.
float GetSongTicks() const
Definition gfxmanager.h:1532
void SetDying(int nPlayer, bool bDying)
Show whether a player runs out of energy.
bool GetOption()
Report the display option a solo player toggles.
const Color * GetInstrumentColor(int nInstrument) const
Report the colour of an instrument, inst_color_<instrument>.
void SetStreakMultiplier(int nPlayer, int nMultiplier, int nNextMultiplier, bool bBoosted)
Show a player's streak multiplier and the one the next capture earns.
void ShowResult(bool bWon, int nPlayer, bool bUnlocked)
Show the result of a song.
void SetLaneShown(int nPlayer, bool bShown)
Show or hide the avatar display of a player.
void SetCatcherShown(int nPlayer, bool bShown)
Show or hide the catcher of a player.
static float sEnergyLowZone
The energy at which the middle zone of the meter starts.
Definition gfxmanager.h:1439
void SetWinnerDrawn(int nValue)
Set whether the winner's avatar was drawn this frame.
Definition gfxmanager.h:1678
void FlashRemixPanel(int nPlayer, RemixSubPanel ePanel)
Flash the cursor of a remix sub-panel to confirm a choice.
int GetArenaUnlocked() const
Definition gfxmanager.h:1565
RndView * GetMainView() const
Definition gfxmanager.h:1625
void ShowBox(bool bShow)
Show or hide the highlight box.
void ShowStick(int nDirection, const Vector2 *pPosition)
Show the diagram of a stick.
const std::list< std::unique_ptr< AsyncStream > > & GetPreloads() const
Definition gfxmanager.h:1482
void HighlightSection(int nIndex)
Highlight a section of the song.
void Reset()
Return the display to its state with no world.
void ShowSlowdown(int nPlayer, float fStartTick, float fEndTick, float fStopTick)
Show the slowdown a player deployed.
static DataArray * sMergesAlwaysAllowed
The textures that may be skipped by a load without a report, merges_always_allowed.
Definition gfxmanager.h:1423
void ShowMessage(const char *pszLine, const char *pszSecondLine, int nPlayer, float fDurationMs, float fScale, float fOffsetY, float fOffsetX)
Show a message of one or two lines.
const std::unique_ptr< Ship > * GetShips() const
Definition gfxmanager.h:1640
const Color * GetInstrumentBgColor(int nInstrument) const
Report the background colour of an instrument, inst_bg_color_<instrument>.
void SetLyricText(const char *pszText, bool bFirstLine)
Show the lyric text.
Tunnel of tracks the players fly down, with the gems, the cameras of the players, and the effects dra...
Definition gfxtunnel.h:58
Head-up display of a game, drawn over the tunnel.
Definition overlay.h:26
PrnStream()
Construct a stream with a dump level of 0.
Definition prnstream.h:23
Interface a loader consults before it creates each object of its file.
Definition rndloader.h:35
Loader of one .rnd file, which reads the file over several frames.
Definition rndloader.h:21
Base of every object the renderer can load, resolve by name, and serialise.
Definition rndobject.h:20
View that shows the children of another view, its children owner, under its own transform and frame.
Definition rndview.h:27
Ship of one player, which rides the tracks of the tunnel and fires beams at the gems.
Definition ship.h:41
Growable text buffer that is also a PrnStream.
Definition string.h:19
Animation of the vortex the play field flies through on the way into and out of a song.
Definition vortex.h:17
GfxManager TheGfxManager
The display.
Linear colour with four float components.
Definition color.h:12
Message the display lists for debugging.
Definition gfxmanager.h:186
int mReserved00
Definition gfxmanager.h:187
int mReserved04
Definition gfxmanager.h:188
int mReserved1C
Definition gfxmanager.h:190
String mText
Definition gfxmanager.h:189
Views of the camera of one player, in the order they draw.
Definition gfxmanager.h:173
RndView * mPart2
Definition gfxmanager.h:176
RndView * mPart4
Definition gfxmanager.h:178
RndView * mArena
Definition gfxmanager.h:174
RndView * mPart3
Definition gfxmanager.h:177
RndView * mMain
Definition gfxmanager.h:175
Two-component vector, used for texture coordinates.
Definition vector2.h:12
Three-component vector, padded to a PlayStation 2 quadword.
Definition vector3.h:14