Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

CSprite Class Reference

The sprites base class. More...

#include <SpriteManager.h>

Inheritance diagram for CSprite:

Inheritance graph
[legend]
Collaboration diagram for CSprite:

Collaboration graph
[legend]
List of all members.

Protected Types

enum  _spt_type { tBackground, tEntity, tMask }
 Enumaration of all sprite types. More...


Protected Methods

bool Load (CString &sFile)
 Reads the object from the disk.

bool Save (CString &sFile)
 Reads the object from the disk.


Protected Attributes

enum CSprite::_spt_type m_SptType
 Enumaration of all sprite types. Current sprite type.

CSpriteSheetm_pSpriteSheet
 Pointer to the sprites sheet that contains this sprite.

CString m_sSpriteName
 Contains the current name of the sprite.

CRect m_rcBoundaries
 Boundaries box of the sprite.


Detailed Description

The sprites base class.

Author:
Kronuz
Version:
1.0
Date:
April 15, 2003
CSprite class provides the base functionality of all sprites on the game, including visible (such as CBackground) and invisible (as CMaskMap) sprites. This class maintains all the sprite properties as single sprites, whether they are entities, background sprites or mask maps.
This class does NOT give any information about the sprite in the map or its actual status. For real sprites on the map, giving information about its state, location and other details, refer to CEntityI or CBackgroundI class.

See also:
CBackground, CEntity and CMaskMap
Todo:
Write the implementation of this class.

Definition at line 135 of file SpriteManager.h.


Member Enumeration Documentation

enum CSprite::_spt_type [protected]
 

Enumaration of all sprite types.

Background, Entity and Mask are be mutually exclusive, and all sprites(except for the entities) are tiles.
Generally, all sprites are marked as background, which just means that the sprite is visible, but not an entity.
Sprites that are entities, in addition to being visible, also have a script and they represent an actual entity in the world.
Masks have the job of creating collision maps for the entities in the game.

Collision maps are generally defined inside the scripts for the entities, and masks are most useful for background sprites.

Enumeration values:
tBackground  Indicates a background sprite.
tEntity  Indicates an entity sprite.
tMask  Indicates a mask sprite (or Mask map).

Definition at line 156 of file SpriteManager.h.


Member Function Documentation

bool CSprite::Load CString &    sFile [inline, protected, virtual]
 

Reads the object from the disk.

Loads or reads the object from the disk. This method fills all necesary information and attributes from the object in a file

See also:
Save()

Implements IIOObject.

Definition at line 140 of file SpriteManager.h.

bool CSprite::Save CString &    sFile [inline, protected, virtual]
 

Reads the object from the disk.

Saves or writes the object to the disk. This method takes all necesary information and attributes from the object and put them in the file for latter load and use of the object.

See also:
Load()

Implements IIOObject.

Definition at line 141 of file SpriteManager.h.


Member Data Documentation

CSpriteSheet* CSprite::m_pSpriteSheet [protected]
 

Pointer to the sprites sheet that contains this sprite.

This can never be a NULL, since every animation belongs to a sprite sheet (and to only one).

Definition at line 172 of file SpriteManager.h.

CRect CSprite::m_rcBoundaries [protected]
 

Boundaries box of the sprite.

This represents the possition and size of the sprite in the sprite sheet. All values must be valid and within the sprite sheet image file boundaries.

Definition at line 184 of file SpriteManager.h.

enum CSprite::_spt_type CSprite::m_SptType [protected]
 

Enumaration of all sprite types. Current sprite type.

Sprites marked as background or entities are supposed to be visible in the map editor whilst masked sprites (or maps) are just noticable during the game, but not visibles.
In a mask, the black color is impenetrable and different shades of red slow down the character (the closer it gets to the red, the faster the entities can move, but always slower than the normal speed of the entity). Green zones on the mask represent no obstacle thus this areas do not slow down nor stop the entity from passing.

CString CSprite::m_sSpriteName [protected]
 

Contains the current name of the sprite.

Every sprite must have a name, and the names can never be the same, they are unique and represent a sole sprite in the full game.

Definition at line 178 of file SpriteManager.h.


The documentation for this class was generated from the following file:
Generated on Wed Apr 16 19:12:28 2003 for QuestDesigner by doxygen1.2.18