Skip to content

Commit

Permalink
some bug fix and maybe add more hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
FireMario211 committed Sep 18, 2024
1 parent 5468b47 commit 0d49dbe
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 25 deletions.
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# v1.9.1
- Fixed bug with Noclip Accuracy continuing even after the level is completed
- Added more mac hacks
- Updated Russian Translations
- Updated Romanian Translations
- Updated Turkish Translations
- Updated French Translations
# v1.9.0
- Added Auto Clicker
- Added Low FPS Pause
Expand Down
4 changes: 2 additions & 2 deletions mod.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"geode": "3.4.0",
"version": "v1.9.0",
"geode": "3.7.1",
"version": "v1.9.1",
"gd": {
"win": "2.206",
"mac": "2.206",
Expand Down
6 changes: 2 additions & 4 deletions resources/hacks/global.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@
{
"name": "Accurate Percentage",
"desc": "Allows for decimals in the level percentage.",
"type": "bool",
"platforms": ["win", "android32", "android64"]
"type": "bool"
},
{
"name": "Extra Percent Digits",
Expand All @@ -67,8 +66,7 @@
"min": 1,
"max": 15,
"step": 1,
"default": 4,
"platforms": ["win", "android32", "android64"]
"default": 4
},
{
"name": "Uncomplete Level",
Expand Down
3 changes: 1 addition & 2 deletions resources/hacks/player.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@
{
"name": "Force Platformer Mode",
"desc": "Forces you to be in platformer mode when playing a level.",
"type": "bool",
"platforms": ["win", "android32", "android64"]
"type": "bool"
},
{
"name": "Hide Player",
Expand Down
11 changes: 2 additions & 9 deletions src/Hacks/Quartz.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,8 @@ class MacroManager {
macro.framerate = intFPS;
macro.levelInfo.name = "";
macro.levelInfo.id = 0;
#ifdef GEODE_IS_WINDOWS
macro.gameVersion = 2.204;
#endif
#if defined(GEODE_IS_ANDROID) || defined(GEODE_IS_IOS)
macro.gameVersion = 2.205;
#endif
#ifdef GEODE_IS_MACOS
macro.gameVersion = 2.200;
#endif

macro.gameVersion = 2.206;
std::ofstream f(savePath, std::ios::binary);
auto data = macro.exportData(isJSON);

Expand Down
2 changes: 1 addition & 1 deletion src/UI/CreditsMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ std::vector<CreditUser> users = {
{
"Rexosouli",
35,
"Proofreader (FR)",
"Translator (FR)",
{ 0,200,255 },
{ 0,255,255 },
{ 0,255,255 },
Expand Down
12 changes: 5 additions & 7 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ class $modify(PrismPlayLayer, PlayLayer) {
CCLabelBMFont* accuracyLabel;
float flashOpacity = 0.0F;
CCSprite* flashNode;

bool hasCompletedLevel = false;
};

// Anticheat Bypass, Noclip, No Spikes, No Solids
Expand Down Expand Up @@ -374,9 +376,7 @@ class $modify(PrismPlayLayer, PlayLayer) {
break;
}*\/
}*/
#if !defined(GEODE_IS_MACOS) && !defined(GEODE_IS_IOS)
m_fields->previousTestMode = m_isTestMode;
#endif
if (Hacks::isHackEnabled("Level Edit")) {
//m_fields->m_gameLevel->m_levelType = static_cast<GJLevelType>(2);
}
Expand Down Expand Up @@ -430,12 +430,13 @@ class $modify(PrismPlayLayer, PlayLayer) {
}
void resetLevel() {
m_fields->death = 0;
m_fields->hasCompletedLevel = false;
PlayLayer::resetLevel();
}
void postUpdate(float p0) {
PlayLayer::postUpdate(p0);
if (m_player1 != nullptr && Hacks::isHackEnabled("Suicide")) return PlayLayer::destroyPlayer(m_player1, nullptr);
if (m_fields->accuracyLabel != nullptr) {
if (m_fields->accuracyLabel != nullptr && !m_fields->hasCompletedLevel) {
float accuracy = ((static_cast<float>(m_gameState.m_currentProgress - m_fields->death)) / static_cast<float>(m_gameState.m_currentProgress)) * 100; // for some reason this doesnt work on android, like it goes in the negatives
m_fields->accuracyLabel->setString(fmt::format("{}%", Utils::setPrecision(accuracy, 2)).c_str());
m_fields->accuracyLabel->setVisible(Hacks::isHackEnabled("Noclip Accuracy") && (Hacks::isHackEnabled("Noclip") || Hacks::isHackEnabled("No Solids") || Hacks::isHackEnabled("No Spikes")));
Expand All @@ -448,7 +449,6 @@ class $modify(PrismPlayLayer, PlayLayer) {
m_fields->flashNode->setOpacity(m_fields->flashOpacity);
}
}
#if !defined(GEODE_IS_MACOS) && !defined(GEODE_IS_IOS)
if (!m_fields->hasSetTestMode) {
m_fields->hasSetTestMode = true;
m_fields->previousTestMode = m_isTestMode;
Expand All @@ -460,7 +460,6 @@ class $modify(PrismPlayLayer, PlayLayer) {
m_isTestMode = m_fields->previousTestMode;
}
}
#endif
// whats the difference between m_fields and not using? i have no idea!
if (Hacks::isCheating()) { // cheating
if (!m_fields->isCheating) {
Expand Down Expand Up @@ -547,7 +546,6 @@ class $modify(PrismPlayLayer, PlayLayer) {
}

// Accurate Percentage
#if !defined(GEODE_IS_MACOS) && !defined(GEODE_IS_IOS)
void updateProgressbar() {
PlayLayer::updateProgressbar();
if (Hacks::isHackEnabled("Accurate Percentage")) {
Expand All @@ -559,8 +557,8 @@ class $modify(PrismPlayLayer, PlayLayer) {
m_fields->percentLabel->setString(percentStr.c_str());
}
}
#endif
void levelComplete() {
m_fields->hasCompletedLevel = true;
if (!(Hacks::isHackEnabled("Safe Mode") || Hacks::isAutoSafeModeActive())) return PlayLayer::levelComplete();
PlayLayer::resetLevel(); // haha
}
Expand Down

0 comments on commit 0d49dbe

Please sign in to comment.