diff options
author | quou <quou@disroot.org> | 2023-05-07 09:37:45 +1000 |
---|---|---|
committer | quou <quou@disroot.org> | 2023-05-07 09:37:45 +1000 |
commit | 40eb179043b77f011fb1048c386ee187f64569d0 (patch) | |
tree | ebae794ec0b3b8851b8c29119ada06555f49d4b6 /fx.c | |
parent | 47e7976922f5c17505c7c5a3377c3735649e3dcc (diff) |
Add waves and some more polish.
Diffstat (limited to 'fx.c')
-rw-r--r-- | fx.c | 35 |
1 files changed, 31 insertions, 4 deletions
@@ -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 + ); } |