1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
#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 {
SDL_Rect rect_back;
char oppo[32];
} overlay_battle;
typedef struct {
button new_template;
button save_templates;
button save_army;
button delete_army;
button new_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;
int army_listcur;
int battle_state;
char playername[32];
int input_playername;
char ip[32];
int input_ip;
int input_army;
int input_temp;
char army_rename[32];
int start_battle_flag;
} 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_battle ob;
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, gamestate *gst, float time);
#endif
|