Default function for changeEnvironment.
This commit is contained in:
parent
c4346550cf
commit
7e88125864
|
@ -30,6 +30,7 @@ static void die(void);
|
||||||
static void activate(int active);
|
static void activate(int active);
|
||||||
static void touch(Entity *other);
|
static void touch(Entity *other);
|
||||||
static void animate(void);
|
static void animate(void);
|
||||||
|
static void changeEnvironment(void);
|
||||||
static void load(cJSON *root);
|
static void load(cJSON *root);
|
||||||
static void save(cJSON *root);
|
static void save(cJSON *root);
|
||||||
static SDL_Rect *getCurrentSprite(void);
|
static SDL_Rect *getCurrentSprite(void);
|
||||||
|
@ -68,6 +69,7 @@ void initEntity(Entity *e)
|
||||||
e->bounce = bounce;
|
e->bounce = bounce;
|
||||||
e->getCurrentSprite = getCurrentSprite;
|
e->getCurrentSprite = getCurrentSprite;
|
||||||
e->die = die;
|
e->die = die;
|
||||||
|
e->changeEnvironment = changeEnvironment;
|
||||||
|
|
||||||
e->load = load;
|
e->load = load;
|
||||||
e->save = save;
|
e->save = save;
|
||||||
|
@ -153,6 +155,10 @@ static void die(void)
|
||||||
self->alive = ALIVE_DEAD;
|
self->alive = ALIVE_DEAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void changeEnvironment(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
static SDL_Rect *getCurrentSprite(void)
|
static SDL_Rect *getCurrentSprite(void)
|
||||||
{
|
{
|
||||||
return &self->sprite[self->facing]->frames[self->spriteFrame]->rect;
|
return &self->sprite[self->facing]->frames[self->spriteFrame]->rect;
|
||||||
|
|
|
@ -27,7 +27,6 @@ extern void addTeleportStars(Entity *e);
|
||||||
extern void initEntity(Entity *e);
|
extern void initEntity(Entity *e);
|
||||||
extern Sprite *getSprite(char *name);
|
extern Sprite *getSprite(char *name);
|
||||||
extern int addItem(Item *i);
|
extern int addItem(Item *i);
|
||||||
extern int numCarriedItems(void);
|
|
||||||
extern void updateObjective(char *targetName);
|
extern void updateObjective(char *targetName);
|
||||||
|
|
||||||
extern Entity *self;
|
extern Entity *self;
|
||||||
|
|
|
@ -534,9 +534,7 @@ static void moveToOthers(float dx, float dy, PointF *position)
|
||||||
{
|
{
|
||||||
hit = 1;
|
hit = 1;
|
||||||
|
|
||||||
/*
|
/* Infinite loop! Kill it! */
|
||||||
* Infinite loop! Kill it!
|
|
||||||
*/
|
|
||||||
if (dx == 0 && dy == 0 && solidLoopHits++ > 1)
|
if (dx == 0 && dy == 0 && solidLoopHits++ > 1)
|
||||||
{
|
{
|
||||||
self->alive = ALIVE_DEAD;
|
self->alive = ALIVE_DEAD;
|
||||||
|
|
Loading…
Reference in New Issue