added rest of basics in TSE_Core
This commit is contained in:
31
TSE_Core/src/elements/TileSet.hpp
Normal file
31
TSE_Core/src/elements/TileSet.hpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#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(Vector2& v, Sprite& s)
|
||||
{
|
||||
GetSpriteAt(v.x, v.y, s);
|
||||
};
|
||||
};
|
||||
} // namespace TSE
|
||||
Reference in New Issue
Block a user