summaryrefslogtreecommitdiff
path: root/entry.h
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2015-01-09 22:32:08 +0100
committerOlivier Gayot <duskcoder@gmail.com>2015-01-09 22:32:08 +0100
commitad2bf5cd7c227bf916b51547f61fdfe711f0b4c3 (patch)
tree249df9520804ce4ff8526fdefa81c745c849f7a5 /entry.h
parentc25e1d6fd68f1f85af9e7f6dd0d35c725000014f (diff)
pass the target type to select_target
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'entry.h')
-rw-r--r--entry.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/entry.h b/entry.h
index db81e47..daa1e5d 100644
--- a/entry.h
+++ b/entry.h
@@ -5,6 +5,13 @@
#include "players.h"
#include "target.h"
+struct action_t {
+ void *data;
+ void (*f)(SURFACES *, POSITIONS *, struct character_t *, struct target_t *, void *data);
+
+ enum target_type_t target;
+};
+
struct entry_t {
/* displayed name */
char *name;
@@ -13,12 +20,7 @@ struct entry_t {
union {
struct entry_t *children;
- struct {
- void *data;
- void (*f)(SURFACES *, POSITIONS *, struct character_t *, struct target_t *, void *data);
-
- enum target_type_t target;
- } action;
+ struct action_t action;
};
};