aboutsummaryrefslogtreecommitdiff
path: root/fx.c
diff options
context:
space:
mode:
Diffstat (limited to 'fx.c')
-rw-r--r--fx.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/fx.c b/fx.c
index f2a5f54..53670b4 100644
--- a/fx.c
+++ b/fx.c
@@ -2,10 +2,11 @@
#include "fx.h"
#include "world.h"
-int new_enemy_bullet_explosion(
+static int new_fx(
World* world,
int x,
- int y
+ int y,
+ Animation_ID anim
) {
Entity e;
CPosition* pos;
@@ -32,9 +33,25 @@ int new_enemy_bullet_explosion(
sprite->id = asset_id_bullet;
sprite->rect = make_rect(0, 0, 16, 16);
- animated->id = animation_enemy_bullet_explode;
+ animated->id = anim;
animated->frame = 0;
animated->timer = 0;
return e;
}
+
+int new_enemy_bullet_explosion(
+ World* world,
+ int x,
+ int y
+) {
+ return new_fx(world, x, y, animation_enemy_bullet_explode);
+}
+
+int new_player_bullet_explosion(
+ World* world,
+ int x,
+ int y
+) {
+ return new_fx(world, x, y, animation_player_bullet_explode);
+}