mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-02 15:53:51 +00:00
refactor: promote static const arrays to constexpr across audio/core/rendering
audio: birdPaths, cricketPaths, races core/application: componentDirs (4 instances), compDirs rendering/character_preview: componentDirs rendering/character_renderer: regionCoords256, regionSizes256
This commit is contained in:
parent
d6769172d1
commit
c762688202
5 changed files with 10 additions and 10 deletions
|
|
@ -643,7 +643,7 @@ bool CharacterPreview::applyEquipment(const std::vector<game::EquipmentItem>& eq
|
|||
// --- Textures (equipment overlays onto body skin) ---
|
||||
if (bodySkinPath_.empty()) return true; // geosets applied, but can't composite
|
||||
|
||||
static const char* componentDirs[] = {
|
||||
static constexpr const char* componentDirs[] = {
|
||||
"ArmUpperTexture", "ArmLowerTexture", "HandTexture",
|
||||
"TorsoUpperTexture", "TorsoLowerTexture",
|
||||
"LegUpperTexture", "LegLowerTexture", "FootTexture",
|
||||
|
|
|
|||
|
|
@ -1122,7 +1122,7 @@ VkTexture* CharacterRenderer::compositeWithRegions(const std::string& basePath,
|
|||
|
||||
// Region index -> pixel coordinates on the 256x256 base atlas
|
||||
// These are scaled up by (width/256, height/256) for larger textures (512x512, 1024x1024)
|
||||
static const int regionCoords256[][2] = {
|
||||
static constexpr int regionCoords256[][2] = {
|
||||
{ 0, 0 }, // 0 = ArmUpper
|
||||
{ 0, 64 }, // 1 = ArmLower
|
||||
{ 0, 128 }, // 2 = Hand
|
||||
|
|
@ -1263,7 +1263,7 @@ VkTexture* CharacterRenderer::compositeWithRegions(const std::string& basePath,
|
|||
}
|
||||
|
||||
// Expected region sizes on the 256x256 base atlas (scaled like coords)
|
||||
static const int regionSizes256[][2] = {
|
||||
static constexpr int regionSizes256[][2] = {
|
||||
{ 128, 64 }, // 0 = ArmUpper
|
||||
{ 128, 64 }, // 1 = ArmLower
|
||||
{ 128, 32 }, // 2 = Hand
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue