Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

physfsrwops.cpp File Reference

#include <stdio.h>
#include "physfsrwops.h"

Include dependency graph for physfsrwops.cpp:

Go to the source code of this file.

Functions

static int physfsrwops_seek (SDL_RWops *rw, int offset, int whence)
static int physfsrwops_read (SDL_RWops *rw, void *ptr, int size, int maxnum)
static int physfsrwops_write (SDL_RWops *rw, const void *ptr, int size, int num)
static int physfsrwops_close (SDL_RWops *rw)
static SDL_RWops * create_rwops (PHYSFS_file *handle)
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.


Function Documentation

static SDL_RWops* create_rwops PHYSFS_file *  handle  )  [static]
 

Definition at line 122 of file physfsrwops.cpp.

References physfsrwops_close(), physfsrwops_read(), physfsrwops_seek(), and physfsrwops_write().

Referenced by PHYSFSRWOPS_makeRWops(), PHYSFSRWOPS_openAppend(), PHYSFSRWOPS_openRead(), and PHYSFSRWOPS_openWrite().

static int physfsrwops_close SDL_RWops *  rw  )  [static]
 

Definition at line 110 of file physfsrwops.cpp.

Referenced by create_rwops().

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:
handle a 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 142 of file physfsrwops.cpp.

References create_rwops().

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:
filename File 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 163 of file physfsrwops.cpp.

References create_rwops().

Referenced by PG_FileArchive::OpenFileRWops().

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:
filename File 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 153 of file physfsrwops.cpp.

References create_rwops().

Referenced by PG_FileArchive::OpenFileRWops().

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:
filename File 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 158 of file physfsrwops.cpp.

References create_rwops().

Referenced by PG_FileArchive::OpenFileRWops().

static int physfsrwops_read SDL_RWops *  rw,
void *  ptr,
int  size,
int  maxnum
[static]
 

Definition at line 88 of file physfsrwops.cpp.

Referenced by create_rwops().

static int physfsrwops_seek SDL_RWops *  rw,
int  offset,
int  whence
[static]
 

Definition at line 25 of file physfsrwops.cpp.

Referenced by create_rwops().

static int physfsrwops_write SDL_RWops *  rw,
const void *  ptr,
int  size,
int  num
[static]
 

Definition at line 100 of file physfsrwops.cpp.

Referenced by create_rwops().


Generated on Tue Jun 24 02:04:38 2008 for Advanced Strategic Command by  doxygen 1.4.2