Add pitstop audio cue, original explosions/smoke, authentic HUD, and Modern lighting/shadows
This commit is contained in:
1 parent
3a377b0534
commit
197bfbc973
21 files changed
+1927
-246
No files matched your search
@@ -38,6 +38,7 @@ enum class SimSoundCue {
|
||||
Stunt360,
|
||||
Stunt720,
|
||||
SwitchTrigger,
|
||||
PitComplete,
|
||||
};
|
||||
|
||||
struct SimEvent {
|
||||
@@ -81,6 +82,13 @@ struct PropObject {
|
||||
float respawn_timer = 0.0f;
|
||||
};
|
||||
|
||||
enum class ParticleKind : uint8_t {
|
||||
AdditiveGlow = 0, // Booster flare, minigun tracers, sparks
|
||||
Fireball = 1, // Expanding turbulent fireball (white-yellow -> orange -> crimson)
|
||||
Smoke = 2, // Alpha-blended billowing volumetric smoke cloud
|
||||
Debris = 3, // Alpha-blended rotating charred shrapnel affected by gravity
|
||||
};
|
||||
|
||||
struct ParticleBurst {
|
||||
Vec3 pos{0, 0, 0};
|
||||
Vec3 vel{0, 0, 0};
|
||||
@@ -88,6 +96,13 @@ struct ParticleBurst {
|
||||
Vec4 color{1.0f, 0.7f, 0.2f, 1.0f};
|
||||
float life = 0.5f;
|
||||
float max_life = 0.5f;
|
||||
ParticleKind kind = ParticleKind::AdditiveGlow;
|
||||
float start_size = 0.0f; // 0 => use initial size
|
||||
float end_size = 0.0f; // 0 => keep constant size
|
||||
float drag = 0.0f; // velocity damping (1/sec)
|
||||
float gravity = 0.0f; // vertical acceleration (+ rises, - falls)
|
||||
float seed = 0.0f; // procedural puff variation [0..1]
|
||||
float base_alpha = -1.0f; // <0 => initialized from color.w on first update
|
||||
};
|
||||
|
||||
struct CloneRecording {
|
||||
@@ -131,6 +146,8 @@ struct RaceSetup {
|
||||
|
||||
class RaceSim {
|
||||
public:
|
||||
static constexpr size_t kMaxParticles = 900;
|
||||
|
||||
bool start_race(const assets::LevelData& level, const RaceSetup& setup,
|
||||
const CloneRecording* existing_clone = nullptr);
|
||||
|
||||
@@ -192,6 +209,7 @@ private:
|
||||
void activate_group(uint16_t group, int actor_player, bool allow_banner, bool fast_morph = false);
|
||||
void update_standings();
|
||||
void finalize_unfinished_times(const std::vector<size_t>& order);
|
||||
void update_steam_vents(float dt);
|
||||
void update_particles(float dt);
|
||||
|
||||
RaceSetup setup_{};
|
||||
@@ -218,6 +236,8 @@ private:
|
||||
std::vector<DirtyRect> dirty_rects_;
|
||||
bool columns_dirty_ = false;
|
||||
float morph_banner_cd_ = 0.0f;
|
||||
std::vector<float> steam_vent_timers_;
|
||||
uint32_t fx_tick_ = 0;
|
||||
|
||||
// Clone race recording & playback
|
||||
CloneRecording recording_;
|
||||
|
||||
Reference in new issue
Block a user