From a72420a85fdfe85d6a6e67b8c70ed11537d532bd Mon Sep 17 00:00:00 2001 From: quou Date: Sat, 6 May 2023 20:30:58 +1000 Subject: Work on visual effects; Debris and player bullet impact effects. --- fx.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'fx.c') 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); +} -- cgit v1.2.3-54-g00ecf