From e8c23ad305076f71bdc9159a0990011abced41cf Mon Sep 17 00:00:00 2001 From: The Motherfucking Bearodactyl Date: Thu, 25 Apr 2024 13:59:48 -0500 Subject: [PATCH] snake_case_is_awesome --- src/main.cpp | 10 +++++----- src/rainbow_trail.cpp | 8 ++++---- src/rainbow_trail.hpp | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 403900e..623dba4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -9,7 +9,7 @@ using namespace geode::prelude; class $modify(PlayerObject) { - void flashPlayer(float p0, float p1, cocos2d::ccColor3B mainColor, cocos2d::ccColor3B secondColor) {} + void flashPlayer(float p0, float p1, cocos2d::ccColor3B mainColor, cocos2d::ccColor3B secondColor) {} }; class $modify(PlayLayer) { @@ -26,9 +26,9 @@ class $modify(PlayLayer) { RainbowTrail::g += speed / 10; } - _ccColor3B rainbowColor = RainbowTrail::getRainbow(0, saturation); - _ccColor3B rainbowColor2 = RainbowTrail::getRainbow(180, saturation); - _ccColor3B rainbowColor3 = RainbowTrail::getRainbow(90, saturation); + _ccColor3B rainbowColor = RainbowTrail::get_rainbow(0, saturation); + _ccColor3B rainbowColor2 = RainbowTrail::get_rainbow(180, saturation); + _ccColor3B rainbowColor3 = RainbowTrail::get_rainbow(90, saturation); bool enable = Mod::get()->getSettingValue("enable"); bool noRegularTrail = Mod::get()->getSettingValue("no-reg-trail"); @@ -50,4 +50,4 @@ class $modify(PlayLayer) { } } } -}; \ No newline at end of file +}; diff --git a/src/rainbow_trail.cpp b/src/rainbow_trail.cpp index 190e0a1..e86a5ba 100644 --- a/src/rainbow_trail.cpp +++ b/src/rainbow_trail.cpp @@ -2,7 +2,7 @@ #include -void RainbowTrail::HSVtoRGBbutDifferentIGuess(float &fR, float &fG, float &fB, float &fH, float &fS, float &fV) { +void RainbowTrail::hsv_to_rgb(float &fR, float &fG, float &fB, float &fH, float &fS, float &fV) { float fC = fV * fS; // Chroma float fHPrime = fmod(fH / 60.0, 6); float fX = fC * (1 - fabs(fmod(fHPrime, 2) - 1)); @@ -54,7 +54,7 @@ void RainbowTrail::HSVtoRGBbutDifferentIGuess(float &fR, float &fG, float &fB, f float RainbowTrail::g = 0; -cocos2d::_ccColor3B RainbowTrail::getRainbow(float offset, float saturation) { +cocos2d::_ccColor3B RainbowTrail::get_rainbow(float offset, float saturation) { float R; float G; float B; @@ -62,11 +62,11 @@ cocos2d::_ccColor3B RainbowTrail::getRainbow(float offset, float saturation) { float hue = fmod(g + offset, 360); float sat = saturation / 100.0; float vc = 1; - HSVtoRGBbutDifferentIGuess(R, G, B, hue, sat, vc); + hsv_to_rgb(R, G, B, hue, sat, vc); cocos2d::_ccColor3B out; out.r = R * 255; out.g = G * 255; out.b = B * 255; return out; -} \ No newline at end of file +} diff --git a/src/rainbow_trail.hpp b/src/rainbow_trail.hpp index f86628d..46a3144 100644 --- a/src/rainbow_trail.hpp +++ b/src/rainbow_trail.hpp @@ -4,7 +4,7 @@ class RainbowTrail { public: - static void HSVtoRGBbutDifferentIGuess(float &fR, float &fG, float &fB, float &fH, float &fS, float &fV); - static cocos2d::_ccColor3B getRainbow(float offset, float saturation); + static void hsv_to_rgb(float &fR, float &fG, float &fB, float &fH, float &fS, float &fV); + static cocos2d::_ccColor3B get_rainbow(float offset, float saturation); static float g; };