shadowicon.h 1.23 KB
#ifndef __shadow_icon_h__
#define __shadow_icon_h__

#define ICON_SPEED     2

extern u8 gShadowMap[];

typedef struct {
    u32  id;
    u8   show, init;
    int  state, dir;
    int  w, h;               // width, height of the icon texture map
    u32  xscale, yscale;     // x and y scale (s5.10) 
    int  posx, posy;         
    u16 *texMap;             // RGBA16 icon texture map
    u8  *shadowMap;          // I4 shadow texture map
    u8  *text;               // text associated with icon
} UiShadowIcon; 

typedef void (* IconInitCallBack) (void);
typedef void (* IconHiliteCallBack) (int idx);
typedef void (* IconSelectCallBack) (int idx, u32 button);

extern void initShadowIconGroup(UiShadowIcon *pIcons, int cnt,
                                int *posx, int *posy,
                                int w, int h,
                                u32 xscale, u32 yscale,
                                u16 **pTexture, u8 **pText, u8 *pShadowMap);
extern void initGameIconGroup(UiShadowIcon* pIcons, int cnt, u32* pIDs);
extern void drawShadowIcon(UiShadowIcon* pIcons, int count, int init, IconInitCallBack pInit);
extern void checkCursorIcon(UiShadowIcon* pIcons, int count, IconHiliteCallBack pHilite, IconSelectCallBack pSelect);

#endif