feat(renderer): polish gameplay visuals — transport, starfield, sparkles, smooth piece motion

Add transport/transfer effect for NEXT → grid with cross-fade and preview swap
Integrate in-grid Starfield3D with magnet targeting tied to active piece
Spawn ambient sparkles and impact sparks (hard-drop crackle + burst on expiry)
Smooth horizontal/fall interpolation for active piece (configurable smooth scroll)
Refactor next panel / preview rendering and connector drawing
Tweak stats/score panel layout, progress bars and typography for compact view
Preserve safe alpha handling and restore renderer blend/scale state after overlays
This commit is contained in:
2025-12-08 20:43:51 +01:00
parent 815913b15b
commit 57eac01bcb
8 changed files with 293 additions and 48 deletions

View File

@ -69,6 +69,8 @@ bool Settings::load() {
} else if (currentSection == "Gameplay") {
if (key == "SmoothScroll") {
m_smoothScrollEnabled = (value == "1" || value == "true" || value == "True");
} else if (key == "UpRotateClockwise") {
m_upRotateClockwise = (value == "1" || value == "true" || value == "True");
}
} else if (currentSection == "Player") {
if (key == "Name") {
@ -106,6 +108,7 @@ bool Settings::save() {
file << "[Gameplay]\n";
file << "SmoothScroll=" << (m_smoothScrollEnabled ? "1" : "0") << "\n\n";
file << "UpRotateClockwise=" << (m_upRotateClockwise ? "1" : "0") << "\n\n";
file << "[Player]\n";
file << "Name=" << m_playerName << "\n\n";

View File

@ -31,6 +31,10 @@ public:
bool isSmoothScrollEnabled() const { return m_smoothScrollEnabled; }
void setSmoothScrollEnabled(bool value) { m_smoothScrollEnabled = value; }
// Rotation behavior: should pressing UP rotate clockwise? (true = clockwise)
bool isUpRotateClockwise() const { return m_upRotateClockwise; }
void setUpRotateClockwise(bool value) { m_upRotateClockwise = value; }
const std::string& getPlayerName() const { return m_playerName; }
void setPlayerName(const std::string& name) { m_playerName = name; }
@ -50,4 +54,6 @@ private:
bool m_debugEnabled = false;
bool m_smoothScrollEnabled = true;
std::string m_playerName = "Player";
// Default: UP rotates clockwise
bool m_upRotateClockwise = true;
};