Posts

Showing posts from October, 2007

Finaly some screenshots

Image
So, today I will post more screenshots as usual :) I have started with implementation of the screen management. I have also implemented some screens as init screen, main menu screen and laptop screen. GameScreen is used as a base class for all screen implementations. When new screen implementation is to be created, get_next_screen() , init() , suspend() and update() methods must be implemented. init() operation is used when screen is to be initialized. It is right after it is selected as active screen (active screen is screen that is actually shown and user interact with it). init() operation can be called more than once but never less (For instance, laptop screen can be shown many times, and always before it state change from "inactive" to "active", init() funciton is called). Before screen state will be changed to "inactive", suspend() operation will be called. update() operation is called in loop. It is used for rendering the screen and also ha...

Image and video managment

Image
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 TextureMa...