diff options
Diffstat (limited to 'src/include/data_ui.h')
-rw-r--r-- | src/include/data_ui.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/include/data_ui.h b/src/include/data_ui.h index 8f96d48..8dbe81c 100644 --- a/src/include/data_ui.h +++ b/src/include/data_ui.h @@ -3,18 +3,22 @@ #include <SDL.h> #include "data_ress.h" +#include "data_game.h" #define MAX_RENDERLIST_SIZE 256 -typedef struct { +struct _renderItem_t { sprite_t *sprite; int currframe; int animate; /* Is currently animating ? */ int x,y; int absolute; /* 0 if level-based coords, 1 if camera-based */ + SDL_Rect lastDstRect; /* Last drawn position on screen */ int onhovercursorid; - void (*onmousebuttonevent_proc)(Uint8 button, Uint8 state, void *userptr); -} renderItem_t; + void (*onmousebuttonevent_proc)(struct _renderItem_t *self, Uint8 button, Uint8 state, gameState_t *gState); +}; + +typedef struct _renderItem_t renderItem_t; enum gameRLIdx {RLI_terrain=0, RLI_lem0, RLI_cursor=MAX_RENDERLIST_SIZE-1}; @@ -24,7 +28,7 @@ typedef struct { created by buildRenderList() */ renderItem_t renderList[MAX_RENDERLIST_SIZE]; - /* Various */ + renderItem_t *cursor; /* Current camera position */ int cameraX; |