first commit

This commit is contained in:
Greg Wells
2025-05-05 19:29:42 -04:00
commit 406d669de0
284 changed files with 32727 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
#include "gryphn_debugger.h"
void gnAddDebugLayer(gnDebugger& debugger, const gnString& layer) {
gnListAdd(debugger.debug_layers, layer);
}
const gnList<gnString>& gnDebuggerGetDebugLayers(gnDebugger& debugger) {
return debugger.debug_layers;
}

View File

@@ -0,0 +1,28 @@
#pragma once
#include <gryphn/gryphn_utils.h>
#include <iostream>
#include "gryphn_layers.h"
struct gnPlatformDebugger;
struct gnDebugger;
static gnDebugger* gnDebuggerInstance = nullptr;
inline void gnDebugError(gnString error);
struct gnDebugger {
ACCESS_LEVEL:
gnPlatformDebugger* debugger;
gnList<gnString> debug_layers = gnCreateList<gnString>();
public:
gnDebugger() {
if (debugger) gnDebugError("Debugger instance already created (you can only have one debugger)");
gnDebuggerInstance = this;
}
};
inline void gnDebugError(gnString error) { std::cout << gnToCString(error) << "\n"; }
void gnAddDebugLayer(gnDebugger& debugger, const gnString& layer);
const gnList<gnString>& gnDebuggerGetDebugLayers(gnDebugger& debugger);
inline gnReturnCode (*gnCreateDebugger)(gnDebugger* instance);
inline void (*gnDestroyDebugger)(gnDebugger& instance);

View File

@@ -0,0 +1,6 @@
#pragma once
#include <gryphn/gryphn_utils.h>
inline gnString (*gnGetPlatformLayerName)(const gnString& gnName);
#define GN_DEFAULT_DEBUG_LAYER gnGetPlatformLayerName("GN_DEFAULT_DEBUG_LAYER")