2017-12-22 15:15:40 +01:00
|
|
|
#ifndef GUI_H_
|
|
|
|
#define GUI_H_
|
|
|
|
|
2018-01-23 14:11:03 +01:00
|
|
|
#define LOG_LINES_COUNT 15
|
|
|
|
#define LOG_FONT_SIZE 8
|
|
|
|
|
2017-12-22 15:15:40 +01:00
|
|
|
#include "linkedlist.h"
|
|
|
|
#include "hashtable.h"
|
|
|
|
#include "sprite.h"
|
|
|
|
#include "camera.h"
|
2018-01-31 13:52:11 +01:00
|
|
|
#include "player.h"
|
2017-12-22 15:15:40 +01:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
LinkedList *sprites;
|
|
|
|
LinkedList *health;
|
2018-01-31 13:52:11 +01:00
|
|
|
LinkedList *xp_bar;
|
2017-12-22 15:15:40 +01:00
|
|
|
Hashtable *textures;
|
2018-01-23 14:11:03 +01:00
|
|
|
Texture *log_lines[LOG_LINES_COUNT];
|
2017-12-22 15:15:40 +01:00
|
|
|
} Gui;
|
|
|
|
|
2018-01-31 13:52:11 +01:00
|
|
|
Gui*
|
|
|
|
gui_create(SDL_Renderer *renderer);
|
2017-12-22 15:15:40 +01:00
|
|
|
|
2018-01-31 13:52:11 +01:00
|
|
|
void
|
|
|
|
gui_set_max_health(Gui*, int max, SDL_Renderer*);
|
2017-12-22 15:15:40 +01:00
|
|
|
|
2018-01-31 13:52:11 +01:00
|
|
|
void
|
|
|
|
gui_set_current_health(Gui*, int current);
|
2017-12-22 15:15:40 +01:00
|
|
|
|
2018-01-31 13:52:11 +01:00
|
|
|
void
|
|
|
|
gui_set_current_xp(Gui*, ExperienceData);
|
2017-12-22 15:15:40 +01:00
|
|
|
|
2018-01-31 13:52:11 +01:00
|
|
|
void
|
|
|
|
gui_set_xp_data(Gui*, ExperienceData);
|
2018-01-23 12:14:44 +01:00
|
|
|
|
2018-01-31 13:52:11 +01:00
|
|
|
void
|
|
|
|
gui_render_panel(Gui*, unsigned int width, unsigned int height, Camera*);
|
2017-12-22 15:15:40 +01:00
|
|
|
|
2018-01-31 13:52:11 +01:00
|
|
|
void
|
|
|
|
gui_render_log(Gui*, unsigned int width, unsigned int height, Camera*);
|
2018-01-23 14:11:03 +01:00
|
|
|
|
2018-01-31 13:52:11 +01:00
|
|
|
void
|
|
|
|
gui_log(const char *fmt, ...);
|
|
|
|
|
|
|
|
void
|
|
|
|
gui_destroy(Gui*);
|
2017-12-22 15:15:40 +01:00
|
|
|
|
|
|
|
#endif // GUI_H_
|