Skip to content

Commit

Permalink
more stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSillyDoggo committed Mar 6, 2024
1 parent a97dcbb commit 5208f47
Show file tree
Hide file tree
Showing 11 changed files with 333 additions and 52 deletions.
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
- Added No reverse portal
- Fixed input nodes
- Added full options menu
- Added hide player
- Added no respawn blink
- Added All modes platformer (windows only)
- Added level uncomplete
- Added show hitboxes and show hitboxes on death
- Added no static camera
Expand Down
6 changes: 5 additions & 1 deletion src/Client/ClientSetup.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,18 @@ class ClientUtils
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("No Reverse Portal", "no-reverse", "Disables reverse portals, only use if your a pussy <cl>jk</c>"));
level->modules.push_back(new Module("No Mirror Portal", "no-reverse", "Disables reverse portals, only use if your a pussy <cl>jk</c>"));
level->modules.push_back(new Module("Instant Restart", "instant-restart", "Restarts the level instantly upon death"));

level->modules.push_back(new Module("Show Hitboxes", "show-hitboxes", "Shows object hitboxes"));
level->modules.push_back(new Module("Show Hitboxes On Death", "show-hitboxes-on-death", "Shows object hitboxes on death"));

level->modules.push_back(new Module("No Static Camera", "no-static", "Disables static camera"));

#ifdef GEODE_IS_WINDOWS
level->modules.push_back(new Module("All Modes Platformer", "all-plat", "Enabled All Gamemodes in platformer mode. <cl>Windows only</c>"));
#endif

//level->modules.push_back(new Module("No Hitboxes", "no-hitboxes", "Disables Object Hitboxes"));

//level->modules.push_back(new Module("Force Show Player", "show-player", "Force the player to be visible all the time"));
Expand Down
64 changes: 45 additions & 19 deletions src/Client/Replay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ class $modify (CheckpointObjectExt, CheckpointObject)
class $modify (PlayLayer)
{
bool started = false;
std::vector<CheckpointObject*> checkpoints = {};
std::vector<float> checkpointsDT = {};
std::vector<int> checkpointsFrame = {};

TodoReturn startGameDelayed()
{
Expand All @@ -63,6 +66,25 @@ class $modify (PlayLayer)
log::info("started");
}

TodoReturn storeCheckpoint(CheckpointObject* p0)
{
PlayLayer::storeCheckpoint(p0);

m_fields->checkpoints.push_back(p0);
m_fields->checkpointsDT.push_back(GJReplayManager::dt);
m_fields->checkpointsFrame.push_back(GJReplayManager::frame);

log::info("cp {}", p0);
}

TodoReturn removeCheckpoint(bool p0)
{
PlayLayer::removeCheckpoint(p0);
checkpoints.pop_back();
checkpointsDT.pop_back();
checkpointsFrame.pop_back();
}

void postUpdate(float dt) { //until GJBaseGameLayer::update

PlayLayer::postUpdate(dt);
Expand All @@ -77,15 +99,17 @@ class $modify (PlayLayer)

if (!m_fields->started)
{
m_fields->started = (*(double*)(((char*)PlayLayer::get()) + 0x320));
m_fields->started = ((*(double*)(((char*)PlayLayer::get()) + 0x320)) != 0);
return;
}

#else
#endif

#ifdef GEODE_IS_ANDROID64

if (!m_fields->started)
{
m_fields->started = (*(double*)(((char*)PlayLayer::get()) + 0x3B8));
m_fields->started = ((*(double*)(((char*)PlayLayer::get()) + 0x3B8)) != 0);
return;
}

Expand Down Expand Up @@ -128,33 +152,35 @@ class $modify (PlayLayer)
log::info("resetLevel");
}

/*#ifdef GEODE_IS_WINDOWS
TodoReturn loadFromCheckpoint(CheckpointObject* p0)
{
PlayLayer::loadFromCheckpoint(p0);

GJReplayManager::dt = as<CheckpointObjectExt*>(p0)->m_fields->dt;
GJReplayManager::frame = as<CheckpointObjectExt*>(p0)->m_fields->frame;
auto it = find(m_fields->checkpoints.begin(), m_fields->checkpoints.end(), p0);

if (it != m_fields->checkpoints.end())
{
int index = it - m_fields->checkpoints.begin();

if (GJReplayManager::recording)
{
std::vector<MyInput> myvec = {};
GJReplayManager::dt = m_fields->checkpointsDT[index];
GJReplayManager::frame = m_fields->checkpointsFrame[index];

for (size_t i = 0; i < GJReplayManager::replay.inputs.size(); i++)
if (GJReplayManager::recording)
{
if (GJReplayManager::replay.inputs[i].dt <= GJReplayManager::dt)
std::vector<MyInput> myvec = {};

for (size_t i = 0; i < GJReplayManager::replay.inputs.size(); i++)
{
myvec.push_back(GJReplayManager::replay.inputs[i]);
if (GJReplayManager::replay.inputs[i].dt <= GJReplayManager::dt)
{
myvec.push_back(GJReplayManager::replay.inputs[i]);
}
}
}

GJReplayManager::replay.inputs = myvec;
}
GJReplayManager::replay.inputs = myvec;
}
}
}
#endif*/
};

class $modify(GJBaseGameLayer) {
Expand Down
3 changes: 2 additions & 1 deletion src/Client/Window.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "../Layers/LoadMacroPopup.h"
#include "../Layers/EditStatusPositionLayer.h"
#include "../Layers/ConfirmFLAlertLayer.h"
#include "../Layers/ReplayOptionsLayer.h"

class Window
{
Expand Down Expand Up @@ -1471,7 +1472,7 @@ class _Replay : public Window

void onConfig(CCObject*)
{

ReplayOptionsLayer::addToScene();
}

void cocosCreate(CCMenu* menu)
Expand Down
45 changes: 45 additions & 0 deletions src/Hacks/AllModesPlatformer.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#ifdef GEODE_IS_WINDOWS

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

using namespace geode::prelude;

class $modify (GJBaseGameLayer)
{
Module* mod = nullptr;

TodoReturn collisionCheckObjects(PlayerObject* p0, gd::vector<GameObject*>* p1, int p2, float p3)
{
if (!mod)
mod = Client::GetModule("all-plat");

if (mod->enabled)
{
//#ifdef GEODE_IS_WINDOWS
auto* value = reinterpret_cast<uintptr_t*>(((uintptr_t)this) + 0x29C6);
//#endif

//#ifdef GEODE_IS_ANDROID32
//auto* value = reinterpret_cast<uintptr_t*>(((uintptr_t)this) + 0x29de);
//#endif

//#ifdef GEODE_IS_ANDROID64
//auto* value = reinterpret_cast<uintptr_t*>(((uintptr_t)this) + 0x29C6);
//#endif

uintptr_t og = *value;
*value = 0;
GJBaseGameLayer::collisionCheckObjects(p0, p1, p2, p3);
*value = og;
}
else
{
GJBaseGameLayer::collisionCheckObjects(p0, p1, p2, p3);
}
}
};

#endif
30 changes: 0 additions & 30 deletions src/Hacks/ForceVisibility.cpp
Original file line number Diff line number Diff line change
@@ -1,30 +0,0 @@
/*#include <Geode/Geode.hpp>
#include <Geode/modify/CCKeyboardDispatcher.hpp>
#include "../Client/Client.h"
using namespace geode::prelude;
class $modify (CCKeyboardDispatcher)
{
bool dispatchKeyboardMSG(enumKeyCodes key, bool p1, bool p2)
{
//log::info("k");
if (key == enumKeyCodes::KEY_L)
{
log::info("RobTop");
GJAccountManager::get()->m_username = "RobTop";
//GJAccountManager::get()->m_accountID = 16;
}
else if (key == enumKeyCodes::KEY_K)
{
log::info("TheSillyDoggo");
GJAccountManager::get()->m_username = "TheSillyDoggo";
//GJAccountManager::get()->m_accountID = 16778880;
}
return CCKeyboardDispatcher::dispatchKeyboardMSG(key, p1, p2);
}
};*/
46 changes: 46 additions & 0 deletions src/Hacks/GlobedSecret.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#include <Geode/Geode.hpp>
#include <Geode/modify/GameObject.hpp>
#include <Geode/modify/CCScheduler.hpp>
#include "../Client/Client.h"

using namespace geode::prelude;

Ref<CCLabelBMFont> lbl1 = nullptr;
Ref<CCLabelBMFont> lbl2 = nullptr;

void mySetID(CCNode* ins, const std::string &id) {
ins->setID(id);

if (id == "dankmeme.globed2/remote-player-16778880")
{
log::info("i am real");

lbl1 = (getChildOfType<CCLabelBMFont>(as<CCNode*>(ins->getChildren()->objectAtIndex(0)), 0));
lbl2 = (getChildOfType<CCLabelBMFont>(as<CCNode*>(ins->getChildren()->objectAtIndex(1)), 0));
}
}

class $modify (CCScheduler)
{
void update(float dt)
{
CCScheduler::update(dt);

if (lbl1 && lbl1->getParent())
lbl1->setColor(ColourUtility::getPastelColour());

if (lbl2 && lbl2->getParent())
lbl2->setColor(ColourUtility::getPastelColour());
}
};

$execute {
Mod::get()->hook(
reinterpret_cast<void*>(
geode::addresser::getNonVirtual(&CCNode::setID)
),
&mySetID,
"cocos2d::CCNode::setID (Geode)",
tulip::hook::TulipConvention::Thiscall
);
}
4 changes: 4 additions & 0 deletions src/Hacks/NoDeathEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ class $modify (PlayLayer)

class $modify (PlayerObject)
{
static void onModify(auto& self) {
self.setHookPriority("PlayerObject::playerDestroyed", -6969);
}

void playerDestroyed(bool p0)
{
if (Client::GetModuleEnabled("instant-restart") && PlayLayer::get())
Expand Down
3 changes: 3 additions & 0 deletions src/Hacks/ShowHitboxes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ class $modify (PlayLayer)
if (!m_fields->dn)
m_fields->dn = as<CCDrawNode*>(getChildByTagRecursively(PlayLayer::get(), 1));

if (!m_fields->dn && PlayLayer::get()->getChildByID("hitbox-node"))
m_fields->dn = as<CCDrawNode*>(getChildOfType<CCDrawNode>(getChildOfType<CCLayer>(PlayLayer::get()->getChildByID("hitbox-node"), 0), 0));

if (!m_fields->dn)
return;

Expand Down
2 changes: 1 addition & 1 deletion src/Hacks/Speedhack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ class $modify (CCScheduler)

CCScheduler::update(dt);
}
};
}; // LINE 115 DOESN'T FUCKING EXIST???? HOW CRASH
Loading

0 comments on commit 5208f47

Please sign in to comment.