feat: implement textured line clear effects and refine UI alignment

- **Visual Effects**: Upgraded line clear particles to use the game's block texture instead of simple circles, matching the reference web game's aesthetic.
- **Particle Physics**: Tuned particle velocity, gravity, and fade rates for a more dynamic explosion effect.
- **Rendering Integration**: Updated [main.cpp](cci:7://file:///d:/Sites/Work/tetris/src/main.cpp:0:0-0:0) and `GameRenderer` to pass the block texture to the effect system and correctly trigger animations upon line completion.
- **Menu UI**: Fixed [MenuState](cci:1://file:///d:/Sites/Work/tetris/src/states/MenuState.cpp:19:0-19:55) layout calculations to use fixed logical dimensions (1200x1000), ensuring consistent centering and alignment of the logo, buttons, and settings icon across different window sizes.
- **Code Cleanup**: Refactored `PlayingState` to delegate effect triggering to the rendering layer where correct screen coordinates are available.
This commit is contained in:
2025-11-21 21:19:14 +01:00
parent b5ef9172b3
commit 66099809e0
47 changed files with 5547 additions and 267 deletions

View File

@ -28,22 +28,22 @@ find_package(SDL3_ttf CONFIG REQUIRED)
add_executable(tetris
src/main.cpp
src/gameplay/Game.cpp
src/gameplay/core/Game.cpp
src/core/GravityManager.cpp
src/core/StateManager.cpp
src/core/state/StateManager.cpp
# New core architecture classes
src/core/ApplicationManager.cpp
src/core/InputManager.cpp
src/core/AssetManager.cpp
src/core/application/ApplicationManager.cpp
src/core/input/InputManager.cpp
src/core/assets/AssetManager.cpp
src/core/GlobalState.cpp
src/graphics/RenderManager.cpp
src/graphics/renderers/RenderManager.cpp
src/persistence/Scores.cpp
src/graphics/Starfield.cpp
src/graphics/Starfield3D.cpp
src/graphics/Font.cpp
src/graphics/GameRenderer.cpp
src/graphics/effects/Starfield.cpp
src/graphics/effects/Starfield3D.cpp
src/graphics/ui/Font.cpp
src/graphics/renderers/GameRenderer.cpp
src/audio/Audio.cpp
src/gameplay/LineEffect.cpp
src/gameplay/effects/LineEffect.cpp
src/audio/SoundEffect.cpp
# State implementations (new)
src/states/LoadingState.cpp
@ -122,22 +122,22 @@ target_include_directories(tetris PRIVATE
# Experimental refactored version (for testing new architecture)
add_executable(tetris_refactored
src/main_new.cpp
src/gameplay/Game.cpp
src/gameplay/core/Game.cpp
src/core/GravityManager.cpp
src/core/StateManager.cpp
src/core/state/StateManager.cpp
# New core architecture classes
src/core/ApplicationManager.cpp
src/core/InputManager.cpp
src/core/AssetManager.cpp
src/core/application/ApplicationManager.cpp
src/core/input/InputManager.cpp
src/core/assets/AssetManager.cpp
src/core/GlobalState.cpp
src/graphics/RenderManager.cpp
src/graphics/renderers/RenderManager.cpp
src/persistence/Scores.cpp
src/graphics/Starfield.cpp
src/graphics/Starfield3D.cpp
src/graphics/Font.cpp
src/graphics/GameRenderer.cpp
src/graphics/effects/Starfield.cpp
src/graphics/effects/Starfield3D.cpp
src/graphics/ui/Font.cpp
src/graphics/renderers/GameRenderer.cpp
src/audio/Audio.cpp
src/gameplay/LineEffect.cpp
src/gameplay/effects/LineEffect.cpp
src/audio/SoundEffect.cpp
# State implementations
src/states/LoadingState.cpp