niWriteNb

Writes as NIFF 1.0 data to a binary file
 

Syntax

#include  "niffapi.h"

int niWriteNb(Nis *nis);

Arguments

nis
Pointer to the Nis structure holding the data to write

Returned value

TRUE(=1) if the data is written without error. FALSE(=0) if an error occurs.

Explanation

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

Back to NIFFAPI Index

Copyright 1998-1999 NINTENDO Co., Ltd.
1998-1999 MONEGI CORPORATION All rights reserved.