yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
graphics_sheet_labels.h
Go to the documentation of this file.
1#ifndef YAZE_CORE_GRAPHICS_SHEET_LABELS_H_
2#define YAZE_CORE_GRAPHICS_SHEET_LABELS_H_
3
4#include <cstdint>
5#include <string>
6
7#include "core/project.h"
8
9namespace yaze::core {
10
11// Project label type for graphics sheets. Keys are decimal sheet ids, the
12// canonical key format of every project label type.
13inline constexpr char kGraphicsSheetLabelType[] = "graphics";
14
15// The project's label for `sheet`, or "" when it has none. Also accepts a
16// legacy "0x%02X" key.
17std::string GetGraphicsSheetLabel(const project::YazeProject& project,
18 uint16_t sheet);
19
20// Sets the project's label for `sheet`; an empty label removes it.
21void SetGraphicsSheetLabel(project::YazeProject& project, uint16_t sheet,
22 const std::string& label);
23
24// Labels sheet (value + 0x73) with the names Oracle's Spritesets CSV lists
25// for each sprite value (cells such as "0x46 Cannon Soldiers"), joined with
26// "; ". Existing labels are kept unless `overwrite`. Returns the number of
27// labels written.
29 const std::string& csv_text,
30 bool overwrite = false);
31
32} // namespace yaze::core
33
34#endif // YAZE_CORE_GRAPHICS_SHEET_LABELS_H_
constexpr char kGraphicsSheetLabelType[]
void SetGraphicsSheetLabel(project::YazeProject &project, uint16_t sheet, const std::string &label)
int ImportSpritesetSheetLabels(project::YazeProject &project, const std::string &csv_text, bool overwrite)
std::string GetGraphicsSheetLabel(const project::YazeProject &project, uint16_t sheet)
Modern project structure with comprehensive settings consolidation.
Definition project.h:287