page.h
1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef __page_h__
#define __page_h__
#define MAX_COLUMN_COUNT 6
#define CELL_TYPE_TEXTURE 0
#define CELL_TYPE_STRING 1
#define CELL_TYPE_GAMETITLE 2
#define CELL_TYPE_BNUM 3
#define ROW_LAYOUT_VERTICAL 0
#define ROW_LAYOUT_HORIZONTAL 1
#define ROW_LAYOUT_CPAK 2
typedef void (* UiHiliteRowCB) (int idx);
typedef void (* UiSelectRowCB) (int idx, u32 button);
typedef struct {
int w, h;
u16 *img;
} UiImage;
typedef struct {
int type;
u16 limit;
u16 remain;
u8* title;
UiImage* img;
} UiGameCell;
typedef struct {
int col_cnt;
int cell_h;
int cell_w [MAX_COLUMN_COUNT];
int cell_x [MAX_COLUMN_COUNT];
int cell_y [MAX_COLUMN_COUNT];
int type [MAX_COLUMN_COUNT];
void *data [MAX_COLUMN_COUNT];
u16 txt_color;
u16 bg_color;
UiImage *bg;
} UiRow;
typedef struct {
int x, y;
int total_rows, screen_rows;
int top_row, hilite_row;
UiRow *rows;
int row_layout;
} UiTable;
extern int gBgIdx;
extern UiImage gBgImg[4];
extern int gLogoCnt;
extern void colorTex(u16* stex, u16* dtex, int w, int h, u16 color);
extern void drawGameCell(UiGameCell *pCell, int posx, int posy, u16 color);
extern void updateRowHilite(UiTable *pTable);
extern void drawTable(UiTable *pTable, UiHiliteRowCB pHilite, UiSelectRowCB pSelect);
extern void drawFrame();
extern void drawGameInfo(UiRow* pRow, int posx, int posy);
extern void drawGameInfo2(UiRow* pRow, int posx, int posy);
extern void drawGameInfo3(UiRow* pRow, int posx, int posy);
extern void drawRecryptMeter(int cnt, int total);
extern void drawError(u8* str, int posx, int posy);
#endif