1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include "gameui.h"
#define SET_RENDER_ITEM(item,sp,px,py,f,abs,curid,mouseevt) \
do { \
item.sprite = sp; \
item.x = px; item.y = py; \
item.currframe = f; \
item.absolute = abs; \
item.onhovercursorid = curid; \
item.onmousebuttonevent_proc = mouseevt; \
} while(0)
int buildGameRenderList(gameRess_t *gRess, gameUI_t *gUI) {
int cur=0;
SET_RENDER_ITEM(gUI->renderList[cur++],&gUI->terrainSprite,0,0,0,0,0,NULL);
SET_RENDER_ITEM(gUI->renderList[cur++],&gRess->cursor,0,0,0,0,0,NULL);
return 0;
}
|