Files
top-octane/src/assets/sprites.hpp
T

29 lines
734 B
C++
Raw Normal View History

2026-11-30 22:31:51 +02:00
#pragma once
#include "assets/palette.hpp"
#include "core/vfs.hpp"
#include <cstdint>
#include <string>
#include <vector>
namespace top_octane::assets {
struct SpriteImage {
int width = 0;
int height = 0;
std::vector<uint8_t> rgba; // width * height * 4
};
struct SpriteBank {
std::vector<SpriteImage> sprites;
bool load(const Vfs& vfs, const std::string& dat_path, const std::string& tab_path,
const Palette& pal);
};
// Loads a raw indexed full-screen image (e.g., TITLE.DAT 320x200 or OSCR0-1.DAT 640x480)
bool load_raw_screen(const Vfs& vfs, const std::string& path, int width, int height,
const Palette& pal, SpriteImage& out_img);
} // namespace top_octane::assets