aboutsummaryrefslogtreecommitdiff
path: root/resource-manager/map_asset.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-09-25 16:38:14 +0200
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-09-25 16:38:14 +0200
commita6f3b8c71513a1a7d416ec57627836ed4d9a7d94 (patch)
tree858d699b45b18baf8493b89ebac1ee6f5cfd3b4c /resource-manager/map_asset.cpp
parent9ab843567b27bd23eb7e0d2d4a48b78f7df93595 (diff)
fully working map,textures and spritesheets togheter
Diffstat (limited to 'resource-manager/map_asset.cpp')
-rw-r--r--resource-manager/map_asset.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/resource-manager/map_asset.cpp b/resource-manager/map_asset.cpp
index ab19e59..342edc3 100644
--- a/resource-manager/map_asset.cpp
+++ b/resource-manager/map_asset.cpp
@@ -8,6 +8,7 @@
#include <SDL_render.h>
#include <cassert>
#include <iostream>
+#include <iterator>
#include <ostream>
#include <string>
#include <tmxlite/Layer.hpp>
@@ -49,6 +50,8 @@ void Map::SetMapTextures(){
const auto& tileSets = m_Map.getTilesets();
assert(~tileSets.empty());
+ std::cout << "Processing SetMapTextures " << std::endl;
+
for (const auto& ts : tileSets ) {
m_MapTextures.emplace_back(new TextureMap);
if(!m_MapTextures.back()->loadFromFile(ts.getImagePath(), m_Renderer)){
@@ -60,6 +63,7 @@ void Map::SetMapTextures(){
void Map::SetMapLayers(){
const auto& mapLayers = m_Map.getLayers();
+ std::cout << "Processing SetMapLayers " << std::endl;
for(auto i = 0u; i < mapLayers.size(); ++i){
if (mapLayers[i]->getType() == tmx::Layer::Type::Tile) {
m_RenderLayers.emplace_back(new MapLayer);