diff options
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; +} |