resonance
1.0.1
Loading...
Searching...
No Matches
hudeffects.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <vector>
4
5
#include "
msg/barstatusmsg.h
"
6
7
namespace
Rnd
{
8
class
Font
;
9
class
Mat
;
10
class
Mesh
;
11
class
Text
;
12
}
// namespace Rnd
13
24
class
HudEffects
{
25
public
:
31
struct
Lamp
{
32
Rnd::Mesh
*
mMesh
;
33
Rnd::Text
*
mText
;
34
int
mKind
;
35
};
36
46
HudEffects
(
int
nIndex);
47
58
void
SetMask
(
BarStatusMsg::Effects
effects);
59
69
void
Select
(
int
nKind);
70
81
void
SetLit
(
int
nKind,
int
nLit);
82
83
private
:
84
Rnd::Mesh
*mWires;
// `<layout> fxwires<n>.mesh`
85
Rnd::Mat
*mLitMat;
// `HUD fx_on.mat`
86
Rnd::Mat
*mUnlitMat;
// `HUD fx_off.mat`
87
Rnd::Font
*mSelectedFont;
// `HUD fx_on.font`
88
Rnd::Font
*mPlainFont;
// `HUD fx_off.font`
89
std::vector<Lamp> mLamps;
90
};
barstatusmsg.h
BarStatusMsg::Effects
std::bitset< kEffectCount > Effects
One bit per effect kind.
Definition
barstatusmsg.h:45
HudEffects::Select
void Select(int nKind)
Show one kind's name in the selected font and every other name in the plain font.
HudEffects::HudEffects
HudEffects(int nIndex)
Resolve the shared materials and fonts and build one lamp per listed kind, all unlit.
HudEffects::SetMask
void SetMask(BarStatusMsg::Effects effects)
Light every lamp whose kind's bit is set in a mask, and darken the rest.
HudEffects::SetLit
void SetLit(int nKind, int nLit)
Light or darken the lamps of one kind.
Rnd::Font
Glyph atlas, either a host font description or a grid of cells inside a material texture.
Definition
font.h:59
Rnd::Mat
Surface description a Rnd::Mesh draws with.
Definition
mat.h:36
Rnd::Mesh
Indexed triangle mesh with one material.
Definition
mesh.h:46
Rnd::Text
Run of text drawn as a quad per glyph.
Definition
text.h:57
Rnd
The rendering engine.
Definition
animhelper.h:3
HudEffects::Lamp
One lamp, a plain twelve-byte record.
Definition
hudeffects.h:31
HudEffects::Lamp::mMesh
Rnd::Mesh * mMesh
Definition
hudeffects.h:32
HudEffects::Lamp::mText
Rnd::Text * mText
Definition
hudeffects.h:33
HudEffects::Lamp::mKind
int mKind
Definition
hudeffects.h:34
src
app
hudeffects.h
Generated by
1.15.0