i dont kno if any1 answered u yet, but there is a way to make cheep graphics. look at the setpalette function in the help. basically, u set the numbers 0-15 to a 64 bit color (0-63) and each 64 bit color is different
this code can show u all the colors, its pretty simple. anyways, after u have set the colors, use a 2-d integer. for example, soda[50][100], this is an integer that is 50 down and 100 accros. now, do
soda[50][100]={
0,1,2,0,0,2,0,0,3,...
};
and that will set the value of all of that integer (u must have all spaces filled for it to work correctly) and then say,
for(int i=o;i<100;i++){
for(int j=0;j<50;j++){
if(soda[j][i]==1){putpixel(i+100,j+100,COLOR1);}
/*COLOR1 is just an example, the vallue of COLOR1 would be set by the setpalette function*/
}
}
if thats 2 confusing, tell me what part u have troubles on!
email me at tylermailonly@hotmail.com (its the best way to contact me)
good luck!
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <ctype.h>
#include <graphics.h>
#include "tools.h"
int main(){
closegraph();
IGM();
cleardevice();
setbkcolor(0);
int i=0,k,c1=1,c2=2,c3=3,color1=1,color2=2,color3=3;
char s[50];
setpalette(c1,color1);
setpalette(c2,color2);
setpalette(c3,color3);
settextstyle(2,0,5);
do{
k=getkey();
switch(k){
case 72 : color1--; color2--; color3--; setpalette(c1,color1);
setpalette(c2,color2); setpalette(c3,color3); cleardevice(); break;
case 80 : color1++; color2++; color3++; setpalette(c1,color1);
setpalette(c2,color2); setpalette(c3,color3); cleardevice(); break;
}
setcolor(15);
sprintf(s,"%-3i--------",color1); outtextxy(320-85,240-68,s);
sprintf(s,"%-3i--------",color2); outtextxy(320-85,240-8,s);
sprintf(s,"%-3i--------",color3); outtextxy(320-85,240+52,s);
setfillstyle(1,c1); bar(350-20,180-20,350+20,180+20);
setfillstyle(1,c2); bar(350-20,240-20,350+20,240+20);
setfillstyle(1,c3); bar(350-20,300-20,350+20,300+20);
}while(k!=13);
}