- Main Page
- Classes
- Files

- File List
- File Members

# C:/Users/Public/AGS Final Folder/BFLETCHER D4010283/Source/Game/Source/Visualisation.h

Go to the documentation of this file.

    00001 #ifndef _VISUALISATION_H_
    00002 #define _VISUALISATION_H_
    00003
    00004 #include "TSingleton.h"
    00005
    00006 #include <vector>
    00007 #include <string>
    00008
    00009 #include "Colour.h"
    00010
    00011 class Sprite;
    00012 struct SDL_Surface;
    00013 typedef unsigned int SpriteID;
    00014
    00015 class Visualisation : public TSingleton<Visualisation>
    00016 {
    00017         public:
    00018         Visualisation();
    00019         ~Visualisation();
    00020
    00021         void Initialise(const int &w, const int &h, const int &bpp);
    00022         void Shutdown();
    00023
    00024         SpriteID CreateSpriteBox(const unsigned int &w, const unsigned int &h, const ColourRGB &borderColour, const ColourRGB &fillColour, unsigned int borderSize = 1);
    00025         SpriteID CreateSpriteBall(const int &radius, const ColourRGB &centreColour, const ColourRGB &outerColour);
    00026         SpriteID CreateSpriteFromFile(char* filename);
    00027         SpriteID CreateSpriteStarryBackground(const unsigned int &w, const unsigned int &h, const unsigned int &numStars);
    00028         SpriteID CreateSpriteText(const std::string &message, const ColourRGB &colour);
    00029
    00030         void RemoveSprite(const SpriteID &id);
    00031
    00032         void DrawSprite(SpriteID id, const unsigned int &x, const unsigned int &y, unsigned int frame = 0);
    00033         void ClearScreen();
    00034
    00035         unsigned int GetSpriteWidth(const SpriteID &id);
    00036         unsigned int GetSpriteHeight(const SpriteID &id);
    00037
    00038         SDL_Surface* GetScreen() { return m_pScreen; }
    00039         ColourRGB GetTransparencyKey() { return m_transColourKey; }
    00040
    00041         private:
    00042         SDL_Surface* m_pScreen;
    00043         ColourRGB m_transColourKey;
    00044         std::vector<Sprite*> m_vSprites;
    00045         SpriteID m_lastUniqueID;
    00046
    00047         SpriteID m_clearBG;
    00048 };
    00049
    00050 #endif