This commit is contained in:
2026-05-13 07:58:59 +02:00
parent d9769bdbbb
commit 892d8f22eb
18 changed files with 242 additions and 77 deletions

View File

@@ -46,7 +46,7 @@ namespace Game::Object {
SDL_GetTextureSize(mTex->getSDLTexture(), &w, &h);
SDL_FRect dst;
dst.w = w * mTransform.scaleX * UNIVERSAL_SCALE_COEFFICIENT; // 1.f is HUGE, so this is just a constant to make the default scale more reasonable
dst.w = w * mTransform.scaleX * UNIVERSAL_SCALE_COEFFICIENT;
dst.h = h * mTransform.scaleY * UNIVERSAL_SCALE_COEFFICIENT;
// Top-left origin; Account for camera position (center the camera on the screen)
@@ -73,7 +73,7 @@ namespace Game::Object {
SDL_GetTextureSize(mTex->getSDLTexture(), &tileW, &tileH);
SDL_FRect dst;
dst.w = tileW * mTiledScale; // Tile size is the original texture size multiplied by the universal scale coefficient (ignoring the entity's scale, since that only affects how many times the texture is tiled, not the size of each tile)
dst.w = tileW * mTiledScale;
dst.h = tileH * mTiledScale;
// Top-left origin; Account for camera position (center the camera on the screen)