Classes | Enumerations | Functions

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  SoundClipPool
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  ITriggerController
class  ITriggerListener
class  Trigger
class  OpenGLGuiGraphics
class  SdlGuiGraphics
class  CommandLine
class  ConsoleExecuter
class  Console
class  ImageLoader
class  SubImageLoader
class  Object
class  TimeProvider
class  Model
class  Instance
class  LayerChangeListener
class  Layer
class  MapChangeListener
class  Map
class  RoutePatherSearch
class  Exception
class  FifeClass
class  ResourceClass
class  StaticSingleton
class  DynamicSingleton
class  LMsg
class  LogManager
class  Logger
struct  pprint
class  Matrix
class  Pool
class  IResource
class  ResourceLoader
class  ResourceSaver
class  ResourceLocation
class  ResourcePtr
class  PointType2D
class  PointType3D
class  PriorityQueue
class  QuadNode
class  QuadTree
class  Rect
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  AnimationPool
class  Cursor
class  AbstractFont
class  FontBase
class  ImageFontBase
class  SubImageFont
class  TextRenderPool
class  TrueTypeFont
class  Image
class  ImageLocation
class  ImagePool
class  GLImage
class  RenderBackendOpenGL
class  RenderBackend
class  RenderBackendSDL
class  SDLImage
class  Camera
class  IRendererListener
class  IRendererContainer
class  RendererBase
class  CellSelectionRenderer
class  Visual2DGfx
class  ObjectVisual
class  InstanceVisualCacheItem
class  InstanceVisual
class  ActionVisual

Enumerations

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

Functions

unsigned int scaleTime (float multiplier, unsigned int ticks)
std::ostream & operator<< (std::ostream &os, const Location &l)
 FIFE_EXCEPTION_DECL (OutOfMemory,"Buy more ram ;)")
int getIndexByAngle (int angle, const type_angle2id &angle2id, int &closestMatchingAngle)
int getAngleBetween (const Location &loc1, const Location &loc2)
template<typename T >
std::ostream & operator<< (std::ostream &os, 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)
std::ostream & operator<< (std::ostream &os, const Rect &r)
void SDL_BlendRow_RGBA8_to_RGBA8 (const unsigned char *src, unsigned char *dst, unsigned int alpha, int n)
void SDL_BlendRow_RGBA8_to_RGB8 (const unsigned char *src, unsigned char *dst, unsigned int alpha, int n)
void SDL_BlendRow_RGBA8_to_RGB565 (const unsigned char *src, unsigned char *dst, unsigned int alpha, int n)
void SDL_BlendRow_RGBA4_to_RGB565 (const unsigned char *src, unsigned char *dst, unsigned int alpha, int 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 56 of file layer.h.

Different types of audio-file positions

Definition at line 44 of file soundclip.h.


Function Documentation

Point FIFE::doublePt2intPt ( DoublePoint  pt  )  [inline]

Convert from 2D double point to 2D int point

Definition at line 240 of file point.h.

Point3D FIFE::doublePt2intPt ( DoublePoint3D  pt  )  [inline]

Convert from 3D double point to 3D int point

Definition at line 247 of file point.h.

FIFE::FIFE_EXCEPTION_DECL ( OutOfMemory  ,
"Buy more ram ;   
)
Bug:
The memory allocation in std::string might fail, resulting in terminate.
int 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.

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

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

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

Here is the caller graph for this function:

DoublePoint FIFE::intPt2doublePt ( Point  pt  )  [inline]

Convert from 2D int point to 2D double point

Definition at line 254 of file point.h.

DoublePoint3D FIFE::intPt2doublePt ( Point3D  pt  )  [inline]

Convert from 3D int point to 3D double point

Definition at line 261 of file point.h.

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

Print coords of the Matrix to a stream

Definition at line 376 of file matrix.h.

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 132 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 231 of file point.h.

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

Stream output operator.

Useful for debugging purposes

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

Stream output operator.

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

unsigned int FIFE::scaleTime ( float  multiplier,
unsigned int  ticks 
)

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

Returns:
multiplier * ticks
void FIFE::SDL_BlendRow_RGBA4_to_RGB565 ( const unsigned char *  src,
unsigned char *  dst,
unsigned int  alpha,
int  n 
)

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

Parameters:
src Source.
dst Destiny.
alpha Level of alphablending.
n Number of pixels.

< upgrade to range 0-255

multiplying by alpha resulted in shift.

void FIFE::SDL_BlendRow_RGBA8_to_RGB565 ( const unsigned char *  src,
unsigned char *  dst,
unsigned int  alpha,
int  n 
)

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

Parameters:
src Source.
dst Destiny.
alpha Level of alphablending.
n Number of pixels.
void FIFE::SDL_BlendRow_RGBA8_to_RGB8 ( const unsigned char *  src,
unsigned char *  dst,
unsigned int  alpha,
int  n 
)

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

Parameters:
src Source.
dst Destiny.
alpha Level of alphablending.
n Number of pixels.
void FIFE::SDL_BlendRow_RGBA8_to_RGBA8 ( const unsigned char *  src,
unsigned char *  dst,
unsigned int  alpha,
int  n 
)

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

Parameters:
src Source.
dst Destiny.
alpha Level of alphablending.
n Number of pixels.