group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
HudIcons.hpp
Go to the documentation of this file.
1
31
32#pragma once
33
34#include "HudTypes.hpp"
35
36class HudContext;
37
38namespace voidfall::icons
39{
40
41// ── Shared shape primitives ────────────────────────────────────────────────
42
45void filledPolygon(HudContext& ctx, const float* points, int n, HudColor color);
46
48void strokedPolygon(HudContext& ctx, const float* points, int n, float thickness, HudColor color);
49
51void filledCircle(HudContext& ctx, float cx, float cy, float r, int sides, HudColor color);
52
54void strokedCircle(HudContext& ctx, float cx, float cy, float r, float thickness, int sides, HudColor color);
55
56// ── Named glyphs (size = bounding-box edge length, in pixels) ─────────────
57
59void hp(HudContext& ctx, float x, float y, float size, HudColor color);
60
62void shield(HudContext& ctx, float x, float y, float size, HudColor color);
63
65void skull(HudContext& ctx, float x, float y, float size, HudColor color);
66
68void headshot(HudContext& ctx, float x, float y, float size, HudColor color);
69
71void gravityArrow(HudContext& ctx, float x, float y, float size, int direction, HudColor color);
72
74void fall(HudContext& ctx, float x, float y, float size, HudColor color);
75
77void grenade(HudContext& ctx, float x, float y, float size, HudColor color);
78
80void grapple(HudContext& ctx, float x, float y, float size, HudColor color);
81
83void tactical(HudContext& ctx, float x, float y, float size, HudColor color);
84
86void playerArrow(HudContext& ctx, float cx, float cy, float size, HudColor color);
87
89void enemyDiamond(HudContext& ctx, float cx, float cy, float size, HudColor color);
90
91} // namespace voidfall::icons
Shared types for the HUD system.
Accumulates HUD geometry during a frame for batch rendering.
Definition HudContext.hpp:18
Definition HudIcons.cpp:13
void shield(HudContext &ctx, float x, float y, float size, HudColor color)
Shield silhouette: top-flat pentagon with curved bottom (stroked).
Definition HudIcons.cpp:118
void grapple(HudContext &ctx, float x, float y, float size, HudColor color)
Grapple hook: hook shape + diagonal rope (stroked).
Definition HudIcons.cpp:221
void gravityArrow(HudContext &ctx, float x, float y, float size, int direction, HudColor color)
Gravity arrow inside a small dial. direction is 0=down, 1=left, 2=up, 3=right.
Definition HudIcons.cpp:165
void filledPolygon(HudContext &ctx, const float *points, int n, HudColor color)
Fill a closed polygon with n points using a triangle fan from the first vertex.
Definition HudIcons.cpp:30
void headshot(HudContext &ctx, float x, float y, float size, HudColor color)
Headshot reticle: circle + center pip + line below.
Definition HudIcons.cpp:154
void hp(HudContext &ctx, float x, float y, float size, HudColor color)
Medical-cross HP glyph (filled).
Definition HudIcons.cpp:108
void fall(HudContext &ctx, float x, float y, float size, HudColor color)
Upward filled triangle (used for "FALL" weapon kill icon).
Definition HudIcons.cpp:194
void grenade(HudContext &ctx, float x, float y, float size, HudColor color)
Grenade: round body + collar + lever (filled silhouette).
Definition HudIcons.cpp:208
void tactical(HudContext &ctx, float x, float y, float size, HudColor color)
Tactical: dotted ring + center pip (stroked).
Definition HudIcons.cpp:271
void enemyDiamond(HudContext &ctx, float cx, float cy, float size, HudColor color)
Diamond marker for enemy positions on the minimap.
Definition HudIcons.cpp:292
void strokedPolygon(HudContext &ctx, const float *points, int n, float thickness, HudColor color)
Stroke a closed polygon (connects last point back to first).
Definition HudIcons.cpp:46
void filledCircle(HudContext &ctx, float cx, float cy, float r, int sides, HudColor color)
Fill a regular polygon approximating a circle.
Definition HudIcons.cpp:69
void strokedCircle(HudContext &ctx, float cx, float cy, float r, float thickness, int sides, HudColor color)
Stroke a circle as a sides-segment ring.
Definition HudIcons.cpp:85
void playerArrow(HudContext &ctx, float cx, float cy, float size, HudColor color)
Player arrow chevron used on the minimap (filled, with notch).
Definition HudIcons.cpp:280
void skull(HudContext &ctx, float x, float y, float size, HudColor color)
Skull silhouette (filled).
Definition HudIcons.cpp:140