add sounds, finish main game, add new textures, add tetromino preview, fix some bugs

This commit is contained in:
Rene Kievits
2024-10-15 05:14:41 +02:00
parent 24c8c3fe2c
commit f19f183686
21 changed files with 279 additions and 47 deletions

View File

@@ -35,7 +35,7 @@ private:
void drawGrid(const GameBoard& gameBoard);
void drawLockedBlocks(const GameBoard& gameBoard);
void drawTetromino(const Tetromino& tetromino);
void drawScoreboard(int score, int level);
void drawScoreboard(int score, int level, int lines);
TetrisAssets shapeToAsset(const TetrominoShape shape);
@@ -58,8 +58,10 @@ public:
bool loadTexture(const string& filePath, const TetrisAssets shape);
void renderTexture(const TetrisAssets shape, int x, int y, int width, int height);
void renderStartScreen( );
void renderGameOver(int score, int level);
void renderGameOver(int score, int level, int lines);
void renderText(string text, int x, int y, int size, SDL_Color color);
void renderRightAlignedText(const std::string& text, int x, int y, int fontSize, const SDL_Color& color);
void renderTetrominoPreview(const shared_ptr<Tetromino> nextTetromino);
const int getBlockSize( ) const;
void setBlockSize(int newBlockSize);