From a72420a85fdfe85d6a6e67b8c70ed11537d532bd Mon Sep 17 00:00:00 2001 From: quou Date: Sat, 6 May 2023 20:30:58 +1000 Subject: Work on visual effects; Debris and player bullet impact effects. --- map.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'map.c') 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; +} -- cgit v1.2.3-54-g00ecf