summaryrefslogtreecommitdiff
path: root/players.h
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2015-01-07 21:43:18 +0100
committerOlivier Gayot <duskcoder@gmail.com>2015-01-07 23:29:49 +0100
commit45d54652a8005ccae2466a0e4757017c7b337e3b (patch)
tree5d13f930c82edeea16d490c39017973e0a85007c /players.h
parentb3295086c84b09353d5e89c6f7c743167b486a49 (diff)
use a team / character model instead of an array of personnages
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'players.h')
-rw-r--r--players.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/players.h b/players.h
new file mode 100644
index 0000000..7d7b42c
--- /dev/null
+++ b/players.h
@@ -0,0 +1,66 @@
+#ifndef PLAYERS_H
+#define PLAYERS_H
+
+#include <stdbool.h>
+#include <SDL/SDL.h>
+
+#include "constantes.h"
+#include "structures.h"
+
+struct character_t {
+ struct team_t *team;
+
+ enum character_class_t class_;
+
+ char *name;
+ bool cpu;
+
+ union {
+ struct ally_t ally;
+ struct enemy_t enemy;
+ };
+
+ SDL_Surface *def_surf;
+ SDL_Surface *red_surf;
+
+ SDL_Surface *surf;
+
+ SDL_Rect pos;
+ SDL_Rect pos_hp;
+ SDL_Rect pos_mp;
+
+ bool alive;
+
+ int hp;
+ int max_hp;
+ int mp;
+ int max_mp;
+ int magic;
+ int strength;
+ int defense;
+ int spirit;
+};
+
+struct team_t {
+ bool cpu;
+ int chr_cnt;
+
+ char *name;
+
+ struct character_t *chrs;
+
+ struct objects_t objects;
+};
+
+struct stats_base_class_t {
+ int hp;
+ int mp;
+ int magic;
+ int strength;
+ int defense;
+ int spirit;
+};
+
+extern struct stats_base_class_t base_stats_g[CLASS_CNT];
+
+#endif /* PLAYERS_H */