Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Related Pages

gfxeng.h

00001 #ifndef DEF_GFXENG_H 00002 #define DEF_GFXENG_H 1 00003 00004 #define BAR_HEIGHT 138 00005 #define ICON_SIZE 46 00006 #define DFONT 10 00007 00008 #define UPDATE_NOTHING 0x00 00009 #define UPDATE_BAR 0x01 00010 #define UPDATE_MENU 0x02 00011 #define UPDATE_ALL 0x03 00012 00018 class GraphicsEngine { 00019 friend class GraphicConfigMenu; 00020 public: 00021 GraphicsEngine(); 00022 ~GraphicsEngine(); 00024 void update(Uint8); 00026 void draw(); 00028 void resize(Uint16 width, Uint16 height); 00029 void togglePlayerBar(); 00030 void toggleFPS(); 00031 void toggleFullScreen(); 00032 void setShowDebug(); 00033 void unsetShowDebug(); 00034 void toggleShowDebug(); 00035 void setMenuBG(SDL_Surface* menu_background=NULL); 00036 const SDL_Rect& addShift(Sint16,Sint16); 00037 const SDL_Rect& setShift(Sint16,Sint16); 00038 const SDL_Rect& getShift() { 00039 return shift; 00040 } 00041 void resetShift() { 00042 shift.x=shift.y=0; 00043 } 00044 void drawRectangle(SDL_Rect rect, Uint8 border=1, Uint32 color=0); 00045 SDL_Surface* createRGBSurface(Uint16 width, Uint16 height); 00046 SDL_Surface* createRGBASurface(Uint16 width, Uint16 height); 00047 SDL_Surface* createRGBScreenSurface(); 00048 SDL_Surface* createRGBAScreenSurface(); 00049 protected: 00051 const Uint32 rmask; 00052 const Uint32 gmask; 00053 const Uint32 bmask; 00054 const Uint32 amask; 00056 Uint32 vflags; 00058 SDL_Surface* screen; 00060 SDL_Rect vis_map; 00062 SDL_Surface* menubg; 00064 SDL_Rect bar; 00065 bool show_bar; 00066 bool show_fps; 00067 bool show_debug; 00068 //visual flags 00069 bool fullscreen; 00070 //update state 00071 Uint8 updatetype; 00072 // current shift 00073 SDL_Rect shift; 00075 EmptyAnimationPtr lifeimage; 00076 protected: 00080 inline void drawGameScene(); 00081 inline void drawEditScene(); 00084 inline void drawPlayerBar(); 00086 inline void drawFPS(); 00091 inline void drawMenu(); 00092 inline void drawBox(); 00093 inline void resetMenuBG(); 00094 inline SDL_Rect clipToBG(SDL_Rect dest) const; 00096 inline SDL_Rect setShift(SDL_Rect center); 00098 inline SDL_Rect* shiftMapArea(SDL_Rect& area, const SDL_Rect& shift); 00100 inline void setGameMenuBG(); 00101 }; 00102 00103 #endif

Generated on Sun Feb 5 13:02:35 2006 for Lost Penguins by doxygen 1.3.8