Skip to content

Commit

Permalink
bug bug bug fixes!
Browse files Browse the repository at this point in the history
  • Loading branch information
FireMario211 committed Apr 23, 2024
1 parent d19f98b commit 92e601e
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 57 deletions.
24 changes: 0 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,30 +43,6 @@ endif()
# set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/FPSFix.mm PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
#endif()

if (APPLE AND GEODE_TARGET_PLATFORM STREQUAL "iOS")
# -DGEODE_TARGET_PLATFORM=iOS -DCMAKE_SYSTEM_NAME=iOS \
# -DCURL_LIBRARY=/Users/fire/Downloads/curl.xcframework/ios-arm64/curl.framework/curl \
# -DCURL_INCLUDE_DIR=/Users/fire/Downloads/curl.xcframework/ios-arm64/curl.framework/Headers
set(CMAKE_OSX_ARCHITECTURES arm64)
set(CMAKE_OSX_DEPLOYMENT_TARGET "14.0")
set(CMAKE_SYSTEM_NAME "iOS")
execute_process(COMMAND xcrun --show-sdk-path --sdk iphoneos
OUTPUT_VARIABLE GEODE_IOS_SDK
OUTPUT_STRIP_TRAILING_WHITESPACE
)
target_link_libraries(${PROJECT_NAME}
"-framework OpenGLES"
"-framework GLKit"
"-framework UIKit"
"-framework WebKit"
"-framework AVFoundation"
"-framework CoreFoundation"
"-framework Foundation"
"-framework CoreGraphics"
${CURL_LIBRARIES}
)
endif()

set(IMGUI_VERSION "v1.90")
if (NOT APPLE AND NOT DEFINED ENV{NO_IMGUI})
CPMAddPackage("gh:matcool/gd-imgui-cocos#5bc72d6") # specify a commit!
Expand Down
1 change: 1 addition & 0 deletions about.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This mod menu also provides unique features not present in most mod menus, here
## Custom Themes
* You can use the set themes present here, or create/import your own theme!
* Currently, there are 2 themes available: `Future Dark`, `Light`, & `Catppuccin`, but you can create your own theme and share it with others!

![Theme Example](firee.PrismMenu/Screenshot2.png)
## Multi-Language Support
* Prism Menu supports more languages than **English,** it supports **Spanish**, **French**, **Portuguese** (Brazilian), **German**, **Russian**, **Czech**, and many more!
Expand Down
18 changes: 10 additions & 8 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# v1.6.3
# v1.6.3
- Fixed issue where macros with no input would crash.
- Fixed issue with Uncomplete Level not working in ImGui style.
- Updated Turkish Translations.
- Updated Russian Translations.
- Removed ImGui support for Android (because it's not good!)
- Disabled Practice Music Hack as it caused some things to be unlocked that shouldn't have been unlocked
- Disabled Practice Music Hack as it caused some things to be unlocked that shouldn't have been unlocked.
- Fixed issue with deleting a macro not unselecting the deleted macro.
- Fixed issue with macros crashing the game if the last input frame is less than the real last input frame.
# v1.6.2
- Removed loadFromCheckpoint hook that caused Mac OS to crash (sorry Mac users :<)
# v1.6.1
Expand All @@ -24,7 +26,7 @@
- Refactored hack json files.
- Fixed No Death Effect not working with Hitbox on Death.
- Fixed startpos showing progress (again)
# v1.5.1
# v1.5.1
- Made the Prism Button hidden if you are in the Editor.
- Fixed bug with progress saving even in Test Mode.
- Fixed the ordering of the buttons for "Uncomplete Level".
Expand Down Expand Up @@ -103,26 +105,26 @@
- Fixed save issue
# v1.2.1
- Emergency Fix
# v1.2.0
# v1.2.0
- Added Indonesian Translations (Thank you RzaIX!)
- Fixed bug with Texture Loader crashing when applying a texture.
- Fixed bug with pause buttons not working.
# v1.1.5
- Added Russian Translations (Thank you MegaSa1nt, savvacorgi, and dankmeme01!)
- Added Czech Translations (Thank you Ignis!)
- Removed Free Shop Items for now so I can work on making a stats editor (Basically will make that useless)
# v1.1.41
# v1.1.41
- Fixed bug when you enter levels, it crashes. (On Android)
# v1.1.4
# v1.1.4
- Added support for 2.205 on Android.
- Fixed issue where the shop crashes.
- Removed "No Progress Bar" as it's now added in 2.205
- Added German translations (Thank you huhnmitferrari!)
- Fixed Portuguese translations
# v1.1.3
# v1.1.3
- Removed "Hide Testmode" from being considered a "cheat" in the "Cheat Indicator"
- Added Portuguese translations (Obrigado Gazonk!)
# v1.1.2
# v1.1.2
- Added live update for Menu Scale
- Increased the size of the scrollbar
- Fixed lag issues when the menu is open
Expand Down
9 changes: 6 additions & 3 deletions resources/hacks/player.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@
{
"name": "Freeze Player",
"desc": "Freezes player movement.",
"type": "bool"
"type": "bool",
"platforms": ["win", "android32", "android64"]
},
{
"name": "No Mirror Transition",
"desc": "Prevents the screen from being flipped upon a mirror portal.",
"type": "bool"
"type": "bool",
"platforms": ["win", "android32", "android64"]
},
{
"name": "Instant Mirror Portal",
Expand All @@ -46,7 +48,8 @@
{
"name": "Jump Hack",
"desc": "Allows for jumping in mid-air.",
"type": "bool"
"type": "bool",
"platforms": ["win", "android32", "android64"]
},
{
"name": "Instant Complete",
Expand Down
2 changes: 1 addition & 1 deletion src/Hacks/Global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class $modify(CCScheduler) {
}
};

#ifndef GEODE_IS_MACOS
#if !defined(GEODE_IS_MACOS) && !defined(GEODE_IS_IOS)
class $modify(PlayLayer) {
// No Glow, Show Hidden Objects
void addObject(GameObject* obj) {
Expand Down
2 changes: 1 addition & 1 deletion src/Hacks/Misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class $modify(PlayLayer) {
}
};

#ifndef GEODE_IS_MACOS // Show Hitboxes
#if !defined(GEODE_IS_MACOS) && !defined(GEODE_IS_IOS) // Show Hitboxes
inline void showLevelEditorHitboxes(LevelEditorLayer* ptr, bool mode) {
GameManager::get()->setGameVariable("0045", mode);
ptr->m_isDebugDrawEnabled = mode;
Expand Down
6 changes: 3 additions & 3 deletions src/Hacks/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ using namespace geode::prelude;

class $modify(PlayerObject) {
bool isActuallyDart;
#ifndef GEODE_IS_MACOS // for whatever reason, fields arent found!
#if !defined(GEODE_IS_MACOS) && !defined(GEODE_IS_IOS) // for whatever reason, fields arent found!
// No Solids
/*
* + bool collidedWithObject(float, GameObject*, cocos2d::CCRect, bool) = win 0x2cc450;
Expand Down Expand Up @@ -84,7 +84,7 @@ class $modify(PlayerObject) {


// No Wave Pulse
#ifndef GEODE_IS_MACOS
#if !defined(GEODE_IS_MACOS) && !defined(GEODE_IS_IOS)
class $modify(HardStreak) {
void updateStroke(float dt) {
//log::info("HardStreak\n---\nm_waveSize = {}\nm_pulseSize = {}\nm_isSolid = {}", m_waveSize, m_pulseSize, m_isSolid);
Expand Down Expand Up @@ -118,7 +118,7 @@ class $modify(MenuGameLayer) {


class $modify(GJBaseGameLayer) {
#ifndef GEODE_IS_MACOS
#if !defined(GEODE_IS_MACOS) && !defined(GEODE_IS_IOS)
// No Mirror Transition, Instant Mirror Portal
void toggleFlipped(bool p0, bool p1) { // i spent a lot of time figuring out why CCActionTween wont hook, only to realize that p1 instantly transitions it
if (!Hacks::isHackEnabled("No Mirror Transition")) return GJBaseGameLayer::toggleFlipped(p0, (p1) ? p1 : Hacks::isHackEnabled("Instant Mirror Portal"));
Expand Down
13 changes: 13 additions & 0 deletions src/Hacks/Quartz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,16 @@ void MacroItemCell::onTrash(CCObject*) {
if (ghc::filesystem::exists(savePath)) {
if (ghc::filesystem::remove(savePath)) {
FLAlertLayer::create("Success!", "Successfully deleted the macro.", "OK")->show();
m_list->m_dropdown->lbl->setString("None");
HackItem* item = Hacks::getHack("Macro");
if (item == nullptr) {
log::error("Couldn't find hack item \"Macro\"");
} else {
matjson::Array arr;
arr.push_back("None");
item->data["values"] = arr;
changedMacro = false;
}
m_list->onClose(nullptr);
}
}
Expand Down Expand Up @@ -494,6 +504,9 @@ class $modify(QuartzPlayLayer, PlayLayer) {
FLAlertLayer::create("Error", "You are attempting to <cy>playback a macro</c> that <cr>has no inputs!</c>\nConsider <cy>recording the macro</c> to play it back!", "OK")->show();
return;
} else {
std::sort(current_macro.inputs.begin(), current_macro.inputs.end(), [](const QuartzInput& a, const QuartzInput& b) {
return a.frame < b.frame;
});
m_fields->lastInputFrame = current_macro.inputs[current_macro.inputs.size() - 1].frame;
}
}
Expand Down
10 changes: 3 additions & 7 deletions src/UI/PrismUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -757,17 +757,13 @@ void PrismUI::RegenCategory() {

#ifdef GEODE_IS_WINDOWS
versionLabel->setString(fmt::format("{} - Windows", version).c_str());
#else // why does android not like elif
#ifdef GEODE_IS_ANDROID
#elif defined(GEODE_IS_ANDROID) // why does android not like elif
versionLabel->setString(fmt::format("{} - Android", version).c_str());
#else
#ifdef GEODE_IS_MACOS
#elif defined(GEODE_IS_MACOS)
versionLabel->setString(fmt::format("{} - Mac OS", version).c_str());
#else
#else // TODO: when camila releases iCreate on geode, add iOS
versionLabel->setString(fmt::format("{} - HOW by Spu7nix", version).c_str());
#endif
#endif
#endif
versionLabel->limitLabelWidth(150, 1.0F, .2F);
m_content->addChild(createdByLabel);
m_content->addChild(versionLabel);
Expand Down
12 changes: 8 additions & 4 deletions src/hacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class $modify(GJGameLevel) {
////GJGameLevel::saveNewScore

// sorry, some people are rushing me to release this, youll get your chance Mac OS users.
#ifndef GEODE_IS_MACOS
#if !defined(GEODE_IS_MACOS) && !defined(GEODE_IS_IOS)
void proceedWithReset(LevelInfoLayer* levelInfoLayer, GJGameLevel* level, bool resetStars, bool resetCoins) {
geode::createQuickPopup(
"Final Warning",
Expand Down Expand Up @@ -156,8 +156,8 @@ void Hacks::resetLevel(LevelInfoLayer* levelInfoLayer, GJGameLevel* level) {
if (prismUIExists != nullptr) {
static_cast<PrismUI*>(prismUIExists)->onClose(CCNode::create());
}
#ifdef GEODE_IS_MACOS
FLAlertLayer::create("Notice", "This currently does not work on <cy>Mac OS</c>\n(you can blame the people who rushed me to work on this)", "OK")->show();
#if defined(GEODE_IS_MACOS) || defined(GEODE_IS_IOS)
FLAlertLayer::create("Notice", "This currently does not work on <cy>Mac OS</c> and <cy>iOS</c>\n(you can blame the people who rushed me to work on this)", "OK")->show();
#else
if (level->m_dailyID > 0) {
FLAlertLayer::create("Notice", "This currently does not work on <cy>daily</c> or <cy>weekly</c> levels.", "OK")->show();
Expand Down Expand Up @@ -253,7 +253,11 @@ void Hacks::setTPS(int tps) {
#elif defined(GEODE_IS_MACOS)
uintptr_t addr2 = 0x7e9c60; // double
uintptr_t addr1 = 0x7e9ac0; // float
#endif
#elif defined(GEODE_IS_IOS)
// TODO: do later!
uintptr_t addr1 = 0x0;
uintptr_t addr2 = 0x0;
#endif
// sorry ios!
auto patches = Mod::get()->getPatches();
auto patch1 = std::find_if(patches.begin(), patches.end(), [addr1](Patch* const patch) {
Expand Down
2 changes: 1 addition & 1 deletion src/hacks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ class Hacks {
}
}
static void setPitch(float pitch) {
#ifndef GEODE_IS_MACOS // TODO: figure out why it turns to creepypasta when tuning down speedhack
#if !defined(GEODE_IS_MACOS) && !defined(GEODE_IS_IOS) // TODO: figure out why it turns to creepypasta when tuning down speedhack
if (!Hacks::isHackEnabled("Speedhack Audio")) {
pitch = 1.0F;
}
Expand Down
11 changes: 6 additions & 5 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class $modify(PlayLayer) {
void destroyPlayer(PlayerObject *p0, GameObject *p1) {
bool instaRestart = Hacks::isHackEnabled("Instant Respawn");
if (!m_fields->initedDeath) {
#if !defined(GEODE_IS_ANDROID64) && !defined(GEODE_IS_MACOS)
#if !defined(GEODE_IS_ANDROID64) && !defined(GEODE_IS_MACOS) && !defined(GEODE_IS_IOS)
if (m_fields->antiCheatObject == nullptr && p1 != nullptr && (
(p1->m_realXPosition == 0 && p1->m_realYPosition == p0->m_realYPosition) ||
(p1->m_realXPosition == 0 && p1->m_realYPosition == p0->m_realYPosition) // todo, get player pos during PlayLayer::init
Expand Down Expand Up @@ -301,7 +301,7 @@ class $modify(PlayLayer) {
break;
}*\/
}*/
#ifndef GEODE_IS_MACOS
#if !defined(GEODE_IS_MACOS) && !defined(GEODE_IS_IOS)
m_fields->previousTestMode = m_isTestMode;
#endif
if (Hacks::isHackEnabled("Level Edit")) {
Expand All @@ -319,10 +319,11 @@ class $modify(PlayLayer) {
}
}
}
#if 0
if (Hacks::isHackEnabled("Practice Music")) {
GameStatsManager::sharedState()->toggleEnableItem(UnlockType::GJItem, 17, true);
}

#endif
auto winSize = CCDirector::sharedDirector()->getWinSize();
m_fields->prismNode = CCNode::create();
m_fields->prismNode->setTag(10420);
Expand Down Expand Up @@ -384,7 +385,7 @@ class $modify(PlayLayer) {
m_fields->flashNode->setOpacity(m_fields->flashOpacity);
}
}
#ifndef GEODE_IS_MACOS
#if !defined(GEODE_IS_MACOS) && !defined(GEODE_IS_IOS)
if (!m_fields->hasSetTestMode) {
m_fields->hasSetTestMode = true;
m_fields->previousTestMode = m_isTestMode;
Expand Down Expand Up @@ -483,7 +484,7 @@ class $modify(PlayLayer) {
}

// Accurate Percentage
#ifndef GEODE_IS_MACOS
#if !defined(GEODE_IS_MACOS) && !defined(GEODE_IS_IOS)
void updateProgressbar() {
PlayLayer::updateProgressbar();
if (Hacks::isHackEnabled("Accurate Percentage")) {
Expand Down

0 comments on commit 92e601e

Please sign in to comment.