# GX_TrySetBankForSubBG

## C Specification

  `#include <nitro/gx/gx_vramcnt.h>`
  `BOOL GX_TrySetBankForSubBG(GXVRamSubBG bg);`

## Arguments

`bg` | Specifies a VRAM bank to allocate to the sub 2D Engine's BG

## 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 the sub 2D engine BG. If the specified VRAM bank is either disabled or allocated to LCDC, that VRAM bank is allocated to the sub 2D Engine BG. The allocation will fail if the designated VRAM bank is exclusion-locked by another library.

`GX_VRAM_SUB_BG_NONE` | The VRAM bank is not allocated to BG.
`GX_VRAM_SUB_BG_128_C` | 128 kilobytes are reserved in BG. VRAM-C is allocated.
`GX_VRAM_SUB_BG_32_H` | 32 kilobytes are reserved in BG. VRAM-H is allocated.
`GX_VRAM_SUB_BG_48_HI` | 48 kilobytes are reserved in BG. VRAM-H and -I are allocated.

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

    typedef enum
    {
    GX_VRAM_SUB_BG_NONE = 0x0000,
    GX_VRAM_SUB_BG_128_C = GX_VRAM_C,
    GX_VRAM_SUB_BG_32_H = GX_VRAM_H,
    GX_VRAM_SUB_BG_48_HI = GX_VRAM_H | GX_VRAM_I
    }
    GXVRamSubBG;

## See Also

`GX_SetBankForSubBG, GX_GetBankForSubBG, GX_ResetBankForSubBG, GX_DisableBankForSubBG, GX_GetSizeOfSubBG`

## Revision History

02/15/2005 Initial version.

CONFIDENTIAL