#ifndef obj_h #define obj_h #include "rect.h" struct App; struct Map; struct Renderer; struct World; typedef enum { face_left, face_right } Face; typedef struct { int x, y, vx, vy; int frame; int anim; int grounded, headbutted, on_ramp, jumping; int cooldown, slashing; Face face; Rect rect; } Player; void init_player(Player* p); void update_player( Player* p, struct World* w, const struct App* app, const struct Map* map ); void ren_player(const Player* p, struct Renderer* r); typedef struct { int x, y; int frame, anim; int bmp; Rect rect; } Particle; void init_particle(Particle* p, int x, int y, int anim, int bmp); int update_particle(Particle* p); void ren_particle(const Particle* p, struct Renderer* r); typedef enum { enemy_demon } Enemy_Type; typedef struct { Enemy_Type t; int x, y, vx, vy; int hp, frame, anim; int grounded, headbutted, on_ramp; int state; Face face; Rect rect; } Enemy; void init_enemy(Enemy* e, Enemy_Type t, int x, int y); int update_enemy(Enemy* e, struct World* w); void ren_enemy(const Enemy* e, struct Renderer* r); typedef struct { Rect r; int vx, vy; int hp, life, friendly; } Deathzone; void init_deathzone( Deathzone* d, const Rect* r, int vx, int vy, int hp, int life, int friendly ); int update_deathzone(Deathzone* d); #endif