| Name |
Description |
| SPG_VER | The 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_MINOR | The minor API version number. If this number changes between releases, it means that new functionality has been added. |
| SPG_VER_BUGFIX | The
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_CPP | If this is defined, Sprig will be built according to the compiler being used, differentiating whether it is C or C++. |
| SPG_C_ONLY | This
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_CPP | This
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_EXTENDED | If this is defined, extra functions will be exported. |
| SPG_MAX_ERRORS | This
defines the maximum size of internal stacks. When Sprig is
compiled, this determines how many items you can 'push' to the stack. |
| SPG_DEFINE_PI | If
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, PI2 | Several
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, RADPERDEG | Conversion
factors for changing between degrees and radians. Multiply by
DEGPERRAD to convert to degrees. Multiply by RADPERDEG to convert
to radians. |
| SPG_USE_FAST_MATH | Tells
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_FLAG8 | These 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_YMAX | These defines are used for testing x and y coordinates to make sure they appear within a surface's clipping rect. |
| SPG_MapRGBA, SPG_GetRGBA | These are defines for SDL_MapRGBA and SDL_GetRGBA because they are not defined the same way on old vesions of SDL. |
| DECLSPEC | When building Sprig, this define is used to abstract the different ways that different compilers export functions. |
| SPG_bool | This
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. |