Add logger class and HM compress flag

This commit is contained in:
scawful
2024-01-29 00:31:16 -05:00
parent 541ee99383
commit 31bd2e7c7e

View File

@@ -5,6 +5,7 @@
#include <chrono>
#include <cstdint>
#include <fstream>
#include <functional>
#include <iostream>
#include <memory>
@@ -56,6 +57,9 @@ class ExperimentFlags {
// Log to the console.
bool kLogToConsole = false;
// use the classic compression algorithm
bool kUseClassicCompression = false;
// Overworld flags
struct Overworld {
// Load and render overworld sprites to the screen. Unstable.
@@ -235,6 +239,14 @@ class ImGuiIdIssuer {
}
};
class Logger {
public:
static void log(std::string message) {
static std::ofstream fout("log.txt", std::ios::out | std::ios::app);
fout << message << std::endl;
}
};
std::string UppercaseHexByte(uint8_t byte, bool leading = false);
std::string UppercaseHexWord(uint16_t word);
std::string UppercaseHexLong(uint32_t dword);