Turbo C++ Graphics
Why need of this ?
Although Turbo C++ DOS BGI programming is an old graphics library for DOS, it is nowadays followed for academic purpose as Turbo C++ is a light IDE for beginners. The fact is that it falls in Borland’s proprietary software list although it is widely used in our colleges. But many sites also provide it free considering it as an out-of-date product (abandonware). Thus even if it is not freeware it falls in it, such an old tool is it. I am referring to the old versions TC3 and below.
My experiments with graphics start in Turbo before it starts in VB. So I eagerly searched to have some version of TC 4. I recently saw an old update of Turbo C which includes 256 color mode driver. When I used Turbo in those study days I grabbed the 256 color palette directly calling the dos interrupt codes. But I was surprised to see this update and it was sure that it exist in those days too.
Remember when I went with interrupt I wrote all graphics functions myself as TC’s graphics.h cannot be used as we initialize graphics through interrupt. That was difficult to code , we need to create all generic drawing functions. Still I simulated level 1 of famous game DAVE. Yes grabbing their picture through screen shots . The color palette was accurate.
VGA 256 color mode
For those who now study or play with TC Graphics you need not write those interrupt calls to grab palette. Just use their VGA256 driver.
You may download the a sample source by me and TC library from the link provided at the end of the post.
Following is a part of the code .
setcolor(WHITE);
for(x=1;x<=256;x++)
{
if(col >=300)
{row +=10;col=0;}
setfillstyle(SOLID_FILL,x);
fillrectangle(col,row,col+15-1,row+20-1);
col+=15; }
You can setup your own color palette making new colors as required using TC’s library function . As I lost my old codes and was too mad with that I may be coding Mario (If time allows). Then sure I will post it, for not repeating code loss.
Also remember that you must migrate to some other graphics library even if you are a student
Download Files