aboutsummaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorFranklin Wei <frankhwei536@gmail.com>2014-06-23 17:04:30 -0400
committerFranklin Wei <frankhwei536@gmail.com>2014-06-23 17:04:30 -0400
commit7c3ee246fb626ab09b3b05055efdfaf3a00e60e7 (patch)
tree231d914a2677fdf8e466c972b62b4d9632698aa9 /util.c
parent35e1fd6820cd05c180e180d0ec61457a9f31e196 (diff)
downloadwargames-server-7c3ee246fb626ab09b3b05055efdfaf3a00e60e7.zip
wargames-server-7c3ee246fb626ab09b3b05055efdfaf3a00e60e7.tar.gz
wargames-server-7c3ee246fb626ab09b3b05055efdfaf3a00e60e7.tar.bz2
wargames-server-7c3ee246fb626ab09b3b05055efdfaf3a00e60e7.tar.xz
Fixed more bugs, added more features :)
Diffstat (limited to 'util.c')
-rw-r--r--util.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/util.c b/util.c
index 6ca83fe..a3c336b 100644
--- a/util.c
+++ b/util.c
@@ -13,10 +13,19 @@ void allLower(char* str)
}
void print_string(const char* str) /* print string, slowly */
{
+ int window_height;
+ int junk;
+ getmaxyx(stdscr, window_height, junk);
int i=0;
while(str[i])
{
addch(str[i]);
+ int cursx, cursy;
+ getyx(stdscr, cursy, cursx);
+ if(cursy==window_height)
+ {
+ scroll(stdscr);
+ }
usleep(SLEEP_TIME);
refresh();
++i;