X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=include%2Fcio.h;h=4e83202af2344909f4cc22fbb90263642237647a;hp=7057bd43d055064528b2e364f55f2e1d7961728a;hb=031437896d0dc6cac70c16e5604b10f5aa4d0767;hpb=44ba0e9facc91003bf3ef32876f8b8ac5439c3c1 diff --git a/include/cio.h b/include/cio.h index 7057bd4..4e83202 100644 --- a/include/cio.h +++ b/include/cio.h @@ -2,17 +2,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: cio.h,v 1.5 2000/05/07 12:46:19 kevin Exp $ -** $Log: cio.h,v $ -** Revision 1.5 2000/05/07 12:46:19 kevin -** made c++ compatible -** -** Revision 1.4 2000/04/28 18:18:59 kevin -** removed unused files -** -** Revision 1.3 2000/04/28 14:14:16 kevin -** *** empty log message *** -** +** $Id: cio.h,v 1.9 2000/06/13 16:20:31 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -30,35 +20,6 @@ #ifndef __CIO_H #define __CIO_H -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -struct crtv_st { - int init; /* True if initialized */ - int bios_mode; /* Current BIOS crt mode */ - int text_attr; /* Current text attribute */ - int act_page; /* Active page */ - int tcols, trows; /* Maximum text coords */ - int xmax, ymax; /* Maximum x, y for both text & graphic modes */ - int cx, cy; /* Current x, y position */ -}; - -#ifndef DEFINE_CRTV - extern struct crtv_st crtv; -#endif - -/*----------------------------------------------------------------------*/ - -#define CRT_ROWS 25 -#define CRT_COLS 80 - -/*----------------------------------------------------------------------*/ - -#define ATTR_NORMAL 7 -#define ATTR_REVERSE 14 -#define ATTR_HIGHLIGHT 15 #define C_BLACK 0 /* color codes */ #define C_BLUE 1 @@ -86,68 +47,19 @@ struct crtv_st { #define SC_BLANK ' ' -#define WAITKEY() {cio_kb_clr(); while (cio_kb_read() == 0);} - -/* c_save.c */ -int crt_save(const char *fname); -/* center.c */ -void crt_center_line(const char *str); -/* clreol.c */ -void crt_clreol(void); -/* clrline.c */ -void crt_clrline(unsigned int line); -/* clrscrn.c */ -void crt_clrscrn(void); -/* cpos.c */ -void crt_tab(unsigned int n); -void crt_save_cpos(void); -void crt_restore_cpos(void); -/* fill_eol.c */ -void crt_fill_eol(int c, int attr); -/* getstate.c */ -void crt_get_state(void); -/* put_ca.c */ -void crt_set_text_clr(int fclr, int bclr); -int crt_get_texta(void); -void crt_set_texta(int a); -int crt_blank_attr(void); -void crt_put_ca(int c, int attr); -void crt_put_c(int c); -void crt_put_cc(int c, int count); -void crt_put_cca(int c, int attr, int count); -void crt_put_str(const char *str); -void crt_put_stra(const char *str, int attr); -void crt_inc_col(int count); -void crt_dec_col(int count); -void crt_dec_row(int count); -/* scrollup.c */ -void crt_scrollup(int xmin, int ymin, int xmax, int ymax, int nline, int attr); -/* setcpos.c */ -void crt_set_cpos(int col, int row); -void crt_get_cpos(int *col, int *row); -/* beep.c */ +/* audio.cpp */ void cio_beep(void); -/* kb_chk.c */ -int cio_kb_chk(void); -/* kb_clr.c */ -void cio_kb_clr(void); -/* kb_getc.c */ +void cio_tone(double freq, double length); + +/* crtput.cpp */ +void cio_put_c(int c); +void cio_put_cc(int c, int count); +void cio_put_str(const char *str); + +/* kbget.cpp */ unsigned int cio_kb_getc(void); void cio_kb_ungetc(unsigned int c); -/* kb_gets.c */ char *cio_kb_gets(char *str, int maxlen); -/* kb_read.c */ -unsigned int cio_kb_read(void); -void cio_kb_unread(unsigned int c); -/* kb_waitc.c */ -unsigned int cio_kb_waitc(const char *astr, const char *estr, int beep_on_error); -/* tone.c */ -void cio_tone(double freq, double length); -/* check_kb */ -int cio_check_kb_escape(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ +unsigned int cio_kb_waitc(const char *astr, int beep); #endif