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 border to the surface with the background color backgroundcolor.
PREFIX void spAddBorder( SDL_Surface * surface, Uint16 borderColor, Uint16 backgroundcolor )
Adds a colored layer to the target surface.
PREFIX void spAddColorToTarget( Uint16 destColor, Sint32 interpolation )
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 )
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( void )
Clears the Rendertarget.
PREFIX void spClearTarget( Uint32 color )
Determines, whether ellipses, rectangles, ellipses borders and rectangle borders can collapse to an (unseeable) object smaller than one pixel.
PREFIX void spCollapsePrimitives( int value )
Frees the struct if you don’t need it anymore
PREFIX void spConfigFree( spConfigPointer config )
Returns the bool value to a specific key.
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 float 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 int 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 path to config files, which may be everywhere on different targets, e.g.
PREFIX char* spConfigGetPath( char * buffer, char * subfolder, char * file )
Returns the string value to a specific key.
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 )
Reads a config and saves it to a spConfig struct
PREFIX spConfigPointer spConfigRead( char * filename, char * subfolder )
Sets the bool value to a specific key.
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 float 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 int 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 )
Writes the config to the file.
PREFIX void spConfigWrite( spConfigPointer config )
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 an spTextBlock out of an text.
PREFIX spTextBlockPointer spCreateTextBlock( const unsigned char * text, int max_width, spFontPointer font )
Creates a text bundle.
PREFIX spBundlePointer spCreateTextBundle( void )
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( void )
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 )
Deletes a text block created by spCreateTextBlock.
PREFIX void spDeleteTextBlock( spTextBlockPointer block )
Disables chaching of surfaces.
PREFIX void spDisableCaching( void )
Determines, whether an extra thread is used for drawing.
PREFIX void spDrawInExtraThread( int value )
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 )
Decides, whether real blending (maybe slow) is used or an emulation of blending using pattern in a dithering like way.
PREFIX void spEmulateBlendingWithPattern( Sint32 value )
Enables caching surfaces.
PREFIX void spEnableCaching( void )
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 )
Fills the target at the given position with a color using flood fill.
PREFIX void spFloodFill( int x, int y, Uint16 color )
Adds characters to the font.
PREFIX void spFontAdd( spFontPointer font, char * characters, Uint16 color )
Adds an arrow button the the font.
PREFIX void spFontAddArrowButton( spFontPointer font, Uint32 character, int direction, Uint16 fgColor, Uint16 bgColor )
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 arrow buttons.
PREFIX void spFontChangeArrowButton( spFontPointer font, spLetterPointer letter, Uint32 character, int direction, Uint16 fgColor, Uint16 bgColor )
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 unsigned char * text, spFontPointer font )
Draws a center aligned text to the render target
PREFIX int spFontDrawMiddle( Sint32 x, Sint32 y, Sint32 z, const unsigned char * text, spFontPointer font )
Draws a right aligned text to the render target
PREFIX int spFontDrawRight( Sint32 x, Sint32 y, Sint32 z, const unsigned char * text, spFontPointer font )
Draws a previously created text block with a maximum height.
PREFIX int spFontDrawTextBlock( spTextBlockAlignment alignment, Sint32 x, Sint32 y, Sint32 z, spTextBlockPointer block, Sint32 height, Sint32 position, 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 )
Generates a string to use maybe for another call of spFontAdd.
PREFIX char* spFontGetLetterString( spFontPointer font, unsigned char * buffer, int length )
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 unsigned char * text, spFontPointer font )
Returns the FPS of the Loop Function
PREFIX int spGetFPS( void )
Gives you the hue of a color.
PREFIX Sint32 spGetHFromColor( Uint16 color )
Returns the horizontal origin.
PREFIX Sint32 spGetHorizontalOrigin( void )
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 )
Gives you the last used axis type (digital or analog).
PREFIX int spGetLastAxisType( void )
Returns you the REAL modelview matrix pointer!
PREFIX Sint32* spGetMatrix( void )
Returns a pointer/array of SP_ONE (65536) values of 1/x
PREFIX Sint32* spGetOne_over_x_pointer( void )
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( void )
Returns the projetion matrix pointer.
PREFIX Sint32* spGetProjectionMatrix( void )
Returns the render target.
PREFIX SDL_Surface* spGetRenderTarget( void )
Returns a pointer to the zBuffer of the render target
PREFIX Sint32* spGetRenderTargetZBuffer( void )
Returns a 16 bit RGB color
PREFIX Uint16 spGetRGB( int r, int g, int b )
Gives you the saturation of a color.
PREFIX Uint8 spGetSFromColor( Uint16 color )
Returns a fixed point factor for the screen size.
PREFIX Sint32 spGetSizeFactor( void )
Returns a pointer to the raw 16 bit pixel data.
PREFIX Uint16* spGetTargetPixel( 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( void )
This functions returns the precalculated and prescaled keyboard design.
PREFIX SDL_Surface* spGetVirtualKeyboard( void )
Returns the state of the Shift mode of the virtual keyboard.
PREFIX int spGetVirtualKeyboardShiftState( void )
Gives the virtual keyboard state set by spSetVirtualKeyboard.
PREFIX int spGetVirtualKeyboardState( void )
Returns the window Surface.
PREFIX SDL_Surface* spGetWindowSurface( void )
Gets the value, to which the zbuffer will be reseted.
PREFIX Sint32 spGetZFar( void )
Gets the value, to which the zbuffer will be reseted.
PREFIX Sint32 spGetZNear( void )
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( void )
spInitCore initializes SDL, SDL_TTF and other stuff.
PREFIX void spInitCore( void )
Inits sparrowMapping.
PREFIX void spInitMapping( void )
Initializes the fixed point look up tables for sin, cos, etc.
PREFIX void spInitMath( void )
Initializes sparrowNet.
PREFIX void spInitNet( void )
Initializes some Look up tables and the zBufferCache.
PREFIX void spInitPrimitives( void )
Interpolates the target to a color.
PREFIX void spInterpolateTargetToColor( Uint16 destColor, Sint32 interpolation )
Says, whether caching of surfaces is enabled or not.
PREFIX int spIsCachingEnabled( void )
Says, whether input from the keyboard is polled.
PREFIX int spIsKeyboardPolled( void )
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( const char * name )
Loads and zoomes a 16 Surface needed by the engine.
PREFIX SDL_Surface* spLoadSurfaceZoom( const char * name, Sint32 zoom )
Locks the RenderTarget.
PREFIX void spLockRenderTarget( void )
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 ) )
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 void spMapButtonAdd( int id, char * name, char * caption, int poolButton )
Returns the caption of the real button behind the mapping via it’s ID.
PREFIX char* spMapButtonByID( int id )
Returns the caption of the real button behind the mapping via it’s name.
PREFIX char* spMapButtonByName( char * name )
Cancels the mapping change started with spMapStartChangeByID or spMapStartChangeByName.
PREFIX void spMapCancelChange( void )
Returns the caption of the semantic button via it’s ID.
PREFIX char* spMapCaptionByID( int id )
Returns the caption of the semantic button via it’s name.
PREFIX char* spMapCaptionByName( char * name )
Changes the mapping of an existing button with the setup strategy (see spMapSetStrategy).
PREFIX int spMapChange( int id, int poolButton )
Sets the mapping to the next possible button in the pool.
PREFIX void spMapChangeNextInPool( int id )
Sets the mapping to the previous possible button in the pool.
PREFIX void spMapChangePreviousInPool( int id )
Deletes all mappings and all buttons in the pool.
PREFIX void spMapClean( void )
Interpretates to user input to change the mapping of a semantic button.
PREFIX int spMapContinueChange( void )
Returns the state of the button given by the id.
PREFIX int spMapGetByID( int id )
Returns the state of the button given by the name.
PREFIX int spMapGetByName( char * name )
Returns the name of the pool button of last collision if spMapContinueChange returned 2.
PREFIX char* spMapLastCollisionPool( void )
Loads a mapping.
PREFIX void spMapLoad( char * subfolder, char * filename )
Every button, which shall be useable by the user have to be added to the button pool.
PREFIX void spMapPoolAdd( int button_id, char * caption )
Returns the real button id of the real button behind the mapping via it’s ID.
PREFIX int spMapPoolByID( int id )
Returns the real button id of the real button behind the mapping via it’s name.
PREFIX int spMapPoolByName( char * name )
Saves a mapping.
PREFIX void spMapSave( char * subfolder, char * filename )
Sets the state of the button given by the id.
PREFIX void spMapSetByID( int id, int value )
Sets the state of the button given by the name.
PREFIX void spMapSetByName( char * name, int value )
Sets the strategy to be used if a button mapping is changed, but the mapping already exists.
PREFIX void spMapSetStrategy( int strategy )
Starts the changing of the mapping of a buttons identified by it’s ID.
PREFIX void spMapStartChangeByID( int id )
Starts the changing of the mapping of a buttons identified by it’s name.
PREFIX void spMapStartChangeByName( char * name )
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 )
Multiplies the modelview matrix with the given matrix.
PREFIX void spMulMatrix( Sint32 * matrix )
Multiplies the modelview matrix with the given matrix, but from the left side.
PREFIX void spMulMatrixLeft( Sint32 * matrix )
If a client tries to connect to your server, this function returns an established tcp connection from your server to the client.
PREFIX spNetTCPConnection spNetAcceptTCP( spNetTCPServer server )
Cancels the C4A task running right now (if one is started).
PREFIX void spNetC4ACancelTask( void )
Cancels the given C4A task.
PREFIX void spNetC4ACancelTaskParallel( spNetC4ATaskPointer task )
Commits a score to a specific game to compo4all server.
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 )
Creates a new profile on skeezix’ server.
PREFIX int spNetC4ACreateProfile( spNetC4AProfilePointer * profile, char * longname, char * shortname, char * password, char * email, int timeOut )
Deletes the given profile on skeezix server and maybe the file on your system.
PREFIX int spNetC4ADeleteAccount( spNetC4AProfilePointer * profile, int deleteFile, int timeOut )
Frees the linked list returned by spNetC4AGetGame.
PREFIX void spNetC4ADeleteGames( spNetC4AGamePointer * gameList )
Deletes the profile file on your system, NOT the online account at skeezix server.
PREFIX void spNetC4ADeleteProfileFile( void )
Frees the linked list returned by spNetC4AGetScore.
PREFIX void spNetC4ADeleteScores( spNetC4AScorePointer * scoreList )
Deletes the task struct returned by the parallel working task functions.
PREFIX void spNetC4ADeleteTask( spNetC4ATaskPointer task )
Edits an already existing profile on skeezix’ server.
PREFIX int spNetC4AEditProfile( spNetC4AProfilePointer * profile, char * longname, char * shortname, char * password, char * email, int timeOut )
Makes, that every name appears only once in the scoreList
PREFIX void spNetC4AFilterScore( spNetC4AScorePointer * scoreList )
Frees the profile you got from spNetC4AGetProfile.
PREFIX void spNetC4AFreeProfile( spNetC4AProfilePointer profile )
Loads all games listed on the C4A server.
PREFIX int spNetC4AGetGame( spNetC4AGamePointer * gameList, int timeOut )
Loads all games listed on the C4A server.
PREFIX spNetC4ATaskPointer spNetC4AGetGameParallel( spNetC4AGamePointer * gameList, int timeOut )
Reads your profile out of your c4a-prof file.
PREFIX spNetC4AProfilePointer spNetC4AGetProfile( void )
Loads a top 500 for a given game from the compo4all server.
PREFIX int spNetC4AGetScore( spNetC4AScorePointer * scoreList, spNetC4AProfilePointer profile, char * game, int timeOut )
Loads a top 500 of a month for a given game from the compo4all server.
PREFIX int spNetC4AGetScoreOfMonth( spNetC4AScorePointer * scoreList, spNetC4AProfilePointer profile, char * game, int year, int month, int timeOut )
Gets the status of spNetC4AGetScore, spNetC4ACommitScore, spNetC4ACreateProfile, spNetC4AEditProfile & spNetC4ADeleteAccount.
PREFIX int spNetC4AGetStatus( void )
Gets the status of spNetC4AGetScoreParallel & spNetC4ACommitScoreParallel.
PREFIX int spNetC4AGetStatusParallel( spNetC4ATaskPointer task )
Gets the result of the task when finished (check with spNetC4AGetStatus).
PREFIX int spNetC4AGetTaskResult( void )
Gets the result of the given task when finished (check with spNetC4AGetStatusParallel).
PREFIX int spNetC4AGetTaskResultParallel( spNetC4ATaskPointer task )
Gives you the time out of the C4A tasks.
PREFIX int spNetC4AGetTimeOut( void )
Gives you the time out of the given C4A task.
PREFIX int spNetC4AGetTimeOutParallel( spNetC4ATaskPointer task )
Returns how many scores are cached
PREFIX int spNetC4AHowManyCached( void )
Removes any double occurence of names in the score.
PREFIX void spNetC4AMakeScoresUnique( spNetC4AScorePointer * scoreList )
(De)Activates caching for C4A scores.
PREFIX void spNetC4ASetCaching( int value )
Closes a tcp connection or a server session.
PREFIX void spNetCloseTCP( spNetTCPConnection connection )
Gives you the ip of your connected client.
PREFIX spNetIP spNetGetConnectionIP( spNetTCPConnection connection )
Returns, whether the channel is ready to be used, e.g.
PREFIX int spNetIRCChannelReady( spNetIRCChannelPointer channel )
Closes the connection to the server, finishs the thread and releases the pointer handle!
PREFIX void spNetIRCCloseServer( spNetIRCServerPointer server )
Connects to an IRC server.
PREFIX spNetIRCServerPointer spNetIRCConnectServer( char * name, Uint16 port, char * nickname, char * username, char * realname, char * password )
Joins an IRC channel.
PREFIX spNetIRCChannelPointer spNetIRCJoinChannel( spNetIRCServerPointer server, char * name )
Leave a channel / conversation.
PREFIX void spNetIRCPartChannel( spNetIRCServerPointer server, spNetIRCChannelPointer channel )
Sends a message (PRIVMSG) to a channel or another user.
PREFIX void spNetIRCSendMessage( spNetIRCServerPointer server, spNetIRCChannelPointer channel, char * message )
Returns, whether the server is ready to be used, e.g.
PREFIX int spNetIRCServerReady( spNetIRCServerPointer server )
Opens a connection to an ip
PREFIX spNetTCPConnection spNetOpenClientTCP( spNetIP ip )
Creates a server, which listens at a port
PREFIX spNetTCPServer spNetOpenServerTCP( Uint16 port )
Says, whether a receive call (identified by the thread handle) still waits for an incoming signal.
PREFIX int spNetReceiveFinished( SDL_Thread * thread )
Receives data from the other side until the other side disconnects.
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 )
Says, whether a receive call (identified by the thread handle) still waits for an incoming signal.
PREFIX int spNetReceiveStillWaiting( SDL_Thread * thread )
Receives data from the other side.
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 )
Resolves a ip to a hostname.
PREFIX spNetIP spNetResolve( char * host, Uint16 port )
Gives you the hostname to an ip.
PREFIX char* spNetResolveHost( spNetIP ip, char * host, int host_len )
Sends text over TCP with spNetSendTCP.
PREFIX int spNetSendHTTP( spNetTCPConnection connection, char * data )
Sends a tcp package to the ether.
PREFIX int spNetSendTCP( spNetTCPConnection connection, void * data, int length )
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( void )
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 )
Creates a bunch of a fixed number of particles.
PREFIX spParticleBunchPointer spParticleCreate( int count, int ( *feedback )( spParticleBunchPointer bunch, Sint32 action, Sint32 extra_data), spParticleBunchPointer * addBunch )
Deletes all particles of the particles bunch and connected bunches.
PREFIX void spParticleDelete( spParticleBunchPointer * firstBunch )
Draws all particles of the particles bunch and connected bunches.
PREFIX void spParticleDraw( spParticleBunchPointer firstBunch )
This special function creates a particle bunch out of a sprite.
PREFIX spParticleBunchPointer spParticleFromSprite( spSpritePointer sprite, int ( *feedback )( spParticleBunchPointer bunch, Sint32 action, Sint32 extra_data), spParticleBunchPointer * addBunch )
Updates all particles of the particles bunch and connected bunches.
PREFIX void spParticleUpdate( spParticleBunchPointer * firstBunch, int steps )
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 )
Loads the ModelView matrix from the stack.
PREFIX void spPopModelView( void )
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 )
Saves the recent ModelView matrix on a stack.
PREFIX void spPushModelView( void )
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 )
Quits sparrowNet.
PREFIX void spQuitNet( void )
Releases stuff and frees memory.
PREFIX void spQuitPrimitives( void )
Returns a pseudo random number.
PREFIX Sint32 spRand( void )
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( void )
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( void )
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 )
Copies and scales down source to destination very fast.
PREFIX void spScaleDownFast( SDL_Surface * source, SDL_Surface * destination )
Copies and scales down source to destination with anti aliasing.
PREFIX void spScaleDownSmooth( 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 )
Sets a fixed origin like (32,32).
PREFIX void spSetFixedOrign( int x, int y )
Function for setting up the frustom of the projection matrix.
PREFIX 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 width of spLine calls.
PREFIX void spSetLineWidth( Sint32 width )
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 )
Does in fact the same as srand() of the glibc or other implementations.
PREFIX void spSetRand( Sint32 seed )
Changes the behaviour, what happens, if Return is pressed while keyboard input is pulled.
PREFIX void spSetReturnBehavior( int ignore, int stops )
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 )
Sets a button, which is used as backspace if text is entered via virtual keyboard.
PREFIX void spSetVirtualKeyboardBackspaceButton( int button )
Sets the state of the Shift mode of the virtual keyboard.
PREFIX void spSetVirtualKeyboardShiftState( int state )
Sets a button, which is used as space if text is entered via virtual keyboard.
PREFIX void spSetVirtualKeyboardSpaceButton( int button )
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 )
Waits the given microseconds (!)
PREFIX void spSleep( Uint32 microSeconds )
Deletes a sound.
PREFIX void spSoundDelete( spSound * sound )
Returns the volume of the background music.
PREFIX int spSoundGetMusicVolume( void )
Returns the volume of all sounds.
PREFIX int spSoundGetVolume( void )
This inits spSound.
PREFIX int spSoundInit( void )
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( void )
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.
PREFIX void spUnlockRenderTarget( void )
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 )
Updates the internal pixels pointer used by sparrow3d.
PREFIX void spUpdateTargetPixels( void )
Desides, whether the precalculated normal values of meshes are used or not.
PREFIX void spUsePrecalculatedNormals( int value )
If parallel processing of sparrowPrimitive is activated, this function waits until everything is drawn.
PREFIX void spWaitForDrawingThread( void )
Writes one line from a SDL_RWops file.
PREFIX int spWriteOneLine( spFilePointer file , char * buffer )