backend-infra-engineer: Release v0.3.3 snapshot

This commit is contained in:
scawful
2025-11-21 21:35:50 -05:00
parent 3d71417f62
commit 476dd1cd1c
818 changed files with 65706 additions and 35514 deletions

View File

@@ -84,215 +84,233 @@ constexpr int kOverworldMiniMap = 2;
// ============================================================================
struct PaletteGroupMetadata {
const char* group_id; // Unique identifier (e.g., "ow_main")
const char* display_name; // Human-readable name
const char* category; // Category (e.g., "Overworld", "Dungeon")
uint32_t base_address; // ROM address
int palette_count; // Number of palettes
int colors_per_palette; // Colors in each palette
int colors_per_row; // How many colors per row in UI
int bits_per_pixel; // Color depth (typically 4 for SNES)
const char* description; // Usage description
bool has_animations; // Whether palettes animate
const char* group_id; // Unique identifier (e.g., "ow_main")
const char* display_name; // Human-readable name
const char* category; // Category (e.g., "Overworld", "Dungeon")
uint32_t base_address; // ROM address
int palette_count; // Number of palettes
int colors_per_palette; // Colors in each palette
int colors_per_row; // How many colors per row in UI
int bits_per_pixel; // Color depth (typically 4 for SNES)
const char* description; // Usage description
bool has_animations; // Whether palettes animate
};
// Predefined metadata for all palette groups
namespace PaletteMetadata {
constexpr PaletteGroupMetadata kOverworldMain = {
.group_id = PaletteGroupName::kOverworldMain,
.display_name = "Overworld Main",
.category = "Overworld",
.base_address = PaletteAddress::kOverworldMain,
.palette_count = PaletteCount::kOverworldMain,
.colors_per_palette = 35, // 35 colors: 2 full rows (0-15, 16-31) + 3 colors (32-34)
.colors_per_row = 7, // Display in 16-color rows for proper SNES alignment
.bits_per_pixel = 4,
.description = "Main overworld palettes: 35 colors per set (2 full rows + 3 colors)",
.has_animations = false
};
.group_id = PaletteGroupName::kOverworldMain,
.display_name = "Overworld Main",
.category = "Overworld",
.base_address = PaletteAddress::kOverworldMain,
.palette_count = PaletteCount::kOverworldMain,
.colors_per_palette =
35, // 35 colors: 2 full rows (0-15, 16-31) + 3 colors (32-34)
.colors_per_row = 7, // Display in 16-color rows for proper SNES alignment
.bits_per_pixel = 4,
.description =
"Main overworld palettes: 35 colors per set (2 full rows + 3 colors)",
.has_animations = false};
constexpr PaletteGroupMetadata kOverworldAnimated = {
.group_id = PaletteGroupName::kOverworldAnimated,
.display_name = "Overworld Animated",
.category = "Overworld",
.base_address = PaletteAddress::kOverworldAnimated,
.palette_count = PaletteCount::kOverworldAnimated,
.colors_per_palette = 7, // 7 colors (overlay palette, no transparent)
.colors_per_row = 8, // Display in 8-color groups
.bits_per_pixel = 4,
.description = "Animated overlay palettes: 7 colors per set (water, lava, etc.)",
.has_animations = true
};
.group_id = PaletteGroupName::kOverworldAnimated,
.display_name = "Overworld Animated",
.category = "Overworld",
.base_address = PaletteAddress::kOverworldAnimated,
.palette_count = PaletteCount::kOverworldAnimated,
.colors_per_palette = 7, // 7 colors (overlay palette, no transparent)
.colors_per_row = 8, // Display in 8-color groups
.bits_per_pixel = 4,
.description =
"Animated overlay palettes: 7 colors per set (water, lava, etc.)",
.has_animations = true};
constexpr PaletteGroupMetadata kDungeonMain = {
.group_id = PaletteGroupName::kDungeonMain,
.display_name = "Dungeon Main",
.category = "Dungeon",
.base_address = PaletteAddress::kDungeonMain,
.palette_count = PaletteCount::kDungeonMain,
.colors_per_palette = 90, // 90 colors: 5 full rows (0-15, 16-31, 32-47, 48-63, 64-79) + 10 colors (80-89)
.colors_per_row = 16, // Display in 16-color rows for proper SNES alignment
.bits_per_pixel = 4,
.description = "Dungeon-specific palettes: 90 colors per set (5 full rows + 10 colors)",
.has_animations = false
};
.group_id = PaletteGroupName::kDungeonMain,
.display_name = "Dungeon Main",
.category = "Dungeon",
.base_address = PaletteAddress::kDungeonMain,
.palette_count = PaletteCount::kDungeonMain,
.colors_per_palette = 90, // 90 colors: 5 full rows (0-15, 16-31, 32-47,
// 48-63, 64-79) + 10 colors (80-89)
.colors_per_row = 16, // Display in 16-color rows for proper SNES alignment
.bits_per_pixel = 4,
.description =
"Dungeon-specific palettes: 90 colors per set (5 full rows + 10 "
"colors)",
.has_animations = false};
constexpr PaletteGroupMetadata kGlobalSprites = {
.group_id = PaletteGroupName::kGlobalSprites,
.display_name = "Global Sprites",
.category = "Sprites",
.base_address = PaletteAddress::kGlobalSpritesLW,
.palette_count = 2, // 2 sets (LW and DW), each with 60 colors
.colors_per_palette = 60, // 60 colors: 4 rows (0-15, 16-31, 32-47, 48-59) with transparent at 0, 16, 32, 48
.colors_per_row = 16, // Display in 16-color rows for proper SNES alignment
.bits_per_pixel = 4,
.description = "Global sprite palettes: 60 colors per set (4 sprite sub-palettes of 15+transparent each)",
.has_animations = false
};
.group_id = PaletteGroupName::kGlobalSprites,
.display_name = "Global Sprites",
.category = "Sprites",
.base_address = PaletteAddress::kGlobalSpritesLW,
.palette_count = 2, // 2 sets (LW and DW), each with 60 colors
.colors_per_palette = 60, // 60 colors: 4 rows (0-15, 16-31, 32-47, 48-59)
// with transparent at 0, 16, 32, 48
.colors_per_row = 16, // Display in 16-color rows for proper SNES alignment
.bits_per_pixel = 4,
.description =
"Global sprite palettes: 60 colors per set (4 sprite sub-palettes of "
"15+transparent each)",
.has_animations = false};
constexpr PaletteGroupMetadata kSpritesAux1 = {
.group_id = PaletteGroupName::kSpritesAux1,
.display_name = "Sprites Aux 1",
.category = "Sprites",
.base_address = PaletteAddress::kSpritesAux1,
.palette_count = PaletteCount::kSpritesAux1,
.colors_per_palette = 7, // 7 colors (ROM stores 7, transparent added in memory)
.colors_per_row = 8, // Display as 8-color sub-palettes (with transparent)
.bits_per_pixel = 4,
.description = "Auxiliary sprite palettes 1: 7 colors per palette (transparent added at runtime)",
.has_animations = false
};
.group_id = PaletteGroupName::kSpritesAux1,
.display_name = "Sprites Aux 1",
.category = "Sprites",
.base_address = PaletteAddress::kSpritesAux1,
.palette_count = PaletteCount::kSpritesAux1,
.colors_per_palette =
7, // 7 colors (ROM stores 7, transparent added in memory)
.colors_per_row = 8, // Display as 8-color sub-palettes (with transparent)
.bits_per_pixel = 4,
.description =
"Auxiliary sprite palettes 1: 7 colors per palette (transparent added "
"at runtime)",
.has_animations = false};
constexpr PaletteGroupMetadata kSpritesAux2 = {
.group_id = PaletteGroupName::kSpritesAux2,
.display_name = "Sprites Aux 2",
.category = "Sprites",
.base_address = PaletteAddress::kSpritesAux2,
.palette_count = PaletteCount::kSpritesAux2,
.colors_per_palette = 7, // 7 colors (ROM stores 7, transparent added in memory)
.colors_per_row = 8, // Display as 8-color sub-palettes (with transparent)
.bits_per_pixel = 4,
.description = "Auxiliary sprite palettes 2: 7 colors per palette (transparent added at runtime)",
.has_animations = false
};
.group_id = PaletteGroupName::kSpritesAux2,
.display_name = "Sprites Aux 2",
.category = "Sprites",
.base_address = PaletteAddress::kSpritesAux2,
.palette_count = PaletteCount::kSpritesAux2,
.colors_per_palette =
7, // 7 colors (ROM stores 7, transparent added in memory)
.colors_per_row = 8, // Display as 8-color sub-palettes (with transparent)
.bits_per_pixel = 4,
.description =
"Auxiliary sprite palettes 2: 7 colors per palette (transparent added "
"at runtime)",
.has_animations = false};
constexpr PaletteGroupMetadata kSpritesAux3 = {
.group_id = PaletteGroupName::kSpritesAux3,
.display_name = "Sprites Aux 3",
.category = "Sprites",
.base_address = PaletteAddress::kSpritesAux3,
.palette_count = PaletteCount::kSpritesAux3,
.colors_per_palette = 7, // 7 colors (ROM stores 7, transparent added in memory)
.colors_per_row = 8, // Display as 8-color sub-palettes (with transparent)
.bits_per_pixel = 4,
.description = "Auxiliary sprite palettes 3: 7 colors per palette (transparent added at runtime)",
.has_animations = false
};
.group_id = PaletteGroupName::kSpritesAux3,
.display_name = "Sprites Aux 3",
.category = "Sprites",
.base_address = PaletteAddress::kSpritesAux3,
.palette_count = PaletteCount::kSpritesAux3,
.colors_per_palette =
7, // 7 colors (ROM stores 7, transparent added in memory)
.colors_per_row = 8, // Display as 8-color sub-palettes (with transparent)
.bits_per_pixel = 4,
.description =
"Auxiliary sprite palettes 3: 7 colors per palette (transparent added "
"at runtime)",
.has_animations = false};
constexpr PaletteGroupMetadata kArmor = {
.group_id = PaletteGroupName::kArmor,
.display_name = "Armor / Link",
.category = "Equipment",
.base_address = PaletteAddress::kArmor,
.palette_count = PaletteCount::kArmor,
.colors_per_palette = 15, // 15 colors (ROM stores 15, transparent added in memory for full row)
.colors_per_row = 16, // Display as full 16-color rows (with transparent at index 0)
.bits_per_pixel = 4,
.description = "Link's tunic colors: 15 colors per palette (Green, Blue, Red, Bunny, Electrocuted)",
.has_animations = false
};
.group_id = PaletteGroupName::kArmor,
.display_name = "Armor / Link",
.category = "Equipment",
.base_address = PaletteAddress::kArmor,
.palette_count = PaletteCount::kArmor,
.colors_per_palette = 15, // 15 colors (ROM stores 15, transparent added in
// memory for full row)
.colors_per_row =
16, // Display as full 16-color rows (with transparent at index 0)
.bits_per_pixel = 4,
.description =
"Link's tunic colors: 15 colors per palette (Green, Blue, Red, Bunny, "
"Electrocuted)",
.has_animations = false};
constexpr PaletteGroupMetadata kSwords = {
.group_id = PaletteGroupName::kSwords,
.display_name = "Swords",
.category = "Equipment",
.base_address = PaletteAddress::kSwords,
.palette_count = PaletteCount::kSwords,
.colors_per_palette = 3, // 3 colors (overlay palette, no transparent)
.colors_per_row = 4, // Display in compact groups
.bits_per_pixel = 4,
.description = "Sword blade colors: 3 colors per palette (Fighter, Master, Tempered, Golden)",
.has_animations = false
};
.group_id = PaletteGroupName::kSwords,
.display_name = "Swords",
.category = "Equipment",
.base_address = PaletteAddress::kSwords,
.palette_count = PaletteCount::kSwords,
.colors_per_palette = 3, // 3 colors (overlay palette, no transparent)
.colors_per_row = 4, // Display in compact groups
.bits_per_pixel = 4,
.description =
"Sword blade colors: 3 colors per palette (Fighter, Master, Tempered, "
"Golden)",
.has_animations = false};
constexpr PaletteGroupMetadata kShields = {
.group_id = PaletteGroupName::kShields,
.display_name = "Shields",
.category = "Equipment",
.base_address = PaletteAddress::kShields,
.palette_count = PaletteCount::kShields,
.colors_per_palette = 4, // 4 colors (overlay palette, no transparent)
.colors_per_row = 4, // Display in compact groups
.bits_per_pixel = 4,
.description = "Shield colors: 4 colors per palette (Fighter, Fire, Mirror)",
.has_animations = false
};
.group_id = PaletteGroupName::kShields,
.display_name = "Shields",
.category = "Equipment",
.base_address = PaletteAddress::kShields,
.palette_count = PaletteCount::kShields,
.colors_per_palette = 4, // 4 colors (overlay palette, no transparent)
.colors_per_row = 4, // Display in compact groups
.bits_per_pixel = 4,
.description =
"Shield colors: 4 colors per palette (Fighter, Fire, Mirror)",
.has_animations = false};
constexpr PaletteGroupMetadata kHud = {
.group_id = PaletteGroupName::kHud,
.display_name = "HUD",
.category = "Interface",
.base_address = PaletteAddress::kHud,
.palette_count = PaletteCount::kHud,
.colors_per_palette = 32, // 32 colors: 2 full rows (0-15, 16-31) with transparent at 0, 16
.colors_per_row = 16, // Display in 16-color rows
.bits_per_pixel = 2, // HUD palettes are 2bpp
.description = "HUD/Interface palettes: 32 colors per set (2 full rows)",
.has_animations = false
};
.group_id = PaletteGroupName::kHud,
.display_name = "HUD",
.category = "Interface",
.base_address = PaletteAddress::kHud,
.palette_count = PaletteCount::kHud,
.colors_per_palette =
32, // 32 colors: 2 full rows (0-15, 16-31) with transparent at 0, 16
.colors_per_row = 16, // Display in 16-color rows
.bits_per_pixel = 2, // HUD palettes are 2bpp
.description = "HUD/Interface palettes: 32 colors per set (2 full rows)",
.has_animations = false};
constexpr PaletteGroupMetadata kOverworldAux = {
.group_id = PaletteGroupName::kOverworldAux,
.display_name = "Overworld Auxiliary",
.category = "Overworld",
.base_address = PaletteAddress::kOverworldAux,
.palette_count = PaletteCount::kOverworldAux,
.colors_per_palette = 21, // 21 colors: 1 full row (0-15) + 5 colors (16-20)
.colors_per_row = 16, // Display in 16-color rows
.bits_per_pixel = 4,
.description = "Overworld auxiliary palettes: 21 colors per set (1 full row + 5 colors)",
.has_animations = false
};
.group_id = PaletteGroupName::kOverworldAux,
.display_name = "Overworld Auxiliary",
.category = "Overworld",
.base_address = PaletteAddress::kOverworldAux,
.palette_count = PaletteCount::kOverworldAux,
.colors_per_palette =
21, // 21 colors: 1 full row (0-15) + 5 colors (16-20)
.colors_per_row = 16, // Display in 16-color rows
.bits_per_pixel = 4,
.description =
"Overworld auxiliary palettes: 21 colors per set (1 full row + 5 "
"colors)",
.has_animations = false};
constexpr PaletteGroupMetadata kGrass = {
.group_id = PaletteGroupName::kGrass,
.display_name = "Grass",
.category = "Overworld",
.base_address = PaletteAddress::kGrassLW,
.palette_count = PaletteCount::kGrass,
.colors_per_palette = 1, // Single color per entry
.colors_per_row = 3, // Display all 3 in one row
.bits_per_pixel = 4,
.description = "Hardcoded grass colors: 3 individual colors (LW, DW, Special)",
.has_animations = false
};
.group_id = PaletteGroupName::kGrass,
.display_name = "Grass",
.category = "Overworld",
.base_address = PaletteAddress::kGrassLW,
.palette_count = PaletteCount::kGrass,
.colors_per_palette = 1, // Single color per entry
.colors_per_row = 3, // Display all 3 in one row
.bits_per_pixel = 4,
.description =
"Hardcoded grass colors: 3 individual colors (LW, DW, Special)",
.has_animations = false};
constexpr PaletteGroupMetadata k3DObject = {
.group_id = PaletteGroupName::k3DObject,
.display_name = "3D Objects",
.category = "Special",
.base_address = PaletteAddress::kTriforce,
.palette_count = PaletteCount::k3DObject,
.colors_per_palette = 8, // 8 colors per palette (7 + transparent)
.colors_per_row = 8, // Display in 8-color groups
.bits_per_pixel = 4,
.description = "3D object palettes: 8 colors per palette (Triforce, Crystal)",
.has_animations = false
};
.group_id = PaletteGroupName::k3DObject,
.display_name = "3D Objects",
.category = "Special",
.base_address = PaletteAddress::kTriforce,
.palette_count = PaletteCount::k3DObject,
.colors_per_palette = 8, // 8 colors per palette (7 + transparent)
.colors_per_row = 8, // Display in 8-color groups
.bits_per_pixel = 4,
.description =
"3D object palettes: 8 colors per palette (Triforce, Crystal)",
.has_animations = false};
constexpr PaletteGroupMetadata kOverworldMiniMap = {
.group_id = PaletteGroupName::kOverworldMiniMap,
.display_name = "Overworld Mini Map",
.category = "Interface",
.base_address = PaletteAddress::kOverworldMiniMap,
.palette_count = PaletteCount::kOverworldMiniMap,
.colors_per_palette = 128, // 128 colors: 8 full rows (0-127) with transparent at 0, 16, 32, 48, 64, 80, 96, 112
.colors_per_row = 16, // Display in 16-color rows
.bits_per_pixel = 4,
.description = "Overworld mini-map palettes: 128 colors per set (8 full rows)",
.has_animations = false
};
.group_id = PaletteGroupName::kOverworldMiniMap,
.display_name = "Overworld Mini Map",
.category = "Interface",
.base_address = PaletteAddress::kOverworldMiniMap,
.palette_count = PaletteCount::kOverworldMiniMap,
.colors_per_palette = 128, // 128 colors: 8 full rows (0-127) with
// transparent at 0, 16, 32, 48, 64, 80, 96, 112
.colors_per_row = 16, // Display in 16-color rows
.bits_per_pixel = 4,
.description =
"Overworld mini-map palettes: 128 colors per set (8 full rows)",
.has_animations = false};
} // namespace PaletteMetadata
@@ -305,4 +323,3 @@ std::vector<const PaletteGroupMetadata*> GetAllPaletteGroups();
} // namespace yaze::zelda3
#endif // YAZE_ZELDA3_PALETTE_CONSTANTS_H