Skip to content

Commit 76f6ac3

Browse files
committed
v1.0.14
1 parent 0394c60 commit 76f6ac3

36 files changed

Lines changed: 1074 additions & 1486 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,6 @@
5151

5252
# clangd
5353
.cache/
54+
55+
# CMake
56+
CMakeSettings.json

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.21)
2-
set(CMAKE_CXX_STANDARD 20)
2+
set(CMAKE_CXX_STANDARD 23)
33
set(CMAKE_CXX_STANDARD_REQUIRED ON)
44
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS" OR IOS)
55
set(CMAKE_OSX_ARCHITECTURES "arm64")
@@ -19,12 +19,12 @@ add_library(${PROJECT_NAME} SHARED
1919
src/hooks/LevelCell.cpp
2020
src/hooks/PlayLayer.cpp
2121
src/popups/StatsPopup.cpp
22-
src/Utils.cpp
22+
src/DPUtils.cpp
2323
src/menus/DPListLayer.cpp
2424
src/menus/DPLayer.cpp
25+
src/menus/DPPackCell.cpp
2526
src/menus/RecommendedLayer.cpp
2627
src/popups/SupportPopup.cpp
27-
src/popups/NewsPopup.cpp
2828
src/XPUtils.cpp
2929
src/popups/XPPopup.cpp
3030
src/RecommendedUtils.cpp

changelog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# v1.0.14
2+
3+
* Updated for Geode v5 & GD v2.2081
4+
* Any GDDP Level can have a startpos now
5+
* Attempted to fix a weird crash involving top levels
6+
* Hopefully finally fixed Gauntlet Mode on the Roulette
7+
8+
Known Issues:
9+
* Monthly Timer Desyncs
10+
111
# v1.0.13
212

313
* Moved Practice copies to their respective levels instead of one big menu

mod.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"geode": "4.10.0",
2+
"geode": "5.0.0-beta.1",
33
"gd": {
4-
"win": "2.2074",
5-
"android": "2.2074",
6-
"ios": "2.2074",
7-
"mac": "2.2074"
4+
"win": "2.2081",
5+
"android": "2.2081",
6+
"ios": "2.2081",
7+
"mac": "2.2081"
88
},
9-
"version": "v1.0.13",
9+
"version": "v1.0.14",
1010
"id": "minemaker0430.gddp_integration",
1111
"name": "GDDP - Demon Progression",
1212
"developer": "ItsMochaTheOtter",
@@ -48,13 +48,12 @@
4848
"content"
4949
],
5050

51-
"dependencies": [
52-
{
53-
"id": "geode.node-ids",
54-
"version": ">=1.21.1",
51+
"dependencies": {
52+
"geode.node-ids": {
53+
"version": ">=1.22.0",
5554
"importance": "required"
5655
}
57-
],
56+
},
5857

5958
"settings": {
6059
"refresh-stats": {

src/Utils.cpp renamed to src/DPUtils.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
#include <Geode/loader/Event.hpp>
55
#include <Geode/utils/web.hpp>
66

7-
#include "Utils.hpp"
7+
#include "DPUtils.hpp"
88

99
//geode namespace
1010
using namespace geode::prelude;
1111

12-
std::vector<std::string> Utils::substring(std::string s, std::string d) {
12+
std::vector<std::string> DPUtils::substring(std::string s, std::string d) {
1313
std::vector<std::string> res;
1414
std::string delim = d;
1515
std::string token = "";
@@ -33,7 +33,7 @@ std::vector<std::string> Utils::substring(std::string s, std::string d) {
3333
return res;
3434
};
3535

36-
int Utils::safe_stoi(std::string input, int fallback) {
36+
int DPUtils::safe_stoi(std::string input, int fallback) {
3737
std::string result = "";
3838
std::string allowedChars = "0123456789";
3939

src/Utils.hpp renamed to src/DPUtils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//geode namespace
66
using namespace geode::prelude;
77

8-
class Utils {
8+
class DPUtils {
99
public:
1010
static std::vector<std::string> substring(std::string string, std::string delim);
1111
static int safe_stoi(std::string input, int fallback = 0);

src/RouletteUtils.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <random>
66

77
#include "RouletteUtils.hpp"
8-
#include "Utils.hpp"
8+
#include "DPUtils.hpp"
99

1010
//geode namespace
1111
using namespace geode::prelude;
@@ -123,7 +123,7 @@ void RouletteUtils::exportSettings(std::string settings, int seed) {
123123

124124
std::vector<std::string> RouletteUtils::importSettings(std::string str) {
125125
auto decodedStr = ZipUtils::base64URLDecode(str);
126-
auto values = Utils::substring(decodedStr, ";");
126+
auto values = DPUtils::substring(decodedStr, ";");
127127

128128
//verify settings string
129129
if (values[0] != "GDDPSettingsFormat" || values.size() != 4 || values[3] != "END") {
@@ -208,7 +208,7 @@ void RouletteUtils::importSave(std::string saveStr, bool fromFile) {
208208
log::info("TODO: Import save from file.");
209209
} else {
210210
auto decodedStr = ZipUtils::base64URLDecode(saveStr);
211-
auto values = Utils::substring(decodedStr, ";");
211+
auto values = DPUtils::substring(decodedStr, ";");
212212

213213
//verify save string
214214
if (values[0] != "GDDPSaveFormat" || values.size() != 9 || values[8] != "END") {
@@ -256,7 +256,7 @@ void RouletteUtils::importSave(std::string saveStr, bool fromFile) {
256256
257257
std::vector<int> lvls = setupLevels(packs, values[2], Utils::safe_stoi(values[3]));*/
258258
std::vector<int> lvls = {};
259-
auto lvlStrings = Utils::substring(values[3], ",");
259+
auto lvlStrings = DPUtils::substring(values[3], ",");
260260

261261
if (lvlStrings[0] != "LVLS") {
262262
FLAlertLayer::create(
@@ -269,18 +269,18 @@ void RouletteUtils::importSave(std::string saveStr, bool fromFile) {
269269

270270
for (std::string str : lvlStrings) {
271271
if (str != "LVLS") {
272-
lvls.push_back(Utils::safe_stoi(str));
272+
lvls.push_back(DPUtils::safe_stoi(str));
273273
}
274274
}
275275

276276
auto save = RouletteSaveFormat{
277277
.name = values[1],
278278
.settings = values[2],
279-
.seed = Utils::safe_stoi(values[4], -1),
279+
.seed = DPUtils::safe_stoi(values[4], -1),
280280
.levels = lvls,
281-
.progress = Utils::safe_stoi(values[5]),
282-
.skips = Utils::safe_stoi(values[6]),
283-
.score = Utils::safe_stoi(values[7])
281+
.progress = DPUtils::safe_stoi(values[5]),
282+
.skips = DPUtils::safe_stoi(values[6]),
283+
.score = DPUtils::safe_stoi(values[7])
284284
};
285285

286286
auto rouletteSaves = Mod::get()->getSavedValue<std::vector<RouletteSaveFormat>>("roulette-saves", {});

src/hooks/CreatorLayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class $modify(CreatorLayer) {
1717
bool init() {
1818
if (!CreatorLayer::init()) return false;
1919

20-
if (Mod::get()->getSavedValue<int>("database-version", 48) < 48) {
20+
if (Mod::get()->getSavedValue<int>("database-version", 161) < 161) {
2121
auto alert = FLAlertLayer::create(
2222
"IMPORTANT",
2323
"Your GDDP Data is outdated. Go into the Progression Menu to refresh it.",

src/hooks/LevelInfoLayer.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,9 @@ class $modify(DemonProgression, LevelInfoLayer) {
190190
log::info("{}", Mod::get()->getSavedValue<bool>("in-gddp"));
191191

192192
if (!Mod::get()->getSettingValue<bool>("restore-bg-color")) {
193-
auto bg = typeinfo_cast<CCSprite*>(this->getChildByID("background"));
194-
bg->setColor({ 18, 18, 86 });
193+
if (auto bg = typeinfo_cast<CCSprite*>(this->getChildByID("background"))) {
194+
bg->setColor({ 18, 18, 86 });
195+
}
195196
}
196197

197198
auto type = Mod::get()->getSavedValue<std::string>("current-pack-type", "main");
@@ -204,7 +205,10 @@ class $modify(DemonProgression, LevelInfoLayer) {
204205

205206
auto hasRank = Mod::get()->getSavedValue<ListSaveFormat>(saveID).hasRank;
206207

207-
auto diffSpr = typeinfo_cast<GJDifficultySprite*>(this->getChildByID("difficulty-sprite"));
208+
GJDifficultySprite* diffSpr;
209+
if (this->getChildByID("difficulty-sprite")) {
210+
diffSpr = typeinfo_cast<GJDifficultySprite*>(this->getChildByID("difficulty-sprite"));
211+
}
208212

209213
auto skillsetData = Mod::get()->getSavedValue<matjson::Value>("skillset-info", matjson::makeObject({
210214
{"unknown", matjson::makeObject({
@@ -274,7 +278,7 @@ class $modify(DemonProgression, LevelInfoLayer) {
274278
auto desc = skillsetData[skillID]["description"].asString().unwrapOr("erm that\'s awkward");
275279
auto spriteName = fmt::format("{}.png", skillsetData[skillID]["sprite"].asString().unwrapOr("DP_Skill_Unknown"));
276280

277-
CCSprite* sprite;
281+
CCSprite* sprite = CCSprite::createWithSpriteFrameName("DP_Skill_Unknown.png"_spr);
278282
if (CCSprite::createWithSpriteFrameName(Mod::get()->expandSpriteName(spriteName).data()) == nullptr) {
279283
if (skillsetData[skillID]["type"].asString().unwrapOr("none") == "special") {
280284
spriteName = fmt::format("{}.png", skillsetData["unknown"]["sprite"].asString().unwrapOr("DP_Skill_Special"));

0 commit comments

Comments
 (0)