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:
PoweredByPie 2023-03-10 11:33:24 -08:00
parent 174136ce0b
commit 5af15fba7c
90 changed files with 135 additions and 130 deletions

View file

@ -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*) {

View file

@ -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() { \

View 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;

View file

@ -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;

View file

@ -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)

View file

@ -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>

View file

@ -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)

View file

@ -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;

View file

@ -14,7 +14,7 @@
#include <loader/ModImpl.hpp>
#include <loader/LoaderImpl.hpp>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
#pragma warning(disable : 4217)

View file

@ -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*).

View file

@ -1,4 +1,4 @@
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
#include <Geode/modify/CCTouchDispatcher.hpp>

View file

@ -1,6 +1,6 @@
#include <Geode/ui/SceneManager.hpp>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
#include <Geode/modify/AchievementNotifier.hpp>

View file

@ -1,6 +1,6 @@
#include <Geode/loader/Loader.hpp>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
#include <Geode/modify/AppDelegate.hpp>

View file

@ -1,6 +1,6 @@
#include <loader/LoaderImpl.hpp>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
#include <Geode/modify/CCScheduler.hpp>

View file

@ -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() {

View file

@ -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>
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);
@ -57,7 +57,9 @@ 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) {
static CCMenu* detachAndCreateMenu(
CCNode* parent, char const* menuID, Layout* layout, T first, Args... args
) {
if (!first) {
auto menu = CCMenu::create();
menu->setID(menuID);

View file

@ -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) {

View file

@ -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(

View file

@ -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)

View file

@ -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");

View file

@ -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");

View file

@ -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();

View file

@ -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;

View file

@ -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

View file

@ -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(

View file

@ -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)) {

View file

@ -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());

View file

@ -1,6 +1,6 @@
#include <Geode/loader/Event.hpp>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
void EventListenerProtocol::enable() {
Event::listeners().insert(this);

View file

@ -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() {}

View file

@ -6,7 +6,7 @@
#include <vector>
#include "ModImpl.hpp"
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
class Hook::Impl {
public:

View file

@ -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(

View file

@ -9,7 +9,7 @@
#include <Geode/utils/JsonValidation.hpp>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
// ModInstallEvent

View file

@ -1,6 +1,6 @@
#include "LoaderImpl.hpp"
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
Loader::Loader() : m_impl(new Impl) {}

View file

@ -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();

View file

@ -9,7 +9,7 @@
#include <fmt/format.h>
#include <iomanip>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
using namespace geode::log;
using namespace cocos2d;

View file

@ -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)) {}

View file

@ -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) {}

View file

@ -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();

View file

@ -7,7 +7,7 @@
#include <about.hpp>
#include <json.hpp>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
bool Dependency::isResolved() const {
return !this->required ||

View file

@ -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()));

View file

@ -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) {

View file

@ -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) {

View file

@ -11,7 +11,7 @@
#include <array>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
int geodeEntry(void* platformData);
// platform-specific entry points

View file

@ -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)

View file

@ -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) {

View file

@ -3,7 +3,7 @@
#ifdef GEODE_IS_IOS
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
#include <UIKit/UIKit.h>
#include <iostream>

View file

@ -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);

View file

@ -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) {

View file

@ -3,7 +3,7 @@
#ifdef GEODE_IS_MACOS
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
#import <AppKit/AppKit.h>
#include <Geode/utils/web.hpp>

View file

@ -5,7 +5,7 @@
#include <loader/LoaderImpl.hpp>
#include <Geode/utils/string.hpp>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
#ifdef GEODE_IS_WINDOWS

View file

@ -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) {

View file

@ -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;

View file

@ -44,7 +44,7 @@
#include <stddef.h>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
enum class NFDMode {
OpenFile,

View file

@ -3,7 +3,7 @@
#ifdef GEODE_IS_WINDOWS
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
#include "nfdwin.hpp"
#include <ghc/fs_fwd.hpp>

View file

@ -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);

View file

@ -2,7 +2,7 @@
#include <cocos2d.h>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
class HotReloadLayer : public CCLayer {
protected:

View file

@ -2,7 +2,7 @@
#include <Geode/ui/Popup.hpp>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
class DevProfilePopup : public Popup<std::string const&> {
protected:

View file

@ -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;

View file

@ -2,7 +2,7 @@
#include <cocos2d.h>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
enum class TagNodeStyle {
Tag,

View file

@ -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;

View file

@ -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;

View file

@ -2,7 +2,7 @@
#include <Geode/ui/Popup.hpp>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
class ModListLayer;
enum class ModListType;

View file

@ -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( \

View file

@ -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:

View file

@ -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,

View file

@ -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) {

View file

@ -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 {

View file

@ -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() }} },

View file

@ -1,6 +1,6 @@
#include <Geode/ui/EnterLayerEvent.hpp>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
AEnterLayerEvent::AEnterLayerEvent(
std::string const& layerID,

View file

@ -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();

View file

@ -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

View file

@ -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();

View file

@ -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) {}

View file

@ -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,

View file

@ -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;

View file

@ -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;

View file

@ -1,6 +1,6 @@
#include <Geode/ui/Popup.hpp>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
class QuickPopup : public FLAlertLayer, public FLAlertLayerProtocol {
protected:

View file

@ -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();

View file

@ -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();

View file

@ -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

View file

@ -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(

View file

@ -1,6 +1,6 @@
#include <Geode/utils/JsonValidation.hpp>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
json::Value& JsonMaybeSomething::json() {

View file

@ -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)) {

View file

@ -6,7 +6,7 @@
#include <Geode/utils/general.hpp>
#include <json.hpp>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
// VersionTag

View file

@ -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 {

View file

@ -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) {

View file

@ -1,7 +1,7 @@
#include <Geode/utils/string.hpp>
#include <algorithm>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
#ifdef GEODE_IS_WINDOWS

View file

@ -5,7 +5,7 @@
#include <json.hpp>
#include <thread>
USE_GEODE_NAMESPACE();
using namespace geode::prelude;
using namespace web;
namespace geode::utils::fetch {

View file

@ -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>

View file

@ -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");