|
Size: 1451
Comment: add content from old wiki
|
Size: 1543
Comment: update content
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 52: | Line 52: |
| .[[SDL_RWFromFile]]??? .[[SDL_RWSeek]]??? <<Color2(green,Should I list all the current read and write functions? Equivalent to SDL_RWclose?)>> |
.[[SDL_RWclose]] (Macro) *??? .[[SDL_RWFromFile]] *??? .[[SDL_RWread]] (Macro) *??? .[[SDL_RWseek]](Macro) *??? .[[SDL_RWwrite]] (Macro) *??? <<Color2(green,Should the current read and write functions (not macros) be listed?)>> |
DRAFT |
SDL_RWtell
Use this function (macro) to *perform a do-nothing seek to get the current offset in an SDL_RWops stream*.
Syntax
SDL_RWtell(ctx)
green
(ctx)->seek(ctx, 0, RW_SEEK_CUR)
Function Parameters
ctx |
*a pointer to an SDL_RWops structure* |
Return Value
*Returns the current offset in the stream.*
Code Examples
*
#include <stdio.h>
#include "SDL_rwops.h"
int main()
{
SDL_RWops *rw=SDL_RWFromFile("test.bin","r");
if(rw==NULL)
{
fprintf(stderr,"Couldn't open test.bin\n");
return(1);
}
SDL_RWseek(rw,0,RW_SEEK_END);
fprintf(stderr,"Final position in test.bin: %d\n",SDL_RWtell(rw));
SDL_RWclose(rw);
return(0);
}
*
Remarks
Note: This is not a built-in function. This is a macro that calls whatever seek function that happens to be pointed to in an SDL_RWops structure.
Related Functions
SDL_RWclose (Macro) *???
SDL_RWFromFile *???
SDL_RWread (Macro) *???
SDL_RWseek(Macro) *???
SDL_RWwrite (Macro) *???
green
