summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2011-01-04 06:18:31 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2011-01-04 06:18:31 (GMT)
commit3017b0398d91025a0b2bba1ff9edf23bcaff6257 (patch)
treeaa9d425b05f21464fb52ab11e8490c5471b2bfc8
parente40b93c7df6d606ff681c13498be42f63beeb787 (diff)
downloadgrv-3017b0398d91025a0b2bba1ff9edf23bcaff6257.zip
grv-3017b0398d91025a0b2bba1ff9edf23bcaff6257.tar.gz
grv-3017b0398d91025a0b2bba1ff9edf23bcaff6257.tar.bz2
grv-3017b0398d91025a0b2bba1ff9edf23bcaff6257.tar.xz
graphics.c: ty is in characters, multiply by FONT_YSIZE
When computing the pitch multipliers, we need it in scan lines, not character lines.
-rw-r--r--graphics.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/graphics.c b/graphics.c
index 519c06c..ea47d3b 100644
--- a/graphics.c
+++ b/graphics.c
@@ -138,7 +138,8 @@ static void put_screen(int tx, int ty)
* This assumes that either unaligned references are okay, or
* pitch will be a multiple of 4.
*/
- pixelr = ((uint32_t *) ((char *)rscreen->pixels + ty*rscreen->pitch)) +
+ pixelr = ((uint32_t *) ((char *)rscreen->pixels +
+ ty*FONT_YSIZE*rscreen->pitch)) +
tx*FONT_XSIZE;
for ( y = 0 ; y < FONT_YSIZE ; y++ ) {