nd Function Reference

ndGenInstance

Function name

  ndGenInstance

Syntax

  NDD_INSTANCE *ndGenInstance(NDD_INSTANCE *parent, u16 type, u16 prio, int gid);

Description

  Creates and links an instance structure.

Arguments

NDD_INSTANCE *parent;
  Parent instance pointer.
u16 type;
  Instance type.
u16 prio;
  Priority code. This affects the order of evaluation of display instances.
  The specifiable range varies depending on the type.
int gid;
  Instance group ID.

Return value

NDD_INSTANCE *;
  The created instance pointer.

Note

  Creates the instance. The characteristics depend on the type.

ndChangePriority

Function name

  ndChangePriority

Syntax

  u16 ndChangePriority(NDD_INSTANCE *isp, u16 newprio);

Description

  Changes the priority of one instance.

Arguments

NDD_INSTANCE *isp;
  Instance pointer.
u16 newprio;
  New priority value.

Return value

u16;
  Old priority value.

Note

  Links to the most significant specified priority.

ndChangeParent

Function name

  ndChangeParent

Syntax

  NDD_INSTANCE ndChangeParent(NDD_INSTANCE *isp, NDD_INSTANCE *newparent);

Description

  Changes the parent of the instance.

Arguments

NDD_INSTANCE *isp;
  Target's instance pointer.
NDD_INSTANCE *newparent;
  New parent instance pointer.

Return value

NDD_INSTANCE *;
  Parent instance up until now.

Note

  newparent must not be NULL.

ndDeleteInstanceGID

Function name

  ndDeleteInstanceGID

Syntax

  void ndDeleteInstanceGID(NDD_INSTANCE *isp, int type, int gid, int mask);

Description

  Deletes the instance, matching the parameters specified by type, gid, and mask.

The instance that is deleted is the one that hits [GID] & mask == gid with [TYPE] == type. However, when -1 is specified for type, type is not checked.

All children of isp are evaluated. If a parent is hit upon in the search, all of its children are deleted.

Arguments

NDD_INSTANCE *isp;
int type;
int gid;
int mask;

Note

  This function cannot be used inside an instance callback.

ndInit

Function name

  ndInit

Syntax

  void ndInit(void);

Description

  Initializes the module.

Note

  This function must be called before using the overall 'nd' API. The current scene is prepared. Even if the scene is not set, the base for displaying the object is prepared.

ndEntryAnimation

Function name

  ndEntryAnimation

Syntax

  NDD_INSTANCE *ndEntryAnimation(NDD_INSTANCE *parent, int animno, int id, NDD_INSTANCE *tarinst);

Description

  Creates one timekeeper instance and the number of channels' worth of animation instances from the animation reference table.

Arguments

NDD_INSTANCE *parent;
  Parent instance pointer.
int animno;
  Animation number.
int id;
  Instance ID.
NDD_INSTANCE *tarinst;
  Instance pointer attaching the animation.

Return value

  NDD_INSTANCE *;
Animation timekeeper instance pointer.

Note

  Cannot be used inside an instance callback.

ndEntryAnimationRaw

Function name

  ndEntryAnimationRaw

Syntax

  NDD_INSTANCE *ndEntryAnimationRaw(NDD_INSTANCE *parent, NDR_ANIM *anp, int gid, NDD_INSTANCE *tarinst);

Description

  Creates one timekeeper instance and the number of channels' worth of animation instances from the animation reference table.

Arguments

NDD_INSTANCE *parent;
  Parent instance pointer.
NDR_ANIM *anp;
  Pointer to the animation reference table.
int gid;
  Instance group ID.
NDD_INSTANCE *tarinst;
  Instance pointer attaching the animation.

Return value

  NDD_INSTANCE *;
Animation timekeeper instance pointer.

Note

  Cannot be used inside an instance callback.

ndEntryObject

Function name

  ndEntryObject

Syntax

  NDD_INSTANCE *ndEntryObject(NDD_INSTANCE *parent, int objno, int shapeno, int animno, int gid, int flag);

Description

  Creates one instance from the object reference table.

Arguments

NDD_INSTANCE *parent;
  Parent instance pointer. If NULL, hangs down from object root.
int objno;
  Index of the object reference table.
int shapeno;
  Offset of the shape reference table. The object reference table "shape" and the list at the position calculated by adding the numeric value specified here is registered in the shape held by the object. The shape maintained by the object is registered from the "shape" of the object reference table and the list of positions obtained by adding the numeric values specified by "shape".
int animno;
  Offset of the animation reference table. To pass animation simultaneously, pass the animation of the table derived from adding this value to the values of NDR_OBJ.geom_anim.
int gid;
  The instance ID base value. "gid" specified by NDR_OBJ is added to this value and the sum is registered in the created object instance structure.
int flag;
  Bit-assigned creation flag. Effective when the bit is 1.
  bit 0 ... Set together with NDR_OBJ animation link.
  bit 1 ... Evaluates by tracing link toward end of the parent-child relationship.

Return value

  NDD_INSTANCE *;
Pointer to top parent among the created instances.

Note

  ndEntryObjectRaw is called internally.
  Cannot be used inside an instance callback.

ndEntryObjectRaw

Function name

  ndEntryObjectRaw

Syntax

  NDD_INSTANCE *ndEntryObjectRaw(NDD_INSTANCE *parent, NDR_OBJ *rop, int gid);

Description

  Creates one instance from the object reference table. The link is not followed, and the animation instance is not created.

Arguments

NDD_INSTANCE *parent;
  Parent instance pointer. If NULL, hangs down from object root.
NDR_OBJ *rop;
  Pointer to the object reference table.
int gid;
  Instance ID base value. "gid" specified by NDR_OBJ is added to this value and the sum is registered in the created object instance structure.

Return value

  NDD_INSTANCE *;
Created instance pointer.

Note

  Cannot be used inside an instance callback.

ndAttachAnimation

Function name

  ndAttachAnimation

Syntax

  void ndAttachAnimation(NDD_INSTANCE *parent, NDD_INSTANCE *isp, int objno, int animno, int gid, int flag)

Description

  References the animation link in the object reference table and attaches the animation to the existing object instance.

Arguments

NDD_INSTANCE *parent;
  Parent instance pointer. If NULL, hangs down from animation root.
NDD_INSTANCE *isp;
  Pointer of object instance attaching the animation.
int objno;
  Object number on the global resource list.
int animno;
  Offset of the animation reference table. To pass animation simultaneously, pass the animation of the table derived from adding this value to the values of NDR_OBJ.geom_anim.
int gid;
  The instance ID base value. "gid" specified by NDR_OBJ is added to this value and the sum is registered in the created object instance structure.
int flag;
  Bit-assigned creation flag. Effective when the bit is 1.
  bit 0 ... Unused.
  bit 1 ... Evaluates by tracing link toward end of the parent-child relationship.

Return value

  NDD_INSTANCE *;
  Pointer to the top parent among the created instances.

Note

  The object instance passed by "isp" is handled as an object that was created according to the NDR_OBJ structure list specified by objno.
  Cannot be used inside an instance callback.

ndEntryDeformVtx

Function name

  ndEntryDeformVtx

Syntax

  NDD_INSTANCE *ndEntryDeformVtx(NDD_INSTANCE *isp, NDR_DEFORM *dmfp, int ofs, int gid);

Description

  Passes the vertex deform instance.

Arguments

NDD_INSTANCE *isp;
  Parameters
NDR_DEFORM *dmfp;
  Pointer to the vertex deform structure.
int ofs;
  Offset for when the raw vertex data list is referenced.
int gid;
  Instance group ID.

Return value

  NDD_INSTANCE *;
  Pointer of the created vertex deform instance.

Note

  This instance must be a child of the parent deform_root_instp.

ndEntryDeformVtxcol

Function name

  ndEntryDeformVtxcol

Syntax

  NDD_INSTANCE *ndEntryDeformVtxcol(NDD_INSTANCE *isp, NDR_DEFORM *dmfp, int ofs, int gid);

Description

  Passes the vertex color deform instance.

Arguments

NDD_INSTANCE *isp;
  Pointer to the active vertex instance.
NDR_DEFORM *dmfp;
  Pointer to the vertex color deform structure.
int ofs;
  Offset for when the raw vertex color data list is referenced.
int gid;
  Instance group ID.

Return value

  NDD_INSTANCE *;
  Pointer of the created vertex color deform instance.

Note

  This instance must be a child of the parent deform_root_instp. The system function malloc() is used internally to reserve three memory sites. Since the callback at the end is set, the memory reserved by malloc() is released within the callback routine.

ndEntryDeformVtxnv

Function name

  ndEntryDeformVtxnv

Syntax

  NDD_INSTANCE *ndEntryDeformVtxnv(NDD_INSTANCE *isp, NDR_DEFORM *dmfp, int ofs, int gid);

Description

  Passes the vertex normal deform instance.

Arguments

NDD_INSTANCE *isp;
  Pointer to the active vertex instance.
NDR_DEFORM *dmfp;
  Pointer to the vertex normal deform structure.
int ofs;
  Offset for when the raw vertex normal data list is referenced.
int gid;
  Instance group ID.

Return value

  NDD_INSTANCE *;
  Pointer of the created vertex normal deform instance.

Note

  This instance must be a child of the parent deform_root_instp. The system function malloc() is used internally to reserve three memory sites. Since the callback at the end is set, the memory reserved by malloc() is released within the callback routine.

ndEntryDeformVtxst

Function name

  ndEntryDeformVtxst

Syntax

  NDD_INSTANCE *ndEntryDeformVtxst(NDD_INSTANCE *isp, NDR_DEFORM *dmfp, int ofs, int gid);

Description

  Makes an entry of the vertex texture coordinate deform instance.

Arguments

NDD_INSTANCE *isp;
  Pointer for the active vertex instance
NDR_DEFORM *dmfp;
  Pointer for the vertex texture coordinate deform structure
int ofs;
  Offset when referring to the raw vertex texture coordinate data list
int gid;
  Instance group ID

Return value

  NDD_INSTANCE *;
  Pointer for the created vertex texture coordinate deform instance

Note

  This instance is linked to the exclusive parent (deform_root_instp). Three (3) memories are reserved inside using the system function malloc(). Also, a call back for terminating is set, and the memory reserved by malloc() is released inside the call back routine.

ndEntryDeformShape

Function name

  ndEntryDeformShape

Syntax

  NDD_INSTANCE *ndEntryDeformShape(NDD_INSTANCE *isp, int ofs_rawvtx, int ofs_rawvtxcol, int ofs_rawvtxnv, int ofs_rawvtxst, int gid, int flag);

Description

  Takes the shape being referenced by the object instance and substitutes it for the modulated vertex information.

Arguments

NDD_INSTANCE *isp;
  Pointer to the object instance of the modulation target.
int ofs_rawvtx;
  int ofs_rawvtxcol;
int ofs_rawvtxnv;
int ofs_rawvtxst;
  Offset for when each data list is referenced.
int gid;
  Instance group ID.
int flag;
  Bit-assigned creation flag. Effective when the bit is 1.
  bit 0 ... Passes the vertex deform.
  bit 1 ... Passes the vertex color deform.
  bit 2 ... Passes the vertex normal deform.
  bit 3 ... Makes an entry of the vertex texture coordinate deform.

Return value

  NDD_INSTANCE *;
  The created active vertex instance's pointer.

Note

  The upper instance of ndEntryDeformVtx(), ndEntryDeformVtxnv(), ndEntryDeformVtxcol(), and ndEntryDeformVtxst() are created. Inside the function, the creation of each deform instance is evaluated while watching the parameter flag. It has two Vtx buffers in order to adjust to the asynchronous construction of Gfx. The system function malloc() is used internally to reserve three memory sites.
  Since the callback at the end is set, the memory reserved by malloc() is released within the callback routine.

ndAttachDeform

Function name

  ndAttachDeform

Syntax

  void ndAttachDeform(NDD_INSTANCE *isp, int rawvtxno, int rawvtxcolno, int rawvtxnvno, int rawvtxstno, int gid, int flag);

Description

  Passes the deform if it is prepared for the hierarchical object instance.

Arguments

NDD_INSTANCE *isp;
  Pointer of the object instance that becomes the target for creation of the active vertex instance.
int rawvtxno;
int rawvtxcolno;
int rawvtxnvno;
int rawvtxstno;
  Offset for when each data list is referenced.
int gid;
  Instance group ID.
int flag;
  Bit-assigned creation flag. Effective when the bit is 1.
  bit 0 ... Unused.
  bit 1 ... Evaluates by tracing link toward the end of the parent-child relationship.
  bit 2 ... Passes the vertex deform.
  bit 3 ... Passes the vertex color deform.
  bit 4 ... Passes the vertex normal deform.
  bit 5 ... Makes an entry of the vertex texture coordinate deform.

Return value

Note

ndSetupScene

Function name

  ndSetupScene
Function name

  void ndSetupScene(NDD_RESINFO *rip, int gid, int flag);

Description

  Constructs the scene from the scene reference table.

Arguments

NDD_RESINFO *rip;
  Resouce Information
int gid;
  Group ID at the time the object instance was registered.
int flag;
  Flag for creating the flags that set the creation conditions. The following are effective when each bit is 1:
  bit 0 ... Set together with the NDR_OBJ animation link.
  bit 1 ... Evaluates by tracing link toward the end of the parent-child relationship.
  bit 2 ... Passes the vertex deform.
  bit 3 ... Passes the vertex color deform.
  bit 4 ... Passes the vertex normal deform
  bit 5 ... Makes an entry of the vertex texture coordinate deform.

Note

  Refer to rip->resinfo->scene for the scene data structure used for making settings.

ndSetScreen

Function name

  ndSetScreen

Syntax

  void ndSetScreen(int top, int bottom, int left, int right);

Description

  Sets the width and height of the screen display area.

Arguments

int top;
int bottom;
int left;
int right;
  The display range in units of pixels.

ndResInit

Function name

  ndResInit

Syntax

  void ndResInit(int olplim, int slplim, int alplim, int rvlplim, int rvclplim, int rvnlplim, int rvslplim);

Description

  Initializes the resource module.

Arguments

int olplim;
int slplim;
int alplim;
int rvlplim;
int rvclplim;
int rvnlplim;
int rvslplim;
  The list management pointer and the maximum number for each data class.

Note

  The pointer list is reserved by the system function malloc().

ndResEntry

Function name

  ndResEntry

Syntax

  NDD_RESINFO *ndResEntry(NDR_RESINFO *rrp, int usemask);

Description

  Adds the specified resource to the global resource list.

Arguments

NDR_RESINFO *rrp;
  Pointer to the resource information structure for reference use.
int usemask;
  Specifies in bits the data type to be passed from the rrp contents.

Return value

  NDR_RESINFO *drp;
  Pointer to the resource information structure.

Note

ndResRelease

Function name

  ndResRelease

Syntax

  void ndResRelease(NDD_RESINFO *drp);

Description

  Releases the specified resource from the global list.

Arguments

NDD_RESINFO *drp;
  Pointer to the resource information structure.

Return value

Note

  The argument drp is released.
  Only the resource that was just passed can be released.

ndDeleteInstance

Function name

  ndDeleteInstance

Syntax

  void ndDeleteInstance(NDD_INSTANCE *isp);

Description

  Delete instance and matching the parameters.

Note

  The function cannot be used inside an instance callback.

ndGetInstanceTRXPointer

Function name

  ndGetInstanceTRXPointer

Syntax

  TRX *ndGetInstanceTRXPointer(NDD_INSTANCE *isp);

Description

  Return transform buffer pointer from instance pointer.

Arguments

NDD_INSTANCE *isp;
  Instance pointer

Note

  Depending on data type, the position of TRX is varied.

ndSetupIdentTRX

Function name

  ndSetupIdentTRX

Syntax

  void ndSetupIdentTRX(TRX *p)

Description

  Return matrix

Arguments

TRX *p;
Pointer of transform matrix

Note

  Assign 9 parameters of 0,0,0, 0,0,0, 1,1,1 and returns matrix corresponding to Parallel translation, rotation, enlargement and reduction.

ndProgressAnimTime

Function name

  ndProgressAnimTime

Syntax

  int ndProgressAnimTime(NDD_INST_ANIMTK *ntkp);

Description

  Time advance process for timekeeper.

Arguments

NDD_INST_ANIMTK *ntkp
  The animation timekeeper instance pointer.

Return value

  int;
  Execution result. At present, 1 must be returned.

Note

  Called by ndEvalInstance

ndSetAnimChannel

Function name

  ndSetAnimChannel

Syntax

  int ndSetAnimChannel(NDD_INST_ANIM *niap);

Description

  Key frame animation channel process.

Arguments

NDD_INST_ANIM *niap;
  Animation instance pointer.

Return value

  int;
  Execution result.

Note

  Called by ndEvalInstance.

ndReloadDynamicVertex

Function name

  ndReloadDynamicVertex

Syntax

  void ndReloadDynamicVertex(NDD_INST_DYNAMICVTX *nidp);

Description

  References the modulation tables of the various deform instances and assembles Vtx.

Arguments

NDD_INST_DYNAMICVTX *nidp;
  The active vertex instance's internal structure pointer.

Return value

Note

  Since it depends in part on the drawing driver, two Vtx tables are prepared for making settings.

ndDeformVertex

Function name

  ndDeformVertex

Syntax

  void ndDeformVertex(NDD_INST_DEFORM_VTX *nidvp);

Description

  Deforms the vertex.

Arguments

NDD_INST_DEFORM_VTX *nidvp;
  The vertex deform instance's internal structure pointer.

Return value

Note

ndDeformVertexNv

Function name

  ndDeformVertexNv

Syntax

  void ndDeformVertexNv(NDD_INST_DEFORM_VTXNV *nidcp);

Description

  Defroms the vertex normal.

Arguments

NDD_INST_DEFORM_VTXNV *nidcp;
  The vertex normal deform instance's internal structure pointer.

Return value

Note

ndDeformVertexColor

Function name

  ndDeformVertexColor

Syntax

  void ndDeformVertexColor(NDD_INST_DEFORM_VTXCOL *nidcp);

Description

  Deformas the vertex color.

Arguments

NDD_INST_DEFORM_VTXCOL *nidcp;
  The vertex color deform instance's internal structure pointer.

Return value

Note

ndDeformVertexSt

Function name

  ndDeformVertexSt

Syntax

  void ndDeformVertexSt(NDD_INST_DEFORM_VTXST *nidcp);

Description

  Deforms the vertex normal.

Arguments

NDD_INST_DEFORM_VTXNV *nidcp;
  Vertex texture deform instance's internal structure pointer

Return value

Note

ndMakeCameraMatrix

Function name

  ndMakeCameraMatrix

Syntax

  void ndMakeCameraMatrix(float mf[4][4])

Description

  Create Camera matrix(LookAt) from Camera information.

Note

  It is not the matrix related to Perspective or PROJECTION_VIEW.

ndMultiTrx

Function name

  ndMultiTrx

Syntax

  void ndMultiTrx(float mf[4][4], TRX *trxp, u32 order);

Description

  Evaluates TRX structure and creates 4x4 matrix.

Arguments

float mf[4][4];
  Buffer storing matrix to be created.
TRX *trxp;
  Transform data structure of matrix.
u32 order;
  Rotation component order.

Note

  Created 4x4 Matrix is stored in buffer of instance work, and used for displaying.

ndEvalInstanceOne

Function name

  ndEvalInstanceOne

Syntax

  int ndEvalInstanceOne(NDD_INSTANCE *isp, float mf[4][4], float cmf[4][4], int forceupd);

Description

  Frame evaluation for instance specified by isp.

Arguments

NDD_INSTANCE *isp;
  Instance pointer.
float mf[4][4];
  Model view matrix.
float cmf[4][4];
  Model view matrix updated by the instance.
int forceupd;
  Flag for forcing matrix creation. Forced by 1.

Return value

  int;
  Matrix update flag. When the "forceupd" argument value and its own matrix are updated, 1 returns the "or" value.

Note

  mf is used for the basic model view matrix. Even if the matrix is not evaluated, mf is returned to cmf.

ndEvalInstance

Function name

  ndEvalInstance

Syntax

  void ndEvalInstance(NDD_INSTANCE *isp, float mf[4][4], int forceupd);

Description

  Frame evaluation is performed on every instances under the instance specified by isp.

Arguments

NDD_INSTANCE *isp;
  Instance pointer.
float mf[4][4];
  Model view matrix.
int forceupd;
  Flag for forcing matrix creation. Forced by 1.

Note

  mf is used for the basic model view matrix.
  Since the callback at the end and 64 bytes buffer is prepared in local, it may create huge stack.

ndClearFB

Function name

  ndClearFB

Syntax

  Gfx *ndClearFB(Gfx *gp, u16 fill_depth, u16 fill_col);

Description

Arguments

Gfx *gp;
  Display list pointer
u16 fill_depth;
  The value filling the Z buffer.
u16 fill_col;
  The value filling the color value.

Return value

  Gfx *gp;
  Dislay list pointer.

Note

ndEvalLight

Function name

  ndEvalLight

Syntax

  int ndEvalLight(float *tarpos, NDD_LIGHT *lp, RGBAQUAD *color, s8 *nv);

Description

Arguments

float *tarpos;
  Position of the target that is bathed in light. Three values x,y,z. If NULL, calculate as the origin (0,0,0).
NDD_LIGHT *lp;
  Pointer to light structure.
RGBQUAD *color;
  Pointer to the RGBAQUAD structure storing the color value.
s8 *nv;
  Pointer storing the light vector. Three values x,y,z(3 bytes) in S0.7 format.

Return value

  int;
  0 is returned when light is null on evaluation.

Note

  The NDD_LIGHT structure has the following limitations: * The normal passed by fnv must be normalized. * If NDC_LFLAG_ATTENUATION is set for flag, valid value must be assigned for start and end. * NDC_LFLAG_CUTOFF is valid only when NDC_LFLAG_HAVEPOS. These can be checked by sacrificing the execution speed, but they are ignored since they are game-use managers. When the return value "0" is returned, color and nv are not set.

ndReloadLightReg

Function name

  ndReloadLightReg

Syntax

  Gfx *ndReloadLightReg(Gfx *gp, NDD_LIGHT *lp, u32 newcolor, s8 *newlvec);

Description

Arguments

Gfx *gp;
  Display list pointer.
NDD_LIGHT *lp;
  Pointer to the light structure.
u32 newcolor;
  The newly set color value. It must be stored in 0xRRGGBB00 format from the high-order bit. The lower 8 bits are handled internally as 0x00.
s8 *newlvec;
  Pointer to the newly set vector. See the S0.7 format values xy,z (3 bytes). NULL is not accepted.

Return value

  Gfx *gp;
  Display list pointer.

Note

  References color, power and stored_nv is the NDD_LIGHT structure, defines the heap for require parts, and loads the RSP command into the buffer. Since this function has been optimized for internal use, please know it thorughly if the user is to be free to call it at will.

ndSetupLightset

Function name

  ndSetupLightset

Syntax

  Gfx *ndSetupLightset(Gfx *gp, float *tarpos, NDD_LIGHTSET *lightset);

Description

  Evaluates the initialized lightset passed by "lightset" together with the object that becomes the target, and loads only the part that has changed to the display list.

Arguments

Gfx *gp;
  Display list pointer.
float *tarpos;
  The position of the target that is bathed in the light. Three value x,y,z. If NULL, calculate as the origin (0,0,0).
NDD_LIGHTSET *lightset;
  Pointer to the lightset structure.

Return value

  Gfx *gp;
  Display list pointer.

Note

  The "tarpos" argument is passed to ndEvalLight() and evaluated. If the result is NULL, it is replaced with the origin ~ and evaluated.

ndInitLights

Function name

  ndInitLights

Syntax

  int ndInitLights( NDD_LIGHTSET *lightset );

Description

  Resets the RDP's light settings, determines the number of lights, and allocates the light number to each light structure.

Arguments

NDD_LIGHTSET *lightset;
  Pointer to the lightset structure.

Return value

  int;
  Number of effective lights.

Note

  References the _ENABLE bit of the flag of each light structure, calculates the required number of lights, and allocates each light number. These are the light numbers that are evaluated by the RSP. However, the user does not have to pay any special attention to them. They are referenced and used when resetting with the API function.

ndSetupObjectRegister

Function name

  ndSetupObjectRegister

Syntax

  Gfx *ndSetupObjectRegister( Gfx *gp, NDD_INST_OBJ *niop );

Description

  References the object instance structure, and resets the registers specified for resetting.

Arguments

Gfx *gp;
  Pointer to the display list buffer.
NDD_INST_OBJ *niop;
  Pointer to the object instance structure.

Return value

  Gfx *;
  Gfx buffer pointer after updating.

Note

  Called by ndDrawObjectInstance

ndDrawShape

Function name

  ndDrawShape

Syntax

  Gfx *ndDrawShape( Gfx *gp, NDR_SHAPE *shp );

Description

  Loads the Gfx structure into the drawing buffer in accordance with the contents of the shape structure.

Arguments

Gfx *gp;
  Pointer to the display list buffer.
NDR_SHAPE *shp;
  Pointer to the shape structure for reference use.

Return value

  Gfx *;
  Gfx buffer pointer after updating.

Note

  Called by ndDrawObjectInstance

ndDrawObjectInstance

Function name

  ndDrawObjectInstance

Syntax

  int ndDrawObjectInstance( NDD_INST_OBJ *niop );

Description

  Display one object.

Arguments

Gfx *gp;
  Pointer to the display list buffer.
NDD_INST_OBJ *niop;
  Pointer to the object instance structure.

Return value

  Gfx *;
  Gfx buffer pointer after updating

Note

  Called by ndBuildInstanceGfx

ndBuildInstanceGfxAtPrio

Function name

  ndBuildInstanceGfxAtPrio

Syntax

  Gfx *ndBuildInstanceGfxAtPrio(Gfx *gp, NDD_INSTANCE *isp, u16 start, u16 end);

Description

  Draws instances of the specific priority after the specified instance pointer.

Arguments

Gfx *gp;
  Display list pointer
NDD_INSTANCE *isp;
  The instance pointer. if NULL is given, then everything that follows the root of the object is evaluated.
u16 start;
  The priority that is to be drawn. Start is included in the priority that is to be drawn.
u16 end;
  The priority that is not to be drawn. Please not end will not be drawn.

Return value

  Gfx *;
  Updated display list pointer.

Note

  Please assign larger value(higher priority) to start.

ndBuildSceneGfx

Function name

  ndBuildSceneGfx

Syntax

  Gfx *ndBuildSceneGfx(Gfx *gp, float mul[4][4]);

Description

  Build up display list of scene part from the current scene structure.

Arguments

Gfx *gp;
  Display list pointer.
float mul[4][4];
  Camera matrix

Note

  Matrix of camera 'mul' will be multiplied on projection matrix.

ndBuildInstanceGfx

Function name

  ndBuildInstanceGfx

Syntax

  Gfx *ndBuildInstanceGfx(Gfx *gp, NDD_INSTANCE *isp);

Description

  Build up display list of scene part from the current scene structure.

Arguments

Gfx *gp;
  Display list pointer
NDD_INSTANCE *isp;
  Instance pointer of an object. By assigning NULL, it will evaluate every instance under the route of object.

Return value

  Gfx *;
  Updated display list pointer.

Note

  ndBuildInstanceGfxAtPrio() is called internally by determining every priority.

nd Function List