Defines
Primitives
Polygon
Transform
Surface
Drawing
Dirty Rect
Palette
Control
Misc
Defines
Types
Extended

Arguments

Index
Credits

Name Description
SPG_VERThe major API version number.  If this number changes between releases, it means that there was a compatibility break.  You will have to understand what changed to ensure that your program works correctly.
SPG_VER_MINORThe minor API version number.  If this number changes between releases, it means that new functionality has been added.
SPG_VER_BUGFIXThe bugfix API version number.  This number changes upon every Sprig release, meaning that internal functionality has changed, usually by fixing bugs or implementing placeholder functions.
SPG_C_AND_CPPIf this is defined, Sprig will be built according to the compiler being used, differentiating whether it is C or C++.
SPG_C_ONLYThis is defined automatically when SPG_C_AND_CPP is either not defined or defined on a C compiler.  It makes sure that no special C++ functionality is used.
SPG_CPPThis is defined automatically when SPG_C_AND_CPP is defined on a C++ compiler.  It allows inlined functions to exploit some advantages of C++ syntax and makes sure that exported functions are properly protected from C++ name mangling.
SPG_USE_EXTENDEDIf this is defined, extra functions will be exported.
SPG_MAX_ERRORSThis defines the maximum size of internal stacks.  When Sprig is compiled, this determines how many items you can 'push' to the stack.
SPG_DEFINE_PIIf this is defined, several variations of the mathematical constant, pi, will be defined: PI_8, PI_4, PI_2, PI3_4, PI, PI5_4, PI3_2, PI7_4, PI2
PI_8, PI_4, PI_2, PI3_4, PI, PI5_4, PI3_2, PI7_4, PI2Several constants representing numerical factors of pi.  PI followed by a number is multiplied by that number, as in PI2, which equals 2*PI.  A number preceded by an underscore is the denominator of a fraction, as in PI3_4, which equals 3*PI/4.
DEGPERRAD, RADPERDEGConversion factors for changing between degrees and radians.  Multiply by DEGPERRAD to convert to degrees.  Multiply by RADPERDEG to convert to radians.
SPG_USE_FAST_MATHTells Sprig transform functions to use a faster set of math functions.  If you experience severe problems with SPG_Rotate, SPG_Scale, or SPG_Transform, then try building Sprig without this being defined.
SPG_FLAG0 - SPG_FLAG8These flags are used through other flags for passing flag arguments to functions.  For example, SPG_Transform() takes a flags argument.  Use SPG_TAA to enable anti-aliasing, SPG_TSAFE to ensure correct colors, etc.  For some functions, these flags can be combined using a bitwise OR '|'.
SDL_ALPHA_OPAQUE, SDL_ALPHA_TRANSPARENT, SDL_VERSIONNUM, SDL_CreateRGBSurface, These are defines for some functionality that is missing in older versions of SDL.
SPG_CLIP_XMIN, SPG_CLIP_XMAX, SPG_CLIP_YMIN, SPG_CLIP_YMAXThese defines are used for testing x and y coordinates to make sure they appear within a surface's clipping rect.
SPG_MapRGBA, SPG_GetRGBAThese are defines for SDL_MapRGBA and SDL_GetRGBA because they are not defined the same way on old vesions of SDL.
DECLSPECWhen building Sprig, this define is used to abstract the different ways that different compilers export functions.
SPG_boolThis is a define that makes the SPG_bool type identical to Uint8.  Booleans in C++  (and any other language) are 8 bits in memory for architecture reasons, despite the fact that they hold only 1 bit of information.
SPG_DEST_ALPHA, SPG_SRC_ALPHA, SPG_COMBINE_ALPHA, SPG_COPY_NO_ALPHA, SPG_COPY_SRC_ALPHA, SPG_COPY_DEST_ALPHA, SPG_COPY_COMBINE_ALPHA, SPG_COPY_ALPHA_ONLY, SPG_COMBINE_ALPHA_ONLY, SPG_REPLACE_COLORKEY, SPG_SRC_MASK,SPG_DEST_MASK These are the alpha-blending modes available through the graphics primitives and SPG_Blit().  See SPG_Blit() for more information.




SPG_NONE
SPG_TAA
SPG_TSAFE
SPG_TTMAP
SPG_TCOLORKEY
SPG_TSLOW
SPG_TBLEND
SPG_TSURFACE_ALPHA


These are the transformation flags, which can be passed to SPG_Transform() and SPG_TransformSurface().  See SPG_Transform() for more information.





SPriG v1.0.0 Documentation by Jonathan Dearborn 2008