#pragma once

#include <string>
#include <vector>
#include "image.h"
#include "resource_manager.h"
#include "vec2.h"

struct font;

struct tileset : resource {
	friend struct font;
	tileset(image const* image, vec2i tile_size);
	//tileset(std::string path, vec2i tile_size);
	tileset(resource_manager& rm, ini_category const* ini, std::string const& path, std::vector<uint8_t> const& data);

	image& operator[](int index);

	vec2i const& tile_size();
private:
	std::vector<image> _tiles;
	vec2i _tile_size;
};