I was just making a little rpg. It would be a lot better if I could add color to it. Does anybody know how to at color to a Win32 Console Application. The colors I only need are Red, Green, and Blue Thanx in advance.
hehehe, is it like text based or something? what are you talking about?
Its text based. Its all the standered grey color. How do I change the color of the text.
There arenāt any opengl commands that change the color of console text. I donāt know what commands do either. sorry.
heheā¦ text mode is the most OpenGL-offtopic question i could imagine (;
u have to load the ANSI.SYS in the CONFIG.SYSā¦ DEVICE= C:[PATH]\ANSI.SYS
should be in the windows\command directory, but iām not 100% sure
this enables some control commands, which can manipulate color, cursor-pos ā¦
but cant remember them anymoreā¦
btw: arenāt text mode games a bit outdated, are they?
Hi there,
lookup WriteConsoleOutputAttribute in
MSDN
Think it may be what your after
Heheh, ANSI text. Brings back memories of connecting to local BBSes at 2400 bps before I had access to the Internet. Text based games arenāt SO outdated. There are still a lot of text-based MUDS around. Some of them can even be addicting.
Hereās a novel idea: forget the Windows App and write a DOS program. If that is what you mean, then all the better. Hereās how to have colored text, blinking text, different cursors, etc. Use the functions in conio.h . But donāt use Microsoftās conio.h, because it doesnāt have the functions I am talking about. Download another good compiler, DJGPP (uses gcc and gpp) and a IDE with it called Rhide. Get it at www.delorie.com/djgpp/ .
Look at the help files for conio.h in Rhide to get the specifics. For example, you call a text attribute modifying function, such as textcolor(int COLOR), and then use the set of functions which are like printf() and scanf(), but start with a ācā.
Ex:
textcolor(BLUE); //cprintf() now prints in blue!
cprintf(āblah %fā, floatvar); //Do like always