/* MikMod module player (c) 1999 Miodrag Vallat and others - see file AUTHORS for complete list. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /*============================================================================== $Id: dosvideo.inc,v 1.1.1.1 2004/01/16 02:07:29 raph Exp $ DOS/DJGPP console i/o routines ==============================================================================*/ #include static struct text_info screen_info; static unsigned char *screen_contents; static int cursor_old = 0; struct SCREEN { int act_attr; char *changed; char *attrs; char *text; } screen = {A_NORMAL, NULL, NULL, NULL}; void clear(void) { memset (screen.changed, 1, winx*winy); memset (screen.attrs, screen.act_attr, winx*winy); memset (screen.text, ' ', winx*winy); } int attrset(int attrs) { screen.act_attr = attrs; return 1; } void mvaddnstr(int y,int x,const char *str,int len) { int i, d; if (y<0 || y>=winy) return; if (x<0) { str -= x; len += x; x = 0; } d = y*winx+x; for (i=0; iwidth - x; if (len > 0) { memset(storage, ' ', len); mvaddnstr(win->y + y, win->x + x, storage, len); } } void win_cursor_set(BOOL visible) { _setcursortype(visible ? cursor_old : _NOCURSOR); } void win_refresh(void) { int x, y, d, start, pos; char buffer[STORAGELEN * 2]; for (y=0; y=winx) break; d--; x = start; pos = 0; while (x