Added new level sound
This commit is contained in:
@ -74,6 +74,13 @@ public:
|
||||
double getFallAccumulator() const { return fallAcc; } // Debug: time accumulated toward next drop
|
||||
void setLevelGravityMultiplier(int level, double m);
|
||||
|
||||
// Visual effect hooks
|
||||
void updateVisualEffects(double frameMs);
|
||||
bool hasHardDropShake() const { return hardDropShakeTimerMs > 0.0; }
|
||||
double hardDropShakeStrength() const;
|
||||
const std::vector<SDL_Point>& getHardDropCells() const { return hardDropCells; }
|
||||
uint32_t getHardDropFxId() const { return hardDropFxId; }
|
||||
|
||||
private:
|
||||
std::array<int, COLS*ROWS> board{}; // 0 empty else color index
|
||||
Piece cur{}, hold{}, nextPiece{}; // current, held & next piece
|
||||
@ -109,6 +116,12 @@ private:
|
||||
// Backwards-compatible accessors (delegate to gravityMgr)
|
||||
double computeGravityMsForLevel(int level) const;
|
||||
|
||||
// Impact FX timers
|
||||
double hardDropShakeTimerMs{0.0};
|
||||
static constexpr double HARD_DROP_SHAKE_DURATION_MS = 320.0;
|
||||
std::vector<SDL_Point> hardDropCells;
|
||||
uint32_t hardDropFxId{0};
|
||||
|
||||
// Internal helpers ----------------------------------------------------
|
||||
void refillBag();
|
||||
void spawn();
|
||||
|
||||
Reference in New Issue
Block a user