Ninja Library - Texture Function

njReadTextureNum

Reads to texture main memory.

FORMAT

Sint32 njReadTextureNum( n, addr )
Uint32 n
Sint8 *addr

PARAMETER

 n  Texture number of the current texture list 
 addr  Address of memory transfer destination 

RETURN

 Success   1  
 Failure   -1  

DESCRIPTION

Acquires texture with texture number n from the current texture list and moves it from the texture memory to the main memory.

If this function is used, texture must be loaded in texture memory. Memory for the transfer destination must be in texture size.


EXAMPLE

Uint8 *buffer;
Int size;

/* Acquire the necessary texture size */
size = NJM_TEXTURE_SIZE(&texlist,0);
buffer = syMalloc(size);

/* Acquire texlist texture 0 in the buffer */
njSetTexture(&texlist);
njReadTextureNum(0,buffer);

NOTE

It is necessary to execute the njSetTexture() function before executing this function.

REFERENCE

njSetTexture()
njReadTextureNumG()

njReadTextureNum
COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999