aboutsummaryrefslogtreecommitdiff
path: root/fx.c
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2023-05-07 09:37:45 +1000
committerquou <quou@disroot.org>2023-05-07 09:37:45 +1000
commit40eb179043b77f011fb1048c386ee187f64569d0 (patch)
treeebae794ec0b3b8851b8c29119ada06555f49d4b6 /fx.c
parent47e7976922f5c17505c7c5a3377c3735649e3dcc (diff)
Add waves and some more polish.
Diffstat (limited to 'fx.c')
-rw-r--r--fx.c35
1 files changed, 31 insertions, 4 deletions
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
+ );
}