I am writing a chess game for my school project..(Console game).. i am using BGI graphics, mouse support and bitmapsupport... My game is pretty built now.. the interface, move validation, mouse movments etc.. but the problem is with the image quality.. the images i have stored are very small and is 24bit BMP... they look good on paint.. but not on the console.. Here is a part of my code which reads and displays the image on the screen.... Help me display the image better..
Code:
void wking(int sx,int sy) \\sx and sy are the screen position to place image
{
char a;
ifstream ifil;
ifil.open("C:\\project\\image\\wking.bmp", ios::in); \\image size 40 x 60
for(int i=0;i<54;i++)ifil.get(a);
for(i=0;i<60;i++)
for(int j=0;j<40;j++)
{
ifil.get(a);
ifil.get(a);
ifil.get(a);
int g=a,k;
if(a<0)g+=256;
k=g/16;
setcolor(k);
if(a!=0)putpixel(sx+j,sy+200-i,k);
}
ifil.close();
}