niNIFFver

Returns the NIFF version

Syntax

#include  "niffapi.h"

int niNIFFver(NisFileHeader *fh);

Arguments

fh   Pointer to the NisFileHeader structure holding the NIFF FileHeader

Return value

Returns the NIFF version

Description

The NIFF version is returned. More specifically, the fh->version low-order 16bits are returned. In the case of NIFF 2.0, the value 0x0200 is returned.

When NIFF 2.0 data is not read, the pointer to the NIFF 2.0 data in the Nis structure is not initialized, so an error occurs when the data is accessed. When referencing reference NIFF 2.0 data, make sure to use this function to check the version.

See Also

For the NisFileHeader structure, see n64kit/niff/niffapi/nis.h.