aboutsummaryrefslogtreecommitdiff
path: root/world.h
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2024-10-02 21:23:04 +1000
committerquou <quou@disroot.org>2024-10-02 21:24:37 +1000
commit8d2ba1419c060078c0aeeb33ef4e84da482b78f5 (patch)
tree1148ecab21daf9e02062896689b965402aafb6a4 /world.h
parent52d93d98018c47cb9f8d9271e4ded8ab96b7bfbd (diff)
particle effects
Diffstat (limited to 'world.h')
-rw-r--r--world.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/world.h b/world.h
index 05372ae..81feb6f 100644
--- a/world.h
+++ b/world.h
@@ -7,6 +7,7 @@
#define max_particles 32
#define max_enemies 16
#define max_deathzones 16
+#define max_effects 16
struct Renderer;
@@ -14,7 +15,8 @@ typedef struct World {
Particle particles[max_particles];
Enemy enemies[max_enemies];
Deathzone deathzones[max_deathzones];
- int particle_count, enemy_count;
+ Effect effects[max_effects];
+ int particle_count, enemy_count, effect_count;
int deathzone_count;
Player player;
Laser laser;
@@ -45,6 +47,14 @@ Deathzone* inst_deathzone(
int life,
int friendly
);
+Effect* inst_effect(
+ World* w,
+ int x,
+ int y,
+ int vx,
+ int vy,
+ int c
+);
void update_world(World* w, const struct App* a);
void ren_world(const World* w, struct Renderer* r);