# NASubBanner

## Definition

    #define NA_SUBBANNER_PALETTE_NUM    16
    #define NA_SUBBANNER_CHARACTER_NUM  16
    #define NA_SUBBANNER_PATTERN_NUM    8
    #define NA_SUBBANNER_CONTROL_NUM    64

    typedef struct NASubBannerControl
    {
        u8 frameCount : 8;

        union
        {
            struct
            {
                u8 cellNo   : 3;
                u8 plttNo   : 3;
                u8 reserved : 2;
            }
            frameInfo;

            u8 animeType;
        };
    }
    NASubBannerControl;

    typedef struct NASubBannerAnime
    {
        GXCharFmt16         image   [ NA_SUBBANNER_PATTERN_NUM ][ NA_SUBBANNER_CHARACTER_NUM ];
        GXRgb               pltt    [ NA_SUBBANNER_PATTERN_NUM ][ NA_SUBBANNER_PALETTE_NUM ];
        NASubBannerControl  control [ NA_SUBBANNER_CONTROL_NUM ];
    }
    NASubBannerAnime;

    typedef struct NASubBanner
    {
        NASubBannerHeader   header;
        NASubBannerAnime    anime;
    }
    NASubBanner;

## Description

These sub-banner structures are used by the `NA_SaveSubBanner` and `NA_LoadSubBanner` functions. The details of each member are as follows.

### NASubBanner Structure

`header` | The sub-banner header. It has a CRC value that should be set to the proper value with the `NA_MakeSubBannerHeader` function when the following `anime` member is edited.
`anime` | Animation data. See the following topics.

### NASubBannerAnime Structure

`image` | Sub-banner character data. It is formatted with 4-bit index values into the color palette. The displayed image is the same as when `GX_OAM_SHAPE_32x32` is specified as the shape argument to the `G2_SetOBJAttr` function.
`pltt` | Sub-banner color palette. It is formatted using the `GXRgb` type. The displayed image is the same as when `GX_OAM_COLORMODE_16` is specified as the color argument to the `G2_SetOBJAttr` function. You can use only one 16-color palette. Use palette 0. Do not use palettes 1 through 7.
`control` | Animation control data. See the following topics.

For details on `image` and `pltt`, see OBJ > Character OBJ > Character Data Format > 16-Color Mode in the TWL Programming Manual.

### NASubBannerControl Structure

`frameCount` | Use the following parameters up to the frame set by `frameCount`. Set a 0 in the terminating block.
`cellNo` | Sets which number `image` to use from the `NASubBannerAnime` structure. Setting the terminating block to 0 results in a loop, and setting it to 1 causes playback to stop at the last frame.
`plttNo` | Sets the number of the `pltt` to use in the `NASubBannerAnime` structure. Always set it to use number 0.
`reserved` | The reserved region. (Previously, it contained `flipH` and `flipV`, but they have been removed.)

## See Also

`NA_MakeSubBannerHeader`

## Revision History

2011/04/08 Noted that `flipH` and `flipV` have been replaced with `reserved`.
2008/11/04 Added animation restrictions.
2008/09/17 Split `flipType` into `flipH` and `flipV`. Added to `frameCount`.
2008/09/16 Initial version.

CONFIDENTIAL