From 796797049cfccde55647c3af6754fd3c73c93ec3 Mon Sep 17 00:00:00 2001 From: Capeling <113705504+Capeling@users.noreply.github.com> Date: Fri, 12 Jul 2024 14:34:54 +0930 Subject: [PATCH 1/4] seperate windows into different files for easier build times --- src/Client/ClientSetup.h | 3 +- src/Client/Window.cpp | 104 ++++++ src/Client/Window.h | 594 +----------------------------- src/Client/Windows/All.h | 8 + src/Client/Windows/Credits.cpp | 119 ++++++ src/Client/Windows/Credits.h | 17 + src/Client/Windows/Level.cpp | 39 ++ src/Client/Windows/Level.h | 12 + src/Client/Windows/Speedhack.cpp | 139 +++++++ src/Client/Windows/Speedhack.h | 28 ++ src/Client/Windows/Uncomplete.cpp | 34 ++ src/Client/Windows/Uncomplete.h | 11 + src/Client/Windows/Universal.cpp | 23 ++ src/Client/Windows/Universal.h | 10 + src/Client/Windows/Variables.cpp | 59 +++ src/Client/Windows/Variables.h | 15 + src/CustomWindows/Config.h | 1 + 17 files changed, 626 insertions(+), 590 deletions(-) create mode 100644 src/Client/Windows/All.h create mode 100644 src/Client/Windows/Credits.cpp create mode 100644 src/Client/Windows/Credits.h create mode 100644 src/Client/Windows/Level.cpp create mode 100644 src/Client/Windows/Level.h create mode 100644 src/Client/Windows/Speedhack.cpp create mode 100644 src/Client/Windows/Speedhack.h create mode 100644 src/Client/Windows/Uncomplete.cpp create mode 100644 src/Client/Windows/Uncomplete.h create mode 100644 src/Client/Windows/Universal.cpp create mode 100644 src/Client/Windows/Universal.h create mode 100644 src/Client/Windows/Variables.cpp create mode 100644 src/Client/Windows/Variables.h diff --git a/src/Client/ClientSetup.h b/src/Client/ClientSetup.h index 81d0024..5b15a33 100644 --- a/src/Client/ClientSetup.h +++ b/src/Client/ClientSetup.h @@ -1,9 +1,10 @@ #pragma once +#include "Windows/All.h" +#include "../CustomWindows/Config.h" #include "Client.h" #include "HitboxesModule.h" #include "../Labels/Labels.h" -#include "../CustomWindows/Config.h" #include "../CustomWindows/Labels.h" #include "../CustomWindows/IconEffects.h" #include "../Hacks/SafeMode/SafeMode.hpp" diff --git a/src/Client/Window.cpp b/src/Client/Window.cpp index ab8792f..da8170b 100644 --- a/src/Client/Window.cpp +++ b/src/Client/Window.cpp @@ -99,6 +99,110 @@ bool Window::touchEndedOrCancelled(CCPoint point, CCTouch* touch, bool cancelled return false; } +float Window::quadraticEaseInOut(float t) { + if (t < 0.5f) + return 2 * t * t; + else + return (-2 * t * t) + (4 * t) - 1; +} + +float Window::clampf(float v, float min, float max) { + if (v < min) + v = min; + + if (v > max) + v = max; + + return v; +} + +int Window::getIndex(std::vector v, float K) { + auto it = std::find(v.begin(), v.end(), K); + + // If element was found + if (it != v.end()) + { + + // calculating the index + // of K + int index = it - v.begin(); + return index; + } + else { + // If the element is not + // present in the vector + return -1; + } +} + +void Window::cocosCreate(CCMenu* menu) { + auto back = CCScale9Sprite::create("square02b_small.png"); + back->setContentSize(menu->getContentSize() / 0.5f); + back->setPosition(ccp(0, 0)); + back->setAnchorPoint(ccp(0, 0)); + back->setScale(0.5f); + back->setColor(ccc3(0, 0, 0)); + back->setOpacity(100); + + menu->addChild(back); + + int y = 0; + + float gap = 28; + float extraGap = 9.69f; + float height = gap * roundUpToMultipleOf2((modules.size() - 1) / 2); + height += gap; + + height = std::max(menu->getContentHeight(), height + extraGap); + + auto scroll = geode::ScrollLayer::create(menu->getContentSize()); + scroll->m_peekLimitTop = 15; + scroll->m_peekLimitBottom = 15; + menu->addChild(scroll); + + auto btnMenu = CCMenu::create(); + btnMenu->setContentSize(ccp(menu->getContentWidth(), height)); + btnMenu->setPosition(ccp(0, 0)); + btnMenu->setAnchorPoint(ccp(0, 0)); + scroll->m_contentLayer->addChild(btnMenu); + + int v = 0; + + for (size_t m = 0; m < modules.size(); m++) + { + float x = 20; + + if (!(v % 2 == 0)) + x = 188; + + if (modules[m]) + modules[m]->makeAndroid(btnMenu, {x, height - (gap * y) - (gap / 2) - (extraGap / 2)}); + + if (dynamic_cast(modules[m])) + { + y++; + + if (x == 20) + v++; + } + else + { + if ((v - 1) % 2 == 0 && v != 0) + y++; + } + + v++; + } + + scroll->m_contentLayer->setContentHeight(height); + scroll->moveToTop(); + scroll->enableScrollWheel(); + + //auto scrollbar = geode::Scrollbar::create(scroll); + //scrollbar->setPositionY(menu->getContentHeight() / 2); + //scrollbar->setPositionX(menu->getContentWidth() + 0.5f); + //menu->addChild(scrollbar); +} /* bool draw(ImVec2 tileSize, float anim = 1) diff --git a/src/Client/Window.h b/src/Client/Window.h index 993cb97..64c1b1f 100644 --- a/src/Client/Window.h +++ b/src/Client/Window.h @@ -2,7 +2,6 @@ #include #include "Module.h" -#include "Dropdown.h" #include #include #include "Replay.h" @@ -10,15 +9,13 @@ #include "../Layers/SaveMacroPopup.h" #include "../Layers/LoadMacroPopup.h" #include "../Layers/EditStatusPositionLayer.h" -#include "../Layers/ConfirmFLAlertLayer.h" #include "../Layers/ReplayOptionsLayer.h" #include "../Utils/Utils.hpp" class Client; -class Window -{ +class Window { public: std::string name; std::string id; @@ -36,601 +33,20 @@ class Window bool touchMoved(CCPoint point, CCTouch* touch); bool touchEndedOrCancelled(CCPoint point, CCTouch* touch, bool cancelled); - float quadraticEaseInOut(float t) { - if (t < 0.5f) - return 2 * t * t; - else - return (-2 * t * t) + (4 * t) - 1; - } + float quadraticEaseInOut(float t); void preDraw(); void drawWindow(); void postDraw(); //stolen from stack overflow - int getIndex(std::vector v, float K) - { - auto it = std::find(v.begin(), v.end(), K); - - // If element was found - if (it != v.end()) - { - - // calculating the index - // of K - int index = it - v.begin(); - return index; - } - else { - // If the element is not - // present in the vector - return -1; - } - } + int getIndex(std::vector v, float K); + float clampf(float v, float min, float max); bool a = false; int i = 0; CCPoint offsetForTime(float time); - virtual void cocosCreate(CCMenu* menu) - { - auto back = CCScale9Sprite::create("square02b_small.png"); - back->setContentSize(menu->getContentSize() / 0.5f); - back->setPosition(ccp(0, 0)); - back->setAnchorPoint(ccp(0, 0)); - back->setScale(0.5f); - back->setColor(ccc3(0, 0, 0)); - back->setOpacity(100); - - menu->addChild(back); - - int y = 0; - - float gap = 28; - float extraGap = 9.69f; - float height = gap * roundUpToMultipleOf2((modules.size() - 1) / 2); - height += gap; - - height = std::max(menu->getContentHeight(), height + extraGap); - - auto scroll = geode::ScrollLayer::create(menu->getContentSize()); - scroll->m_peekLimitTop = 15; - scroll->m_peekLimitBottom = 15; - menu->addChild(scroll); - - auto btnMenu = CCMenu::create(); - btnMenu->setContentSize(ccp(menu->getContentWidth(), height)); - btnMenu->setPosition(ccp(0, 0)); - btnMenu->setAnchorPoint(ccp(0, 0)); - scroll->m_contentLayer->addChild(btnMenu); - - int v = 0; - - for (size_t m = 0; m < modules.size(); m++) - { - float x = 20; - - if (!(v % 2 == 0)) - x = 188; - - if (modules[m]) - modules[m]->makeAndroid(btnMenu, {x, height - (gap * y) - (gap / 2) - (extraGap / 2)}); - - if (dynamic_cast(modules[m])) - { - y++; - - if (x == 20) - v++; - } - else - { - if ((v - 1) % 2 == 0 && v != 0) - y++; - } - - v++; - } - - scroll->m_contentLayer->setContentHeight(height); - scroll->moveToTop(); - scroll->enableScrollWheel(); - - //auto scrollbar = geode::Scrollbar::create(scroll); - //scrollbar->setPositionY(menu->getContentHeight() / 2); - //scrollbar->setPositionX(menu->getContentWidth() + 0.5f); - //menu->addChild(scrollbar); - } -}; - -class Speedhack : public Window//, public TextInputDelegate -{ - public: - Speedhack() - { - name = "Speedhack"; - id = "speedhack-window"; - } - - static inline Slider* slider = nullptr; - std::vector presets = - { - 0.1f, 0.25f, 0.3f, 0.50f, 0.75f, 1, 1.50f, 2 - }; - - void clear(CCObject* sender) - { - SpeedhackTop::instance->text = ""; - auto inp = getChildOfType(static_cast(sender)->getParent(), 0); - inp->setString(""); - slider->setValue(unscaleValue(1)); - } - - float scaleValue(float originalValue) { - float minValue = 0.1; - float maxValue = 3.0; - float scaledValue = (maxValue - minValue) * originalValue + minValue; - return scaledValue; - } - - float unscaleValue(float scaledValue) { - float minValue = 0.1; - float maxValue = 3.0; - float originalValue = (scaledValue - minValue) / (maxValue - minValue); - return originalValue; - } - - float clampf(float v, float min, float max) - { - if (v < min) - v = min; - - if (v > max) - v = max; - - return v; - } - - void sliderChanged(CCObject* sender) - { - float v = ((slider->getThumb()->getPositionX() + 100) / 200.0f); - - std::stringstream ss; - ss << round(scaleValue(v) * 100.0) / 100.0; - - auto inp = getChildOfType(static_cast(sender)->getParent()->getParent()->getParent(), 0); - inp->setString(ss.str().c_str()); - SpeedhackTop::instance->text = ss.str(); - - SpeedhackTop::instance->save(); - SpeedhackTop::instance->onChange(); - } - - void onPreset(CCObject* sender) - { - float value = numFromString(as(sender)->getID(), 2).value(); - - SpeedhackTop::instance->text = as(sender)->getID(); - auto inp = getChildOfType(static_cast(sender)->getParent()->getParent(), 0); - inp->setString(as(sender)->getID()); - slider->setValue(unscaleValue(value)); - - SpeedhackTop::instance->save(); - SpeedhackTop::instance->onChange(); - } - - void cocosCreate(CCMenu* menu) - { - float v = 1.0f; - - auto x = numFromString(SpeedhackTop::instance->text); - - if (x.isOk()) - { - v = x.value(); - } - - if (v < 0.01f) - v = 0.01f; - - if (v > 99999) - v = 99999; - - auto back = CCScale9Sprite::create("square02b_small.png"); - back->setContentSize(menu->getContentSize() / 0.5f); - back->setPosition(ccp(0, 0)); - back->setAnchorPoint(ccp(0, 0)); - back->setScale(0.5f); - back->setColor(ccc3(0, 0, 0)); - back->setOpacity(100); - menu->addChild(back); - - slider = Slider::create(menu, menu_selector(Speedhack::sliderChanged)); - slider->setPosition(ccp(menu->getContentSize().width / 2, menu->getContentSize().height - 80)); - slider->setScale(0.875f); - slider->setContentSize(ccp(0, 0)); - slider->ignoreAnchorPointForPosition(false); - slider->setValue(clampf(unscaleValue(v), 0, 1)); - menu->addChild(slider, 2); - - modules[0]->makeAndroid(menu, ccp(menu->getContentSize().width / 2, menu->getContentSize().height - 50) - ccp(180 / 2, 0) + ccp(10, 0)); - - for (size_t i = 1; i < modules.size(); i++) - { - modules[i]->makeAndroid(menu, (ccp(menu->getContentSize().width / 2, menu->getContentSize().height - 110 - (30 * i)) - ccp(180 / 2, 0) + ccp(20, 0)) + ccp(0, 27.5f)); - } - - //static_cast(menu->getChildByID("speedhack-top"))->getInput()->setDelegate(this); - - auto trash = CCMenuItemSpriteExtra::create(CCSprite::createWithSpriteFrameName("GJ_trashBtn_001.png"), menu, menu_selector(Speedhack::clear)); - trash->m_baseScale = 0.725f; - trash->setScale(0.725f); - trash->setPosition(ccp((menu->getContentSize().width / 2) + (180 / 2) + 20, menu->getContentSize().height - 50)); - menu->addChild(trash); - - auto presetMenu = CCMenu::create(); - presetMenu->setScale(0.41f); - presetMenu->setAnchorPoint(ccp(0.5f, 0.5f)); - presetMenu->setPosition(menu->getContentWidth() / 2, 13); - presetMenu->setContentWidth(6969); - presetMenu->setLayout(RowLayout::create()->setGap(15)->setAutoScale(false)); - - for (auto preset : presets) - { - auto btn = ButtonSprite::create(utils::numToString(preset, 2).c_str(), "bigFont.fnt", "GJ_button_05.png"); - auto act = CCMenuItemSpriteExtra::create(btn, menu, menu_selector(Speedhack::onPreset)); - act->setID(numToString(preset, 2)); - - presetMenu->addChild(act); - } - - presetMenu->updateLayout(); - menu->addChild(presetMenu); - } - - virtual void textChanged(CCTextInputNode* p0) - { - SpeedhackTop::instance->text = p0->getString(); - - float v = 1.0f; - - if (SpeedhackTop::instance->text.size() != 0 && !SpeedhackTop::instance->text.ends_with(".")) - { - v = std::stof(SpeedhackTop::instance->text); - } - - if (v < 0.01f) - v = 0.01f; - - if (v > 99999) - v = 99999; - - slider->setValue(clampf(unscaleValue(v), 0, 1)); - - modules[0]->save(); - } -}; - -class Credits : public Window -{ - public: - Credits() - { - name = "Credits"; - id = "credits-window"; - } - - void onCredit(CCObject* sender) - { - auto tag = static_cast(sender)->getID(); - - if (tag.starts_with("gd")) - { - log::info("open gd profile: {}", std::stoi(tag.c_str() + 2)); - ProfilePage::create(std::stoi(tag.c_str() + 2), false)->show(); - } - else - { - CCApplication::sharedApplication()->openURL(tag.c_str()); - } - } - - void createPanel(CCMenu* menu, CCPoint pos, char const * title, char const * name, CCNode* img, float scale, std::string v) - { - auto t = CCLabelBMFont::create(title, "bigFont.fnt"); - t->setPosition(pos + ccp(0, 28)); - t->limitLabelWidth(110, 0.5f, 0.1f); - menu->addChild(t); - - auto n = CCLabelBMFont::create(name, "goldFont.fnt"); - menu->addChild(n); - n->limitLabelWidth(110, 0.5f, 0.1f); - n->setPosition(pos + ccp(0, -28)); - - auto btn = CCMenuItemSpriteExtra::create(img, menu, menu_selector(Credits::onCredit)); - btn->setID(v); - btn->setPosition(pos); - btn->setContentSize(ccp(34, 34)); - menu->addChild(btn); - - img->setPosition(btn->getContentSize() / 2); - img->setScale(scale); - } - - void cocosCreate(CCMenu* menu) - { - auto back = CCScale9Sprite::create("square02_small.png"); - back->setContentSize(menu->getContentSize() / 0.5f); - back->setPosition(ccp(0, 0)); - back->setAnchorPoint(ccp(0, 0)); - back->setScale(0.5f); - back->setOpacity(100); - menu->addChild(back); - - auto promImg = SimplePlayer::create(233); - promImg->setColor({255, 75, 0}); - promImg->setSecondColor({255, 185, 0}); - promImg->setGlowOutline({255, 185, 0}); - promImg->updateColors(); - - createPanel(menu, ccp(55, menu->getContentSize().height - 45), "Name", "PrometheusSV", promImg, 1.0f, "gd7107344"); - - - createPanel(menu, ccp(55 + (230 / 2) * 1, menu->getContentSize().height - 45), "Pastel", "Absolllute", CCSprite::create("absolllute.png"_spr), 0.45f * CCDirector::get()->getContentScaleFactor() * 0.5f * 0.5f, "https://gist.github.com/absoIute/657a4c95bb92755f96e20772adbf5f32"); - - - auto fireeImg = SimplePlayer::create(98); - fireeImg->setColor({125, 0, 255}); - fireeImg->setSecondColor({255, 255, 255}); - fireeImg->setGlowOutline({255, 255, 255}); - fireeImg->updateColors(); - - createPanel(menu, ccp(55 + (230 / 2) * 2, menu->getContentSize().height - 45), "Copy Hack", "FireeDev", fireeImg, 1.0f, "gd6253758"); - - - auto catImg = SimplePlayer::create(98); - catImg->setColor({255, 0, 0}); - catImg->setSecondColor({255, 255, 255}); - catImg->setGlowOutline({0, 255, 255}); - catImg->updateColors(); - - createPanel(menu, ccp(55 + (230 / 2) * 0, menu->getContentSize().height - 45 - (85 * 1)), "", "CatXus", catImg, 1.0f, "gd14467409"); - - - auto kmImg = SimplePlayer::create(233); - kmImg->setColor({255, 125, 0}); - kmImg->setSecondColor({0, 125, 255}); - kmImg->setGlowOutline({255, 255, 255}); - kmImg->updateColors(); - - createPanel(menu, ccp(55 + (230 / 2) * 1, menu->getContentSize().height - 45 - (85 * 1)), "Beta Testers", "km7dev", kmImg, 1.0f, "gd7236822"); - - - auto mkrImg = SimplePlayer::create(242); - mkrImg->setColor({125, 0, 255}); - mkrImg->setSecondColor({185, 0, 255}); - mkrImg->updateColors(); - - createPanel(menu, ccp(55 + (230 / 2) * 2, menu->getContentSize().height - 45 - (85 * 1)), "", "MrMkr", mkrImg, 1.0f, "gd21449475"); - - - auto jaidImg = SimplePlayer::create(373); - jaidImg->setColor({90, 90, 90}); - jaidImg->setSecondColor({182, 0, 255}); - jaidImg->updateColors(); - - createPanel(menu, ccp(55 + (230 / 2) * 0, menu->getContentSize().height - 45 - (85 * 2)), "", "Jaid", jaidImg, 1.0f, "gd7669473"); - - - auto zephImg = SimplePlayer::create(482); - zephImg->setColor({77, 77, 90}); - zephImg->setSecondColor({0, 200, 255}); - zephImg->setGlowOutline({0, 200, 255}); - zephImg->updateColors(); - - createPanel(menu, ccp(55 + (230 / 2) * 1, menu->getContentSize().height - 45 - (85 * 2)), "", "imzeph", zephImg, 1.0f, "gd23948408"); - - - auto devImg = SimplePlayer::create(5); - devImg->setColor({125, 125, 255}); - devImg->setSecondColor({125, 255, 175}); - devImg->setGlowOutline({255, 255, 255}); - devImg->updateColors(); - - createPanel(menu, ccp(55 + (230 / 2) * 2, menu->getContentSize().height - 45 - (85 * 2)), "Developer", "TheSillyDoggo", devImg, 1.0f, "gd16778880"); - } -}; - -class Variables : public Window -{ - public: - Variables() - { - name = "Variables"; - id = "vars-window"; - } - - void onChangeMode(CCObject* sender) - { - log::info("button"); - - //PlayLayer::get()->m_player1->toggleDartMode(true, true); - //PlayLayer::get()->m_player1->m_position += ccp(30, 150); - - //PlayLayer::get()->m_player1->playerDestroyed(false); - - //PlayLayer::get()->destroyPlayer(PlayLayer::get()->m_player1, GameObject::createWithKey(0)); - /* - //why robert - - bool m_isShip; - bool m_isBall; - bool m_isBird; - bool m_isDart; - bool m_isRobot; - bool m_isSpider; - bool m_isSwing; - */ - - //if (!PlayLayer::get() || !PlayLayer::get()->m_player1) - //return; - - //auto plr = PlayLayer::get()->m_player1; - - //int selMode = 5; - - //plr->m_isPlatformer = true; - - //plr->switchedToMode(GameObjectType::BallPortal); - - //plr->toggleRollMode(true, true); - //plr->m_isBall = selMode == 2; - //plr->m_isBird = selMode == 3; - //plr->m_isDart = selMode == 4; - //plr->m_isRobot = selMode == 5; - //plr->m_isSpider = selMode == 6; - //plr->m_isSwing = selMode == 7; - - //plr->updatePlayerFrame(); - //plr->updatePlayerShipFrame(); - } - - void cocosCreate(CCMenu* menu) - { - auto back = CCScale9Sprite::create("square02_small.png"); - back->setContentSize(ccp(110, menu->getContentSize().height) / 0.5f); - back->setPosition(ccp(0, 0)); - back->setAnchorPoint(ccp(0, 0)); - back->setScale(0.5f); - back->setOpacity(100); - - auto btn = CCMenuItemSpriteExtra::create(back, menu, menu_selector(Variables::onChangeMode)); - menu->addChild(btn); - } -}; - -class Uncomplete : public FLAlertLayerProtocol -{ - public: - - virtual void FLAlert_Clicked(FLAlertLayer* p0, bool p1) - { - if (p1) - { - log::info("uncomplete"); - - GJGameLevel* level = nullptr; - - if (PlayLayer::get()) - level = PlayLayer::get()->m_level; - - if (getChildOfType(CCScene::get(), 0)) - level = getChildOfType(CCScene::get(), 0)->m_level; - - if (!level) - return; - - level->m_normalPercent = 0; - level->m_practicePercent = 0; - level->m_attempts = 0; - level->m_jumps = 0; - } - } - - void onToggle(CCObject* sender) - { - auto btn = as(sender); - - log::info("dont show: {}", !btn->isToggled()); - - Mod::get()->setSavedValue("uncomplete-dont-show", !btn->isToggled()); - } -}; - -class Level : public Window -{ - public: - void onFix(CCObject*) - { - if (PlayLayer::get()) - { - PlayLayer::get()->m_level->m_levelType = GJLevelType::Saved; - - // fucking disgusting - if ((PlayLayer::get()->m_level->m_levelID > 0 && PlayLayer::get()->m_level->m_levelID < 127) || PlayLayer::get()->m_level->m_levelID == 3001 || PlayLayer::get()->m_level->m_levelID == 5001 || PlayLayer::get()->m_level->m_levelID == 5002 || PlayLayer::get()->m_level->m_levelID == 5003 || PlayLayer::get()->m_level->m_levelID == 5004) - { - PlayLayer::get()->m_level->m_levelType = GJLevelType::Local; - } - - if (PlayLayer::get()->m_level->m_levelID == 0) - PlayLayer::get()->m_level->m_levelType = GJLevelType::Editor; - } - } - - void onFPS(CCObject*) - { - - } - - void onUnc(CCObject* sender) - { - if (!(PlayLayer::get() || getChildOfType(CCScene::get(), 0))) - return FLAlertLayer::create("Uncomplete Level", "You must be in a level or on a level page to uncomplete a level", "OK")->show(); - - auto protocol = new Uncomplete(); - - if (Mod::get()->getSavedValue("uncomplete-dont-show", false) && !CCKeyboardDispatcher::get()->getShiftKeyPressed()) - { - protocol->FLAlert_Clicked(nullptr, true); - } - else - { - auto alert = ConfirmFLAlertLayer::create(protocol, "Uncomplete Level", "Don't show this popup again", false, menu_selector(Uncomplete::onToggle), "Are you sure you want to uncomplete this level? Uncompleting a level will:\n- Reset Attempts\n- Reset Percentage\n- Reset Jumps", "Cancel", "Reset", 350, false, 310, 1.0f); - alert->show(); - } - } - - void cocosCreate(CCMenu* menu) - { - Window::cocosCreate(menu); - - /*auto btnS = ButtonSprite::create("FPS\nBypass", 60, false, "bigFont.fnt", "GJ_button_05.png", 35, 0.75f); - as(btnS->getChildren()->objectAtIndex(0))->setScale(0.375f); - as(btnS->getChildren()->objectAtIndex(0))->setAlignment(CCTextAlignment::kCCTextAlignmentCenter); - as(btnS->getChildren()->objectAtIndex(0))->updateLabel(); - auto btn = CCMenuItemSpriteExtra::create(btnS, menu, menu_selector(Level::onFPS)); - btn->setSizeMult(1.15f); - btn->setPosition(pos); - menu->addChild(btn);*/ - } -}; - -class Universal : public Window -{ - public: - void onTransCustomizer(CCObject*) - { - - } - - void cocosCreate(CCMenu* menu) - { - Window::cocosCreate(menu); - - auto pos = ccp(menu->getContentSize().width, 0) + ccp(-58, 22); - - CCMenuItemSpriteExtra* btn = nullptr; - - auto btnUnc = ButtonSprite::create("Uncomplete\nLevel", 70, false, "bigFont.fnt", "GJ_button_05.png", 35, 0.75f); - - as(btnUnc->getChildren()->objectAtIndex(0))->setScale(0.375f); - as(btnUnc->getChildren()->objectAtIndex(0))->setAlignment(CCTextAlignment::kCCTextAlignmentCenter); - as(btnUnc->getChildren()->objectAtIndex(0))->updateLabel(); - - btn = CCMenuItemSpriteExtra::create(btnUnc, menu, menu_selector(Level::onUnc)); - btn->setSizeMult(1.15f); - btn->setPosition(pos); - menu->addChild(btn); - } + virtual void cocosCreate(CCMenu* menu); }; \ No newline at end of file diff --git a/src/Client/Windows/All.h b/src/Client/Windows/All.h new file mode 100644 index 0000000..5e57550 --- /dev/null +++ b/src/Client/Windows/All.h @@ -0,0 +1,8 @@ +#pragma once + +#include "Credits.h" +#include "Level.h" +#include "Speedhack.h" +#include "Uncomplete.h" +#include "Universal.h" +#include "Variables.h" \ No newline at end of file diff --git a/src/Client/Windows/Credits.cpp b/src/Client/Windows/Credits.cpp new file mode 100644 index 0000000..fd9451f --- /dev/null +++ b/src/Client/Windows/Credits.cpp @@ -0,0 +1,119 @@ +#include "Credits.h" + +using namespace geode::prelude; + +void Credits::onCredit(CCObject* sender) { + auto tag = static_cast(sender)->getID(); + + if (tag.starts_with("gd")) + { + log::info("open gd profile: {}", std::stoi(tag.c_str() + 2)); + ProfilePage::create(std::stoi(tag.c_str() + 2), false)->show(); + } + else + { + CCApplication::sharedApplication()->openURL(tag.c_str()); + } +} + +void Credits::createPanel(CCMenu* menu, CCPoint pos, char const * title, char const * name, CCNode* img, float scale, std::string v) { + auto t = CCLabelBMFont::create(title, "bigFont.fnt"); + t->setPosition(pos + ccp(0, 28)); + t->limitLabelWidth(110, 0.5f, 0.1f); + menu->addChild(t); + + auto n = CCLabelBMFont::create(name, "goldFont.fnt"); + menu->addChild(n); + n->limitLabelWidth(110, 0.5f, 0.1f); + n->setPosition(pos + ccp(0, -28)); + + auto btn = CCMenuItemSpriteExtra::create(img, menu, menu_selector(Credits::onCredit)); + btn->setID(v); + btn->setPosition(pos); + btn->setContentSize(ccp(34, 34)); + menu->addChild(btn); + + img->setPosition(btn->getContentSize() / 2); + img->setScale(scale); +} + +void Credits::cocosCreate(CCMenu* menu) { + auto back = CCScale9Sprite::create("square02_small.png"); + back->setContentSize(menu->getContentSize() / 0.5f); + back->setPosition(ccp(0, 0)); + back->setAnchorPoint(ccp(0, 0)); + back->setScale(0.5f); + back->setOpacity(100); + menu->addChild(back); + + auto promImg = SimplePlayer::create(233); + promImg->setColor({255, 75, 0}); + promImg->setSecondColor({255, 185, 0}); + promImg->setGlowOutline({255, 185, 0}); + promImg->updateColors(); + + createPanel(menu, ccp(55, menu->getContentSize().height - 45), "Name", "PrometheusSV", promImg, 1.0f, "gd7107344"); + + createPanel(menu, ccp(55 + (230 / 2) * 1, menu->getContentSize().height - 45), "Pastel", "Absolllute", CCSprite::create("absolllute.png"_spr), 0.45f * CCDirector::get()->getContentScaleFactor() * 0.5f * 0.5f, "https://gist.github.com/absoIute/657a4c95bb92755f96e20772adbf5f32"); + + + auto fireeImg = SimplePlayer::create(98); + fireeImg->setColor({125, 0, 255}); + fireeImg->setSecondColor({255, 255, 255}); + fireeImg->setGlowOutline({255, 255, 255}); + fireeImg->updateColors(); + + createPanel(menu, ccp(55 + (230 / 2) * 2, menu->getContentSize().height - 45), "Copy Hack", "FireeDev", fireeImg, 1.0f, "gd6253758"); + + + auto catImg = SimplePlayer::create(98); + catImg->setColor({255, 0, 0}); + catImg->setSecondColor({255, 255, 255}); + catImg->setGlowOutline({0, 255, 255}); + catImg->updateColors(); + + createPanel(menu, ccp(55 + (230 / 2) * 0, menu->getContentSize().height - 45 - (85 * 1)), "", "CatXus", catImg, 1.0f, "gd14467409"); + + + auto kmImg = SimplePlayer::create(233); + kmImg->setColor({255, 125, 0}); + kmImg->setSecondColor({0, 125, 255}); + kmImg->setGlowOutline({255, 255, 255}); + kmImg->updateColors(); + + createPanel(menu, ccp(55 + (230 / 2) * 1, menu->getContentSize().height - 45 - (85 * 1)), "Beta Testers", "km7dev", kmImg, 1.0f, "gd7236822"); + + + auto mkrImg = SimplePlayer::create(242); + mkrImg->setColor({125, 0, 255}); + mkrImg->setSecondColor({185, 0, 255}); + mkrImg->updateColors(); + + createPanel(menu, ccp(55 + (230 / 2) * 2, menu->getContentSize().height - 45 - (85 * 1)), "", "MrMkr", mkrImg, 1.0f, "gd21449475"); + + + auto jaidImg = SimplePlayer::create(373); + jaidImg->setColor({90, 90, 90}); + jaidImg->setSecondColor({182, 0, 255}); + jaidImg->updateColors(); + + createPanel(menu, ccp(55 + (230 / 2) * 0, menu->getContentSize().height - 45 - (85 * 2)), "", "Jaid", jaidImg, 1.0f, "gd7669473"); + + + auto zephImg = SimplePlayer::create(482); + zephImg->setColor({77, 77, 90}); + zephImg->setSecondColor({0, 200, 255}); + zephImg->setGlowOutline({0, 200, 255}); + zephImg->updateColors(); + + createPanel(menu, ccp(55 + (230 / 2) * 1, menu->getContentSize().height - 45 - (85 * 2)), "", "imzeph", zephImg, 1.0f, "gd23948408"); + + + auto devImg = SimplePlayer::create(5); + devImg->setColor({125, 125, 255}); + devImg->setSecondColor({125, 255, 175}); + devImg->setGlowOutline({255, 255, 255}); + devImg->updateColors(); + + createPanel(menu, ccp(55 + (230 / 2) * 2, menu->getContentSize().height - 45 - (85 * 2)), "Developer", "TheSillyDoggo", devImg, 1.0f, "gd16778880"); +} \ No newline at end of file diff --git a/src/Client/Windows/Credits.h b/src/Client/Windows/Credits.h new file mode 100644 index 0000000..12913a5 --- /dev/null +++ b/src/Client/Windows/Credits.h @@ -0,0 +1,17 @@ +#pragma once + +#include "../Window.h" + +class Credits : public Window { +public: + Credits() { + name = "Credits"; + id = "credits-window"; + } + + void onCredit(CCObject* sender); + + void createPanel(CCMenu* menu, CCPoint pos, char const * title, char const * name, CCNode* img, float scale, std::string v); + + void cocosCreate(CCMenu* menu); +}; \ No newline at end of file diff --git a/src/Client/Windows/Level.cpp b/src/Client/Windows/Level.cpp new file mode 100644 index 0000000..f514363 --- /dev/null +++ b/src/Client/Windows/Level.cpp @@ -0,0 +1,39 @@ +#include "Level.h" +#include "Uncomplete.h" +#include "../../Layers/ConfirmFLAlertLayer.h" + +using namespace geode::prelude; + +void Level::onFix(CCObject*) +{ + if (PlayLayer::get()) + { + PlayLayer::get()->m_level->m_levelType = GJLevelType::Saved; + + // fucking disgusting + if ((PlayLayer::get()->m_level->m_levelID > 0 && PlayLayer::get()->m_level->m_levelID < 127) || PlayLayer::get()->m_level->m_levelID == 3001 || PlayLayer::get()->m_level->m_levelID == 5001 || PlayLayer::get()->m_level->m_levelID == 5002 || PlayLayer::get()->m_level->m_levelID == 5003 || PlayLayer::get()->m_level->m_levelID == 5004) + { + PlayLayer::get()->m_level->m_levelType = GJLevelType::Local; + } + + if (PlayLayer::get()->m_level->m_levelID == 0) + PlayLayer::get()->m_level->m_levelType = GJLevelType::Editor; + } +} + +void Level::onUnc(CCObject* sender) { + if (!(PlayLayer::get() || getChildOfType(CCScene::get(), 0))) + return FLAlertLayer::create("Uncomplete Level", "You must be in a level or on a level page to uncomplete a level", "OK")->show(); + + auto protocol = new Uncomplete(); + + if (Mod::get()->getSavedValue("uncomplete-dont-show", false) && !CCKeyboardDispatcher::get()->getShiftKeyPressed()) + { + protocol->FLAlert_Clicked(nullptr, true); + } + else + { + auto alert = ConfirmFLAlertLayer::create(protocol, "Uncomplete Level", "Don't show this popup again", false, menu_selector(Uncomplete::onToggle), "Are you sure you want to uncomplete this level? Uncompleting a level will:\n- Reset Attempts\n- Reset Percentage\n- Reset Jumps", "Cancel", "Reset", 350, false, 310, 1.0f); + alert->show(); + } +} \ No newline at end of file diff --git a/src/Client/Windows/Level.h b/src/Client/Windows/Level.h new file mode 100644 index 0000000..37e055c --- /dev/null +++ b/src/Client/Windows/Level.h @@ -0,0 +1,12 @@ +#pragma once + +#include "../Window.h" + +class Level : public Window { +public: + void onFix(CCObject*); + + void onFPS(CCObject*) {} + + void onUnc(CCObject* sender); +}; \ No newline at end of file diff --git a/src/Client/Windows/Speedhack.cpp b/src/Client/Windows/Speedhack.cpp new file mode 100644 index 0000000..4b2c87e --- /dev/null +++ b/src/Client/Windows/Speedhack.cpp @@ -0,0 +1,139 @@ +#include "Speedhack.h" + +using namespace geode::prelude; + +void Speedhack::clear(CCObject* sender) { + SpeedhackTop::instance->text = ""; + auto inp = getChildOfType(static_cast(sender)->getParent(), 0); + inp->setString(""); + slider->setValue(unscaleValue(1)); +} + +float Speedhack::scaleValue(float originalValue) { + float minValue = 0.1; + float maxValue = 3.0; + float scaledValue = (maxValue - minValue) * originalValue + minValue; + return scaledValue; +} + +float Speedhack::unscaleValue(float scaledValue) { + float minValue = 0.1; + float maxValue = 3.0; + float originalValue = (scaledValue - minValue) / (maxValue - minValue); + return originalValue; +} + +void Speedhack::sliderChanged(CCObject* sender) { + float v = ((slider->getThumb()->getPositionX() + 100) / 200.0f); + + std::stringstream ss; + ss << round(scaleValue(v) * 100.0) / 100.0; + + auto inp = getChildOfType(static_cast(sender)->getParent()->getParent()->getParent(), 0); + inp->setString(ss.str().c_str()); + SpeedhackTop::instance->text = ss.str(); + + SpeedhackTop::instance->save(); + SpeedhackTop::instance->onChange(); +} + +void Speedhack::onPreset(CCObject* sender) { + float value = numFromString(as(sender)->getID(), 2).value(); + + SpeedhackTop::instance->text = as(sender)->getID(); + auto inp = getChildOfType(static_cast(sender)->getParent()->getParent(), 0); + inp->setString(as(sender)->getID()); + slider->setValue(unscaleValue(value)); + + SpeedhackTop::instance->save(); + SpeedhackTop::instance->onChange(); +} + +void Speedhack::cocosCreate(CCMenu* menu) { + float v = 1.0f; + + auto x = numFromString(SpeedhackTop::instance->text); + + if (x.isOk()) + { + v = x.value(); + } + + if (v < 0.01f) + v = 0.01f; + + if (v > 99999) + v = 99999; + + auto back = CCScale9Sprite::create("square02b_small.png"); + back->setContentSize(menu->getContentSize() / 0.5f); + back->setPosition(ccp(0, 0)); + back->setAnchorPoint(ccp(0, 0)); + back->setScale(0.5f); + back->setColor(ccc3(0, 0, 0)); + back->setOpacity(100); + menu->addChild(back); + + slider = Slider::create(menu, menu_selector(Speedhack::sliderChanged)); + slider->setPosition(ccp(menu->getContentSize().width / 2, menu->getContentSize().height - 80)); + slider->setScale(0.875f); + slider->setContentSize(ccp(0, 0)); + slider->ignoreAnchorPointForPosition(false); + slider->setValue(clampf(unscaleValue(v), 0, 1)); + menu->addChild(slider, 2); + + modules[0]->makeAndroid(menu, ccp(menu->getContentSize().width / 2, menu->getContentSize().height - 50) - ccp(180 / 2, 0) + ccp(10, 0)); + + for (size_t i = 1; i < modules.size(); i++) + { + modules[i]->makeAndroid(menu, (ccp(menu->getContentSize().width / 2, menu->getContentSize().height - 110 - (30 * i)) - ccp(180 / 2, 0) + ccp(20, 0)) + ccp(0, 27.5f)); + } + + //static_cast(menu->getChildByID("speedhack-top"))->getInput()->setDelegate(this); + + auto trash = CCMenuItemSpriteExtra::create(CCSprite::createWithSpriteFrameName("GJ_trashBtn_001.png"), menu, menu_selector(Speedhack::clear)); + trash->m_baseScale = 0.725f; + trash->setScale(0.725f); + trash->setPosition(ccp((menu->getContentSize().width / 2) + (180 / 2) + 20, menu->getContentSize().height - 50)); + menu->addChild(trash); + + auto presetMenu = CCMenu::create(); + presetMenu->setScale(0.41f); + presetMenu->setAnchorPoint(ccp(0.5f, 0.5f)); + presetMenu->setPosition(menu->getContentWidth() / 2, 13); + presetMenu->setContentWidth(6969); + presetMenu->setLayout(RowLayout::create()->setGap(15)->setAutoScale(false)); + + for (auto preset : presets) + { + auto btn = ButtonSprite::create(utils::numToString(preset, 2).c_str(), "bigFont.fnt", "GJ_button_05.png"); + auto act = CCMenuItemSpriteExtra::create(btn, menu, menu_selector(Speedhack::onPreset)); + act->setID(numToString(preset, 2)); + + presetMenu->addChild(act); + } + + presetMenu->updateLayout(); + menu->addChild(presetMenu); +} + +void Speedhack::textChanged(CCTextInputNode* p0) { + SpeedhackTop::instance->text = p0->getString(); + + float v = 1.0f; + + if (SpeedhackTop::instance->text.size() != 0 && !SpeedhackTop::instance->text.ends_with(".")) + { + v = std::stof(SpeedhackTop::instance->text); + } + + if (v < 0.01f) + v = 0.01f; + + if (v > 99999) + v = 99999; + + slider->setValue(clampf(unscaleValue(v), 0, 1)); + + modules[0]->save(); +} \ No newline at end of file diff --git a/src/Client/Windows/Speedhack.h b/src/Client/Windows/Speedhack.h new file mode 100644 index 0000000..755cb63 --- /dev/null +++ b/src/Client/Windows/Speedhack.h @@ -0,0 +1,28 @@ +#pragma once + +#include "../Window.h" + +class Speedhack : public Window { +public: + Speedhack() { + name = "Speedhack"; + id = "speedhack-window"; + } + + static inline Slider* slider = nullptr; + std::vector presets = { 0.1f, 0.25f, 0.3f, 0.50f, 0.75f, 1, 1.50f, 2 }; + + void clear(CCObject* sender); + + float scaleValue(float originalValue); + + float unscaleValue(float scaledValue); + + void sliderChanged(CCObject* sender); + + void onPreset(CCObject* sender); + + void cocosCreate(CCMenu* menu); + + virtual void textChanged(CCTextInputNode* p0); +}; \ No newline at end of file diff --git a/src/Client/Windows/Uncomplete.cpp b/src/Client/Windows/Uncomplete.cpp new file mode 100644 index 0000000..97453da --- /dev/null +++ b/src/Client/Windows/Uncomplete.cpp @@ -0,0 +1,34 @@ +#include "Uncomplete.h" + +using namespace geode::prelude; + +void Uncomplete::FLAlert_Clicked(FLAlertLayer* p0, bool p1) { + if (p1) + { + log::info("uncomplete"); + + GJGameLevel* level = nullptr; + + if (PlayLayer::get()) + level = PlayLayer::get()->m_level; + + if (getChildOfType(CCScene::get(), 0)) + level = getChildOfType(CCScene::get(), 0)->m_level; + + if (!level) + return; + + level->m_normalPercent = 0; + level->m_practicePercent = 0; + level->m_attempts = 0; + level->m_jumps = 0; + } +} + +void Uncomplete::onToggle(CCObject* sender) { + auto btn = as(sender); + + log::info("dont show: {}", !btn->isToggled()); + + Mod::get()->setSavedValue("uncomplete-dont-show", !btn->isToggled()); +} \ No newline at end of file diff --git a/src/Client/Windows/Uncomplete.h b/src/Client/Windows/Uncomplete.h new file mode 100644 index 0000000..2df9ea1 --- /dev/null +++ b/src/Client/Windows/Uncomplete.h @@ -0,0 +1,11 @@ +#pragma once + +#include "../Window.h" + +class Uncomplete : public FLAlertLayerProtocol { +public: + + virtual void FLAlert_Clicked(FLAlertLayer* p0, bool p1); + + void onToggle(CCObject* sender); +}; \ No newline at end of file diff --git a/src/Client/Windows/Universal.cpp b/src/Client/Windows/Universal.cpp new file mode 100644 index 0000000..e70afb0 --- /dev/null +++ b/src/Client/Windows/Universal.cpp @@ -0,0 +1,23 @@ +#include "Universal.h" +#include "Level.h" + +using namespace geode::prelude; + +void Universal::cocosCreate(CCMenu* menu) { + Window::cocosCreate(menu); + + auto pos = ccp(menu->getContentSize().width, 0) + ccp(-58, 22); + + CCMenuItemSpriteExtra* btn = nullptr; + + auto btnUnc = ButtonSprite::create("Uncomplete\nLevel", 70, false, "bigFont.fnt", "GJ_button_05.png", 35, 0.75f); + + as(btnUnc->getChildren()->objectAtIndex(0))->setScale(0.375f); + as(btnUnc->getChildren()->objectAtIndex(0))->setAlignment(CCTextAlignment::kCCTextAlignmentCenter); + as(btnUnc->getChildren()->objectAtIndex(0))->updateLabel(); + + btn = CCMenuItemSpriteExtra::create(btnUnc, menu, menu_selector(Level::onUnc)); + btn->setSizeMult(1.15f); + btn->setPosition(pos); + menu->addChild(btn); +} \ No newline at end of file diff --git a/src/Client/Windows/Universal.h b/src/Client/Windows/Universal.h new file mode 100644 index 0000000..b82bc69 --- /dev/null +++ b/src/Client/Windows/Universal.h @@ -0,0 +1,10 @@ +#pragma once + +#include "../Window.h" + +class Universal : public Window { +public: + void onTransCustomizer(CCObject*) {} + + void cocosCreate(CCMenu* menu); +}; \ No newline at end of file diff --git a/src/Client/Windows/Variables.cpp b/src/Client/Windows/Variables.cpp new file mode 100644 index 0000000..5e3c77c --- /dev/null +++ b/src/Client/Windows/Variables.cpp @@ -0,0 +1,59 @@ +#include "Variables.h" + +using namespace geode::prelude; + +void Variables::onChangeMode(CCObject* sender) { + log::info("button"); + + //PlayLayer::get()->m_player1->toggleDartMode(true, true); + //PlayLayer::get()->m_player1->m_position += ccp(30, 150); + + //PlayLayer::get()->m_player1->playerDestroyed(false); + + //PlayLayer::get()->destroyPlayer(PlayLayer::get()->m_player1, GameObject::createWithKey(0)); + /* + //why robert + + bool m_isShip; + bool m_isBall; + bool m_isBird; + bool m_isDart; + bool m_isRobot; + bool m_isSpider; + bool m_isSwing; + */ + + //if (!PlayLayer::get() || !PlayLayer::get()->m_player1) + //return; + + //auto plr = PlayLayer::get()->m_player1; + + //int selMode = 5; + + //plr->m_isPlatformer = true; + + //plr->switchedToMode(GameObjectType::BallPortal); + + //plr->toggleRollMode(true, true); + //plr->m_isBall = selMode == 2; + //plr->m_isBird = selMode == 3; + //plr->m_isDart = selMode == 4; + //plr->m_isRobot = selMode == 5; + //plr->m_isSpider = selMode == 6; + //plr->m_isSwing = selMode == 7; + + //plr->updatePlayerFrame(); + //plr->updatePlayerShipFrame(); +} + +void cocosCreate(CCMenu* menu) { + auto back = CCScale9Sprite::create("square02_small.png"); + back->setContentSize(ccp(110, menu->getContentSize().height) / 0.5f); + back->setPosition(ccp(0, 0)); + back->setAnchorPoint(ccp(0, 0)); + back->setScale(0.5f); + back->setOpacity(100); + + auto btn = CCMenuItemSpriteExtra::create(back, menu, menu_selector(Variables::onChangeMode)); + menu->addChild(btn); +} \ No newline at end of file diff --git a/src/Client/Windows/Variables.h b/src/Client/Windows/Variables.h new file mode 100644 index 0000000..45d808b --- /dev/null +++ b/src/Client/Windows/Variables.h @@ -0,0 +1,15 @@ +#pragma once + +#include "../Window.h" + +class Variables : public Window { +public: + Variables() { + name = "Variables"; + id = "vars-window"; + } + + void onChangeMode(CCObject* sender); + + void cocosCreate(CCMenu* menu); +}; \ No newline at end of file diff --git a/src/CustomWindows/Config.h b/src/CustomWindows/Config.h index f309060..b669d71 100644 --- a/src/CustomWindows/Config.h +++ b/src/CustomWindows/Config.h @@ -1,6 +1,7 @@ #pragma once #include "../Client/Client.h" +#include "../Client/Dropdown.h" #include "../Utils/CCPastelLabelBMFont.hpp" class Config : public Window From 7dd07b24b9644422683029632785954352b9b1af Mon Sep 17 00:00:00 2001 From: Capeling <113705504+Capeling@users.noreply.github.com> Date: Fri, 12 Jul 2024 14:47:15 +0930 Subject: [PATCH 2/4] .hpp --- src/Client/ClientSetup.h | 2 +- src/Client/Windows/All.h | 12 ++++++------ src/Client/Windows/{Credits.h => Credits.hpp} | 0 src/Client/Windows/{Level.h => Level.hpp} | 0 src/Client/Windows/{Speedhack.h => Speedhack.hpp} | 0 src/Client/Windows/{Uncomplete.h => Uncomplete.hpp} | 0 src/Client/Windows/{Universal.h => Universal.hpp} | 0 src/Client/Windows/{Variables.h => Variables.hpp} | 0 8 files changed, 7 insertions(+), 7 deletions(-) rename src/Client/Windows/{Credits.h => Credits.hpp} (100%) rename src/Client/Windows/{Level.h => Level.hpp} (100%) rename src/Client/Windows/{Speedhack.h => Speedhack.hpp} (100%) rename src/Client/Windows/{Uncomplete.h => Uncomplete.hpp} (100%) rename src/Client/Windows/{Universal.h => Universal.hpp} (100%) rename src/Client/Windows/{Variables.h => Variables.hpp} (100%) diff --git a/src/Client/ClientSetup.h b/src/Client/ClientSetup.h index 5b15a33..1a823ab 100644 --- a/src/Client/ClientSetup.h +++ b/src/Client/ClientSetup.h @@ -1,6 +1,6 @@ #pragma once -#include "Windows/All.h" +#include "Windows/all.h" #include "../CustomWindows/Config.h" #include "Client.h" #include "HitboxesModule.h" diff --git a/src/Client/Windows/All.h b/src/Client/Windows/All.h index 5e57550..4ff53be 100644 --- a/src/Client/Windows/All.h +++ b/src/Client/Windows/All.h @@ -1,8 +1,8 @@ #pragma once -#include "Credits.h" -#include "Level.h" -#include "Speedhack.h" -#include "Uncomplete.h" -#include "Universal.h" -#include "Variables.h" \ No newline at end of file +#include "Credits.hpp" +#include "Level.hpp" +#include "Speedhack.hpp" +#include "Uncomplete.hpp" +#include "Universal.hpp" +#include "Variables.hpp" \ No newline at end of file diff --git a/src/Client/Windows/Credits.h b/src/Client/Windows/Credits.hpp similarity index 100% rename from src/Client/Windows/Credits.h rename to src/Client/Windows/Credits.hpp diff --git a/src/Client/Windows/Level.h b/src/Client/Windows/Level.hpp similarity index 100% rename from src/Client/Windows/Level.h rename to src/Client/Windows/Level.hpp diff --git a/src/Client/Windows/Speedhack.h b/src/Client/Windows/Speedhack.hpp similarity index 100% rename from src/Client/Windows/Speedhack.h rename to src/Client/Windows/Speedhack.hpp diff --git a/src/Client/Windows/Uncomplete.h b/src/Client/Windows/Uncomplete.hpp similarity index 100% rename from src/Client/Windows/Uncomplete.h rename to src/Client/Windows/Uncomplete.hpp diff --git a/src/Client/Windows/Universal.h b/src/Client/Windows/Universal.hpp similarity index 100% rename from src/Client/Windows/Universal.h rename to src/Client/Windows/Universal.hpp diff --git a/src/Client/Windows/Variables.h b/src/Client/Windows/Variables.hpp similarity index 100% rename from src/Client/Windows/Variables.h rename to src/Client/Windows/Variables.hpp From cb4f6a0b71ca638d256734be8dcdca28eb182006 Mon Sep 17 00:00:00 2001 From: Capeling <113705504+Capeling@users.noreply.github.com> Date: Fri, 12 Jul 2024 14:48:21 +0930 Subject: [PATCH 3/4] whoops --- src/Client/Windows/Credits.cpp | 2 +- src/Client/Windows/Level.cpp | 4 ++-- src/Client/Windows/Speedhack.cpp | 2 +- src/Client/Windows/Uncomplete.cpp | 2 +- src/Client/Windows/Universal.cpp | 4 ++-- src/Client/Windows/Variables.cpp | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Client/Windows/Credits.cpp b/src/Client/Windows/Credits.cpp index fd9451f..e22c878 100644 --- a/src/Client/Windows/Credits.cpp +++ b/src/Client/Windows/Credits.cpp @@ -1,4 +1,4 @@ -#include "Credits.h" +#include "Credits.hpp" using namespace geode::prelude; diff --git a/src/Client/Windows/Level.cpp b/src/Client/Windows/Level.cpp index f514363..ad210ad 100644 --- a/src/Client/Windows/Level.cpp +++ b/src/Client/Windows/Level.cpp @@ -1,5 +1,5 @@ -#include "Level.h" -#include "Uncomplete.h" +#include "Level.hpp" +#include "Uncomplete.hpp" #include "../../Layers/ConfirmFLAlertLayer.h" using namespace geode::prelude; diff --git a/src/Client/Windows/Speedhack.cpp b/src/Client/Windows/Speedhack.cpp index 4b2c87e..81f0522 100644 --- a/src/Client/Windows/Speedhack.cpp +++ b/src/Client/Windows/Speedhack.cpp @@ -1,4 +1,4 @@ -#include "Speedhack.h" +#include "Speedhack.hpp" using namespace geode::prelude; diff --git a/src/Client/Windows/Uncomplete.cpp b/src/Client/Windows/Uncomplete.cpp index 97453da..a8c738b 100644 --- a/src/Client/Windows/Uncomplete.cpp +++ b/src/Client/Windows/Uncomplete.cpp @@ -1,4 +1,4 @@ -#include "Uncomplete.h" +#include "Uncomplete.hpp" using namespace geode::prelude; diff --git a/src/Client/Windows/Universal.cpp b/src/Client/Windows/Universal.cpp index e70afb0..cf99ec5 100644 --- a/src/Client/Windows/Universal.cpp +++ b/src/Client/Windows/Universal.cpp @@ -1,5 +1,5 @@ -#include "Universal.h" -#include "Level.h" +#include "Universal.hpp" +#include "Level.hpp" using namespace geode::prelude; diff --git a/src/Client/Windows/Variables.cpp b/src/Client/Windows/Variables.cpp index 5e3c77c..4f51b03 100644 --- a/src/Client/Windows/Variables.cpp +++ b/src/Client/Windows/Variables.cpp @@ -1,4 +1,4 @@ -#include "Variables.h" +#include "Variables.hpp" using namespace geode::prelude; From 70a154543cd8db264a06c152d38e1d86c9415a26 Mon Sep 17 00:00:00 2001 From: Capeling <113705504+Capeling@users.noreply.github.com> Date: Fri, 12 Jul 2024 15:05:45 +0930 Subject: [PATCH 4/4] womp --- src/Client/ClientSetup.h | 2 +- src/Client/Windows/{All.h => all.hpp} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename src/Client/Windows/{All.h => all.hpp} (100%) diff --git a/src/Client/ClientSetup.h b/src/Client/ClientSetup.h index 1a823ab..4a8a725 100644 --- a/src/Client/ClientSetup.h +++ b/src/Client/ClientSetup.h @@ -1,6 +1,6 @@ #pragma once -#include "Windows/all.h" +#include "Windows/all.hpp" #include "../CustomWindows/Config.h" #include "Client.h" #include "HitboxesModule.h" diff --git a/src/Client/Windows/All.h b/src/Client/Windows/all.hpp similarity index 100% rename from src/Client/Windows/All.h rename to src/Client/Windows/all.hpp