mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-26 21:00:50 -04:00
fix Windows build + bump version to v0.4.0 + bump minimum mod version
This commit is contained in:
parent
76175c746d
commit
a6cc6f4bec
10 changed files with 22 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.21 FATAL_ERROR)
|
||||
|
||||
set(GEODE_VERSION 0.3.1)
|
||||
set(GEODE_VERSION 0.4.0)
|
||||
|
||||
project(geode-sdk VERSION ${GEODE_VERSION} LANGUAGES CXX C)
|
||||
|
||||
|
|
|
@ -15,6 +15,12 @@
|
|||
#include <locale>
|
||||
#include <ostream>
|
||||
#include <type_traits>
|
||||
#include <cmath>
|
||||
|
||||
// fix for msvc aliasing isnan to _isnan
|
||||
#ifdef isnan
|
||||
#undef isnan
|
||||
#endif
|
||||
|
||||
#include "format.h"
|
||||
|
||||
|
|
|
@ -109,6 +109,10 @@ namespace geode {
|
|||
inline Mod* Mod::get<void>() {
|
||||
return Interface::get()->m_mod;
|
||||
}
|
||||
|
||||
inline Mod* getMod() {
|
||||
return Mod::get();
|
||||
}
|
||||
}
|
||||
|
||||
inline const char* operator"" _spr(const char* str, size_t) {
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <fs/filesystem.hpp>
|
||||
#include <ccTypes.h>
|
||||
|
||||
#ifdef GEODE_IS_MACOS
|
||||
namespace std {
|
||||
// <concepts> isn't working for me lmao
|
||||
template <class From, class To>
|
||||
|
@ -17,6 +18,7 @@ namespace std {
|
|||
static_cast<To>(std::declval<From>());
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace geode {
|
||||
#pragma warning(disable: 4251)
|
||||
|
|
|
@ -548,7 +548,5 @@ namespace geode {
|
|||
* However, it can be externed, unlike Mod::get()
|
||||
* @returns Same thing Mod::get() returns
|
||||
*/
|
||||
inline Mod* getMod() {
|
||||
return Mod::get();
|
||||
}
|
||||
inline Mod* getMod();
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#include <Geode/DefaultInclude.hpp>
|
||||
#include "Result.hpp"
|
||||
|
||||
#undef snprintf
|
||||
|
||||
namespace geode::utils {
|
||||
constexpr unsigned int hash(const char* str, int h = 0) {
|
||||
return !str[h] ? 5381 : (hash(str, h+1) * 33) ^ str[h];
|
||||
|
|
|
@ -12,7 +12,7 @@ using geode::core::meta::x86::Thiscall;
|
|||
static auto CCEGLVIEW_CON_ADDR = reinterpret_cast<void*>(base::getCocos() + 0xc2860);
|
||||
|
||||
static void __cdecl fixedErrorHandler(int code, const char* description) {
|
||||
Log::get() << Severity::Critical << "GLFW Error " << code << ": " << description;
|
||||
log::critical("GLFW Error ", code, ": ", description);
|
||||
MessageBoxA(
|
||||
nullptr,
|
||||
CCString::createWithFormat(
|
||||
|
|
|
@ -197,7 +197,6 @@ void Index::indexUpdateProgress(
|
|||
uint8_t percentage
|
||||
) {
|
||||
Loader::get()->queueInGDThread([this, status, info, percentage]() -> void {
|
||||
Log::get() << info;
|
||||
m_callbacksMutex.lock();
|
||||
for (auto& d : m_callbacks) {
|
||||
d(status, info, percentage);
|
||||
|
|
|
@ -441,7 +441,7 @@ size_t Loader::getFieldIndexForClass(size_t hash) {
|
|||
}
|
||||
|
||||
VersionInfo Loader::minModVersion() {
|
||||
return { 0, 1, 0 };
|
||||
return { 0, 4, 0 };
|
||||
}
|
||||
|
||||
VersionInfo Loader::maxModVersion() {
|
||||
|
|
|
@ -4,22 +4,22 @@ USE_GEODE_NAMESPACE();
|
|||
|
||||
// Exported functions
|
||||
GEODE_API bool GEODE_CALL geode_enable() {
|
||||
Log::get() << "Enabled";
|
||||
log::info("Enabled");
|
||||
return true;
|
||||
}
|
||||
|
||||
GEODE_API bool GEODE_CALL geode_disable() {
|
||||
Log::get() << "Disabled";
|
||||
log::info("Disabled");
|
||||
return true;
|
||||
}
|
||||
|
||||
GEODE_API bool GEODE_CALL geode_load(Mod*) {
|
||||
Log::get() << "Loaded";
|
||||
log::info("Loaded");
|
||||
return true;
|
||||
}
|
||||
|
||||
GEODE_API bool GEODE_CALL geode_unload() {
|
||||
Log::get() << "Unoaded";
|
||||
log::info("Unloaded");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue