home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
df3os2.zip
/
SCREEN.H
< prev
next >
Wrap
C/C++ Source or Header
|
1993-11-13
|
1KB
|
49 lines
// ----------- screen.h
//
// modified for OS/2 operation - jw21sep93
#ifndef SCREEN_H
#define SCREEN_H
#define INCL_BASE
#define INCL_NOPMAPI
#include <os2.h>
#include "dflatdef.h"
#include "rectangl.h"
const char SPACECHAR = 0x20;
class Screen
{
VIOMODEINFO mi;
unsigned height;
unsigned width;
// ---- compute video offset address
unsigned vad(int x, int y) { return y * (width*2) + x*2; }
public:
Screen();
unsigned Height() { return height; }
unsigned Width() { return width; }
void Scroll(Rect &rc, int d, int fg, int bg);
unsigned int GetVideoChar(int x, int y);
void PutVideoChar(int x, int y, unsigned int c);
void WriteVideoString(const char *s,int x,int y,int fg,int bg);
void GetBuffer(Rect &rc, char *bf);
void PutBuffer(Rect &rc, char *bf);
};
inline int clr(int fg, int bg)
{
return fg | (bg << 4);
}
#endif