summaryrefslogtreecommitdiff
path: root/src/overlay.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/overlay.h')
-rw-r--r--src/overlay.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/overlay.h b/src/overlay.h
new file mode 100644
index 0000000..c690c64
--- /dev/null
+++ b/src/overlay.h
@@ -0,0 +1,46 @@
+#pragma once
+#include "udp.h"
+#include "config.h"
+
+struct OVERLAY_DATA {
+ TELEMETRY telem;
+ CONFIG cfg;
+ F64 disp_rpm, peak_rpm;
+ F64 disp_boost_bar, peak_boost_bar;
+ F64 abs_until, tcs_until;
+ F64 last_power;
+ F64 last_acc;
+ F64 last_rpm;
+ F64 t_prev;
+ F32 last_pos_x, last_pos_y, last_pos_z;
+ F32 tele_pos_x, tele_pos_y, tele_pos_z;
+ F32 vel_x, vel_y, vel_z;
+ U32 teleported;
+ U8 was_race_on;
+ I32 last_brake, last_hb;
+ I32 frame;
+
+ F32 valid_redline;
+ I32 valid_shift;
+ I32 shift_rpm;
+ I32 last_gear;
+ I32 last_valid_gear;
+
+ U8 was_live;
+ F64 live_since;
+ F64 boost_since;
+ I32 car_ordinal;
+ F32 car_rpm_max;
+ I32 prev_race_on;
+ U8 lc_armed;
+
+ F64 prev_disp_rpm, rpm_vel;
+ F64 prev_disp_bar, bar_vel;
+
+};
+
+OVERLAY_DATA* overlay_inst();
+U8 overlay_live( OVERLAY_DATA* d, F64 now );
+void overlay_update( OVERLAY_DATA *d, F64 now, F64 dt );
+U8 overlay_visible( OVERLAY_DATA *d, F64 now );
+void overlay_build_cluster( OVERLAY_DATA* d, class GAUGE_RENDERER* gauge, F32 w, F32 h, F64 now );