Mercurial > repos > genjam1
comparison src/creep.h @ 14:5c7f33441e43
Creeps now move towards the goal
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 12 Jan 2014 18:16:51 -0800 |
parents | c0bb53eaa6f4 |
children | a9500e8bff93 |
comparison
equal
deleted
inserted
replaced
13:d118fe8fb1db | 14:5c7f33441e43 |
---|---|
1 #ifndef CREEP_H_ | 1 #ifndef CREEP_H_ |
2 #define CREEP_H_ | 2 #define CREEP_H_ |
3 | 3 |
4 enum { | 4 enum { |
5 CREEP_NORMAL = 0 | 5 CREEP_NORMAL = 0, |
6 NUM_SPECIES | |
6 } creep_species; | 7 } creep_species; |
7 | 8 |
8 typedef struct { | 9 typedef struct { |
9 u16 index; | 10 u16 index; |
10 u16 health; | 11 u16 health; |
11 u16 waypoint; | 12 s16 targetx; |
13 s16 targety; | |
12 u8 species; | 14 u8 species; |
13 u8 direction; | 15 u8 direction; |
14 } creep; | 16 } creep; |
15 | 17 |
16 #define MAX_CREEPS 40 | 18 #define MAX_CREEPS 40 |
17 extern u16 cur_creeps; | 19 extern u16 cur_creeps; |
18 u16 spawn_creep(u8 species, s16 x, s16 y); | 20 u16 spawn_creep(u8 species, s16 x, s16 y); |
21 void gen_distances(u16 x, u16 y); | |
22 void print_distances(void); | |
23 void update_creeps(void); | |
19 | 24 |
20 #endif //CREEP_H_ | 25 #endif //CREEP_H_ |