Chapter 3 Binary Format
3-4. SceneList

Only one Scene node can be used in a single NIFF file.

The index numbers of the Obj node, Camera node, Light node, and Env node that are linked from the Scene node are described in a SceneList.

SceneHeader u32 scene_header_tag
u32 scene_header_size
u32 scene_size
u32 scene_cfg
u32 scene_name_index
u32 scene_obj_link_num
u32 scene_env_link_num
u32 scene_cam_link_num
u32 scene_light_link_num
u32 nintendo_extension_block_size
u32 user_extension_block_size
u32 scene_obj_link_index(0)
...
u32 scene_obj_link_index(scene_obj_link_num - 1)
u32 scene_env_link_index(0)
...
u32 scene_env_link_index(scene_env_link_num - 1)
u32 scene_cam_link_index(0)
...
u32 scene_cam_link_index(scene_cam_link_num - 1)
u32 scene_light_link_index(0)
...
u32 scene_light_link_index(scene_light_link_num - 1)
NintendoExtensionBlock
UserExtensionBlock

Figure: Scene Area Memory Map

u32 scene_header_tag Tag indicating scene header. Set the following flag.

TAG_SCENE_HEADER	0x00010000
u32 scene_header_size Size of SceneHeader
u32 scene_size Size of SceneList
u32 scene_cfg Setting of drawing a whole scene. The following flags are currently defined.

SCENE_CFG_VIDEO_NTSC	0x00000000
SCENE_CFG_VIDEO_PAL	0x00000001
SCENE_CFG_VIDEO_MPAL	0x00000002
SCENE_CFG_GAMMA		0x00000004
SCENE_CFG_DITHER	0x00000008
SCENE_CFG_DIVOT		0x00000010

Setting VI for converting scene to N64 data.

SCENE_CFG_VIDEO_NTSC:Pre-view by NTSC environment.

SCENE_CFG_VIDEO_PAL:Pre-view by PAL environment.

SCENE_CFG_VIDEO_MPAL: Pre-view by MPAL environment.

SCENE_CFG_GAMMA:Enable GAMMA correction.

SCENE_CFG_DITHER:Enable to use Dither filter.

SCENE_CFG_DIVOT:Enable Divot.

SCENE_CFG_VIDEO_*Flag should be defined one by one.

SCENE_CFG_GAMMA, SCENE_CFG_DITHER and SCENE_CFG_DIVOT can be set simultaneously. For example, when all of flags are used by the NTSC environment, set the following:


SCENE_CFG_VIDEO_NTSC | SCENE_CFG_GAMMA 
	| SCENE_CFG_DITHER | SCENE_CFG_DIVOT
= 0x0000001c
u32 scene_name_index Index number of scene name in NameList
u32 scene_obj_link_num Total number of Obj nodes linking directly from Scene node.
u32 scene_env_link_num Total number of Env nodes linking directly from Scene node.
u32 scene_cam_link_num Total number of Cam nodes linking directly from Scene node.
u32 scene_light_link_num Total number of Light nodes linking directly from Scene node.
u32 nintendo_extension_block_size If extension data is created on the Nintendo 64 side, the extension data is stored in NintendoExtensionBlock. Specify the block size.

Set the following flag if extension data is not used (default).


NINTENDO_EXT_BLOCK_NONE		0x00000000
u32 user_extension_block_size If extension data is created on the user side, the extension data is stored in UserExtensionBlock. Specify the block size.

Set the following flag if extension data is not used.


USER_EXT_BLOCK_NONE		0x00000000
u32 scene_obj_link_index Index number of Obj node linked directly from Scene node.
u32 scene_env_link_index Index number of Env node linked directly from Scene node.
u32 scene_cam_link_index Index number of Cam node linked directly from Scene node.
u32 scene_light_link_index Index number of Light node linked directly from Scene node.
NintendoExtensionBlock If extension data is created by NINTENDO, the extension data is stored in NintendoExtensionBlock.
UserExtensionBlock If extension data is created on the user side, the extension data is stored in UserExtensionBlock.