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 flipH    : 1;
            u8 flipV    : 1;
        }
        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 one only 16-color palette.
Use palette 0. Do not use palettes 1–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 the sequential number of the image to use from the NASubBannerAnime structure.
Setting the terminating block to 0 will result in a loop, and setting it to 1 will cause playback to stop at the last frame.
plttNoSets the sequential number of the pltt to use from the NASubBannerAnime structure.
Always set it to use number 0.
flipHSetting a value of 1 will cause horizontal flipping.
You cannot change the flip setting alone using the same cellNo as the previous control data. Change the image along with the flip setting. When a loop is set, the same restrictions also apply to the first and last control data.
flipVSetting a value of 1 will cause vertical flipping.
This has the same restrictions as flipH.

See Also

NA_MakeSubBannerHeader

Revision History

2008/11/04 Added animation restrictions.
2008/09/17 Split flipType into flipH and flipV. Added to frameCount.
2008/09/16 Initial version.


CONFIDENTIAL