Add track recovery, fix Arctic Land bridge & 9-map sim/render, harden security & optimize runtime

- Add manual track recovery (R / Backspace / Gamepad Back), document controls in README.md, fix Track 8 (Arctic Land) bridge jump/clearance physics, and fix Track 5 respawn invincibility & Track 6 off-track AI recovery across all 9 maps
- Verify 9-map sector morphing, combat (swept projectiles/LOS), pitstop chargers, and overpass/bridge surface sampling
- Fix Overpass Bottom (-Y) diagonal split and AO, add TerrainChunk frustum culling, O(1) 3D Classic uPaletteLut, atlas gutter/bleed UVs, cached uniform locations, and reusable render scratch buffers
- Harden VFS path traversal, RNC decompression bombs/truncated headers, asset/WAV parsers, GameConfig, save loaders, CLI args, and FLIC lifecycle
- Optimize 48 kHz OPL3/SoundFont synthesis (trig LUTs, cached envelopes/filters), 64-bit XMI ticks, and audio parameter/thread safety
- Add security, rendering, physics, and gameplay regression tests across all test suites
This commit is contained in:
Luxferre committed 2026-12-01 18:50:29 +02:00
1 parent 5c2ac8e70f
commit db788a2739
50 files changed
+3522 -1100

No files matched your search

+10 -1
View File
@@ -47,6 +47,7 @@ private:
struct Operator {
double phase = 0.0;
double phase_inc = 0.0;
double mult = 1.0;
float env = 0.0f; // 0..1 linear amplitude
float env_db = 96.0f; // 0 dB = peak, 96 dB = silence
EnvStage stage = EnvStage::Off;
@@ -54,6 +55,10 @@ private:
float decay_rate = 0.0f; // dB/s
float sustain_db = 12.0f; // dB attenuation
float release_rate = 0.0f; // dB/s
float attack_alpha = 0.0f;
float decay_mul = 1.0f;
float sustain_lin = 0.0f;
float release_mul = 1.0f;
float total_level = 1.0f; // linear scale from TL + KSL + vel
uint8_t wave = 0;
bool am = false;
@@ -85,14 +90,18 @@ private:
float expr_target = 1.0f;
float expr_smooth = 1.0f;
float pan = 0.0f; // -1..+1
float pan_l = 0.70710678f;
float pan_r = 0.70710678f;
float pitch_bend_semitones = 0.0f;
float bend_mul = 1.0f;
bool sustain_pedal = false;
};
void setup_operator(Operator& op, uint8_t reg20, uint8_t reg40, uint8_t reg60,
uint8_t reg80, uint8_t regE0, float base_freq, float midi_note,
float vel_scale, bool is_carrier);
void step_envelope(Operator& op, float dt);
void update_operator_rates(Operator& op);
void step_envelope(Operator& op);
static float eval_waveform(uint8_t wave, double phase);
void update_voice_freq(Voice& v);