This commit is contained in:
altalk23 2023-02-09 12:51:14 +03:00
commit c2221ea0af
3 changed files with 19 additions and 6 deletions

View file

@ -859,7 +859,16 @@ class CreatorLayer : cocos2d::CCLayer {
void onChallenge(cocos2d::CCObject*) = win 0x4f1b0;
void onLeaderboards(cocos2d::CCObject*) = win 0x4ed20;
void onMyLevels(cocos2d::CCObject*) = mac 0x142b70, win 0x4eaa0;
void onSavedLevels(cocos2d::CCObject*) = mac 0x142860;
void onSavedLevels(cocos2d::CCObject*) = mac 0x142860, win 0x4ebe0;
void onDailyLevel(cocos2d::CCObject*) = win 0x4f170;
void onWeeklyLevel(cocos2d::CCObject*) = win 0x4f190;
void onFeaturedLevels(cocos2d::CCObject*) = win 0x4edf0;
void onFameLevels(cocos2d::CCObject*) = win 0x4ee70;
void onMapPacks(cocos2d::CCObject*) = win 0x4efb0;
void onOnlineLevels(cocos2d::CCObject*) = win 0x4ef60;
void onGauntlets(cocos2d::CCObject*) = win 0x4f0a0;
void onSecretVault(cocos2d::CCObject*) = win 0x4f1d0;
void onTreasureRoom(cocos2d::CCObject*) = win 0x4f540;
virtual void sceneWillResume() = win 0x4fb50;
virtual bool init() = mac 0x141c10, win 0x4de40;
static CreatorLayer* create() = win 0x4dda0;
@ -5158,6 +5167,10 @@ class StatsCell : TableViewCell {
virtual void draw() = mac 0x11bf80, win 0x59d40;
}
class StatsLayer : GJDropDownLayer {
static StatsLayer* create() = win 0x25BCF0;
}
class TableView : CCScrollLayerExt, CCScrollLayerExtDelegate {
inline TableView() {}
inline TableView(cocos2d::CCRect rect) : CCScrollLayerExt(rect) {}

View file

@ -11,7 +11,7 @@
#include <mutex>
namespace geode {
using ScheduledFunction = utils::MiniFunction<void GEODE_CALL(void)>;
using ScheduledFunction = utils::MiniFunction<void()>;
struct InvalidGeodeFile {
ghc::filesystem::path path;

View file

@ -124,8 +124,6 @@ Result<> Mod::Impl::loadData() {
if (ghc::filesystem::exists(settingPath)) {
GEODE_UNWRAP_INTO(auto settingData, utils::file::readString(settingPath));
try {
std::string err;
// parse settings.json
auto json = json::parse(settingData);
@ -169,13 +167,15 @@ Result<> Mod::Impl::loadData() {
if (ghc::filesystem::exists(savedPath)) {
GEODE_UNWRAP_INTO(auto data, utils::file::readString(savedPath));
std::string err;
try {
m_saved = json::parse(data);
} catch (std::exception& err) {
return Err(std::string("Unable to parse saved values: ") + err.what());
}
if (!m_saved.is_object()) {
log::warn("saved.json was somehow not an object, forcing it to one");
m_saved = json::Object();
}
}
return Ok();