YafRay's Magic Console Output

Whilest rendering through YafRay in Blender, playing around with the settings and such, and I noticed that YafRay was outputing some informative text into the console. Of particular intrest was a bar that recored how complete the rendering was. I then scaled down the blender window so I could see the console and rendered again. The loading bar itself was uninteresting, what captured my attention was that in output a bar full of dots, then replaced them with score marks, and changes the text at the end of the bar from “First Render Pass” to " “AA Pass”. I was just wondering, how in the world can this be done in a console? While working with Batch Language, QBasic, and C++ I have found no whay to overwrite or erase single lines in a DOS console. Does anyone know what language their using, or what text handing/output commands?

c (if c++ not much) is my guess… And when I learned c++ they mentioned how to change the console, allthough mostly for console programs you use cout wich is easier to use.
http://www.GameTutorials.com/ -good site to learn c++ with just that feature featured.

hello,

i’m still quite new to C but I found this out while playing with the particles code…

Putting \r at the beginning of the line returns the output to the beginning of the current line…

printf("\r Particle: %d ", a);

The line above writes the above output continuously to the same line, overwriting each time (just updating the number of particles in this case).

cheers

leon