PA File System


Defines

#define PA_PAFSFile(FileN)   ((void*)(PAFSStart+PA_FSFile[FileN].FilePos))
 Returns a pointer towards the given file number

Functions

u32 PA_FSInit (void)
 Initialises PAFS and returns the number of files found... Stores the file infos in the following form : PA_FSFile[file number].Name is the file name without the extension, .Ext si the file extension (txt, html, etc...), and .Length is the file length. PA_PAFSFile(FileNumber) is a pointer towards a given file
u32 PA_FSRamInit (void)
 Initialises PAFS and returns the number of files found... Stores the file infos in the following form : PA_FSFile[file number].Name is the file name without the extension, .Ext si the file extension (txt, html, etc...), and .Length is the file length. PA_PAFSFile(FileNumber) is a pointer towards a given file. This version stores the files in the ram, which makes it work in emulators and on WMB, but is limited to a few megs...
s32 PA_FSGetFolder (char *name)
 Search in PAFS for a given folder. Returns the number of the folder in the PA File System, or -1 if no folder was found
s32 PA_FSGetFile (s16 start, char *name, char *extension)
 Search in PAFS for a given file. Returns the number of the file in the PA File System, or -1 if no file was found
s16 PA_FSSearchExt (s16 *array, char *extension)
 Puts the number of all the PAFS files with a given extension in the array, and returns the number of files found
void PA_Malloc (void **pointer, u32 size)
 Safe malloc, checks and frees the memory if necessary first
void PA_FSBgLoad (u8 screen, u8 bg_number, u32 filenumber)
 Easiest way to load a background converted with PAGfx... from PAFS !
void PA_FSBgNameLoad (u8 screen, u8 bg_number, char *bg_name)
 Load a background from PAFS using its name...

Detailed Description

PA File System

Define Documentation

#define PA_PAFSFile FileN   )     ((void*)(PAFSStart+PA_FSFile[FileN].FilePos))
 

Returns a pointer towards the given file number


Function Documentation

void PA_FSBgLoad u8  screen,
u8  bg_number,
u32  filenumber
[inline]
 

Easiest way to load a background converted with PAGfx... from PAFS !

Parameters:
screen Choose de screen (0 or 1)
bg_number Background number... (0-3)
filenumber backgroundname_Info's file number in PAFS

void PA_FSBgNameLoad u8  screen,
u8  bg_number,
char *  bg_name
 

Load a background from PAFS using its name...

Parameters:
screen Choose de screen (0 or 1)
bg_number Background number... (0-3)
bg_name Background name

inline s32 PA_FSGetFile s16  start,
char *  name,
char *  extension
[inline]
 

Search in PAFS for a given file. Returns the number of the file in the PA File System, or -1 if no file was found

Parameters:
start From which file to start the search, usualy 0... Can be useful if you are searching all the files with a given extension
name File name, without the extension. Putting "" as a file name should search all the files with the given extension
extension File extension (ex : txt). Putting "" should search all the files with the given name

inline s32 PA_FSGetFolder char *  name  )  [inline]
 

Search in PAFS for a given folder. Returns the number of the folder in the PA File System, or -1 if no folder was found

Parameters:
name Folder name...

inline u32 PA_FSInit void   )  [inline]
 

Initialises PAFS and returns the number of files found... Stores the file infos in the following form : PA_FSFile[file number].Name is the file name without the extension, .Ext si the file extension (txt, html, etc...), and .Length is the file length. PA_PAFSFile(FileNumber) is a pointer towards a given file

inline u32 PA_FSRamInit void   )  [inline]
 

Initialises PAFS and returns the number of files found... Stores the file infos in the following form : PA_FSFile[file number].Name is the file name without the extension, .Ext si the file extension (txt, html, etc...), and .Length is the file length. PA_PAFSFile(FileNumber) is a pointer towards a given file. This version stores the files in the ram, which makes it work in emulators and on WMB, but is limited to a few megs...

s16 PA_FSSearchExt s16 *  array,
char *  extension
 

Puts the number of all the PAFS files with a given extension in the array, and returns the number of files found

Parameters:
array Array in which to store the PAFS file positions
extension Extension to search, such as "txt"

inline void PA_Malloc void **  pointer,
u32  size
[inline]
 

Safe malloc, checks and frees the memory if necessary first

Parameters:
pointer Pointer...
size Malloc size


Generated on Tue Jan 30 23:10:11 2007 for PAlib by  doxygen 1.3.9.1