libmsx
C library for MSX
Loading...
Searching...
No Matches
text.h
Go to the documentation of this file.
1// -*- coding: utf-8-unix -*-
2/*
3 * Copyright (c) 2021-2024 Daishi Mori (mori0091)
4 *
5 * This software is released under the MIT License.\n
6 * See https://github.com/mori0091/libmsx/blob/main/LICENSE
7 *
8 * GitHub libmsx project\n
9 * https://github.com/mori0091/libmsx
10 */
34#pragma once
35
36#ifndef TEXT_H_
37#define TEXT_H_
38
39#include "tty.h"
40#include <stdint.h>
41
54#define locate(x, y) \
55 TTY_locate(x, y)
56
60#define newline() \
61 TTY_linefeed()
62
66#define cls() \
67 TTY_cls()
68
125#define fg_color(fg) \
126 TTY_set_fg_color(fg)
127
132#define bg_color(bg) \
133 TTY_set_bg_color(bg)
134
139#define border_color(border) \
140 TTY_set_border_color(border)
141
147#define text_color(fg, bg) \
148 TTY_set_text_color(fg, bg)
149
156#define color(fg, bg, border) \
157 TTY_set_color(fg, bg, border)
158
172void print(const char* str);
173
178void printc(char c);
179
184void printu(unsigned int i);
185
190void printi(int i);
191
196void printx(uint16_t x);
197
200#endif // TEXT_H_
void printc(char c)
MSX Print character on the screen.
void print(const char *str)
MSX Print string on the screen.
void printu(unsigned int i)
MSX Print unsigned integer on the screen.
void printx(uint16_t x)
MSX Print unsigned integer in hexadecimal on the screen.
void printi(int i)
MSX Print signed integer on the screen.
Teletype/console device interface.