yaze
0.3.2
Link to the Past ROM Editor
Loading...
Searching...
No Matches
sprite_asset.h
Go to the documentation of this file.
1
#ifndef YAZE_CORE_SPRITE_ASSET_H_
2
#define YAZE_CORE_SPRITE_ASSET_H_
3
4
#include <array>
5
#include <cstdint>
6
#include <string>
7
8
#include "
core/sprite_behavior.h
"
9
10
namespace
yaze::project
{
11
struct
SpritePaletteBinding
{
12
std::string
group
=
"auto"
;
13
int
index
= 0;
14
};
15
16
// One 128x32 slot of decoded sprite pixels. File and ROM offsets address raw
17
// SNES planar bytes, never compressed streams or an inferred expansion table.
18
struct
SpriteGraphicsSource
{
19
std::string
kind
=
"sheet"
;
// sheet, bin, raw_rom
20
std::string
path
;
// Project-relative or absolute BIN path.
21
uint32_t
offset
= 0;
// Byte offset; raw_rom uses headerless PC offsets.
22
int
bpp
= 3;
23
};
24
25
// Stored in the project, leaving the upstream ZSM binary format unchanged.
26
// zsm_path identifies the saved asset; catalog_key is optional provenance.
27
struct
SpriteAssetBinding
{
28
std::string
zsm_path
;
29
std::string
catalog_key
;
30
std::string
draw_adapter
=
"literal_v1"
;
31
std::string
source_path
;
32
std::string
source_label
;
33
std::string
source_sha256
;
34
std::array<uint8_t, 8>
sheets
= {0, 10, 6, 7, 0, 0, 0, 0};
35
std::array<SpriteGraphicsSource, 8>
graphics_sources
;
36
std::array<SpritePaletteBinding, 8>
palette_rows
;
37
SpriteBehavior
behavior
;
38
};
39
40
}
// namespace yaze::project
41
#endif
sprite_behavior.h
yaze::project
Definition
feature_flag_editor_panel.h:10
yaze::project::SpriteAssetBinding
Definition
sprite_asset.h:27
yaze::project::SpriteAssetBinding::source_label
std::string source_label
Definition
sprite_asset.h:32
yaze::project::SpriteAssetBinding::behavior
SpriteBehavior behavior
Definition
sprite_asset.h:37
yaze::project::SpriteAssetBinding::sheets
std::array< uint8_t, 8 > sheets
Definition
sprite_asset.h:34
yaze::project::SpriteAssetBinding::source_path
std::string source_path
Definition
sprite_asset.h:31
yaze::project::SpriteAssetBinding::palette_rows
std::array< SpritePaletteBinding, 8 > palette_rows
Definition
sprite_asset.h:36
yaze::project::SpriteAssetBinding::source_sha256
std::string source_sha256
Definition
sprite_asset.h:33
yaze::project::SpriteAssetBinding::draw_adapter
std::string draw_adapter
Definition
sprite_asset.h:30
yaze::project::SpriteAssetBinding::catalog_key
std::string catalog_key
Definition
sprite_asset.h:29
yaze::project::SpriteAssetBinding::zsm_path
std::string zsm_path
Definition
sprite_asset.h:28
yaze::project::SpriteAssetBinding::graphics_sources
std::array< SpriteGraphicsSource, 8 > graphics_sources
Definition
sprite_asset.h:35
yaze::project::SpriteBehavior
Definition
sprite_behavior.h:24
yaze::project::SpriteGraphicsSource
Definition
sprite_asset.h:18
yaze::project::SpriteGraphicsSource::offset
uint32_t offset
Definition
sprite_asset.h:21
yaze::project::SpriteGraphicsSource::path
std::string path
Definition
sprite_asset.h:20
yaze::project::SpriteGraphicsSource::bpp
int bpp
Definition
sprite_asset.h:22
yaze::project::SpriteGraphicsSource::kind
std::string kind
Definition
sprite_asset.h:19
yaze::project::SpritePaletteBinding
Definition
sprite_asset.h:11
yaze::project::SpritePaletteBinding::index
int index
Definition
sprite_asset.h:13
yaze::project::SpritePaletteBinding::group
std::string group
Definition
sprite_asset.h:12
src
core
sprite_asset.h
Generated by
1.10.0