Obtains game note information
#include <ultra64.h> /* os.h */
s32 osPfsFileState(OSPfs *pfs, s32 file_no, OSPfsState *state);
The osPfsFileState obtains the specified game note information. To specify a game note, use the note number file_no (file descriptor) argument. To retrieve specific game note information, it is necessary to obtain the note number by calling osPfsFindFile, before calling this function. Also, to retrieve all game note information in a Controller Pak, assign 0 to 15 to the file number (file_no) and call osPfsFileState 16 times.
The OSPfs handle pfs must be the handle initialized with osPfsInitPak. See the osPfsInitPak page for information on how to create this handle.
The game note information is stored in the OSPfsState structure specified by the pointer state argument. The following is the definition of that structure:
typedef struct {
u32 file_size; /* Note Size (number of bytes) */
u32 game_code; /* Game Code */
u16 company_code; /* Company Code */
char ext_name[4]; /* Note Extension */
char game_name[16]; /* Note Name */
}
If this function is called successfully, 0 is returned. If an error occurs, one of the following error codes is returned:
osContInit, osContStartQuery, osContGetQuery, osPfsAllocateFile, osPfsChecker, osPfsDeleteFile, osPfsFindFile, osPfsFreeBlocks, osPfsInitPak, osPfsIsPlug, and osPfsReadWriteFile
1999/02/01 Completely revised
1999/04/30 Changed format