aboutsummaryrefslogtreecommitdiff
path: root/map.c
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2023-05-06 20:30:58 +1000
committerquou <quou@disroot.org>2023-05-06 20:30:58 +1000
commita72420a85fdfe85d6a6e67b8c70ed11537d532bd (patch)
tree387ce06b39590ba1b90935fcbf71ed03c4f912b9 /map.c
parent2e0f7c263b197d72fea7701d566e4a62e892fefe (diff)
Work on visual effects; Debris and player bullet impact effects.
Diffstat (limited to 'map.c')
-rw-r--r--map.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/map.c b/map.c
index b9eb0ac..0cd6532 100644
--- a/map.c
+++ b/map.c
@@ -126,12 +126,16 @@ void render_map(Map* map, int cx, int cy) {
Bitmap bitmap;
Rectangle rect;
- bitmap.pixels = map->pixels;
- bitmap.w = mbmp_w;
- bitmap.h = mbmp_h;
+ get_map_bitmap(map, &bitmap);
rect.x = 0;
rect.y = 0;
rect.w = bitmap.w;
rect.h = bitmap.h;
render_bitmap(&bitmap, -cx >> fbits, -cy >> fbits, &rect);
}
+
+void get_map_bitmap(Map* map, Bitmap* bitmap) {
+ bitmap->pixels = map->pixels;
+ bitmap->w = mbmp_w;
+ bitmap->h = mbmp_h;
+}