-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
076a9d4
commit f4378b8
Showing
7 changed files
with
284 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
};*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters