diff options
author | quou <quou@disroot.org> | 2023-05-06 20:30:58 +1000 |
---|---|---|
committer | quou <quou@disroot.org> | 2023-05-06 20:30:58 +1000 |
commit | a72420a85fdfe85d6a6e67b8c70ed11537d532bd (patch) | |
tree | 387ce06b39590ba1b90935fcbf71ed03c4f912b9 /fx.c | |
parent | 2e0f7c263b197d72fea7701d566e4a62e892fefe (diff) |
Work on visual effects; Debris and player bullet impact effects.
Diffstat (limited to 'fx.c')
-rw-r--r-- | fx.c | 23 |
1 files changed, 20 insertions, 3 deletions
@@ -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); +} |