mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-10 23:03:52 +00:00
refactor: remaining C-style casts, color constants, and header guard cleanup
Replace ~37 remaining C-style casts with static_cast across 16 files. Extract named color constants (kColorRed/Green/Yellow/Gray) and dialog window flags (kDialogFlags) in game_screen.cpp, replacing 72 inline literals. Normalize keybinding_manager.hpp to #pragma once.
This commit is contained in:
parent
05f2bedf88
commit
ba99d505dd
18 changed files with 120 additions and 114 deletions
|
|
@ -554,8 +554,8 @@ CharacterRenderer::NormalMapResult CharacterRenderer::generateNormalHeightMapCPU
|
|||
|
||||
// Step 1.5: Box blur the height map to reduce noise from diffuse textures
|
||||
auto wrapSample = [&](const std::vector<float>& map, int x, int y) -> float {
|
||||
x = ((x % (int)width) + (int)width) % (int)width;
|
||||
y = ((y % (int)height) + (int)height) % (int)height;
|
||||
x = ((x % static_cast<int>(width)) + static_cast<int>(width)) % static_cast<int>(width);
|
||||
y = ((y % static_cast<int>(height)) + static_cast<int>(height)) % static_cast<int>(height);
|
||||
return map[y * width + x];
|
||||
};
|
||||
|
||||
|
|
@ -576,8 +576,8 @@ CharacterRenderer::NormalMapResult CharacterRenderer::generateNormalHeightMapCPU
|
|||
result.pixels.resize(totalPixels * 4);
|
||||
|
||||
auto sampleH = [&](int x, int y) -> float {
|
||||
x = ((x % (int)width) + (int)width) % (int)width;
|
||||
y = ((y % (int)height) + (int)height) % (int)height;
|
||||
x = ((x % static_cast<int>(width)) + static_cast<int>(width)) % static_cast<int>(width);
|
||||
y = ((y % static_cast<int>(height)) + static_cast<int>(height)) % static_cast<int>(height);
|
||||
return heightMap[y * width + x];
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue