Claypool

Courses

Publications

Students

Projects

Service

Downloads

Misc


Dragonfly: ResourceManager Class Reference
Dragonfly 2.2
A text-based game engine
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions

ResourceManager Class Reference

Inheritance diagram for ResourceManager:
Manager

List of all members.

Public Member Functions

int loadSprite (string filename, string label)
 Load Sprite from file.
int unloadSprite (string label)
 Unload Sprite with indicated label.
Sprite * getSprite (string label)
 Find Sprite with indicated label.
int startUp ()
 Startup the Manager.
void shutDown ()
 Shutdown the Manager.

Static Public Member Functions

static ResourceManager & getInstance ()
 Get the one and only instance of the ResourceManager.

Protected Attributes

Sprite * sprite [MAX_SPRITES]
 Array of sprites.
int sprite_count
 Count of number of loaded sprites.

Private Member Functions

 ResourceManager (ResourceManager const &)
 Don't allow copy.
void operator= (ResourceManager const &)
 Don't allow assignment.
 ResourceManager ()
 Private since a singleton.

Member Function Documentation

Sprite* ResourceManager::getSprite ( string  label)

Find Sprite with indicated label.

Return pointer to it if found, else NULL.

int ResourceManager::loadSprite ( string  filename,
string  label 
)

Load Sprite from file.

Assign the indicated label to sprite. Return 0 if ok, else -1.

int ResourceManager::startUp ( ) [virtual]

Startup the Manager.

Return 0 if ok, else negative number.

Reimplemented from Manager.

int ResourceManager::unloadSprite ( string  label)

Unload Sprite with indicated label.

Return 0 if ok, else -1.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Friends