SdlFileSurfacesInfo Class Reference
[SDL based classes]

Loads initialisation data for file-surfaces from a file. More...

#include <sdlfilesurfaces.h>

List of all members.

Public Member Functions

DECLSPEC bool load (const char *fn)
DECLSPEC bool save (const char *fn)
bool isLoaded ()
 
Returns:
true, if a file has been loaded, false otherwise

DECLSPEC const char * getBitmapFN () const
Uint32 getTransparentColor () const
DECLSPEC const SDL_Rect * getFirstRect ()
DECLSPEC const SDL_Rect * getNextRect ()
int numRects ()


Detailed Description

Loads initialisation data for file-surfaces from a file.

This class supports loading initialisation data from a text-based file and methods to get the data in the necessary type.

Todo:
improve, so that crashs are no more possible, also if the content of the file is really bad.
See also:
SdlFileSurfaces


Member Function Documentation

bool SdlFileSurfacesInfo::load ( const char *  fn  ) 

Loads the data from a text based file. If some data could not be read, it is not availible, though true is returned.

Parameters:
fn the filename, where to load from
Returns:
true, if file could be opened; false, if not

bool SdlFileSurfacesInfo::save ( const char *  fn  ) 

(Obsolete)
Save data in non text based format, which cannot be used for loading. So you should not need it.

Parameters:
fn the filename to save to
Returns:
true, if saving successful

const char * SdlFileSurfacesInfo::getBitmapFN (  )  const

Returns:
the filename information, where the image can be loaded from

Uint32 SdlFileSurfacesInfo::getTransparentColor (  )  const [inline]

Returns:
information of the color, which is fully transparent (the color key)

const SDL_Rect * SdlFileSurfacesInfo::getFirstRect (  ) 

Returns:
the first rect from the list of rects, that were read from the file. The iterator will be set to the first, to be able to get the next rect by calling getNextRect(). If no rect data could be read, NULL is returned.

const SDL_Rect * SdlFileSurfacesInfo::getNextRect (  ) 

Returns:
the next rect from the list of rects, that were read from the file. The iterator will be set to the next, to be able to get the next rect by calling the function again. If the iterator is at the end, NULL is returned.

int SdlFileSurfacesInfo::numRects (  )  [inline]

Returns:
the number of rects that are in the list.


The documentation for this class was generated from the following files:
Generated on Wed May 9 17:36:33 2007 for netrinjo by  doxygen 1.5.1