GX_TrySetBankForClearImage

C Specification

#include <nitro/gx/gx_vramcnt.h>

BOOL GX_TrySetBankForClearImage(GXVRamClearImage clrImg);

Arguments

clrImg Specify VRAM bank to allocate to Clear Image

Return Values

Returns TRUE if the VRAM bank is allocated as normal. Returns FALSE if the VRAM bank to be allocated is locked by another library.

Description

Attempts to allocate a designated VRAM bank to ClearImage. The Clear Image Slot on the hardware is actually the same as Texture Image Slots 2 and 3. When the specified VRAM bank is disabled or has been allocated to LCDC, that VRAM bank will be allocated to Clear Image. When VRAM is not allocated to Clear Color Image, all pixels are cleared with 0. Texture Image Slot 2 cannot be used. The allocation will fail if the designated VRAM bank is exclusion-locked by another library.

GX_VRAM_CLEARIMAGE_NONE Did not allocate VRAM bank to Clear Image.
GX_VRAM_CLEARIMAGE_256_AB VRAM-A and B allocated to Clear Image.
GX_VRAM_CLEARIMAGE_256_CD VRAM-C and D allocated to Clear Image.
GX_VRAM_CLEARDEPTH_128_A VRAM-A is allocated to Clear Depth Image.
Texture Image Slot 2 is disabled.
GX_VRAM_CLEARDEPTH_128_B VRAM-B is allocate to Clear Depth Image.

Texture Image Slot 2 is disabled.
GX_VRAM_CLEARDEPTH_128_C VRAM-C is allocated to Clear Depth Image.

Texture Image Slot 2 is disabled.
GX_VRAM_CLEARDEPTH_128_D VRAM-D is allocated to Clear Depth Image.

Texture Image Slot 2 is disabled.

The following describes the type definition for GXVRamClearImage format.

typedef enum
{
GX_VRAM_CLEARIMAGE_NONE = 0x0000,
GX_VRAM_CLEARIMAGE_256_AB = GX_VRAM_A | GX_VRAM_B,  // TextureImageSlot 23
GX_VRAM_CLEARIMAGE_256_CD = GX_VRAM_C | GX_VRAM_D,  // TextureImageSlot 23
GX_VRAM_CLEARDEPTH_128_A  = GX_VRAM_A,
GX_VRAM_CLEARDEPTH_128_B  = GX_VRAM_B,
GX_VRAM_CLEARDEPTH_128_C  = GX_VRAM_C,
GX_VRAM_CLEARDEPTH_128_D  = GX_VRAM_D
}
GXVRamClearImage;

See Also

GX_SetBankForClearImage, GX_GetBankForClearImage, GX_ResetBankForClearImage, GX_DisableBankForClearImage, GX_GetSizeOfClearImage

Revision History

02/15/2005 Initial version.