Mercurial > repos > genjam1
view src/creep.h @ 19:08f2bcf3447f
Skip diagonals when calculating distance
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 12 Jan 2014 22:05:12 -0800 |
parents | a9500e8bff93 |
children | 51a0972fcf76 |
line wrap: on
line source
#ifndef CREEP_H_ #define CREEP_H_ enum { CREEP_NORMAL = 0, NUM_SPECIES } creep_species; typedef struct { u16 index; u16 health; s16 targetx; s16 targety; u8 species; u8 direction; } creep; #define MAX_CREEPS 40 extern u16 cur_creeps; extern u16 distances[20*14]; u16 spawn_creep(u8 species, s16 x, s16 y); void gen_distances(u16 x, u16 y); void print_distances(void); void update_creeps(void); #endif //CREEP_H_