diff options
author | jacopo grandi <jak.sk8@hotmail.it> | 2021-02-18 14:14:23 +0100 |
---|---|---|
committer | jacopo grandi <jak.sk8@hotmail.it> | 2021-02-18 14:14:23 +0100 |
commit | 5f0fce4191309e9526b7109a0d87c092ce6a4193 (patch) | |
tree | 105257f876551814aa74a0760ec116bd1bf307a5 /hud/hud.h | |
parent | ead78d51e662057467b79d3a65b20c4ba83cbf07 (diff) |
main
Diffstat (limited to 'hud/hud.h')
-rw-r--r-- | hud/hud.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/hud/hud.h b/hud/hud.h new file mode 100644 index 0000000..2728bb2 --- /dev/null +++ b/hud/hud.h @@ -0,0 +1,74 @@ +#ifndef HUD_H +#define HUD_H + +#include <SDL.h> +#include <SDL_mixer.h> + +#include <render_text.h> +#include <button.h> +#include <graphicsettings.h> +#include <mkb.h> +#include <info.h> +#include <units.h> +#include <map.h> +#include <gst.h> +#include <net.h> + +typedef struct { + float start; + float nav; + SDL_Rect rect_back; + SDL_Rect *ref; +} hud_sel; + +typedef struct { + button new_template; + button save_templates; + button save_army; + button start_battle; + button host_game; + button join_game; + SDL_Rect rect_battle; + SDL_Rect rect_templates; + int temp_modify; + int temp_place; + SDL_Rect rect_army; + char army_list[64][32]; + int army_listlen; + char army_listcur[32]; + char playername[32]; + int battle_state; + int edit_playername; +} overlay_game; + +typedef struct { + SDL_Rect rect_back; + SDL_Rect rect_chassis; + SDL_Rect rect_brain; + SDL_Rect rect_battery; + SDL_Rect rect_weapons[8]; + SDL_Rect rect_armor[8]; + SDL_Rect rect_augs[8]; + SDL_Rect rect_stats; + button done; + info_unit uinfo; + int sel, ind; +} form_new_unit; + +typedef struct { + hud_sel sc; + overlay_game og; + form_new_unit fnu; + int state; + char *nameedit; +} hud; + +void hud_init(graphic_settings *gs, hud *h, txtd *t); +void hud_resize (graphic_settings *gs, hud *h, txtd *t); +void hud_process (graphic_settings *gs, hud *h, MKb *mkb, + infos *info, army *ar, map *m, txtd *t, gamestate *gst, + net_client *netc, net_server *nets, Mix_Chunk *sounds[]); +void hud_render (hud *h, SDL_Renderer* rend, txtd *t, MKb *mkb, infos *info, + SDL_Texture *sprites); + +#endif
\ No newline at end of file |