KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
fb_console.h
Go to the documentation of this file.
1/* KallistiOS ##version##
2
3 dc/fb_console.h
4 Copyright (C) 2009 Lawrence Sebald
5
6*/
7
8/** \file dc/fb_console.h
9 \brief A simple dbgio interface to draw to the framebuffer.
10 \ingroup logging
11
12 This file contains definitions to interact with a simple framebuffer dbgio
13 interface. This interface can be moved around in memory and can have its
14 width and height set so that you can truly customize it to the environment
15 as needed. This utilizes the bios font functionality to actually draw any
16 characters.
17
18 To actually use the framebuffer device, pass "fb" as the parameter to
19 dbgio_dev_select().
20
21 \author Lawrence Sebald
22*/
23
24#ifndef __DC_FB_CONSOLE_H
25#define __DC_FB_CONSOLE_H
26
27#include <kos/cdefs.h>
28__BEGIN_DECLS
29
30#include <arch/types.h>
31#include <kos/dbgio.h>
32
33/* \cond */
34extern dbgio_handler_t dbgio_fb;
35/* \endcond */
36
37/** \brief Set the target for the framebuffer dbgio device.
38
39 This function allows you to set a target for the dbgio device on the
40 framebuffer. This allows you to do things like setting it to render to a
41 texture rather than to the whole framebuffer, for instance.
42
43 The default setup for the framebuffer dbgio device is to print to the full
44 640x480 framebuffer (minus a 32-pixel border around the outside). If you
45 change this, you can restore the original functionality by passing NULL for
46 t, 640 for w, 480 for h, and 32 for borderx and bordery.
47
48 \param t The target in memory to render to.
49 \param w The width of the target.
50 \param h The height of the target.
51 \param borderx How much border to leave around the target in the
52 X direction.
53 \param bordery How much border to leave around the target in the
54 Y direction.
55*/
56void dbgio_fb_set_target(uint16 *t, int w, int h, int borderx, int bordery);
57
58__END_DECLS
59
60#endif /* __DC_FB_CONSOLE_H */
Various common macros used throughout the codebase.
Debug I/O.
void dbgio_fb_set_target(uint16 *t, int w, int h, int borderx, int bordery)
Set the target for the framebuffer dbgio device.
unsigned short uint16
16-bit unsigned integer
Definition types.h:34
Debug I/O Interface.
Definition dbgio.h:39
Common integer types.