X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcrt.h;h=d935255f1f47ee3b7c85bcc6100082100c08e932;hb=3e72a1f6fc28777c26e4fb109867bd2a3c7b89b0;hp=da5922c4e10d6f7d261099c4d12fdbacef7e9fe7;hpb=c1ef27cf4cdfca6e978a7ee8eb3ec6fd6e6e9e03;p=sympathy.git diff --git a/src/crt.h b/src/crt.h index da5922c..d935255 100644 --- a/src/crt.h +++ b/src/crt.h @@ -12,6 +12,30 @@ /* * $Log$ + * Revision 1.14 2008/02/28 16:57:51 james + * *** empty log message *** + * + * Revision 1.13 2008/02/27 09:42:22 james + * *** empty log message *** + * + * Revision 1.12 2008/02/26 23:23:17 james + * *** empty log message *** + * + * Revision 1.11 2008/02/26 19:08:27 james + * *** empty log message *** + * + * Revision 1.10 2008/02/24 00:42:53 james + * *** empty log message *** + * + * Revision 1.9 2008/02/20 19:25:09 james + * *** empty log message *** + * + * Revision 1.8 2008/02/13 09:12:21 james + * *** empty log message *** + * + * Revision 1.7 2008/02/13 01:08:18 james + * *** empty log message *** + * * Revision 1.6 2008/02/07 13:22:51 james * *** empty log message *** * @@ -35,8 +59,8 @@ #ifndef __CRT_H__ #define __CRT_H__ -#define CRT_ROWS 25 -#define CRT_COLS 80 +#define CRT_ROWS 60 +#define CRT_COLS 132 #define CRT_CELS (CRT_ROWS*CRT_COLS) #define CRT_ADDR(r,c) (((r)*CRT_COLS)+(c)) @@ -75,9 +99,9 @@ #define CRT_COLOR_NORMAL CRT_MAKE_COLOR(CRT_FGCOLOR_NORMAL,CRT_BGCOLOR_NORMAL) -typedef struct +typedef struct __attribute__ ((packed)) { - uint8_t chr; + uint32_t chr; uint8_t attr; uint8_t color; } CRT_CA; @@ -96,12 +120,12 @@ typedef struct int dir; } CRT_ScrollHint; -typedef struct +typedef struct CRT_struct { CRT_CA screen[CRT_CELS]; CRT_Pos pos; - CRT_ScrollHint sh; int hide_cursor; + CRT_Pos size; } CRT; @@ -111,4 +135,10 @@ crt_ca_cmp (CRT_CA a, CRT_CA b) return memcmp (&a, &b, sizeof (a)); } +static inline +crt_pos_cmp (CRT_Pos a, CRT_Pos b) +{ + return memcmp (&a, &b, sizeof (a)); +} + #endif /* __CRT_H__ */