blob: fb656ed9b93a1d61786d77a4150d91a991f2778c (
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;
};
 |