Missed a few.

This commit is contained in:
Malkierian 2025-05-13 22:17:06 -07:00
commit cce11beec6
2 changed files with 5 additions and 5 deletions

View file

@ -598,7 +598,7 @@ static void DistributeHints(std::vector<uint8_t>& selected, size_t stoneCount,
} }
// if stones are left, assign junk to every remaining stone as a fallback. // if stones are left, assign junk to every remaining stone as a fallback.
if (stoneCount > 0) { if (stoneCount > 0) {
selected[static_cast<uint8_t>(selected.size()) - 1] += stoneCount; selected[static_cast<uint8_t>(selected.size()) - 1] += static_cast<uint8_t>(stoneCount);
} }
} }

View file

@ -1892,16 +1892,16 @@ static std::set<std::string> rainbowCVars = {
int hue = 0; int hue = 0;
void RainbowTick() { void RainbowTick() {
float freqHue = hue * 2 * M_PI / (360 * CVarGetFloat(CVAR_COSMETIC("RainbowSpeed"), 0.6f)); float freqHue = hue * 2 * static_cast<float>(M_PI) / (360 * CVarGetFloat(CVAR_COSMETIC("RainbowSpeed"), 0.6f));
for (auto& cvar : rainbowCVars) { for (auto& cvar : rainbowCVars) {
if (CVarGetInteger((cvar + ".Rainbow").c_str(), 0) == 0) { if (CVarGetInteger((cvar + ".Rainbow").c_str(), 0) == 0) {
continue; continue;
} }
Color_RGBA8 newColor; Color_RGBA8 newColor;
newColor.r = sin(freqHue + 0) * 127 + 128; newColor.r = static_cast<uint8_t>(sin(freqHue + 0) * 127) + 128;
newColor.g = sin(freqHue + (2 * M_PI / 3)) * 127 + 128; newColor.g = static_cast<uint8_t>(sin(freqHue + (2 * M_PI / 3)) * 127) + 128;
newColor.b = sin(freqHue + (4 * M_PI / 3)) * 127 + 128; newColor.b = static_cast<uint8_t>(sin(freqHue + (4 * M_PI / 3)) * 127) + 128;
newColor.a = 255; newColor.a = 255;
CVarSetColor((cvar + ".Value").c_str(), newColor); CVarSetColor((cvar + ".Value").c_str(), newColor);