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
// file_organizer.cpp : Defines the entry point for the application. | |
// | |
#include "file_organizer.h" | |
#include <filesystem> | |
#include <string> | |
#include <string_view> | |
#include <memory> | |
#include <memory_resource> | |
#include "fmt/format.h" |
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 <stdint.h> | |
// This software is a derivative of the below and is distributed without any warranty | |
// see: https://prng.di.unimi.it/MWC128.c | |
// license: https://creativecommons.org/publicdomain/zero/1.0/ | |
// This because uint128_t is not universally supported... | |
#include <intrin.h> //see: https://github.com/yuikns/intrin for gcc and clang |
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 <stdint.h> | |
// for reference see: https://github.com/jxskiss/base62 | |
// quick_base62_encoding.h | |
const uint32_t base62_high_bitmask = (62 & 63); // | |
const uint32_t base62_low_bitmask = (30 & 31); // | |
const uint32_t base62_common_bitmask = (base62_high_bitmask & base62_low_bitmask); //00011110 | |
const uint32_t bits6_mask = (64-1); // |
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 <iostream> | |
#include <vector> | |
#include <array> | |
#include <string> | |
#include <string_view> | |
struct number_to_text { | |
size_t i; | |
std::string_view str; | |
}; |
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
state("Inscryption") { | |
} | |
startup { | |
// Add Events from dotpeeking Assembly-CSharp SaveManager > SaveFile > StoryEvent [DiskCardGame.StoryEvent] | |
print("Starting up!"); | |
vars.event_names = new string[] { | |
"BasicTutorialCompleted", // story_event_0 etc... | |
"TutorialRunCompleted", |
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 <cstdint> | |
struct flags_t { | |
uint32_t bitmask = {}; | |
// set the bit at a particular index | |
constexpr void set(uint8_t index) noexcept { | |
bitmask |= 1UL << index; | |
} | |
// unset the bit at a particular index |
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 <cstdint> | |
#include <array> | |
//returns an array of the first N primes | |
template<size_t N> | |
constexpr std::array<uint32_t, N> primes_list() { | |
constexpr uint32_t segment_count = 32; | |
std::array<uint32_t, segment_count> bits{}; | |
std::array<uint32_t, N> primes_list{}; | |
//if constexpr (N == 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
#pragma once | |
#include <vector> | |
#include <array> | |
#include <string> | |
#include <string_view> | |
#include <cstdint> | |
#include <algorithm> | |
#include <format> | |
#include <iostream> |
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 <vector> | |
#include <memory_resource> | |
#include <string> | |
#include <string_view> | |
#include <chrono> | |
//A shameless rip of the bits that appear to make nanobench work |
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 <cstdint> | |
#include <intrin.h> | |
#include <string_view> | |
#include <cstring> | |
#include <array> | |
constexpr uint8_t l_space = 0x1; | |
constexpr uint8_t h_space = 0x2; | |
constexpr uint8_t h_delch = 0x4; |