summaryrefslogtreecommitdiffstats
path: root/src/esp.cpp
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-10-26 20:13:07 +0100
committersalmonik <salmonik@tuta.io>2026-10-26 20:13:07 +0100
commit300e7bc03b80dd4bac61330817bf6d9f04d4231b (patch)
tree7c35877edc58dae47045c33f8e1ff39182ab67cf /src/esp.cpp
parentFonts: bundle Liberation Sans and register it with fontconfig (diff)
downloadhl2h-300e7bc03b80dd4bac61330817bf6d9f04d4231b.tar.gz
hl2h-300e7bc03b80dd4bac61330817bf6d9f04d4231b.zip
Use one float-precision PI constant
- move PI_F into hl2h.h as constexpr 3.14159265f and remove the duplicated long-double-style literals from hl2h.cpp/esp.cpp - extra digits are compile-time only; float operations cost the same
Diffstat (limited to '')
-rw-r--r--src/esp.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/esp.cpp b/src/esp.cpp
index cd0ff36..7583f26 100644
--- a/src/esp.cpp
+++ b/src/esp.cpp
@@ -6,8 +6,6 @@
6#include <cstdlib> 6#include <cstdlib>
7#include <ctime> 7#include <ctime>
8 8
9static constexpr float PI_F = 3.14159265358979323846f;
10
11// ISurface slots (binary = SDK header + 4, disassembly-confirmed) 9// ISurface slots (binary = SDK header + 4, disassembly-confirmed)
12enum SurfSlot { 10enum SurfSlot {
13 SURF_DrawSetColor = 10, SURF_FilledRect = 12, SURF_OutlinedRect = 14, 11 SURF_DrawSetColor = 10, SURF_FilledRect = 12, SURF_OutlinedRect = 14,