added stars to gameplay grid
This commit is contained in:
@ -6,6 +6,10 @@
|
||||
#include <array>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <random>
|
||||
#include <vector>
|
||||
|
||||
namespace {
|
||||
|
||||
// Color constants (copied from main.cpp)
|
||||
static const SDL_Color COLORS[] = {
|
||||
@ -217,6 +221,12 @@ void GameRenderer::renderPlayingState(
|
||||
float lineY = gridY + y * finalBlockSize;
|
||||
SDL_RenderLine(renderer, gridX, lineY, gridX + GRID_W, lineY);
|
||||
}
|
||||
|
||||
Uint64 nowTicks = SDL_GetTicks();
|
||||
float deltaSeconds = (g_lastSparkTick == 0) ? (1.0f / 60.0f) : static_cast<float>(nowTicks - g_lastSparkTick) / 1000.0f;
|
||||
g_lastSparkTick = nowTicks;
|
||||
updateSparks(std::max(0.0f, deltaSeconds));
|
||||
drawSparks(renderer, gridX, gridY, finalBlockSize);
|
||||
|
||||
// Draw block statistics panel border
|
||||
drawRectWithOffset(statsX - 3 - contentOffsetX, statsY - 3 - contentOffsetY, statsW + 6, statsH + 6, {100, 120, 200, 255});
|
||||
|
||||
Reference in New Issue
Block a user