njAction Japanese
--|INDEX|->
Drawing motion

FORMAT

#include <Ninja.h>
void   njAction( *action, frame )
NJS_ACTION  *action
Float       frame

PARAMETERS

NJS_ACTION *action
action Pointer to the action structure
Float frame
Frame number

RETURN VALUE

None

ERROR VALUE

None

FUNCTION


EXAMPLE

#define  ACTION    action_man
extern NJS_ACTION  ACTION[];

void main() {
  Float  ff=0.0f;

  njInitSystem( NJD_RESOLUTION_640x480, 1 );
  njInitMatrix( matrix, 128 );
  njInit3D( vbuf, 1024, abuf, fbuf, 32 );
  njInitView( &view );
  njCreateLight( &light, NJD_DIR_LIGHT );
  njSetView( &view );

  while(1) {
    njClearMatrix();
    njAction( ACTION,ff );

    ff+=0.2f;
    if( ff >= (ACTION->motion->nbFrame) ) ff-=ACTION->motion->nbFrame;

    njWaitVSync();
  }
}

NOTES


RELATED TOPICS

njInit3D()
njDrawModel()
njDrawObject()
njControl3D()
njDrawMotion()

njAction
--|INDEX|->

Copyright SEGA ENTERPRISES, LTD., 1997