blob: 2adbc0ff782e49739443e0da3e83bdceecfe6f06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#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;
};
|