dev c++ graphics

Foro para los que usan Dev-C++.
Responder
Mensaje
Autor
shibu
Mensajes: 4
Registrado: 31/05/2012 5:02 pm

dev c++ graphics

#1 Mensaje por shibu » 02/06/2012 8:24 am

hola amigos, tengo unas inquietudes, llevo unas semanas aprendiendo a programar en dev c++, asi que aun soy novato, la cuention es que estuve bajando unos codigos fuente para un juego de sudoku compilado en dev c++ pero hay un problema, cuando lo compilo me aparece el error de graphics.h, y me dice que no existe, he estado leyendo y segun dice, esa libreria no esta para dev c++, quisiera que me saquen de la ignorancia acerca de esta cabecera y con cual la puedo reemplazar para que me funcionde, y si alguien tiene un codigo fuente para sudoku le agradeceria.

pd: dejo el codigo fuente

Código: Seleccionar todo


#define FALSE 0
#define TRUE 1
#include"mouse.h"
#include<winds.h>
#include<stdlib.h>
#include<time.h>
#include<io.h>

short int minx,miny,maxx,maxy;
int current_no=0,current_diff=1,current_mode=2,input_count=0,icount,mode;
int r[60][2];
int main_matrix[9][9],backup_matrix[9][9];

class sudoku
{
private:
	short int row,col;
	int check_all(int x,int y);
public:
	void generate_sudoku();
	int solve_sudoku();
	int is_fixed_in_sudoku(int count,int m,int n);
	void display_mainmatrix_on_grid();
};

int sudoku::is_fixed_in_sudoku(int count, int m, int n)
{
for(int i=0;i<count;i++)
	if(m==r[i][0]&&n==r[i][1])
		return(TRUE);
return(FALSE);
}
int sudoku::solve_sudoku()
{
short int m=0,n=0,number;
row=0;col=0;
B:
for(m=row;m<9;m++)
	{
	n=col;
	while(n<9)
		{
		number=1;
		if(is_fixed_in_sudoku(icount,m,n)==0)
			{
			allot:
			main_matrix[m][n]=number;
			if(check_all(m,n)==0)
				{
				number++;
				if(number>9)
					{
					main_matrix[m][n]=0;
					if(n==0)
						{
						row=m-1; col=8;
						if(row<0)
							return(FALSE);
						goto A;
						}
					else
						{
						row=m; col=n-1;
						if(row<0 || col<0)
							return(FALSE);
						goto A;
						}
					}
				goto allot;
				}
			}
		n++;
		if(n>8)
		col=0;
		}
	}
return(TRUE);
A:
if(is_fixed_in_sudoku(icount,row,col)==0)
	{
	number=main_matrix[row][col];
	C:
	number++;
	main_matrix[row][col]=number;
	if(number>9)
		{
		main_matrix[row][col]=0;
		if(col==0)
			{
			row--; col=8;
			if(row<0)
				return(FALSE);
			goto A;
			}
		else
			{
			col--;
			if(col<0)
				return(FALSE);
			goto A;
			}
		}
	if(check_all(row,col)==0)
		goto C;
	else
		{
		if(col==8)
			{
			row++;
			if(row>8)
				return(FALSE);
			col=0;
			goto B;
			}
		else
			{
			col++;
			if(col>8)
				return(FALSE);
			goto B;
			}
		}
	}
else
	{
	if(col==0)
		{
		row--; col=8;
		if(row<0)
			return(FALSE);
		goto A;
		}
	else
		{
		col--;
		if(col<0)
			return(FALSE);
		goto A;
		}
	}
}
void sudoku::generate_sudoku()
{
int m,n,count,error;
switch(current_diff)
	{
	case 1:
	mode=35+random(2);
	break;
	case 2:
	mode=30+random(2);
	break;
	case 3:
	mode=25+random(4);
	break;
	default:
	mode=35+random(2);
	break;
	}
generate:
for (int i=0;i<9;i++)
	for(int j=0;j<9;j++)
			main_matrix[i][j]=0;
for(i=0;i<60;i++)
	{
	r[i][0]=20; r[i][1]=20;
	}
main_matrix[0][0]=1+random(8); r[0][0]=0; r[0][1]=0;
for(count=1;count<10;count++)
	{
	choose:
	m=random(9); n=random(9);
	if(is_fixed_in_sudoku(icount,m,n)==TRUE)
		goto choose;
	r[count][0]=m; r[count][1]=n;
	allot:
	main_matrix[m][n]=1+random(9);
	if(main_matrix[m][n]==0)
		goto allot;
	if(check_all(m,n)==FALSE)
		goto allot;
	}
icount=count;
error=solve_sudoku();
for(i=0;i<9;i++)
	for(j=0;j<9;j++)
		{
		backup_matrix[i][j]=main_matrix[i][j];
		}
row=0; col=0;
for(i=0;i<60;i++)
	{
	r[i][0]=20; r[i][1]=20;
	}
if(error==0)
	goto generate;
for(count=0;count<mode/2;count++)
	{
	choose2:
	m=random(9); n=random(5);
	if(is_fixed_in_sudoku(count,m,n)==1)
		goto choose2;
	r[count][0]=m; r[count][1]=n;
	r[count+mode/2][0]=8-m;
	r[count+mode/2][1]=8-n;
	}
for(m=0;m<9;m++)
	for(n=0;n<9;n++)
		if(is_fixed_in_sudoku(mode,m,n)!=1)
			main_matrix[m][n]=0;
icount=mode;
}
void sudoku::display_mainmatrix_on_grid()
{
char *ita;
hmouse();
for(int i=50,k=0;k<9;i+=33,k++)
		for(int j=100,l=0;l<9;j+=33,l++)
			if(main_matrix[k][l]!=0)
				{
				itoa(main_matrix[k][l],ita,10);
				if(is_fixed_in_sudoku(mode,k,l)==1)
					setcolor(RED);
				else
					setcolor(DARKGRAY);
				outtextxy(i+15,j+15,ita);
				}
smouse();
}
int sudoku::check_all(int x,int y)
{
for(int i=0;i<9;i++)
	if(i!=x&&main_matrix[x][y]==main_matrix[i][y])
			return(FALSE);
for(i=0;i<9;i++)
	if(i!=y&&main_matrix[x][y]==main_matrix[x][i])
			return(FALSE);
for(i=((x/3)*3);i<(((x/3)*3)+3);i++)
	for(int j=((y/3)*3);j<(((y/3)*3)+3);j++)
		if(x!=i&&y!=j&&main_matrix[x][y]==main_matrix[i][j])
				return(FALSE);
return(TRUE);
}

void about()
{
short int b1=150,b2=150,b11=450,b22=250;
void far *buffer=(void far *)0xa000a000l;
hmouse();
getimage(b1,b2,b11,b22,buffer);
	button(b1,b2,b11,b22);
	button_down(b1+2,b2+2,b11-2,b22-2);
	setcolor(colour6);
	setfillstyle(SOLID_FILL,colour5);
	bar(b1+4,b2+4,b11-4,b2+20);
	outtextxy(b1+40,b2+25,"Mega Sudoku - XP");
	outtextxy(b1+40,b2+45,"Proyecto");
	outtextxy(b1+40,b2+65,"Creado por Shibu");
	outtextxy(b1+40,b2+85,"cavr94@hotmail.com");
	smouse();
	delay(5000);
	hmouse();
	putimage(b1,b2,buffer,COPY_PUT);
farfree(buffer);
smouse();
}


void initailise_user_screen()
{
initgr();
mouse();
maxx=getmaxx();maxy=getmaxy();
setbkcolor(BLACK);
setfillstyle(SOLID_FILL,CYAN);
bar(0,0,maxx,maxy);
setcolor(BLACK);
setlinestyle(0,0,3);
rectangle(2,2,maxx-2,maxy-2);
minx=5;miny=5;
maxx=maxx-5;maxy=maxy-5;
setfillstyle(SOLID_FILL,colour5);
bar(minx,miny,maxx,miny+20);
setcolor(WHITE);
outtextxy(minx+10,miny+7,"Super sudoku - XP                                        Unal");
outtextxy(30,450,"Un sede orinoquia");
setcolor(colour6);
setlinestyle(0,0,1);
button(minx+5,miny+25,minx+45,miny+43);outtextxy( minx+10,miny+30,"Abrir");
button(minx+65,miny+25,minx+105,miny+43);outtextxy( minx+70,miny+30,"Guardar");
button(minx+125,miny+25,minx+165,miny+43);outtextxy(minx+130,miny+30,"Salir");
button(minx+245,miny+25,minx+285,miny+43);outtextxy(minx+250,miny+30,"Ayuda");
setcolor(colour3);
line(minx,miny+22,maxx,miny+22);line(minx,miny+45,maxx,miny+45);line(maxx-100,miny+22,maxx-100,miny+45);
setcolor(colour4);
line(minx,miny+23,maxx,miny+23);line(minx,miny+46,maxx,miny+46);
setcolor(BLACK);
outtextxy(maxx-94,miny+27,"Smart");
outtextxy(maxx-49,miny+37,"Logix");
setcolor(YELLOW);
outtextxy(maxx-95,miny+26,"Smart");
outtextxy(maxx-50,miny+36,"Logix");
setcolor(colour3);
line(50,134,350,134);
line(50,167,350,167);
line(50,234,350,234);
line(50,267,350,267);
line(50,334,350,334);
line(50,367,350,367);
line(84,100,84,400);
line(117,100,117,400);
line(184,100,184,400);
line(217,100,217,400);
line(284,100,284,400);
line(317,100,317,400);
setlinestyle(0,0,3);
setcolor(colour3);
rectangle(50,100,350,400);
line(50,200,350,200);
line(50,300,350,300);
line(150,100,150,400);
line(250,100,250,400);
setlinestyle(0,0,1);
line(400,miny+48,400,474);
setcolor(colour4);
line(401,miny+48,401,474);
button(410+15,100,435+15,125);outtextxy(435,110,"1");
button(450+15,100,475+15,125);outtextxy(475,110,"2");
button(490+15,100,515+15,125);outtextxy(515,110,"3");
button(530+15,100,555+15,125);outtextxy(555,110,"4");
button(570+15,100,595+15,125);outtextxy(595,110,"5");
button(410+15,140,435+15,165);outtextxy(435,150,"6");
button(450+15,140,475+15,165);outtextxy(475,150,"7");
button(490+15,140,515+15,165);outtextxy(515,150,"8");
button(530+15,140,555+15,165);outtextxy(555,150,"9");
outtextxy(594,149,"±");
outtextxy(475,210,"Facil");
button_down(570+15,140,595+15,165);
button_down(425,200,610,225);
button(425,235,610,260);
outtextxy(467,245,"Medio");
button(425,270,610,295);
outtextxy(475,280,"Dificil");
button(425,320,610,345);
outtextxy(447,330,"Desafio contra el conputador");
button(425,355,610,380);
outtextxy(455,365,"  Generar nuevo");
button(425,400,610,425);
outtextxy(485,410,"Solucion");
button(560,445,630,470);
outtextxy(577,454,"Pausar");
smouse();
}

void button_man(int x)
{
button_up(425,100,450,125);
button_up(465,100,490,125);
button_up(505,100,530,125);
button_up(545,100,570,125);
button_up(585,100,610,125);
button_up(425,140,450,165);
button_up(465,140,490,165);
button_up(505,140,530,165);
button_up(545,140,570,165);
button_up(585,140,610,165);
current_no=x;
switch(x)
{
case 0:
button_down(585,140,610,165);
break;
case 1:
button_down(425,100,450,125);
break;
case 2:
button_down(465,100,490,125);
break;
case 3:
button_down(505,100,530,125);
break;
case 4:
button_down(545,100,570,125);
break;
case 5:
button_down(585,100,610,125);
break;
case 6:
button_down(425,140,450,165);
break;
case 7:
button_down(465,140,490,165);
break;
case 8:
button_down(505,140,530,165);
break;
case 9:
button_down(545,140,570,165);
break;
}
}

void congragulate()
{
main_matrix[8][8]=0;
decision_box(150,150,450,250,"Felicitaciones, ¿Jugar otro?");
}

void main_loop()
{
time_t t,t1,t2,t4;
short int status=0,status1=0,status2=0,status3=0,game_finish=0,t3,paused=0;
short int k,l,i,j;
char *ita;
sudoku s;
randomize();
s.generate_sudoku();
s.display_mainmatrix_on_grid();
t=t1=time(NULL);
while(1)
	{
	gmouse();
	//Show Timer
	if(current_mode==2&&difftime(time(NULL),t)>=1)
		{
		setfillstyle(SOLID_FILL,CYAN);
		hmouse();
		bar(430,450,558,470);
		t2=difftime(t=time(NULL),t1);
		t3=t2;
		ltoa(t2/3600,ita,10);
		if(paused==0)
			{
			setcolor(RED);
			settextstyle(0,0,2);
			outtextxy(440,452,ita);
			outtextxy(465,452,":");
			ltoa(t2/60,ita,10);
			outtextxy(478,452,ita);
			outtextxy(505,452,":");
			itoa(t3%60,ita,10);
			outtextxy(518,452,ita);
			settextstyle(0,0,1);
			setcolor(BLACK);
			outtextxy(31,451,"Un Sede orinoquia");
			setcolor(t3%60);
			outtextxy(30,450,"Un Sede orinoquia");
			}
		if(x1>560&&y1>445&&x1<630&&y1<470&&click==1)
			{
			if(paused==0)
				{
				button_down(560,445,630,470);
				setfillstyle(SOLID_FILL,colour1);
				hmouse();
				for(i=50,k=0;i<=317;i+=33,k++)
				for(j=100,l=0;j<=367;j+=33,l++)
					{
					bar(i+5,j+5,i+25,j+25);
					}
				smouse();
				paused=1;
				t4=t2;
				setcolor(RED);
				settextstyle(0,0,2);
				outtextxy(110,70,"Juego pausado");
				settextstyle(0,0,0);
				}
			else
				{
				setcolor(CYAN);
				settextstyle(0,0,2);
				outtextxy(110,70,"Juego pausado");
				settextstyle(0,0,0);
				button_up(560,445,630,470);
				t1=difftime(t=time(NULL),t4);
				paused=0;
				s.display_mainmatrix_on_grid();
				}
			}
		smouse();
		}
	//Complete Sudoku
	for(i=0;i<9;i++)
		for(j=0;j<9;j++)
			if(main_matrix[i][j]==backup_matrix[i][j]&&main_matrix[i][j]!=0)
				game_finish++;
	if(game_finish==81&&current_mode==2)
		{
		game_finish=0;
		congragulate();
		paused=1;
		}
	else
		game_finish=0;
	//main menu
	if(x1>minx+125&&y1>miny+25&&x1<minx+165&&y1<miny+43)
		{
		if(button_manage(minx+125,miny+25,minx+165,miny+43,status1)==1)
			{
			if(decision_box(150,150,450,250,"¿Seguro que quieres salir?")==1)
				{
				closegraph();
				exit(0);
				}
			}
		}
	else if(x1>minx+245&&y1>miny+25&&x1<minx+285&&y1<miny+43)
		{
			if(button_manage(minx+245,miny+25,minx+285,miny+43,status1)==1)
			{
			about();
			}
		}
	else if(x1>minx+5&&y1>miny+25&&x1<minx+45&&y1<miny+43)
		{
		if(button_manage(minx+5,miny+25,minx+45,miny+43,status1)==1)
			{
			if(decision_box(150,150,450,250,"Perderas los sudokus no guardados")==1)
				{
				if(browser("*.sud")==1)
					{
					for(i=0;i<9;i++)
					for(j=0;j<9;j++)
						main_matrix[i][j]=getw(infile);
					for(i=0;i<9;i++)
					for(j=0;j<9;j++)
						backup_matrix[i][j]=getw(infile);
					for(i=0;i<60;i++)
					for(j=0;j<2;j++)
						r[i][j]=getw(infile);
					current_no=getw(infile);
					current_diff=getw(infile);
					current_mode=getw(infile);
					t4=((getw(infile)*10000)+getw(infile));
					fclose(infile);
					hmouse();
					setfillstyle(SOLID_FILL,colour1);
					for(i=50;i<=317;i+=33)
						for(j=100;j<=367;j+=33)
							bar(i+5,j+5,i+25,j+25);
					smouse();
					switch(current_diff)
						{
						case 1:
						mode=35+random(2);
						break;
						case 2:
						mode=30+random(2);
						break;
						case 3:
						mode=25+random(4);
						break;
						default:
						mode=35+random(2);
						break;
						}
					t1=difftime(t=time(NULL),t4);
					s.display_mainmatrix_on_grid();
					delay(1000);
					click=0;
					}
				}
			}
		}
	else if(x1>425&&y1>400&&x1<610&&y1<425)
		{
		if(button_manage(425,400,610,425,status1)==1)
			{
			if(decision_box(200,150,500,250,"Presiona si para ver la solucion")==1)
				{
				hmouse();
				if(current_mode==2)
					{
					for(i=0;i<9;i++)
						for(j=0;j<9;j++)
							{
							if(backup_matrix[i][j]!=0)
								main_matrix[i][j]=backup_matrix[i][j];
							backup_matrix[i][j]=0;
							}
					setfillstyle(SOLID_FILL,colour1);
					for(k=0,i=50;i<=317;i+=33,k++)
						for(j=100,l=0;j<=367;j+=33,l++)
							bar(i+5,j+5,i+25,j+25);
					}
				else
					{
					setfillstyle(SOLID_FILL,colour1);
					for(k=0,i=50;i<=317;i+=33,k++)
						for(j=100,l=0;j<=367;j+=33,l++)
							bar(i+5,j+5,i+25,j+25);
					icount=input_count;
					input_count=0;
					for(i=0;i<9;i++)
						for(j=0;j<9;j++)
							{
							if(main_matrix[i][j]!=0&&backup_matrix[i][j]!=0)
								{
								r[input_count][0]=i;
								r[input_count][1]=j;
								input_count++;
								}
							}

					s.solve_sudoku();
					for(i=0;i<9;i++)
						for(j=0;j<9;j++)
							backup_matrix[i][j]=0;
					}
				s.display_mainmatrix_on_grid();
				smouse();
				}
			}
		}
	else if(x1>minx+65&&y1>miny+25&&x1<minx+105&&y1<miny+43)
		{
		if(button_manage(minx+65,miny+25,minx+105,miny+43,status1)==1)
			{
			cmouse(0);
			if(save_file(".sud")==1)
				{
				for(i=0;i<9;i++)
				for(j=0;j<9;j++)
					putw(main_matrix[i][j],outfile);
				for(i=0;i<9;i++)
				for(j=0;j<9;j++)
					putw(backup_matrix[i][j],outfile);
				for(i=0;i<60;i++)
				for(j=0;j<2;j++)
					putw(r[i][j],outfile);
				putw(current_no,outfile);
				putw(current_diff,outfile);
				putw(current_mode,outfile);
				t3=t2;
				putw(t3/10000,outfile);
				putw(t3%10000,outfile);
				fclose(outfile);
				}
			}
		}
	else
		{
		if(status1==2||status1==1)
			{
			status1=0;
			cmouse(0);
			button_up(minx+65,miny+25,minx+105,miny+43);
			button_up(minx+125,miny+25,minx+165,miny+43);
			button_up(minx+245,miny+25,minx+285,miny+43);
			button_up(minx+5,miny+25,minx+45,miny+43);
			button_up(425,400,610,425);
			button_up(425,400,610,425);
			}
		}
	//play grid
	for(i=50,k=0;i<=317;i+=33,k++)
		for(j=100,l=0;j<=367;j+=33,l++)
		{
		if(x1>i&&y1>j&&x1<i+33&&y1<j+34&&click==1)
			{
			hmouse();
			if(s.is_fixed_in_sudoku(60,k,l)==0)
				{
				setcolor(DARKGRAY);
				if(current_mode==2)
						main_matrix[k][l]=current_no;
				setfillstyle(SOLID_FILL,colour1);
				bar(i+5,j+5,i+25,j+25);
					if(current_no!=0)
					{
					itoa(current_no,ita,10);
					outtextxy(i+15,j+15,ita);
					}
				}
			if(current_mode==1)
				{
				if(current_no!=0&&main_matrix[k][l]!=current_no)
					{
					input_count++;
					main_matrix[k][l]=current_no;
					itoa(current_no,ita,10);
					outtextxy(i+15,j+15,ita);
					}
				else if(main_matrix[k][l]!=current_no&&current_no==0)
					{
					if(input_count>0)
						input_count--;
					main_matrix[k][l]=0;
					}
				}
			smouse();
			}
		}
	//Play mode pad
	if(x1>425&&y1>320&&x1<610&&y1<345&&current_mode!=1)
		{
		if(button_manage(425,320,610,345,status3)==1)
			{
			hmouse();
			for(i=50;i<=317;i+=33)
			for(j=100;j<=367;j+=33)
				{
				setfillstyle(SOLID_FILL,colour1);
				bar(i+5,j+5,i+25,j+25);
				}
			for(i=0;i<60;i++)
				{
				r[i][0]=20;
				r[i][1]=20;
				}
			for(i=0;i<9;i++)
			for(j=0;j<9;j++)
				{
				main_matrix[i][j]=0;
				backup_matrix[i][j]=0;
				}
			current_mode=1;
			current_diff=4;
			button_up(425,200,610,225);
			button_up(425,235,610,260);
			button_up(425,270,610,295);
			button_down(425,320,610,345);
			button(425,355,610,380);
			outtextxy(455,365,"Retarme a mi mismo");
			input_count=0;
			icount=0;
			smouse();
			}
		}
	else if(x1>425&&y1>355&&x1<610&&y1<380)
		{
		if(button_manage(425,355,610,380,status3)==1)//&&current_mode!=2
			{
			hmouse();
			setfillstyle(SOLID_FILL,colour1);
			for(i=50;i<=317;i+=33)
				for(j=100;j<=367;j+=33)
					bar(i+5,j+5,i+25,j+25);
			button(425,355,610,380);
			outtextxy(455,365,"  Generar nuevo");
			button_up(425,320,610,345);
			for(i=0;i<9;i++)
			for(j=0;j<9;j++)
				{
				backup_matrix[i][j]=0;
				}
			input_count=0;
			icount=0;
			smouse();
			s.generate_sudoku();
			t=t1=time(NULL);
			current_mode=2;
			if(current_diff==4)
				{
				button_down(425,200,610,225);
				current_diff=1;
				}
			s.display_mainmatrix_on_grid();
			}
		}
	else
		{
		if(status3==2||status3==1)
			{
			status3=0;
			cmouse(0);
			if(current_mode!=1)button_up(425,320,610,345);
			button_up(425,355,610,380); //if(current_mode!=2)
			}
		}
	//Difficulty selection pad
	if(x1>425&&y1>200&&x1<610&&y1<225&&current_diff!=1&&current_mode==2)
		{
		if(button_manage(425,200,610,225,status2)==1)
			{
			current_diff=1;
			button_down(425,200,610,225);
			button_up(425,235,610,260);
			button_up(425,270,610,295);
			}
		}
	else if(x1>425&&y1>235&&x1<610&&y1<260&&current_diff!=2&&current_mode==2)
		{
			if(button_manage(425,235,610,260,status2)==1)
			{
			current_diff=2;
			button_down(425,235,610,260);
			button_up(425,200,610,225);
			button_up(425,270,610,295);
			}
		}
	else if(x1>425&&y1>270&&x1<610&&y1<295&&current_diff!=3&&current_mode==2)
		{
			if(button_manage(425,270,610,295,status2)==1)
			{
			current_diff=3;
			button_down(425,270,610,295);
			button_up(425,200,610,225);
			button_up(425,235,610,260);
			}
		}
	else
		{
		if(status2==2||status2==1)
			{
			status2=0;
			cmouse(0);
			if(current_diff!=1)button_up(425,200,610,225);
			if(current_diff!=2)button_up(425,235,610,260);
			if(current_diff!=3)button_up(425,270,610,295);
			}
		}
	//key pad
	if(x1>410+15&&y1>100&&x1<435+15&&y1<125&&current_no!=1)
		{
		if(button_manage(410+15,100,435+15,125,status)==1)
			{
			button_man(1);
			}
		}
	else if(x1>450+15&&y1>100&&x1<475+15&&y1<125&&current_no!=2)
		{
		if(button_manage(450+15,100,475+15,125,status)==1)
			{
			button_man(2);
			}
		}
	else if(x1>490+15&&y1>100&&x1<515+15&&y1<125&&current_no!=3)
		{
		if(button_manage(490+15,100,515+15,125,status)==1)
			{
			button_man(3);
			}
		}
	else if(x1>530+15&&y1>100&&x1<555+15&&y1<125&&current_no!=4)
		{
		if(button_manage(530+15,100,555+15,125,status)==1)
			{
			button_man(4);
			}
		}
	else if(x1>570+15&&y1>100&&x1<595+15&&y1<125&&current_no!=5)
		{
		if(button_manage(570+15,100,595+15,125,status)==1)
			{
			button_man(5);
			}
		}
	else if(x1>410+15&&y1>140&&x1<435+15&&y1<165&&current_no!=6)
		{
		if(button_manage(410+15,140,435+15,165,status)==1)
			{
			button_man(6);
			}
		}
	else if(x1>450+15&&y1>140&&x1<475+15&&y1<165&&current_no!=7)
		{
		if(button_manage(450+15,140,475+15,165,status)==1)
			{
			button_man(7);
			}
		}
	else if(x1>490+15&&y1>140&&x1<515+15&&y1<165&&current_no!=8)
		{
		if(button_manage(490+15,140,515+15,165,status)==1)
			{
			button_man(8);
			}
		}
	else if(x1>530+15&&y1>140&&x1<555+15&&y1<165&&current_no!=9)
		{
		if(button_manage(530+15,140,555+15,165,status)==1)
			{
			button_man(9);
			}
		}
	else if(x1>570+15&&y1>140&&x1<595+15&&y1<165&&current_no!=0)
		{
		if(button_manage(570+15,140,595+15,165,status)==1)
			{
			button_man(0);
			}
		}
	else
		{
		if(status==2||status==1)
			{
			status=0;
			cmouse(0);
			button_man(current_no);
			}
		}
	}
}

void main()
{
initailise_user_screen();
main_loop();
}

Avatar de Usuario
untio
Mensajes: 389
Registrado: 17/09/2008 9:35 am
Ubicación: Provincia de Almería
Contactar:

#2 Mensaje por untio » 13/06/2012 3:54 am

Hola,

La librería graphics.h era del antiguo compilador de Borland para msdos.

Hace un tiempo se podía descargar gratis de una especie de museo que tenían, pero cambiaron el nombre de la empresa y no sé si se podrá seguir haciendo. No obstante, esa librería era para ms-dos. Desde luego con devcpp no creo que puedas hacer funcionar ese programa.

Perdóname si estoy equivocado.

Responder

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 1 invitado