Refactor menu rendering and asset registry structure
- Updated SoftwareRenderer to incorporate MenuHeaderBand for handling spear variant menus and improved backdrop drawing. - Refactored asset registry imports to organize menu-related assets under a dedicated menu structure. - Enhanced game session snapshot tests to validate menu theme restoration for spear variant games. - Added tests for classic menu presentation module to ensure palette consistency with canonical constants. - Implemented tests for spear asset registry to verify correct menu VGA index resolutions. - Created unit tests for MenuHeaderBand to validate functionality in rendering menu headers and sidebars. - Adjusted HUD module imports to align with new menu structure. Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -238,6 +238,17 @@ The presentation module should treat its image-returning methods as optional hoo
|
||||
|
||||
- return a `VgaImage` when that surface has variant-specific art,
|
||||
- return `null` when the presentation intentionally has no image for that concept,
|
||||
|
||||
### Palette Conversion Guardrail
|
||||
|
||||
When mapping target RGB menu tones to a VGA palette index (for example, preserving Wolf classic dark-red theme), resolve nearest colors from `ColorPalette.argbFromVgaIndex()` values.
|
||||
|
||||
Do not use `ColorPalette.findClosestPaletteIndex()` for this specific workflow, because its channel interpretation is legacy-oriented and can produce hue-swapped matches (for example, red targets resolving to blue-ish indices).
|
||||
|
||||
In short:
|
||||
|
||||
- For variant-defined menu colors: use explicit palette indices from `MenuPresentationModule`.
|
||||
- For host-defined fallback RGB tones: find nearest VGA index by comparing RGB distance against `argbFromVgaIndex()` output.
|
||||
- use `mappedPic(...)` only for legacy numeric menu art lookups that still matter for a renderer path.
|
||||
|
||||
### Wiring A Fully Custom Registry
|
||||
|
||||
Reference in New Issue
Block a user