Skip to content

Commit

Permalink
some new hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
TobyAdd committed Nov 29, 2024
1 parent f30f0e7 commit 2669ed2
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/hacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ void Hacks::Init() {
}
},
{"Bypass", 10, 250, 200, 250,
{
{
{"Text Length", "Removes the text input limit", "text_lenght"}, // +
{"Slider Limit", "Removes the limit on sliding beyond set limits", "slider_limit"},
{"Character Filter", "Lets you input any character in all text inputs", "char_filter"}, // +
{"Checkpoint Limit", "Removes the limit that deletes previous checkpoints after the 50th checkpoint", "checkpoint_limit"},
{"Slider Limit", "Removes the limit on sliding beyond set limits", "slider_limit"}, // +
{"Character Filter", "Lets you input any character in all text inputs", "char_filter"}, // +
{"Checkpoint Limit", "Removes the limit that deletes previous checkpoints after the 50th checkpoint", "checkpoint_limit"}, // +
{"Treasure Room", "Unlocks the Treasure Room", "treasure_room"}, // +
{"Unlock Shops", "Unlocks all shops", "unlock_shops"}, // +
{"Unlock Vaults", "Unlocks all Vaults and doors", "unlock_vaults"},
Expand All @@ -39,8 +39,8 @@ void Hacks::Init() {
{"Coins In Practice", "The ability to collect coins in practice", "coins_in_practice"},
{"Confirm Exit", "Warning before level exit", "confim_exit", "0167"}, // +
{"Fast Chest Open", "Removes the delay for opening chests", "fast_chest_open"},
{"Force Dont Enter", "Disables effects when objects enter the viewable play area", "force_dont_enter"},
{"Force Dont Fade", "Disables effects when objects leave the viewable play area", "force_dont_fade"},
// {"Force Dont Enter", "Disables effects when objects enter the viewable play area", "force_dont_enter"},
// {"Force Dont Fade", "Disables effects when objects leave the viewable play area", "force_dont_fade"},
{"Random Seed", "Changes the seed game so that the random trigger is not triggered randomly", "random_seed"},
{"Respawn Time", "Changes respawn time on death", "respawn_time"}, // +
{"Ignore ESC", "Prevents exiting the level", "ignore_esc"}, // +
Expand Down Expand Up @@ -82,20 +82,21 @@ void Hacks::Init() {
{"Wave Trail On Death", "", "wave_trail_on_death"} // +
}
},
{"Creator", 450, 10, 220, 250,
{"Creator", 450, 10, 220, 280,
{
{"Copy Hack", "Copy any online level without a password", "copy_hack"}, // +
{"Custom Object Bypass", "Removes the limit restricted to 1000 objects", "custom_object_bypass"},
{"Custom Object Bypass", "Removes the limit restricted to 1000 objects", "custom_object_bypass"}, // +
{"Default Song Bypass", "Removes restrictions on secret official songs", "default_song_bypass"}, // +
{"Editor Extension", "Increases the editor length by a factor of 128", "editor_extension"}, // +
{"Verify Hack", "Publish a level without verification", "verify_hack"}, // +
{"Smooth Editor Trail", "Makes the wave smoother in the editor", "smooth_editor_trail"}, // +
{"Level Edit", "Edit any online level", "level_edit"}, // +
{"No (C) Mark", "Removes copyright on copied levels", "no_c_mark"} // +
{"No (C) Mark", "Removes copyright on copied levels", "no_c_mark"}, // +
{"Zoom Bypass", "", "zoom_bypass"} // +
}
},
{"Framerate", 450, 270, 220, 130},
{"GDH Settings", 450, 410, 220, 130},
{"Framerate", 450, 300, 220, 130},
{"GDH Settings", 450, 440, 220, 130},
{"Replay Engine", 680, 10, 300, 200},
{"Labels", 680, 220, 300, 320},
{"Variables", 10, 510, 200, 160},
Expand Down
44 changes: 44 additions & 0 deletions src/hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,14 @@ class $modify(PlayLayer) {
Labels::get().session_time += time;
}

void storeCheckpoint(CheckpointObject* obj) {
if (!Config::get().get("checkpoint_limit", false))
return PlayLayer::storeCheckpoint(obj);

m_checkpointArray->addObject(obj);
PlayLayer::addToSection(obj->m_physicalCheckpointObject);
}

void updateVisibility(float dt) {
auto& config = Config::get();

Expand Down Expand Up @@ -793,6 +801,42 @@ class $modify(EditorUI) {
EditorUI::onSettings(sender);
LevelEditorLayer::get()->m_level->m_levelType = levelType;
}

void zoomIn(cocos2d::CCObject* sender) {
if (!Config::get().get("zoom_bypass", false))
return EditorUI::zoomIn(sender);

float scale = m_editorLayer->m_objectLayer->getScale();
EditorUI::updateZoom(scale + 0.1f);
}

// void zoomOut(cocos2d::CCObject* sender) {
// if (!Config::get().get("zoom_bypass", false))
// return EditorUI::zoomOut(sender);

// float scale = m_editorLayer->m_objectLayer->getScale();
// EditorUI::updateZoom(scale - 0.1f);
// }

void onNewCustomItem(CCObject* sender) {
if (!Config::get().get("custom_object_bypass", false))
return EditorUI::onNewCustomItem(sender);

auto gm = GameManager::get();
if (gm) {
cocos2d::CCArray* objects;
if (m_selectedObjects->count()) {
objects = m_selectedObjects;
}
else {
objects = cocos2d::CCArray::create();
objects->addObject(m_selectedObject);
}
gm->addNewCustomObject(copyObjects(objects, false, false));
m_selectedObjectIndex = 0;
reloadCustomItems();
}
}
};

class $modify(EditorPauseLayer) {
Expand Down

0 comments on commit 2669ed2

Please sign in to comment.