##### Ninja Library - Texture Function

# njSetTextureInfo

Sets data in the texture name structure

### FORMAT

`

  njSetTextureInfo( *info, *tex, Type, nWidth, nHeight )
  NJS_TEXINFO *info
  Uint16 *tex
  Sint32 Type
  Sint32 nWidth
  Sint32 nHeight

`

### PARAMETER

  `*info` | Texture information (output)
  `*tex` | Pointer to memory texture
  `Type` | Texture type
  `nWidth` | Texture width
  `nHeight` | Texture length

### RETURN

  None

### DESCRIPTION

  In case of memory texture, texture information is set to information structure info.

  Color format and category code input to Type. Info settings input to addr of `njSetTextureName()` function.

  Color format
  NJD_TEXFMT_ARGB_1555
  NJD_TEXFMT_RGB_565
  NJD_TEXFMT_ARGB_4444
  NJD_TEXFMT_YUV_422
  NJD_TEXFMT_BUMP

  Category code
  NJD_TEXFMT_TWIDDLED
  NJD_TEXFMT_TWIDDLED_MM
  NJD_TEXFMT_VQ
  NJD_TEXFMT_VQ_MM
  NJD_TEXFMT_PALETTIZE4
  NJD_TEXFMT_PALETTIZE4_MM
  NJD_TEXFMT_PALETTIZE8
  NJD_TEXFMT_PALETTIZE8_MM
  NJD_TEXFMT_RECTANGLE
  NJD_TEXFMT_STRIDE

### EXAMPLE

      NJS_TEXINFO Info;
      NJS_TEXNAME texname[2];
      NJS_TEXLIST texlist ={texname,2};
      /* Prepare to read 2 textures */
      NJS_TEXMEMLIST texmemlist[2];
      Sint8 *texbuf;
      njInitTexture(texmemlist,2);
      texbuf = syMalloc(0x20800);
      njInitTextureBuffer(texbuf,0x20000);
      njSetTextureInfo(&Info,Image,NJD_TEXFMT_RECTANGLE|
            NJD_TEXFMT_ARGB_1555,256,256);
      njSetTextureName(&texname[0],"file0.pvr",0,NJD_TEXATTR_TYPE_FILE|
           NJD_TEXATTR_GLOBALINDEX);
      njSetTextureName(&texname[1],&Info,1,NJD_TEXATTR_TYPE_MEMORY|
           NJD_TEXATTR_GLOBALINDEX);
      /* Load texture */
      njLoadTexture(&texlist);
      syFree(texbuf);
      /* Move current texture list to texlist */
      njSetTexture(&texlist);
      /* Make current texture first texture on the texlist Image */
      njSetTextureNum(0);
          :
      /* lit. Texture memory image drawn using textured drawing */
          :

### NOTE

  Refer to texture document for more details.

### REFERENCE

  `njSetTextureName()
  `

njSetTextureInfo

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999