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