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

headerThe 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.
animeAnimation data. See the following topics.

NASubBannerAnime Structure

imageSub-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.
plttSub-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.

controlAnimation 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

frameCountUse the following parameters up to the frame set by frameCount.
Set a 0 in the terminating block.
cellNoSets 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.
plttNoSets the number of the pltt to use in the NASubBannerAnime structure.
Always set it to use number 0.
reservedThe 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