Skip to content

Commit 63d2aa0

Browse files
committed
no wave trail and solid wave trail on mac
1 parent efde933 commit 63d2aa0

File tree

2 files changed

+25
-38
lines changed

2 files changed

+25
-38
lines changed

src/Client/ClientSetup.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,6 @@ class ClientUtils
399399
"no-trans",
400400
"verify-hack",
401401
"coin-tracers",
402-
"no-wave",
403-
"solid-wave",
404402
"no-shake"
405403
};
406404

src/Hacks/SolidWaveTrail.cpp

Lines changed: 25 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,42 @@
1-
#ifndef GEODE_IS_MACOS
2-
31
#include <Geode/Geode.hpp>
2+
#include <Geode/modify/CCDrawNode.hpp>
43
#include "../Client/Client.h"
54

65
using namespace geode::prelude;
76

87
Module* noWave = nullptr;
98
Module* solidWave = nullptr;
109

11-
bool myDrawCircle(CCDrawNode* ins, CCPoint *verts, unsigned int count, const ccColor4F &fillColor, float borderWidth, const ccColor4F &borderColor) {
12-
13-
if (typeinfo_cast<HardStreak*>(ins))
10+
class $modify (CCDrawNode)
11+
{
12+
bool drawPolygon(CCPoint *verts, unsigned int count, const ccColor4F &fillColor, float borderWidth, const ccColor4F &borderColor)
1413
{
15-
if (!noWave)
16-
noWave = Client::GetModule("no-wave");
17-
18-
if (!solidWave)
19-
solidWave = Client::GetModule("solid-wave");
14+
if (typeinfo_cast<HardStreak*>(this))
15+
{
16+
if (!noWave)
17+
noWave = Client::GetModule("no-wave");
2018

21-
if (noWave->enabled)
22-
return true;
19+
if (!solidWave)
20+
solidWave = Client::GetModule("solid-wave");
2321

24-
if (solidWave->enabled)
25-
{
26-
if (fillColor.r >= 1.0f && fillColor.g >= 1.0f && fillColor.b >= 1.0f && ins->getColor() != ccc3(255, 255, 255))
22+
if (noWave->enabled)
2723
return true;
2824

29-
if (ins->getTag() != 1)
25+
if (solidWave->enabled)
3026
{
31-
ins->setTag(1);
32-
ins->setBlendFunc(CCSprite::create()->getBlendFunc());
33-
}
27+
if (fillColor.r >= 1.0f && fillColor.g >= 1.0f && fillColor.b >= 1.0f && this->getColor() != ccc3(255, 255, 255))
28+
return true;
29+
30+
if (this->getTag() != 1)
31+
{
32+
this->setTag(1);
33+
this->setBlendFunc(CCSprite::create()->getBlendFunc());
34+
}
3435

35-
ins->setZOrder(-1);
36+
this->setZOrder(-1);
37+
}
3638
}
37-
}
3839

39-
return ins->drawPolygon(verts, count, fillColor, borderWidth, borderColor);
40-
}
41-
42-
$execute {
43-
Mod::get()->hook(
44-
reinterpret_cast<void*>(
45-
geode::addresser::getNonVirtual(&HardStreak::drawPolygon)
46-
),
47-
&myDrawCircle,
48-
"cocos2d::CCDrawNode::drawPolygon",
49-
tulip::hook::TulipConvention::Thiscall
50-
);
51-
}
52-
53-
#endif
40+
return CCDrawNode::drawPolygon(verts, count, fillColor, borderWidth, borderColor);
41+
}
42+
};

0 commit comments

Comments
 (0)