29 lines
734 B
C++
29 lines
734 B
C++
#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
|