wavelength 1.0.0
Loading...
Searching...
No Matches
hudpoints.h
Go to the documentation of this file.
1#pragma once
2
3#include "app/rampanimator.h"
4#include "rnd/rndblur.h"
5#include "rnd/rndmat.h"
6#include "rnd/rndtext.h"
8#include "rnd/rndview.h"
9
17class HudPoints {
18public:
20 static constexpr float kExitRestFrame = 100.0f;
21
33 explicit HudPoints(int nIndex);
34
41 ~HudPoints() = default;
42
49 void Reset();
50
58 void SetEnabled(bool bEnabled);
59
68 void Poll(float fUnused, float fDelta);
69
78
87 void ShowPoints(int nPoints, const char *pszText);
88
98 void SetMultiplier(int nMultiplier, int bHot, const char *pszText);
99
107
115 void Flash(float fMinSwell);
116
127 void End(int nResult);
128
129private:
130 float mGlow;
131 float mSwell;
132 float mMinSwell;
133 int mMultiplier;
134 int mPoints;
135 int mPending;
136 int mHot;
137 int mEnabled;
138 RndView *mExitView;
139 RndText *mExitText;
140 RndBlur *mExitBlur;
141 RndText *mPointsText;
142 RndText *mMultText;
143 RndMat *mPointsMat;
144 RndMat *mMultMat;
145 RndMat *mColdMat;
146 RndMat *mHotMat;
147 RampAnimator mExit;
148};
void End(int nResult)
End the pending points: fly off the points multiplied, fly off the plain points, or clear them.
void Reset()
Empty the display.
void ShowPoints(int nPoints, const char *pszText)
Show the pending points.
void Poll(float fUnused, float fDelta)
Advance the flight of the exiting points and the glow of the pending points.
void SetMultiplier(int nMultiplier, int bHot, const char *pszText)
Show the multiplier of the pending points, or hide it for an empty text.
void HideMultiplier()
Hide the multiplier.
void SetEnabled(bool bEnabled)
Enable or disable the display, and empty it.
~HudPoints()=default
Destroy the display.
HudPoints(int nIndex)
Construct an empty display of a player.
static constexpr float kExitRestFrame
The frame of the exit animation at which it rests.
Definition hudpoints.h:20
void ScaleText(RndTransformable *pText)
Scale a text by the size of the points and the swell of the glow.
void Flash(float fMinSwell)
Flash the pending points, swelling them from a minimum size.
Value that moves toward a target along an interpolator, and poses an animation on the value.
Definition rampanimator.h:14
Motion trail that draws a mesh or a text again at the transforms it recently occupied.
Definition rndblur.h:21
Surface description: blending, lighting colours, culling, and a list of texture stages.
Definition rndmat.h:20
Text drawn with a bitmap font as a mesh of one quad per character.
Definition rndtext.h:27
Mix-in for an object with a local transform and a world transform derived from its parent's.
Definition rndtransformable.h:17
View that shows the children of another view, its children owner, under its own transform and frame.
Definition rndview.h:27