Rev 3657 | Rev 3866 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3657 | Rev 3755 | ||
---|---|---|---|
Line 125... | Line 125... | ||
125 | 125 | ||
126 | static void scroll(int rows) |
126 | static void scroll(int rows) |
127 | { |
127 | { |
128 | int i; |
128 | int i; |
129 | if (rows > 0) { |
129 | if (rows > 0) { |
130 | memcpy(scr_addr, ((char *) scr_addr) + rows * scr_width * 2, |
130 | memmove(scr_addr, ((char *) scr_addr) + rows * scr_width * 2, |
131 | scr_width * scr_height * 2 - rows * scr_width * 2); |
131 | scr_width * scr_height * 2 - rows * scr_width * 2); |
132 | for (i = 0; i < rows * scr_width; i++) |
132 | for (i = 0; i < rows * scr_width; i++) |
133 | (((short *) scr_addr) + scr_width * scr_height - rows * |
133 | (((short *) scr_addr) + scr_width * scr_height - rows * |
134 | scr_width)[i] = ((style << 8) + ' '); |
134 | scr_width)[i] = ((style << 8) + ' '); |
135 | } else if (rows < 0) { |
135 | } else if (rows < 0) { |
136 | memcpy(((char *)scr_addr) - rows * scr_width * 2, scr_addr, |
136 | memmove(((char *)scr_addr) - rows * scr_width * 2, scr_addr, |
137 | scr_width * scr_height * 2 + rows * scr_width * 2); |
137 | scr_width * scr_height * 2 + rows * scr_width * 2); |
138 | for (i = 0; i < -rows * scr_width; i++) |
138 | for (i = 0; i < -rows * scr_width; i++) |
139 | ((short *)scr_addr)[i] = ((style << 8 ) + ' '); |
139 | ((short *)scr_addr)[i] = ((style << 8 ) + ' '); |
140 | } |
140 | } |
141 | } |
141 | } |