Holy fucking shit I don't want to work on this. Sibly, you son of a ...
This commit is contained in:
+44
-35
@@ -4,6 +4,8 @@
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#include "GraphicsRuntime.h"
|
||||
#include <d3d.h>
|
||||
|
||||
#include "ddutil.h"
|
||||
@@ -16,8 +18,18 @@
|
||||
|
||||
class gxRuntime;
|
||||
|
||||
class gxGraphics{
|
||||
class gxGraphics {
|
||||
private:
|
||||
// Direct3D9
|
||||
//LPDIRECT3D9 d3d9;
|
||||
//LPDIRECT3DDEVICE9 d3d9dev;
|
||||
//IDirect3DDevice9* d3d9Device;
|
||||
|
||||
public:
|
||||
gxGraphics(gxRuntime* runtime);
|
||||
gxGraphics(gxRuntime* runtime, IDirectDraw7 *dirDraw, IDirectDrawSurface7 *front, IDirectDrawSurface7 *back, bool d3d);
|
||||
~gxGraphics();
|
||||
|
||||
IDirectDraw7 *dirDraw;
|
||||
IDirectDraw *ds_dirDraw;
|
||||
|
||||
@@ -26,10 +38,7 @@ public:
|
||||
D3DDEVICEDESC7 dir3dDevDesc;
|
||||
DDPIXELFORMAT primFmt,zbuffFmt;
|
||||
|
||||
DDPIXELFORMAT texRGBFmt[2],texAlphaFmt[2],texRGBAlphaFmt[2],texRGBMaskFmt[2];
|
||||
|
||||
gxGraphics( gxRuntime *runtime,IDirectDraw7 *dirDraw,IDirectDrawSurface7 *front,IDirectDrawSurface7 *back,bool d3d );
|
||||
~gxGraphics();
|
||||
DDPIXELFORMAT texRGBFmt[2], texAlphaFmt[2], texRGBAlphaFmt[2], texRGBMaskFmt[2];
|
||||
|
||||
void backup();
|
||||
bool restore();
|
||||
@@ -38,14 +47,14 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
gxCanvas *front_canvas,*back_canvas;
|
||||
gxCanvas *front_canvas, *back_canvas;
|
||||
gxFont *def_font;
|
||||
bool gfx_lost;
|
||||
gxMesh *dummy_mesh;
|
||||
|
||||
DDSURFACEDESC2 initDesc( int w,int h,int flags );
|
||||
ddSurf *createSurface( int width,int height,int flags );
|
||||
ddSurf *loadSurface( const std::string &f,int flags );
|
||||
DDSURFACEDESC2 initDesc(int w, int h, int flags);
|
||||
ddSurf *createSurface(int width, int height, int flags);
|
||||
ddSurf *loadSurface(const std::string &f, int flags);
|
||||
|
||||
std::set<gxFont*> font_set;
|
||||
std::set<gxCanvas*> canvas_set;
|
||||
@@ -59,24 +68,24 @@ private:
|
||||
|
||||
/***** GX INTERFACE *****/
|
||||
public:
|
||||
enum{
|
||||
GRAPHICS_WINDOWED=1, //windowed mode
|
||||
GRAPHICS_SCALED=2, //scaled window
|
||||
GRAPHICS_3D=4, //3d mode! Hurrah!
|
||||
GRAPHICS_AUTOSUSPEND=8 //suspend graphics when app suspended
|
||||
enum {
|
||||
GRAPHICS_WINDOWED = 1, //windowed mode
|
||||
GRAPHICS_SCALED = 2, //scaled window
|
||||
GRAPHICS_3D = 4, //3d mode! Hurrah!
|
||||
GRAPHICS_AUTOSUSPEND = 8 //suspend graphics when app suspended
|
||||
};
|
||||
|
||||
//MANIPULATORS
|
||||
void vwait();
|
||||
void flip( bool vwait );
|
||||
void flip(bool vwait);
|
||||
|
||||
//SPECIAL!
|
||||
void copy( gxCanvas *dest,int dx,int dy,int dw,int dh,gxCanvas *src,int sx,int sy,int sw,int sh );
|
||||
void copy(gxCanvas *dest, int dx, int dy, int dw, int dh, gxCanvas *src, int sx, int sy, int sw, int sh);
|
||||
|
||||
//NEW! Gamma control!
|
||||
void setGamma( int r,int g,int b,float dr,float dg,float db );
|
||||
void getGamma( int r,int g,int b,float *dr,float *dg,float *db );
|
||||
void updateGamma( bool calibrate );
|
||||
void setGamma(int r, int g, int b, float dr, float dg, float db);
|
||||
void getGamma(int r, int g, int b, float *dr, float *dg, float *db);
|
||||
void updateGamma(bool calibrate);
|
||||
|
||||
//ACCESSORS
|
||||
int getWidth()const;
|
||||
@@ -91,26 +100,26 @@ public:
|
||||
gxFont *getDefaultFont()const;
|
||||
|
||||
//OBJECTS
|
||||
gxCanvas *createCanvas( int width,int height,int flags );
|
||||
gxCanvas *loadCanvas( const std::string &file,int flags );
|
||||
gxCanvas *verifyCanvas( gxCanvas *canvas );
|
||||
void freeCanvas( gxCanvas *canvas );
|
||||
gxCanvas *createCanvas(int width, int height, int flags);
|
||||
gxCanvas *loadCanvas(const std::string &file, int flags);
|
||||
gxCanvas *verifyCanvas(gxCanvas *canvas);
|
||||
void freeCanvas(gxCanvas *canvas);
|
||||
|
||||
gxMovie *openMovie( const std::string &file,int flags );
|
||||
gxMovie *verifyMovie( gxMovie *movie );
|
||||
void closeMovie( gxMovie *movie );
|
||||
gxMovie *openMovie(const std::string &file, int flags);
|
||||
gxMovie *verifyMovie(gxMovie *movie);
|
||||
void closeMovie(gxMovie *movie);
|
||||
|
||||
gxFont *loadFont( const std::string &font,int height,int flags );
|
||||
gxFont *verifyFont( gxFont *font );
|
||||
void freeFont( gxFont *font );
|
||||
gxFont *loadFont(const std::string &font, int height, int flags);
|
||||
gxFont *verifyFont(gxFont *font);
|
||||
void freeFont(gxFont *font);
|
||||
|
||||
gxScene *createScene( int flags );
|
||||
gxScene *verifyScene( gxScene *scene );
|
||||
void freeScene( gxScene *scene );
|
||||
gxScene *createScene(int flags);
|
||||
gxScene *verifyScene(gxScene *scene);
|
||||
void freeScene(gxScene *scene);
|
||||
|
||||
gxMesh *createMesh( int max_verts,int max_tris,int flags );
|
||||
gxMesh *verifyMesh( gxMesh *mesh );
|
||||
void freeMesh( gxMesh *mesh );
|
||||
gxMesh *createMesh(int max_verts, int max_tris, int flags);
|
||||
gxMesh *verifyMesh(gxMesh *mesh);
|
||||
void freeMesh(gxMesh *mesh);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user