Ninja Library - Texture Function

njReLoadTexturePartNumG

Reloads a part of texture

FORMAT

Sint32 njReLoadTexturePartNumG( globalIndex, *addr, offset, size )
Uint32 globalIndex
Sint8 *addr
Uint32 offset
Uint32 size

PARAMETER

 globalIndex  Global index number 
 *addr  Texture address 
 offset  Offset from texture lead (in multiples of 4 bytes) 
 size  Size (in multiples of 4 bytes) 

RETURN

 1  Success 
 -1  Failure 

DESCRIPTION

Rewrites a part of texture from global index number (globalIndex). Rewrites VQ texture 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 32 byte alignment or the size is a multiple of 32. Offset and size must be in multiples of 4 bytes. If offset + size exceeds the texture size, an error is returned.

EXAMPLE

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

NOTE

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


REFERENCE

njReLoadTextureNum()

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