Image and video managment
VideoManager
VideoManager class is responsible for handling all video output. It uses clanLib display classes to achieve it. VideoManager is the main component because the main function of the game is to interact with user with some input/output. GraphicsContext class is wrapper class for clanLib's graphics context (CL_GraphicContext) which is used for all drawings. VideoManager has also CL_DisplayWindow member which represent the main application window. Therefor various window attributes can be obtained from VideoManager class.
ImageManager
ImageManager class is responsible for loading image data from image files such as STCI, PCX, TGA and used it for further processing as creating textures from it and so (For now STCI and PCX image files are supported, others formats would be added later. Clanlib has support for various other formats as TGA, PNG and JPEG). When image data is loaded from file, clanlib's CL_SpriteDescription is returned. Other managers as TextureManager or CursorManager (or others) uses this pair to construct textures/sprite from it.
TextureManager
TextureManager is used for creating Textures (surfaces) from ImageManager's SpritiDescription_t. Texture use internally vector of CL_Surfaces. STCI images can contain also sub images, therefore vector of surfaces is used. TextureManager uses cache for all Textures. When TextureManager have to create new texture, it first look in to the cache if the texture with the same name already exist. If texture is found in cache, it is returned. Else, new Texture is created and added to the cache. All Texture objects are passed as shared pointers (std::tr1::shared_ptr) and in cache are stored as weak references (std::tr1::weak_ptr). This will probably change and for cache there will be used also shared pointers. Then cache will be used cicrcular-like container.
CursorManager
CursorManager is responsible for cursor management. Cursor class use CL_Sprite as its implementation, which is also used by clanlib's cursor manager. The cursor is changed through VideoManager class.
FontManager
FontManager class is used for font management, especially for creating and destroying fonts. Font class represent the font and is also used for rendering the text with the current font. Text is always first rendered to Texture and then drawn as a Texture. Foreground and background colors of rendered text can be changed via Font class. Font class use also CL_Sprite for font implementation. Font::Type enumeration is used with new font creation as font type (i.e. Arial, Sans serif, ...).
Here is class diagram for video related classes:

VideoManager class is responsible for handling all video output. It uses clanLib display classes to achieve it. VideoManager is the main component because the main function of the game is to interact with user with some input/output. GraphicsContext class is wrapper class for clanLib's graphics context (CL_GraphicContext) which is used for all drawings. VideoManager has also CL_DisplayWindow member which represent the main application window. Therefor various window attributes can be obtained from VideoManager class.
ImageManager
ImageManager class is responsible for loading image data from image files such as STCI, PCX, TGA and used it for further processing as creating textures from it and so (For now STCI and PCX image files are supported, others formats would be added later. Clanlib has support for various other formats as TGA, PNG and JPEG). When image data is loaded from file, clanlib's CL_SpriteDescription is returned. Other managers as TextureManager or CursorManager (or others) uses this pair to construct textures/sprite from it.
TextureManager
TextureManager is used for creating Textures (surfaces) from ImageManager's SpritiDescription_t. Texture use internally vector of CL_Surfaces. STCI images can contain also sub images, therefore vector of surfaces is used. TextureManager uses cache for all Textures. When TextureManager have to create new texture, it first look in to the cache if the texture with the same name already exist. If texture is found in cache, it is returned. Else, new Texture is created and added to the cache. All Texture objects are passed as shared pointers (std::tr1::shared_ptr) and in cache are stored as weak references (std::tr1::weak_ptr). This will probably change and for cache there will be used also shared pointers. Then cache will be used cicrcular-like container.
CursorManager
CursorManager is responsible for cursor management. Cursor class use CL_Sprite as its implementation, which is also used by clanlib's cursor manager. The cursor is changed through VideoManager class.
FontManager
FontManager class is used for font management, especially for creating and destroying fonts. Font class represent the font and is also used for rendering the text with the current font. Text is always first rendered to Texture and then drawn as a Texture. Foreground and background colors of rendered text can be changed via Font class. Font class use also CL_Sprite for font implementation. Font::Type enumeration is used with new font creation as font type (i.e. Arial, Sans serif, ...).
Here is class diagram for video related classes:

Comments