diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-04-29 16:28:15 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-04-29 17:14:01 +0300 |
commit | c25672bd63cce049e931030f70629eb689cf43eb (patch) | |
tree | d39d163d02f1c02d5c6cf87ebf98be86493eb45f /src/graphics.h | |
parent | 47329e695c95031491161cf45e1fbd118a8797e6 (diff) | |
download | manaverse-c25672bd63cce049e931030f70629eb689cf43eb.tar.gz manaverse-c25672bd63cce049e931030f70629eb689cf43eb.tar.bz2 manaverse-c25672bd63cce049e931030f70629eb689cf43eb.tar.xz manaverse-c25672bd63cce049e931030f70629eb689cf43eb.zip |
Add graphicsmanager class and move some code to it.
Diffstat (limited to 'src/graphics.h')
-rw-r--r-- | src/graphics.h | 24 |
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; |