fix Windows build + bump version to v0.4.0 + bump minimum mod version

This commit is contained in:
HJfod 2022-10-08 12:47:47 +03:00
parent 76175c746d
commit a6cc6f4bec
10 changed files with 22 additions and 11 deletions
CMakeLists.txt
fmt/include/fmt
loader

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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