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 /map.c | |
parent | 2e0f7c263b197d72fea7701d566e4a62e892fefe (diff) |
Work on visual effects; Debris and player bullet impact effects.
Diffstat (limited to 'map.c')
-rw-r--r-- | map.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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; +} |