Skip to content

Commit

Permalink
huge changes, NOT FINISHED
Browse files Browse the repository at this point in the history
  • Loading branch information
FireMario211 committed Jan 26, 2024
1 parent 9941b65 commit 9bc9cad
Show file tree
Hide file tree
Showing 22 changed files with 696 additions and 336 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: geode-sdk/build-geode-mod@main
with:
#sdk: nightly
build-config: 'RelWithDebInfo'
#build-config: 'RelWithDebInfo'
combine: true
configure-args: '-DGEODE_DISABLE_FMT_CONSTEVAL=1'
target: ${{ matrix.config.target }}
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ project(PrismMenu VERSION 1.0.0)
# under src/
file(GLOB SOURCES
src/*.cpp
src/Hacks/*.cpp
)

# Set up the mod binary
Expand Down
Binary file added PrismMenu-ServerIcon.psd
Binary file not shown.
Binary file added PrismMenu-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@
A mod menu made in Geode for Geometry Dash

# TODOs (Based on whats next)
- Allow for dragging the button
- Create another UI (cocos2d) option for mobile users
- Add credits screen for cocos2d ui
- Allow for dragging the button
- Add "Render Hitbox" (Basically enables hitbox even if not in practice mode)
- Add "Disable Shaders"
- Add "No Camera Movement" (basically removes all 2.2 camera stuff and only aims the camera at the player)
- Add to Misc category everything related to changing "Stats", basically allows you to edit your stats like mana, diamonds, etc. NOT ADDING STARS, DEMONS, AND OTHER FOR REASONS.
- (Possibly?) Fix FPS Bypass, or add "Show FPS" for Android users. (The func exists, just not visible to the end user lol)
- Allow for resizing the menu with a minimum size and maximum size (Only imgui)
- Add light theme
- Add startpos switcher
- Add "uncomplete level" hack
- Add a "Replay Bot"
- Add "Hitbox on Death" & "Hitbox Trail"
- Add "Randomize Gamemode" just for fun
- Add a "Replay Bot"
- Support more languages

Will do README later.
11 changes: 7 additions & 4 deletions about.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This mod menu also provides unique features not present in most mod menus, here
* Currently, there are 2 themes available: `Future Dark` and `Catppuccin`, but you can create your own theme and share it with others!
![Theme Example](firee.PrismMenu/Screenshot2.png)
## Multiple Language (Half way done)
* Prism Menu supports more languages than **English,** it supports **French**, **Portuguese** (Brazilian), **German**, **Russian**, and **Czech** as well!
* Prism Menu supports more languages than **English,** it supports **French**, **Portuguese** (Brazilian), **German**, **Russian**, **Czech**, and **Indonesian** as well!
## Cross Platform
* Prism Menu is available on both `Windows` and `Android`!

Expand All @@ -24,14 +24,17 @@ Press on the circle button located on the left corner, or press `Tab` to open th

# Credits
* [Firee](https://youtube.com/@gdfiree) - Developer
* [TheSillyDoggo](https://github.com/TheSillyDoggo) - Mod Logo Base
* [Electrify](https://www.youtube.com/channel/UCxYliOd2aV6iZuc5wuG9QxA) - Translations for Spanish
* [Jouca](https://twitter.com/JoucaJouca) - Translations for French
* [dankmeme01](https://github.com/dankmeme01) - Proofreading for Russian
* MegaSa1nt - Translations for Russian
* savvacorgi - Translations for Russian
* [Gazonk](https://www.youtube.com/channel/UCgp5Tql2b6Y1Xcni82pPxmA) - Translations for Brazilian Portuguese
* huhnmitferrari - Translations for German
* [huhnmitferrari](https://discordapp.com/users/1043189307302752256) - Translations for German
* [Ignis](https://twitter.com/IgnisPeaks0) - Translations for Czech
* [RazIX](https://twitter.com/RzaIX_) - Translations for Indonesian
* [RzaIX](https://twitter.com/RzaIX_) - Translations for Indonesian
* KONDIROTSU - Translations for Polish
* olaf_294 - Translations for Polish

Send any suggestions or report any issues to the GitHub Repository. I hope you enjoy using the mod!
Send any suggestions or report any issues to the GitHub Repository or Discord Server. I hope you enjoy using the mod!
1 change: 0 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@ cmake \
-DGEODE_DISABLE_FMT_CONSTEVAL=1 -G Ninja

cmake --build build-linux-deb --config RelWithDebInfo
# geode for some reason doesnt extract .dll, so im making .dlll as it can extract that
cp build-linux-deb/firee.PrismMenu.geode "/SDrive/Users/Fire/Desktop/Restoration/ClarifyGDPS V.1.3/GDGeode-2.204/geode/mods/firee.PrismMenu.geode"
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v1.2.2
- Fixed save issue
# v1.2.1
- Emergency Fix
# v1.2.0
- Added Indonesian Translations (Thank you RzaIX!)
- Fixed bug with Texture Loader crashing when applying a texture.
Expand Down
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"geode": "2.0.0",
"version": "v1.2.2",
"version": "v1.3.0",
"gd": {
"win": "2.204",
"android": "2.205"
Expand Down
6 changes: 2 additions & 4 deletions resources/hacks/bypass.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@
"opcodes": [
{"addr": "0x21ACB", "on": "EB 04", "off": "7C 04"}
],
"type": "bool",
"winOnly": true
"type": "bool"
},
{
"name": "Character Filter",
"desc": "Lets you input any character in all text inputs.",
"opcodes": [
{"addr": "0x21A99", "on": "90 90", "off": "75 04"}
],
"type": "bool",
"winOnly": true
"type": "bool"
},
{
"name": "Slider Limit",
Expand Down
16 changes: 12 additions & 4 deletions resources/hacks/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@
"default": false
},
{
"name": "Show Tooltips",
"desc": "Whether or not tooltips should be shown when hovering over mods.",
"name": "Menu Style",
"desc": "",
"opcodes": [],
"type": "bool",
"default": true
"type": "dropdown",
"default": 0,
"values": ["ImGui", "Geometry Dash"]
},
{
"name": "Show Button",
Expand Down Expand Up @@ -88,6 +89,13 @@
"default": 295,
"step": 1
},
{
"name": "Show Tooltips",
"desc": "Whether or not tooltips should be shown when hovering over mods.",
"opcodes": [],
"type": "bool",
"default": true
},
{
"name": "Restore Defaults",
"desc": "Disables all mods and resets everything to default.",
Expand Down
59 changes: 59 additions & 0 deletions src/Hacks/Bypass.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#include "../hacks.hpp"
#include <Geode/Geode.hpp>
using namespace geode::prelude;

#include <Geode/modify/GameManager.hpp>
#include <Geode/modify/CCTextInputNode.hpp>

// Icon Bypass
class $modify(GameManager) {
bool isIconUnlocked(int _id, IconType _type) {
if (!Hacks::isHackEnabled("Icon Bypass") || Hacks::isHackEnabled("Enable Patching")) return GameManager::isIconUnlocked(_id, _type);
return true;
}
bool isColorUnlocked(int _id, UnlockType _type) {
if (!Hacks::isHackEnabled("Icon Bypass") || Hacks::isHackEnabled("Enable Patching")) return GameManager::isColorUnlocked(_id, _type);
return true;
}
};

// Text Length, Character Filter
class $modify(CCTextInputNode) {
void updateLabel(gd::string p0) {
if (Hacks::isHackEnabled("Character Filter") && !Hacks::isHackEnabled("Enable Patching")) this->setAllowedChars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,-!?:;)(/\\\"\'`*= +-_%[]<>|@&^#{}%$~");
if (Hacks::isHackEnabled("Text Length") && !Hacks::isHackEnabled("Enable Patching")) this->m_maxLabelLength = -1;
CCTextInputNode::updateLabel(p0);
}
};

/*
class $modify(GameStatsManager) {
// Almost all bypass
int getStat(char const* type) { // isnt this supposed to be int
int ret = GameStatsManager::getStat(type);
int typeInt = std::stoi(type);
//std::cout << fmt::format("type = {}, ret = {}", type, ret) << std::endl;
if (typeInt == 8 && Hacks::isHackEnabled("Main Levels") && !Hacks::isHackEnabled("Enable Patching")) { // main level
return 30;
}
if (typeInt == 12 && Hacks::isHackEnabled("Guard Vault") && !Hacks::isHackEnabled("Enable Patching")) { // guard vault
return 10;
}
if (typeInt == 13 && Hacks::isHackEnabled("Keymaster Vault") && !Hacks::isHackEnabled("Enable Patching")) { // keymaster vault
return 100;
}
if (typeInt == 21 && Hacks::isHackEnabled("Treasure Room") && !Hacks::isHackEnabled("Enable Patching")) { // treasure room
return 5;
}
if (typeInt == 14 && Hacks::isHackEnabled("Free Shop Items") && !Hacks::isHackEnabled("Enable Patching")) { // free shop items
return 1000000; // lol what
}
if (typeInt == 6 && Hacks::isHackEnabled("Backup Stars Limit") && !Hacks::isHackEnabled("Enable Patching")) { // backup stars limit
return 10;
}
return ret;
}
};
*/


42 changes: 42 additions & 0 deletions src/Hacks/Creator.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Creator Hacks
// These can include simple things like making the Editor experience better, or allowing users to copy levels that weren't copyable because they aren't uploaded from 2.2 and the creator chose to not allow copies.
#include "../hacks.hpp"
#include <Geode/Geode.hpp>
using namespace geode::prelude;

#include <Geode/modify/EditLevelLayer.hpp>
#include <Geode/modify/LevelInfoLayer.hpp>

class $modify(EditLevelLayer) {
// Verify Hack, No (C) Mark
void onShare(CCObject* sender) {
if (!Hacks::isHackEnabled("Verify Hack") && !Hacks::isHackEnabled("No (C) Mark")) return EditLevelLayer::onShare(sender);
if (Hacks::isHackEnabled("Verify Hack")) {
auto isVerified = this->m_level->m_isVerified;
this->m_level->m_isVerified = true;
//this->m_level->m_isVerified = isVerified;
}
if (Hacks::isHackEnabled("No (C) Mark")) {
auto isVerified = this->m_level->m_originalLevel;
this->m_level->m_originalLevel = true;
}
EditLevelLayer::onShare(sender);
}
};

class $modify(LevelInfoLayer) {
// Copy Hack
bool init(GJGameLevel *p0, bool p1) {
if (!LevelInfoLayer::init(p0, p1)) return false;
if (Hacks::isHackEnabled("Copy Hack")) {
auto gm = GameManager::sharedState();
if (gm->m_playerUserID == p0->m_userID) return true;
if (m_cloneBtn == nullptr) return true;
auto aCloneBtn = CCMenuItemSpriteExtra::create(CCSprite::createWithSpriteFrameName("GJ_duplicateBtn_001.png"), this, menu_selector(LevelInfoLayer::confirmClone));
aCloneBtn->setPosition(m_cloneBtn->getPosition());
m_cloneBtn->getParent()->addChild(aCloneBtn);
m_cloneBtn->setVisible(false);
}
return true;
}
};
91 changes: 91 additions & 0 deletions src/Hacks/Global.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
#include "../hacks.hpp"
#include <Geode/Geode.hpp>
using namespace geode::prelude;

#include <Geode/modify/GameStatsManager.hpp>
#include <Geode/modify/GameObject.hpp>
#include <Geode/modify/GJGameLevel.hpp>
#include <Geode/modify/CCTransitionFade.hpp>
#include <Geode/modify/FMODAudioEngine.hpp>

// Practice Music
class $modify(GameStatsManager) {
bool isItemUnlocked(UnlockType p0, int p1) {
if (p0 != UnlockType::GJItem && p1 != 17) return GameStatsManager::isItemUnlocked(p0,p1);
if (Hacks::isHackEnabled("Practice Music")) {
return true;
} else {
return GameStatsManager::isItemUnlocked(p0,p1);
}
}
};

// Layout Mode
#ifndef GEODE_IS_ANDROID
class $modify(GameObject) {
void setVisible(bool v) {
/*int aaa = *reinterpret_cast<int*>(reinterpret_cast<uintptr_t>(this) + 0x14E); // we do the funny because someone forgor pad for windows
if (aaa > 1600000000) {
//int targetValue = 44;
GameObjectType targetValue = GameObjectType::Decoration;
for (int offset = 0x0; ; offset += 0x1) {
GameObjectType val = *reinterpret_cast<GameObjectType*>(reinterpret_cast<uintptr_t>(this) + offset);
//int val = *reinterpret_cast<int*>(reinterpret_cast<uintptr_t>(this) + offset);
//std::cout << "Offset: 0x" << std::hex << offset << std::dec << ", Value: " << val << std::endl;
if (val == targetValue) {
//std::cout << "Found target " << targetValue << " at offset 0x" << std::hex << offset << std::dec << std::endl;
log::info(fmt::format("Found target at offset 0x{}", offset));;
break;
}
}
//}*/
// yes letes overwrite fields!
// plesae commit add paddings for android64 and windows kthx
if (!Hacks::isHackEnabled("Layout Mode")) return GameObject::setVisible(v);
int objectID = -1;
GameObjectType objectType;
int objectTypeInt = -1;
#ifdef GEODE_IS_WINDOWS
objectID = *reinterpret_cast<int*>(reinterpret_cast<uintptr_t>(this) + 0x384); // absolutely cursed
objectType = *reinterpret_cast<GameObjectType*>(reinterpret_cast<uintptr_t>(this) + 0x31c);
#else
objectID = this->m_objectID;
objectType = this->m_objectType;
#endif
GameObject::setVisible(v);
if (objectType == GameObjectType::Decoration && objectID != 44) { // 44 being practice mode checkpoint, because thats a "decoration"
GameObject::setVisible(false);
} else {
GameObject::setVisible(v);
}
}
/*
void objectFromVector(gd::vector<gd::string> &p0, gd::vector<void *> &p1, GJBaseGameLayer *p2, bool p3) {
return GameObject::objectFromVector(p0,p1,p2,p3);
}*/ // someone got the wrong bindings!
/*
*/
};
#endif

// Safe Mode (a just incase)
class $modify(GJGameLevel) {
void savePercentage(int p0, bool p1, int p2, int p3, bool p4) {
if (!Hacks::isHackEnabled("Safe Mode") || Hacks::isHackEnabled("Enable Patching")) {
GJGameLevel::savePercentage(p0, p1, p2, p3, p4);
}
}
};

class $modify(CCTransitionFade) {
// No Transition
bool initWithDuration(float t, cocos2d::CCScene* scene, cocos2d::ccColor3B const& color) {
if (!Hacks::isHackEnabled("No Transition") || Hacks::isHackEnabled("Enable Patching")) {
return CCTransitionFade::initWithDuration(t, scene, color);
} else {
return CCTransitionFade::initWithDuration(0.0F, scene, color);
}
}
};
54 changes: 54 additions & 0 deletions src/Hacks/Player.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#include "../hacks.hpp"
#include <Geode/Geode.hpp>
using namespace geode::prelude;

#include <Geode/modify/PlayerObject.hpp>

class $modify(PlayerObject) {
#ifndef GEODE_IS_ANDROID // for whatever reason, fields arent found!
// No Solids
/*
* + bool collidedWithObject(float, GameObject*, cocos2d::CCRect, bool) = win 0x2cc450;
+ TodoReturn collidedWithObject(float, GameObject*) = win 0x2cc3d0;
bool collidedWithObject(float p0, GameObject* obj, cocos2d::CCRect p2, bool p3) { // what is the point of not having p2, because this doesnt work without it
if (Hacks::isHackEnabled("Enable Patching")) return PlayerObject::collidedWithObject(p0, obj, p2, p3);
if (!Hacks::isHackEnabled("No Solids")) return PlayerObject::collidedWithObject(p0, obj, p2, p3);
//return PlayerObject::collidedWithObject(p0, obj, p2, p3);
return false;
}*/
bool was_platformer;
/*bool collidedWithObject(float fl, GameObject* obj, cocos2d::CCRect p0, bool p1) {
return PlayerObject::collidedWithObject(fl, obj, p0, p1);
}*/
// Freeze Player
void update(float dt) {
if (!m_fields->was_platformer) {
m_fields->was_platformer = this->m_isPlatformer;
}
if (Hacks::isHackEnabled("Force Platformer Mode")) {
togglePlatformerMode(true);
} else {
togglePlatformerMode(m_fields->was_platformer);
}
auto gravityHack = Hacks::getHack("Gravity Value");
if (Hacks::isHackEnabled("Change Gravity")) { // assume its enabled
m_gravityMod = gravityHack->value.floatValue;
}
if (Hacks::isHackEnabled("Instant Complete")) return;
if (Hacks::isHackEnabled("Enable Patching") || !Hacks::isHackEnabled("Freeze Player")) return PlayerObject::update(dt);
}
bool init(int p0, int p1, GJBaseGameLayer *p2, cocos2d::CCLayer *p3, bool p4) {
if (!PlayerObject::init(p0,p1,p2,p3,p4)) return false;
return true;
}

void playerDestroyed(bool p0) {
m_fields->was_platformer = this->m_isPlatformer;
PlayerObject::playerDestroyed(p0);
}
#endif
void pushButton(PlayerButton p0) {
if (!Hacks::isHackEnabled("Enable Patching") && Hacks::isHackEnabled("Jump Hack")) PlayerObject::boostPlayer(10.0F); // idk if i should make this customizable
PlayerObject::pushButton(p0);
}
};
Loading

0 comments on commit 9bc9cad

Please sign in to comment.