GX_TrySetBankForBGExtPltt

C Specification

#include <nitro/gx/gx_vramcnt.h>

BOOL GX_TrySetBankForBGExtPltt(GXVRamBGExtPltt bgExtPltt);

Arguments

bgExtPltt Specifies a VRAM bank to allocate to the main 2D Engine's BG Extended palette

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 the main 2D engine BG extended palette. If the specified VRAM bank is either disabled or allocated to LCDC, that VRAM bank is allocated to the Main 2D Engine BG Extended palette. The allocation will fail if the designated VRAM bank is exclusion-locked by another library.
Note:  When the VRAM bank is allocated to the BG Extended palette, the palette information of the BG Extended palette is referenced when 256 colors are specified as the color mode for text BG or 256x16 palette BG is selected. At all other times, the standard palette is referenced.

GX_VRAM_BGEXTPLTT_NONE The VRAM bank is not allocated to the BG Extended palette.
GX_VRAM_BGEXTPLTT_01_F Slots 0 and 1 of the BG Extended palette are reserved. VRAM-F is allocated.
GX_VRAM_BGEXTPLTT_23_G Slots 2 and 3 of the BG Extended palette are reserved. VRAM-G is allocated.
GX_VRAM_BGEXTPLTT_0123_E Slots 0, 1, 2, and 3 of the BG Extended palette are reserved. VRAM-E is allocated.
GX_VRAM_BGEXTPLTT_0123_FG Slots 0, 1, 2, and 3 of the BG Extended palette are reserved. VRAM-F and -G are allocated.


The following is the type definition for GXVRamBGExtPltt types.

typedef enum
{
GX_VRAM_BGEXTPLTT_NONE    = 0x0000,
GX_VRAM_BGEXTPLTT_01_F    = GX_VRAM_F,              // BGExtPltt 0-1 <--- Caution
GX_VRAM_BGEXTPLTT_23_G    = GX_VRAM_G,              // BGExtPltt 2-3 <--- Caution // BGCNT
GX_VRAM_BGEXTPLTT_0123_E  = GX_VRAM_E,              // BGExtPltt 0-3
GX_VRAM_BGEXTPLTT_0123_FG = GX_VRAM_F | GX_VRAM_G   // BGExtPltt 0-1,2-3
}
GXVRamBGExtPltt;

See Also

GX_SetBankForBGExtPltt, GX_GetBankForBGExtPltt, GX_ResetBankForBGExtPltt, GX_DisableBankForBGExtPltt, GX_GetSizeOfBGExtPltt

Revision History

02/15/2005 Initial version.