#ifndef world_h #define world_h #include "map.h" #include "obj.h" #define max_particles 16 #define max_enemies 16 #define max_deathzones 16 #define max_effects 16 #define max_projectiles 16 struct Renderer; typedef struct World { Particle particles[max_particles]; Enemy enemies[max_enemies]; Deathzone deathzones[max_deathzones]; Effect effects[max_effects]; Projectile projectiles[max_projectiles]; int particle_count, enemy_count, effect_count; int deathzone_count, projectile_count; Player player; Laser laser; Map map; int frame, freeze; } World; void init_world(World* w); Particle* inst_particle( World* w, int x, int y, int anim, int bmp ); Enemy* inst_enemy( World* w, Enemy_Type t, int x, int y ); Deathzone* inst_deathzone( World* w, const Rect* r, int vx, int vy, int hp, int life, int friendly ); Effect* inst_effect( World* w, int x, int y, int vx, int vy, int c ); Projectile* inst_projectile( World* w, int x, int y, const Rect* r, int anim ); void update_world(World* w, const struct App* a); void ren_world(const World* w, struct Renderer* r); #endif