first commit of some basics

This commit is contained in:
2026-01-17 09:13:59 +01:00
parent f9bc556ad9
commit c770c62400
41 changed files with 13610 additions and 0 deletions

35
TSE_Base/src/Debug.hpp Normal file
View File

@@ -0,0 +1,35 @@
#pragma once
#include "LuaStateHandler.hpp"
#include "Types.hpp"
#define TSE_LOG(msg) TSE::Debug::Log(msg)
#define TSE_ERROR(msg) TSE::Debug::Error(msg)
#define TSE_WARNING(msg) TSE::Debug::Warning(msg)
namespace TSE
{
class Debug
{
public:
/// @brief initializes the log file in app data or .local, and binds lua functions
static void Init();
/// @brief logs soumething to the stdout, and into the log file
/// @param msg the message to be logged
static void Log(string msg);
/// @brief logs soumething to the stdout, and into the log file
/// @param msg the message to be logged
static void Error(string msg);
/// @brief logs soumething to the stdout, and into the log file
/// @param msg the message to be logged
static void Warning(string msg);
/// @brief closes the log file
static void Close();
private:
static std::ofstream logFile;
};
} // namespace TSE