PowerBlocks SDK
 
Loading...
Searching...
No Matches
console.c File Reference

Simple console. More...

#include "console.h"
#include <stddef.h>
#include <string.h>
#include <stdbool.h>
#include <stdio.h>

Functions

void console_initialize (framebuffer_t *framebuffer, const framebuffer_font_t *font)
 Initializes the visual console.
 
void console_set_cursor (vec2i cursor_position)
 Sets the cursor position of the console.
 
void console_set_text_color (uint32_t foreground, uint32_t background)
 Sets the color text color.
 
void console_put (const char *string)
 Puts a string into the console.
 

Variables

vec2i console_cursor_position
 
uint32_t console_foreground_color
 
uint32_t console_background_color
 
const framebuffer_font_tconsole_font
 

Detailed Description

Simple console.

Provides a simple console for quick debugging.

Author
Samuel Fitzsimons (rainbain)
Date
2025

Function Documentation

◆ console_initialize()

void console_initialize ( framebuffer_t * framebuffer,
const framebuffer_font_t * font )

Initializes the visual console.

Attaches to a frame buffer. Will write directly into it when displaying text.

Sets stdout into the console.

Sets console position back to 0,0

Parameters
framebufferFramebuffer to attach to

◆ console_put()

void console_put ( const char * string)

Puts a string into the console.

Prints a string into the console. Will update cursor positions.asm '
' will generate a new line.

◆ console_set_cursor()

void console_set_cursor ( vec2i cursor_position)

Sets the cursor position of the console.

Set the position of the cursor in pixels.

◆ console_set_text_color()

void console_set_text_color ( uint32_t foreground,
uint32_t background )

Sets the color text color.

Sets the color text color.