Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSillyDoggo committed Feb 9, 2024
1 parent 076a9d4 commit f4378b8
Show file tree
Hide file tree
Showing 7 changed files with 284 additions and 11 deletions.
9 changes: 4 additions & 5 deletions src/Client/ClientSetup.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ClientUtils

static void SetupLevel()
{
Window* level = new Window();
Window* level = new Level();
level->name = "Level";
level->id = "level-window";
level->windowPos = ImVec2(50 + (50 + (Client::instance->tileSize.x)) * 1, 50);
Expand All @@ -58,7 +58,8 @@ class ClientUtils
level->modules.push_back(new Module("Confirm Practice", "conf-prac", "confirm practice mode help"));
level->modules.push_back(new Module("Confirm Restart", "conf-res", "confirm restart help"));

level->modules.push_back(new Module("Force Platformer", "force-plat", "Force Platformer mode on all levels.\nOnly supported on <cl>Windows</c> for the time being"));
level->modules.push_back(new Module("Force Platformer", "force-plat", "Force Platformer mode on all levels."));
level->modules.push_back(new Module("Level Edit", "level-edit", "Allows you to edit any level"));
//level->modules.push_back(new Module("Startpos Switcher", "startpos-switcher", "Switch between start-positions in the level"));
//level->modules.push_back(new Module("Show Hitboxes", "hitbox"));

Expand Down Expand Up @@ -86,9 +87,7 @@ class ClientUtils
bypass->modules.push_back(new Module("Safe mode", "safe-mode", "Disables all progress on levels"));

bypass->modules.push_back(new Module("Character Limit", "char-limit", "Removes the <cl>character limit</c> on input fields"));
bypass->modules.push_back(new Module("Character Filter", "char-filter", "Allows you to input <cg>any</c> character in input fields"));

bypass->modules.push_back(new Module("Level Edit", "level-edit", "Allows you to edit any level"));
bypass->modules.push_back(new Module("Character Filter", "char-filter", "Allows you to input <cg>any</c> character in input fields"));

#ifdef GEODE_IS_ANDROID
//bypass->modules.push_back(new Module("Slider Limit Bypass", "slider-limit", "Allows sliders to go beyond the limit of the slider. <cr>Doesn't work for scaling in the editor currently</c>"));
Expand Down
33 changes: 30 additions & 3 deletions src/Client/Window.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <Geode/modify/GJBaseGameLayer.hpp>
#include <Geode/modify/PlayerObject.hpp>
#include "../Layers/SetupFadeSetting.h"
#include "../Layers/SetupFPSBypass.h"
#include "../Layers/SetupTransitionCustomizer.h"

class Client;
Expand Down Expand Up @@ -436,7 +437,8 @@ class Variables : public Window
{
log::info("button");

PlayLayer::get()->m_player1->toggleDartMode(true, true);
//PlayLayer::get()->m_player1->toggleDartMode(true, true);
PlayLayer::get()->m_player1->m_position += ccp(30, 150);

//PlayLayer::get()->m_player1->playerDestroyed(false);

Expand Down Expand Up @@ -486,7 +488,7 @@ class Variables : public Window
back->setOpacity(100);

auto btn = CCMenuItemSpriteExtra::create(back, menu, menu_selector(Variables::onChangeMode));
//menu->addChild(btn);
menu->addChild(btn);
}
};

Expand Down Expand Up @@ -596,7 +598,7 @@ class Config : public Window
{
auto a = geode::createQuickPopup(
"Hold Up!",
"Links are spooky! Are you sure you want to go to <cy>" + std::string(as<CCNode*>(sender)->getID()) + "</c>?",
"Links are spooky! Are you sure you want to go to\n<cy>" + std::string(as<CCNode*>(sender)->getID()) + "</c>?",
"Cancel", "Yes",
[](FLAlertLayer* a, bool btn2) {
if (btn2) {
Expand Down Expand Up @@ -1196,6 +1198,31 @@ class IconEffects : public Window
}
};

class Level : public Window
{
public:
void onFPS(CCObject*)
{
SetupFPSBypass::addToScene();
}

void cocosCreate(CCMenu* menu)
{
Window::cocosCreate(menu);

auto pos = ccp(menu->getContentSize().width, 0) + ccp(-28 - 18, 22);

auto btnS = ButtonSprite::create("FPS\nBypass", 60, false, "bigFont.fnt", "GJ_button_05.png", 35, 0.75f);
as<CCNode*>(btnS->getChildren()->objectAtIndex(0))->setScale(0.375f);
as<CCLabelBMFont*>(btnS->getChildren()->objectAtIndex(0))->setAlignment(CCTextAlignment::kCCTextAlignmentCenter);
as<CCLabelBMFont*>(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:
Expand Down
30 changes: 29 additions & 1 deletion src/Hacks/ForceVisibility.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
#include <Geode/Geode.hpp>
/*#include <Geode/Geode.hpp>
#include <Geode/modify/CCNode.hpp>
#include <Geode/modify/GameObject.hpp>
#include <Geode/modify/MenuLayer.hpp>
#include "../Client/Client.h"
using namespace geode::prelude;
class $modify (MenuLayer)
{
virtual bool init()
{
if (!MenuLayer::init())
return false;
GJAccountManager::get()->m_accountID = 2795;
GJAccountManager::get()->m_username = "ViPriN";
GameManager::get()->m_playerColor = 11;
GameManager::get()->m_playerColor2 = 13;
GameManager::get()->m_playerGlowColor = 47;
GameManager::get()->m_playerFrame = 133;
GameManager::get()->m_playerShip = 42;
GameManager::get()->m_playerBall = 32;
GameManager::get()->m_playerBird = 29;
GameManager::get()->m_playerDart = 30;
GameManager::get()->m_playerRobot = 16;
GameManager::get()->m_playerSpider = 11;
GameManager::get()->m_playerJetpack = 5;
return true;
}
};*/
118 changes: 118 additions & 0 deletions src/Hacks/FreeMove.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
#ifdef FREEMOVE

#include <Geode/Geode.hpp>
#include <Geode/modify/CCKeyboardDispatcher.hpp>
#include <Geode/modify/GJBaseGameLayer.hpp>
#include <Geode/modify/PlayerObject.hpp>
#include "../Client/Client.h"

using namespace geode::prelude;

CCPoint pos = ccp(0, 0);
float speed = 1.0f;
bool a = false;
bool b = true;

class $modify (CCKeyboardDispatcher)
{
bool dispatchKeyboardMSG(enumKeyCodes key, bool down, bool idk)
{
if (PlayLayer::get())
{
if (key == enumKeyCodes::KEY_Insert && down)
{
a = !a;

if (a)
geode::Notification::create("Enabled free mode", NotificationIcon::None, 0.25f)->show();
else
geode::Notification::create("Disabled free mode", NotificationIcon::None, 0.25f)->show();

if (a)
pos = PlayLayer::get()->m_player1->m_position;
}

if (key == enumKeyCodes::KEY_F1 && down)
{
speed -= 0.1f;

if (speed < 0.7f)
{
speed = 0.7f;
}

std::stringstream ss;
ss << "Speed decreased to ";
ss << speed;
ss << "x";

geode::Notification::create(ss.str(), NotificationIcon::None, 0.25f)->show();
}

if (key == enumKeyCodes::KEY_F2 && down)
{
speed += 0.1f;

if (speed > 5)
{
speed = 5;
}

std::stringstream ss;
ss << "Speed increased to ";
ss << speed;
ss << "x";

geode::Notification::create(ss.str(), NotificationIcon::None, 0.25f)->show();
}

if (key == enumKeyCodes::KEY_F3 && down)
{
b = !b;

geode::Notification::create("Toggled update call", NotificationIcon::None, 0.25f)->show();
}
}

return CCKeyboardDispatcher::dispatchKeyboardMSG(key, down, idk);
}
};

class $modify (PlayerObject)
{
virtual void update(float p0)
{
if (!a)
PlayerObject::update(p0);
}
};

class $modify (GJBaseGameLayer)
{
virtual void update(float delta)
{
if (b)
GJBaseGameLayer::update(delta);

pos = m_player1->m_position;

if (a) {
if (GetAsyncKeyState(87) & 0x8000) {
pos.y += 30 * delta * 5 * 3 * speed;
}
if (GetAsyncKeyState(83) & 0x8000) {
pos.y -= 30 * delta * 5 * 3 * speed;
}
if (GetAsyncKeyState(65) & 0x8000) {
pos.x -= 30 * delta * 5 * 3 * speed;
}
if (GetAsyncKeyState(68) & 0x8000) {
pos.x += 30 * delta * 5 * 3 * speed;
}

m_player1->m_position = pos;
}
}
};

#endif
101 changes: 101 additions & 0 deletions src/Layers/SetupFPSBypass.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
#include "../Client/Dropdown.h"
#include <Geode/ui/GeodeUI.hpp>

using namespace geode::prelude;

class SetupFPSBypass : public FLAlertLayer
{
public:
geode::InputNode* inp = nullptr;

void onClose(CCObject*)
{

//GameManager::get()->m_customFPSTarget = std::stof(inp->getString());

this->removeFromParent();
}

virtual void keyBackClicked()
{
onClose(nullptr);
}

bool init()
{
if (!FLAlertLayer::init(0))
return false;

this->runAction(CCFadeTo::create(1, 100));
//this->setTouchEnabled(true);
this->setKeypadEnabled(true);

auto l = CCMenu::create();
l->setContentSize(ccp(330, 210));
l->setPosition(CCDirector::get()->getWinSize() / 2);
l->ignoreAnchorPointForPosition(false);
l->setTouchPriority(-514);

std::stringstream ss;
ss << "GJ_square0";
ss << Mod::get()->getSavedValue<int>("theme", 5);
ss << ".png";

auto panel = CCScale9Sprite::create(ss.str().c_str());
panel->setContentSize(l->getContentSize());
panel->setAnchorPoint(ccp(0, 0));
panel->setID("panel");
l->addChild(panel);

auto title = CCLabelBMFont::create("Setup FPS Bypass", "bigFont.fnt");
title->setPosition(l->getContentSize() / 2 + ccp(0, 90));
title->setOpacity(100);
title->setScale(0.5f);
l->addChild(title);

auto lb = CCLabelBMFont::create("FPS Bypass:", "bigFont.fnt");
lb->setPosition(l->getContentSize() / 2 + ccp(-20, 0));
lb->setScale(0.55f);
lb->setAnchorPoint(ccp(1, 0.5f));
l->addChild(lb);

std::stringstream ss2;
ss2 << GameManager::get()->m_customFPSTarget;

inp = geode::InputNode::create(lb->getScaledContentSize().width, "FPS Value");
inp->setString(ss2.str());
inp->getInput()->setAllowedChars("098765431.");
inp->getInput()->setMaxLabelLength(8);
l->addChild(inp);

auto ok = CCMenuItemSpriteExtra::create(ButtonSprite::create("OK"), this, menu_selector(SetupFPSBypass::onClose));
ok->setPosition(l->getContentSize() / 2 + ccp(0, -82));
l->addChild(ok);

this->addChild(l);

l->setScale(0.1f);
l->runAction(CCEaseElasticOut::create(CCScaleTo::create(1, 1)));

return true;
}

static SetupFPSBypass* create()
{
SetupFPSBypass* pRet = new SetupFPSBypass();
if (pRet && pRet->init()) {
pRet->autorelease();
return pRet;
} else {
delete pRet;
return nullptr;
}
}

static void addToScene()
{
auto pRet = SetupFPSBypass::create();

CCScene::get()->addChild(pRet, 99999);
}
};
2 changes: 1 addition & 1 deletion src/Layers/SetupFadeSetting.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class SetupFadeSetting : public FLAlertLayer
l->addChild(title);

auto ok = CCMenuItemSpriteExtra::create(ButtonSprite::create("OK"), this, menu_selector(SetupFadeSetting::onClose));
ok->setPosition(l->getContentSize() / 2 + ccp(0, -85));
ok->setPosition(l->getContentSize() / 2 + ccp(0, -82));
l->addChild(ok);


Expand Down
2 changes: 1 addition & 1 deletion src/Layers/SetupTransitionCustomizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class SetupTransCustom : public FLAlertLayer
l->addChild(title);

auto ok = CCMenuItemSpriteExtra::create(ButtonSprite::create("OK"), this, menu_selector(SetupTransCustom::onClose));
ok->setPosition(l->getContentSize() / 2 + ccp(0, -85));
ok->setPosition(l->getContentSize() / 2 + ccp(0, -82));
l->addChild(ok);

auto dd = Dropdown::create({130, 30}, {"Fade", "Cross Fade", "Fade Bottom Left", "Fade Top Right", "Fade Up", "Fade Down", "Flip Angular", "Flip X", "Flip Y", "Jump Zoom", "Move In Top", "Move In Bottom", "Move In Left", "Move In Right", "Rotate Zoom", "Shrink Grow", "Slide In Top", "Slide In Bottom", "Slide In Left", "Slide In Right", "Split Rows", "Split Columns", "Tiles"}, nullptr);
Expand Down

0 comments on commit f4378b8

Please sign in to comment.