Updated Graphics System (markdown)
@@ -9,3 +9,10 @@ The graphics system is designed to be resource-efficient. It's made up of the fo
|
|||||||
|
|
||||||
## Breakdown
|
## Breakdown
|
||||||
|
|
||||||
|
`surface_manager.hpp` and `surface_manager.cpp` hold the `SurfaceManager` class, which loads bitmap files into memory, distributes them throughout the program, and frees them when the resources are no longer needed.
|
||||||
|
`image.hpp` and `image.cpp` hold the `Image` class, which acts as a simple static image on the screen. This class requires that the image file is loaded beforehand, and passed to the `Image` object upon it's creation. It also handles the clipping rectangle and drawing to a specific location.
|
||||||
|
`sprite_sheet.hpp` and `sprite_sheet.cpp` hold the `SpriteSheet` class, which inherits from `Image`. This class is a specialized image that displays an animated sprite sheet to the screen (an example of a sprite sheet is shown below). In order to display this sprite sheet's animation, the width and height of a single "cell" of animation must be passed to the constructor alongside the surface. An "interval" must be specified using `SpriteSheet::SetInterval(int)`, and a "delta" value (time since the last call) must be passed to `SpriteSheet::Update(int)`.
|
||||||
|
|
||||||
|
## Example Sprite Sheet
|
||||||
|
|
||||||
|

|
||||||
Reference in New Issue
Block a user