2020-03-02 19:50:38 +00:00
|
|
|
// master.lib text function reimplementations
|
|
|
|
// ------------------------------------------
|
2022-08-04 13:29:34 +00:00
|
|
|
|
2020-03-02 19:50:38 +00:00
|
|
|
typedef enum {
|
|
|
|
CURSOR_HIDE,
|
|
|
|
CURSOR_BLOCK,
|
2020-03-29 15:08:04 +00:00
|
|
|
CURSOR_UNDERLINE,
|
|
|
|
|
2020-09-12 08:17:55 +00:00
|
|
|
_z_text_cursor_t_FORCE_UINT16 = 0xFFFF
|
2020-03-02 19:50:38 +00:00
|
|
|
} z_text_cursor_t;
|
|
|
|
|
2022-08-03 12:15:55 +00:00
|
|
|
// Attribute bits for z_text_vputsa(), completely differing from the PC-98
|
2022-08-10 20:20:27 +00:00
|
|
|
// hardware text attribute bits. Probably because they match the default
|
|
|
|
// [z_Palettes] colors?
|
2022-08-03 12:15:55 +00:00
|
|
|
#define Z_ATRB_BLUE 0x1
|
|
|
|
#define Z_ATRB_GREEN 0x2
|
|
|
|
#define Z_ATRB_RED 0x4
|
|
|
|
#define Z_ATRB_CYAN (Z_ATRB_BLUE | Z_ATRB_GREEN)
|
|
|
|
#define Z_ATRB_MAGENTA (Z_ATRB_BLUE | Z_ATRB_RED)
|
|
|
|
#define Z_ATRB_YELLOW (Z_ATRB_GREEN | Z_ATRB_RED)
|
|
|
|
#define Z_ATRB_WHITE (Z_ATRB_BLUE | Z_ATRB_GREEN | Z_ATRB_RED)
|
|
|
|
#define Z_ATRB_BLINK 0x100
|
|
|
|
#define Z_ATRB_REVERSE 0x200
|
|
|
|
#define Z_ATRB_UNDERLINE 0x400
|
|
|
|
#define Z_ATRB_VLINE 0x800
|
|
|
|
|
2020-03-02 19:50:38 +00:00
|
|
|
void z_text_init(void);
|
|
|
|
void z_text_25line(void);
|
|
|
|
void z_text_20line(void);
|
|
|
|
void z_text_systemline_show(void);
|
|
|
|
void z_text_systemline_hide(void);
|
|
|
|
void z_text_show(void);
|
|
|
|
void z_text_hide(void);
|
|
|
|
void z_text_setcursor(z_text_cursor_t type);
|
|
|
|
void z_text_print(const char *cmd);
|
2022-08-09 01:24:33 +00:00
|
|
|
void z_text_vputsa(
|
|
|
|
tram_x_t x, tram_y_t y, int z_atrb, const sshiftjis_t *fmt, ...
|
|
|
|
);
|
2022-08-12 00:35:50 +00:00
|
|
|
|
2022-08-12 23:17:03 +00:00
|
|
|
// Also moves the text cursor to the top-left corner of the screen.
|
|
|
|
void z_text_clear(void);
|
2022-08-12 00:35:50 +00:00
|
|
|
inline void z_text_clear_inlined() {
|
|
|
|
printf("\x1B*");
|
|
|
|
}
|
2020-03-02 19:50:38 +00:00
|
|
|
// ------------------------------------------
|