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
 spAddBorder
 spAddColorToTarget
 spAddSpriteToCollection
 spAddTranslation
 spAsin
 spAtof
 spBindTexture
 spBlit3D
 spBlitPart3D
 spBlitSurface
 spBlitSurfacePart
 spChangeBundle
 spClearCache
 spClearTarget
 spCollapsePrimitives
 spConfigFree
 spConfigGetBool
 spConfigGetBoolWithComment
 spConfigGetFloat
 spConfigGetFloatWithComment
 spConfigGetInt
 spConfigGetIntWithComment
 spConfigGetPath
 spConfigGetString
 spConfigGetStringWithComment
 spConfigRead
 spConfigSetBool
 spConfigSetBoolWithComment
 spConfigSetFloat
 spConfigSetFloatWithComment
 spConfigSetInt
 spConfigSetIntWithComment
 spConfigWrite
 spCopySurface
 spCos
 spCreateDefaultWindow
 spCreateDirectoryChain
 spCreateSurface
 spCreateText
 spCreateTextBlock
 spCreateTextBundle
 spCreateTextWithTranslation
 spCreateWindow
 spDeactivatePattern
 spDeleteBundle
 spDeleteSprite
 spDeleteSpriteCollection
 spDeleteSurface
 spDeleteText
 spDeleteTextBlock
 spDisableCaching
 spDrawInExtraThread
 spDrawSprite
 spDrawSprite3D
 spEllipse
 spEllipse3D
 spEllipseBorder
 spEllipseBorder3D
 spEmulateBlendingWithPattern
 spEnableCaching
 spEnableLight
 spFileDeleteList
 spFileExists
 spFileGetDirectory
 spFileSortList
 spFlip
 spFloodFill
 spFontAdd
 spFontAddArrowButton
 spFontAddBorder
 spFontAddButton
 spFontAddEveryLetterOfTextBundle
 spFontAddRange
 spFontChangeArrowButton
 spFontChangeButton
 spFontChangeCacheSize
 spFontChangeLetter
 spFontDelete
 spFontDraw
 spFontDrawMiddle
 spFontDrawRight
 spFontDrawTextBlock
 spFontGetButton
 spFontGetCacheStart
 spFontGetLetter
 spFontGetLetterString
 spFontGetUnicodeFromUTF8
 spFontGetUTF8FromUnicode
 spFontLoad
 spFontMulWidth
 spFontReplaceColor
 spFontSetButtonBoderSigns
 spFontSetButtonStrategy
 spFontSetSemanticButtonBoderSigns
 spFontSetShadeColor
 spFontShadeButtons
 spFontWidth
 spGetBFromColor
 spGetFastRGB
 spGetFPS
 spGetGFromColor
 spGetHFromColor
 spGetHorizontalOrigin
 spGetHSV
 spGetInput
 spGetLastAxisType
 spGetMatrix
 spGetOne_over_x_pointer
 spGetPixelPosition
 spGetPossibleLanguage
 spGetPossibleLanguageName
 spGetPossibleLanguagesCount
 spGetProjectionMatrix
 spGetRawBFromColor
 spGetRawGFromColor
 spGetRawRFromColor
 spGetRenderTarget
 spGetRenderTargetZBuffer
 spGetRFromColor
 spGetRGB
 spGetSFromColor
 spGetSizeFactor
 spGetTargetPixel
 spGetTranslation
 spGetTranslationFromCaption
 spGetVerticalOrigin
 spGetVirtualKeyboard
 spGetVirtualKeyboardShiftState
 spGetVirtualKeyboardState
 spGetWindowSurface
 spGetZFar
 spGetZNear
 spHorizentalLine
 spIdentity
 spInitCore
 spInitMapping
 spInitMath
 spInitNet
 spInitPrimitives
 spInterpolateTargetToColor
 spIsCachingEnabled
 spIsKeyboardPolled
 spLine
 spLine3D
 spLoadBundle
 spLoadSpriteCollection
 spLoadSurface
 spLoadSurfaceZoom
 spLockRenderTarget
 spLoop
 spMapButtonAdd
 spMapButtonByID
 spMapButtonByName
 spMapCancelChange
 spMapCaptionByID
 spMapCaptionByName
 spMapChange
 spMapChangeNextInPool
 spMapChangePreviousInPool
 spMapClean();
 spMapContinueChange
 spMapGetByID
 spMapGetByName
 spMapLastCollisionName
 spMapLastCollisionPool
 spMapLoad
 spMapPoolAdd
 spMapPoolByID
 spMapPoolByName
 spMapSave
 spMapSetByID
 spMapSetByName
 spMapSetStrategy
 spMapStartChangeByID
 spMapStartChangeByName
 spMax
 spMesh3D
 spMesh3DwithPos
 spMeshDelete
 spMeshLoadObj
 spMeshLoadObjSize
 spMin
 spMulMatrix
 spMulMatrixLeft
 spNetAcceptTCP
 spNetC4ACancelTask
 spNetC4ACancelTaskParallel
 spNetC4ACommitScore
 spNetC4ACommitScoreParallel
 spNetC4ACreateProfile
 spNetC4ADeleteAccount
 spNetC4ADeleteGames
 spNetC4ADeleteProfileFile
 spNetC4ADeleteScores
 spNetC4ADeleteTask
 spNetC4AEditProfile
 spNetC4AFilterScore
 spNetC4AFreeProfile
 spNetC4AGetGame
 spNetC4AGetGameParallel
 spNetC4AGetProfile
 spNetC4AGetScore
 spNetC4AGetScoreOfMonth
 spNetC4AGetStatus
 spNetC4AGetStatusParallel
 spNetC4AGetTaskResult
 spNetC4AGetTaskResultParallel
 spNetC4AGetTimeOut
 spNetC4AGetTimeOutParallel
 spNetC4AHowManyCached
 spNetC4AMakeScoresUnique
 spNetC4ASetCaching
 spNetC4CopyScoreList
 spNetCloseTCP
 spNetGetConnectionIP
 spNetIRCChannelReady
 spNetIRCCloseServer
 spNetIRCConnectServer
 spNetIRCJoinChannel
 spNetIRCPartChannel
 spNetIRCSendMessage
 spNetIRCServerReady
 spNetOpenClientTCP
 spNetOpenServerTCP
 spNetReceiveFinished
 spNetReceiveHTTP
 spNetReceiveHTTPUnblocked
 spNetReceiveStillWaiting
 spNetReceiveTCP
 spNetReceiveTCPUnblocked
 spNetResolve
 spNetResolveHost
 spNetSendHTTP
 spNetSendTCP
 spNewSprite
 spNewSpriteCollection
 spNewSubSpriteNoTiling
 spNewSubSpriteTilingRow
 spNewSubSpriteWithTiling
 spParticleCreate
 spParticleDelete
 spParticleDraw
 spParticleFromSprite
 spParticleUpdate
 spPerspectiveQuad_tex
 spPerspectiveTriangle_tex
 spPollKeyboardInput
 spPopModelView
 spPrintDebug
 spProjectPoint3D
 spPushModelView
 spQuad
 spQuad_tex
 spQuad3D
 spQuadTex3D
 spQuitCore
 spQuitNet
 spQuitPrimitives
 spRand
 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
 spScaleDownFast
 spScaleDownSmooth
 spSearchCaption
 spSelectRenderTarget
 spSelectSprite
 spSetAffineTextureHack
 spSetAlphaPattern
 spSetAlphaPattern4x4
 spSetAlphaTest
 spSetAmbientLightColor
 spSetBlending
 spSetCulling
 spSetDefaultLanguage
 spSetDefaultWindowSize
 spSetFixedOrign
 spSetFrustumf2
 spSetHorizontalOrigin
 spSetLight
 spSetLightColor
 spSetLightPosition
 spSetLineWidth
 spSetPattern32
 spSetPattern64
 spSetPattern8
 spSetPerspective
 spSetPerspectiveStereoscopic
 spSetPerspectiveTextureMapping
 spSetRand
 spSetReturnBehavior
 spSetSpriteRotation
 spSetSpriteZoom
 spSetTouchscreenEmulationButtons
 spSetVerticalOrigin
 spSetVirtualKeyboard
 spSetVirtualKeyboardBackspaceButton
 spSetVirtualKeyboardShiftState
 spSetVirtualKeyboardSpaceButton
 spSetZBufferCache
 spSetZFar
 spSetZNear
 spSetZSet
 spSetZTest
 spSin
 spSleep
 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
 spUpdateTargetPixels
 spUsePrecalculatedNormals
 spWaitForDrawingThread
 spWriteOneLine
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 spAddBorder(SDL_Surface *surface,
Uint16 borderColor,
Uint16 backgroundcolor)
Adds a border to the surface with the background color backgroundcolor.
PREFIX void spAddColorToTarget(Uint16 destColor,
Sint32 interpolation)
Adds a colored layer to the target surface.
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 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(void)
Deletes ALL cached surfaces! 
PREFIX void spClearTarget(Uint32 color)
Clears the Rendertarget.
PREFIX void spCollapsePrimitives(int value)
Determines, whether ellipses, rectangles, ellipses borders and rectangle borders can collapse to an (unseeable) object smaller than one pixel.
PREFIX void spConfigFree(spConfigPointer config)
Frees the struct if you don’t need it anymore
PREFIX int spConfigGetBool(spConfigPointer config,
char *key,
int default_value)
Returns the bool value to a specific key.
PREFIX int spConfigGetBoolWithComment(spConfigPointer config,
char *key,
int default_value,
char *comment)
Returns the bool value to a specific key.
PREFIX float spConfigGetFloat(spConfigPointer config,
char *key,
float default_value)
Returns the float value to a specific key.
PREFIX float spConfigGetFloatWithComment(spConfigPointer config,
char *key,
float default_value,
char *comment)
Returns the float value to a specific key.
PREFIX int spConfigGetInt(spConfigPointer config,
char *key,
int default_value)
Returns the int value to a specific key.
PREFIX int spConfigGetIntWithComment(spConfigPointer config,
char *key,
int default_value,
char *comment)
Returns the int value to a specific key.
PREFIX char* spConfigGetPath(char *buffer,
char *subfolder,
char *file)
Returns the path to config files, which may be everywhere on different targets, e.g.
PREFIX char* spConfigGetString(spConfigPointer config,
char *key,
char *default_value)
Returns the string value to a specific key.
PREFIX char* spConfigGetStringWithComment(spConfigPointer config,
char *key,
char *default_value,
char *comment)
Returns the string value to a specific key.
PREFIX spConfigPointer spConfigRead(char *filename,
char *subfolder)
Reads a config and saves it to a spConfig struct
PREFIX void spConfigSetBool(spConfigPointer config,
char *key,
int value)
Sets the bool value to a specific key.
PREFIX void spConfigSetBoolWithComment(spConfigPointer config,
char *key,
int value,
char *comment)
Sets the bool value to a specific key.
PREFIX void spConfigSetFloat(spConfigPointer config,
char *key,
float value)
Sets the float value to a specific key.
PREFIX void spConfigSetFloatWithComment(spConfigPointer config,
char *key,
float value,
char *comment)
Sets the float value to a specific key.
PREFIX void spConfigSetInt(spConfigPointer config,
char *key,
int value)
Sets the int value to a specific key.
PREFIX void spConfigSetIntWithComment(spConfigPointer config,
char *key,
int value,
char *comment)
Sets the int value to a specific key.
PREFIX void spConfigWrite(spConfigPointer config)
Writes the config to the file.
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 spTextBlockPointer spCreateTextBlock(const unsigned char *text,
int max_width,
spFontPointer font)
Creates an spTextBlock out of an text.
PREFIX spBundlePointer spCreateTextBundle(void)
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(void)
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 spDeleteTextBlock(spTextBlockPointer block)
Deletes a text block created by spCreateTextBlock.
PREFIX void spDisableCaching(void)
Disables chaching of surfaces.
PREFIX void spDrawInExtraThread(int value)
Determines, whether an extra thread is used for drawing.
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 spEmulateBlendingWithPattern(Sint32 value)
Decides, whether real blending (maybe slow) is used or an emulation of blending using pattern in a dithering like way.
PREFIX void spEnableCaching(void)
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 spFloodFill(int x,
int y,
Uint16 color)
Fills the target at the given position with a color using flood fill.
PREFIX void spFontAdd(spFontPointer font,
char *characters,
Uint16 color)
Adds characters to the font.
PREFIX void spFontAddArrowButton(spFontPointer font,
Uint32 character,
int direction,
Uint16 fgColor,
Uint16 bgColor)
Adds an arrow button the 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 spFontChangeArrowButton(spFontPointer font,
spLetterPointer letter,
Uint32 character,
int direction,
Uint16 fgColor,
Uint16 bgColor)
Same like spFontChangeLetter, but for the arrow buttons.
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 unsigned char *text,
spFontPointer font)
Draws a left aligned text to the render target
PREFIX int spFontDrawMiddle(Sint32 x,
Sint32 y,
Sint32 z,
const unsigned char *text,
spFontPointer font)
Draws a center aligned text to the render target
PREFIX int spFontDrawRight(Sint32 x,
Sint32 y,
Sint32 z,
const unsigned char *text,
spFontPointer font)
Draws a right aligned text to the render target
PREFIX int spFontDrawTextBlock(spTextBlockAlignment alignment,
Sint32 x,
Sint32 y,
Sint32 z,
spTextBlockPointer block,
Sint32 height,
Sint32 position,
spFontPointer font)
Draws a previously created text block with a maximum height.
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 char* spFontGetLetterString(spFontPointer font,
unsigned char *buffer,
int length)
Generates a string to use maybe for another call of spFontAdd.
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).
Sets the starting and end sign for semantic buttons from sparrowMapping, the defaults are ‘{‘ and ‘}’, which means, that “{fire}” will be drawn as the button mapping to “fire”.
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 unsigned char *text,
spFontPointer font)
Width of a text
Gives you the blue value of a color.
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
Gives you the green value of a color.
PREFIX Sint32 spGetHFromColor(Uint16 color)
Gives you the hue of a color.
PREFIX Sint32 spGetHorizontalOrigin(void)
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 int spGetLastAxisType(void)
Gives you the last used axis type (digital or analog).
PREFIX Sint32* spGetMatrix(void)
Returns you the REAL modelview matrix pointer! 
PREFIX Sint32* spGetOne_over_x_pointer(void)
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(void)
Gets you the total number of all possible languages, if you read them with spReadPossibleLanguages.
PREFIX Sint32* spGetProjectionMatrix(void)
Returns the projetion matrix pointer.
Gives you the blue value of a color.
Gives you the greeen value of a color.
Gives you the red value of a color.
PREFIX SDL_Surface* spGetRenderTarget(void)
Returns the render target.
PREFIX Sint32* spGetRenderTargetZBuffer(void)
Returns a pointer to the zBuffer of the render target
Gives you the red value of a color.
PREFIX Uint16 spGetRGB(int r,
int g,
int b)
Returns a 16 bit RGB color
PREFIX Uint8 spGetSFromColor(Uint16 color)
Gives you the saturation of a color.
PREFIX Sint32 spGetSizeFactor(void)
Returns a fixed point factor for the screen size.
PREFIX Uint16* spGetTargetPixel(void)
Returns a pointer to the raw 16 bit pixel data.
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(void)
Returns the vertical origin.
PREFIX SDL_Surface* spGetVirtualKeyboard(void)
This functions returns the precalculated and prescaled keyboard design.
PREFIX int spGetVirtualKeyboardShiftState(void)
Returns the state of the Shift mode of the virtual keyboard.
PREFIX int spGetVirtualKeyboardState(void)
Gives the virtual keyboard state set by spSetVirtualKeyboard.
PREFIX SDL_Surface* spGetWindowSurface(void)
Returns the window Surface.
PREFIX Sint32 spGetZFar(void)
Gets the value, to which the zbuffer will be reseted.
PREFIX Sint32 spGetZNear(void)
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(void)
Sets the modelview matrix to the identity matrix.
PREFIX void spInitCore(void)
spInitCore initializes SDL, SDL_TTF and other stuff.
PREFIX void spInitMapping(void)
Inits sparrowMapping.
PREFIX void spInitMath(void)
Initializes the fixed point look up tables for sin, cos, etc.
PREFIX void spInitNet(void)
Initializes sparrowNet.
PREFIX void spInitPrimitives(void)
Initializes some Look up tables and the zBufferCache.
PREFIX void spInterpolateTargetToColor(Uint16 destColor,
Sint32 interpolation)
Interpolates the target to a color.
PREFIX int spIsCachingEnabled(void)
Says, whether caching of surfaces is enabled or not.
PREFIX int spIsKeyboardPolled(void)
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(const char *name)
Loads a 16 Surface needed by the engine.
PREFIX SDL_Surface* spLoadSurfaceZoom(const char *name,
Sint32 zoom)
Loads and zoomes a 16 Surface needed by the engine.
PREFIX void spLockRenderTarget(void)
Locks the RenderTarget.
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 void spMapButtonAdd(int id,
char *name,
char *caption,
int poolButton)
Adds a semantic button identified by name or a self given ID (advise: Use #define MY_FIRE_BUTTON 0 or similar for the id).
PREFIX char* spMapButtonByID(int id)
Returns the caption of the real button behind the mapping via it’s ID.
PREFIX char* spMapButtonByName(char *name)
Returns the caption of the real button behind the mapping via it’s name.
PREFIX void spMapCancelChange(void)
Cancels the mapping change started with spMapStartChangeByID or spMapStartChangeByName.
PREFIX char* spMapCaptionByID(int id)
Returns the caption of the semantic button via it’s ID.
PREFIX char* spMapCaptionByName(char *name)
Returns the caption of the semantic button via it’s name.
PREFIX int spMapChange(int id,
int poolButton)
Changes the mapping of an existing button with the setup strategy (see spMapSetStrategy).
PREFIX void spMapChangeNextInPool(int id)
Sets the mapping to the next possible button in the pool.
PREFIX void spMapChangePreviousInPool(int id)
Sets the mapping to the previous possible button in the pool.
PREFIX void spMapClean(void)
Deletes all mappings and all buttons in the pool.
PREFIX int spMapContinueChange(void)
Interpretates to user input to change the mapping of a semantic button.
PREFIX int spMapGetByID(int id)
Returns the state of the button given by the id.
PREFIX int spMapGetByName(char *name)
Returns the state of the button given by the name.
Returns the name of the semantic button caption of last collision if spMapContinueChange returned 2.
PREFIX char* spMapLastCollisionPool(void)
Returns the name of the pool button of last collision if spMapContinueChange returned 2.
PREFIX void spMapLoad(char *subfolder,
char *filename)
Loads a mapping.
PREFIX void spMapPoolAdd(int button_id,
char *caption)
Every button, which shall be useable by the user have to be added to the button pool.
PREFIX int spMapPoolByID(int id)
Returns the real button id of the real button behind the mapping via it’s ID.
PREFIX int spMapPoolByName(char *name)
Returns the real button id of the real button behind the mapping via it’s name.
PREFIX void spMapSave(char *subfolder,
char *filename)
Saves a mapping.
PREFIX void spMapSetByID(int id,
int value)
Sets the state of the button given by the id.
PREFIX void spMapSetByName(char *name,
int value)
Sets the state of the button given by the name.
PREFIX void spMapSetStrategy(int strategy)
Sets the strategy to be used if a button mapping is changed, but the mapping already exists.
PREFIX void spMapStartChangeByID(int id)
Starts the changing of the mapping of a buttons identified by it’s ID.
PREFIX void spMapStartChangeByName(char *name)
Starts the changing of the mapping of a buttons identified by it’s name.
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 void spMulMatrix(Sint32 *matrix)
Multiplies the modelview matrix with the given matrix.
PREFIX void spMulMatrixLeft(Sint32 *matrix)
Multiplies the modelview matrix with the given matrix, but from the left side.
PREFIX spNetTCPConnection spNetAcceptTCP(spNetTCPServer server)
If a client tries to connect to your server, this function returns an established tcp connection from your server to the client.
PREFIX void spNetC4ACancelTask(void)
Cancels the C4A task running right now (if one is started).
PREFIX void spNetC4ACancelTaskParallel(spNetC4ATaskPointer task)
Cancels the given C4A task.
PREFIX int spNetC4ACommitScore(spNetC4AProfilePointer profile,
char *game,
int score,
spNetC4AScorePointer *scoreList,
int timeOut)
Commits a score to a specific game to compo4all server.
PREFIX spNetC4ATaskPointer spNetC4ACommitScoreParallel(
   spNetC4AProfilePointer profile,
   char *game,
   int score,
   spNetC4AScorePointer *scoreList,
   int timeOut
)
Commits a score to a specific game to compo4all server.
PREFIX int spNetC4ACreateProfile(spNetC4AProfilePointer *profile,
char *longname,
char *shortname,
char *password,
char *email,
int timeOut)
Creates a new profile on skeezix’ server.
PREFIX int spNetC4ADeleteAccount(spNetC4AProfilePointer *profile,
int deleteFile,
int timeOut)
Deletes the given profile on skeezix server and maybe the file on your system.
PREFIX void spNetC4ADeleteGames(spNetC4AGamePointer *gameList)
Frees the linked list returned by spNetC4AGetGame.
PREFIX void spNetC4ADeleteProfileFile(void)
Deletes the profile file on your system, NOT the online account at skeezix server.
PREFIX void spNetC4ADeleteScores(spNetC4AScorePointer *scoreList)
Frees the linked list returned by spNetC4AGetScore.
PREFIX void spNetC4ADeleteTask(spNetC4ATaskPointer task)
Deletes the task struct returned by the parallel working task functions.
PREFIX int spNetC4AEditProfile(spNetC4AProfilePointer *profile,
char *longname,
char *shortname,
char *password,
char *email,
int timeOut)
Edits an already existing profile on skeezix’ server.
PREFIX void spNetC4AFilterScore(spNetC4AScorePointer *scoreList)
Makes, that every name appears only once in the scoreList
PREFIX void spNetC4AFreeProfile(spNetC4AProfilePointer profile)
Frees the profile you got from spNetC4AGetProfile.
PREFIX int spNetC4AGetGame(spNetC4AGamePointer *gameList,
int timeOut)
Loads all games listed on the C4A server.
PREFIX spNetC4ATaskPointer spNetC4AGetGameParallel(
   spNetC4AGamePointer *gameList,
   int timeOut
)
Loads all games listed on the C4A server.
PREFIX spNetC4AProfilePointer spNetC4AGetProfile(void)
Reads your profile out of your c4a-prof file.
PREFIX int spNetC4AGetScore(spNetC4AScorePointer *scoreList,
spNetC4AProfilePointer profile,
char *game,
int timeOut)
Loads a top 500 for a given game from the compo4all server.
PREFIX int spNetC4AGetScoreOfMonth(spNetC4AScorePointer *scoreList,
spNetC4AProfilePointer profile,
char *game,
int year,
int month,
int timeOut)
Loads a top 500 of a month for a given game from the compo4all server.
PREFIX int spNetC4AGetStatus(void)
Gets the status of spNetC4AGetScore, spNetC4ACommitScore, spNetC4ACreateProfile, spNetC4AEditProfile & spNetC4ADeleteAccount.
PREFIX int spNetC4AGetStatusParallel(spNetC4ATaskPointer task)
Gets the status of spNetC4AGetScoreParallel & spNetC4ACommitScoreParallel.
PREFIX int spNetC4AGetTaskResult(void)
Gets the result of the task when finished (check with spNetC4AGetStatus).
PREFIX int spNetC4AGetTaskResultParallel(spNetC4ATaskPointer task)
Gets the result of the given task when finished (check with spNetC4AGetStatusParallel).
PREFIX int spNetC4AGetTimeOut(void)
Gives you the time out of the C4A tasks.
PREFIX int spNetC4AGetTimeOutParallel(spNetC4ATaskPointer task)
Gives you the time out of the given C4A task.
PREFIX int spNetC4AHowManyCached(void)
Returns how many scores are cached
PREFIX void spNetC4AMakeScoresUnique(spNetC4AScorePointer *scoreList)
Removes any double occurence of names in the score.
PREFIX void spNetC4ASetCaching(int value)
(De)Activates caching for C4A scores.
Makes an unique copy of the passed scorelist, e.g.
PREFIX void spNetCloseTCP(spNetTCPConnection connection)
Closes a tcp connection or a server session.
PREFIX spNetIP spNetGetConnectionIP(spNetTCPConnection connection)
Gives you the ip of your connected client.
PREFIX int spNetIRCChannelReady(spNetIRCChannelPointer channel)
Returns, whether the channel is ready to be used, e.g.
PREFIX void spNetIRCCloseServer(spNetIRCServerPointer server)
Closes the connection to the server, finishs the thread and releases the pointer handle!
PREFIX spNetIRCServerPointer spNetIRCConnectServer(char *name,
Uint16 port,
char *nickname,
char *username,
char *realname,
char *password)
Connects to an IRC server.
PREFIX spNetIRCChannelPointer spNetIRCJoinChannel(spNetIRCServerPointer server,
char *name)
Joins an IRC channel.
PREFIX void spNetIRCPartChannel(spNetIRCServerPointer server,
spNetIRCChannelPointer channel)
Leave a channel / conversation.
PREFIX void spNetIRCSendMessage(spNetIRCServerPointer server,
spNetIRCChannelPointer channel,
char *message)
Sends a message (PRIVMSG) to a channel or another user.
PREFIX int spNetIRCServerReady(spNetIRCServerPointer server)
Returns, whether the server is ready to be used, e.g.
PREFIX spNetTCPConnection spNetOpenClientTCP(spNetIP ip)
Opens a connection to an ip
PREFIX spNetTCPServer spNetOpenServerTCP(Uint16 port)
Creates a server, which listens at a port
PREFIX int spNetReceiveFinished(SDL_Thread *thread)
Says, whether a receive call (identified by the thread handle) still waits for an incoming signal.
PREFIX int spNetReceiveHTTP(spNetTCPConnection connection,
char *data,
int length)
Receives data from the other side until the other side disconnects.
PREFIX SDL_Thread* spNetReceiveHTTPUnblocked(spNetTCPConnection connection,
char *data,
int length)
Receives data from the other side until the other side disconnects.
PREFIX int spNetReceiveStillWaiting(SDL_Thread *thread)
Says, whether a receive call (identified by the thread handle) still waits for an incoming signal.
PREFIX int spNetReceiveTCP(spNetTCPConnection connection,
void *data,
int length)
Receives data from the other side.
PREFIX SDL_Thread* spNetReceiveTCPUnblocked(spNetTCPConnection connection,
void *data,
int length)
Receives data from the other side.
PREFIX spNetIP spNetResolve(char *host,
Uint16 port)
Resolves a ip to a hostname.
PREFIX char* spNetResolveHost(spNetIP ip,
char *host,
int host_len)
Gives you the hostname to an ip.
PREFIX int spNetSendHTTP(spNetTCPConnection connection,
char *data)
Sends text over TCP with spNetSendTCP.
PREFIX int spNetSendTCP(spNetTCPConnection connection,
void *data,
int length)
Sends a tcp package to the ether.
PREFIX spSpritePointer spNewSprite(char *name)
Creates a new (empty) sprite.
PREFIX spSpriteCollectionPointer spNewSpriteCollection(void)
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 spParticleBunchPointer spParticleCreate(
   int count,
   int ( *feedback )( spParticleBunchPointer bunch, Sint32 action, Sint32 extra_data),
   spParticleBunchPointer *addBunch
)
Creates a bunch of a fixed number of particles.
PREFIX void spParticleDelete(spParticleBunchPointer *firstBunch)
Deletes all particles of the particles bunch and connected bunches.
PREFIX void spParticleDraw(spParticleBunchPointer firstBunch)
Draws all particles of the particles bunch and connected bunches.
PREFIX spParticleBunchPointer spParticleFromSprite(
   spSpritePointer sprite,
   int ( *feedback )( spParticleBunchPointer bunch, Sint32 action, Sint32 extra_data),
   spParticleBunchPointer *addBunch
)
This special function creates a particle bunch out of a sprite.
PREFIX void spParticleUpdate(spParticleBunchPointer *firstBunch,
int steps)
Updates all particles of the particles bunch and connected bunches.
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 spPopModelView(void)
Loads the ModelView matrix from the stack.
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 void spPushModelView(void)
Saves the recent ModelView matrix on a stack.
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 spQuitNet(void)
Quits sparrowNet.
PREFIX void spQuitPrimitives(void)
Releases stuff and frees memory.
PREFIX Sint32 spRand(void)
Returns a pseudo random number.
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(void)
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(void)
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 void spScaleDownFast(SDL_Surface *source,
SDL_Surface *destination)
Copies and scales down source to destination very fast.
PREFIX void spScaleDownSmooth(SDL_Surface *source,
SDL_Surface *destination)
Copies and scales down source to destination with anti aliasing.
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.
PREFIX void spSetFixedOrign(int x,
int y)
Sets a fixed origin like (32,32).
PREFIX 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 spSetLineWidth(Sint32 width)
Sets the width of spLine calls.
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 spSetRand(Sint32 seed)
Does in fact the same as srand() of the glibc or other implementations.
PREFIX void spSetReturnBehavior(int ignore,
int stops)
Changes the behaviour, what happens, if Return is pressed while keyboard input is pulled.
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 spSetVirtualKeyboardBackspaceButton(int button)
Sets a button, which is used as backspace if text is entered via virtual keyboard.
PREFIX void spSetVirtualKeyboardShiftState(int state)
Sets the state of the Shift mode of the virtual keyboard.
PREFIX void spSetVirtualKeyboardSpaceButton(int button)
Sets a button, which is used as space if text is entered via virtual keyboard.
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 spSleep(Uint32 microSeconds)
Waits the given microseconds (!)
PREFIX void spSoundDelete(spSound *sound)
Deletes a sound.
PREFIX int spSoundGetMusicVolume(void)
Returns the volume of the background music.
PREFIX int spSoundGetVolume(void)
Returns the volume of all sounds.
PREFIX int spSoundInit(void)
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(void)
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(void)
Unlocks the RenderTarget.
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 spUpdateTargetPixels(void)
Updates the internal pixels pointer used by sparrow3d.
PREFIX void spUsePrecalculatedNormals(int value)
Desides, whether the precalculated normal values of meshes are used or not.
PREFIX void spWaitForDrawingThread(void)
If parallel processing of sparrowPrimitive is activated, this function waits until everything is drawn.
PREFIX int spWriteOneLine(spFilePointer file ,
char *buffer)
Writes one line from a SDL_RWops file.
Close