ENV_Init

C Specification

#include <nitro/env.h>
void ENV_Init( void );
 

Arguments

None.

Return Values

None.

Description

This function initializes the resource management system.

The resource array is specified with the ENVResource* resourceArray[] array within the function. All further resource searches will be conducted from this array.

The resourceArray[] holds a resource array. By grouping the necessary resource arrays, they can all be specified at once. It needs to be prepared before calling this function.

Multiple arrays can be joined together into a list to be kept inside the system. The maximum number of arrays is ENV_RESOURCE_SET_MAX. When multiple arrays are kept, searches are performed on all of them. The functions ENV_SetResourceSet(), ENV_AppendResourceSet(), ENV_PrependResourceSet(), and ENV_InsertResourceSet() are used to manipulate the list.

When describing a resource array, be sure to place an ENV_RESOURCE_END at the end.

A description sample using resourceArray[].

(Example)

ENVResource myResource1[] = {
"res1.data1",    ENV_U32( 300 ),
"res1.data2", ENV_STRING( "abcde" ),
"res1.data3",    ENV_S32( -100 ),
ENV_RESOUCE_END
};

ENVResource myResource2[] = {
"res2.data1",    ENV_U32( 500 ),
"res2.data2",    ENV_S32( -800 ),
ENV_RESOUCE_END
};

ENVResource* resourceArray[]={ myResource1, myResource2, NULL }; :


See Also

ENV_SetResourceSetArray,
ENV_SetResourceSet, ENV_AppendResourceSet, ENV_PrependResourceSet, ENV_InsertResourceSet,
ENV_Get*

Revision History

08/29/2005 Described multiple arrays.
08/16/2005 Initial version.