00001
00002 #include <stdio.h>
00003 #include <stdlib.h>
00004 #include <string.h>
00005 #include "curses.h"
00006 #include "termlib.h"
00007 #include "video.h"
00008
00009
00010
00011
00012
00013
00014 #if (!defined(R) && !defined(V))
00015 # define AUTOSELECT
00016 #endif
00017
00018
00019
00020
00021
00022 void cmove(WINDOW *w, int y,int x)
00023 {
00024 w->dvRow = y;
00025 w->dvCol = x;
00026 }
00027
00028 void curpos(WINDOW *w, int *yp,int *xp)
00029 {
00030 *yp = w->dvRow;
00031 *xp = w->dvCol;
00032 }
00033
00034 void replace(WINDOW *w,int c)
00035 {
00036 SCREEN[ w->dvRow ][ w->dvCol ].letter = c ;
00037 }
00038
00039 void doscroll(int l,int r,int t,int b,int a,int at)
00040 {
00041 dv_scroll (l,r,t,b,a,at);
00042 }
00043
00044 int inchar(void)
00045 {
00046 return dv_incha ( ) & 0xff;
00047 }
00048
00049 int incha(void)
00050 {
00051 return dv_incha( );
00052 }
00053
00054 void outc(WINDOW *w, int c,int attrib)
00055 {
00056 SCREEN[ w->dvRow ][ w->dvCol ].letter = c ;
00057 SCREEN[ w->dvRow ][ w->dvCol ].attribute = attrib ;
00058 if( ++w->dvCol >= NUMCOLS )
00059 {
00060 w->dvCol = 0;
00061 if( ++w->dvRow >= NUMROWS )
00062 {
00063 dv_scroll_line(0,NUMCOLS-1,0,NUMCOLS-1, 'u', NORMAL );
00064 w->dvRow = NUMROWS-1 ;
00065 }
00066 }
00067 }
00068
00069 SBUF *savescr(int l,int r,int t,int b)
00070 {
00071 return dv_save(l,r,t,b);
00072 }
00073
00074 SBUF *restore(SBUF *b)
00075 {
00076 return dv_restore (b);
00077 }
00078
00079 void freescr(SBUF *p)
00080 {
00081 dv_freesbuf(p);
00082 }
00083
00084 void clr_region(int l,int r,int t,int b,int attrib)
00085 {
00086 dv_clr_region(l,r,t,b,attrib);
00087 }
00088
00089 void DisplayAttrib( int * nC, int *nR)
00090 {
00091 dv_screen_attrib(nC, nR);
00092 }
00093
00094 int init( void )
00095 {
00096 if( !dv_init() )
00097 {
00098
00099
00100 }
00101 return 1;
00102 }
00103
00104 int is_direct(void)
00105 {
00106 return 1;
00107 };
00108
00109