small fixes

This commit is contained in:
Asuro
2025-05-16 00:26:19 +02:00
parent 0d91ec1ebb
commit 79fe91981b
4 changed files with 5 additions and 3 deletions

View File

@@ -230,6 +230,7 @@ namespace Gen
{
)END";
// TODO: Sizeof is wrong!! we don't use padding!!
constexpr char MetadataTypeEntry7[] = R"END( TypeDef{sizeof(%s), %u, "%s", %u, {%s}, {%s}, {%s}},
)END";
constexpr char MetadataEnd1[] = R"END( };

View File

@@ -6,6 +6,7 @@
#include "Level.h"
#include "Log.h"
#include "Puzzle.h"
#include "bx/bx.h"
#include "rendering/Rendering.h"
#include "SDL3/SDL_mouse.h"
@@ -437,7 +438,7 @@ namespace Game
Vec3 cameraPos = camTransform.Position;
// TODO: disable warning & check if parentheses make sense like this
Vec2 uiOffset = Vec2{static_cast<float>(Data.WidthTiles / Puzzle::Config::CardSize - 1),
Vec2 uiOffset = Vec2{static_cast<float>(Data.WidthTiles / Puzzle::Config::CardSize) - 1,
static_cast<float>(Data.HeightTiles / Puzzle::Config::CardSize) - 1};
uiOffset *= -UICardOffset * 0.5f;
@@ -558,7 +559,7 @@ namespace Game
{
auto& cover =
level.PuzzleTileCovers.Get(CoverHandles[cardIdx * Puzzle::Config::MaxCoversInTile + i]);
cover.EData.Visible = true;
cover.EData.Visible = IsActive;
cover.EData.ModelH = staticCard.Sockets[i].Model;
cover.EData.Transform = tile.EData.Transform;
Gen::TranslateLocal(cover.EData.Transform, model.Sockets[i].Pos);

Binary file not shown.

Binary file not shown.