From 8d46289249f06acb07fcb1d92f86b408dd788cfc Mon Sep 17 00:00:00 2001 From: YellowCat98 Date: Mon, 26 Feb 2024 22:17:22 +0100 Subject: [PATCH] new ahmazing update! --- CHANGELOG.md | 6 +++++ README.md | 4 +-- about.md | 4 +-- mod.json | 21 ++++++++++++++-- src/main.cpp | 70 +++++++++++++++++++++++++++++----------------------- 5 files changed, 68 insertions(+), 37 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..3553612 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,6 @@ +# 1.0.0 +- Inital Release + +# 1.1.0 +- Ability to hide the "lite" subtext. +- Ability to remove the "GDLite. Free Trial" watermark from PlayLayer \ No newline at end of file diff --git a/README.md b/README.md index 4d7346f..dda2227 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# VERY COOL MOD!!! +# GDLite -this changes geometry dash into geometry dash lite. +this changes geometry dash into geometry dash lite. (with a few changes) # THIS DOESNT RESTRICT YOU FROM FULL VER GD FEATURES!! \ No newline at end of file diff --git a/about.md b/about.md index 61d8371..aacad25 100644 --- a/about.md +++ b/about.md @@ -1,5 +1,5 @@ # Hello Gamers! -This mod turns Geometry dash into Geometry Dash Lite, purely cosmetic, doesn't actually restrict you from any Full Version features. +This mod turns Geometry dash into Geometry Dash Lite, purely cosmetic, doesn't actually restrict you from any Full Version features. (keep in mind that this is based on the older version of geometry dash lite.) -## remember kids, breathing is essential to the human body. +mobile will be coming soon, diff --git a/mod.json b/mod.json index 5a1dff4..7faaef9 100644 --- a/mod.json +++ b/mod.json @@ -1,7 +1,10 @@ { "geode": "2.0.0", - "gd": "2.204", - "version": "v1.0.0", + "gd": { + "win": "2.204", + "android": "2.205" + }, + "version": "v1.1.0", "id": "yellowcat98.gdlite", "name": "GDLite", "developer": "YellowCat98", @@ -17,5 +20,19 @@ "sprites": [ "resources/*.png" ] + }, + "settings": { + "hide-lite-spr": { + "name": "Hide Lite Sprite", + "description": "Hides the Lite Sprite from MenuLayer", + "type": "bool", + "default": false + }, + "hide-gdlite-watermark": { + "name": "Hide the GDLite watermark", + "description": "Hides the 'GDLite, Free Trial' watermark from PlayLayer.", + "type": "bool", + "default": false + } } } diff --git a/src/main.cpp b/src/main.cpp index bb5f983..512da4f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,8 +6,12 @@ #include #include #include +#include +#include using namespace geode::prelude; +using namespace cocos2d; +using namespace std; class $modify(MenuLayer) { bool init() { @@ -16,7 +20,19 @@ class $modify(MenuLayer) { CCSprite* litespr = CCSprite::createWithSpriteFrameName("GJ_lite_001.png"); - litespr->setPosition(ccp(430, 233)); + CCSprite* maintitle = static_cast(this->getChildByID("main-title")); + auto maintitlexpos = maintitle->getPositionX(); + auto maintitleypos = maintitle->getPositionY(); + + litespr->setPosition(ccp(maintitlexpos + 149, maintitleypos - 32)); + litespr->setZOrder(2); + litespr->setID("lite-button"); + + + auto hideornot = Mod::get()->getSettingValue("hide-lite-spr"); + + litespr->setVisible(!hideornot); + this->addChild(litespr); @@ -29,10 +45,10 @@ class $modify(MenuLayer) { if (!MenuLayer::init()) return false; - CCMenu* rightSideMenu = dynamic_cast(this->getChildByID("right-side-menu")); + CCMenu* rightSideMenu = static_cast(this->getChildByID("right-side-menu")); if (rightSideMenu) { - CCMenuItemSpriteExtra* dailychest = dynamic_cast(rightSideMenu->getChildByID("daily-chest-button")); + CCMenuItemSpriteExtra* dailychest = static_cast(rightSideMenu->getChildByID("daily-chest-button")); if (dailychest) { CCSprite* freekeveks = CCSprite::createWithSpriteFrameName("GJ_freeStuffBtn_001.png"); @@ -49,16 +65,12 @@ class $modify(MenuLayer) { if (!MenuLayer::init()) return false; - CCMenu* MainMenu = dynamic_cast(this->getChildByID("main-menu")); + CCMenu* MainMenu = static_cast(this->getChildByID("main-menu")); - if (MainMenu) { - CCMenuItemSpriteExtra* editbtn = dynamic_cast(MainMenu->getChildByID("editor-button")); + CCMenuItemSpriteExtra* editbtn = static_cast(MainMenu->getChildByID("editor-button")); - if (editbtn) { - CCSprite* fullbtn = CCSprite::createWithSpriteFrameName("GJ_fullBtn_001.png"); - editbtn->setNormalImage(fullbtn); - } - } + CCSprite* fullbtn = CCSprite::createWithSpriteFrameName("GJ_fullBtn_001.png"); + editbtn->setNormalImage(fullbtn); return true; } @@ -69,10 +81,10 @@ class $modify(MenuLayer) { if (!MenuLayer::init()) return false; - CCMenu* moregamesmenu = dynamic_cast(this->getChildByID("more-games-menu")); + CCMenu* moregamesmenu = static_cast(this->getChildByID("more-games-menu")); if (moregamesmenu) { - CCMenuItemSpriteExtra* moregamesbtn = dynamic_cast(moregamesmenu->getChildByID("more-games-button")); + CCMenuItemSpriteExtra* moregamesbtn = static_cast(moregamesmenu->getChildByID("more-games-button")); if (moregamesbtn) { CCSprite* freekeveks = CCSprite::createWithSpriteFrameName("GJ_freeLevelsBtn_001.png"); @@ -84,23 +96,11 @@ class $modify(MenuLayer) { } }; -class $modify(CreatorLayer) { - bool init() { - if (!CreatorLayer::init()) - return false; - - CCLabelBMFont* label = CCLabelBMFont::create("Buy Geometry Dash at your local walmart!", "bigFont.fnt"); - - label->setPosition(ccp(284, 19)); - label->setScale(0.5f); - - this->addChild(label); - } -}; - class $modify(GJMoreGamesLayer) { void customSetup() { GJMoreGamesLayer::customSetup(); + #ifndef GEODE_IS_ANDROID + CCLayer* cclayer = dynamic_cast(getChildren()->objectAtIndex(0)); @@ -111,6 +111,7 @@ class $modify(GJMoreGamesLayer) { CCLabelBMFont* easports = CCLabelBMFont::create("this bad design is fixed in the full version of Geometry Dash Lite.", "bigFont.fnt"); CCLabelBMFont* wgat = dynamic_cast(cclayer->getChildren()->objectAtIndex(4)); + gjzpromo->setPosition(ccp(283, 219)); @@ -129,21 +130,28 @@ class $modify(GJMoreGamesLayer) { cclayer->addChild(gjwpromo); cclayer->addChild(gjmpromo); cclayer->addChild(easports); + + #endif } }; + class $modify(PlayLayer) { bool init(GJGameLevel* p0, bool p1, bool p2) { if (!PlayLayer::init(p0, p1, p2)) return false; - UILayer* uilayer = dynamic_cast(this->getChildByID("UILayer")); + UILayer* uilayer = static_cast(this->getChildByID("UILayer")); CCLabelBMFont* label = CCLabelBMFont::create("GDLite. free trial", "bigFont.fnt"); - label->setPosition(ccp(41, 9)); - label->setScale(0.225f); + label->setPosition(ccp(41, 9)); + label->setScale(0.225f); + + auto hidegdlitewmornot = Mod::get()->getSettingValue("hide-gdlite-watermark"); + + label->setVisible(!hidegdlitewmornot); - uilayer->addChild(label); + uilayer->addChild(label); return true; } }; \ No newline at end of file