From 38ef8f48a3d52b1eefb09ee29dd5b985928edfd2 Mon Sep 17 00:00:00 2001 From: Explodingbill Date: Wed, 31 Jan 2024 14:03:32 +1100 Subject: [PATCH] shit --- mod.json | 2 +- src/Client/AndroidUI.h | 7 ++++++- src/Client/ClientSetup.h | 1 + src/Client/Window.h | 30 +++++++++++++++++++++++++++--- src/Hacks/SolidWaveTrail.cpp | 26 ++++++++++++++------------ src/Hacks/Speedhack.cpp | 3 +++ 6 files changed, 52 insertions(+), 17 deletions(-) diff --git a/mod.json b/mod.json index bebf110..2a03606 100644 --- a/mod.json +++ b/mod.json @@ -1,6 +1,6 @@ { "geode": "2.0.0", - "version": "v1.1.0", + "version": "v1.0.4", "gd": { "win": "2.204", "android": "*" diff --git a/src/Client/AndroidUI.h b/src/Client/AndroidUI.h index 03f8ef5..27b23a3 100644 --- a/src/Client/AndroidUI.h +++ b/src/Client/AndroidUI.h @@ -58,7 +58,7 @@ class AndroidUI : public cocos2d::CCLayerColor { { if (Client::GetModuleEnabled("speedhack-enabled")) { - float v = 1.0f; + v = 1.0f; if (SpeedhackTop::instance->text.size() != 0 && !SpeedhackTop::instance->text.ends_with(".")) { @@ -428,6 +428,11 @@ class AndroidBall : public CCLayer virtual void update(float dt) { + //if (CCScene::get()->getChildByID("android-ui")) + // CCDirector::get()->setNotificationNode(nullptr); + //else + // CCDirector::get()->setNotificationNode(this); + UpdateVisible(false); } diff --git a/src/Client/ClientSetup.h b/src/Client/ClientSetup.h index 49aff14..3004a79 100644 --- a/src/Client/ClientSetup.h +++ b/src/Client/ClientSetup.h @@ -34,6 +34,7 @@ class ClientUtils speedhack->modules.push_back(new SpeedhackTop()); speedhack->modules.push_back(new Module("Enabled", "speedhack-enabled", "Is the speedhack enabled?")); speedhack->modules.push_back(new Module("Speedhack Music", "speedhack-music", "Speedhack all sound by your speed modifier", true)); + speedhack->modules.push_back(new Module("Gameplay Only", "speedhack-gameplay", "Only enables the speedhack in gameplay and editor")); (reinterpret_cast(speedhack->modules.front()))->format = "%x"; diff --git a/src/Client/Window.h b/src/Client/Window.h index 5af4acd..b9043c0 100644 --- a/src/Client/Window.h +++ b/src/Client/Window.h @@ -252,8 +252,10 @@ class Speedhack : public Window//, public TextInputDelegate menu->addChild(slider, 2); modules[0]->makeAndroid(menu, ccp(menu->getContentSize().width / 2, menu->getContentSize().height - 50) - ccp(180 / 2, 0) + ccp(10, 0)); - modules[1]->makeAndroid(menu, ccp(menu->getContentSize().width / 2, menu->getContentSize().height - 200) - ccp(180 / 2, 0) + ccp(10, 0)); - modules[2]->makeAndroid(menu, ccp(menu->getContentSize().width / 2, menu->getContentSize().height - 250) - ccp(180 / 2, 0) + ccp(10, 0)); + + modules[1]->makeAndroid(menu, ccp(menu->getContentSize().width / 2, menu->getContentSize().height - 110) - ccp(180 / 2, 0) + ccp(10, 0)); + modules[2]->makeAndroid(menu, ccp(menu->getContentSize().width / 2, menu->getContentSize().height - 110 - (24 * 1)) - ccp(180 / 2, 0) + ccp(10, 0)); + modules[3]->makeAndroid(menu, ccp(menu->getContentSize().width / 2, menu->getContentSize().height - 110 - (24 * 2)) - ccp(180 / 2, 0) + ccp(10, 0)); //static_cast(menu->getChildByID("speedhack-top"))->getInput()->setDelegate(this); auto trash = CCMenuItemSpriteExtra::create(CCSprite::createWithSpriteFrameName("GJ_trashBtn_001.png"), menu, menu_selector(Speedhack::clear)); @@ -582,6 +584,22 @@ class Config : public Window } + void onLink(CCObject* sender) + { + auto a = geode::createQuickPopup( + "Hold Up!", + "Links are spooky! Are you sure you want to go to " + std::string(as(sender)->getID()) + "?", + "Cancel", "Yes", + [](FLAlertLayer* a, bool btn2) { + if (btn2) { + CCApplication::get()->openURL(a->getID().c_str()); + } + } + ); + + a->setID(as(sender)->getID()); + } + void cocosCreate(CCMenu* menu) { btns.clear(); @@ -662,8 +680,14 @@ class Config : public Window menu->addChild(lED); menu->addChild(ED); - auto discord = CCMenuItemSpriteExtra::create(CCSprite::createWithSpriteFrameName("gj_discordIcon_001.png"), menu, nullptr); // https://discord.gg/DfQSTEnQKK + auto discord = CCMenuItemSpriteExtra::create(CCSprite::createWithSpriteFrameName("gj_discordIcon_001.png"), menu, menu_selector(Config::onLink)); // https://discord.gg/DfQSTEnQKK discord->setPosition(ccp(menu->getContentSize().width, 0) + ccp(-10, 12)); + discord->setID("https://discord.gg/DfQSTEnQKK"); menu->addChild(discord); + + auto yt = CCMenuItemSpriteExtra::create(CCSprite::createWithSpriteFrameName("gj_ytIcon_001.png"), menu, menu_selector(Config::onLink)); // https://www.youtube.com/@TheSillyDoggo + yt->setPosition(ccp(menu->getContentSize().width, 0) + ccp(-10, 12) + ccp(0, 35)); + yt->setID("https://www.youtube.com/@TheSillyDoggo"); + menu->addChild(yt); } }; \ No newline at end of file diff --git a/src/Hacks/SolidWaveTrail.cpp b/src/Hacks/SolidWaveTrail.cpp index 423674b..49a9a79 100644 --- a/src/Hacks/SolidWaveTrail.cpp +++ b/src/Hacks/SolidWaveTrail.cpp @@ -1,22 +1,24 @@ -#include -#include +/*#include +//#include +#include #include "../Client/Client.h" using namespace geode::prelude; -/* -class $modify (HardStreak) + +class $modify (CCDrawNode) { - inline void drawPolygon(CCPoint *verts, unsigned int count, const ccColor4F &fillColor, float borderWidth, const ccColor4F &borderColor) + void drawPolygon(CCPoint *verts, unsigned int count, const ccColor4F &fillColor, float borderWidth, const ccColor4F &borderColor) { log::info("a"); - HardStreak::drawPolygon(verts, count, fillColor, borderWidth, borderColor); + CCDrawNode::drawPolygon(verts, count, fillColor, borderWidth, borderColor); } +}; +*/ +/*void updateStroke(float p0) +{ + HardStreak::updateStroke(p0); - /*void updateStroke(float p0) - { - HardStreak::updateStroke(p0); - - log::info("s"); - }// + log::info("s"); +}// };*/ \ No newline at end of file diff --git a/src/Hacks/Speedhack.cpp b/src/Hacks/Speedhack.cpp index f12b78d..5b2fb12 100644 --- a/src/Hacks/Speedhack.cpp +++ b/src/Hacks/Speedhack.cpp @@ -25,6 +25,9 @@ class $modify (CCScheduler) if (v > 99999) v = 99999; + if (Client::GetModuleEnabled("speedhack-gameplay")) + if (!(PlayLayer::get() || GameManager::sharedState()->getEditorLayer())) { v = 1.0f; } + FMOD::ChannelGroup* masterGroup; FMODAudioEngine::sharedEngine()->m_system->getMasterChannelGroup(&masterGroup); masterGroup->setPitch(Client::GetModuleEnabled("speedhack-music") ? v : 1);