Tremulous Forum
Mods => Modding Center => Topic started by: Bomb on July 23, 2008, 09:35:32 pm
-
Does anyone know how the tremded console preserves the bottom line? That is, what keeps the output from overwriting your input?
-
The input line is not actually preserved. When a new line of output is printed, the input line is replaced by output and printed to the next line. The result is that it looks like it never went away, but it really did. (Echoing is specifically disabled and stdin is made non-blocking.)
-
How might one replicate this functionality with standard C functions (e.g. printf)?
-
best would be to just browse trem's source
-
That's easier said than done. There are upwards of a hundred files to look through. Not to mention the fact that every print-related function calls a different function.
So, does anyone know how to do this?
[EDIT] How does the tremded know what the input line says?
-
http://svn.icculus.org/quake3/trunk/code/sys/con_tty.c?view=markup
-
Thanks Undeference. Much <3 to you!