2024-07-12 19:48:34 +02:00
|
|
|
#pragma once
|
2024-08-30 14:54:49 +02:00
|
|
|
#include <tex3ds.h>
|
2024-07-12 19:48:34 +02:00
|
|
|
|
2024-12-08 19:26:21 +01:00
|
|
|
#include <pd/Image.hpp>
|
|
|
|
#include <pd/Texture.hpp>
|
|
|
|
#include <pd/smart_ctor.hpp>
|
|
|
|
|
|
|
|
namespace Palladium {
|
|
|
|
class Sheet {
|
|
|
|
public:
|
|
|
|
Sheet() = default;
|
|
|
|
~Sheet() = default;
|
|
|
|
PD_SMART_CTOR(Sheet)
|
|
|
|
void LoadT3X(const std::string& path);
|
|
|
|
Texture::Ref Get(int idx);
|
|
|
|
Image::Ref GetImage(int idx);
|
2024-07-12 19:48:34 +02:00
|
|
|
|
2024-12-08 19:26:21 +01:00
|
|
|
private:
|
|
|
|
std::vector<Texture::Ref> sprites;
|
|
|
|
Tex3DS_Texture sheet;
|
|
|
|
C3D_Tex* sheet_tex = nullptr;
|
|
|
|
};
|
|
|
|
} // namespace Palladium
|