|
Classes |
| struct | SWPoint |
| | a Point (h,v) More...
|
| struct | SWRect |
| | a Rect (l,t,r,b) More...
|
| struct | SWRGBColor |
| | a Color (r,g,b) More...
|
| struct | DrawDataRec |
| | Draw data structure. More...
|
| class | TError |
| | CLASS TError, wrapping SWError. More...
|
Defines |
| #define | SW_DEBUG 0 |
| | Change this to 1 for debugging builds. [use 1/0, not true/false].
|
| #define | SW_ASSERT_ON 1 |
| | Change this to 0 to turn assertions off. [use 1/0, not true/false].
|
| #define | SW_NAMESPACE_BEGIN |
| #define | SW_NAMESPACE_END |
| #define | SW_FUNC |
| | Used for setting linking type.
|
| #define | SW_ASSERT(condition) |
| #define | SW_UNUSED(var) (void) var |
| | Avoids warnings, for unused parameters.
|
| #define | SW_ABS(x) ((x) < (0) ? -(x) : (x)) |
| #define | SW_MIN(a, b) ((a) < (b) ? (a) : (b)) |
| #define | SW_MAX(a, b) ((a) > (b) ? (a) : (b)) |
| #define | SW_RECT_WIDTH(r) ((r).right - (r).left) |
| #define | SW_RECT_HEIGHT(r) ((r).bottom - (r).top) |
| #define | SW_TOP_LEFT(r) (((SWPoint *) &(r))[0]) |
| #define | SW_BOT_RIGHT(r) (((SWPoint *) &(r))[1]) |
| #define | SW_SET_RECT(theRect, myleft, mytop, myright, mybottom) |
| | Set the fields of the struct (beware of macro side effects).
|
| #define | SW_CONVERT_SW_TO_SDL_RECT(swRect, sdlRect) |
| | Convert SW to SDL rect (beware of macro side effects).
|
| #define | SW_CONVERT_SDL_TO_SW_RECT(sdlRect, swRect) |
| | Convert SDL to SW rect (beware of macro side effects).
|
| #define | SW_OFFSET_RECT(theRect, deltaH, deltaV) |
| | Offset the fields of the struct (beware of macro side effects).
|
| #define | SW_CENTER_RECT(centerThis, insideThis) |
| | Centers one rect inside another.
|
| #define | SW_INSET_RECT(theRect, insetX, insetY) |
| | Offset the fields of the struct (beware of macro side effects).
|
| #define | SW_POINT_IS_IN_RECT(x, y, rect) |
| | Checks whether x,y is inside rect.
|
| #define | SW_RECT_IS_IN_RECT(rectA, rectB) |
| | Checks whether rectA is inside rectB.
|
| #define | SW_CLIP_RECT(rectA, rectB) |
| | Clips rectA with rectB.
|
| #define | SW_CLIP_DST_AND_SRC_RECT(dstRect, srcRect, clipRect) |
| | Clips dstRect and srcRect with clipRect.
|
| #define | SW_UNION_RECT(dstRect, srcRect) |
| #define | SW_CONVERT_SW_TO_SDL_COLOR(swColor, sdlColor) |
| | Convert SW to SDL color (beware of macro side effects).
|
| #define | SW_CONVERT_SDL_TO_SW_COLOR(sdlColor, swColor) |
| | Convert SDL to SW color (beware of macro side effects).
|
| #define | SW_COLLISION_RECT_TOP(spriteP) (spriteP->destFrameRect.top + spriteP->curFrameP->collisionInset.top) |
| #define | SW_COLLISION_RECT_LEFT(spriteP) (spriteP->destFrameRect.left + spriteP->curFrameP->collisionInset.left) |
| #define | SW_COLLISION_RECT_BOTTOM(spriteP) (spriteP->destFrameRect.bottom - spriteP->curFrameP->collisionInset.bottom) |
| #define | SW_COLLISION_RECT_RIGHT(spriteP) (spriteP->destFrameRect.right - spriteP->curFrameP->collisionInset.right) |
Typedefs |
| typedef float | SWMovementType |
| | The precision of each sprite's movement.
|
| typedef SpriteWorldRec | SpriteWorldRec |
| typedef SpriteWorldRec * | SpriteWorldPtr |
| typedef TileMapStruct | TileMapStruct |
| typedef TileMapStruct * | TileMapStructPtr |
| typedef SpriteLayerRec | SpriteLayerRec |
| typedef SpriteLayerRec * | SpriteLayerPtr |
| typedef SpriteRec | SpriteRec |
| typedef SpriteRec * | SpritePtr |
| typedef FrameRec | FrameRec |
| typedef FrameRec * | FramePtr |
| typedef unsigned char | SWBoolean |
| | A Boolean value, of either true or false.
|
| typedef SWPoint | SWPoint |
| typedef SWPoint * | SWPointPtr |
| typedef SWRect | SWRect |
| typedef SWRect * | SWRectPtr |
| typedef SWRGBColor | SWRGBColor |
| typedef SWRGBColor * | SWRGBColorPtr |
| typedef DrawDataRec | DrawDataRec |
| typedef DrawDataRec * | DrawDataPtr |
| typedef enum SWError | SWError |
| | Error value integer, zero if no error.
|
Enumerations |
| enum | SWError {
kNoError = 0,
kSystemTooOldErr = 100,
kMaxFramesErr = 101,
kInvalidFramesIndexErr = 102,
kNotCWindowErr = 103,
kNilParameterErr = 104,
kWrongDepthErr = 105,
kWrongMaskErr = 106,
kOutOfRangeErr = 107,
kTilingNotInitialized = 108,
kTilingAlreadyInitialized = 109,
kNullTileMapErr = 110,
kTileMapNotLockedErr = 111,
kAlreadyCalledErr = 112,
kSpriteNotCompiledErr = 113,
kBadParameterErr = 114,
kSpriteAlreadyInLayer = 115,
kNilFrameErr = 116,
kNotLockedErr = 117,
k68kOnlyErr = 118,
kNotInCarbonErr = 119,
kWrongDrawProcTypeErr = 120,
kMemoryAllocationError = 200,
kSpriteCreationError = 201,
kFrameCreationError = 202,
kFailedToInitSDL = 300,
kSDLSetVideoMode = 301,
kSDLCreateSurface = 302,
kSDLCreateSurfaceFromFile = 303,
kSDLBlitError = 304,
KSDLBlitVideoMemoryError = 305,
kSDLSurfaceConversion = 306,
kSDLSetAlpha = 307,
kUnknownError = 999
} |
| | sprite world error constants More...
|
Functions |
| void | SW_CONVERT_SW_TO_SDL_RECT (SWRect swRect, SDL_Rect sdlRect) |
| void | SW_CONVERT_SDL_TO_SW_RECT (SDL_Rect sdlRect, SWRect swRect) |
| void | SW_CONVERT_SW_TO_SDL_COLOR (SWRGBColor swColor, SDL_Color sdlColor) |
| void | SW_CONVERT_SDL_TO_SW_COLOR (SDL_Color sdlColor, SWRGBColor swColor) |
Variables |
| SW_NAMESPACE_END typedef void(* | AssertFailProcPtr )(char *filename, char *functionname, int lineNum) |
| AssertFailProcPtr | gSWAssertFailProc |