#include "portable.h"
#include "chinese.h"
#include "vga.h"
void NULL_FUNC();
void (*mon_grmode)()=NULL_FUNC;
void (*mon_textmode)()=NULL_FUNC;
void (*mon_clearblock)(int sx,int sy ,int ex,int ey)=NULL_FUNC;
void (*mon_setcolor)(int)=NULL_FUNC;
void (*mon_moveleft)(int sx,int ex,int y,int c)=NULL_FUNC;
void (*mon_moveright)(int sx,int ex,int y,int c)=NULL_FUNC;
void (*mon_drawctext)(int x,int y,char *)=NULL_FUNC;
void (*mon_drawtext)(int x,int y,char *)=NULL_FUNC;
void (*mon_invert)(int)=NULL_FUNC;
void (*mon_underline)(int)=NULL_FUNC;
void (*mon_scroll)(int sy,int ey,int l)=NULL_FUNC;
void (*mon_rscroll)(int sy,int ey,int l)=NULL_FUNC;
void (*mon_drawline)(int sx,int sy,int ex,int ey);
void (*mon_cursor)(int x,int y);
int (*mon_curcolor)();
void NULL_FUNC()
{
}

void graph_mode()
{
  vga_setmode(G640x480x16);
}
void text_mode()
{
  vga_setmode(TEXT);
}

int init_console()
{
  mon_grmode = graph_mode;
  mon_textmode = text_mode;
  mon_clearblock = vga_clearblock;
  mon_setcolor = vga_setcolor;
  mon_moveleft = vga_moveleft;
/*  mon_moveright = vga_moveright;*/
  mon_drawctext = vga_drawctext;
  mon_drawtext = vga_drawtext;
  mon_invert = vga_invert;
  mon_underline = vga_underline;
  mon_drawline = vga_drawline;
  mon_scroll = vga_scroll;
  mon_rscroll = vga_rscroll;
  mon_cursor = vga_cursor;
  mon_curcolor = vga_curcolor;
  return 0;
}

