summaryrefslogtreecommitdiffstats
path: root/mbbsd/screen.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-05 21:53:26 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-05 21:53:26 +0800
commitc2ed49b9343e746d9b7cd5c4bd1a0a4e950dfa09 (patch)
tree1c4b2ac5a98b66d939d00c78c3c4df10ee883ddb /mbbsd/screen.c
parent1a0fc5606804a41bfa34acdc82f7ec43ef3ae933 (diff)
downloadpttbbs-c2ed49b9343e746d9b7cd5c4bd1a0a4e950dfa09.tar
pttbbs-c2ed49b9343e746d9b7cd5c4bd1a0a4e950dfa09.tar.gz
pttbbs-c2ed49b9343e746d9b7cd5c4bd1a0a4e950dfa09.tar.bz2
pttbbs-c2ed49b9343e746d9b7cd5c4bd1a0a4e950dfa09.tar.lz
pttbbs-c2ed49b9343e746d9b7cd5c4bd1a0a4e950dfa09.tar.xz
pttbbs-c2ed49b9343e746d9b7cd5c4bd1a0a4e950dfa09.tar.zst
pttbbs-c2ed49b9343e746d9b7cd5c4bd1a0a4e950dfa09.zip
- grayout: must process scroll lines
- pmore: everyone loves backslash, keep it. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3642 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/screen.c')
-rw-r--r--mbbsd/screen.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/mbbsd/screen.c b/mbbsd/screen.c
index 4115c45c..b4550869 100644
--- a/mbbsd/screen.c
+++ b/mbbsd/screen.c
@@ -568,9 +568,17 @@ grayout_lines(int y, int end, int level)
if (y < 0) y = 0;
if (end > b_lines) end = b_lines;
+ // loop lines
for (; y < end; y ++)
{
- slp = &big_picture[y];
+ // modify by scroll
+ i = y + roll;
+ if (i < 0)
+ i += scr_lns;
+ else if (i >= scr_lns)
+ i %= scr_lns;
+
+ slp = &big_picture[i];
if (slp->len < 1)
continue;