# GX_SetBankForOBJ

## C Specification

  `#include <nitro/gx/gx_vramcnt.h>`
  `void GX_SetBankForOBJ(GXVRamOBJ obj);`

## Description

This function allocates the specified VRAM bank to the Main 2D Engine's OBJ. If the specified VRAM bank is either disabled or allocated to LCDC, that VRAM bank is allocated to the Main 2D Engine OBJ.

`GX_VRAM_OBJ_NONE` | VRAM is not allocated to OBJ.
`GX_VRAM_OBJ_16_F` | 16 kilobytes of OBJ are reserved. VRAM-F is allocated.
`GX_VRAM_OBJ_16_G` | 16 kilobytes of OBJ are reserved. VRAM-G is allocated.
`GX_VRAM_OBJ_32_FG` | 32 kilobytes of OBJ are reserved. VRAM-F and -G allocated.
`GX_VRAM_OBJ_64_E` | 64 kilobytes of OBJ are reserved. VRAM-E is allocated.
`GX_VRAM_OBJ_80_EF` | 80 kilobytes of OBJ are reserved. VRAM-E and -F are allocated.
`GX_VRAM_OBJ_80_EG` | 80 kilobytes of OBJ are reserved. VRAM-E and -G are allocated.
`GX_VRAM_OBJ_96_EFG` | 96 kilobytes of OBJ are reserved. VRAM-E, -F, and -G are allocated.
`GX_VRAM_OBJ_128_A` | 128 kilobytes of OBJ are reserved. VRAM-A is allocated.
`GX_VRAM_OBJ_128_B` | 128 kilobytes of OBJ are reserved. VRAM-B is allocated.
`GX_VRAM_OBJ_256_AB` | 256 kilobytes of OBJ are reserved. VRAM-A and -B are allocated.

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

    typedef enum
    {
        GX_VRAM_OBJ_NONE   = 0x0000,
        GX_VRAM_OBJ_16_F   = GX_VRAM_F,                      // ARM9: HW_OBJ_VRAM  -->   HW_OBJ_VRAM + HW_VRAM_F_SIZE
        GX_VRAM_OBJ_16_G   = GX_VRAM_G,                      // ARM9: HW_OBJ_VRAM  -->   HW_OBJ_VRAM + HW_VRAM_G_SIZE
        GX_VRAM_OBJ_32_FG  = GX_VRAM_F | GX_VRAM_G,          // ARM9: HW_OBJ_VRAM  -->   HW_OBJ_VRAM + HW_VRAM_F_SIZE + HW_VRAM_G_SIZE
        GX_VRAM_OBJ_64_E   = GX_VRAM_E,                      // ARM9: HW_OBJ_VRAM  -->   HW_OBJ_VRAM + HW_VRAM_E_SIZE
        GX_VRAM_OBJ_80_EF  = GX_VRAM_E | GX_VRAM_F,          // ARM9: HW_OBJ_VRAM  -->   HW_OBJ_VRAM + HW_VRAM_E_SIZE + HW_VRAM_F_SIZE
        GX_VRAM_OBJ_80_EG  = GX_VRAM_E | GX_VRAM_G,          // ARM9: HW_OBJ_VRAM  -->   HW_OBJ_VRAM + HW_VRAM_E_SIZE + HW_VRAM_G_SIZE
        GX_VRAM_OBJ_96_EFG = GX_VRAM_E | GX_VRAM_F | GX_VRAM_G, // ARM9: HW_OBJ_VRAM  -->   HW_OBJ_VRAM + HW_VRAM_E_SIZE + HW_VRAM_F_SIZE + HW_VRAM_G_SIZE
        GX_VRAM_OBJ_128_A  = GX_VRAM_A,                      // ARM9: HW_OBJ_VRAM  -->   HW_OBJ_VRAM + HW_VRAM_A_SIZE
        GX_VRAM_OBJ_128_B  = GX_VRAM_B,                      // ARM9: HW_OBJ_VRAM  -->   HW_OBJ_VRAM + HW_VRAM_B_SIZE
        GX_VRAM_OBJ_256_AB = GX_VRAM_A | GX_VRAM_B           // ARM9: HW_OBJ_VRAM  -->   HW_OBJ_VRAM + HW_VRAM_A_SIZE + HW_VRAM_B_SIZE
    }
    GXVRamOBJ;

## Arguments

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

## Return Values

None

## See Also

`GX_GetBankForOBJ`, `GX_ResetBankForOBJ`, `GX_DisableBankForOBJ`, `GX_GetSizeOfOBJ`

## Revision History

01/19/2004 Initial Version