This repository has been archived on 2022-10-27. You can view files and clone it, but cannot push or open issues or pull requests.
space-war/include/tinyengine/tilesheet.hpp

22 lines
349 B
C++

#pragma once
#include "texture.hpp"
struct Tile {
Texture* texture;
Rect rect;
Size size;
};
class TileSheet final {
public:
TileSheet(const std::string& filename, int x, int y);
const Tile GetTile(int x, int y);
Texture* GetTexture() { return texture_.get(); }
private:
Unique<Texture> texture_;
Size size_;
};