This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmake_minimum_required(VERSION 3.11.0) | |
| project(minibug LANGUAGES C CXX) | |
| add_executable(minibug main.cpp) | |
| include(FetchContent) | |
| Set(FETCHCONTENT_QUIET FALSE) | |
| FetchContent_Declare(minizip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // goto will be constexpr in c++23 (finally) | |
| // for my c version: https://github.com/ITotalJustice/TotalGBA/blob/3172ffea3b3c11d0714c6425c74e89efdc219ae1/src/util/string.c#L6 | |
| auto strstr_s(std::string_view haystack, std::string_view needle) -> std::string_view | |
| { | |
| for (std::size_t i = 0; i < haystack.size(); i++) | |
| { | |
| // if we find the first matching char, start the inner loop | |
| if (haystack[i] == needle[0]) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set(LIBDRAGON "/opt/libdragon") | |
| set(LIBDRAGON_LIBS "-ldragon -lc -lm -ldragonsys") # order matters | |
| SET(CMAKE_SYSTEM_NAME Generic) | |
| SET(CMAKE_SYSTEM_VERSION 1) | |
| SET(CMAKE_SYSTEM_PROCESSOR mips) | |
| SET(CMAKE_C_COMPILER ${LIBDRAGON}/bin/mips64-elf-gcc) | |
| SET(CMAKE_CXX_COMPILER ${LIBDRAGON}/bin/mips64-elf-g++) | |
| set(CMAKE_LINKER ${LIBDRAGON}/bin/mips64-elf-ld) | |
| set(CMAKE_AR ${LIBDRAGON}/bin/mips64-elf-ar) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmake_minimum_required(VERSION 3.18.0) | |
| project(TotalGB LANGUAGES C) | |
| set(myname "TotalGB_SDL2") | |
| add_executable(${myname} main.c) | |
| option(UPSTREAM_SDL "use upstream sdl2" ON) | |
| if (UPSTREAM_SDL) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "curl_wrapper.hpp" | |
| #include "../../utils/logger.hpp" | |
| // todo: fix dkp curl. complains about fd_set missing | |
| #ifdef __SWITCH__ | |
| #include <sys/select.h> | |
| #endif | |
| #include <curl/curl.h> | |
| namespace curl { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "hlsparse.hpp" | |
| #include "../../utils/logger.hpp" | |
| #ifndef NDEBUG | |
| #include <iostream> | |
| #endif | |
| #include <cassert> | |
| #include <ranges> | |
| #include <algorithm> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "json.hpp" | |
| #include <optional> | |
| using json = nlohmann::json; | |
| namespace nlohmann { | |
| // https://github.com/nlohmann/json/issues/1910#issuecomment-615843605 | |
| template <typename T> | |
| struct adl_serializer<std::optional<T>> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "crunchy.hpp" | |
| #include "crapi/crapi.hpp" | |
| #include "../utils/logger.hpp" | |
| #include <algorithm> | |
| #include <ranges> | |
| namespace fs { | |
| static auto CheckCrDataError(const auto& a) noexcept { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| #include "../nlohmann/json_fwd.hpp" | |
| #include <cstdint> | |
| #include <string> | |
| #include <vector> | |
| #include <optional> | |
| namespace funi { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| #include "../nlohmann/json_fwd.hpp" | |
| #include <vector> | |
| #include <string> | |
| #include <optional> | |
| namespace cr { |