/* unigraf.h - Universal Graphics interface (December 07, 2006) Copyright (c) 2002-2006, Alexander Shabarshin (alexander@shabrshin.com) This file is part of NedoPC SDK project (www.nedopc.org). NedoPC SDK 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. NedoPC SDK 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 NedoPC SDK; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __UNIGRAF_H #define __UNIGRAF_H #define UG256_320x200 0x10 #define UG256_640x400 0x20 #define UG256_640x480 0x21 class UniGraf { int dx,dy,dxscr,dyscr,graf; int mx,my; // fixed.8 short px,py,*apy; short mox,moy,mol,mom,mor; unsigned char *image; long *pal; int keybuf[3]; char *keys; void* PrivateData; public: UniGraf(int m,int w=0); ~UniGraf(); void Close(void); int Screen(int dxs=0,int dys=0); int GetScreenWidth(void){return dxscr;} int GetScreenHeight(void){return dyscr;} int LoadPalette(char* s); int SetPalette(int i,int r,int g,int b); long GetPalette(int i); int SetScreenPixel(int x,int y,int c); int GetScreenPixel(int x,int y); int DrawChar8x8(int x,int y,int c,int s,int b=-1); int DrawChar8x16(int x,int y,int c,int s,int b=-1); int DrawString(int x,int y,char *c,int h,int s,int b=-1); int Update(void); int KeyPressed(int scan); int WhatKey(void); int KeyClear(void); int WaitKey(void); int GetMouseX(void){return mox;} int GetMouseY(void){return moy;} int GetMouseL(void){return mol;} int GetMouseM(void){return mom;} int GetMouseR(void){return mor;} }; #endif