# GX_TrySetBankForTexPltt

## C Specification

  `#include <nitro/gx/gx_vramcnt.h>`
  `BOOL GX_TrySetBankForTexPltt(GXVRamTexPltt texPltt);`

## Arguments

texPltt | Specifies a VRAM bank to allocate to the texture 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 VRAM bank to TexturePalette. If the specified VRAM bank is either disabled or allocated to LCDC, this allocates the VRAM bank to the texture palette. The allocation will fail if the designated VRAM bank is exclusion-locked by another library.

`GX_VRAM_TEXPLTT_NONE` | A VRAM bank is not allocated to the texture palette.
`GX_VRAM_TEXPLTT_0_F` | Slot 0 of the texture palette is reserved. VRAM-F is allocated.
`GX_VRAM_TEXPLTT_0_G` | Slot 0 of the texture palette is reserved. VRAM-G is allocated.
`GX_VRAM_TEXPLTT_01_FG` | Slot 0.1 of the texture palette is reserved. VRAM-F and -G are allocated.
`GX_VRAM_TEXPLTT_0123_E` | Slots 0, 1, 2, and 3 of the texture palette are reserved. VRAM-E is allocated.
`GX_VRAM_TEXPLTT_01234_EF` | Slots 0, 1, 2, 3, and 4 of the texture palette are reserved. VRAM-E and -F are allocated.
`GX_VRAM_TEXPLTT_012345_EFG` | Slots 0, 1, 2, 3, 4, and 5 of the texture palette are reserved. VRAM-E, -F, and -G are allocated.

The following is the type definition for `GXVRamTexPltt` types.

    typedef enum
    {
    GX_VRAM_TEXPLTT_NONE     = 0x0000,
    GX_VRAM_TEXPLTT_0_F      = GX_VRAM_F,              // TexturePltt 0
    GX_VRAM_TEXPLTT_0_G      = GX_VRAM_G,              // TexturePltt 0
    GX_VRAM_TEXPLTT_01_FG    = GX_VRAM_F | GX_VRAM_G,  // TexturePltt 01
    GX_VRAM_TEXPLTT_0123_E   = GX_VRAM_E,              // TexturePltt 0-3
    GX_VRAM_TEXPLTT_01234_EF = GX_VRAM_E | GX_VRAM_F,  // TexturePltt 0-3,4
    GX_VRAM_TEXPLTT_012345_EFG = GX_VRAM_E | GX_VRAM_F | GX_VRAM_G  // TexturePltt 0-3,45
    }
    GXVRamTexPltt;

## See Also

`GX_SetBankForTexPltt, GX_GetBankForTexPltt, GX_ResetBankForTexPltt, GX_DisableBankForTexPltt, GX_GetSizeOfTexPltt`

## Revision History

02/15/2005 Initial version.