yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
sheet_role_palette_table.h
Go to the documentation of this file.
1#ifndef YAZE_APP_GFX_TYPES_SHEET_ROLE_PALETTE_TABLE_H_
2#define YAZE_APP_GFX_TYPES_SHEET_ROLE_PALETTE_TABLE_H_
3
4#include <cstdint>
5#include <string_view>
6
8
9namespace yaze {
10namespace gfx {
11
12// Default palette wiring for a given SheetRole. The fields are derived from
13// tile16_editor's slot mapping plus the seeding partition in
14// zelda3/game_data.cc:ProcessSheetBitmap.
16 // Name accepted by PaletteGroupMap::get_group (e.g. "ow_main", "ow_aux",
17 // "sprites_aux1"). Empty for kUnclassified.
18 std::string_view palette_group_name;
19
20 // Which palette within the group to use as a default starting point.
22
23 // CGRAM base row in the 16-row palette layout. Used by tile16-style
24 // overworld renderers that select rows by (base_row + button).
26};
27
28// Map a blockset slot (0-7) to a role. Mirrors tile16_editor.cc.
29SheetRole RoleForBlocksetSlot(int slot_index);
30
31// Map a roomset slot (0-3) to a role. Roomsets override blockset slots 4-7.
32SheetRole RoleForRoomsetSlot(int slot_index);
33
34// Map a spriteset slot (0-3) to a role. All currently resolve to kSpriteAux1.
35SheetRole RoleForSpritesetSlot(int slot_index);
36
37// Coarse fallback by raw sheet ID. Mirrors the seeding partition in
38// game_data.cc (sheets < 113 -> dungeon_main, < 128 -> sprites_aux1,
39// otherwise -> hud). Used when the caller has no slot context.
40SheetRole RoleForSheetId(int sheet_id);
41
42// Default palette wiring for a role. kUnclassified returns an empty binding
43// (palette_group_name is empty, sub_index/base_row are zero).
45
46} // namespace gfx
47} // namespace yaze
48
49#endif // YAZE_APP_GFX_TYPES_SHEET_ROLE_PALETTE_TABLE_H_
SheetRole RoleForSheetId(int sheet_id)
SheetRolePaletteBinding DefaultBindingFor(SheetRole role)
SheetRole RoleForRoomsetSlot(int slot_index)
SheetRole RoleForBlocksetSlot(int slot_index)
SheetRole RoleForSpritesetSlot(int slot_index)