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(idx,sp,px,py,f,abs,curid,mouseevt) \
do { \
gUI->renderList[idx].sprite = &(sp); \
gUI->renderList[idx].x = px; \
gUI->renderList[idx].y = py; \
gUI->renderList[idx].currframe = f; \
gUI->renderList[idx].absolute = abs; \
gUI->renderList[idx].onhovercursorid = curid; \
gUI->renderList[idx].onmousebuttonevent_proc = mouseevt; \
} while(0)
int buildGameRenderList(gameRess_t *gRess, gameUI_t *gUI) {
SET_RENDER_ITEM(RLI_terrain, gUI->terrainSprite,0,0,0,1,0,NULL);
SET_RENDER_ITEM(RLI_cursor, gRess->cursor,0,0,0,1,0,NULL);
return 0;
}
|