Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

ZE Namespace Reference


Detailed Description

Namespace for ZEngine classes and utility functions.


Compounds

class  ZBaseParticle
 Basic particle class for ZEngine particle systems. More...

class  ZBaseParticleSystem
 Base particle system, a virtual class defining an outline for a fully functional particle system. More...

class  ZConfigFile
 ZConfigFile Class for use in ZEngine. More...

class  ZConfigFile::ZCF_Variable
 ZConfigFile Variable class. More...

class  ZConfigFile::ZCF_Section
 ZConfigFile Section class. More...

class  ZEngine
 Main ZEngine Singleton Class. More...

class  ZError
 ZError class for describing errors. More...

class  ZFont
 ZFont class for basic Font use. More...

class  ZImage
 ZImage class for basic Image use. More...

class  ZMusic
 ZMusic class for playing full length music (eg. ogg or wav). More...

class  ZRandGen
 ZRandGen class for OO encapsulation of superb random generator "Mersenne Twister.". More...

class  ZRect
 ZEngine class for simplified rectangle use. More...

class  ZSimpleParticle
 Simple particle class for ZSimpleParticleSystem. More...

class  ZSimpleParticleSystem
 ZSimpleParticleSystem class, a simple particle system provided originally as an example. More...

class  ZSound
 ZSound class for playing sound effects. (WAV). More...

class  ZTimer
 ZTimer class for Timer use. More...


Enumerations

enum  ZErrorCode {
  ZERR_NONE, ZERR_SDL_INTERNAL, ZERR_SDL_INIT, ZERR_MIX_INIT,
  ZERR_TTF_INIT, ZERR_VIDMODE, ZERR_LOAD_IMAGE, ZERR_LOAD_SOUND,
  ZERR_LOAD_MUSIC, ZERR_LOAD_FONT, ZERR_NOIMAGE, ZERR_NOSOUND,
  ZERR_NOMUSIC, ZERR_NOFONT, ZERR_LAST
}
 Enumeration of ZEngine error codes. More...

enum  ParticleDrawStyle { DS_POINT, DS_LINE, DS_IMAGE }
 Possible draw styles for ZSimpleParticleSystem. More...


Functions

std::string FormatStr (const char *fmtstr,...)
 Parses a std::string and interprets variable arguments, similar to sprintf.

SDL_RWops * RWFromZip (std::string zipname, std::string filename)
 Extracts a SDL_RWops memory structure from a zip archive.

void FreeImage (SDL_Surface *&image)
 Properly free SDL_Surface.

void FreeSound (Mix_Chunk *&chunk)
 Properly free Mix_Chunk.

void FreeMusic (Mix_Music *&music)
 Properly free Mix_Music.

void FreeFont (TTF_Font *&font)
 Properly free TTF_Font.


Enumeration Type Documentation

enum ZE::ZErrorCode
 

All the error codes currently possibly by ZEngine, note that ZERR_LAST is not used as an error code, but instead as a range check on the others.

Enumeration values:
ZERR_NONE  No error has occured.
ZERR_SDL_INTERNAL  Error internal to SDL has occured, usually more detail is given by SDL.
ZERR_SDL_INIT  Error Initializing SDL.
ZERR_MIX_INIT  Error Initializing SDL_mixer.
ZERR_TTF_INIT  Error Initializing SDL_ttf.
ZERR_VIDMODE  Error setting up the display.
ZERR_LOAD_IMAGE  Error loading an image.
ZERR_LOAD_SOUND  Error loading a sound sample.
ZERR_LOAD_MUSIC  Error loading music.
ZERR_LOAD_FONT  Error loading a font.
ZERR_NOIMAGE  Error trying to use a ZImage without properly loading an image.
ZERR_NOSOUND  Error trying to use a ZSound without properly loading a sound.
ZERR_NOMUSIC  Error trying to use a ZMusic without properly loading music.
ZERR_NOFONT  Error trying to use a ZFont without properly loading a font.
ZERR_LAST  Value used as range index, not a valid error code.

enum ZE::ParticleDrawStyle
 

Possible draw styles for ZSimpleParticleSystem, each specifies different code with which the particles will be drawn.

Enumeration values:
DS_POINT  Draw particles as simple points.
DS_LINE  Draw particles as lines between the current position and the last.
DS_IMAGE  Draw particles as an image.


Function Documentation

std::string ZE::FormatStr const char *  fmtstr,
... 
 

Takes identifiers out of fmtstr and parses them, replacing them with cooresponding values in the variable arguments list. For more detail view stdarg documentation.

Parameters:
fmtstr defines format of resulting std::string
... variable number of arguments after fmtstr
Returns:
std::string of parsed and combined std::string

SDL_RWops * ZE::RWFromZip std::string  zipname,
std::string  filename
 

Attempts to open a file from within a zipfile and return a SDL_RWops which can be used to load a resource from memory. Used by 'LoadFromZip' members of ZImage/ZSound/ZFont so generally not called.

Parameters:
zipname Name of zip-format archive to open.
filename Name of file within archive to access.
Returns:
On success, pointer to SDL_RWops, on failure, NULL.
Since:
0.8.5

void ZE::FreeImage SDL_Surface *&  image  ) 
 

Safely free an SDL_Surface* and set it to NULL.

Parameters:
image Image to free and set to NULL.

void FreeSound Mix_Chunk *&  chunk  ) 
 

Safely free a Mix_Chunk* and set it to NULL.

Parameters:
chunk Chunk to free and set to NULL.

void FreeMusic Mix_Music *&  music  ) 
 

Safely free a Mix_Music* and set it to NULL.

Parameters:
music Music to free and set to NULL.

void FreeFont TTF_Font *&  font  ) 
 

Safely free a TTF_Font* and set it to NULL.

Parameters:
font Font to free and set to NULL.


Generated on Sun Oct 5 19:34:45 2003 for ZEngine by doxygen1.3