summaryrefslogtreecommitdiff
path: root/apps/plugins/zxbox/spscr.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2009-06-07 21:27:05 +0000
committerJens Arnold <amiconn@rockbox.org>2009-06-07 21:27:05 +0000
commit1d6df54df27cb41c02226678a2c8f9feddd1a1e0 (patch)
tree5fdc6dd98ac0208f5c3351b062063af6914cbefb /apps/plugins/zxbox/spscr.c
parentc3182ec333982e961d3babfbdb1125fd5bac7fb8 (diff)
downloadrockbox-1d6df54df27cb41c02226678a2c8f9feddd1a1e0.tar.gz
rockbox-1d6df54df27cb41c02226678a2c8f9feddd1a1e0.zip
Convert a number of places in core and plugins to use the BIT_N() macro instead of 1<<n. Speeds up things on SH1, and also reduces core binsize. Most notable speedups: 1 bit lcd driver: drawpixel +20%, drawline + 27%, hline +5%; jpeg viewer: +8% for 1/8 scaling. Other targets are unaffected.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21205 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/zxbox/spscr.c')
-rw-r--r--apps/plugins/zxbox/spscr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/zxbox/spscr.c b/apps/plugins/zxbox/spscr.c
index 2c24fb37a8..d419ff0c66 100644
--- a/apps/plugins/zxbox/spscr.c
+++ b/apps/plugins/zxbox/spscr.c
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (C) 1996-1998 Szeredi Miklos 2 * Copyright (C) 1996-1998 Szeredi Miklos
3 * Email: mszeredi@inf.bme.hu 3 * Email: mszeredi@inf.bme.hu
4 * 4 *
@@ -82,7 +82,7 @@ byte *update_screen_line(byte *scrp, int coli, int scri, int border,
82 SPNM(imag_mark)[coli] |= mark; 82 SPNM(imag_mark)[coli] |= mark;
83 SPNM(imag_horiz) |= mark; 83 SPNM(imag_horiz) |= mark;
84 coli >>= 3; 84 coli >>= 3;
85 SPNM(imag_vert) |= (1 << coli); 85 SPNM(imag_vert) |= BIT_N(coli);
86 86
87 spmp = PRNM(proc).mem + (scri << 5); 87 spmp = PRNM(proc).mem + (scri << 5);
88 spcp = PRNM(proc).mem + 0x5800 + (coli << 5); 88 spcp = PRNM(proc).mem + 0x5800 + (coli << 5);