IO Namespace Reference

Namespace for file loading and parsing functions. More...


Classes

struct  _PWTHeader
 The header found in each case file. More...

Typedefs

typedef struct _PWTHeader PWTHeader

Functions

bool unpackResourceFile (const ustring &path)
 Unpack and extract the resource file.
bool loadCaseFromFile (const ustring &path, Case::Case &pcase)
 Load a case from file.
bool loadSpriteFromFile (const ustring &path, Sprite &sprite)
 Load a sprite from file.
bool loadStockFile (const ustring &path, Case::Case *pcase)
 Load the stock assets config file.
bool loadThemeXML (const ustring &path, Theme::ColorMap &map)
 Load the theme from XML.
Textures::Texture readImage (FILE *f)
 Read image data from the file.
ustring readString (FILE *f)
 Read a string from the file.

Variables

const int FILE_MAGIC_NUM = (('T' << 16) + ('W' << 8) + 'P')
 Magic number for PWT case file.
const int FILE_VERSION = 10
 Supported version of the PWT case file.
const ustring SPR_MAGIC_NUM = "SPR"
 Magic number for the sprite file.
const int SPR_VERSION = 10
 Supported sprite file version.


Detailed Description

Namespace for file loading and parsing functions.

Function Documentation

bool IO::loadCaseFromFile ( const ustring &  path,
Case::Case pcase 
)

Load a case from file.

Parameters:
path The path to the file
pcase Case::Case object to load the data into
Returns:
true if no errors occurred, false otherwise

bool IO::loadSpriteFromFile ( const ustring &  path,
Sprite sprite 
)

Load a sprite from file.

Parameters:
path Path to the sprite file
sprite Sprite object to load the dat into
Returns:
true if no errors occurred, false otherwise

bool IO::loadStockFile ( const ustring &  path,
Case::Case pcase 
)

Load the stock assets config file.

Parameters:
path Path to the config file
pcase Pointer to Case::Case object to load the config options into
Returns:
true if no errors occurred, false otherwise

bool IO::loadThemeXML ( const ustring &  path,
Theme::ColorMap map 
)

Load the theme from XML.

Parameters:
path The path to the config file
map A Theme::ColorMap object to load theme data into
Returns:
true if no errors occurred, false otherwise

Textures::Texture IO::readImage ( FILE *  f  ) 

Read image data from the file.

Parameters:
f FILE handle with read pointer set to image
Returns:
A Textures::Texture object with data

ustring IO::readString ( FILE *  f  ) 

Read a string from the file.

Parameters:
f FILE handle with read pointer set to string
Returns:
The read string

bool IO::unpackResourceFile ( const ustring &  path  ) 

Unpack and extract the resource file.

Parameters:
path Path to the resource file
Returns:
true if no errors occurred, false otherwise


Generated on Fri Feb 22 22:29:23 2008 for Phoenix Wright Case Player API by  doxygen 1.5.3