Files
dusk/archive/dusksdl2/display/ui/renderconsole.c
2025-08-20 19:18:38 -05:00

29 lines
585 B
C

/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "renderconsole.h"
#include "console/console.h"
#include "display/ui/rendertext.h"
void renderConsoleDraw(void) {
if(!CONSOLE.visible) return;
int32_t i = 0;
char_t *line;
do {
line = CONSOLE.line[i];
if(line[0] == '\0') {
i++;
continue;
}
renderTextDraw(
0, (CONSOLE_HISTORY_MAX - i - 1) * FONT_TILE_HEIGHT, line,
0xFF, 0xFF, 0xFF
);
i++;
} while(i < CONSOLE_HISTORY_MAX);
}