niSaveAsNb2

Writes as NIFF1.0 data to a binary file

Syntax

#include  "niffapi.h"

int niSaveAsNb2(Nis *nis, char *filename);

Arguments

nis   Pointer to the Nis structure holding the data to write
filename   Name of the NIFF binary file to write to

Return Value

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

FALSE(=0) if an error occurs.

Description

Takes the data held in the Nis structure and writes it as binary data to the file specified by filename.

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.

Note

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
niSaveAsNb
For the Nis structure, see n64kit/niff/niffapi/nis.h, nis2.h.