diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-22 12:32:22 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-22 12:32:22 +0100 |
commit | 61148c757a1f742ff09e40e5347e74e638c7371c (patch) | |
tree | a2e40998981fa6f12430d2a1254250219f30d44f /mwe/resource-manager/map_layer.cpp | |
parent | e2162171c7ab72f450f73a0908946aa4a4dee5ee (diff) |
update clang-format options
Diffstat (limited to 'mwe/resource-manager/map_layer.cpp')
-rw-r--r-- | mwe/resource-manager/map_layer.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/mwe/resource-manager/map_layer.cpp b/mwe/resource-manager/map_layer.cpp index 17792a6..82f8f24 100644 --- a/mwe/resource-manager/map_layer.cpp +++ b/mwe/resource-manager/map_layer.cpp @@ -9,8 +9,9 @@ MapLayer::MapLayer() {} MapLayer::~MapLayer() { m_subsets.clear(); } -bool MapLayer::create(const tmx::Map & map, std::uint32_t layerIndex, - const std::vector<TextureMap *> & textures) { +bool MapLayer::create( + const tmx::Map & map, std::uint32_t layerIndex, const std::vector<TextureMap *> & textures +) { const auto & layers = map.getLayers(); assert(layers[layerIndex]->getType() == tmx::Layer::Type::Tile); @@ -68,9 +69,10 @@ bool MapLayer::create(const tmx::Map & map, std::uint32_t layerIndex, verts.emplace_back(vert); vert = {{tilePosX + mapTileSize.x, tilePosY}, vertColour, {u + uNorm, v}}; verts.emplace_back(vert); - vert = {{tilePosX + mapTileSize.x, tilePosY + mapTileSize.y}, - vertColour, - {u + uNorm, v + vNorm}}; + vert + = {{tilePosX + mapTileSize.x, tilePosY + mapTileSize.y}, + vertColour, + {u + uNorm, v + vNorm}}; verts.emplace_back(vert); } } @@ -89,7 +91,9 @@ bool MapLayer::create(const tmx::Map & map, std::uint32_t layerIndex, void MapLayer::draw(SDL_Renderer * renderer) const { assert(renderer); for (const auto & s : m_subsets) { - SDL_RenderGeometry(renderer, s.texture, s.vertexData.data(), - static_cast<std::int32_t>(s.vertexData.size()), nullptr, 0); + SDL_RenderGeometry( + renderer, s.texture, s.vertexData.data(), + static_cast<std::int32_t>(s.vertexData.size()), nullptr, 0 + ); } } |