Skip to content

Commit

Permalink
revamp settings, add save slots for settings
Browse files Browse the repository at this point in the history
  • Loading branch information
dankmeme01 committed Jan 17, 2025
1 parent 11495a4 commit 9d58bfa
Show file tree
Hide file tree
Showing 13 changed files with 898 additions and 132 deletions.
15 changes: 7 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.21)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)

project(globed2 VERSION 1.0.1)

# set ios archs
Expand Down Expand Up @@ -48,6 +47,7 @@ option(GLOBED_RELEASE "Release build" OFF)

if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR "${CMAKE_BUILD_TYPE}asdf" STREQUAL "asdf" OR ENABLE_DEBUG)
set(GLOBED_IS_DEBUG ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_HAS_ITERATOR_DEBUGGING=0")
endif()

# Debug/Release options
Expand Down Expand Up @@ -148,11 +148,6 @@ CPMAddPackage("gh:dankmeme01/asp2#2378a82")

# asp defines
if (WIN32)
if (GLOBED_IS_DEBUG)
# debug
target_compile_definitions(asp PRIVATE _HAS_ITERATOR_DEBUGGING=0)
endif()

# thingy
target_compile_definitions(asp PRIVATE ASP_ENABLE_FORMAT=1)
target_compile_definitions(${PROJECT_NAME} PRIVATE ASP_ENABLE_FORMAT=1)
Expand Down Expand Up @@ -284,7 +279,11 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE CURL_STATICLIB=1)

# we are kinda leeching off of geode but we can always snatch those libraries in the future
if (WIN32)
set_target_properties(curl PROPERTIES IMPORTED_LOCATION "$ENV{GEODE_SDK}/loader/include/link/${LIB_PLATFORM}/libcurl.lib")
if (GLOBED_IS_DEBUG)
set_target_properties(curl PROPERTIES IMPORTED_LOCATION "$ENV{GEODE_SDK}/loader/include/link/${LIB_PLATFORM}/gd-libcurl.lib")
else()
set_target_properties(curl PROPERTIES IMPORTED_LOCATION "$ENV{GEODE_SDK}/loader/include/link/${LIB_PLATFORM}/libcurl.lib")
endif()
else()
set_target_properties(curl PROPERTIES IMPORTED_LOCATION "$ENV{GEODE_SDK}/loader/include/link/${LIB_PLATFORM}/libcurl.a")
endif()
Expand All @@ -311,7 +310,7 @@ if (GLOBED_OSS_BUILD)
else()
if (WIN32)
target_link_libraries(${PROJECT_NAME} "${CMAKE_CURRENT_SOURCE_DIR}/libs/bb/bb.lib")
target_link_libraries(${PROJECT_NAME} ntdll.lib userenv.lib runtimeobject.lib Iphlpapi.lib)
target_link_libraries(${PROJECT_NAME} ntdll.lib userenv.lib runtimeobject.lib Iphlpapi.lib bcrypt.lib)
else ()
target_link_libraries(${PROJECT_NAME} "${CMAKE_CURRENT_SOURCE_DIR}/libs/bb/bb-${LIB_PLATFORM}.a")
endif()
Expand Down
2 changes: 2 additions & 0 deletions assets/guides/launch-args.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Make sure to use the full format and prefix the option name with `globed-`, so i

`no-ssl-verification` - disables SSL certificate verification, useful if you can't connect to the server with an error similar to "SSL peer certificate or SSH remote key was not OK."

`reset-settings` - resets all Globed settings

`crt-fix` - unused in release builds, if you are a developer using Wine and experiencing hangs on launch, you may check `src/platform/os/windows/setup.cpp` for more information.

## Debugging (more dev centered)
Expand Down
4 changes: 2 additions & 2 deletions mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "dankmeme.globed2",
"name": "Globed",
"developer": "dankmeme",
"geode": "4.1.0",
"geode": "4.2.0",
"version": "v1.7.2",
"gd": {
"win": "2.2074",
Expand Down Expand Up @@ -68,4 +68,4 @@
"resources/sounds/*.ogg"
]
}
}
}
6 changes: 3 additions & 3 deletions src/defs/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ struct ConstexprString {
hash = util::crypto::adler32(str);
}
constexpr bool operator!=(const ConstexprString& other) const {
return std::equal(value, value + N, other.value);
return std::equal(value, value + N - 1, other.value);
}
constexpr operator std::string() const {
return std::string(value, N);
return std::string(value, N - 1);
}
constexpr operator std::string_view() const {
return std::string_view(value, N);
return std::string_view(value, N - 1);
}
char value[N];
uint32_t hash;
Expand Down
Loading

0 comments on commit 9d58bfa

Please sign in to comment.