From b5716d8b731875a5e023eded7d94f4fdaf7a2add Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Wed, 22 May 2013 01:26:34 +1000 Subject: [PATCH] Imported the graphics page --- Graphics-System.md | 18 ------------------ Graphics.md | 19 +++++++++++++++++++ Home.md | 2 +- 3 files changed, 20 insertions(+), 19 deletions(-) delete mode 100644 Graphics-System.md create mode 100644 Graphics.md diff --git a/Graphics-System.md b/Graphics-System.md deleted file mode 100644 index 412a698..0000000 --- a/Graphics-System.md +++ /dev/null @@ -1,18 +0,0 @@ -The graphics system is designed to be resource-efficient. It's made up of the following files: - -* [surface_manager.hpp](https://github.com/Ratstail91/Tortuga/blob/master/client/surface_manager.hpp) -* [surface_manager.cpp](https://github.com/Ratstail91/Tortuga/blob/master/client/surface_manager.cpp) -* [image.hpp](https://github.com/Ratstail91/Tortuga/blob/master/client/image.hpp) -* [image.cpp](https://github.com/Ratstail91/Tortuga/blob/master/client/image.cpp) -* [sprite_sheet.hpp](https://github.com/Ratstail91/Tortuga/blob/master/client/sprite_sheet.hpp) -* [sprite_sheet.cpp](https://github.com/Ratstail91/Tortuga/blob/master/client/sprite_sheet.cpp) - -## 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 - -![aniflower](http://art.devsader.com/content/contributions/sprites/Elliot_Moosader.png) \ No newline at end of file diff --git a/Graphics.md b/Graphics.md new file mode 100644 index 0000000..372fb28 --- /dev/null +++ b/Graphics.md @@ -0,0 +1,19 @@ +_This page was copied from the [Codebase wiki](https://github.com/Ratstail91/Codebase/wiki/Graphics)._ + +The graphics systems are designed to be resource-efficient. They're made up of the following files: + +* [surface_manager.hpp](https://github.com/Ratstail91/Codebase/blob/master/graphics/surface_manager.hpp) +* [surface_manager.cpp](https://github.com/Ratstail91/Codebase/blob/master/graphics/surface_manager.cpp) +* [image.hpp](https://github.com/Ratstail91/Codebase/blob/master/graphics/image.hpp) +* [image.cpp](https://github.com/Ratstail91/Codebase/blob/master/graphics/image.cpp) +* [sprite_sheet.hpp](https://github.com/Ratstail91/Codebase/blob/master/graphics/sprite_sheet.hpp) +* [sprite_sheet.cpp](https://github.com/Ratstail91/Codebase/blob/master/graphics/sprite_sheet.cpp) +* [raster_font.hpp](https://github.com/Ratstail91/Codebase/blob/master/graphics/raster_font.hpp) +* [raster_font.cpp](https://github.com/Ratstail91/Codebase/blob/master/graphics/raster_font.cpp) + +## 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. 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. In order to display this sprite sheet's animation, the width and height of a single "cell" of animation must be passed to the object alongside the surface. An "interval" must be specified using `SpriteSheet::SetInterval(int)`, and the delta time (time since the last call) must be passed to `SpriteSheet::Update(int)`. +`raster_font.hpp` and `raster_font.cpp` hold the `RasterFont` class, which inherits from `Image`. This class is used to draw text to the screen, using a specialized rasterized font surface. \ No newline at end of file diff --git a/Home.md b/Home.md index b659c57..9fdcf0b 100644 --- a/Home.md +++ b/Home.md @@ -9,7 +9,7 @@ This guide should help you to understand this project, as well as helping me to ## The Client * [Scene Framework](wiki/Scene-Framework) -* [Graphics System](wiki/Graphics-System) +* [Graphics](wiki/Graphics) * Player System (WIP) ## The Server