Mana
Loading...
Searching...
No Matches
Macros | Functions
physfsrwops.c File Reference
#include <stdio.h>
#include "physfsrwops.h"

Go to the source code of this file.

Macros

#define RW_SEEK_SET   SEEK_SET
 
#define RW_SEEK_CUR   SEEK_CUR
 
#define RW_SEEK_END   SEEK_END
 

Functions

SDL_RWops * PHYSFSRWOPS_makeRWops (PHYSFS_File *handle)
 Make a SDL_RWops from an existing PhysicsFS file handle.
 
SDL_RWops * PHYSFSRWOPS_openRead (const char *fname)
 Open a platform-independent filename for reading, and make it accessible via an SDL_RWops structure.
 
SDL_RWops * PHYSFSRWOPS_openWrite (const char *fname)
 Open a platform-independent filename for writing, and make it accessible via an SDL_RWops structure.
 
SDL_RWops * PHYSFSRWOPS_openAppend (const char *fname)
 Open a platform-independent filename for appending, and make it accessible via an SDL_RWops structure.
 

Macro Definition Documentation

◆ RW_SEEK_CUR

#define RW_SEEK_CUR   SEEK_CUR

Definition at line 39 of file physfsrwops.c.

◆ RW_SEEK_END

#define RW_SEEK_END   SEEK_END

Definition at line 42 of file physfsrwops.c.

◆ RW_SEEK_SET

#define RW_SEEK_SET   SEEK_SET

Definition at line 36 of file physfsrwops.c.

Function Documentation

◆ PHYSFSRWOPS_makeRWops()

SDL_RWops * PHYSFSRWOPS_makeRWops ( PHYSFS_File *  handle)

Make a SDL_RWops from an existing PhysicsFS file handle.

You should dispose of any references to the handle after successful creation of the RWops. The actual PhysicsFS handle will be destroyed when the RWops is closed.

Parameters
handlea valid PhysicsFS file handle.
Returns
A valid SDL_RWops structure on success, NULL on error. Specifics of the error can be gleaned from PHYSFS_getLastError().

Definition at line 220 of file physfsrwops.c.

◆ PHYSFSRWOPS_openAppend()

SDL_RWops * PHYSFSRWOPS_openAppend ( const char *  fname)

Open a platform-independent filename for appending, and make it accessible via an SDL_RWops structure.

The file will be closed in PhysicsFS when the RWops is closed. PhysicsFS should be configured to your liking before opening files through this method.

Parameters
filenameFile to open in platform-independent notation.
Returns
A valid SDL_RWops structure on success, NULL on error. Specifics of the error can be gleaned from PHYSFS_getLastError().

Definition at line 244 of file physfsrwops.c.

◆ PHYSFSRWOPS_openRead()

SDL_RWops * PHYSFSRWOPS_openRead ( const char *  fname)

Open a platform-independent filename for reading, and make it accessible via an SDL_RWops structure.

The file will be closed in PhysicsFS when the RWops is closed. PhysicsFS should be configured to your liking before opening files through this method.

Parameters
filenameFile to open in platform-independent notation.
Returns
A valid SDL_RWops structure on success, NULL on error. Specifics of the error can be gleaned from PHYSFS_getLastError().

Definition at line 232 of file physfsrwops.c.

◆ PHYSFSRWOPS_openWrite()

SDL_RWops * PHYSFSRWOPS_openWrite ( const char *  fname)

Open a platform-independent filename for writing, and make it accessible via an SDL_RWops structure.

The file will be closed in PhysicsFS when the RWops is closed. PhysicsFS should be configured to your liking before opening files through this method.

Parameters
filenameFile to open in platform-independent notation.
Returns
A valid SDL_RWops structure on success, NULL on error. Specifics of the error can be gleaned from PHYSFS_getLastError().

Definition at line 238 of file physfsrwops.c.