mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 14:23:44 -07:00
Missed a few.
This commit is contained in:
parent
4de210d435
commit
cce11beec6
2 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue