##### Ninja Library - Texture Function

# njCalcTexture

Calculates the remaining size of texture memory

### FORMAT

`

  Uint32 njCalcTexture( flag )
  Uint32 flag

`

### PARAMETER

  flag meanings

### RETURN

  Amount of remaining texture memory

### DESCRIPTION

  Returns the calculated size of remaining texture memory. Value of flag specified as parameter makes the meaning of returns different.

### EXAMPLE

      NJS_TEXNAME texname[2];
      NJS_TEXLIST texlist ={texname,2};
      Uint32 calc;
      Sint8 *texbuf;
      /* Prepare to read two textures */
      NJS_TEXMEMLIST texmemlist[2];
      texbuf = syMalloc(0x20000);
      njInitTextureBuffer(texbuf,0x20000);
      njInitTexture(texmemlist,2);
      njSetTextureName(&texname[0],"file1.pvr",0,NJD_TEXATTR_TYPE_FILE|
            NJD_TEXATTR_GLOBALINDEX);
      njSetTextureName(&texname[1],"file2.pvr",1,NJD_TEXATTR_TYPE_FILE|
            NJD_TEXATTR_GLOBALINDEX);
      /* Load textures */
      njLoadTexture(&texlist);
      /* Calculates the free size in total */
      calc = njCalcTexture(NJD_TEXMEM_FREESIZE);
      /* Output on screen */
      njPrintD(NJM_LOCATION(10,10),calc,10);

### NOTE

  `njInitTexture()` must be executed before calling this function.

### REFERENCE

  `njInitTexture()
  `

njCalcTexture

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999