palladium/include/pd/Sheet.hpp

25 lines
559 B
C++
Raw Normal View History

2024-07-12 19:48:34 +02:00
#pragma once
#include <pd/smart_ctor.hpp>
#include <pd/Texture.hpp>
#include <pd/Image.hpp>
#include <tex3ds.h>
2024-07-12 19:48:34 +02:00
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
private:
std::vector<Texture::Ref> sprites;
Tex3DS_Texture sheet;
C3D_Tex* sheet_tex = nullptr;
};
} // namespace Palladium