##### Ninja Library - Texture Structure

# NJS_TEXNAME

Structure in which the file name, attributes, and global index of a texture to be registered are set

### DEFINITION

      typedef struct {
              void    *filename;
              Uint32  attr;
              Uint32  texaddr;
      } NJS_TEXNAME;

### MEMBER

  `*filename` | File name
  `attr` | Attribute
  `texaddr` | Texture address

### DESCRIPTION

  Structure in which the file name, attributes, and global index of a texture to be registered are set. In case of file texture file name is inserted in member *filename. However, for memory texture, address for NJS_TEXINFO structure is inserted.

  Each bit of member attr which indicates attributes has following meanings.

  31 | 0 : Do not register cache textures / 1 : Register cache textures
  30 | 0 : Load texture from file / 1 : Load texture from memory
  29 | 0 : Register only in texture memory / 1 : Register in both cache and texture memory
  28 - 25 | Reserved area
  24 | 1 : Palette global index flag
  23 | 1 : Global index flag
  22 - 21 | Reserved area
  16 | Texture continue flag
  15 - 0 | Used to store the PVM entry ID

  The following shows more specifically.

  -To load in texture memory only, set bits 31 and 29 to "0".
  -To load in cache memory only, set bit 31 to "1".
  -To load in both texture and cache memory, set bit 29 to "1".

  If the global index flag or the palette global index flag is set in the texture attributes when loading a texture, the global index value and the palette bank value are inserted in member texaddr. Normally, these values are set by the `njSetTextureName()` function. After a texture is loaded, the address is set in the NJS_TEXMEMLIST structure. When using the global index flag or the palette global index, and if a texture will be loaded again after it has been released, it is necessary to set the global index value again.

### REFERENCE

  `njCalcTexture()
  njDrawTexture()
  njDrawTextureMemList()
  njExitTexture()
  njInitCacheTextureBuffer()
  njInitTexture()
  njInitTextureBuffer()
  njLoadCacheTexture()
  njLoadCacheTextureNum()
  njLoadCacheTextureNumG()
  njLoadTexture()
  njLoadTexturePvmFile()
  njLoadTexturePvmMemory()
  njReleaseCacheTextureAll()
  njReleaseCacheTextureNum()
  njReleaseCacheTextureNumG()
  njReleaseTexture()
  njReleaseTextureAll()
  njReleaseTextureNum()
  njReleaseTextureNumG()
  njSetPvmTextureList()
  njSetTexture()
  njSetTextureInfo()
  njSetTextureName()
  njSetTextureNum()
  njSetTextureNumG()
  `

NJS_TEXNAME

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999