blob: e63329016b783a620fdd19e620d2e9e91254efae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#pragma once
#include "TextureMap.h"
#include <SDL_render.h>
#include <tmxlite/Map.hpp>
class MapLayer final{
public:
explicit MapLayer();
~MapLayer();
bool create(const tmx::Map&, std::uint32_t index, const std::vector<TextureMap*>& textures);
void draw(SDL_Renderer*) const;
private:
struct subset final
{
std::vector<SDL_Vertex> vertexData;
SDL_Texture* texture = nullptr;
};
std::vector<subset> m_subsets;
};
|