# GX_TrySetBankForSubOBJ

## Syntax

  `#include <nitro/gx/gx_vramcnt.h>`
  `BOOL GX_TrySetBankForSubOBJ(GXVRamSubOBJ obj);`

## Arguments

obj | Specifies a VRAM bank to allocate to the sub 2D Engine's OBJ

## Return Values

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

`GX_VRAM_SUB_OBJ_NONE` | VRAM is not allocated to OBJ.
`GX_VRAM_SUB_OBJ_128_D` | 128 kilobytes of OBJ are reserved. VRAM-D is allocated.
`GX_VRAM_SUB_OBJ_16_I` | 16 kilobytes of OBJ are reserved. VRAM-I is allocated.

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

    typedef enum
    {
        GX_VRAM_SUB_OBJ_NONE  = 0x0000,
        GX_VRAM_SUB_OBJ_128_D = GX_VRAM_D,
        GX_VRAM_SUB_OBJ_16_I  = GX_VRAM_I
    }
    GXVRamSubOBJ;

## See Also

`GX_SetBankForSubOBJ, GX_GetBankForSubOBJ, GX_ResetBankForSubOBJ, GX_DisableBankForSubOBJ, GX_GetSizeOfSubOBJ`

## Revision History

2005/02/15 Initial version.

CONFIDENTIAL