niWriteNb2

Writes as NIFF2.0 data to a binary file

Syntax

#include  "niffapi.h"

int niWriteNb2(Nis *nis);

Arguments

nis   Pointer to the Nis structure holding the data to write

Return value

TRUE(=1) if the data is written without error.

FALSE(=0) if an error occurs.

Return value

Takes the data held in the Nis structure and writes it as binary data to the file with the name held in nis->filename. This file name is set with niOpenNb(), niOpenNt() etc.

NIFF 2.0 defines new data in the Nintendo expansion block defined by NIFF 1.0. Nis handles this by setting up separate structures for the Nintendo expansion block data and the NIFF 2.0 data. The structure for NIFF 2.0 data is called Nis2. When niOpenNb() reads a NIFF 2.0 file, data is held in the Nintendo expansion block, and at the same time data is also stored in the Nis2 structure. With this function, the Nis2 structure corresponding to the expansion block is handled and the expansion block data is not referenced.

Notes

With this function, only data defined with Nis2 is handled for the Nintendo expansion block, so if the expansion block is used up to a region not defined with Nis2, then data cannot be written correctly.

See Also

niOpenNb,
niOpenNt
niWriteNb
For the Nis structure, see n64kit/niff/niffapi/nis.h, nis2.h.