Function Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
S
 spAcos
 spActiveSprite
 spAddBlackLayer
 spAddBorder
 spAddSpriteToCollection
 spAddTranslation
 spAddWhiteLayer
 spAsin
 spAtof
 spBindTexture
 spBlit3D
 spBlitPart3D
 spBlitSurface
 spBlitSurfacePart
 spChangeBundle
 spClearCache
 spClearTarget
 spCopySurface
 spCos
 spCreateDefaultWindow
 spCreateDirectoryChain
 spCreateSurface
 spCreateText
 spCreateTextBundle
 spCreateTextWithTranslation
 spCreateWindow
 spDeactivatePattern
 spDeleteBundle
 spDeleteSprite
 spDeleteSpriteCollection
 spDeleteSurface
 spDeleteText
 spDisableCaching
 spDrawSprite
 spDrawSprite3D
 spEllipse
 spEllipse3D
 spEllipseBorder
 spEllipseBorder3D
 spEnableCaching
 spEnableLight
 spFileDeleteList
 spFileExists
 spFileGetDirectory
 spFileSortList
 spFlip
 spFontAdd
 spFontAddBorder
 spFontAddButton
 spFontAddEveryLetterOfTextBundle
 spFontAddRange
 spFontChangeButton
 spFontChangeCacheSize
 spFontChangeLetter
 spFontDelete
 spFontDraw
 spFontDrawMiddle
 spFontDrawRight
 spFontGetButton
 spFontGetCacheStart
 spFontGetLetter
 spFontGetUnicodeFromUTF8
 spFontGetUTF8FromUnicode
 spFontLoad
 spFontMulWidth
 spFontReplaceColor
 spFontSetButtonBoderSigns
 spFontSetButtonStrategy
 spFontSetShadeColor
 spFontShadeButtons
 spFontWidth
 spGetFastRGB
 spGetFPS
 spGetHorizontalOrigin
 spGetHSV
 spGetInput
 spGetMatrix
 spGetOne_over_x_pointer
 spGetPixelPosition
 spGetPossibleLanguage
 spGetPossibleLanguageName
 spGetPossibleLanguagesCount
 spGetProjectionMatrix
 spGetRenderTarget
 spGetRenderTargetZBuffer
 spGetRGB
 spGetSizeFactor
 spGetTranslation
 spGetTranslationFromCaption
 spGetVerticalOrigin
 spGetVirtualKeyboard
 spGetWindowSurface
 spGetZFar
 spGetZNear
 spHorizentalLine
 spIdentity
 spInitCore
 spInitMath
 spInitPrimitives
 spIsCachingEnabled
 spIsKeyboardPolled
 spLine
 spLine3D
 spLoadBundle
 spLoadSpriteCollection
 spLoadSurface
 spLockRenderTarget
 spLoop
 spMax
 spMesh3D
 spMesh3DwithPos
 spMeshDelete
 spMeshLoadObj
 spMeshLoadObjSize
 spMin
 spNewSprite
 spNewSpriteCollection
 spNewSubSpriteNoTiling
 spNewSubSpriteTilingRow
 spNewSubSpriteWithTiling
 spPerspectiveQuad_tex
 spPerspectiveTriangle_tex
 spPollKeyboardInput
 spPrintDebug
 spProjectPoint3D
 spQuad
 spQuad_tex
 spQuad3D
 spQuadTex3D
 spQuitCore
 spQuitPrimitives
 spReadOneLine
 spReadPossibleLanguages
 spReadUntil
 spReAllocateZBuffer
 spRectangle
 spRectangle3D
 spRectangleBorder
 spRectangleBorder3D
 spRemoveDirectory
 spRemoveFile
 spRemoveSpriteFromCollection
 spRenameDirectory
 spRenameFile
 spResetAxisState
 spResetButtonsState
 spResetZBuffer
 spRotate
 spRotateX
 spRotateY
 spRotateZ
 spRotozoomSurface
 spRotozoomSurface3D
 spRotozoomSurfacePart
 spRotozoomSurfacePart3D
 spScale
 spScale2XFast
 spScale2XSmooth
 spSearchCaption
 spSelectRenderTarget
 spSelectSprite
 spSetAffineTextureHack
 spSetAlphaPattern
 spSetAlphaPattern4x4
 spSetAlphaTest
 spSetAmbientLightColor
 spSetBlending
 spSetCulling
 spSetDefaultLanguage
 spSetDefaultWindowSize
 spSetFrustumf2
 spSetHorizontalOrigin
 spSetLight
 spSetLightColor
 spSetLightPosition
 spSetPattern32
 spSetPattern64
 spSetPattern8
 spSetPerspective
 spSetPerspectiveStereoscopic
 spSetPerspectiveTextureMapping
 spSetSpriteRotation
 spSetSpriteZoom
 spSetTouchscreenEmulationButtons
 spSetVerticalOrigin
 spSetVirtualKeyboard
 spSetZBufferCache
 spSetZFar
 spSetZNear
 spSetZSet
 spSetZTest
 spSin
 spSoundDelete
 spSoundGetMusicVolume
 spSoundGetVolume
 spSoundInit
 spSoundLoad
 spSoundPause
 spSoundPauseAll
 spSoundPauseMusic
 spSoundPlay
 spSoundPlayMusic
 spSoundQuit
 spSoundSetChannels
 spSoundSetMusic
 spSoundSetMusicVolume
 spSoundSetVolume
 spSoundStop
 spSoundStopMusic
 spSqrt
 spStereoCreateProjectionMatrixes
 spStereoMergeSurfaces
 spStopKeyboardInput:
 spTan
 spTranslate
 spTriangle
 spTriangle_tex
 spTriangle3D
 spTriangleTex3D
 spUniqueCopySurface
 spUnlockRenderTarget
 spUnsave_Small_Sqrt
 spUpdateLight
 spUpdateSprite
 spUsePrecalculatedNormals
PREFIX Sint32 spAcos(Sint32 value)
Calculates the arcus cosinus of a fixed point value
PREFIX spSpritePointer spActiveSprite(spSpriteCollectionPointer collection)
Returns the active sprite of the sprite Collection.
PREFIX void spAddBlackLayer(int alpha)
Adds a transparent black layer to the target surface.
PREFIX void spAddBorder(SDL_Surface *surface,
Uint16 borderColor,
Uint16 backgroundcolor)
Adds a border to the surface with the background color backgroundcolor.
PREFIX void spAddSpriteToCollection(spSpriteCollectionPointer collection,
spSpritePointer sprite)
This adds a existing (!)
PREFIX void spAddTranslation(spTextPointer text,
Uint16 language,
const char *translation)
Adds a translation to a text.
PREFIX void spAddWhiteLayer(int alpha)
Adds a transparent white layer to the target surface.
PREFIX Sint32 spAsin(Sint32 value)
Calculates the arcus sinus of a fixed point value
PREFIX Sint32 spAtof(char *buffer)
Converts a string to a Sint32 fixed point number like atof.
PREFIX void spBindTexture(SDL_Surface *texture)
This texture will be used for all following draw operations with textures
PREFIX void spBlit3D(Sint32 x1,
Sint32 y1,
Sint32 z1,
SDL_Surface *surface)
Blits a surface in 3d space very fast.
PREFIX void spBlitPart3D(Sint32 x1,
Sint32 y1,
Sint32 z1,
SDL_Surface *surface,
Sint32 sx,
Sint32 sy,
Sint32 w,
Sint32 h)
Blits a part of a surface in 3d space very fast.
PREFIX void spBlitSurface(Sint32 x,
Sint32 y,
Sint32 z,
SDL_Surface *surface)
Draws a Surface on the target.
PREFIX void spBlitSurfacePart(Sint32 x,
Sint32 y,
Sint32 z,
SDL_Surface *surface,
Sint32 sx,
Sint32 sy,
Sint32 w,
Sint32 h)
Draws a part of a Surface on the target.
PREFIX void spChangeBundle(spTextPointer text,
spBundlePointer bundle)
Texts can change their bundles.
PREFIX void spClearCache()
Deletes ALL cached surfaces! 
PREFIX void spClearTarget(Uint32 color)
Clears the Rendertarget.
PREFIX SDL_Surface* spCopySurface(SDL_Surface *surface)
This creates a “copy” of a surface.
PREFIX Sint32 spCos(Sint32 value)
Calculates the cosinus of a fixed point value
PREFIX SDL_Surface* spCreateDefaultWindow(void)
Creates a default window with no fullscreen for PC, but resizeable for PC.
PREFIX spFileError spCreateDirectoryChain(const char *directories)
Creates a directory chain (like /home/user/.config/pinball/settings) if it not exists already.
PREFIX SDL_Surface* spCreateSurface(int width,
int height)
Creates a 16 Surface 100% compatible to the engine.
PREFIX spTextPointer spCreateText(const char *caption,
spBundlePointer bundle)
Creates a new text, which contains different translations of the same text.
PREFIX spBundlePointer spCreateTextBundle()
Creates a text bundle.
PREFIX spTextPointer spCreateTextWithTranslation(const char *caption,
spBundlePointer bundle,
Uint16 language,
const char *translation)
Works like a mix of spCreateText and spAddTranslation.
PREFIX SDL_Surface* spCreateWindow(int width,
int height,
int fullscreen,
int allowresize)
Creates the Window in the plattform depended resolution.
PREFIX void spDeactivatePattern()
Deactivates the pattern.
PREFIX void spDeleteBundle(spBundlePointer bundle,
int keepText)
Deletes a whole bundle.
PREFIX void spDeleteSprite(spSpritePointer sprite)
Deletes a sprite and all subsprites.
PREFIX void spDeleteSpriteCollection(spSpriteCollectionPointer collection,
int keepSprites)
Deletes a collection.
PREFIX void spDeleteSurface(SDL_Surface *surface)
Deletes a surface, if it is not cached or the reference counter reaches 0.
PREFIX void spDeleteText(spTextPointer text)
Deletes a text.
PREFIX void spDisableCaching()
Disables chaching of surfaces.
PREFIX void spDrawSprite(Sint32 x,
Sint32 y,
Sint32 z,
spSpritePointer sprite)
Draws a sprite with z set and test.
PREFIX void spDrawSprite3D(Sint32 x,
Sint32 y,
Sint32 z,
spSpritePointer sprite)
Draws a sprite with z set and test in 3d space.
PREFIX void spEllipse(Sint32 x,
Sint32 y,
Sint32 z,
Sint32 rx,
Sint32 ry,
Uint32 color)
Draws a filled ellipse.
PREFIX void spEllipse3D(Sint32 x,
Sint32 y,
Sint32 z,
Sint32 rx,
Sint32 ry,
Uint16 color)
Draws a billboard ellipse in 3d space.
PREFIX void spEllipseBorder(Sint32 x,
Sint32 y,
Sint32 z,
Sint32 rx,
Sint32 ry,
Sint32 bx,
Sint32 by,
Uint32 color)
Draws a filled ellipse border.
PREFIX void spEllipseBorder3D(Sint32 x,
Sint32 y,
Sint32 z,
Sint32 rx,
Sint32 ry,
Sint32 bx,
Sint32 by,
Uint16 color)
Draws a billboard ellipse border in 3d space.
PREFIX void spEnableCaching()
Enables caching surfaces.
PREFIX void spEnableLight(int number,
Sint32 active)
Specifies, whether a light is used or not for the light calculation.
PREFIX void spFileDeleteList(spFileListPointer list)
Deletes a list created by spFileGetDirectory.
PREFIX int spFileExists(const char *filename)
Tests, whether the file “filename” exists ;-)
PREFIX spFileError spFileGetDirectory(spFileListPointer *pointer,
char *directory,
int recursive,
int no_hidden_files)
Searches for files Puts a double linked list of found files in directory to pointer, found files are directly extracted from the system and may very well not be ordered.
PREFIX void spFileSortList(spFileListPointer *list,
spFileSortType sortBy)
Sorts the file list like you want.
PREFIX void spFlip(void)
Draws the changes in the window Surface on the screen.
PREFIX void spFontAdd(spFontPointer font,
char *characters,
Uint16 color)
Adds characters to the font.
PREFIX void spFontAddBorder(spFontPointer font,
Uint16 bordercolor)
For better viewing on different backgrounds, most of the time it is useful to have a border around the letters.
PREFIX void spFontAddButton(spFontPointer font,
Uint32 character,
char *caption,
Uint16 fgColor,
Uint16 bgColor)
Adds a button the the font.
PREFIX void spFontAddEveryLetterOfTextBundle(spFontPointer font,
spBundlePointer bundle,
Uint16 color)
Adds every letter used in the given sparrowText Bundle of Translations.
PREFIX void spFontAddRange(spFontPointer font,
char *from,
char *to,
Uint16 color)
Adds a range of utf8 characters to the font defined by a start and end character
PREFIX void spFontChangeButton(spFontPointer font,
spLetterPointer letter,
Uint32 character,
char *caption,
Uint16 fgColor,
Uint16 bgColor)
Same like spFontChangeLetter, but for the Buttons.
PREFIX void spFontChangeCacheSize(spFontPointer font,
Sint32 size)
Changes to size of the cache.
PREFIX void spFontChangeLetter(spFontPointer font,
spLetterPointer letter,
Uint32 character,
Uint16 color)
Once I had a bug in sparrowFont.
PREFIX void spFontDelete(spFontPointer font)
Deletes a font
PREFIX int spFontDraw(Sint32 x,
Sint32 y,
Sint32 z,
const char *text,
spFontPointer font)
Draws a left aligned text to the render target
PREFIX int spFontDrawMiddle(Sint32 x,
Sint32 y,
Sint32 z,
const char *text,
spFontPointer font)
Draws a center aligned text to the render target
PREFIX int spFontDrawRight(Sint32 x,
Sint32 y,
Sint32 z,
const char *text,
spFontPointer font)
Draws a right aligned text to the render target
PREFIX spLetterPointer spFontGetButton(spFontPointer font,
Uint32 character)
Works like spFontGetLetter but for buttons.
PREFIX Sint32 spFontGetCacheStart(spFontPointer font)
Returns the start of the cache.
PREFIX spLetterPointer spFontGetLetter(spFontPointer font,
Uint32 character)
Returns the letter struct of a letter
PREFIX Uint32 spFontGetUnicodeFromUTF8(const char *sign)
Converts a utf8 sign to unicode
PREFIX char* spFontGetUTF8FromUnicode(Uint32 sign,
char *buffer,
int len)
Converts a unicode character to utf8
PREFIX spFontPointer spFontLoad(const char *fontname,
Uint32 size)
Loads a ttf font
PREFIX void spFontMulWidth(spFontPointer font,
Sint32 factor)
This function changes the width, which is similar to the distance of the letters, of the whole font.
PREFIX void spFontReplaceColor(spFontPointer font,
Uint16 oldcolor,
Uint16 newcolor)
If you want to change the color of every letter in the font, use this function.
Sets the starting and end sign for buttons, the defaults are ‘[‘ and ‘]’, which means, that “[A]” will be drawn as a button with the caption A, if you called spFontAddButton(font,’A’,”A”,fg,bg) before.
PREFIX void spFontSetButtonStrategy(int strategy)
Sets the strategy used to determine, whether buttons are round (like normal buttons on handhelds) or quadric (like keyboard buttons).
PREFIX void spFontSetShadeColor(int value)
Sets the “background” color, if you want to shade smoothly.
PREFIX void spFontShadeButtons(int value)
Desides, whether the button font should be shaded or not.
PREFIX int spFontWidth(const char *text,
spFontPointer font)
Width of a text
Returns like spGetRGB a 16 bit color out of RGB values, but it is faster and a little bit inaccurate - if you don’t mind, don’t see it or need it VERY often ingame, use this!
PREFIX int spGetFPS(void)
Returns the FPS of the Loop Function
PREFIX Sint32 spGetHorizontalOrigin()
Returns the horizontal origin.
PREFIX Uint16 spGetHSV(Sint32 h,
Uint8 s,
Uint8 v)
Returns a 16 bit color defined by the HSV values.
PREFIX PspInput spGetInput(void)
Returns a pointer of the spInput struct, where the input values will be set.
PREFIX Sint32* spGetMatrix()
Returns you the REAL modelview matrix pointer! 
PREFIX Sint32* spGetOne_over_x_pointer()
Returns a pointer/array of SP_ONE (65536) values of 1/x
PREFIX int spGetPixelPosition(Sint32 x,
Sint32 y)
Returns where the pixel is in relation to the screen.
PREFIX Uint16 spGetPossibleLanguage(int nr)
Gives you the language code for a possible language identified by its number.
PREFIX char* spGetPossibleLanguageName(int nr)
Gives you the language name for a possible language identified by its number.
PREFIX int spGetPossibleLanguagesCount()
Gets you the total number of all possible languages, if you read them with spReadPossibleLanguages.
PREFIX Sint32* spGetProjectionMatrix()
Returns the projetion matrix pointer.
PREFIX SDL_Surface* spGetRenderTarget()
Returns the render target.
PREFIX Sint32* spGetRenderTargetZBuffer()
Returns a pointer to the zBuffer of the render target
PREFIX Uint16 spGetRGB(int r,
int g,
int b)
Returns a 16 bit RGB color
PREFIX Sint32 spGetSizeFactor(void)
Returns a fixed point factor for the screen size.
PREFIX char* spGetTranslation(spTextPointer text)
Gives you the translation a text in the default language or (if not avaible) in the first added language.
PREFIX char* spGetTranslationFromCaption(spBundlePointer bundle,
char *caption)
Gives you the translation in the default language of a text.
PREFIX Sint32 spGetVerticalOrigin()
Returns the vertical origin.
PREFIX SDL_Surface* spGetVirtualKeyboard()
This functions returns the precalculated and prescaled keyboard design.
PREFIX SDL_Surface* spGetWindowSurface(void)
Returns the window Surface.
PREFIX Sint32 spGetZFar()
Gets the value, to which the zbuffer will be reseted.
PREFIX Sint32 spGetZNear()
Gets the value, to which the zbuffer will be reseted.
PREFIX void spHorizentalLine(Uint16 *pixel,
Sint32 x,
Sint32 y,
Sint32 l_,
Uint32 color_,
Uint32 check,
Sint32 engineWindowX,
Sint32 engineWindowY)
Draws a fast horizental line with one color.
PREFIX void spIdentity()
Sets the modelview matrix to the identity matrix.
PREFIX void spInitCore(void)
spInitCore initializes SDL, SDL_TTF and other stuff.
PREFIX void spInitMath(void)
Initializes the fixed point look up tables for sin, cos, etc.
PREFIX void spInitPrimitives()
Initializes some Look up tables and the zBufferCache.
PREFIX int spIsCachingEnabled()
Says, whether caching of surfaces is enabled or not.
PREFIX int spIsKeyboardPolled()
Says, whether input from the keyboard is polled.
PREFIX void spLine(Sint32 x1,
Sint32 y1,
Sint32 z1,
Sint32 x2,
Sint32 y2,
Sint32 z2,
Uint32 color)
Draws a colored line
PREFIX void spLine3D(Sint32 x1,
Sint32 y1,
Sint32 z1,
Sint32 x2,
Sint32 y2,
Sint32 z2,
Uint16 color)
Draws a line in the 3d space with the given color.
PREFIX spBundlePointer spLoadBundle(const char *filename,
int own_bundle)
Loads a bundle out of a text file.
PREFIX spSpriteCollectionPointer spLoadSpriteCollection(
   char *filename,
   SDL_Surface *fallback_surface
)
Loads the a sprite Collection from a ssc-file and returns it as a sprite collection.
PREFIX SDL_Surface* spLoadSurface(char *name)
Loads a 16 Surface needed by the engine.
PREFIX Uint16* spLockRenderTarget()
Locks the RenderTarget and returns a pointer to the raw 16 bit pixel data.
PREFIX int spLoop(void ( *spDraw )( void ),
int ( *spCalc )( Uint32 steps ),
Uint32 minwait,
void ( *spResize )( Uint16 w, Uint16 h ),
void ( *spEvent )( SDL_Event *e ))
Starts a main loop
PREFIX Sint32 spMax(Sint32 a,
Sint32 b)
Returns the biggest of 2 numbers.
PREFIX int spMesh3D(spModelPointer mesh,
int updateEdgeList)
Draws a mesh in 3D space.
PREFIX int spMesh3DwithPos(Sint32 x,
Sint32 y,
Sint32 z,
spModelPointer mesh,
int updateEdgeList)
like spMesh3D, but with an additional position.
PREFIX void spMeshDelete(spModelPointer mesh)
Deletes a mesh
PREFIX spModelPointer spMeshLoadObj(char *name,
SDL_Surface *texture,
Uint16 color)
Loads a wavefront object file (.obj).
PREFIX spModelPointer spMeshLoadObjSize(char *name,
SDL_Surface *texture,
Uint16 color,
Sint32 size)
Loads a wavefront object file (.obj) like spMeshLoadObj, but with a fourth parameter for resizing.
PREFIX Sint32 spMin(Sint32 a,
Sint32 b)
Returns the smallest of 2 numbers.
PREFIX spSpritePointer spNewSprite(char *name)
Creates a new (empty) sprite.
PREFIX spSpriteCollectionPointer spNewSpriteCollection()
Sometimes it is useful to encapsulated different sprites to one bundle, e.g.
PREFIX spSubSpritePointer spNewSubSpriteNoTiling(spSpritePointer sprite,
SDL_Surface *surface,
Sint32 duration)
Creates a new subSprite out of a whole surface.
PREFIX void spNewSubSpriteTilingRow(spSpritePointer sprite,
SDL_Surface *surface,
Sint32 sx,
Sint32 sy,
Sint32 sw,
Sint32 sh,
Sint32 hopw,
Sint32 hoph,
Sint32 count,
Sint32 duration)
Very similar to spNewSubSpriteWithTiling, but instead of adding one part of a surface, multiple parts (“tiles”) of the same surface are added.
PREFIX spSubSpritePointer spNewSubSpriteWithTiling(spSpritePointer sprite,
SDL_Surface *surface,
Sint32 sx,
Sint32 sy,
Sint32 sw,
Sint32 sh,
Sint32 duration)
Creates a new subSprite out of a part of a surface (tiling).
PREFIX int spPerspectiveQuad_tex(Sint32 x1,
Sint32 y1,
Sint32 z1,
Sint32 u1,
Sint32 v1,
Sint32 w1,
Sint32 x2,
Sint32 y2,
Sint32 z2,
Sint32 u2,
Sint32 v2,
Sint32 w2,
Sint32 x3,
Sint32 y3,
Sint32 z3,
Sint32 u3,
Sint32 v3,
Sint32 w3,
Sint32 x4,
Sint32 y4,
Sint32 z4,
Sint32 u4,
Sint32 v4,
Sint32 w4,
Uint32 color)
Draws a colored quad with perspectively correct texture mapping.
PREFIX int spPerspectiveTriangle_tex(Sint32 x1,
Sint32 y1,
Sint32 z1,
Sint32 u1,
Sint32 v1,
Sint32 w1,
Sint32 x2,
Sint32 y2,
Sint32 z2,
Sint32 u2,
Sint32 v2,
Sint32 w2,
Sint32 x3,
Sint32 y3,
Sint32 z3,
Sint32 u3,
Sint32 v3,
Sint32 w3,
Uint32 color)
Draws a colored Triangle with perspectively correct texture mapping.
PREFIX void spPollKeyboardInput(char *buffer,
int bufferSize,
Sint32 enter_key_mask)
Prints all following keyboard input (that is numbers, letters and symbols) into the passed buffer.
PREFIX void spPrintDebug(char *text)
spPrintDebug prints debug stuff with timestamp
PREFIX void spProjectPoint3D(Sint32 x,
Sint32 y,
Sint32 z,
Sint32 *px,
Sint32 *py,
Sint32 *pz,
Sint32 *w,
Sint32 withModelview)
Projects a point in the 3D scene.
PREFIX int spQuad(Sint32 x1,
Sint32 y1,
Sint32 z1,
Sint32 x2,
Sint32 y2,
Sint32 z2,
Sint32 x3,
Sint32 y3,
Sint32 z3,
Sint32 x4,
Sint32 y4,
Sint32 z4,
Uint32 color)
Draws a colored quad.
PREFIX int spQuad_tex(Sint32 x1,
Sint32 y1,
Sint32 z1,
Sint32 u1,
Sint32 v1,
Sint32 x2,
Sint32 y2,
Sint32 z2,
Sint32 u2,
Sint32 v2,
Sint32 x3,
Sint32 y3,
Sint32 z3,
Sint32 u3,
Sint32 v3,
Sint32 x4,
Sint32 y4,
Sint32 z4,
Sint32 u4,
Sint32 v4,
Uint32 color)
Draws a colored quad with texture mapping.
PREFIX int spQuad3D(Sint32 x1,
Sint32 y1,
Sint32 z1,
Sint32 x2,
Sint32 y2,
Sint32 z2,
Sint32 x3,
Sint32 y3,
Sint32 z3,
Sint32 x4,
Sint32 y4,
Sint32 z4,
Uint16 color)
Draws a quad in 3D space.
PREFIX int spQuadTex3D(Sint32 x1,
Sint32 y1,
Sint32 z1,
Sint32 u1,
Sint32 v1,
Sint32 x2,
Sint32 y2,
Sint32 z2,
Sint32 u2,
Sint32 v2,
Sint32 x3,
Sint32 y3,
Sint32 z3,
Sint32 u3,
Sint32 v3,
Sint32 x4,
Sint32 y4,
Sint32 z4,
Sint32 u4,
Sint32 v4,
Uint16 color)
Draws a textured quad in 3D space.
PREFIX void spQuitCore(void)
Just quits the Core.
PREFIX void spQuitPrimitives()
Releases stuff and frees memory.
PREFIX int spReadOneLine(spFilePointer file ,
char *buffer,
int buffer_len)
Reads one line from a SDL_RWops file.
PREFIX void spReadPossibleLanguages(const char *filename)
Reads a “possible languages file”.
PREFIX int spReadUntil(spFilePointer file ,
char *buffer,
int buffer_len,
char end_sign,
char ignore_windows_return)
Reads signs from the file “file” until the buffer is full (buffer_len) or the sign “end_sign” is reached.
PREFIX void spReAllocateZBuffer()
Reallocates the zBuffer.
PREFIX void spRectangle(Sint32 x,
Sint32 y,
Sint32 z,
Sint32 w,
Sint32 h,
Uint32 color)
Draws a filled Rectangle.
PREFIX void spRectangle3D(Sint32 x,
Sint32 y,
Sint32 z,
Sint32 w,
Sint32 h,
Uint16 color)
Draws a billboard rectangle in 3d space.
PREFIX void spRectangleBorder(Sint32 x,
Sint32 y,
Sint32 z,
Sint32 w,
Sint32 h,
Sint32 bx,
Sint32 by,
Uint32 color)
Draws a filled Rectangle border.
PREFIX void spRectangleBorder3D(Sint32 x,
Sint32 y,
Sint32 z,
Sint32 w,
Sint32 h,
Sint32 bx,
Sint32 by,
Uint16 color)
Draws a billboard rectangle border in 3d space.
PREFIX spFileError spRemoveDirectory(const char *dirname)
Removes an EMPTY directory
PREFIX spFileError spRemoveFile(const char *filename)
Removes/deletes a file
PREFIX void spRemoveSpriteFromCollection(spSpritePointer sprite)
Removes a sprite from a collection.
Renames a directory, works exactly like spRenameFile.
PREFIX spFileError spRenameFile(const char* filename ,
const char *newname)
Renames a file
PREFIX void spResetAxisState(void)
Resets the state of any axis (digital and analog) in the generic device to 0 (=unpressed)
PREFIX void spResetButtonsState(void)
Resets the state of any button in the generic device to 0 (=unpressed)
PREFIX void spResetZBuffer()
Resets the zBuffer with the farest value.
PREFIX void spRotate(Sint32 x,
Sint32 y,
Sint32 z,
Sint32 rad)
Rotates rad radians around the vector (x,y,z).
PREFIX void spRotateX(Sint32 rad)
Rotates rad radians around the x-axis.
PREFIX void spRotateY(Sint32 rad)
Rotates rad radians around the y-axis.
PREFIX void spRotateZ(Sint32 rad)
Rotates rad radians around the z-axis.
PREFIX void spRotozoomSurface(Sint32 x,
Sint32 y,
Sint32 z,
SDL_Surface *surface,
Sint32 zoomX,
Sint32 zoomY,
Sint32 angle)
Draws a surface with rotozoom (Free rotating and zooming of the surface).
PREFIX void spRotozoomSurface3D(Sint32 x,
Sint32 y,
Sint32 z,
SDL_Surface *surface,
Sint32 zoomX,
Sint32 zoomY,
Sint32 angle)
Draws a rotozoomed surface in 3d space.
PREFIX void spRotozoomSurfacePart(Sint32 x,
Sint32 y,
Sint32 z,
SDL_Surface *surface,
Sint32 sx,
Sint32 sy,
Sint32 w,
Sint32 h,
Sint32 zoomX,
Sint32 zoomY,
Sint32 angle)
Draws a part of a surface with rotozoom (Free rotating and zooming of the surface).
PREFIX void spRotozoomSurfacePart3D(Sint32 x,
Sint32 y,
Sint32 z,
SDL_Surface *surface,
Sint32 sx,
Sint32 sy,
Sint32 w,
Sint32 h,
Sint32 zoomX,
Sint32 zoomY,
Sint32 angle)
Draws a rotozoomed part of a surface in 3d space.
PREFIX void spScale(Sint32 x,
Sint32 y,
Sint32 z)
spScale scales the modelview matrix.
PREFIX void spScale2XFast(SDL_Surface *source,
SDL_Surface *destination)
Copies and scales source to destination very fast.
PREFIX void spScale2XSmooth(SDL_Surface *source,
SDL_Surface *destination)
Like spScale2XFast, but with the MAME2x scale up algo.
PREFIX spTextPointer spSearchCaption(spBundlePointer bundle,
char *caption)
Finds a specific spText in a bundle.
PREFIX void spSelectRenderTarget(SDL_Surface *target)
Selects the render surface.
PREFIX void spSelectSprite(spSpriteCollectionPointer collection,
char *name)
Sets the active sprite of the collection.
PREFIX void spSetAffineTextureHack(Uint32 test)
The texture rendering is fast, but a bit wrong.
PREFIX void spSetAlphaPattern(int alpha,
int shift)
Sets the pattern in dependence of an alpha value to “emulate” alpha blending.
PREFIX void spSetAlphaPattern4x4(int alpha,
int shift)
Works pretty like spSetAlphaPattern, but it uses 4x4 pattern internal.
PREFIX void spSetAlphaTest(Uint32 test)
(De)Activates the alpha test (default on).
PREFIX void spSetAmbientLightColor(Uint32 r,
Uint32 g,
Uint32 b)
Sets the global ambient light value.
PREFIX void spSetBlending(Sint32 value)
(De)Activates real blending.
PREFIX void spSetCulling(char value)
(De)Activates culling.
PREFIX void spSetDefaultLanguage(Uint16 language)
Sets the default language of sparrowText.
PREFIX void spSetDefaultWindowSize(int w,
int h)
Sets defaults values for the window.
void spSetFrustumf2(Sint32 *matrix,
Sint32 left,
Sint32 right,
Sint32 bottom,
Sint32 top,
Sint32 znear,
Sint32 zfar)
Function for setting up the frustom of the projection matrix.
PREFIX void spSetHorizontalOrigin(Sint32 origin)
Sets the horizontal origin of the Surface rectangle and ellipses functions.
PREFIX void spSetLight(int value)
Sets Light Calculation on or off.
PREFIX void spSetLightColor(int number,
Uint32 r,
Uint32 g,
Uint32 b)
Sets the color of a light
PREFIX void spSetLightPosition(int number,
Sint32 x,
Sint32 y,
Sint32 z)
Sets the Light Position.
PREFIX void spSetPattern32(Uint32 first_32_bit,
Uint32 last_32_bit)
Sets the pattern with two 32 bit ints, each defines 4 lines
PREFIX void spSetPattern64(Uint64 pattern)
Sets the pattern with two 64 bit int, it defines all 8 lines
PREFIX void spSetPattern8(Uint8 line1,
Uint8 line2,
Uint8 line3,
Uint8 line4,
Uint8 line5,
Uint8 line6,
Uint8 line7,
Uint8 line8)
Sets the pattern with eight 8 bit ints line by line
PREFIX void spSetPerspective(float fovyInDegrees,
float aspectRatio,
float znear,
float zfar)
Sets the projection matrix.
PREFIX void spSetPerspectiveStereoscopic(Sint32 *projectionMatrix,
float fovyInDegrees,
float aspectRatio,
float znear,
float zfar ,
float z0,
float distance)
Sets and returns a projection matrix for steroscopic viewing, so most of the times you will call this function for each eye once.
PREFIX void spSetPerspectiveTextureMapping(int value)
Every of the ”Real” 3D functions with textures can be rendered with affine texture mapping what may look a bit “wobly” or perspectivly correct, which looks the best, but may be slower!
PREFIX void spSetSpriteRotation(spSpritePointer sprite,
Sint32 rotation)
Sets the rotation of the sprite.
PREFIX void spSetSpriteZoom(spSpritePointer sprite,
Sint32 zoomX,
Sint32 zoomY)
Sets the zoom of the sprite.
PREFIX void spSetTouchscreenEmulationButtons(int switch_button,
int ok_button)
Sets, whether on systems without touchscreen or mouse (like the GP2X F100) a touchscreen is emulated.
PREFIX void spSetVerticalOrigin(Sint32 origin)
Sets the vertical origin of the Surface rectangle and ellipses functions.
PREFIX void spSetVirtualKeyboard(int state,
int x,
int y,
int width,
int height,
SDL_Surface *design,
SDL_Surface *shiftDesign)
Sets up a virtual keyboard especially for systems without a keyboard like the gp2x, caanoo, etc.
PREFIX void spSetZBufferCache(Uint32 value)
If you use many Render Targets every time you switch it, the old ZBuffer will be destroyed and a new one created, which is slow.
PREFIX void spSetZFar(Sint32 zfar)
Sets the value, to which the zbuffer will be reseted.
PREFIX void spSetZNear(Sint32 znear)
Sets the value, to which the zbuffer will be reseted.
PREFIX void spSetZSet(Uint32 test)
(De)Activates the Z set (default on).
PREFIX void spSetZTest(Uint32 test)
(De)Activates the Z test (default on).
PREFIX Sint32 spSin(Sint32 value)
Calculates the sinus of a fixed point value
PREFIX void spSoundDelete(spSound *sound)
Deletes a sound.
PREFIX int spSoundGetMusicVolume()
Returns the volume of the background music.
PREFIX int spSoundGetVolume()
Returns the volume of all sounds.
PREFIX int spSoundInit()
This inits spSound.
PREFIX spSound* spSoundLoad(char *filename)
Loads a spSound from a file.
PREFIX void spSoundPause(int pause,
int channel)
Pauses or resumes a channel.
PREFIX void spSoundPauseAll(int pause)
Pauses or resumes all music and sounds.
PREFIX void spSoundPauseMusic(int pause)
Pauses or resumes the music.
PREFIX int spSoundPlay(spSound *sound,
int channel,
int loops,
int fadeIn,
int maxTime)
Plays a spSound sound.
PREFIX int spSoundPlayMusic(int fadeIn,
int loops)
Plays the loaded music from spSoundSetMusic with optional fade in and repeating.
PREFIX void spSoundQuit()
This has to be called at the end of the program.
PREFIX void spSoundSetChannels(int channels)
Sets the maximum count of channels.
PREFIX int spSoundSetMusic(char *filename)
Sets the background music file.
PREFIX void spSoundSetMusicVolume(int volume)
Sets the volume of the background music.
PREFIX void spSoundSetVolume(int volume)
Sets the volume of all sound.
PREFIX void spSoundStop(int soundChannel,
int fadeOut)
Stops a channel.
PREFIX int spSoundStopMusic(int fadeOut)
Stops playing the loaded music with optional fade out.
PREFIX Sint32 spSqrt (Sint32 n)
Fast square root for fixed point numbers
PREFIX void spStereoCreateProjectionMatrixes(Sint32 *left_matrix,
Sint32 *right_matrix,
float fovyInDegrees,
float aspectRatio,
float znear,
float zfar ,
float z0,
float distance,
int crossed)
Use this function, if you want two projection matrixes with the given eye distance for stereoscopic projection.
PREFIX void spStereoMergeSurfaces(SDL_Surface *left,
SDL_Surface *right,
int crossed)
This functions merges two same sized (!)
Stops keyboard input.
PREFIX Sint32 spTan(Sint32 value)
Calculates the tangent of a fixed point value
PREFIX void spTranslate(Sint32 x,
Sint32 y,
Sint32 z)
This function does a relative translation to (x,y,z).
PREFIX int spTriangle(Sint32 x1,
Sint32 y1,
Sint32 z1,
Sint32 x2,
Sint32 y2,
Sint32 z2,
Sint32 x3,
Sint32 y3,
Sint32 z3,
Uint32 color)
Draws a colored Triangle.
PREFIX int spTriangle_tex(Sint32 x1,
Sint32 y1,
Sint32 z1,
Sint32 u1,
Sint32 v1,
Sint32 x2,
Sint32 y2,
Sint32 z2,
Sint32 u2,
Sint32 v2,
Sint32 x3,
Sint32 y3,
Sint32 z3,
Sint32 u3,
Sint32 v3,
Uint32 color)
Draws a colored Triangle with texture mapping.
PREFIX int spTriangle3D(Sint32 x1,
Sint32 y1,
Sint32 z1,
Sint32 x2,
Sint32 y2,
Sint32 z2,
Sint32 x3,
Sint32 y3,
Sint32 z3,
Uint16 color)
Draws a triangle in 3D space.
PREFIX int spTriangleTex3D(Sint32 x1,
Sint32 y1,
Sint32 z1,
Sint32 u1,
Sint32 v1,
Sint32 x2,
Sint32 y2,
Sint32 z2,
Sint32 u2,
Sint32 v2,
Sint32 x3,
Sint32 y3,
Sint32 z3,
Sint32 u3,
Sint32 v3,
Uint16 color)
Draws a textured triangle in 3D space.
PREFIX SDL_Surface* spUniqueCopySurface(SDL_Surface *surface)
PREFIX void spUnlockRenderTarget()
Unlocks the RenderTarget locked by spLockRenderTarget
PREFIX Sint32 spUnsave_Small_Sqrt(Sint32 n)
This functions returns the square root of a number between 0 and 1 << SP_SQRT_ACCURACY.
PREFIX void spUpdateLight(int number)
If you want to update the lights position without a recall of spSetLightPosition use this function.
PREFIX void spUpdateSprite(spSpritePointer sprite,
Sint32 time)
Updates the sprite animation.
PREFIX void spUsePrecalculatedNormals(int value)
Desides, whether the precalculated normal values of meshes are used or not.
Close