From 30d970171188ad3e03b6ade0204110860cb2e45b Mon Sep 17 00:00:00 2001 From: Cheeseworks Date: Fri, 20 Feb 2026 08:51:37 -0500 Subject: [PATCH 1/2] everything..... --- CMakeLists.txt | 2 +- README.md | 2 +- about.md | 2 +- include/Events.hpp | 39 +-- include/Horrible.hpp | 30 +- include/Option.hpp | 2 +- include/OptionalAPI.hpp | 40 +-- mod.json | 35 +-- src/Keybinds.cpp | 33 -- src/Utils.hpp | 41 --- src/classes/Options.hpp | 6 +- src/classes/src/Jumpscares.cpp | 4 +- src/classes/src/Options.cpp | 6 +- src/classes/ui/MathQuiz.hpp | 10 +- src/classes/ui/RandomAd.hpp | 4 +- src/classes/ui/SpamChallenge.hpp | 4 +- src/classes/ui/src/MathQuiz.cpp | 54 ++-- src/classes/ui/src/RandomAd.cpp | 8 +- src/classes/ui/src/SpamChallenge.cpp | 10 +- src/hooks/Achievement.cpp | 22 +- src/hooks/Dementia.cpp | 15 +- src/hooks/GJBaseGameLayer/FakeCrash.cpp | 13 +- src/hooks/GJBaseGameLayer/RandomNoJump.cpp | 13 +- src/hooks/GJBaseGameLayer/TimewarpJump.cpp | 11 +- src/hooks/Mock.cpp | 34 +- src/hooks/Parry.cpp | 22 +- src/hooks/Placebo.cpp | 11 +- src/hooks/PlayLayer/Adverts.cpp | 24 +- src/hooks/PlayLayer/BlackScreen.cpp | 11 +- src/hooks/PlayLayer/BlinkingIcon.cpp | 11 +- src/hooks/PlayLayer/Confetti.cpp | 25 +- src/hooks/PlayLayer/CrashGame.cpp | 13 +- src/hooks/PlayLayer/Earthquake.cpp | 11 +- src/hooks/PlayLayer/FakeDeath.cpp | 11 +- src/hooks/PlayLayer/Flipped.cpp | 13 +- src/hooks/PlayLayer/ForceLevels.cpp | 26 +- src/hooks/PlayLayer/Freeze.cpp | 66 +++- src/hooks/PlayLayer/FreezeFPS.cpp | 69 ---- src/hooks/PlayLayer/Friends.cpp | 11 +- src/hooks/PlayLayer/Gambler.cpp | 11 +- src/hooks/PlayLayer/Health.cpp | 13 +- src/hooks/PlayLayer/Math.cpp | 26 +- src/hooks/PlayLayer/Motivation.cpp | 24 +- src/hooks/PlayLayer/Oxygen.cpp | 13 +- src/hooks/PlayLayer/Pause.cpp | 13 +- src/hooks/PlayLayer/RandomMirror.cpp | 15 +- src/hooks/PlayLayer/Spam.cpp | 26 +- src/hooks/PlayLayer/UpsideDown.cpp | 13 +- src/hooks/PlayerObject/ClickSpeed.cpp | 11 +- src/hooks/PlayerObject/DoubleJump.cpp | 19 +- src/hooks/PlayerObject/Gravity.cpp | 11 +- src/hooks/PlayerObject/OnIce.cpp | 11 +- src/hooks/PlayerObject/RandomIcon.cpp | 11 +- src/hooks/PlayerObject/RandomSpeed.cpp | 13 +- src/hooks/PlayerObject/SizeChanger.cpp | 13 +- src/hooks/PlayerObject/Sleepy.cpp | 13 +- src/hooks/PlayerObject/Sticky.cpp | 13 +- src/include/Horrible.cpp | 77 ++--- src/main.cpp | 349 +++------------------ src/menu/OptionCategoryItem.hpp | 34 +- src/menu/OptionItem.hpp | 8 +- src/menu/OptionMenuButton.hpp | 4 +- src/menu/OptionMenuPopup.hpp | 32 +- src/menu/SettingV3.hpp | 16 +- src/menu/src/OptionCategoryItem.cpp | 28 +- src/menu/src/OptionItem.cpp | 16 +- src/menu/src/OptionMenuButton.cpp | 2 +- src/menu/src/OptionMenuPopup.cpp | 37 +-- src/menu/src/SettingV3.cpp | 30 +- 69 files changed, 707 insertions(+), 959 deletions(-) delete mode 100644 src/Keybinds.cpp delete mode 100644 src/hooks/PlayLayer/FreezeFPS.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a9e68c..e4663f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.21) -set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED ON) if("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS" OR IOS) set(CMAKE_OSX_ARCHITECTURES "arm64") diff --git a/README.md b/README.md index 26070ac..f394b0c 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ This silly lil' mod adds a mod menu filled to the brim with **over 35 crazy trol When pressing `\` or by pressing the floating *Horrible Options* button on your screen, a menu will pop up with a list of joke mod options you can toggle anytime on your game to do some interesting things to your gaming experience. You can view more information within the menu itself. > [!NOTE] -> *You can customize any keybinds in this mod via the *[Custom Keybinds](https://www.geode-sdk.org/mods/geode.custom-keybinds)* mod.* +> *You can customize any keybinds in this mod through its settings.* #### Player Life Give the player a limited health-like meter that must always stay above 0 to prevent the player from dying. diff --git a/about.md b/about.md index 73c7025..ca402a8 100644 --- a/about.md +++ b/about.md @@ -13,7 +13,7 @@ This silly lil' mod adds a mod menu filled to the brim with **over 35 crazy trol ### Options When pressing `\` on your keyboard or by pressing the floating *Horrible Options* button on your screen, a menu will pop up with a list of horrible mod options you can toggle anytime on your game to do some interesting things to your gaming experience. You can view more information within the menu itself. -> ![ℹ️](frame:GJ_infoIcon_001.png?scale=0.5) *You can customize any keybinds in this mod via the *[Custom Keybinds](mod:geode.custom-keybinds)* mod.* +> ![ℹ️](frame:GJ_infoIcon_001.png?scale=0.5) *You can customize any keybinds in this mod through its settings.* #### Player Life Give the player a limited health-like meter that must always stay above 0 to prevent the player from dying. diff --git a/include/Events.hpp b/include/Events.hpp index f5ae964..9a866a6 100644 --- a/include/Events.hpp +++ b/include/Events.hpp @@ -2,47 +2,12 @@ #include "Horrible.hpp" -#include - #include // Container for Horrible Ideas API namespace horrible { // Event for option toggles - class OptionEvent : public geode::Event { - private: - std::string m_id; // Unique ID of the option - bool m_toggled; // Toggle boolean of the option - - public: - OptionEvent(std::string id, bool toggled); // Constructor - - AWCW_HORRIBLE_API_DLL std::string_view getId() const noexcept; // Get the unique ID of the option - AWCW_HORRIBLE_API_DLL bool getToggled() const noexcept; // Get the toggle boolean of the option - }; - - // Filter for option toggle event - class AWCW_HORRIBLE_API_DLL OptionEventFilter : public geode::EventFilter { - private: - std::vector m_ids; // Unique ID of the options to listen to - - public: - using Callback = geode::ListenerResult(OptionEvent*); - - /** - * Event handler - * - * @param fn Callback function containing a pointer to the event that fired - * @param event Pointer to the event that fired - */ - geode::ListenerResult handle(std::function fn, OptionEvent* event); - - OptionEventFilter() = default; // Constructor - - OptionEventFilter(std::string id); // Constructor (listens to one option's toggle) - OptionEventFilter(std::vector ids); // Constructor (listens to any specified options' toggles) - - OptionEventFilter(cocos2d::CCNode*, std::string id); // Constructor with target (listens to one option's toggle) - OptionEventFilter(cocos2d::CCNode*, std::vector ids); // Constructor with target (listens to any specified options' toggles) + struct OptionEvent final : geode::GlobalEvent { + using GlobalEvent::GlobalEvent; }; }; \ No newline at end of file diff --git a/include/Horrible.hpp b/include/Horrible.hpp index 087dc78..3a094cc 100644 --- a/include/Horrible.hpp +++ b/include/Horrible.hpp @@ -22,21 +22,18 @@ // Container for Horrible Ideas API functions namespace horrible { // Mod option manager for Horrible Ideas - class AWCW_HORRIBLE_API_DLL OptionManager : public cocos2d::CCObject { + class AWCW_HORRIBLE_API_DLL OptionManager final : public cocos2d::CCObject { private: - class Impl; // PImpl class - std::unique_ptr m_impl; // PImpl pointer + std::vector