mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-22 15:37:53 -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/modify/MenuLayer.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
class $modify(MenuLayer) {
|
||||
void onMoreGames(CCObject*) {
|
||||
|
|
|
@ -1,47 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include <Geode/Prelude.hpp>
|
||||
#include <Geode/c++stl/gdstdlib.hpp>
|
||||
#include <Geode/platform/platform.hpp>
|
||||
#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) \
|
||||
static type* s_##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 <cocos2d.h>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
static std::vector<CCTexturePack> PACKS;
|
||||
static std::vector<std::string> PATHS;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <Geode/binding/CCMenuItemSpriteExtra.hpp>
|
||||
#include <Geode/binding/CCMenuItemToggler.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
#pragma warning(disable: 4273)
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#ifdef GEODE_IS_MACOS
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
#include <Geode/loader/Mod.hpp>
|
||||
#include <Geode/modify/Modify.hpp>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <Geode/modify/CCNode.hpp>
|
||||
#include <cocos2d.h>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
using namespace geode::modifier;
|
||||
|
||||
#pragma warning(push)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <fmt/format.h>
|
||||
#include <loader/LoaderImpl.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
struct CustomLoadingLayer : Modify<CustomLoadingLayer, LoadingLayer> {
|
||||
bool m_updatingResources;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <loader/ModImpl.hpp>
|
||||
#include <loader/LoaderImpl.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
#pragma warning(disable : 4217)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <Geode/loader/Mod.hpp>
|
||||
#include <Geode/modify/Modify.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
// for some reason RobTop uses MessageBoxW in his GLFW error handler.
|
||||
// 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>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <Geode/ui/SceneManager.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
#include <Geode/modify/AchievementNotifier.hpp>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <Geode/loader/Loader.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
#include <Geode/modify/AppDelegate.hpp>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <loader/LoaderImpl.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
#include <Geode/modify/CCScheduler.hpp>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <Geode/modify/LoadingLayer.hpp>
|
||||
#include <Geode/modify/GameManager.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
struct ResourcesUpdate : Modify<ResourcesUpdate, LoadingLayer> {
|
||||
void loadAssets() {
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
#include <Geode/Bindings.hpp>
|
||||
#include <Geode/utils/cocos.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
static constexpr int32_t GEODE_ID_PRIORITY = 0x100000;
|
||||
|
||||
template<class T = CCNode>
|
||||
template <class T = CCNode>
|
||||
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 (auto child = getChild(node, index)) {
|
||||
child->setID(id);
|
||||
|
@ -56,8 +56,10 @@ static void switchChildrenToMenu(CCNode* parent, CCMenu* menu, Args... args) {
|
|||
}
|
||||
}
|
||||
|
||||
template <typename T, typename ...Args>
|
||||
static CCMenu* detachAndCreateMenu(CCNode* parent, const char* menuID, Layout* layout, T first, Args... args) {
|
||||
template <typename T, typename... Args>
|
||||
static CCMenu* detachAndCreateMenu(
|
||||
CCNode* parent, char const* menuID, Layout* layout, T first, Args... args
|
||||
) {
|
||||
if (!first) {
|
||||
auto menu = CCMenu::create();
|
||||
menu->setID(menuID);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <Geode/modify/CreatorLayer.hpp>
|
||||
#include <Geode/utils/cocos.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
template<class... Args>
|
||||
static void reorderButtons(Args... args) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <Geode/utils/cocos.hpp>
|
||||
#include <Geode/ui/BasedButtonSprite.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
$register_ids(EditLevelLayer) {
|
||||
setIDs(
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#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
|
||||
// (not gonna reinterpret_cast that into the members)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <Geode/modify/EditorUI.hpp>
|
||||
#include <Geode/utils/cocos.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
$register_ids(EditorUI) {
|
||||
setIDSafe(this, 0, "position-slider");
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <Geode/modify/GJGarageLayer.hpp>
|
||||
#include <Geode/utils/cocos.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
$register_ids(GJGarageLayer) {
|
||||
setIDSafe(this, 2, "username-label");
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <Geode/modify/LevelBrowserLayer.hpp>
|
||||
#include <Geode/utils/cocos.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
$register_ids(LevelBrowserLayer) {
|
||||
auto winSize = CCDirector::get()->getWinSize();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <Geode/modify/LevelSettingsLayer.hpp>
|
||||
#include <Geode/utils/cocos.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
$register_ids(LevelSettingsLayer) {
|
||||
bool startPos = m_mainLayer->getChildrenCount() < 10;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <Geode/utils/cocos.hpp>
|
||||
#include <Geode/ui/BasedButtonSprite.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
$register_ids(MenuLayer) {
|
||||
// set IDs to everything
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <Geode/modify/PauseLayer.hpp>
|
||||
#include <Geode/utils/cocos.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
$register_ids(PauseLayer) {
|
||||
setIDs(
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <Geode/modify/UILayer.hpp>
|
||||
#include <Geode/utils/cocos.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
$register_ids(UILayer) {
|
||||
if (auto menu = getChildOfType<CCMenu>(this, 0)) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <crashlog.hpp>
|
||||
#include <filesystem>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
ghc::filesystem::path dirs::getGameDir() {
|
||||
return ghc::filesystem::path(CCFileUtils::sharedFileUtils()->getWritablePath2().c_str());
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <Geode/loader/Event.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
void EventListenerProtocol::enable() {
|
||||
Event::listeners().insert(this);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "ModImpl.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() {}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <vector>
|
||||
#include "ModImpl.hpp"
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
class Hook::Impl {
|
||||
public:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <Geode/loader/IPC.hpp>
|
||||
#include <json.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
std::monostate geode::listenForIPC(std::string const& messageID, json::Value(*callback)(IPCEvent*)) {
|
||||
(void) new EventListener(
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <Geode/utils/JsonValidation.hpp>
|
||||
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
// ModInstallEvent
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "LoaderImpl.hpp"
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
Loader::Loader() : m_impl(new Impl) {}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
Loader::Impl* LoaderImpl::get() {
|
||||
return Loader::get()->m_impl.get();
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <fmt/format.h>
|
||||
#include <iomanip>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
using namespace geode::log;
|
||||
using namespace cocos2d;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <Geode/loader/Dirs.hpp>
|
||||
#include "ModImpl.hpp"
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
Mod::Mod(ModInfo const& info) : m_impl(std::make_unique<Impl>(this, info)) {}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <Geode/loader/ModEvent.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
ModStateEvent::ModStateEvent(Mod* mod, ModEventType type) : m_mod(mod), m_type(type) {}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
Mod::Impl* ModImpl::getImpl(Mod* mod) {
|
||||
return mod->m_impl.get();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <about.hpp>
|
||||
#include <json.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
bool Dependency::isResolved() const {
|
||||
return !this->required ||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <Geode/loader/Hook.hpp>
|
||||
#include <json.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
bool Patch::apply() {
|
||||
return bool(tulip::hook::writeMemory(m_address, m_patch.data(), m_patch.size()));
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <Geode/utils/JsonValidation.hpp>
|
||||
#include <re2/re2.h>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
template<class T>
|
||||
static void parseCommon(T& sett, JsonMaybeObject& obj) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <Geode/loader/SettingNode.hpp>
|
||||
#include <Geode/utils/cocos.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
void SettingNode::dispatchChanged() {
|
||||
if (m_delegate) {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include <array>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
int geodeEntry(void* platformData);
|
||||
// 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
|
||||
#include <Geode/DefaultInclude.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
#if defined(GEODE_IS_MACOS)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <loader/ModImpl.hpp>
|
||||
#include <dlfcn.h>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
template <typename T>
|
||||
T findSymbolOrMangled(void* dylib, char const* name, char const* mangled) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#ifdef GEODE_IS_IOS
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
#include <UIKit/UIKit.h>
|
||||
#include <iostream>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
void Loader::Impl::platformMessageBox(char const* title, std::string const& info) {
|
||||
CFStringRef cfTitle = CFStringCreateWithCString(NULL, title, kCFStringEncodingUTF8);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <loader/ModImpl.hpp>
|
||||
#include <dlfcn.h>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
template <typename T>
|
||||
T findSymbolOrMangled(void* dylib, char const* name, char const* mangled) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#ifdef GEODE_IS_MACOS
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
#include <Geode/utils/web.hpp>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <loader/LoaderImpl.hpp>
|
||||
#include <Geode/utils/string.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
#ifdef GEODE_IS_WINDOWS
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <Geode/loader/Mod.hpp>
|
||||
#include <loader/ModImpl.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
template <typename T>
|
||||
T findSymbolOrMangled(HMODULE load, char const* name, char const* mangled) {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
static bool g_lastLaunchCrashed = false;
|
||||
static bool g_symbolsInitialized = false;
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
#include <stddef.h>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
enum class NFDMode {
|
||||
OpenFile,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#ifdef GEODE_IS_WINDOWS
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
#include "nfdwin.hpp"
|
||||
#include <ghc/fs_fwd.hpp>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <Geode/binding/CustomListView.hpp>
|
||||
#include <Geode/binding/TableViewCell.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
static constexpr const BoomListType kBoomListType_Hooks = static_cast<BoomListType>(0x358);
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <cocos2d.h>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
class HotReloadLayer : public CCLayer {
|
||||
protected:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <Geode/ui/Popup.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
class DevProfilePopup : public Popup<std::string const&> {
|
||||
protected:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <Geode/ui/IconButtonSprite.hpp>
|
||||
#include <Geode/loader/Index.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
class ModListLayer;
|
||||
class ModObject;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <cocos2d.h>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
enum class TagNodeStyle {
|
||||
Tag,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <Geode/loader/ModInfo.hpp>
|
||||
#include <Geode/loader/Index.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
class ModListLayer;
|
||||
enum class ModListDisplay;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <Geode/binding/TextInputDelegate.hpp>
|
||||
#include <Geode/loader/Index.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
class SearchFilterPopup;
|
||||
class ModListCell;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <Geode/ui/Popup.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
class ModListLayer;
|
||||
enum class ModListType;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include <Geode/utils/cocos.hpp>
|
||||
#include <Geode/utils/string.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
#define IMPL_SETT_CREATE(type_) \
|
||||
static type_##SettingNode* create( \
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <Geode/ui/Popup.hpp>
|
||||
#include <Geode/utils/cocos.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
class ModSettingsPopup : public Popup<Mod*>, public SettingNodeDelegate {
|
||||
protected:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <Geode/ui/BasedButton.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
TabButton* TabButton::create(
|
||||
TabBaseColor unselected, TabBaseColor selected, char const* text, cocos2d::CCObject* target,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <Geode/loader/Mod.hpp>
|
||||
#include <Geode/utils/cocos.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
const char* geode::baseEnumToString(CircleBaseSize value) {
|
||||
switch (value) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <Geode/ui/ColorPickPopup.hpp>
|
||||
#include <Geode/utils/cocos.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
static GLubyte parseInt(char const* str) {
|
||||
try {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <Geode/utils/ranges.hpp>
|
||||
#include <Geode/modify/LevelInfoLayer.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
ColorManager::ColorManager() : m_colors({
|
||||
{ GDColor::NormalModeProgressBar, {{ ccColor3B { 0, 255, 0 }, Mod::get() }} },
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <Geode/ui/EnterLayerEvent.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
AEnterLayerEvent::AEnterLayerEvent(
|
||||
std::string const& layerID,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <Geode/ui/General.hpp>
|
||||
#include <cocos-ext.h>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
CCSprite* geode::createLayerBG() {
|
||||
auto winSize = CCDirector::get()->getWinSize();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <Geode/ui/IconButtonSprite.hpp>
|
||||
#include <Geode/utils/cocos.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
bool IconButtonSprite::init(
|
||||
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/ui/InputNode.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
char const* InputNode::getString() {
|
||||
return m_input->getString();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <Geode/utils/casts.hpp>
|
||||
#include <Geode/utils/cocos.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
GenericListCell::GenericListCell(char const* name, CCSize size) :
|
||||
TableViewCell(name, size.width, size.height) {}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <Geode/ui/MDPopup.hpp>
|
||||
#include <Geode/utils/string.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
bool MDPopup::setup(
|
||||
std::string const& title, std::string const& info, char const* btn1Text, char const* btn2Text,
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <Geode/utils/string.hpp>
|
||||
#include <md4c.h>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
static constexpr float g_fontScale = .5f;
|
||||
static constexpr float g_paragraphPadding = 7.f;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <Geode/loader/Mod.hpp>
|
||||
#include <Geode/ui/Notification.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
constexpr auto NOTIFICATION_FADEIN = .3f;
|
||||
constexpr auto NOTIFICATION_FADEOUT = 1.f;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <Geode/ui/Popup.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
class QuickPopup : public FLAlertLayer, public FLAlertLayerProtocol {
|
||||
protected:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <Geode/ui/SceneManager.hpp>
|
||||
#include <Geode/utils/cocos.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
bool SceneManager::setup() {
|
||||
m_persistedNodes = CCArray::create();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <Geode/ui/ScrollLayer.hpp>
|
||||
#include <Geode/utils/cocos.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
GenericContentLayer* GenericContentLayer::create(float width, float height) {
|
||||
auto ret = new GenericContentLayer();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <Geode/ui/Scrollbar.hpp>
|
||||
#include <Geode/utils/cocos.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
bool Scrollbar::ccTouchBegan(CCTouch* touch, CCEvent* event) {
|
||||
// hitbox
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <Geode/utils/cocos.hpp>
|
||||
#include <Geode/utils/string.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
using namespace std::string_literals;
|
||||
|
||||
bool TextDecorationWrapper::init(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <Geode/utils/JsonValidation.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
|
||||
json::Value& JsonMaybeSomething::json() {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <Geode/platform/platform.hpp>
|
||||
#include <Geode/utils/general.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
PlatformID PlatformID::from(const char* str) {
|
||||
switch (hash(str)) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <Geode/utils/general.hpp>
|
||||
#include <json.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
// VersionTag
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <Geode/utils/cocos.hpp>
|
||||
#include <json.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
json::Value json::Serialize<ccColor3B>::to_json(ccColor3B const& color) {
|
||||
return json::Object {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <mz_strm_mem.h>
|
||||
#include <mz_zip.h>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
using namespace geode::utils::file;
|
||||
|
||||
Result<std::string> utils::file::readString(ghc::filesystem::path const& path) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <Geode/utils/string.hpp>
|
||||
#include <algorithm>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
#ifdef GEODE_IS_WINDOWS
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <json.hpp>
|
||||
#include <thread>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
using namespace web;
|
||||
|
||||
namespace geode::utils::fetch {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <Geode/Loader.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
#include <Geode/modify/MenuLayer.hpp>
|
||||
#include <Geode/loader/SettingNode.hpp>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <Geode/loader/ModJsonTest.hpp>
|
||||
#include <Geode/loader/ModEvent.hpp>
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
using namespace geode::prelude;
|
||||
|
||||
auto test = []() {
|
||||
log::info("Static logged");
|
||||
|
|
Loading…
Reference in a new issue