aligment fix in next block

This commit is contained in:
2025-12-07 13:00:05 +01:00
parent d2ba311c5f
commit 24779755a5
2 changed files with 141 additions and 16 deletions

View File

@ -48,12 +48,22 @@ public:
int selectedButton
);
// Public wrapper that forwards to the private tile-drawing helper. Use this if
// calling from non-member helper functions (e.g. visual effects) that cannot
// access private class members.
static void drawBlockTexturePublic(SDL_Renderer* renderer, SDL_Texture* blocksTex, float x, float y, float size, int blockType);
private:
// Helper functions for drawing game elements
static void drawBlockTexture(SDL_Renderer* renderer, SDL_Texture* blocksTex, float x, float y, float size, int blockType);
static void drawPiece(SDL_Renderer* renderer, SDL_Texture* blocksTex, const Game::Piece& piece, float ox, float oy, float tileSize, bool isGhost = false, float pixelOffsetX = 0.0f, float pixelOffsetY = 0.0f);
static void drawSmallPiece(SDL_Renderer* renderer, SDL_Texture* blocksTex, PieceType pieceType, float x, float y, float tileSize);
static void renderNextPanel(SDL_Renderer* renderer, FontAtlas* pixelFont, SDL_Texture* blocksTex, const Game::Piece& nextPiece, float panelX, float panelY, float panelW, float panelH, float tileSize);
// Transport/teleport visual effect: start a sci-fi "transport" animation moving
// a visual copy of `piece` from screen pixel origin (startX,startY) to
// target pixel origin (targetX,targetY). `tileSize` should be the same cell size
// used for the grid. Duration is seconds.
static void startTransportEffect(const Game::Piece& piece, float startX, float startY, float targetX, float targetY, float tileSize, float durationSeconds = 0.6f);
// Helper function for drawing rectangles
static void drawRect(SDL_Renderer* renderer, float x, float y, float w, float h, SDL_Color c);