summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortwinaphex2014-12-12 01:34:36 +0100
committertwinaphex2014-12-12 01:34:36 +0100
commit80c974a80f4d3e3b008115ee94b979c9a7380d99 (patch)
tree650553ff7d8b3a391af6831d0115c452bf028245
parentc54cff8f70e972fcb2b21dc5b746e44a05e38f93 (diff)
downloadpicogpsp-80c974a80f4d3e3b008115ee94b979c9a7380d99.tar.gz
picogpsp-80c974a80f4d3e3b008115ee94b979c9a7380d99.tar.bz2
picogpsp-80c974a80f4d3e3b008115ee94b979c9a7380d99.zip
Start making specialized functions of multiple_tile_map - pt. 1
-rw-r--r--video.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/video.c b/video.c
index b30ba19..9f34443 100644
--- a/video.c
+++ b/video.c
@@ -636,6 +636,22 @@ static void render_scanline_conditional_bitmap(u32 start, u32 end, u16 *scanline
map_ptr++; \
} \
+#define multiple_tile_map_base_8bpp_normal() \
+ for(i = 0; i < tile_run; i++) \
+ { \
+ single_tile_map(tile, base, 8bpp, normal); \
+ advance_dest_ptr_base(8); \
+ map_ptr++; \
+ } \
+
+#define multiple_tile_map_base_4bpp_normal() \
+ for(i = 0; i < tile_run; i++) \
+ { \
+ single_tile_map(tile, base, 4bpp, normal); \
+ advance_dest_ptr_base(8); \
+ map_ptr++; \
+ } \
+
// Draws a partial tile from a tilemap clipped against the left edge of the
// screen.
@@ -894,12 +910,12 @@ static void render_scanline_text_base_normal(u32 layer,
}
tile_run = (pixel_run - partial_tile_run) / 8;
- multiple_tile_map(base, 8bpp, normal);
+ multiple_tile_map_base_8bpp_normal();
map_ptr = second_ptr;
end -= pixel_run;
}
tile_run = end / 8;
- multiple_tile_map(base, 8bpp, normal);
+ multiple_tile_map_base_8bpp_normal();
partial_tile_run = end % 8;
if(partial_tile_run)
@@ -958,12 +974,12 @@ static void render_scanline_text_base_normal(u32 layer,
}
tile_run = (pixel_run - partial_tile_run) / 8;
- multiple_tile_map(base, 4bpp, normal);
+ multiple_tile_map_base_4bpp_normal();
map_ptr = second_ptr;
end -= pixel_run;
}
tile_run = end / 8;
- multiple_tile_map(base, 4bpp, normal);
+ multiple_tile_map_base_4bpp_normal();
partial_tile_run = end % 8;
if(partial_tile_run)