32 lines
605 B
C++
32 lines
605 B
C++
#pragma once
|
|
|
|
#include "Texture.hpp"
|
|
#include "Sprite.hpp"
|
|
|
|
namespace TSE
|
|
{
|
|
class TileSet
|
|
{
|
|
private:
|
|
Texture* tex = nullptr;
|
|
int resx = 0, resy = 0;
|
|
|
|
public:
|
|
TileSet(Texture* tex, int x, int y);
|
|
|
|
void SetCount(int x, int y);
|
|
void SetTexture(Texture* tex);
|
|
|
|
void GetSpriteAt(int x, int y, Sprite& s);
|
|
|
|
inline void SetCount(Vector2& v)
|
|
{
|
|
SetCount(v.x, v.y);
|
|
};
|
|
inline void GetSpriteAt(const Vector2& v, Sprite& s)
|
|
{
|
|
GetSpriteAt(v.x, v.y, s);
|
|
};
|
|
};
|
|
} // namespace TSE
|