/* $Id: video.hpp,v 1.24 2005/12/03 10:03:16 chfreund Exp $ */ #ifndef _VIDEO_HPP_ #define _VIDEO_HPP_ #include #include "sprite.hpp" #include "wopsprites.hpp" /***********************************************************/ typedef WopSprites ClientWopSprites; /***********************************************************/ class Video { public: Video (); ~Video (); void setMouseCursor (const char* cursor, const int width, const int height, const int hotX, const int hotY); void showMouseCursor (const bool show); //! returns a pointer to the sprite interface (for class World) WopSpritesWorldInterface* getSpriteInterface() { return &m_sprites; } //! returns the sprite object ClientWopSprites& getSprites() { return m_sprites; } //! loads the sprites form the data path /*! Simply calls WopSprites::load and terminates the program, * if this does not succeed. Note that all sprites can only * be loaded under a running video system of SDL. Therefore * this is a separate function call to make sure, that all * initialization of the Video object is finished successfully * befor loading the sprites. */ void loadSprites( ProgressLog *const progresslog = NULL ); void saveScreenshot( const char* filename ); //SDL_Surface* loadImage (const char* filename, const bool alpha = false); SDL_Surface* getScreen (); // {return m_screen;} SDL_Surface* loadImage( const char* filename, const bool alpha ); //! convert the given surface to screen pixel format (used by loader) static SDL_Surface* convertSurface( SDL_Surface *src, const bool alpha ); void toggleFullscreen(); private: static const int m_SIZE_X = 640, m_SIZE_Y = 480; static int m_BPP; Uint32 m_flags; SDL_Surface *m_screen; //!< background surface of the game SDL_Cursor *m_cursor; //!< the WoP cursor ClientWopSprites m_sprites; //!< object keeping all sprites in WoP }; /***********************************************************/ #endif // _VIDEO_HPP_