Macros Summary:
...
@{...
@{...
\brief Use test functionality \deprecated This is included for testing purposes and therefore may be removed in the future.
\brief Exported in siege calling convention This is used in all SIEGE functions.
@{...
\brief Version string In VMAJOR.VMINOR.VPATCH form, for example "0.1.5".
@{...
@{...
@}...
@{...
@{...
@{...
@{...
Each vertex makes a point.
Each 2 vertices make a line.
Last vertex of previous line becomes the first vertex of the next one, drawing a connected line defined by the set of vertices.
The first vertex is the "origin" for all the lines.
Lines are created in a loop.
Each 3 vertices make a triangle.
Last 2 vertices of the previous triangle become the first two vertices of the next one, making a connected hull.
The first vertex becomes a "common point" between all the triangles.
Each 4 vertices make a quad.
Last 2 vertices of the previous quad become the first two vertices of the next one.
Create a convex polygon - the vertices passed are assumed to form one.
Create polygon that is possibly concave (but not self-intersecting).
Create a polygon that is possibly self-intersecting.
@}...
Segment shape, defined by two points and possibly a width.
Polygon shape, defined by a set of points.
A circle shape, defined by an inner and outer radius.
@}...
Completely non-interactive body type.
"Normal" body type, with normal physics interaction.
A body type with seemingly infinite mass, but still movable (usually through user interaction).
A completely static, non-movable body type with seemingly infinite mass.
@{...
...
@{...
@{...
Typedefs Summary:
SGbool ()( void *, va_list) SGEventCall
uint8_t SGbool
uint32_t SGenum
uint16_t SGwchar
uint32_t SGdchar
int8_t SGbyte
uint8_t SGubyte
int16_t SGshort
uint16_t SGushort
int32_t SGint
uint32_t SGuint
int64_t SGlong
uint64_t SGulong
float SGfloat
double SGdouble
SGint ()(const void *, const void *) SGTreeNodeCmp
size_t()( void *, const void *, size_t *, SGbool ) SGConvFunction
void()( SGParticle *, float, float) SGParticleUpdate
Structs Summary:
struct SGEvent
struct SGEntity
struct SGTree
struct SGMat2
struct SGMat3
struct SGMat4
struct SGMat5
struct SGRand
struct SGThread
struct SGMutex
struct SGList
struct SGVec2
struct SGVec3
struct SGVec4
struct SGColor
struct SGConv
struct SGModule
struct SGFont
struct SGMask
struct SGSprite
struct SGTurtle
struct SGLight
struct SGTrail
struct SGAStar
Functions Summary:
 void sgGetVersionv ( SGushort * version )
 void sgGetVersion ( SGushort * vmajor , SGushort * vminor , SGushort * vpatch )
  char * sgGetVersionString ()
  SGuint sgLoadModulesv (size_t n , va_list args )
Functions: sgLoadModule* Load a module or a number of modules.
  SGuint sgLoadModules (size_t n , ...)
  SGbool sgLoadModule (const char * name )
Function: sgInit Initialize SIEGE.
Function: sgDeinit Cleanup and deinit SIEGE.
Function: sgRun Start the SIEGE main loop.
Function: sgLoop Run a single SIEGE iteration.
 void sgStop ( SGint ret )
Function: sgStop Stop the program main loop.
Function: sgGetTick Get the current tick (number of loops passed).
...
...
 void sgWindowClose ()
...
 void sgWindowSetTitlef (const char * format , ...)
...
 void sgWindowSetTitlefv (const char * format , va_list args )
...
 void sgWindowSetTitle (const char * title )
\ingroup Window \brief Set the window title \param[in] title The new title This function takes a normal string and sets it as the title.
  char * sgWindowGetTitle ()
...
 void sgWindowSetSize ( SGuint width , SGuint height )
...
 void sgWindowGetSize ( SGuint * width , SGuint * height )
...
\ingroup Window \brief Change the width of the window \param[in] width New window width This function preserves the window height, setting its width only.
\ingroup Window \brief Get the width of the window \return The window width or 0 if not opened \note If both width and height are required, consider \ref sgWindowGetSize "sgWindowGetSize".
\ingroup Window \brief Change the height of the window \param[in] height New window height This function preserves the window width, setting its height only.
\ingroup Window \brief Get the height of the window \return The window height or 0 if not opened \note If both width and height are required, consider \ref sgWindowGetSize "sgWindowGetSize".
...
   SGEvent  * sgEventCreate (float priority , SGenum type , void * data , SGEventCall * func )
\memberof SGEvent \brief Create an event handler \param priority Event handler priority \param type Event handler type \param data User data for the event handler \param func Function to call when the event is triggered \return The newly created event handler if successful, NULL otherwise.
 void sgEventDestroy ( SGEvent * event )
\memberof SGEvent \brief Destroy an event handler \param event The event handler to destroy.
 void sgEventCallv ( SGenum type , va_list args )
\memberof SGEvent \brief Trigger an event \param type The event type to trigger \param args The arguments to pass (treated as an opaque pointer by SIEGE) This function triggers an event, and in turn, every event handler of the correct type (unless previously stopped).
 void sgEventCall ( SGenum type , ...)
 void sgEventStop ()
\memberof SGEvent \brief Stop an event This function stops an event in its tracks, meaning that it doesn't "propagate" to event handlers further down.
   SGEntity  * sgEntityCreate (float priority )
Function: sgEntityCreate Create a new entity.
 void sgEntityDestroy ( SGEntity * entity )
Function: sgEntityDestroy Destroy an entity.
 void sgEntitySetSprite ( SGEntity * entity , SGSprite * sprite )
Functions: sgEntity*Sprite Attach/get the entity's sprite.
 void sgEntitySetMask ( SGEntity * entity , SGMask * mask )
Functions: sgEntity*Mask Attach/get the entity's collision mask.
Functions: sgEntity*PhysicsBody Attach/get the entity's physical body.
Functions: sgEntity*AudioSource Attach/get the entity's audio source.
 void sgEntitySetPos ( SGEntity * entity , float x , float y )
Functions: sgEntity*Pos* Set/get the entity's position.
 void sgEntityGetPos ( SGEntity * entity , float * x , float * y )
 void sgEntitySetPosX ( SGEntity * entity , float x )
 float sgEntityGetPosX ( SGEntity * entity )
 void sgEntitySetPosY ( SGEntity * entity , float y )
 float sgEntityGetPosY ( SGEntity * entity )
 void sgEntitySetDepth ( SGEntity * entity , float depth )
Functions: sgEntity*Depth Set/get the entity's depth.
 float sgEntityGetDepth ( SGEntity * entity )
 void sgEntitySetAngleRads ( SGEntity * entity , float rads )
 void sgEntitySetAngleDegs ( SGEntity * entity , float degs )
 void sgEntityDraw ( SGEntity * entity )
Function: sgEntityDraw Draw the entity with its current position and orientation.
SGPhysicsConstraint * sgPhysicsConstraintCreatePin ( SGPhysicsBody * body1 , SGPhysicsBody * body2 , float x1 , float y1 , float x2 , float y2 )
SGPhysicsConstraint * sgPhysicsConstraintCreateSlide ( SGPhysicsBody * body1 , SGPhysicsBody * body2 , float x1 , float y1 , float x2 , float y2 , float min , float max )
SGPhysicsConstraint * sgPhysicsConstraintCreatePivot ( SGPhysicsBody * body1 , SGPhysicsBody * body2 , float x1 , float y1 , float x2 , float y2 )
SGPhysicsConstraint * sgPhysicsConstraintCreateGroove ( SGPhysicsBody * body1 , SGPhysicsBody * body2 , float x1 , float y1 , float x2 , float y2 , float xa , float ya )
SGPhysicsConstraint * sgPhysicsConstraintCreateLinSpring ( SGPhysicsBody * body1 , SGPhysicsBody * body2 , float x1 , float y1 , float x2 , float y2 , float rest , float st , float damp )
 void sgPhysicsConstraintSetAnchorOne ( SGPhysicsConstraint * constr , float x , float y )
 void sgPhysicsConstraintSetAnchorTwo ( SGPhysicsConstraint * constr , float x , float y )
 void sgPhysicsConstraintSetLength ( SGPhysicsConstraint * constr , float length )
 void sgPhysicsConstraintSetStiffness ( SGPhysicsConstraint * constr , float stiffness )
 void sgPhysicsConstraintSetDamping ( SGPhysicsConstraint * constr , float damping )
 void sgPhysicsConstraintSetRatchet ( SGPhysicsConstraint * constr , float ratchet )
 void sgPhysicsConstraintSetData ( SGPhysicsConstraint * constr , void * data )
 void sgPhysicsBodySetData ( SGPhysicsBody * body , void * data )
 void sgPhysicsBodySetPos ( SGPhysicsBody * body , float x , float y )
 void sgPhysicsBodyGetPos ( SGPhysicsBody * body , float * x , float * y )
 void sgPhysicsBodySetPosX ( SGPhysicsBody * body , float x )
 void sgPhysicsBodySetPosY ( SGPhysicsBody * body , float y )
 void sgPhysicsBodySetAngleRads ( SGPhysicsBody * body , float rads )
 void sgPhysicsBodySetAngleDegs ( SGPhysicsBody * body , float degs )
 void sgPhysicsBodySetVel ( SGPhysicsBody * body , float x , float y )
 void sgPhysicsBodyGetVel ( SGPhysicsBody * body , float * x , float * y )
 void sgPhysicsBodySetVelX ( SGPhysicsBody * body , float x )
 void sgPhysicsBodySetVelY ( SGPhysicsBody * body , float y )
 void sgPhysicsBodySetAngVelRads ( SGPhysicsBody * body , float rads )
 void sgPhysicsBodySetAngVelDegs ( SGPhysicsBody * body , float degs )
 void sgPhysicsBodySetMass ( SGPhysicsBody * body , float mass )
 void sgPhysicsBodySetMoment ( SGPhysicsBody * body , float moment )
 void sgPhysicsBodyApplyImpulse ( SGPhysicsBody * body , float jx , float jy , float rx , float ry )
 void sgPhysicsBodyApplyForce ( SGPhysicsBody * body , float jx , float jy , float rx , float ry )
 void sgPhysicsCollisionGetPoint ( SGPhysicsCollision * coll , size_t index , float * x , float * y )
 void sgPhysicsCollisionGetNormal ( SGPhysicsCollision * coll , size_t index , float * x , float * y )
 void sgPhysicsCollisionGetImpulse ( SGPhysicsCollision * coll , float * x , float * y , SGbool friction )
   SGPhysicsShape  * sgPhysicsShapeCreateSegment ( SGPhysicsBody * body , float x1 , float y1 , float x2 , float y2 , float width )
   SGPhysicsShape  * sgPhysicsShapeCreatePoly ( SGPhysicsBody * body , float x , float y , float * verts , size_t numverts )
   SGPhysicsShape  * sgPhysicsShapeCreateCircle ( SGPhysicsBody * body , float x , float y , float r1 , float r2 )
 void sgPhysicsShapeSetFriction ( SGPhysicsShape * shape , float friction )
 void sgPhysicsShapeSetRestitution ( SGPhysicsShape * shape , float restitution )
 void sgPhysicsShapeSetData ( SGPhysicsShape * shape , void * data )
 float sgPhysicsShapeGetMass ( SGPhysicsShape * shape , float density )
 float sgPhysicsShapeGetMomentMass ( SGPhysicsShape * shape , float mass )
 float sgPhysicsShapeGetMomentDensity ( SGPhysicsShape * shape , float density )
 void sgPhysicsShapeGetBBox ( SGPhysicsShape * shape , float * t , float * l , float * b , float * r )
 void sgPhysicsSpaceStep ( SGPhysicsSpace * space , float time )
 void sgPhysicsSpaceSetGravity ( SGPhysicsSpace * space , float x , float y )
 void sgPhysicsSpaceSetDamping ( SGPhysicsSpace * space , float damping )
 void sgPhysicsSpaceSetData ( SGPhysicsSpace * space , void * data )
  float * sgJoystickGetAxis ( SGuint joy )
 void sgTreeDestroy ( SGTree * tree )
   SGTreeNode  * sgTreeFindItem ( SGTree * tree , void * item )
   SGTreeNode  * sgTreeInsert ( SGTree * tree , void * item )
 void sgTreeRemoveItem ( SGTree * tree , void * item )
  void * sgTreePopRoot ( SGTree * tree )
  void * sgTreePopFirst ( SGTree * tree )
  void * sgTreePopLast ( SGTree * tree )
   SGJSONValue  * sgJSONValueCreateString (const char * str )
   SGJSONValue  * sgJSONValueCreateFile (const char * fname )
  char * sgJSONToString ( SGJSONValue * value , SGbool pretty )
 void sgJSONObjectSetValue ( SGJSONValue * object , const char * key , SGJSONValue * value )
 void sgJSONObjectRemoveValue ( SGJSONValue * object , const char * key )
   SGJSONValue  * sgJSONObjectGetValue ( SGJSONValue * object , const char * key )
 float sgAngleDifferenceRads (float angle1 , float angle2 )
 float sgAngleDifferenceDegs (float angle1 , float angle2 )
 float sgAngleRadToDeg (float rads )
 float sgAngleDegToRad (float degs )
 void sgGradientSetStopIndex ( SGGradient * grad , size_t i , float y )
 void sgGradientSetStopKey ( SGGradient * grad , float x , float y )
 void sgGradientRemoveStopIndex ( SGGradient * grad , size_t i )
 void sgGradientRemoveStopKey ( SGGradient * grad , float x )
 float sgGradientGetValue ( SGGradient * grad , float x )
   SGLibrary  * sgLibraryLoad (const char * fname )
  void * sgGetVarAddress ( SGLibrary * lib , const char * var )
   SGPListNode  * sgPListInsertPriority ( SGPList * list , float priority , void * item )
 void sgRandDestroy ( SGRand * rand )
 void sgRandSeed ( SGRand * rand , SGulong seed , SGulong index )
   SGThread  * sgThreadCreate (size_t ssize , SGThreadFunction * func , void * data )
 void sgThreadDestroy ( SGThread * thread )
 void sgThreadStart ( SGThread * thread )
 void sgThreadExit ( SGint ret )
 void sgThreadKill ( SGThread * thread , SGint ret )
 void sgMutexDestroy ( SGMutex * mutex )
 void sgMutexLock ( SGMutex * mutex )
 void sgMutexUnlock ( SGMutex * mutex )
 void sgThreadKeySetVal ( SGThreadKey * key , void * val )
 void sgListDestroy ( SGList * list )
 size_t sgListLength ( SGList * list )
   SGListNode  * sgListFindItem ( SGList * list , void * item )
   SGListNode  * sgListFindIndex ( SGList * list , size_t index )
   SGListNode  * sgListInsertNode ( SGList * list , SGListNode * after , void * item )
   SGListNode  * sgListInsertItem ( SGList * list , void * after , void * item )
   SGListNode  * sgListInsertIndex ( SGList * list , size_t after , void * item )
   SGListNode  * sgListPrepend ( SGList * list , void * item )
   SGListNode  * sgListAppend ( SGList * list , void * item )
 void sgListRemoveItem ( SGList * list , void * item )
 void sgListRemoveIndex ( SGList * list , size_t index )
  void * sgListPopFirst ( SGList * list )
  void * sgListPopLast ( SGList * list )
   SGDirectory  * sgDirectoryOpen (const char * fname )
  char * sgDirectoryNext ( SGDirectory * dir , char * buf , size_t buflen )
  SGVec2 sgVec2f (float x , float y )
  SGVec2 sgVec2fv (const float * xy )
  SGVec2 sgVec2PolarRads (float rads , float len )
  SGVec2 sgVec2PolarDegs (float degs , float len )
  SGVec2 sgVec2SetLength ( SGVec2 vec , float length )
  SGVec3 sgVec3f (float x , float y , float z )
  SGVec3 sgVec3fv (const float * xyz )
  SGVec3 sgVec3CylindricalRads (float rads , float radius , float z )
  SGVec3 sgVec3CylindricalDegs (float degs , float radius , float z )
  SGVec3 sgVec3SphericalRads (float azimuth , float zenith , float radius )
  SGVec3 sgVec3SphericalDegs (float azimuth , float zenith , float radius )
  SGVec3 sgVec3SetLength ( SGVec3 vec , float length )
  SGVec4 sgVec4f (float x , float y , float z , float w )
  SGVec4 sgVec4fv (const float * xyzw )
  SGVec4 sgVec4SetLength ( SGVec4 vec , float length )
  SGColor sgColor4f (float r , float g , float b , float a )
  SGColor sgColor3f (float r , float g , float b )
  SGColor sgColor2f (float g , float a )
  SGColor sgColor4fv (const float * rgba )
  SGColor sgColor3fv (const float * rgb )
  SGColor sgColor2fv (const float * ga )
  SGColor sgColor1fv (const float * g )
  SGColor sgColorX11 (const char * name )
  SGColor sgColorWeb (const char * name )
 size_t sgPrintfW (const wchar_t * format , ...)
 size_t sgPrintfvW (const wchar_t * format , va_list args )
 size_t sgPrintf (const char * format , ...)
 size_t sgPrintfv (const char * format , va_list args )
 size_t sgSPrintfW ( wchar_t * buf , size_t buflen , const wchar_t * format , ...)
 size_t sgSPrintfvW ( wchar_t * buf , size_t buflen , const wchar_t * format , va_list args )
  wchar_t * sgAPrintfW (const wchar_t * format , ...)
  wchar_t * sgAPrintfvW (const wchar_t * format , va_list args )
 size_t sgSPrintf ( char * buf , size_t buflen , const char * format , ...)
 size_t sgSPrintfv ( char * buf , size_t buflen , const char * format , va_list args )
  char * sgAPrintf (const char * format , ...)
  char * sgAPrintfv (const char * format , va_list args )
 void sgAPrintFree ( void * str )
  SGbool sgStartsWith (const char * text , const char * what )
  char * sgSpaceEnd (const char * text )
  char * sgLineEnd (const char * text )
  SGuint sgLineLength (const char * text )
  char * sgNextLine (const char * text )
  SGuint sgNumLines (const char * text )
   SGdchar  * sgLineEndU32 (const SGdchar * text )
   SGdchar  * sgNextLineU32 (const SGdchar * text )
 void sgConvDestroy ( SGConv * conv )
 size_t sgConvEstimate ( SGConv * conv , size_t inlen )
 size_t sgConv ( SGConv * conv , void * out , size_t outlen , const void * in , size_t inlen , SGbool strict )
 size_t sgConv2s ( SGenum dst , SGenum src , void * out , size_t outlen , const void * in , size_t inlen , SGbool strict )
Function: sgGetTime Returns: nanoseconds from a fixed, unspecified, origin.
 void sgNSleep ( SGulong nseconds )
Functions: sgNSleep, sgUSleep, sgMSleep Sleep for the given amount of {nano/micro/milli}seconds.
 void sgUSleep ( SGulong useconds )
 void sgMSleep ( SGulong mseconds )
 void sgSleep ( SGulong seconds )
Function: sgSleep Sleep for the given amount of seconds.
   SGModule  * sgModuleLoad (const char * name )
 void sgModuleUnload ( SGModule * module )
 void sgModuleSetLoadDirsv (size_t ndirs , va_list args )
 void sgModuleSetLoadDirs (size_t ndirs , ...)
 void sgModuleSetLoadDir (const char * dir )
  char * * sgModuleGetLoadDirs ( size_t * ndirs )
 void sgModuleSetLoadPrefixesv (size_t nprefs , va_list args )
 void sgModuleSetLoadPrefixes (size_t nprefs , ...)
 void sgModuleSetLoadPrefix (const char * prefix )
  char * * sgModuleGetLoadPrefixes ( size_t * nprefs )
   SGAudioBuffer  * sgAudioBufferCreateFile (const char * fname )
\memberof SGAudioBuffer \brief Create an audio buffer \param fname Filename of the audio file to load \return The newly created buffer if successful, NULL otherwise.
\memberof SGAudioBuffer \brief Destroy an audio buffer \param buffer The buffer to destroy.
 void sgAudioBufferSetData ( SGAudioBuffer * buffer , SGuint channels , SGuint format , SGuint frequency , void * data , size_t datalen )
...
   SGAudioSource  * sgAudioSourceCreate (float priority , float volume , float pitch , SGbool looping )
\brief Create an audio source.
\brief Destroy an audio source.
\brief Play an audio source.
...
\brief Pause an audio source.
...
\brief Rewind an audio source.
\brief Stop an audio source.
...
...
@{...
 void sgAudioSourceQueueBuffers ( SGAudioSource * source , SGAudioBuffer * * buffers , size_t numbuffers )
\brief Queue multiple buffers into a source \param source The source into which the buffers should be queued \param buffers The buffers to queue \param numbuffers How many buffers to queue This function queues \a numbuffers buffers into \a source.
\brief Queue a single buffer into a source \param source The source into which the buffer should be queued \param buffer The buffer to queue This function queues a \a buffer into \a source.
 void sgAudioSourceUnqueueBuffers ( SGAudioSource * source , size_t numbuffers )
 void sgAudioSourceSetPosition3f ( SGAudioSource * source , float x , float y , float z )
...
 void sgAudioSourceSetPosition2f ( SGAudioSource * source , float x , float y )
...
 void sgAudioSourceGetPosition3f ( SGAudioSource * source , float * x , float * y , float * z )
...
 void sgAudioSourceGetPosition2f ( SGAudioSource * source , float * x , float * y )
...
 void sgAudioSourceSetVelocity3f ( SGAudioSource * source , float x , float y , float z )
...
 void sgAudioSourceSetVelocity2f ( SGAudioSource * source , float x , float y )
...
 void sgAudioSourceGetVelocity3f ( SGAudioSource * source , float * x , float * y , float * z )
...
 void sgAudioSourceGetVelocity2f ( SGAudioSource * source , float * x , float * y )
...
 void sgAudioSourceSetPitch ( SGAudioSource * source , float pitch )
\brief Set the pitch \param source The source which we want to set the pitch of \param[in] pitch The pitch to set Pitch 1.0 leaves the buffer to play as it is in the "original".
...
 void sgAudioSourceSetVolume ( SGAudioSource * source , float volume )
\brief Set the volume \param source The source which we want to set the volume of \param[in] volume The volume to set Volume 1.0 leaves the buffer to play as it is in the "original".
...
\brief Set the source in (or out of) a loop \param source The source which we want to loop (or stop looping) \param[in] looping The looping to set Pitch 1.0 leaves the buffer to play as it is in the "original".
...
   SGSurface  * sgSurfaceCreateFile (const char * fname )
   SGSurface  * sgSurfaceCreateData ( SGuint width , SGuint height , SGenum bpp , void * data )
 void sgSurfaceDestroy ( SGSurface * surface )
 void sgSurfaceDrawRads3f2f2f1f ( SGSurface * surface , float x , float y , float z , float xscale , float yscale , float xoffset , float yoffset , float angle )
 void sgSurfaceDrawDegs3f2f2f1f ( SGSurface * surface , float x , float y , float z , float xscale , float yscale , float xoffset , float yoffset , float angle )
 void sgSurfaceDrawRads2f2f2f1f ( SGSurface * surface , float x , float y , float xscale , float yscale , float xoffset , float yoffset , float angle )
 void sgSurfaceDrawDegs2f2f2f1f ( SGSurface * surface , float x , float y , float xscale , float yscale , float xoffset , float yoffset , float angle )
 void sgSurfaceDrawRads3f2f1f ( SGSurface * surface , float x , float y , float z , float xscale , float yscale , float angle )
 void sgSurfaceDrawDegs3f2f1f ( SGSurface * surface , float x , float y , float z , float xscale , float yscale , float angle )
 void sgSurfaceDrawRads2f2f1f ( SGSurface * surface , float x , float y , float xscale , float yscale , float angle )
 void sgSurfaceDrawDegs2f2f1f ( SGSurface * surface , float x , float y , float xscale , float yscale , float angle )
 void sgSurfaceDrawRads3f1f ( SGSurface * surface , float x , float y , float z , float angle )
 void sgSurfaceDrawDegs3f1f ( SGSurface * surface , float x , float y , float z , float angle )
 void sgSurfaceDrawRads2f1f ( SGSurface * surface , float x , float y , float angle )
 void sgSurfaceDrawDegs2f1f ( SGSurface * surface , float x , float y , float angle )
 void sgSurfaceDraw3f2f2f ( SGSurface * surface , float x , float y , float z , float xscale , float yscale , float xoffset , float yoffset )
 void sgSurfaceDraw2f2f2f ( SGSurface * surface , float x , float y , float xscale , float yscale , float xoffset , float yoffset )
 void sgSurfaceDraw3f2f ( SGSurface * surface , float x , float y , float z , float xscale , float yscale )
 void sgSurfaceDraw2f2f ( SGSurface * surface , float x , float y , float xscale , float yscale )
 void sgSurfaceDraw3f ( SGSurface * surface , float x , float y , float z )
 void sgSurfaceDraw2f ( SGSurface * surface , float x , float y )
 void sgSurfaceDraw ( SGSurface * surface )
 void sgSurfaceTarget ( SGSurface * surface )
 void sgSurfaceUntarget ( SGSurface * surface )
 void sgSurfaceClear4f ( SGSurface * surface , float r , float g , float b , float a )
 void sgSurfaceClear3f ( SGSurface * surface , float r , float g , float b )
 void sgSurfaceClear2f ( SGSurface * surface , float g , float a )
 void sgSurfaceClear1f ( SGSurface * surface , float g )
 void sgSurfaceClear ( SGSurface * surface )
 void sgSurfaceGetSize ( SGSurface * surface , SGuint * width , SGuint * height )
   SGEmitter  * sgEmitterCreate (float x , float y , float angle , float delta_angle , float initial_speed , float duration , float rate , float friction , size_t nb_particles , SGTexture * texture )
 void sgEmitterUpdate ( SGEmitter * emitter , float time )
 void sgEmitterDraw ( SGEmitter * emitter )
   SGFont  * sgFontCreate (const char * fname , float height , SGuint preload )
\brief Load a font \param fname Filename of the font to load \param height Height of the font (in pt) \param preload Number of characters to preload; good values are 127 or 255.
 void sgFontDestroy ( SGFont * font )
\brief Destroy a font info \param font The font info to destroy.
   SGFont  * sgFontResizeCopy ( SGFont * font , float height )
   SGFont  * sgFontResize ( SGFont * font , float height )
\brief Resize the font, duplicating only if necessarry.
 void sgFontPrintfW ( SGFont * font , float x , float y , const wchar_t * format , ...)
@{...
 void sgFontPrintfvW ( SGFont * font , float x , float y , const wchar_t * format , va_list args )
 void sgFontPrintf ( SGFont * font , float x , float y , const char * format , ...)
...
 void sgFontPrintfv ( SGFont * font , float x , float y , const char * format , va_list args )
...
 void sgFontPrintU32 ( SGFont * font , float x , float y , const SGdchar * text )
...
 void sgFontPrintU16 ( SGFont * font , float x , float y , const SGwchar * text )
 void sgFontPrintU8 ( SGFont * font , float x , float y , const SGchar * text )
 void sgFontPrintW ( SGFont * font , float x , float y , const wchar_t * text )
 void sgFontPrint ( SGFont * font , float x , float y , const char * text )
 void sgFontPrintAlignedfW ( SGFont * font , float x , float y , SGenum align , const wchar_t * format , ...)
TODO...
 void sgFontPrintAlignedfvW ( SGFont * font , float x , float y , SGenum align , const wchar_t * format , va_list args )
 void sgFontPrintAlignedf ( SGFont * font , float x , float y , SGenum align , const char * format , ...)
 void sgFontPrintAlignedfv ( SGFont * font , float x , float y , SGenum align , const char * format , va_list args )
 void sgFontPrintAlignedU32 ( SGFont * font , float x , float y , SGenum align , const SGdchar * text )
 void sgFontPrintAlignedU16 ( SGFont * font , float x , float y , SGenum align , const SGwchar * text )
 void sgFontPrintAlignedU8 ( SGFont * font , float x , float y , SGenum align , const SGchar * text )
 void sgFontPrintAlignedW ( SGFont * font , float x , float y , SGenum align , const wchar_t * text )
 void sgFontPrintAligned ( SGFont * font , float x , float y , SGenum align , const char * text )
 void sgFontStrSizefW ( SGFont * font , float * x , float * y , const wchar_t * format , ...)
@{...
 void sgFontStrSizefvW ( SGFont * font , float * x , float * y , const wchar_t * format , va_list args )
 void sgFontStrSizef ( SGFont * font , float * x , float * y , const char * format , ...)
...
 void sgFontStrSizefv ( SGFont * font , float * x , float * y , const char * format , va_list args )
...
 void sgFontStrSizeU32 ( SGFont * font , float * x , float * y , const SGdchar * text )
...
 void sgFontStrSizeU16 ( SGFont * font , float * x , float * y , const SGwchar * text )
 void sgFontStrSizeU8 ( SGFont * font , float * x , float * y , const SGchar * text )
 void sgFontStrSizeW ( SGFont * font , float * x , float * y , const wchar_t * text )
 void sgFontStrSize ( SGFont * font , float * x , float * y , const char * text )
 size_t sgFontFindIndexfW ( SGFont * font , float x , float y , const wchar_t * format , ...)
 size_t sgFontFindIndexfvW ( SGFont * font , float x , float y , const wchar_t * format , va_list args )
 size_t sgFontFindIndexf ( SGFont * font , float x , float y , const char * format , ...)
 size_t sgFontFindIndexfv ( SGFont * font , float x , float y , const char * format , va_list args )
 size_t sgFontFindIndexU32 ( SGFont * font , float x , float y , const SGdchar * text )
 size_t sgFontFindIndexU16 ( SGFont * font , float x , float y , const SGwchar * text )
 size_t sgFontFindIndexU8 ( SGFont * font , float x , float y , const SGchar * text )
 size_t sgFontFindIndexW ( SGFont * font , float x , float y , const wchar_t * text )
 size_t sgFontFindIndex ( SGFont * font , float x , float y , const char * text )
 void sgFontGetPosfW ( SGFont * font , float * x , float * y , size_t index , const wchar_t * format , ...)
 void sgFontGetPosfvW ( SGFont * font , float * x , float * y , size_t index , const wchar_t * format , va_list args )
 void sgFontGetPosf ( SGFont * font , float * x , float * y , size_t index , const char * format , ...)
 void sgFontGetPosfv ( SGFont * font , float * x , float * y , size_t index , const char * format , va_list args )
 void sgFontGetPosU32 ( SGFont * font , float * x , float * y , size_t index , const SGdchar * text )
 void sgFontGetPosU16 ( SGFont * font , float * x , float * y , size_t index , const SGwchar * text )
 void sgFontGetPosU8 ( SGFont * font , float * x , float * y , size_t index , const SGchar * text )
 void sgFontGetPosW ( SGFont * font , float * x , float * y , size_t index , const wchar_t * text )
 void sgFontGetPos ( SGFont * font , float * x , float * y , size_t index , const char * text )
 void sgDrawBeginT ( SGenum type , SGTexture * texture )
...
 void sgDrawBegin ( SGenum type )
...
 void sgDrawEnd ()
...
 void sgDrawColor4f (float r , float g , float b , float a )
...
 void sgDrawColor3f (float r , float g , float b )
 void sgDrawColor2f (float g , float a )
 void sgDrawColor1f (float g )
 void sgDrawColor4fv (const float * rgba )
 void sgDrawColor3fv (const float * rgb )
 void sgDrawColor2fv (const float * ga )
 void sgDrawColor1fv (const float * g )
 void sgDrawColor4ubv (const SGubyte * rgba )
 void sgDrawColor3ubv (const SGubyte * rgb )
 void sgDrawColor2ubv (const SGubyte * ga )
 void sgDrawColor1ubv (const SGubyte * g )
 void sgDrawGetColor4f ( float * r , float * g , float * b , float * a )
 void sgDrawGetColor4fv ( float * rgba )
 void sgDrawTexCoord2f (float s , float t )
\brief Set the texture coordinate of the following vertex \param s Horizontal (x) coordinate \param t Vertical (y) coordinate \note Texture coordinates generally span from 0.0 to 1.0 - values outside this range can sometimes (depending on the texture clipping mode) indicate flipping or tiling.
 void sgDrawTexCoord2fv (const float * st )
 void sgDrawVertex3f (float x , float y , float z )
...
 void sgDrawVertex2f (float x , float y )
 void sgDrawVertex3fv (const float * xyz )
 void sgDrawVertex2fv (const float * xy )
 void sgDrawClear4f (float r , float g , float b , float a )
...
 void sgDrawClear3f (float r , float g , float b )
 void sgDrawClear2f (float g , float a )
 void sgDrawClear1f (float g )
 void sgDrawClear4fv (const float * rgba )
 void sgDrawClear3fv (const float * rgb )
 void sgDrawClear2fv (const float * ga )
 void sgDrawClear1fv (const float * g )
 void sgDrawClear4ubv (const SGubyte * rgba )
 void sgDrawClear3ubv (const SGubyte * rgb )
 void sgDrawClear2ubv (const SGubyte * ga )
 void sgDrawClear1ubv (const SGubyte * g )
 void sgDrawClear ()
...
 void sgDrawSetSmooth ( SGbool smooth )
 void sgDrawPoint (float x , float y )
...
 void sgDrawPointSetSize (float size )
...
 void sgDrawLine (float x1 , float y1 , float x2 , float y2 )
...
 void sgDrawLineSetWidth (float width )
...
 void sgDrawTriangle (float x1 , float y1 , float x2 , float y2 , float x3 , float y3 , SGbool fill )
@{...
 void sgDrawQuad (float x1 , float y1 , float x2 , float y2 , float x3 , float y3 , float x4 , float y4 , SGbool fill )
@{...
 void sgDrawRectangle (float x1 , float y1 , float x2 , float y2 , SGbool fill )
@{...
 void sgDrawRectangleWH (float x , float y , float w , float h , SGbool fill )
 void sgDrawRectangleRound (float x1 , float y1 , float x2 , float y2 , float rx , float ry , SGbool fill )
 void sgDrawRectangleRoundWH (float x1 , float y1 , float w , float h , float rx , float ry , SGbool fill )
 void sgDrawEllipse2R (float x , float y , float rx , float ry , SGbool fill )
@{...
 void sgDrawCircle (float x , float y , float radius , SGbool fill )
@{...
 void sgDrawEArcRads (float x , float y , float rx , float ry , float a1 , float a2 , SGbool ccw , SGbool fill )
@{...
 void sgDrawEArcDegs (float x , float y , float rx , float ry , float a1 , float a2 , SGbool ccw , SGbool fill )
 void sgDrawArcRads (float x , float y , float r , float a1 , float a2 , SGbool ccw , SGbool fill )
@{...
 void sgDrawArcDegs (float x , float y , float r , float a1 , float a2 , SGbool ccw , SGbool fill )
   SGTexture  * sgTextureCreateFile (const char * fname )
   SGTexture  * sgTextureCreateData ( SGuint width , SGuint height , SGenum bpp , void * data )
 void sgTextureDestroy ( SGTexture * texture )
 void sgTextureDrawRads3f2f2f1f ( SGTexture * texture , float x , float y , float z , float xscale , float yscale , float xoffset , float yoffset , float angle )
 void sgTextureDrawDegs3f2f2f1f ( SGTexture * texture , float x , float y , float z , float xscale , float yscale , float xoffset , float yoffset , float angle )
 void sgTextureDrawRads2f2f2f1f ( SGTexture * texture , float x , float y , float xscale , float yscale , float xoffset , float yoffset , float angle )
 void sgTextureDrawDegs2f2f2f1f ( SGTexture * texture , float x , float y , float xscale , float yscale , float xoffset , float yoffset , float angle )
 void sgTextureDrawRads3f2f1f ( SGTexture * texture , float x , float y , float z , float xscale , float yscale , float angle )
 void sgTextureDrawDegs3f2f1f ( SGTexture * texture , float x , float y , float z , float xscale , float yscale , float angle )
 void sgTextureDrawRads2f2f1f ( SGTexture * texture , float x , float y , float xscale , float yscale , float angle )
 void sgTextureDrawDegs2f2f1f ( SGTexture * texture , float x , float y , float xscale , float yscale , float angle )
 void sgTextureDrawRads3f1f ( SGTexture * texture , float x , float y , float z , float angle )
 void sgTextureDrawDegs3f1f ( SGTexture * texture , float x , float y , float z , float angle )
 void sgTextureDrawRads2f1f ( SGTexture * texture , float x , float y , float angle )
 void sgTextureDrawDegs2f1f ( SGTexture * texture , float x , float y , float angle )
 void sgTextureDraw3f2f2f ( SGTexture * texture , float x , float y , float z , float xscale , float yscale , float xoffset , float yoffset )
 void sgTextureDraw2f2f2f ( SGTexture * texture , float x , float y , float xscale , float yscale , float xoffset , float yoffset )
 void sgTextureDraw3f2f ( SGTexture * texture , float x , float y , float z , float xscale , float yscale )
 void sgTextureDraw2f2f ( SGTexture * texture , float x , float y , float xscale , float yscale )
 void sgTextureDraw3f ( SGTexture * texture , float x , float y , float z )
 void sgTextureDraw2f ( SGTexture * texture , float x , float y )
 void sgTextureDraw ( SGTexture * texture )
 void sgTextureSetWrap ( SGTexture * texture , SGenum swrap , SGenum twrap )
 void sgTextureGetSize ( SGTexture * texture , SGuint * width , SGuint * height )
   SGMask  * sgMaskCreateTexture2i ( SGTexture * texture , SGint xoffset , SGint yoffset )
   SGMask  * sgMaskCreateFile2i (const char * fname , SGint xoffset , SGint yoffset )
   SGMask  * sgMaskCreateFile (const char * fname )
 void sgMaskDestroy ( SGMask * mask )
\brief Check the collision between two masks \param m1 The first mask to test \param x1 First mask's x position \param y1 First mask's y position \param m2 The second mask to test \param x2 Second mask's x position \param y2 Second mask's y position \return SG_TRUE if the masks collide, SG_FALSE otherwise.
 void sgMaskGetSize ( SGMask * mask , SGuint * width , SGuint * height )
 void sgMaskDrawDBG ( SGMask * mask , SGint x , SGint y , SGbool transparent )
...
   SGImageData  * sgImageDataCreateFile (const char * fname )
   SGImageData  * sgImageDataCreateData (size_t width , size_t height , SGenum bpp , void * data )
   SGImageData  * sgImageDataCreate (size_t width , size_t height , SGenum bpp )
 void sgImageDataGetData ( SGImageData * idata , size_t * width , size_t * height , SGenum * bpp , void * * data )
 void sgImageDataGetSize ( SGImageData * idata , size_t * width , size_t * height )
   SGSprite  * sgSpriteCreateTexture2f ( SGTexture * texture , float xoffset , float yoffset )
   SGSprite  * sgSpriteCreateFile2f (const char * fname , float xoffset , float yoffset )
   SGSprite  * sgSpriteCreateFile (const char * fname )
 void sgSpriteDestroy ( SGSprite * sprite )
  SGbool sgSpriteAddFrameFile ( SGSprite * sprite , const char * fname )
 void sgSpriteSetImage ( SGSprite * sprite , float image )
 float sgSpriteGetImage ( SGSprite * sprite )
 void sgSpriteSetSpeed ( SGSprite * sprite , float speed )
 float sgSpriteGetSpeed ( SGSprite * sprite )
 void sgSpriteDrawRads3f2f1f ( SGSprite * sprite , float x , float y , float z , float xscale , float yscale , float angle )
 void sgSpriteDrawDegs3f2f1f ( SGSprite * sprite , float x , float y , float z , float xscale , float yscale , float angle )
 void sgSpriteDrawRads2f2f1f ( SGSprite * sprite , float x , float y , float xscale , float yscale , float angle )
 void sgSpriteDrawDegs2f2f1f ( SGSprite * sprite , float x , float y , float xscale , float yscale , float angle )
 void sgSpriteDrawRads3f1f ( SGSprite * sprite , float x , float y , float z , float angle )
 void sgSpriteDrawDegs3f1f ( SGSprite * sprite , float x , float y , float z , float angle )
 void sgSpriteDrawRads2f1f ( SGSprite * sprite , float x , float y , float angle )
 void sgSpriteDrawDegs2f1f ( SGSprite * sprite , float x , float y , float angle )
 void sgSpriteDraw3f2f ( SGSprite * sprite , float x , float y , float z , float xscale , float yscale )
 void sgSpriteDraw2f2f ( SGSprite * sprite , float x , float y , float xscale , float yscale )
 void sgSpriteDraw3f ( SGSprite * sprite , float x , float y , float z )
 void sgSpriteDraw2f ( SGSprite * sprite , float x , float y )
 void sgSpriteGetSize ( SGSprite * sprite , SGuint * width , SGuint * height )
   SGTurtle  * sgTurtleCreateRads (float x , float y , float rads , SGbool draw )
\brief Create a turtle with angle in radians \memberof SGTurtle \param x Start x position \param y Start y position \param rads Start angle in radians \param draw The initial pen position, SG_TRUE to draw (down), SG_FALSE otherwise (up) \return The newly created turtle if successful, NULL otherwise.
   SGTurtle  * sgTurtleCreateDegs (float x , float y , float degs , SGbool draw )
\brief Create a turtle with angle in degrees \memberof SGTurtle \param x Start x position \param y Start y position \param degs Start angle in degrees \param draw The initial pen position, SG_TRUE to draw (down), SG_FALSE otherwise (up) \return The newly created turtle if successful, NULL otherwise.
 void sgTurtleDestroy ( SGTurtle * turtle )
...
 void sgTurtleReset ( SGTurtle * turtle )
\brief Reset the turtle's state to the start state \memberof SGTurtle \param turtle The turtle of which state to reset This function sets the turtle's state (position, angle, pen state) to what it was when the turtle was first created.
 void sgTurtlePush ( SGTurtle * turtle )
\brief Push the turtle's state to the stack \memberof SGTurtle \param turtle The turtle of which state to push This function pushes the turtle's state (position, angle, pen state) onto its stack, making it available for later.
 void sgTurtlePop ( SGTurtle * turtle )
\brief Pop the turtle's state off the stack and set it \memberof SGTurtle \param turtle The turtle of which state we want to pop and set This function gets the state on top of its stack, removes it and then sets it as the current state.
 void sgTurtleStep ( SGTurtle * turtle , float dist )
\brief Step ahead \memberof SGTurtle \param turtle The turtle to move \param dist The movement distance This function makes the turtle go \a dist steps ahead, drawing a line in between if the pen is down.
 void sgTurtleMove ( SGTurtle * turtle , float x , float y )
\brief Move the turtle to the absolute coordinates \memberof SGTurtle \param turtle The turtle to move \param x X coordinate \param y Y coordinate This function makes the turtle go to the absolute coordinates, drawing a line in between if the pen is down.
 void sgTurtleJump ( SGTurtle * turtle , float x , float y )
\brief Teleport the turtle to a new position without drawing \memberof SGTurtle \param turtle The turtle to teleport \param x X coordinate \param y Y coordinate This function is similar to \ref sgTurtleMove "sgTurtleMove", only it doesn't do any drawing even if the pen is down.
 void sgTurtlePenUp ( SGTurtle * turtle )
\brief Bring the pen up (disable drawing) \memberof SGTurtle \param turtle The turtle of which the pen we want to bring up This is equivalent to calling \ref sgTurtleSetPen "sgTurtleSetPen"(turtle, SG_FALSE).
 void sgTurtlePenDown ( SGTurtle * turtle )
\brief Put the pen down (enable drawing) \memberof SGTurtle \param turtle The turtle of which the pen we want to put down This is equivalent to calling \ref sgTurtleSetPen "sgTurtleSetPen"(turtle, SG_TRUE).
 void sgTurtleSetPen ( SGTurtle * turtle , SGbool pen )
\brief Change the pen state \memberof SGTurtle \param turtle The turtle of which pen state we want to set \param pen The new pen state Sets the turtle's pen state, thus enabling or disabling drawing.
\brief Get the turtle's pen state \memberof SGTurtle \param turtle The turtle of which pen state we want to get \return SG_TRUE if pen is down (drawing is enabled), SG_FALSE otherwise.
 void sgTurtleSetPos ( SGTurtle * turtle , float x , float y )
\brief Set the turtle's position without drawing \memberof SGTurtle \param turtle The turtle of which position to change \param[in] x New x position \param[in] y New y position \note Alias for \ref sgTurtleJump "sgTurtleJump", added for consistency and completeness.
 void sgTurtleSetPosX ( SGTurtle * turtle , float x )
...
 void sgTurtleSetPosY ( SGTurtle * turtle , float y )
...
 void sgTurtleGetPos ( SGTurtle * turtle , float * x , float * y )
...
 float sgTurtleGetPosX ( SGTurtle * turtle )
\brief Get the turtle's x position \memberof SGTurtle \param turtle The turtle of which position to get \return Turtle's x position \note If both x and y coordinates are required, consider \ref sgTurtleGetPos "sgTurtleGetPos".
 float sgTurtleGetPosY ( SGTurtle * turtle )
\brief Get the turtle's y position \memberof SGTurtle \param turtle The turtle of which position to get \return Turtle's y position \note If both x and y coordinates are required, consider \ref sgTurtleGetPos "sgTurtleGetPos".
 void sgTurtleTurnLeftRads ( SGTurtle * turtle , float rads )
...
 void sgTurtleTurnLeftDegs ( SGTurtle * turtle , float degs )
...
 void sgTurtleTurnRightRads ( SGTurtle * turtle , float rads )
...
 void sgTurtleTurnRightDegs ( SGTurtle * turtle , float degs )
...
 void sgTurtleSetAngleRads ( SGTurtle * turtle , float rads )
...
...
 void sgTurtleSetAngleDegs ( SGTurtle * turtle , float degs )
...
...
 void sgLightSpaceSetAmbience4f ( SGLightSpace * space , float r , float g , float b , float a )
   SGLight  * sgLightCreate ( SGLightSpace * space , float x , float y , float radius )
 void sgLightDestroy ( SGLight * light )
 void sgLightSetPos ( SGLight * light , float x , float y )
 void sgLightSetPosX ( SGLight * light , float x )
 void sgLightSetPosY ( SGLight * light , float y )
 void sgLightGetPos ( SGLight * light , float * x , float * y )
 float sgLightGetPosX ( SGLight * light )
 float sgLightGetPosY ( SGLight * light )
 void sgLightSetRadius ( SGLight * light , float radius )
 float sgLightGetRadius ( SGLight * light )
 void sgLightSetColor4f ( SGLight * light , float r , float g , float b , float a )
 void sgLightSetColor3f ( SGLight * light , float r , float g , float b )
 void sgLightSetColor2f ( SGLight * light , float g , float a )
 void sgLightSetColor1f ( SGLight * light , float g )
 void sgLightSetDepth ( SGLight * light , float depth )
 float sgLightGetDepth ( SGLight * light )
 void sgLightSetHeight ( SGLight * light , float height )
 float sgLightGetHeight ( SGLight * light )
 void sgLightSetActive ( SGLight * light , SGbool active )
 void sgLightSetStatic ( SGLight * light , SGbool stat )
 void sgLightSetShadow ( SGLight * light , SGbool shadow )
 void sgLightSetAngleRads ( SGLight * light , float rads )
 void sgLightSetAngleDegs ( SGLight * light , float degs )
 void sgLightSetConeRads ( SGLight * light , float rads )
 void sgLightSetConeDegs ( SGLight * light , float degs )
 void sgLightDraw ( SGLight * light )
 void sgLightDrawDBG ( SGLight * light )
   SGShadowShape  * sgShadowShapeCreateSegment ( SGLightSpace * space , float x1 , float y1 , float x2 , float y2 )
   SGShadowShape  * sgShadowShapeCreatePoly ( SGLightSpace * space , float x , float y , float * verts , size_t numverts )
   SGShadowShape  * sgShadowShapeCreateCircle ( SGLightSpace * space , float x , float y , float radius )
 void sgShadowShapeSetDepth ( SGShadowShape * shape , float depth )
 void sgTrailPopPoint ( SGTrail * trail )
\brief Create a trail \memberof SGTrail \param maxpoints The maximum number of points in the trail \return The newly created trail if successful, NULL otherwise.
 void sgTrailDestroy ( SGTrail * trail )
\brief Destroy a trail \memberof SGTrail \param trail The trail to destroy.
 void sgTrailAddPoint2f ( SGTrail * trail , float x , float y )
...
 void sgTrailAddBreak ( SGTrail * trail )
\brief Add a break (jump) to the trail \memberof SGTrail \param trail The trail to which we want to add the break Breaks are used when the trail "jumps" from one point to the next, without drawing a line in between.
 void sgTrailDraw ( SGTrail * trail )
...
   SGViewport  * sgViewportCreate4i4f ( SGuint wposx , SGuint wposy , SGuint wsizex , SGuint wsizey , float posx , float posy , float sizex , float sizey )
 void sgViewportDestroy ( SGViewport * viewport )
 void sgViewportSet4i4f ( SGViewport * viewport , SGuint wposx , SGuint wposy , SGuint wsizex , SGuint wsizey , float posx , float posy , float sizex , float sizey )
 void sgViewportSet4i ( SGViewport * viewport , SGuint wposx , SGuint wposy , SGuint wsizex , SGuint wsizey )
 void sgViewportReset ( SGViewport * viewport )
 void sgViewportSetWPos ( SGViewport * viewport , SGuint wposx , SGuint wposy )
 void sgViewportSetWSize ( SGViewport * viewport , SGuint wsizex , SGuint wsizey )
 void sgViewportSetPos ( SGViewport * viewport , float posx , float posy )
 void sgViewportSetSize ( SGViewport * viewport , float sizex , float sizey )
 void sgViewportZoomCentered ( SGViewport * viewport , float factor )
  SGbool sgViewportInsideWindow ( SGViewport * viewport , float x , float y )
  SGbool sgViewportInsideLocal ( SGViewport * viewport , float x , float y )
 void sgViewportLocalToWindow ( SGViewport * viewport , float * wx , float * wy , float lx , float ly )
 void sgViewportWindowToLocal ( SGViewport * viewport , float * lx , float * ly , float wx , float wy )
 void sgAStarDestroy ( SGAStar * search )
   SGList  * sgAStarPath ( SGAStar * search , size_t * pathlen )
   SGAStarNode  * sgAStarNodeCreate ( void * data )
   SGList  * sgNavGridSearchPath ( SGNavGrid * grid , size_t * pathlen )
Macros Details:
\private \def SG_EV_INTERNAL Used internally for \ref SGEntity "SGEntity"
@{
@{
\brief Use test functionality \deprecated This is included for testing purposes and therefore may be removed in the future. Defined to indicate that some "test" functionality should be used in the modules.
\brief Exported in siege calling convention This is used in all SIEGE functions. SIEGE currently uses the cdecl calling convention.
@{
\brief Version string In VMAJOR.VMINOR.VPATCH form, for example "0.1.5".
@{
@{
@}
@{
@{
@{
@{
Each vertex makes a point.
Each 2 vertices make a line. The number of passed vertices must be even.
Last vertex of previous line becomes the first vertex of the next one, drawing a connected line defined by the set of vertices. \sa SG_GRAPHICS_PRIMITIVE_TRIANGLE_STRIP SG_GRAPHICS_PRIMITIVE_QUAD_STRIP
The first vertex is the "origin" for all the lines. \sa SG_GRAPHICS_PRIMITIVE_TRIANGLE_FAN
Lines are created in a loop. This is similar to \ref SG_GRAPHICS_PRIMITIVE_LINE_STRIP "SG_GRAPHICS_PRIMITIVE_LINE_STRIP", except that the last and first vertex become connected by a line. \sa SG_GRAPHICS_PRIMITIVE_LINE_STRIP
Each 3 vertices make a triangle. The number of passed vertices must be a multiple of 3.
Last 2 vertices of the previous triangle become the first two vertices of the next one, making a connected hull. This is analogous to \ref SG_GRAPHICS_PRIMITIVE_LINE_STRIP "SG_GRAPHICS_PRIMITIVE_LINE_STRIP". \sa SG_GRAPHICS_PRIMITIVE_LINE_STRIP
The first vertex becomes a "common point" between all the triangles. This is analogous to \ref SG_GRAPHICS_PRIMITIVE_LINE_FAN "SG_GRAPHICS_PRIMITIVE_LINE_FAN". \sa SG_GRAPHICS_PRIMITIVE_LINE_FAN
Each 4 vertices make a quad. The number of passed vertices must be a multiple of 4.
Last 2 vertices of the previous quad become the first two vertices of the next one. This is analogous to \ref SG_GRAPHICS_PRIMITIVE_LINE_STRIP "SG_GRAPHICS_PRIMITIVE_LINE_STRIP" and \ref SG_GRAPHICS_PRIMITIVE_TRIANGLE_STRIP "SG_GRAPHICS_PRIMITIVE_TRIANGLE_STRIP". \sa SG_GRAPHICS_PRIMITIVE_LINE_STRIP SG_GRAPHICS_PRIMITIVE_TRIANGLE_STRIP
Create a convex polygon - the vertices passed are assumed to form one.
Create polygon that is possibly concave (but not self-intersecting). \note The vertices passed may be implicitly converted to a series of convex polygons. \note It is perfectly fine (if not best for performance) to pass a convex polygon as a concave one.
Create a polygon that is possibly self-intersecting. \note The vertices passed may be implicitly converted to a series of convex polygons. \note It is perfectly fine (if not best for performance) to pass non-intersecting polygon as an intersecting one.
@}
Segment shape, defined by two points and possibly a width.
Polygon shape, defined by a set of points.
A circle shape, defined by an inner and outer radius.
@}
Completely non-interactive body type.
"Normal" body type, with normal physics interaction.
A body type with seemingly infinite mass, but still movable (usually through user interaction). \note May be deprecated in the future.
A completely static, non-movable body type with seemingly infinite mass.
@{
Init flags
@{
@{
Functions Details:
  SGuint sgLoadModulesv (size_t n , va_list args )
Functions: sgLoadModule* Load a module or a number of modules. sgLoadModulesv - Load a va_list of modules sgLoadModules - Load multiple modules sgLoadModule - Load a single module The "Modules" folder is used to look for the modules. For example, if the module "Foo" is requested, SIEGE will look for it in this order (replace ".so" with whatever the dynamic library ending of the OS is): - Modules/SGModule-Foo.so - Modules/libSGModule-Foo.so - Modules/SGModule-Foo.debug.so - Modules/libSGModule-Foo.debug.so In debug builds, SIEGE tries to find the ".debug." versions first. Warning: This function should be called *before* sgInit()! Parameters: n - The number of modules to load args - The va_list of modules to load ... - List of modules to load (n items) name - Name of the module to load Returns: The number of successfully loaded modules.
Function: sgInit Initialize SIEGE. Warning: This function should be called *after* sgLoadModule() or sgLoadModules()! Parameters: flags - Init flags (can be zero) Returns: SG_TRUE on success, SG_FALSE otherwise. See Also: -
Function: sgDeinit Cleanup and deinit SIEGE. Warning: This should *always* be the last SIEGE function you call! Returns: SG_TRUE on success, SG_FALSE otherwise (which would leave the app in a messy state). See Also: -
Function: sgRun Start the SIEGE main loop. Returns: A value meant to be returned from the main() function. See Also: - -
Function: sgLoop Run a single SIEGE iteration. Parameters: code - The return code, which can be passed to the "return" from main() function Returns: - SG_TRUE if the program is to continue running, - SG_FALSE if an exit has been requested (either via sgStop() or the window closed). Example: (begin code) int main() { // ... init here ... SGint ret; while(sgLoop(&ret)) { // drawing goes here sgWindowSwapBuffers(); sgDrawClear(); } // ... deinit here ... return ret; } (end code) See Also: - -
 void sgStop ( SGint ret )
Function: sgStop Stop the program main loop. Warning: The loop SIEGE is currently in will (until the implementation is changed otherwise) run to the end before quitting! Parameters: ret - The value to ultimately return from the main() function See Also: - -
Function: sgGetTick Get the current tick (number of loops passed). Returns: The number of loops SIEGE has ran for since the start
\ingroup Window \brief Open a window \param width Window width \param height Window height \param bpp Window bits per pixel \param flags Window open flags \return SG_TRUE if successful, SG_FALSE otherwise \note If a window was already opened, it closes the "old" window and reopens a new one
\ingroup Window \brief Is the window opened? \return SG_TRUE if it is, SG_FALSE otherwise
 void sgWindowClose ()
\ingroup Window \brief Close the window
 void sgWindowSetTitlef (const char * format , ...)
\ingroup Window \brief Set the window title with printf-like formatting
 void sgWindowSetTitlefv (const char * format , va_list args )
\ingroup Window \brief Set the window title with vprintf-like formatting \param format The format, equivalent to format in vprintf \param args The va_list of arguments, equivalent to the arguments in vprintf
 void sgWindowSetTitle (const char * title )
\ingroup Window \brief Set the window title \param[in] title The new title This function takes a normal string and sets it as the title. It is called by the \ref sgWindowSetTitlef "f" and \ref sgWindowSetTitlefv "fv" functions.
  char * sgWindowGetTitle ()
\ingroup Window \brief Get the window title \return The window title - this value should \b not be freed!
 void sgWindowSetSize ( SGuint width , SGuint height )
\ingroup Window \brief Resize the window \param[in] width New window width \param[in] height New window height \sa sgWindowGetSize sgWindowSetWidth sgWindowSetHeight
 void sgWindowGetSize ( SGuint * width , SGuint * height )
\ingroup Window \brief Get the window size \param[out] width Pointer to the window width \param[out] height Pointer to the window height \sa sgWindowSetSize sgWindowGetWidth sgWindowGetHeight
\ingroup Window \brief Change the width of the window \param[in] width New window width This function preserves the window height, setting its width only. \note If both width and height are required to be set, consider \ref sgWindowSetSize "sgWindowSetSize". \sa sgWindowGetWidth sgWindowSetSize sgWindowSetHeight
\ingroup Window \brief Get the width of the window \return The window width or 0 if not opened \note If both width and height are required, consider \ref sgWindowGetSize "sgWindowGetSize". \sa sgWindowSetWidth sgWindowGetSize sgWindowGetHeight
\ingroup Window \brief Change the height of the window \param[in] height New window height This function preserves the window width, setting its height only. \note If both width and height are required to be set, consider \ref sgWindowSetSize "sgWindowSetSize". \sa sgWindowGetHeight sgWindowSetSize sgWindowSetWidth
\ingroup Window \brief Get the height of the window \return The window height or 0 if not opened \note If both width and height are required, consider \ref sgWindowGetSize "sgWindowGetSize". \sa sgWindowSetHeight sgWindowGetSize sgWindowGetWidth
\ingroup Window \brief Swap the window front and back buffers
   SGEvent  * sgEventCreate (float priority , SGenum type , void * data , SGEventCall * func )
\memberof SGEvent \brief Create an event handler \param priority Event handler priority \param type Event handler type \param data User data for the event handler \param func Function to call when the event is triggered \return The newly created event handler if successful, NULL otherwise.
 void sgEventDestroy ( SGEvent * event )
\memberof SGEvent \brief Destroy an event handler \param event The event handler to destroy. It should not be used anymore after this call.
 void sgEventCallv ( SGenum type , va_list args )
\memberof SGEvent \brief Trigger an event \param type The event type to trigger \param args The arguments to pass (treated as an opaque pointer by SIEGE) This function triggers an event, and in turn, every event handler of the correct type (unless previously stopped).
 void sgEventStop ()
\memberof SGEvent \brief Stop an event This function stops an event in its tracks, meaning that it doesn't "propagate" to event handlers further down.
   SGEntity  * sgEntityCreate (float priority )
Function: sgEntityCreate Create a new entity. Parameters: priority - The entity's priority - higher priority entities get their events called first Returns: The newly created entity if successful, NULL otherwise
 void sgEntityDestroy ( SGEntity * entity )
Function: sgEntityDestroy Destroy an entity. Note that destroying an entity automatically triggers its event. Parameters: entity - The entity to destroy. It should not be used anymore after this call.
 void sgEntitySetSprite ( SGEntity * entity , SGSprite * sprite )
Functions: sgEntity*Sprite Attach/get the entity's sprite. sgEntitySetSprite - Setter sgEntityGetSprite - Getter Parameters: entity - The entity of which the sprite we want to set/get sprite - The sprite which should be attached (NULL to detach) Returns: The getter returns the currently attached sprite, or NULL if none.
 void sgEntitySetMask ( SGEntity * entity , SGMask * mask )
Functions: sgEntity*Mask Attach/get the entity's collision mask. sgEntitySetMask - Setter sgEntityGetMask - Getter The mask is a simple bitmask which tells SIEGE which pixels are solid (as in, which collide) and which not. Parameters: entity - The entity of which the mask we want to set/get mask - The mask which should be attached (NULL to detach) Returns: The getter returns the currently attached mask, or NULL if none.
Functions: sgEntity*PhysicsBody Attach/get the entity's physical body. sgEntitySetPhysicsBody - Setter sgEntityGetPhysicsBody - Getter Parameters: entity - The entity of which the body we want to set/get body - The body which should be attached (NULL to detach) Returns: The getter returns the currently attached body, or NULL if none.
Functions: sgEntity*AudioSource Attach/get the entity's audio source. sgEntitySetAudioSource - Setter sgEntityGetAudioSource - Getter Parameters: entity - The entity of which the source we want to set/get source - The source which should be attached (NULL to detach) Returns: The getter returns the currently attached source, or NULL if none.
 void sgEntitySetPos ( SGEntity * entity , float x , float y )
Functions: sgEntity*Pos* Set/get the entity's position. sgEntitySetPos - Set the x and y position sgEntityGetPos - Get the x and y position sgEntitySetPosX - Set the x position, leaving y unchanged sgEntityGetPosX - Get the x position sgEntitySetPosY - Set the y position, leaving x unchanged sgEntityGetPosY - Get the y position Note: If a physical body is attached, its position will get changed. Parameters: entity - The entity of which the position we want to set/get x - Horizontal position y - Vertical position Returns: PosX/PosY variants return the current x and y position, respectively.
 void sgEntitySetDepth ( SGEntity * entity , float depth )
Functions: sgEntity*Depth Set/get the entity's depth. sgEntitySetDepth - Setter sgEntityGetDepth - Getter The depth controls on what "layer" the entity should get drawn - those with higher depth are higher up, and are thus drawn over those with a lower depth. Parameters: entity - The entity of which the position we want to set/get depth - The entity's depth Returns: The getter returns the current entity depth.
 void sgEntityDraw ( SGEntity * entity )
Function: sgEntityDraw Draw the entity with its current position and orientation. If a sprite is attached, thus function draws the sprite at the entity's position and orientation, otherwise it does nothing. Parameters: entity - The entity to draw.
Function: sgGetTime Returns: nanoseconds from a fixed, unspecified, origin.
 void sgNSleep ( SGulong nseconds )
Functions: sgNSleep, sgUSleep, sgMSleep Sleep for the given amount of {nano/micro/milli}seconds.
 void sgSleep ( SGulong seconds )
Function: sgSleep Sleep for the given amount of seconds.
   SGAudioBuffer  * sgAudioBufferCreateFile (const char * fname )
\memberof SGAudioBuffer \brief Create an audio buffer \param fname Filename of the audio file to load \return The newly created buffer if successful, NULL otherwise.
\memberof SGAudioBuffer \brief Destroy an audio buffer \param buffer The buffer to destroy. It should not be used anymore after this call.
 void sgAudioBufferSetData ( SGAudioBuffer * buffer , SGuint channels , SGuint format , SGuint frequency , void * data , size_t datalen )
\memberof SGAudioBuffer \brief Set the data of an audio buffer \param buffer The buffer of which the data should be modified \param channels The number of channels in the data \param format The audio format \param frequency The frequency (sample rate) of the data \param data Audio data to pass to the buffer \param datalen Length of the audio data in bytes
   SGAudioSource  * sgAudioSourceCreate (float priority , float volume , float pitch , SGbool looping )
\brief Create an audio source. \param priority The source priority \param volume Volume of the source, from 0.0 to 1.0 \param pitch The pitch of the source, 1.0 being no adjustment \param looping Should the source loop? \return The newly created source if successful, NULL otherwise.
\brief Destroy an audio source. \param source The source to destroy - it should not be used anymore after this call
\brief Play an audio source. \param source The source to play
\brief Is an audio source playing? \param source The source of which the status should be checked \return SG_TRUE if it is playing, SG_FALSE otherwise
\brief Pause an audio source. \param source The source to pause
\brief Is an audio source paused? \param source The source of which the status should be checked \return SG_TRUE if it is paused, SG_FALSE otherwise
\brief Rewind an audio source. \param source The source to rewind
\brief Stop an audio source. \param source The source to stop
\brief Is an audio source stopped? \param source The source of which the status should be checked \return SG_TRUE if it is stopped, SG_FALSE otherwise
\brief Is an audio source active (in use)? \param source The source of which the status should be checked \return SG_TRUE if it is active, SG_FALSE otherwise
@{
 void sgAudioSourceQueueBuffers ( SGAudioSource * source , SGAudioBuffer * * buffers , size_t numbuffers )
\brief Queue multiple buffers into a source \param source The source into which the buffers should be queued \param buffers The buffers to queue \param numbuffers How many buffers to queue This function queues \a numbuffers buffers into \a source. \see sgAudioSourceQueueBuffer
\brief Queue a single buffer into a source \param source The source into which the buffer should be queued \param buffer The buffer to queue This function queues a \a buffer into \a source. \see sgAudioSourceQueueBuffers
 void sgAudioSourceSetPosition3f ( SGAudioSource * source , float x , float y , float z )
\brief Set the x,y,z position \param source The source which we want to set the position of \param[in] x X position \param[in] y Y position \param[in] z Z position \see sgAudioSourceSetPosition2f \see sgAudioSourceGetPosition3f \see sgAudioSourceSetVelocity3f
 void sgAudioSourceSetPosition2f ( SGAudioSource * source , float x , float y )
\brief Set the x,y position, and z implicitly to 0 \param source The source which we want to set the position of \param[in] x X position \param[in] y Y position \see sgAudioSourceSetPosition3f \see sgAudioSourceGetPosition2f \see sgAudioSourceSetVelocity2f
 void sgAudioSourceGetPosition3f ( SGAudioSource * source , float * x , float * y , float * z )
\brief Get the x,y,z position \param source The source which we want to get the position of \param[out] x X position \param[out] y Y position \param[out] z Z position \see sgAudioSourceSetPosition3f \see sgAudioSourceGetPosition2f \see sgAudioSourceGetVelocity3f
 void sgAudioSourceGetPosition2f ( SGAudioSource * source , float * x , float * y )
\brief Get the x,y position \param source The source which we want to get the position of \param[out] x X position \param[out] y Y position \see sgAudioSourceSetPosition2f \see sgAudioSourceGetPosition3f \see sgAudioSourceGetVelocity2f
 void sgAudioSourceSetVelocity3f ( SGAudioSource * source , float x , float y , float z )
\brief Set the x,y,z velocity \param source The source which we want to set the velocity of \param[in] x X velocity \param[in] y Y velocity \param[in] z Z velocity \see sgAudioSourceSetVelocity2f \see sgAudioSourceGetVelocity3f \see sgAudioSourceSetPosition3f
 void sgAudioSourceSetVelocity2f ( SGAudioSource * source , float x , float y )
\brief Set the x,y velocity, and z implicitly to 0 \param source The source which we want to set the velocity of \param[in] x X velocity \param[in] y Y velocity \see sgAudioSourceSetVelocity3f \see sgAudioSourceGetVelocity2f \see sgAudioSourceSetPosition2f
 void sgAudioSourceGetVelocity3f ( SGAudioSource * source , float * x , float * y , float * z )
\brief Get the x,y,z velocity \param source The source which we want to get the velocity of \param[out] x X velocity \param[out] y Y velocity \param[out] z Z velocity \see sgAudioSourceSetVelocity3f \see sgAudioSourceGetVelocity2f \see sgAudioSourceGetPosition3f
 void sgAudioSourceGetVelocity2f ( SGAudioSource * source , float * x , float * y )
\brief Get the x,y velocity \param source The source which we want to get the velocity of \param[out] x X velocity \param[out] y Y velocity \see sgAudioSourceSetVelocity2f \see sgAudioSourceGetVelocity3f \see sgAudioSourceGetPosition2f
 void sgAudioSourceSetPitch ( SGAudioSource * source , float pitch )
\brief Set the pitch \param source The source which we want to set the pitch of \param[in] pitch The pitch to set Pitch 1.0 leaves the buffer to play as it is in the "original". \see sgAudioSourceGetPitch \see sgAudioSourceSetVolume \see sgAudioSourceSetLooping
\brief Get the pitch \param source The source which we want to get the pitch of \return The pitch \see sgAudioSourceSetPitch \see sgAudioSourceGetVolume \see sgAudioSourceGetLooping
 void sgAudioSourceSetVolume ( SGAudioSource * source , float volume )
\brief Set the volume \param source The source which we want to set the volume of \param[in] volume The volume to set Volume 1.0 leaves the buffer to play as it is in the "original". \see sgAudioSourceGetVolume \see sgAudioSourceSetPitch \see sgAudioSourceSetLooping
\brief Get the volume \param source The source which we want to get the volume of \return The volume \see sgAudioSourceSetVolume \see sgAudioSourceGetPitch \see sgAudioSourceGetLooping
\brief Set the source in (or out of) a loop \param source The source which we want to loop (or stop looping) \param[in] looping The looping to set Pitch 1.0 leaves the buffer to play as it is in the "original". \see sgAudioSourceGetLooping \see sgAudioSourceSetPitch \see sgAudioSourceSetVolume
\brief Is the source looping? \param source The source of which the status of the loop we want to get \return SG_TRUE if the source is in a loop, SG_FALSE otherwise \see sgAudioSourceSetLooping \see sgAudioSourceGetPitch \see sgAudioSourceGetVolume
   SGFont  * sgFontCreate (const char * fname , float height , SGuint preload )
\brief Load a font \param fname Filename of the font to load \param height Height of the font (in pt) \param preload Number of characters to preload; good values are 127 or 255. \return The newly created font info if successful, NULL otherwise.
 void sgFontDestroy ( SGFont * font )
\brief Destroy a font info \param font The font info to destroy. It should not be used anymore after this call.
   SGFont  * sgFontResize ( SGFont * font , float height )
\brief Resize the font, duplicating only if necessarry. \param font The font to resize \param height New font height \return A new font if one had to be created; otherwise a previously-created font. This function is similar to sgFontResizeCopy(), only it does not allocate a new font if it doesn't have to. \see sgFontResizeCopy
 void sgFontPrintfW ( SGFont * font , float x , float y , const wchar_t * format , ...)
@{
 void sgFontPrintf ( SGFont * font , float x , float y , const char * format , ...)
\brief printf-style print
 void sgFontPrintfv ( SGFont * font , float x , float y , const char * format , va_list args )
\brief vprintf-style print
 void sgFontPrintU32 ( SGFont * font , float x , float y , const SGdchar * text )
\brief Text-based print
 void sgFontPrintAlignedfW ( SGFont * font , float x , float y , SGenum align , const wchar_t * format , ...)
TODO
 void sgFontStrSizefW ( SGFont * font , float * x , float * y , const wchar_t * format , ...)
@{
 void sgFontStrSizef ( SGFont * font , float * x , float * y , const char * format , ...)
\brief printf-style text
 void sgFontStrSizefv ( SGFont * font , float * x , float * y , const char * format , va_list args )
\brief vprintf-style text
 void sgFontStrSizeU32 ( SGFont * font , float * x , float * y , const SGdchar * text )
\brief plain text
 void sgDrawBeginT ( SGenum type , SGTexture * texture )
\brief Begin drawing a textured primitive \param type Type of the primitive to draw \param texture The texture to use for the primitive
 void sgDrawBegin ( SGenum type )
\brief Begin drawing an untextured primitive \param type Type of the primitive to draw
 void sgDrawEnd ()
\brief Finish drawing the primitive
 void sgDrawColor4f (float r , float g , float b , float a )
\brief Set the draw color \param r Red \param g Green \param b Blue \param a Alpha
 void sgDrawTexCoord2f (float s , float t )
\brief Set the texture coordinate of the following vertex \param s Horizontal (x) coordinate \param t Vertical (y) coordinate \note Texture coordinates generally span from 0.0 to 1.0 - values outside this range can sometimes (depending on the texture clipping mode) indicate flipping or tiling.
 void sgDrawVertex3f (float x , float y , float z )
\brief Place a vertex at a specific depth \param x X coordinate \param y Y coordinate \param z Z coordinate (the depth)
 void sgDrawClear4f (float r , float g , float b , float a )
\brief Clear the drawable \param r Red \param g Green \param b Blue \param a Alpha
 void sgDrawClear ()
\brief Clear the drawable with black color
 void sgDrawPoint (float x , float y )
\brief Draw a point \param x X coordinate \param y Y coordinate
 void sgDrawPointSetSize (float size )
\brief Set the point size \param size New point size
 void sgDrawLine (float x1 , float y1 , float x2 , float y2 )
\brief Draw a line \param x1 Start x coordinate \param y1 Start y coordinate \param x2 End x coordinate \param y2 End y coordinate
 void sgDrawLineSetWidth (float width )
\brief Set the line width \param width New line width
 void sgDrawTriangle (float x1 , float y1 , float x2 , float y2 , float x3 , float y3 , SGbool fill )
@{
 void sgDrawQuad (float x1 , float y1 , float x2 , float y2 , float x3 , float y3 , float x4 , float y4 , SGbool fill )
@{
 void sgDrawRectangle (float x1 , float y1 , float x2 , float y2 , SGbool fill )
@{
 void sgDrawEllipse2R (float x , float y , float rx , float ry , SGbool fill )
@{
 void sgDrawCircle (float x , float y , float radius , SGbool fill )
@{
 void sgDrawEArcRads (float x , float y , float rx , float ry , float a1 , float a2 , SGbool ccw , SGbool fill )
@{
 void sgDrawArcRads (float x , float y , float r , float a1 , float a2 , SGbool ccw , SGbool fill )
@{
\brief Check the collision between two masks \param m1 The first mask to test \param x1 First mask's x position \param y1 First mask's y position \param m2 The second mask to test \param x2 Second mask's x position \param y2 Second mask's y position \return SG_TRUE if the masks collide, SG_FALSE otherwise. \todo Test whether this works or not \todo Use the \c precise field \todo Use bounding box info once BB's are added
 void sgMaskDrawDBG ( SGMask * mask , SGint x , SGint y , SGbool transparent )
\brief A function used for debugging the mask \warning This draws the mask pixel-for-pixel and is slow! \warning This function may be removed in the future! \todo sg[Sprite|Texture|Surface]CreateMask(SGMask* mask)
   SGTurtle  * sgTurtleCreateRads (float x , float y , float rads , SGbool draw )
\brief Create a turtle with angle in radians \memberof SGTurtle \param x Start x position \param y Start y position \param rads Start angle in radians \param draw The initial pen position, SG_TRUE to draw (down), SG_FALSE otherwise (up) \return The newly created turtle if successful, NULL otherwise.
   SGTurtle  * sgTurtleCreateDegs (float x , float y , float degs , SGbool draw )
\brief Create a turtle with angle in degrees \memberof SGTurtle \param x Start x position \param y Start y position \param degs Start angle in degrees \param draw The initial pen position, SG_TRUE to draw (down), SG_FALSE otherwise (up) \return The newly created turtle if successful, NULL otherwise.
 void sgTurtleDestroy ( SGTurtle * turtle )
\brief Destroy a turtle \memberof SGTurtle \param turtle The turtle to destroy
 void sgTurtleReset ( SGTurtle * turtle )
\brief Reset the turtle's state to the start state \memberof SGTurtle \param turtle The turtle of which state to reset This function sets the turtle's state (position, angle, pen state) to what it was when the turtle was first created.
 void sgTurtlePush ( SGTurtle * turtle )
\brief Push the turtle's state to the stack \memberof SGTurtle \param turtle The turtle of which state to push This function pushes the turtle's state (position, angle, pen state) onto its stack, making it available for later. \sa sgTurtlePop
 void sgTurtlePop ( SGTurtle * turtle )
\brief Pop the turtle's state off the stack and set it \memberof SGTurtle \param turtle The turtle of which state we want to pop and set This function gets the state on top of its stack, removes it and then sets it as the current state. \sa sgTurtlePush
 void sgTurtleStep ( SGTurtle * turtle , float dist )
\brief Step ahead \memberof SGTurtle \param turtle The turtle to move \param dist The movement distance This function makes the turtle go \a dist steps ahead, drawing a line in between if the pen is down.
 void sgTurtleMove ( SGTurtle * turtle , float x , float y )
\brief Move the turtle to the absolute coordinates \memberof SGTurtle \param turtle The turtle to move \param x X coordinate \param y Y coordinate This function makes the turtle go to the absolute coordinates, drawing a line in between if the pen is down. \sa sgTurtleJump
 void sgTurtleJump ( SGTurtle * turtle , float x , float y )
\brief Teleport the turtle to a new position without drawing \memberof SGTurtle \param turtle The turtle to teleport \param x X coordinate \param y Y coordinate This function is similar to \ref sgTurtleMove "sgTurtleMove", only it doesn't do any drawing even if the pen is down. \sa sgTurtleMove sgTurtleSetPos
 void sgTurtlePenUp ( SGTurtle * turtle )
\brief Bring the pen up (disable drawing) \memberof SGTurtle \param turtle The turtle of which the pen we want to bring up This is equivalent to calling \ref sgTurtleSetPen "sgTurtleSetPen"(turtle, SG_FALSE). \sa sgTurtlePenDown sgTurtleSetPen
 void sgTurtlePenDown ( SGTurtle * turtle )
\brief Put the pen down (enable drawing) \memberof SGTurtle \param turtle The turtle of which the pen we want to put down This is equivalent to calling \ref sgTurtleSetPen "sgTurtleSetPen"(turtle, SG_TRUE). \sa sgTurtlePenUp sgTurtleSetPen
 void sgTurtleSetPen ( SGTurtle * turtle , SGbool pen )
\brief Change the pen state \memberof SGTurtle \param turtle The turtle of which pen state we want to set \param pen The new pen state Sets the turtle's pen state, thus enabling or disabling drawing. \sa sgTurtlePenUp sgTurtlePenDown
\brief Get the turtle's pen state \memberof SGTurtle \param turtle The turtle of which pen state we want to get \return SG_TRUE if pen is down (drawing is enabled), SG_FALSE otherwise.
 void sgTurtleSetPos ( SGTurtle * turtle , float x , float y )
\brief Set the turtle's position without drawing \memberof SGTurtle \param turtle The turtle of which position to change \param[in] x New x position \param[in] y New y position \note Alias for \ref sgTurtleJump "sgTurtleJump", added for consistency and completeness.
 void sgTurtleSetPosX ( SGTurtle * turtle , float x )
\brief Set the turtle's x position, preserving y \memberof SGTurtle \param turtle The turtle of which position to change \param[in] x New x position
 void sgTurtleSetPosY ( SGTurtle * turtle , float y )
\brief Set the turtle's y position, preserving x \memberof SGTurtle \param turtle The turtle of which position to change \param[in] y New y position
 void sgTurtleGetPos ( SGTurtle * turtle , float * x , float * y )
\brief Get the turtle's current position \memberof SGTurtle \param turtle The turtle of which position to get \param[out] x X position pointer \param[out] y Y position pointer
 float sgTurtleGetPosX ( SGTurtle * turtle )
\brief Get the turtle's x position \memberof SGTurtle \param turtle The turtle of which position to get \return Turtle's x position \note If both x and y coordinates are required, consider \ref sgTurtleGetPos "sgTurtleGetPos".
 float sgTurtleGetPosY ( SGTurtle * turtle )
\brief Get the turtle's y position \memberof SGTurtle \param turtle The turtle of which position to get \return Turtle's y position \note If both x and y coordinates are required, consider \ref sgTurtleGetPos "sgTurtleGetPos".
 void sgTurtleTurnLeftRads ( SGTurtle * turtle , float rads )
\brief Turn the turtle left by angle in radians \memberof SGTurtle \param turtle The turtle to turn \param rads The angle in radians
 void sgTurtleTurnLeftDegs ( SGTurtle * turtle , float degs )
\brief Turn the turtle left by angle in degrees \memberof SGTurtle \param turtle The turtle to turn \param degs The angle in degrees
 void sgTurtleTurnRightRads ( SGTurtle * turtle , float rads )
\brief Turn the turtle right by angle in radians \memberof SGTurtle \param turtle The turtle to turn \param rads The angle in radians
 void sgTurtleTurnRightDegs ( SGTurtle * turtle , float degs )
\brief Turn the turtle right by angle in degrees \memberof SGTurtle \param turtle The turtle to turn \param degs The angle in degrees
 void sgTurtleSetAngleRads ( SGTurtle * turtle , float rads )
\brief Set the turtle's angle in radians \memberof SGTurtle \param turtle The turtle of which angle to set \param[in] rads The angle in radians
\brief Get the turtle's angle in radians \memberof SGTurtle \param turtle The turtle of which angle to get \return Turtle's angle in radians
 void sgTurtleSetAngleDegs ( SGTurtle * turtle , float degs )
\brief Set the turtle's angle in degrees \memberof SGTurtle \param turtle The turtle of which angle to set \param[in] degs The angle in degrees
\brief Get the turtle's angle in degrees \memberof SGTurtle \param turtle The turtle of which angle to get \return Turtle's angle in degrees
\brief Create a trail \memberof SGTrail \param maxpoints The maximum number of points in the trail \return The newly created trail if successful, NULL otherwise.
 void sgTrailDestroy ( SGTrail * trail )
\brief Destroy a trail \memberof SGTrail \param trail The trail to destroy. It should not be used anymore after this call.
 void sgTrailAddPoint2f ( SGTrail * trail , float x , float y )
\brief Add a new point to the trail \memberof SGTrail \param trail The trail to which we want to add the point \param x X position \param y Y position \sa sgTrailAddBreak
 void sgTrailAddBreak ( SGTrail * trail )
\brief Add a break (jump) to the trail \memberof SGTrail \param trail The trail to which we want to add the break Breaks are used when the trail "jumps" from one point to the next, without drawing a line in between. \sa sgTrailAddPoint2f
 void sgTrailDraw ( SGTrail * trail )
\brief Draw the trail \memberof SGTrail \param trail The trail to draw