Skip to content

Commit

Permalink
fixed it lol
Browse files Browse the repository at this point in the history
  • Loading branch information
dabewodactowluwu@gmail.com authored and dabewodactowluwu@gmail.com committed Apr 10, 2024
1 parent 8989efd commit 5796955
Showing 1 changed file with 7 additions and 22 deletions.
29 changes: 7 additions & 22 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
using namespace geode::prelude;

// thanks to shadowforce78
void HSVtoRGBbutDifferentIGuess(float &fR, float &fG, float &fB, float &fH,
float &fS, float &fV) {
void HSVtoRGBbutDifferentIGuess(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));
Expand Down Expand Up @@ -71,29 +70,16 @@ cocos2d::_ccColor3B getRainbow(float offset, float saturation) {
}

// thanks to shadowforce78
class hook73Dummy;
template <class> struct hook73 {};
namespace {
struct hook73Parent {};
} // namespace
template <>
struct hook73<hook73Parent>
: geode ::Modify<hook73<hook73Parent>, PlayerObject> {
void flashPlayer(float p0, float p1, cocos2d::ccColor3B mainColor,
cocos2d::ccColor3B secondColor) {
class $modify(PlayerObject) {
void flashPlayer(float p0, float p1, cocos2d::ccColor3B mainColor, cocos2d::ccColor3B secondColor) {
// neutralised kappa
}
};

class hook79Dummy;
template <class> struct hook79 {};
namespace {
struct hook79Parent {};
} // namespace
template <>
struct hook79<hook79Parent> : geode ::Modify<hook79<hook79Parent>, PlayLayer> {
PlayLayer::postUpdate(p0);
class $modify(PlayLayer) {
void postUpdate(float p0) {
PlayLayer::postUpdate(p0);

float speed = Mod::get()->getSettingValue<double>("speed");
float saturation = Mod::get()->getSettingValue<double>("saturation");

Expand All @@ -106,14 +92,13 @@ struct hook79<hook79Parent> : geode ::Modify<hook79<hook79Parent>, PlayLayer> {
auto rainbowColor = getRainbow(0, saturation);
auto rainbowColor2 = getRainbow(180, saturation);
auto rainbowColor3 = getRainbow(90, saturation);

bool enable = Mod::get()->getSettingValue<bool>("enable");

if (enable == true) {
if (m_player1->m_waveTrail) {
m_player1->m_waveTrail->setColor(rainbowColor);
}

if (m_player2->m_waveTrail) {
m_player2->m_waveTrail->setColor(rainbowColor2);
}
Expand Down

0 comments on commit 5796955

Please sign in to comment.