From 40eb179043b77f011fb1048c386ee187f64569d0 Mon Sep 17 00:00:00 2001 From: quou Date: Sun, 7 May 2023 09:37:45 +1000 Subject: Add waves and some more polish. --- fx.c | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) (limited to 'fx.c') diff --git a/fx.c b/fx.c index 53670b4..8e0e41f 100644 --- a/fx.c +++ b/fx.c @@ -6,7 +6,8 @@ static int new_fx( World* world, int x, int y, - Animation_ID anim + Animation_ID anim, + Asset_ID bitmap ) { Entity e; CPosition* pos; @@ -30,7 +31,7 @@ static int new_fx( pos->x = x; pos->y = y; - sprite->id = asset_id_bullet; + sprite->id = bitmap; sprite->rect = make_rect(0, 0, 16, 16); animated->id = anim; @@ -45,7 +46,13 @@ int new_enemy_bullet_explosion( int x, int y ) { - return new_fx(world, x, y, animation_enemy_bullet_explode); + return new_fx( + world, + x, + y, + animation_enemy_bullet_explode, + asset_id_bullet + ); } int new_player_bullet_explosion( @@ -53,5 +60,25 @@ int new_player_bullet_explosion( int x, int y ) { - return new_fx(world, x, y, animation_player_bullet_explode); + return new_fx( + world, + x, + y, + animation_player_bullet_explode, + asset_id_bullet + ); +} + +int new_heart_break( + struct World* world, + int x, + int y +) { + return new_fx( + world, + x, + y, + animation_heart_break, + asset_id_usr + ); } -- cgit v1.2.3-54-g00ecf