X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcrt.c;h=7e7c647dd96410a131396334a6a06448c4a4f5fc;hb=3e72a1f6fc28777c26e4fb109867bd2a3c7b89b0;hp=5f5656b2ccf33c46d4eedc8e0260e18b56728451;hpb=0162da6f3043d60c28882b33f77c44afca226d46;p=sympathy.git diff --git a/src/crt.c b/src/crt.c index 5f5656b..7e7c647 100644 --- a/src/crt.c +++ b/src/crt.c @@ -10,6 +10,21 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.15 2008/02/27 09:42:21 james + * *** empty log message *** + * + * Revision 1.14 2008/02/27 00:27:21 james + * *** empty log message *** + * + * Revision 1.13 2008/02/26 23:56:12 james + * *** empty log message *** + * + * Revision 1.12 2008/02/26 23:23:17 james + * *** empty log message *** + * + * Revision 1.11 2008/02/23 11:48:37 james + * *** empty log message *** + * * Revision 1.10 2008/02/22 17:07:00 james * *** empty log message *** * @@ -45,7 +60,7 @@ static char rcsid[] = "$Id$"; #include "project.h" void -crt_erase (CRT * c, CRT_Pos s, CRT_Pos e, int ea,int color) +crt_erase (CRT * c, CRT_Pos s, CRT_Pos e, int ea, int color) { CRT_CA *ps = &c->screen[CRT_ADDR_POS (&s)]; CRT_CA *pe = &c->screen[CRT_ADDR_POS (&e)]; @@ -71,11 +86,13 @@ crt_cls (CRT * c) int i; crt_erase (c, s, e, 1, CRT_COLOR_NORMAL); +#if 0 c->sh.dir = 0; +#endif } void -crt_scroll_up (CRT * c, CRT_Pos s, CRT_Pos e, int ea,int color) +crt_scroll_up (CRT * c, CRT_Pos s, CRT_Pos e, int ea, int color) { int l, n; int p; @@ -84,9 +101,11 @@ crt_scroll_up (CRT * c, CRT_Pos s, CRT_Pos e, int ea,int color) s.x = 0; e.x = CRT_COLS - 1; +#if 0 c->sh.s = s; c->sh.e = e; c->sh.dir = -1; +#endif l = e.x - s.x; l++; @@ -104,12 +123,12 @@ crt_scroll_up (CRT * c, CRT_Pos s, CRT_Pos e, int ea,int color) } s.y = e.y; - crt_erase (c, s, e, ea,color); + crt_erase (c, s, e, ea, color); } void -crt_scroll_down (CRT * c, CRT_Pos s, CRT_Pos e, int ea,int color) +crt_scroll_down (CRT * c, CRT_Pos s, CRT_Pos e, int ea, int color) { int l, n; int p; @@ -117,27 +136,29 @@ crt_scroll_down (CRT * c, CRT_Pos s, CRT_Pos e, int ea,int color) s.x = 0; e.x = CRT_COLS - 1; +#if 0 c->sh.s = s; c->sh.e = e; c->sh.dir = 1; +#endif l = e.x - s.x; l++; l *= sizeof (CRT_CA); n = e.y - s.y; - n++; + //n++; p = CRT_ADDR_POS (&e); while (n--) { - memcpy (&c->screen[p], &c->screen[p - CRT_COLS], l); p -= CRT_COLS; + memcpy (&c->screen[p], &c->screen[p - CRT_COLS], l); } e.y = s.y; - crt_erase (c, s, e, ea,color); + crt_erase (c, s, e, ea, color); } @@ -149,7 +170,11 @@ crt_reset (CRT * c) c->pos.x = 0; c->pos.y = 0; c->hide_cursor = 1; + c->size.x = CRT_COLS; + c->size.y = CRT_ROWS; +#if 0 c->sh.dir = 0; +#endif } void @@ -166,5 +191,7 @@ crt_insert (CRT * c, CRT_CA ca) c->screen[CRT_ADDR (c->pos.y, c->pos.x)] = ca; +#if 0 c->sh.dir = 0; +#endif }