FIFE  2008.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
FIFE Namespace Reference

credit to phoku for his NodeDisplay example which the visitor code is adapted from ( he coded the quadtree after all ) More...

Classes

class  SoundClip
class  SoundClipManager
class  SoundEmitter
class  Engine
class  EngineSettings
class  Event
class  InputEvent
class  Command
class  ICommandController
class  ICommandListener
class  EventManager
class  IKeyController
class  IKeyFilter
class  IKeyListener
class  Key
class  KeyEvent
class  IMouseController
class  IMouseListener
class  MouseEvent
class  ISdlEventController
class  ISdlEventListener
class  IEventSource
class  OpenGLGuiGraphics
class  OpenGLeGuiGraphics
class  SdlGuiGraphics
class  CommandLine
class  ConsoleExecuter
class  Console
class  IMapLoader
class  IObjectLoader
class  ImageLoader
class  Object
class  TimeProvider
class  Model
class  Instance
class  LayerChangeListener
class  Layer
class  MapChangeListener
class  Map
class  RoutePatherSearch
class  IMapSaver
class  IObjectSaver
class  MapSaver
class  Exception
class  FifeClass
class  SharedPtr
class  StaticSingleton
class  DynamicSingleton
class  LMsg
class  LogManager
class  Logger
struct  pprint
class  Matrix
class  IResourceManager
class  PointType2D
class  PointType3D
class  PriorityQueue
class  QuadNode
class  QuadTree
class  RectType
class  TimeEvent
class  TimeManager
class  DAT1
class  DAT2
class  LZSSDecoder
class  RawDataDAT1
class  RawDataDAT2
class  DirectoryProvider
class  RawData
class  RawDataFile
class  RawDataMemSource
class  RawDataSource
class  VFS
class  VFSDirectory
class  VFSSource
class  VFSSourceProvider
class  ZipProvider
class  ZipSource
class  Animation
class  Cursor
class  FontBase
class  IFont
class  ImageFontBase
class  SubImageFont
class  TextRenderPool
class  TrueTypeFont
class  Image
class  ImageManager
class  GLImage
class  RenderBackendOpenGL
class  GLeImage
class  RenderBackendOpenGLe
class  RenderBackend
class  RenderBackendSDL
class  SDLImage
class  Camera
class  IRendererListener
class  IRendererContainer
class  RendererBase
class  CellSelectionRenderer
class  Visual2DGfx
class  ObjectVisual
class  InstanceVisual
class  ActionVisual

Enumerations

enum  SoundPositionType
enum  CommandType
enum  EventSourceType
enum  PathingStrategy
enum  MouseCursorType
enum  NativeCursor

Functions

AtlasLoader * createDefaultAtlasLoader (Model *model, VFS *vfs, ImageManager *imageManager)
MapLoader * createDefaultMapLoader (Model *model, VFS *vfs, ImageManager *imageManager, RenderBackend *renderBackend)
uint32_t scaleTime (float multiplier, uint32_t ticks)
std::ostream & operator<< (std::ostream &os, const Location &l)
 FIFE_EXCEPTION_DECL (OutOfMemory,"Buy more ram ;)")
template<typename T , typename U >
bool operator== (const SharedPtr< T > &lhs, const SharedPtr< U > &rhs)
template<typename T , typename U >
bool operator!= (const SharedPtr< T > &lhs, const SharedPtr< U > &rhs)
template<class T , class U >
bool operator< (SharedPtr< T > const &lhs, SharedPtr< U > const &rhs)
template<typename T >
SharedPtr< T > make_shared (T *ptr)
int32_t getIndexByAngle (int32_t angle, const type_angle2id &angle2id, int32_t &closestMatchingAngle)
int32_t getAngleBetween (const Location &loc1, const Location &loc2)
unsigned nextPow2 (unsigned x)
template<typename T >
std::ostream & operator<< (std::ostream &os, const Matrix< T > &m)
template<typename T >
std::ostream & operator<< (std::ostream &os, const PointType2D< T > &p)
template<typename T >
std::ostream & operator<< (std::ostream &os, const PointType3D< T > &p)
Point doublePt2intPt (DoublePoint pt)
Point3D doublePt2intPt (DoublePoint3D pt)
DoublePoint intPt2doublePt (Point pt)
DoublePoint3D intPt2doublePt (Point3D pt)
template<typename T >
std::ostream & operator<< (std::ostream &os, const RectType< T > &r)
bfs::path GetParentPath (const bfs::path &path)
std::string GetFilenameFromPath (const bfs::path &path)
std::string GetFilenameFromDirectoryIterator (const bfs::directory_iterator &iter)
std::string GetPathIteratorAsString (const bfs::path::iterator &pathIter)
bfs::path GetAbsolutePath (const std::string &path)
bfs::path GetAbsolutePath (const bfs::path &path)
bool HasExtension (const std::string &path)
bool HasExtension (const bfs::path &path)
std::string GetExtension (const std::string &path)
std::string GetExtension (const bfs::path &path)
std::string GetStem (const std::string &path)
std::string GetStem (const bfs::path &path)
void SDL_BlendRow_RGBA8_to_RGBA8 (const uint8_t *src, uint8_t *dst, uint32_t alpha, int32_t n)
void SDL_BlendRow_RGBA8_to_RGB8 (const uint8_t *src, uint8_t *dst, uint32_t alpha, int32_t n)
void SDL_BlendRow_RGBA8_to_RGB565 (const uint8_t *src, uint8_t *dst, uint32_t alpha, int32_t n)
void SDL_BlendRow_RGBA4_to_RGB565 (const uint8_t *src, uint8_t *dst, uint32_t alpha, int32_t n)

Detailed Description

credit to phoku for his NodeDisplay example which the visitor code is adapted from ( he coded the quadtree after all )

Enumeration Type Documentation

Types for different commands

Definition at line 40 of file ec_commandids.h.

Types for different event sources

Definition at line 41 of file ec_eventsourcetypes.h.

Defines the type of shown cursor native -> default cursor image -> cursor from image pool animation -> cursor from animation pool

Definition at line 48 of file cursor.h.

Defines some common native cursors between platforms. In addition to these, you can use the values in: Windows: http://msdn.microsoft.com/en-us/library/ms648391(VS.85).aspx X11: http://fife.pastebin.com/f5b89dd6b

Definition at line 60 of file cursor.h.

Defines how pathing can be performed on this layer

CELL_EDGES_ONLY allows pather to use only cell edges when moving instances from cell to cell on map CELL_EDGES_AND_DIAGONALS allows pather to use both cell edges and diagonals when moving instances from cell to cell on map FREEFORM allows pather to find shortest route regardless of cellgrid used on the layer

Definition at line 58 of file layer.h.

Different types of audio-file positions

Definition at line 44 of file soundclip.h.

Function Documentation

AtlasLoader * FIFE::createDefaultAtlasLoader ( Model *  model,
VFS *  vfs,
ImageManager *  imageManager 
)

convenience function for creating the default fife atlas loader deleting the object returned from this function is the responsibility of the caller

Definition at line 385 of file atlasloader.cpp.

References createDefaultAtlasLoader().

Referenced by createDefaultAtlasLoader().

Here is the caller graph for this function:

MapLoader * FIFE::createDefaultMapLoader ( Model *  model,
VFS *  vfs,
ImageManager *  imageManager,
RenderBackend *  renderBackend 
)

convenience function for creating the default fife map loader deleting the object returned from this function is the responsibility of the caller

Definition at line 585 of file maploader.cpp.

Point FIFE::doublePt2intPt ( DoublePoint  pt)
inline

Convert from 2D double point to 2D int32_t point

Definition at line 329 of file point.h.

Referenced by FIFE::Camera::toScreenCoordinates().

Here is the caller graph for this function:

Point3D FIFE::doublePt2intPt ( DoublePoint3D  pt)
inline

Convert from 3D double point to 3D int32_t point

Definition at line 336 of file point.h.

FIFE::FIFE_EXCEPTION_DECL ( OutOfMemory  ,
"Buy more ram ;   
)
Bug:
The memory allocation in std::string might fail, resulting in terminate.
bfs::path FIFE::GetAbsolutePath ( const std::string &  path)

Helper function to retrieve an absolute path from a given relative path

Parameters
std::stringobject
Returns
a boost filesystem path object

Definition at line 150 of file fife_boost_filesystem.cpp.

bfs::path FIFE::GetAbsolutePath ( const bfs::path &  path)

Helper function to retrieve an absolute path from a given relative path

Parameters
boostfilesystem path object
Returns
a boost filesystem path object

Definition at line 154 of file fife_boost_filesystem.cpp.

int32_t FIFE::getAngleBetween ( const Location &  loc1,
const Location &  loc2 
)
inline

Gets angle of vector defined by given locations

Returns
angle in polar coordinates between the line defined by the two locations and the horizontal axis (East <-> West)

Definition at line 48 of file angles.h.

std::string FIFE::GetExtension ( const std::string &  path)

Helper function to retrieve the extension

Note
the extension includes the "."
Parameters
paththe input path string
Returns
the extension on the input path

Definition at line 184 of file fife_boost_filesystem.cpp.

Referenced by HasExtension().

Here is the caller graph for this function:

std::string FIFE::GetExtension ( const bfs::path &  path)

Helper function to retrieve the extension

Note
the extension includes the "."
Parameters
paththe input path object
Returns
the extension on the input path

Definition at line 188 of file fife_boost_filesystem.cpp.

std::string FIFE::GetFilenameFromDirectoryIterator ( const bfs::directory_iterator &  iter)

Helper function to retrieve a filename string from a directory iterator

Parameters
boostfilesystem directory_iterator object
Returns
a filename string

Definition at line 107 of file fife_boost_filesystem.cpp.

std::string FIFE::GetFilenameFromPath ( const bfs::path &  path)

Helper function to retrieve the filename from a boost filesystem path filename is just the name of the file and any extension without a path

Parameters
boostfilesystem path object
Returns
filename string

Definition at line 87 of file fife_boost_filesystem.cpp.

int32_t FIFE::getIndexByAngle ( int32_t  angle,
const type_angle2id &  angle2id,
int32_t &  closestMatchingAngle 
)

Returns id for given angle from angle2id map in case there are no elements in the map, negative value is returned

Definition at line 34 of file angles.cpp.

Referenced by FIFE::ActionVisual::getAnimationByAngle(), FIFE::ObjectVisual::getClosestMatchingAngle(), and FIFE::ObjectVisual::getStaticImageIndexByAngle().

Here is the caller graph for this function:

bfs::path FIFE::GetParentPath ( const bfs::path &  path)

Helper function to retrieve a parent path object from a path object

Parameters
boostfilesystem path object
Returns
a path object with parent of passed in parameter

Definition at line 79 of file fife_boost_filesystem.cpp.

std::string FIFE::GetPathIteratorAsString ( const bfs::path::iterator &  pathIter)

Helper function to retrieve the path iterator in a string representation

Parameters
pathIterthe iterator to get the string from
Returns
a string representing the value in the path iterator

Definition at line 134 of file fife_boost_filesystem.cpp.

std::string FIFE::GetStem ( const std::string &  path)

Helper function to retrieve the filename minus any extension

Note
the "." is NOT included
Parameters
paththe input path string
Returns
the filename minus any extension

Definition at line 196 of file fife_boost_filesystem.cpp.

std::string FIFE::GetStem ( const bfs::path &  path)

Helper function to retrieve the filename minus any extension

Note
the "." is NOT included
Parameters
paththe input path object
Returns
the filename minus any extension

Definition at line 200 of file fife_boost_filesystem.cpp.

References HasExtension().

bool FIFE::HasExtension ( const std::string &  path)

Helper function to check if a filename has an extension

Parameters
boostfilesystem path object
Returns
true if filename has extension, false if not

Definition at line 162 of file fife_boost_filesystem.cpp.

Referenced by GetStem().

Here is the caller graph for this function:

bool FIFE::HasExtension ( const bfs::path &  path)

Helper function to check if a filename has an extension

Parameters
boostfilesystem path object
Returns
true if filename has extension, false if not

Definition at line 166 of file fife_boost_filesystem.cpp.

References GetExtension().

DoublePoint FIFE::intPt2doublePt ( Point  pt)
inline

Convert from 2D int32_t point to 2D double point

Definition at line 343 of file point.h.

Referenced by FIFE::Camera::toMapCoordinates().

Here is the caller graph for this function:

DoublePoint3D FIFE::intPt2doublePt ( Point3D  pt)
inline

Convert from 3D int32_t point to 3D double point

Definition at line 350 of file point.h.

template<typename T >
SharedPtr<T> FIFE::make_shared ( T *  ptr)

convenience function for making a shared pointer can be used anytime a shared pointer should be created

Definition at line 275 of file sharedptr.h.

unsigned FIFE::nextPow2 ( unsigned  x)
inline

Returns the next higher power of 2 based on the passed argument

Definition at line 292 of file fife_math.h.

template<typename T , typename U >
bool FIFE::operator!= ( const SharedPtr< T > &  lhs,
const SharedPtr< U > &  rhs 
)
inline

provides inequality operator for shared pointers

Definition at line 260 of file sharedptr.h.

References FIFE::SharedPtr< T >::get().

template<class T , class U >
bool FIFE::operator< ( SharedPtr< T > const &  lhs,
SharedPtr< U > const &  rhs 
)
inline

provides less than operator for shared pointers

Definition at line 267 of file sharedptr.h.

template<typename T >
std::ostream& FIFE::operator<< ( std::ostream &  os,
const RectType< T > &  r 
)

Stream output operator.

Useful for debugging purposes, this will output the coordinates of the rectangle to the stream.

Definition at line 160 of file rect.h.

std::ostream & FIFE::operator<< ( std::ostream &  ,
const Location &   
)

Stream output operator.

Useful for debugging purposes

Definition at line 164 of file location.cpp.

template<typename T >
std::ostream& FIFE::operator<< ( std::ostream &  os,
const PointType2D< T > &  p 
)

Print coords of the Point to a stream

Definition at line 190 of file point.h.

template<typename T >
std::ostream& FIFE::operator<< ( std::ostream &  os,
const PointType3D< T > &  p 
)

Print coords of the Point to a stream

Definition at line 320 of file point.h.

template<typename T >
std::ostream& FIFE::operator<< ( std::ostream &  os,
const Matrix< T > &  m 
)

Print coords of the Matrix to a stream

Definition at line 381 of file matrix.h.

template<typename T , typename U >
bool FIFE::operator== ( const SharedPtr< T > &  lhs,
const SharedPtr< U > &  rhs 
)
inline

provides equality operator for shared pointers

Definition at line 253 of file sharedptr.h.

References FIFE::SharedPtr< T >::get().

uint32_t FIFE::scaleTime ( float  multiplier,
uint32_t  ticks 
)

Utility function to calculate time scaling. Mostly done to avoid littering other code with related casting

Returns
multiplier * ticks

Definition at line 73 of file timeprovider.cpp.

void FIFE::SDL_BlendRow_RGBA4_to_RGB565 ( const uint8_t *  src,
uint8_t *  dst,
uint32_t  alpha,
int32_t  n 
)

Blends one row of n pixels from src with n pixels of dst.

Parameters
srcSource.
dstDestiny.
alphaLevel of alphablending.
nNumber of pixels.

< upgrade to range 0-255

multiplying by alpha resulted in shift.

Definition at line 102 of file sdlblendingfunctions.cpp.

void FIFE::SDL_BlendRow_RGBA8_to_RGB565 ( const uint8_t *  src,
uint8_t *  dst,
uint32_t  alpha,
int32_t  n 
)

Blends one row of n pixels from src with n pixels of dst.

Parameters
srcSource.
dstDestiny.
alphaLevel of alphablending.
nNumber of pixels.

Definition at line 79 of file sdlblendingfunctions.cpp.

void FIFE::SDL_BlendRow_RGBA8_to_RGB8 ( const uint8_t *  src,
uint8_t *  dst,
uint32_t  alpha,
int32_t  n 
)

Blends one row of n pixels from src with n pixels of dst.

Parameters
srcSource.
dstDestiny.
alphaLevel of alphablending.
nNumber of pixels.

Definition at line 61 of file sdlblendingfunctions.cpp.

void FIFE::SDL_BlendRow_RGBA8_to_RGBA8 ( const uint8_t *  src,
uint8_t *  dst,
uint32_t  alpha,
int32_t  n 
)

Blends one row of n pixels from src with n pixels of dst.

Parameters
srcSource.
dstDestiny.
alphaLevel of alphablending.
nNumber of pixels.

Definition at line 42 of file sdlblendingfunctions.cpp.