summaryrefslogtreecommitdiff
path: root/src/graphics.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-04-29 16:28:15 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-29 17:14:01 +0300
commitc25672bd63cce049e931030f70629eb689cf43eb (patch)
treed39d163d02f1c02d5c6cf87ebf98be86493eb45f /src/graphics.h
parent47329e695c95031491161cf45e1fbd118a8797e6 (diff)
downloadplus-c25672bd63cce049e931030f70629eb689cf43eb.tar.gz
plus-c25672bd63cce049e931030f70629eb689cf43eb.tar.bz2
plus-c25672bd63cce049e931030f70629eb689cf43eb.tar.xz
plus-c25672bd63cce049e931030f70629eb689cf43eb.zip
Add graphicsmanager class and move some code to it.
Diffstat (limited to 'src/graphics.h')
-rw-r--r--src/graphics.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/graphics.h b/src/graphics.h
index 1779a14a5..9b69f2f60 100644
--- a/src/graphics.h
+++ b/src/graphics.h
@@ -254,11 +254,7 @@ class Graphics : public gcn::SDLGraphics
virtual void prepareScreenshot()
{ }
- virtual int getMemoryUsage()
- { return 0; }
-
- virtual void updateTextureFormat()
- { }
+ int getMemoryUsage();
virtual bool drawNet(int x1, int y1, int x2, int y2,
int width, int height);
@@ -299,12 +295,26 @@ class Graphics : public gcn::SDLGraphics
void setNoFrame(bool n)
{ mNoFrame = n; }
- bool videoInfo();
+ const std::string &getName()
+ { return mName; }
int mWidth;
int mHeight;
protected:
+ void setMainFlags(int w, int h, int bpp, bool fs,
+ bool hwaccel, bool resize, bool noFrame);
+
+ int getOpenGLFlags();
+
+ int getSoftwareFlags();
+
+ bool setOpenGLMode();
+
+ void updateMemoryInfo();
+
+ bool videoInfo();
+
int SDL_FakeUpperBlit(SDL_Surface *src, SDL_Rect *srcrect,
SDL_Surface *dst, SDL_Rect *dstrect);
@@ -321,6 +331,8 @@ class Graphics : public gcn::SDLGraphics
bool mNoFrame;
Uint32 mOldPixel;
int mOldAlpha;
+ std::string mName;
+ int mStartFreeMem;
};
extern Graphics *mainGraphics;