Headers/SpriteWorld.h File Reference

constants, structures, and function prototypes for sprite worlds More...

#include <SWCommonHeaders.h>
#include <SpriteLayer.h>
#include <SpriteFrame.h>
#include <Sprite.h>
#include "SpriteWorld.hpp"

Classes

struct  UpdateRectStruct
 delta update rect More...
struct  SpriteWorldRec
 sprite world data structure More...

Typedefs

typedef UpdateRectStruct UpdateRectStruct
typedef UpdateRectStructUpdateRectStructPtr
typedef void(* WorldMoveProcPtr )(SpriteWorldPtr spriteWorldP, SpritePtr followSpriteP)
typedef void(* CallBackPtr )(SpriteWorldPtr spriteWorldP)
typedef void(* GLCallBackPtr )(void *glContext)
typedef void(* CleanUpCallBackPtr )(void)
typedef void(* TileChangeProcPtr )(SpriteWorldPtr spriteWorldP)
typedef void(* TileRectDrawProcPtr )(SpriteWorldPtr spriteWorldP, SWRect *updateRectP, SWBoolean optimizingOn)
typedef void(* CustomTileDrawProcPtr )(SpriteWorldPtr srcSpriteWorldP, FramePtr srcFrameP, FramePtr dstFrameP, SWRect *srcRectP, SWRect *dstRectP, short tileLayer, short tileID, short curTileImage, SWBoolean useMask)

Functions

SWError SWEnterSpriteWorld (SWBoolean shouldInitSDL)
void SWExitSpriteWorld (void)
SWError SWCreateSpriteWorld (SpriteWorldPtr *spriteWorldPP, int w, int h, int depth, SWBoolean makeFullScreen, SWBoolean wantOpenGL)
SWError SWCreateSpriteWorldFromVideoSurface (SpriteWorldPtr *spriteWorldPP, SDL_Surface *videoSurfaceP, SWRect *worldRectP, SWRect *backRectP, int maxDepth)
SWError SWCreateSpriteWorldFromSWSurface (SpriteWorldPtr *spriteWorldPP, SDL_Surface *surfaceP, SWRect *worldRectP, SWRect *backRectP, int maxDepth)
SWError SWCreateSpriteWorldFromGLContext (SpriteWorldPtr *spriteWorldPP, void *glContext, SWRect *worldRectP, GLCallBackPtr glMakeCurrent, GLCallBackPtr glSwapBuffers)
SWError SWCreateSpriteWorldFromFrames (SpriteWorldPtr *spriteWorldP, FramePtr screenFrameP, FramePtr backFrameP, FramePtr workFrameP)
void SWDisposeSpriteWorld (SpriteWorldPtr *spriteWorldPP)
void SWAddSpriteLayer (SpriteWorldPtr spriteWorldP, SpriteLayerPtr newSpriteLayerP)
void SWRemoveSpriteLayer (SpriteWorldPtr spriteWorldP, SpriteLayerPtr oldSpriteLayerP)
void SWSwapSpriteLayer (SpriteWorldPtr spriteWorldP, SpriteLayerPtr srcSpriteLayerP, SpriteLayerPtr dstSpriteLayerP)
SpriteLayerPtr SWGetNextSpriteLayer (SpriteWorldPtr spriteWorldP, SpriteLayerPtr curSpriteLayerP)
DrawDataPtr SWCreateDrawData (void)
void SWLockSpriteWorld (SpriteWorldPtr spriteWorldP)
void SWUnlockSpriteWorld (SpriteWorldPtr spriteWorldP)
void SWSetPostEraseCallBack (SpriteWorldPtr spriteWorldP, CallBackPtr callBack)
void SWSetPostDrawCallBack (SpriteWorldPtr spriteWorldP, CallBackPtr callBack)
void SWSetSpriteWorldMaxFPS (SpriteWorldPtr spriteWorldP, short framesPerSec)
void SWSetSpriteWorldPseudoFPS (SpriteWorldPtr spriteWorldP, short framesPerSec)
void SWSetMinimumFrameRate (SpriteWorldPtr spriteWorldP, long minimumFrameRate)
void SWSetBackgroundColor (SpriteWorldPtr spriteWorldP, SDL_Color color)
void SWStdOffscreenDrawProc (FramePtr srcFrameP, FramePtr dstFrameP, SWRect *srcRect, SWRect *dstRect)
void SWStdScreenDrawProc (FramePtr srcFrameP, FramePtr dstFrameP, SWRect *srcRect, SWRect *dstRect)
void SWCopyBackgroundToWorkArea (SpriteWorldPtr spriteWorldP)
void SWUpdateSpriteWorld (SpriteWorldPtr spriteWorldP, int updateWindow)
void SWProcessSpriteWorld (SpriteWorldPtr spriteWorldP)
void SWProcessSpriteLayer (SpriteWorldPtr spriteWorldP, SpriteLayerPtr curSpriteLayerP)
void SWProcessNonScrollingLayers (SpriteWorldPtr spriteWorldP)
void SWAnimateSpriteWorld (SpriteWorldPtr spriteWorldP)
void SWCheckIdleSpriteOverlap (SpriteWorldPtr spriteWorldP, SpritePtr idleSpriteP, SpritePtr headActiveSpriteP)
void SWCollectIdleSpriteIntersectingRects (SWRect checkRect1, SWRect checkRect2, SWRect *enclosingRect)
void SWFindSpritesToBeRemoved (SpriteWorldPtr spriteWorldP)
SWError SWFlagRectAsChanged (SpriteWorldPtr spriteWorldP, SWRect *theChangedRect)
SWError SWMergeUpdateRect (SpriteWorldPtr spriteWorldP, SWRect theChangedRect, int *countP)
void SWRemoveUpdateRectStruct (SpriteWorldPtr spriteWorldP, UpdateRectStructPtr removeRect)
void SWResetMovementTimer (SpriteWorldPtr spriteWorldP)
short SWHasPseudoFrameFired (SpriteWorldPtr spriteWorldP)
float SWGetCurrentFPS (SpriteWorldPtr spriteWorldP)
void SWSetCleanUpSpriteWorld (SpriteWorldPtr spriteWorldP)
void SWSetCleanUpFunction (CleanUpCallBackPtr callBackP)
unsigned long SWGetSpriteWorldVersion (void)
short SWGetSpriteWorldPixelDepth (SpriteWorldPtr spriteWorldP)
unsigned long SWGetMilliseconds (SpriteWorldPtr spriteWorldP)
void SWClearStickyError (void)
SWError SWStickyError (void)
void SWSetStickyIfError (SWError errNum)
void SWAssertFail (char *filename, char *functionName, int lineNum)

Variables

DrawDataPtr gSWCurrentElementDrawData
SpriteWorldPtr gSWCurrentSpriteWorld
CleanUpCallBackPtr gSWCleanUpCallBackP
SpriteWorldPtr gSWCleanUpSpriteWorldP


Detailed Description

constants, structures, and function prototypes for sprite worlds


Typedef Documentation

typedef void(* CallBackPtr)(SpriteWorldPtr spriteWorldP)
 

typedef void(* CleanUpCallBackPtr)(void)
 

typedef void(* CustomTileDrawProcPtr)(SpriteWorldPtr srcSpriteWorldP, FramePtr srcFrameP, FramePtr dstFrameP, SWRect *srcRectP, SWRect *dstRectP, short tileLayer, short tileID, short curTileImage, SWBoolean useMask)
 

typedef void(* GLCallBackPtr)(void *glContext)
 

typedef void(* TileChangeProcPtr)(SpriteWorldPtr spriteWorldP)
 

typedef void(* TileRectDrawProcPtr)(SpriteWorldPtr spriteWorldP, SWRect *updateRectP, SWBoolean optimizingOn)
 

typedef struct UpdateRectStruct UpdateRectStruct
 

typedef UpdateRectStruct* UpdateRectStructPtr
 

typedef void(* WorldMoveProcPtr)(SpriteWorldPtr spriteWorldP, SpritePtr followSpriteP)
 


Function Documentation

void SWAddSpriteLayer SpriteWorldPtr  spriteWorldP,
SpriteLayerPtr  newSpriteLayerP
 

void SWAnimateSpriteWorld SpriteWorldPtr  spriteWorldP  ) 
 

void SWAssertFail char *  filename,
char *  functionName,
int  lineNum
 

void SWCheckIdleSpriteOverlap SpriteWorldPtr  spriteWorldP,
SpritePtr  idleSpriteP,
SpritePtr  headActiveSpriteP
 

void SWClearStickyError void   ) 
 

void SWCollectIdleSpriteIntersectingRects SWRect  checkRect1,
SWRect  checkRect2,
SWRect enclosingRect
 

void SWCopyBackgroundToWorkArea SpriteWorldPtr  spriteWorldP  ) 
 

DrawDataPtr SWCreateDrawData void   ) 
 

SWError SWCreateSpriteWorld SpriteWorldPtr spriteWorldPP,
int  w,
int  h,
int  depth,
SWBoolean  makeFullScreen,
SWBoolean  wantOpenGL
 

SWError SWCreateSpriteWorldFromFrames SpriteWorldPtr spriteWorldP,
FramePtr  screenFrameP,
FramePtr  backFrameP,
FramePtr  workFrameP
 

SWError SWCreateSpriteWorldFromGLContext SpriteWorldPtr spriteWorldPP,
void *  glContext,
SWRect worldRectP,
GLCallBackPtr  glMakeCurrent,
GLCallBackPtr  glSwapBuffers
 

SWError SWCreateSpriteWorldFromSWSurface SpriteWorldPtr spriteWorldPP,
SDL_Surface *  surfaceP,
SWRect worldRectP,
SWRect backRectP,
int  maxDepth
 

SWError SWCreateSpriteWorldFromVideoSurface SpriteWorldPtr spriteWorldPP,
SDL_Surface *  videoSurfaceP,
SWRect worldRectP,
SWRect backRectP,
int  maxDepth
 

void SWDisposeSpriteWorld SpriteWorldPtr spriteWorldPP  ) 
 

SWError SWEnterSpriteWorld SWBoolean  shouldInitSDL  ) 
 

void SWExitSpriteWorld void   ) 
 

void SWFindSpritesToBeRemoved SpriteWorldPtr  spriteWorldP  ) 
 

SWError SWFlagRectAsChanged SpriteWorldPtr  spriteWorldP,
SWRect theChangedRect
 

float SWGetCurrentFPS SpriteWorldPtr  spriteWorldP  ) 
 

unsigned long SWGetMilliseconds SpriteWorldPtr  spriteWorldP  ) 
 

SpriteLayerPtr SWGetNextSpriteLayer SpriteWorldPtr  spriteWorldP,
SpriteLayerPtr  curSpriteLayerP
 

short SWGetSpriteWorldPixelDepth SpriteWorldPtr  spriteWorldP  ) 
 

unsigned long SWGetSpriteWorldVersion void   ) 
 

short SWHasPseudoFrameFired SpriteWorldPtr  spriteWorldP  ) 
 

void SWLockSpriteWorld SpriteWorldPtr  spriteWorldP  ) 
 

SWError SWMergeUpdateRect SpriteWorldPtr  spriteWorldP,
SWRect  theChangedRect,
int *  countP
 

void SWProcessNonScrollingLayers SpriteWorldPtr  spriteWorldP  ) 
 

void SWProcessSpriteLayer SpriteWorldPtr  spriteWorldP,
SpriteLayerPtr  curSpriteLayerP
 

void SWProcessSpriteWorld SpriteWorldPtr  spriteWorldP  ) 
 

void SWRemoveSpriteLayer SpriteWorldPtr  spriteWorldP,
SpriteLayerPtr  oldSpriteLayerP
 

void SWRemoveUpdateRectStruct SpriteWorldPtr  spriteWorldP,
UpdateRectStructPtr  removeRect
 

void SWResetMovementTimer SpriteWorldPtr  spriteWorldP  ) 
 

void SWSetBackgroundColor SpriteWorldPtr  spriteWorldP,
SDL_Color  color
 

void SWSetCleanUpFunction CleanUpCallBackPtr  callBackP  ) 
 

void SWSetCleanUpSpriteWorld SpriteWorldPtr  spriteWorldP  ) 
 

void SWSetMinimumFrameRate SpriteWorldPtr  spriteWorldP,
long  minimumFrameRate
 

void SWSetPostDrawCallBack SpriteWorldPtr  spriteWorldP,
CallBackPtr  callBack
 

void SWSetPostEraseCallBack SpriteWorldPtr  spriteWorldP,
CallBackPtr  callBack
 

void SWSetSpriteWorldMaxFPS SpriteWorldPtr  spriteWorldP,
short  framesPerSec
 

void SWSetSpriteWorldPseudoFPS SpriteWorldPtr  spriteWorldP,
short  framesPerSec
 

void SWSetStickyIfError SWError  errNum  ) 
 

void SWStdOffscreenDrawProc FramePtr  srcFrameP,
FramePtr  dstFrameP,
SWRect srcRect,
SWRect dstRect
 

void SWStdScreenDrawProc FramePtr  srcFrameP,
FramePtr  dstFrameP,
SWRect srcRect,
SWRect dstRect
 

SWError SWStickyError void   ) 
 

void SWSwapSpriteLayer SpriteWorldPtr  spriteWorldP,
SpriteLayerPtr  srcSpriteLayerP,
SpriteLayerPtr  dstSpriteLayerP
 

void SWUnlockSpriteWorld SpriteWorldPtr  spriteWorldP  ) 
 

void SWUpdateSpriteWorld SpriteWorldPtr  spriteWorldP,
int  updateWindow
 


Variable Documentation

CleanUpCallBackPtr gSWCleanUpCallBackP
 

SpriteWorldPtr gSWCleanUpSpriteWorldP
 

DrawDataPtr gSWCurrentElementDrawData
 

SpriteWorldPtr gSWCurrentSpriteWorld
 


Generated on Sun Jun 18 14:11:04 2006 for SpriteWorld X by  doxygen 1.4.6