mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-26 17:36:05 -05:00
Add geode::prelude
to replace USE_GEODE_NAMESPACE()
Don't use macros where not necessary! This deprecates the old macro by way of a weird alias namespace.
This commit is contained in:
parent
174136ce0b
commit
5af15fba7c
90 changed files with 135 additions and 130 deletions
|
@ -14,7 +14,7 @@ Here's a **Hello World** mod in Geode:
|
||||||
#include <Geode/Bindings.hpp>
|
#include <Geode/Bindings.hpp>
|
||||||
#include <Geode/modify/MenuLayer.hpp>
|
#include <Geode/modify/MenuLayer.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
class $modify(MenuLayer) {
|
class $modify(MenuLayer) {
|
||||||
void onMoreGames(CCObject*) {
|
void onMoreGames(CCObject*) {
|
||||||
|
|
|
@ -1,47 +1,10 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <Geode/Prelude.hpp>
|
||||||
#include <Geode/c++stl/gdstdlib.hpp>
|
#include <Geode/c++stl/gdstdlib.hpp>
|
||||||
#include <Geode/platform/platform.hpp>
|
#include <Geode/platform/platform.hpp>
|
||||||
#include <variant>
|
#include <variant>
|
||||||
|
|
||||||
// Because C++ doesn't like using a
|
|
||||||
// namespace that doesn't exist
|
|
||||||
|
|
||||||
namespace geode {}
|
|
||||||
|
|
||||||
namespace geode::addresser {}
|
|
||||||
|
|
||||||
namespace geode::cast {}
|
|
||||||
|
|
||||||
namespace geode::cocos {}
|
|
||||||
|
|
||||||
namespace geode::utils {}
|
|
||||||
|
|
||||||
namespace geode::helper {}
|
|
||||||
|
|
||||||
namespace geode::op {}
|
|
||||||
|
|
||||||
namespace geode::stream {}
|
|
||||||
|
|
||||||
namespace geode::view {}
|
|
||||||
|
|
||||||
namespace cocos2d {}
|
|
||||||
|
|
||||||
namespace cocos2d::extension {}
|
|
||||||
|
|
||||||
#define USE_GEODE_NAMESPACE() \
|
|
||||||
using namespace geode; \
|
|
||||||
using namespace geode::addresser; \
|
|
||||||
using namespace geode::cast; \
|
|
||||||
using namespace geode::cocos; \
|
|
||||||
using namespace geode::helper; \
|
|
||||||
using namespace geode::utils; \
|
|
||||||
using namespace geode::op; \
|
|
||||||
using namespace geode::stream; \
|
|
||||||
using namespace geode::view; \
|
|
||||||
using namespace cocos2d; \
|
|
||||||
using namespace cocos2d::extension;
|
|
||||||
|
|
||||||
#define GEODE_STATIC_PTR(type, name) \
|
#define GEODE_STATIC_PTR(type, name) \
|
||||||
static type* s_##name; \
|
static type* s_##name; \
|
||||||
inline type* name() { \
|
inline type* name() { \
|
||||||
|
|
40
loader/include/Geode/Prelude.hpp
Normal file
40
loader/include/Geode/Prelude.hpp
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// Because C++ doesn't like using
|
||||||
|
// namespaces that don't exist
|
||||||
|
namespace geode {
|
||||||
|
namespace addresser {}
|
||||||
|
namespace cast {}
|
||||||
|
namespace cocos {}
|
||||||
|
namespace utils {}
|
||||||
|
namespace helper {}
|
||||||
|
namespace op {}
|
||||||
|
namespace stream {}
|
||||||
|
namespace view {}
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace cocos2d {
|
||||||
|
namespace extension {}
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace geode {
|
||||||
|
namespace prelude {
|
||||||
|
using namespace ::geode;
|
||||||
|
using namespace ::geode::addresser;
|
||||||
|
using namespace ::geode::cast;
|
||||||
|
using namespace ::geode::cocos;
|
||||||
|
using namespace ::geode::helper;
|
||||||
|
using namespace ::geode::utils;
|
||||||
|
using namespace ::geode::op;
|
||||||
|
using namespace ::geode::stream;
|
||||||
|
using namespace ::geode::view;
|
||||||
|
using namespace ::cocos2d;
|
||||||
|
using namespace ::cocos2d::extension;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace [[deprecated("Use `using namespace geode::prelude` instead!")]] old_prelude {
|
||||||
|
using namespace ::geode::prelude;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#define USE_GEODE_NAMESPACE() using namespace geode::old_prelude;
|
|
@ -3,7 +3,7 @@
|
||||||
#include <Geode/utils/ranges.hpp>
|
#include <Geode/utils/ranges.hpp>
|
||||||
#include <cocos2d.h>
|
#include <cocos2d.h>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
static std::vector<CCTexturePack> PACKS;
|
static std::vector<CCTexturePack> PACKS;
|
||||||
static std::vector<std::string> PATHS;
|
static std::vector<std::string> PATHS;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include <Geode/binding/CCMenuItemSpriteExtra.hpp>
|
#include <Geode/binding/CCMenuItemSpriteExtra.hpp>
|
||||||
#include <Geode/binding/CCMenuItemToggler.hpp>
|
#include <Geode/binding/CCMenuItemToggler.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
#pragma warning(disable: 4273)
|
#pragma warning(disable: 4273)
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#ifdef GEODE_IS_MACOS
|
#ifdef GEODE_IS_MACOS
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
#include <Geode/loader/Mod.hpp>
|
#include <Geode/loader/Mod.hpp>
|
||||||
#include <Geode/modify/Modify.hpp>
|
#include <Geode/modify/Modify.hpp>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <Geode/modify/CCNode.hpp>
|
#include <Geode/modify/CCNode.hpp>
|
||||||
#include <cocos2d.h>
|
#include <cocos2d.h>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
using namespace geode::modifier;
|
using namespace geode::modifier;
|
||||||
|
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
#include <loader/LoaderImpl.hpp>
|
#include <loader/LoaderImpl.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
struct CustomLoadingLayer : Modify<CustomLoadingLayer, LoadingLayer> {
|
struct CustomLoadingLayer : Modify<CustomLoadingLayer, LoadingLayer> {
|
||||||
bool m_updatingResources;
|
bool m_updatingResources;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include <loader/ModImpl.hpp>
|
#include <loader/ModImpl.hpp>
|
||||||
#include <loader/LoaderImpl.hpp>
|
#include <loader/LoaderImpl.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
#pragma warning(disable : 4217)
|
#pragma warning(disable : 4217)
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include <Geode/loader/Mod.hpp>
|
#include <Geode/loader/Mod.hpp>
|
||||||
#include <Geode/modify/Modify.hpp>
|
#include <Geode/modify/Modify.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
// for some reason RobTop uses MessageBoxW in his GLFW error handler.
|
// for some reason RobTop uses MessageBoxW in his GLFW error handler.
|
||||||
// no one knows how this is possible (he passes char* to wchar_t*).
|
// no one knows how this is possible (he passes char* to wchar_t*).
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
#include <Geode/modify/CCTouchDispatcher.hpp>
|
#include <Geode/modify/CCTouchDispatcher.hpp>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <Geode/ui/SceneManager.hpp>
|
#include <Geode/ui/SceneManager.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
#include <Geode/modify/AchievementNotifier.hpp>
|
#include <Geode/modify/AchievementNotifier.hpp>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <Geode/loader/Loader.hpp>
|
#include <Geode/loader/Loader.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
#include <Geode/modify/AppDelegate.hpp>
|
#include <Geode/modify/AppDelegate.hpp>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <loader/LoaderImpl.hpp>
|
#include <loader/LoaderImpl.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
#include <Geode/modify/CCScheduler.hpp>
|
#include <Geode/modify/CCScheduler.hpp>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include <Geode/modify/LoadingLayer.hpp>
|
#include <Geode/modify/LoadingLayer.hpp>
|
||||||
#include <Geode/modify/GameManager.hpp>
|
#include <Geode/modify/GameManager.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
struct ResourcesUpdate : Modify<ResourcesUpdate, LoadingLayer> {
|
struct ResourcesUpdate : Modify<ResourcesUpdate, LoadingLayer> {
|
||||||
void loadAssets() {
|
void loadAssets() {
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
#include <Geode/Bindings.hpp>
|
#include <Geode/Bindings.hpp>
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
static constexpr int32_t GEODE_ID_PRIORITY = 0x100000;
|
static constexpr int32_t GEODE_ID_PRIORITY = 0x100000;
|
||||||
|
|
||||||
template<class T = CCNode>
|
template <class T = CCNode>
|
||||||
requires std::is_base_of_v<CCNode, T>
|
requires std::is_base_of_v<CCNode, T>
|
||||||
T* setIDSafe(CCNode* node, int index, const char* id) {
|
T* setIDSafe(CCNode* node, int index, char const* id) {
|
||||||
if constexpr (std::is_same_v<CCNode, T>) {
|
if constexpr (std::is_same_v<CCNode, T>) {
|
||||||
if (auto child = getChild(node, index)) {
|
if (auto child = getChild(node, index)) {
|
||||||
child->setID(id);
|
child->setID(id);
|
||||||
|
@ -56,8 +56,10 @@ static void switchChildrenToMenu(CCNode* parent, CCMenu* menu, Args... args) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, typename ...Args>
|
template <typename T, typename... Args>
|
||||||
static CCMenu* detachAndCreateMenu(CCNode* parent, const char* menuID, Layout* layout, T first, Args... args) {
|
static CCMenu* detachAndCreateMenu(
|
||||||
|
CCNode* parent, char const* menuID, Layout* layout, T first, Args... args
|
||||||
|
) {
|
||||||
if (!first) {
|
if (!first) {
|
||||||
auto menu = CCMenu::create();
|
auto menu = CCMenu::create();
|
||||||
menu->setID(menuID);
|
menu->setID(menuID);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <Geode/modify/CreatorLayer.hpp>
|
#include <Geode/modify/CreatorLayer.hpp>
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
template<class... Args>
|
template<class... Args>
|
||||||
static void reorderButtons(Args... args) {
|
static void reorderButtons(Args... args) {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
#include <Geode/ui/BasedButtonSprite.hpp>
|
#include <Geode/ui/BasedButtonSprite.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
$register_ids(EditLevelLayer) {
|
$register_ids(EditLevelLayer) {
|
||||||
setIDs(
|
setIDs(
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include <Geode/modify/EditorPauseLayer.hpp>
|
#include <Geode/modify/EditorPauseLayer.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
// special class for this because making it a CCMenuItemToggler would be very UB
|
// special class for this because making it a CCMenuItemToggler would be very UB
|
||||||
// (not gonna reinterpret_cast that into the members)
|
// (not gonna reinterpret_cast that into the members)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <Geode/modify/EditorUI.hpp>
|
#include <Geode/modify/EditorUI.hpp>
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
$register_ids(EditorUI) {
|
$register_ids(EditorUI) {
|
||||||
setIDSafe(this, 0, "position-slider");
|
setIDSafe(this, 0, "position-slider");
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <Geode/modify/GJGarageLayer.hpp>
|
#include <Geode/modify/GJGarageLayer.hpp>
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
$register_ids(GJGarageLayer) {
|
$register_ids(GJGarageLayer) {
|
||||||
setIDSafe(this, 2, "username-label");
|
setIDSafe(this, 2, "username-label");
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <Geode/modify/LevelBrowserLayer.hpp>
|
#include <Geode/modify/LevelBrowserLayer.hpp>
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
$register_ids(LevelBrowserLayer) {
|
$register_ids(LevelBrowserLayer) {
|
||||||
auto winSize = CCDirector::get()->getWinSize();
|
auto winSize = CCDirector::get()->getWinSize();
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <Geode/modify/LevelSettingsLayer.hpp>
|
#include <Geode/modify/LevelSettingsLayer.hpp>
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
$register_ids(LevelSettingsLayer) {
|
$register_ids(LevelSettingsLayer) {
|
||||||
bool startPos = m_mainLayer->getChildrenCount() < 10;
|
bool startPos = m_mainLayer->getChildrenCount() < 10;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
#include <Geode/ui/BasedButtonSprite.hpp>
|
#include <Geode/ui/BasedButtonSprite.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
$register_ids(MenuLayer) {
|
$register_ids(MenuLayer) {
|
||||||
// set IDs to everything
|
// set IDs to everything
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <Geode/modify/PauseLayer.hpp>
|
#include <Geode/modify/PauseLayer.hpp>
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
$register_ids(PauseLayer) {
|
$register_ids(PauseLayer) {
|
||||||
setIDs(
|
setIDs(
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <Geode/modify/UILayer.hpp>
|
#include <Geode/modify/UILayer.hpp>
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
$register_ids(UILayer) {
|
$register_ids(UILayer) {
|
||||||
if (auto menu = getChildOfType<CCMenu>(this, 0)) {
|
if (auto menu = getChildOfType<CCMenu>(this, 0)) {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <crashlog.hpp>
|
#include <crashlog.hpp>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
ghc::filesystem::path dirs::getGameDir() {
|
ghc::filesystem::path dirs::getGameDir() {
|
||||||
return ghc::filesystem::path(CCFileUtils::sharedFileUtils()->getWritablePath2().c_str());
|
return ghc::filesystem::path(CCFileUtils::sharedFileUtils()->getWritablePath2().c_str());
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <Geode/loader/Event.hpp>
|
#include <Geode/loader/Event.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
void EventListenerProtocol::enable() {
|
void EventListenerProtocol::enable() {
|
||||||
Event::listeners().insert(this);
|
Event::listeners().insert(this);
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include "ModImpl.hpp"
|
#include "ModImpl.hpp"
|
||||||
#include "HookImpl.hpp"
|
#include "HookImpl.hpp"
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
Hook::Hook(std::shared_ptr<Impl>&& impl) : m_impl(std::move(impl)) {}
|
Hook::Hook(std::shared_ptr<Impl>&& impl) : m_impl(std::move(impl)) {}
|
||||||
Hook::~Hook() {}
|
Hook::~Hook() {}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "ModImpl.hpp"
|
#include "ModImpl.hpp"
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
class Hook::Impl {
|
class Hook::Impl {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <Geode/loader/IPC.hpp>
|
#include <Geode/loader/IPC.hpp>
|
||||||
#include <json.hpp>
|
#include <json.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
std::monostate geode::listenForIPC(std::string const& messageID, json::Value(*callback)(IPCEvent*)) {
|
std::monostate geode::listenForIPC(std::string const& messageID, json::Value(*callback)(IPCEvent*)) {
|
||||||
(void) new EventListener(
|
(void) new EventListener(
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <Geode/utils/JsonValidation.hpp>
|
#include <Geode/utils/JsonValidation.hpp>
|
||||||
|
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
// ModInstallEvent
|
// ModInstallEvent
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "LoaderImpl.hpp"
|
#include "LoaderImpl.hpp"
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
Loader::Loader() : m_impl(new Impl) {}
|
Loader::Loader() : m_impl(new Impl) {}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
Loader::Impl* LoaderImpl::get() {
|
Loader::Impl* LoaderImpl::get() {
|
||||||
return Loader::get()->m_impl.get();
|
return Loader::get()->m_impl.get();
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
using namespace geode::log;
|
using namespace geode::log;
|
||||||
using namespace cocos2d;
|
using namespace cocos2d;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include <Geode/loader/Dirs.hpp>
|
#include <Geode/loader/Dirs.hpp>
|
||||||
#include "ModImpl.hpp"
|
#include "ModImpl.hpp"
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
Mod::Mod(ModInfo const& info) : m_impl(std::make_unique<Impl>(this, info)) {}
|
Mod::Mod(ModInfo const& info) : m_impl(std::make_unique<Impl>(this, info)) {}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <Geode/loader/ModEvent.hpp>
|
#include <Geode/loader/ModEvent.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
ModStateEvent::ModStateEvent(Mod* mod, ModEventType type) : m_mod(mod), m_type(type) {}
|
ModStateEvent::ModStateEvent(Mod* mod, ModEventType type) : m_mod(mod), m_type(type) {}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
Mod::Impl* ModImpl::getImpl(Mod* mod) {
|
Mod::Impl* ModImpl::getImpl(Mod* mod) {
|
||||||
return mod->m_impl.get();
|
return mod->m_impl.get();
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <about.hpp>
|
#include <about.hpp>
|
||||||
#include <json.hpp>
|
#include <json.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
bool Dependency::isResolved() const {
|
bool Dependency::isResolved() const {
|
||||||
return !this->required ||
|
return !this->required ||
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <Geode/loader/Hook.hpp>
|
#include <Geode/loader/Hook.hpp>
|
||||||
#include <json.hpp>
|
#include <json.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
bool Patch::apply() {
|
bool Patch::apply() {
|
||||||
return bool(tulip::hook::writeMemory(m_address, m_patch.data(), m_patch.size()));
|
return bool(tulip::hook::writeMemory(m_address, m_patch.data(), m_patch.size()));
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <Geode/utils/JsonValidation.hpp>
|
#include <Geode/utils/JsonValidation.hpp>
|
||||||
#include <re2/re2.h>
|
#include <re2/re2.h>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
static void parseCommon(T& sett, JsonMaybeObject& obj) {
|
static void parseCommon(T& sett, JsonMaybeObject& obj) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <Geode/loader/SettingNode.hpp>
|
#include <Geode/loader/SettingNode.hpp>
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
void SettingNode::dispatchChanged() {
|
void SettingNode::dispatchChanged() {
|
||||||
if (m_delegate) {
|
if (m_delegate) {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
int geodeEntry(void* platformData);
|
int geodeEntry(void* platformData);
|
||||||
// platform-specific entry points
|
// platform-specific entry points
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Only a single objc++ file is used because since pch doesnt work, each file adds a lot to the compile times
|
// Only a single objc++ file is used because since pch doesnt work, each file adds a lot to the compile times
|
||||||
#include <Geode/DefaultInclude.hpp>
|
#include <Geode/DefaultInclude.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
#if defined(GEODE_IS_MACOS)
|
#if defined(GEODE_IS_MACOS)
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include <loader/ModImpl.hpp>
|
#include <loader/ModImpl.hpp>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T findSymbolOrMangled(void* dylib, char const* name, char const* mangled) {
|
T findSymbolOrMangled(void* dylib, char const* name, char const* mangled) {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#ifdef GEODE_IS_IOS
|
#ifdef GEODE_IS_IOS
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
#include <UIKit/UIKit.h>
|
#include <UIKit/UIKit.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
#include <CoreFoundation/CoreFoundation.h>
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
void Loader::Impl::platformMessageBox(char const* title, std::string const& info) {
|
void Loader::Impl::platformMessageBox(char const* title, std::string const& info) {
|
||||||
CFStringRef cfTitle = CFStringCreateWithCString(NULL, title, kCFStringEncodingUTF8);
|
CFStringRef cfTitle = CFStringCreateWithCString(NULL, title, kCFStringEncodingUTF8);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include <loader/ModImpl.hpp>
|
#include <loader/ModImpl.hpp>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T findSymbolOrMangled(void* dylib, char const* name, char const* mangled) {
|
T findSymbolOrMangled(void* dylib, char const* name, char const* mangled) {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#ifdef GEODE_IS_MACOS
|
#ifdef GEODE_IS_MACOS
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
#import <AppKit/AppKit.h>
|
#import <AppKit/AppKit.h>
|
||||||
#include <Geode/utils/web.hpp>
|
#include <Geode/utils/web.hpp>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include <loader/LoaderImpl.hpp>
|
#include <loader/LoaderImpl.hpp>
|
||||||
#include <Geode/utils/string.hpp>
|
#include <Geode/utils/string.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
#ifdef GEODE_IS_WINDOWS
|
#ifdef GEODE_IS_WINDOWS
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include <Geode/loader/Mod.hpp>
|
#include <Geode/loader/Mod.hpp>
|
||||||
#include <loader/ModImpl.hpp>
|
#include <loader/ModImpl.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T findSymbolOrMangled(HMODULE load, char const* name, char const* mangled) {
|
T findSymbolOrMangled(HMODULE load, char const* name, char const* mangled) {
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
static bool g_lastLaunchCrashed = false;
|
static bool g_lastLaunchCrashed = false;
|
||||||
static bool g_symbolsInitialized = false;
|
static bool g_symbolsInitialized = false;
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
enum class NFDMode {
|
enum class NFDMode {
|
||||||
OpenFile,
|
OpenFile,
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#ifdef GEODE_IS_WINDOWS
|
#ifdef GEODE_IS_WINDOWS
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
#include "nfdwin.hpp"
|
#include "nfdwin.hpp"
|
||||||
#include <ghc/fs_fwd.hpp>
|
#include <ghc/fs_fwd.hpp>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include <Geode/binding/CustomListView.hpp>
|
#include <Geode/binding/CustomListView.hpp>
|
||||||
#include <Geode/binding/TableViewCell.hpp>
|
#include <Geode/binding/TableViewCell.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
static constexpr const BoomListType kBoomListType_Hooks = static_cast<BoomListType>(0x358);
|
static constexpr const BoomListType kBoomListType_Hooks = static_cast<BoomListType>(0x358);
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include <cocos2d.h>
|
#include <cocos2d.h>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
class HotReloadLayer : public CCLayer {
|
class HotReloadLayer : public CCLayer {
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include <Geode/ui/Popup.hpp>
|
#include <Geode/ui/Popup.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
class DevProfilePopup : public Popup<std::string const&> {
|
class DevProfilePopup : public Popup<std::string const&> {
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <Geode/ui/IconButtonSprite.hpp>
|
#include <Geode/ui/IconButtonSprite.hpp>
|
||||||
#include <Geode/loader/Index.hpp>
|
#include <Geode/loader/Index.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
class ModListLayer;
|
class ModListLayer;
|
||||||
class ModObject;
|
class ModObject;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include <cocos2d.h>
|
#include <cocos2d.h>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
enum class TagNodeStyle {
|
enum class TagNodeStyle {
|
||||||
Tag,
|
Tag,
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include <Geode/loader/ModInfo.hpp>
|
#include <Geode/loader/ModInfo.hpp>
|
||||||
#include <Geode/loader/Index.hpp>
|
#include <Geode/loader/Index.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
class ModListLayer;
|
class ModListLayer;
|
||||||
enum class ModListDisplay;
|
enum class ModListDisplay;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include <Geode/binding/TextInputDelegate.hpp>
|
#include <Geode/binding/TextInputDelegate.hpp>
|
||||||
#include <Geode/loader/Index.hpp>
|
#include <Geode/loader/Index.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
class SearchFilterPopup;
|
class SearchFilterPopup;
|
||||||
class ModListCell;
|
class ModListCell;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include <Geode/ui/Popup.hpp>
|
#include <Geode/ui/Popup.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
class ModListLayer;
|
class ModListLayer;
|
||||||
enum class ModListType;
|
enum class ModListType;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
#include <Geode/utils/string.hpp>
|
#include <Geode/utils/string.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
#define IMPL_SETT_CREATE(type_) \
|
#define IMPL_SETT_CREATE(type_) \
|
||||||
static type_##SettingNode* create( \
|
static type_##SettingNode* create( \
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <Geode/ui/Popup.hpp>
|
#include <Geode/ui/Popup.hpp>
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
class ModSettingsPopup : public Popup<Mod*>, public SettingNodeDelegate {
|
class ModSettingsPopup : public Popup<Mod*>, public SettingNodeDelegate {
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <Geode/ui/BasedButton.hpp>
|
#include <Geode/ui/BasedButton.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
TabButton* TabButton::create(
|
TabButton* TabButton::create(
|
||||||
TabBaseColor unselected, TabBaseColor selected, char const* text, cocos2d::CCObject* target,
|
TabBaseColor unselected, TabBaseColor selected, char const* text, cocos2d::CCObject* target,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include <Geode/loader/Mod.hpp>
|
#include <Geode/loader/Mod.hpp>
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
const char* geode::baseEnumToString(CircleBaseSize value) {
|
const char* geode::baseEnumToString(CircleBaseSize value) {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include <Geode/ui/ColorPickPopup.hpp>
|
#include <Geode/ui/ColorPickPopup.hpp>
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
static GLubyte parseInt(char const* str) {
|
static GLubyte parseInt(char const* str) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include <Geode/utils/ranges.hpp>
|
#include <Geode/utils/ranges.hpp>
|
||||||
#include <Geode/modify/LevelInfoLayer.hpp>
|
#include <Geode/modify/LevelInfoLayer.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
ColorManager::ColorManager() : m_colors({
|
ColorManager::ColorManager() : m_colors({
|
||||||
{ GDColor::NormalModeProgressBar, {{ ccColor3B { 0, 255, 0 }, Mod::get() }} },
|
{ GDColor::NormalModeProgressBar, {{ ccColor3B { 0, 255, 0 }, Mod::get() }} },
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <Geode/ui/EnterLayerEvent.hpp>
|
#include <Geode/ui/EnterLayerEvent.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
AEnterLayerEvent::AEnterLayerEvent(
|
AEnterLayerEvent::AEnterLayerEvent(
|
||||||
std::string const& layerID,
|
std::string const& layerID,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <Geode/ui/General.hpp>
|
#include <Geode/ui/General.hpp>
|
||||||
#include <cocos-ext.h>
|
#include <cocos-ext.h>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
CCSprite* geode::createLayerBG() {
|
CCSprite* geode::createLayerBG() {
|
||||||
auto winSize = CCDirector::get()->getWinSize();
|
auto winSize = CCDirector::get()->getWinSize();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <Geode/ui/IconButtonSprite.hpp>
|
#include <Geode/ui/IconButtonSprite.hpp>
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
bool IconButtonSprite::init(
|
bool IconButtonSprite::init(
|
||||||
char const* bg, bool bgIsFrame, cocos2d::CCNode* icon, char const* text, char const* font
|
char const* bg, bool bgIsFrame, cocos2d::CCNode* icon, char const* text, char const* font
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <Geode/binding/CCTextInputNode.hpp>
|
#include <Geode/binding/CCTextInputNode.hpp>
|
||||||
#include <Geode/ui/InputNode.hpp>
|
#include <Geode/ui/InputNode.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
char const* InputNode::getString() {
|
char const* InputNode::getString() {
|
||||||
return m_input->getString();
|
return m_input->getString();
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include <Geode/utils/casts.hpp>
|
#include <Geode/utils/casts.hpp>
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
GenericListCell::GenericListCell(char const* name, CCSize size) :
|
GenericListCell::GenericListCell(char const* name, CCSize size) :
|
||||||
TableViewCell(name, size.width, size.height) {}
|
TableViewCell(name, size.width, size.height) {}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include <Geode/ui/MDPopup.hpp>
|
#include <Geode/ui/MDPopup.hpp>
|
||||||
#include <Geode/utils/string.hpp>
|
#include <Geode/utils/string.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
bool MDPopup::setup(
|
bool MDPopup::setup(
|
||||||
std::string const& title, std::string const& info, char const* btn1Text, char const* btn2Text,
|
std::string const& title, std::string const& info, char const* btn1Text, char const* btn2Text,
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <Geode/utils/string.hpp>
|
#include <Geode/utils/string.hpp>
|
||||||
#include <md4c.h>
|
#include <md4c.h>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
static constexpr float g_fontScale = .5f;
|
static constexpr float g_fontScale = .5f;
|
||||||
static constexpr float g_paragraphPadding = 7.f;
|
static constexpr float g_paragraphPadding = 7.f;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include <Geode/loader/Mod.hpp>
|
#include <Geode/loader/Mod.hpp>
|
||||||
#include <Geode/ui/Notification.hpp>
|
#include <Geode/ui/Notification.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
constexpr auto NOTIFICATION_FADEIN = .3f;
|
constexpr auto NOTIFICATION_FADEIN = .3f;
|
||||||
constexpr auto NOTIFICATION_FADEOUT = 1.f;
|
constexpr auto NOTIFICATION_FADEOUT = 1.f;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <Geode/ui/Popup.hpp>
|
#include <Geode/ui/Popup.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
class QuickPopup : public FLAlertLayer, public FLAlertLayerProtocol {
|
class QuickPopup : public FLAlertLayer, public FLAlertLayerProtocol {
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <Geode/ui/SceneManager.hpp>
|
#include <Geode/ui/SceneManager.hpp>
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
bool SceneManager::setup() {
|
bool SceneManager::setup() {
|
||||||
m_persistedNodes = CCArray::create();
|
m_persistedNodes = CCArray::create();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <Geode/ui/ScrollLayer.hpp>
|
#include <Geode/ui/ScrollLayer.hpp>
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
GenericContentLayer* GenericContentLayer::create(float width, float height) {
|
GenericContentLayer* GenericContentLayer::create(float width, float height) {
|
||||||
auto ret = new GenericContentLayer();
|
auto ret = new GenericContentLayer();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <Geode/ui/Scrollbar.hpp>
|
#include <Geode/ui/Scrollbar.hpp>
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
bool Scrollbar::ccTouchBegan(CCTouch* touch, CCEvent* event) {
|
bool Scrollbar::ccTouchBegan(CCTouch* touch, CCEvent* event) {
|
||||||
// hitbox
|
// hitbox
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
#include <Geode/utils/string.hpp>
|
#include <Geode/utils/string.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
using namespace std::string_literals;
|
using namespace std::string_literals;
|
||||||
|
|
||||||
bool TextDecorationWrapper::init(
|
bool TextDecorationWrapper::init(
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <Geode/utils/JsonValidation.hpp>
|
#include <Geode/utils/JsonValidation.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
|
|
||||||
json::Value& JsonMaybeSomething::json() {
|
json::Value& JsonMaybeSomething::json() {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include <Geode/platform/platform.hpp>
|
#include <Geode/platform/platform.hpp>
|
||||||
#include <Geode/utils/general.hpp>
|
#include <Geode/utils/general.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
PlatformID PlatformID::from(const char* str) {
|
PlatformID PlatformID::from(const char* str) {
|
||||||
switch (hash(str)) {
|
switch (hash(str)) {
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include <Geode/utils/general.hpp>
|
#include <Geode/utils/general.hpp>
|
||||||
#include <json.hpp>
|
#include <json.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
// VersionTag
|
// VersionTag
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include <Geode/utils/cocos.hpp>
|
#include <Geode/utils/cocos.hpp>
|
||||||
#include <json.hpp>
|
#include <json.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
json::Value json::Serialize<ccColor3B>::to_json(ccColor3B const& color) {
|
json::Value json::Serialize<ccColor3B>::to_json(ccColor3B const& color) {
|
||||||
return json::Object {
|
return json::Object {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include <mz_strm_mem.h>
|
#include <mz_strm_mem.h>
|
||||||
#include <mz_zip.h>
|
#include <mz_zip.h>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
using namespace geode::utils::file;
|
using namespace geode::utils::file;
|
||||||
|
|
||||||
Result<std::string> utils::file::readString(ghc::filesystem::path const& path) {
|
Result<std::string> utils::file::readString(ghc::filesystem::path const& path) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <Geode/utils/string.hpp>
|
#include <Geode/utils/string.hpp>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
#ifdef GEODE_IS_WINDOWS
|
#ifdef GEODE_IS_WINDOWS
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include <json.hpp>
|
#include <json.hpp>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
using namespace web;
|
using namespace web;
|
||||||
|
|
||||||
namespace geode::utils::fetch {
|
namespace geode::utils::fetch {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <Geode/Loader.hpp>
|
#include <Geode/Loader.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
#include <Geode/modify/MenuLayer.hpp>
|
#include <Geode/modify/MenuLayer.hpp>
|
||||||
#include <Geode/loader/SettingNode.hpp>
|
#include <Geode/loader/SettingNode.hpp>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include <Geode/loader/ModJsonTest.hpp>
|
#include <Geode/loader/ModJsonTest.hpp>
|
||||||
#include <Geode/loader/ModEvent.hpp>
|
#include <Geode/loader/ModEvent.hpp>
|
||||||
|
|
||||||
USE_GEODE_NAMESPACE();
|
using namespace geode::prelude;
|
||||||
|
|
||||||
auto test = []() {
|
auto test = []() {
|
||||||
log::info("Static logged");
|
log::info("Static logged");
|
||||||
|
|
Loading…
Reference in a new issue