Ninja Library - Texture Function

njReLoadTexturePartNum

Reloads a part of texture.

FORMAT

Sint32 njReLoadTexturePartNum( n, addr, offset, size )
Uint32 n
Sint8 *addr
Uint32 offset
Uint32 size

PARAMETER

 n  Texture number of the current texture list 
 *addr  Texture address  
 offset  Offset from the texture lead (in multiples of 4bytes)  
 size  Size (in multiples of 4bytes) 

RETURN

 1  Success 
 -1  Failure 

DESCRIPTION

Rewrites a part of texture number n from the current texture list. VQ texture is rewritten from the codebook lead. However, this function cannot be used with small VQ. Rewrite the addr size part from the texture lead + offset size part. Wait for DMA transfer to finish in this function if the texture address has 32byte alignment or the size is a multiple of 32. Offset and size must be in multiples of 4 bytes. If offset + size exceeds the remaining texture size, only the remaining size loads correctly and completes normally. If offset exceeds the texture size, an error is returned.


EXAMPLE

Acquires color mode.
offset = 0;
ret = 1;
while(ret > 0){
	ret = njReLoadTexturePartNum(0,texaddr + offset,offset,2048);
	offset += 2048;
}

NOTE

The texture data address does not designate the texture lead, but designates the part added to offset from the lead.


REFERENCE

njReLoadTextureNumG()

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