niSaveAsNb

Writes as NIFF1.0 data to the specified file

Syntax

#include  "niffapi.h"

int niSaveAsNb(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.

When this function is called, the expansion block data is written without handling Nis2. (However, the Nis2 structure corresponding to List newly added in NIFF 2.0 is handled as-is.)

See Also

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