summaryrefslogtreecommitdiff
path: root/src/gameui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gameui.c')
-rw-r--r--src/gameui.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gameui.c b/src/gameui.c
index 24eb9e0..fa96244 100644
--- a/src/gameui.c
+++ b/src/gameui.c
@@ -1,21 +1,21 @@
#include "gameui.h"
-#define SET_RENDER_ITEM(item,sp,px,py,f,abs,curid,mouseevt) \
+#define SET_RENDER_ITEM(idx,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; \
+ 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) {
- 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);
+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;
}