Nuked console

This commit is contained in:
2025-11-03 09:22:18 -06:00
parent 3feb43fdad
commit 3ef6205ea3
53 changed files with 127 additions and 1570 deletions

12
src/debug/CMakeLists.txt Normal file
View File

@@ -0,0 +1,12 @@
# Copyright (c) 2025 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
debug.c
)
# Subdirs

40
src/debug/debug.c Normal file
View File

@@ -0,0 +1,40 @@
/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "debug.h"
void debugPrint(const char_t *message, ...) {
// char_t buffer[CONSOLE_LINE_MAX];
// va_list args;
// va_start(args, message);
// int32_t len = stringFormatVA(buffer, CONSOLE_LINE_MAX, message, args);
// va_end(args);
// // Move all lines back
// memoryMove(
// CONSOLE.line[0],
// CONSOLE.line[1],
// (CONSOLE_HISTORY_MAX - 1) * CONSOLE_LINE_MAX
// );
// // Copy the new line
// memoryCopy(
// CONSOLE.line[CONSOLE_HISTORY_MAX - 1],
// buffer,
// len + 1
// );
// printf("%s\n", buffer);
va_list args;
va_start(args, message);
vprintf(message, args);
va_end(args);
// For the time being just use standard printing functions.
printf(message, args);
}

17
src/debug/debug.h Normal file
View File

@@ -0,0 +1,17 @@
/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "dusk.h"
/**
* Prints a debug message to the debug console.
*
* @param message The message format string.
* @param ... Additional arguments for the format string.
*/
void debugPrint(const char_t *message, ...);