Professional Documents
Culture Documents
Ingeniera en Comunicaciones y
Electrnica
Alumna:
Materia:
Profesora:
Apuntes de la Materia
[Fecha] 1
UNIDAD 13-35
UNIDAD 2.36-46
UNIDAD3..47-54
PROYECTOS.55-81
Proyectos.15-20
- Grficos
- Pacman
- Tablero.
Unidad 120-35
- Pr1
- Pr2
- Pr3
- Pr3_1
- Pr4
- Pr4_1
- Pr5
- Pr6
- Pr7
- Pr7_1
- Pr8
[Fecha] 2
APUNTES.
De nuestra carpeta de extras este
programa nos muestra el codigo Este programa nos muestra la tecla al
aski. oprimirla.
#include<stdio.h>
#include<stdio.h> #include<conio2.h>
#include<conio2.h> int
int main()
main()
{
{ char t;
}
getch();
return(0);
[Fecha] 3
setbkcolor(CYAN);
#include<stdio.h> setcolor(BLUE);
#include<conio2.h>
//rectangle(350,150,220);
setfillstyle(1,YELLOW);
pieslice(370,210,0,360,5);
pieslice(380,210,0,360,5);
pieslice(350,280,0,360,5);
pieslice(375,280,0,360,9);
getch(); closegraph( );
[Fecha] 4
return( 0 );
De la
Realizacion de un fantasmita.
{ }
#include <iostream>
#include <graphics.h>
[Fecha] 5
putpixel(400,300,YELLOW); putpixel(40,30,RED); initwindow( 800 , 600 , "figuras"
); setbkcolor(CYAN);
line(150,150,150,350);//horizontal.
cleardevice(); setcolor(RED);
setfillstyle(1, YELLOW);
setcolor(LIGHTCYAN); bar(50,50,750,550);
line(150,150,500,150);//vertical setcolor(BLUE); rectangle(50,50,750,550);
setcolor(RED);
line(150,150,150,150);//HORIZONTAL. //circle(400,300,50);
// setcolor(YELLOW);
setcolor(BLACK); line(150,150,500,350);//EN
DIAGONAL.
setcolor(CYAN);
circle(400,300,30);
pieslice(400,300,30,360,30);//PACMAN a la de derecha.
getch();
pieslice(300,300,210,150,30);//PACMAN a
la izquierda
return( 0 );
pieslice(350,200,120,60,30);//PACMAN
} hacia ariba.
pieslice(350,400,300,240,30);//PACMAN hacia abajo. using namespace std;
// imprimir texto en graficos.
int main( )
//moveto(200,100);
{ int x,y,color=1;
setcolor(WHITE);
[Fecha] 6
initwindow( 800 , 600 , "WinBGIm" );
settextstyle(5,0,3)
srand(time(NULL)); while(!kbhit())
outtextxy(200,100)
"programa que muestre el uso de {
graficos en c++");
x=rand()%800; y=rand()%600;
getch()
return( 0 ); setcolor(color++);
}
if(color==15) color=1;
circle(x,y,30);
rectangle(x,y,x+100,y+100);
delay(10); }
}}
} }
#include <iostream>
#include <graphics.h>
[Fecha] 7
#include<stdlib.h> //cstdlib>
Este programa realiza Men con fondo de setcolor(CYAN); // selecciono el mismo color pantalla con
color y figuras apareciendo, usando de fondo para simular el borrado
while y funcin(es) de usuario, Tablero de ajedrez
#include <graphics.h>
do{
#include<stdlib.h> //<cstdlib>
;
void figuras(void) circle(x,y,r);
{ int x,y,color=1;
r-=10;
srand(time(NULL)); //inicializar numeros delay(100); aleatorios
} while(r<300); while(!kbhit())//
espera una tecla (hara el
aleatoria hasta que el usuario presiona una tecla) }
[Fecha] 8
} {
} for(i=1;i<5;i++)
} while(r<300);
}
getch();
}
int main( ) default: outtextxy(250,300,"opcion no
valida");
{
getch();
char resp;
break;
initwindow( 800 , 600 , "figuras aleatorias"
); }
} while(resp!='4');
//circulos(); //tablero();
//figuras(); //getch();
}}
settextstyle(3,0,5);
outtextxy(200,100,"1.Figuras."); outtextxy(200,150,"2.circulos.");
outtextxy(200,200,"3.tablero.");
[Fecha] 9
outtextxy(200,250,"4.salir.");
resp=getch();
cleardevice();
switch(resp)
break;
break;
break;
De la carpeta repaso.
getch();
using namespace std;
return 0;
// variables globales
[Fecha] 1
0
}}
int main()
{//variables locales
x=10;
printf("dame un caracter");
scanf("%c",&car);
cin>>car;
printf("dame un entero");
scanf("%d",&dato);
b.h> using
[Fecha] 1
1
namespace std; //variables //pedir un dato flotante con cin
vectores;
locales cin>>vectores;
scanf("%lf",&vectores);
suma=234.34;//darle valor a la variable suma
printf("dame un entero");
entero"<<endl; cin>>y;
[Fecha] 1
2
P.r3: Este programa realiza la suma
de variables.
#include<stdlib.h>
#include<stdio.h>
#include<iostream> #include<conio.h>
char car;
getch(); return 0;
[Fecha] 1
3
}
getch();
}
cout<<"2 Semestre";
gotoxy(23,12);//colocar el cursor de la
posicion x,y.
Pr5: imprime o muestra una portada
usando colores. textcolor(RED);
textcolor(RED);
int main() getch(); return
{ 0;
clrscr();
gotoxy(20,5);//colocar el curso de la posicion
x,y.
textcolor(RED);
gotoxy(17,10);//colocar el cursor de la
posicion x,y.
[Fecha] 1
4
cout<<"Programacion Orientada a Objetos";
gotoxy(19,9);//colocar el cursor de la
posicion } x,y.
textcolor(RED);
#include<iostream>
}}
#include<conio2.h> #include<stdio.h> using namespace std; void portada (void)
clrscr ( );
textcolor(RED); }
#include<conio2.h> textcolor(GREEN);
using namespace std; gotoxy
(10,10); //coloca el cursor en la
pantalla int main()
[Fecha] 1
5
Mecanica y Electrica"; for(x=1;x<=10;x++)
textcolor(BLUE);
cout<<"\nabyceci\t";
gotoxy (15,15); //coloca el cursor en la
pantalla
textcolor(YELLOW); getch();
while(x<=10)
} do
cout<<"\npresione una tecla para continuar\t"; {
getch(); getch();
do{cout<<"\n\naby\t"; clrscr();
x++; switch(f)
} gotoxy(x,y--
);
cout<<"*";
break;
case 80: gotoxy(x,y++); cout<<"*";
break;
case 77:
[Fecha] 1
6
Pr8: Programa realizando casos para
gotoxy(x++,y); imprimir asteriscos.
cout<<"*";
#include<iostream>
break;
#include<conio2.h>
bar(105,30,205,300);
}
rectangle(105,30,205,300);
Carpeta proyectos.
outtextxy(115,40,"edi");line(105,60,205,60); Graficos:
Este programa realiza el men de la
computadora, con colores. f=2;
rectangle(515,30,705,300);
int f;
outtextxy(530,40,"ayuda");line(515,120,705,120);
initwindow( 800 , 600 , "menu grafico" );
[Fecha] 1
7
f=3;
do{
break;
setbkcolor(LIGHTMAGENTA);
case 3: //ultimo no se puede.
cleardevice();
bar(515,30,705,300);
setfillstyle(1,LIGHTBLUE);//COLOR DE
TEXTO rectangle(515,30,705,300);
bar(0,0,800,30);
outtextxy(530,40,"ayuda");line(515,120,705,120);
setcolor(BLACK);
f=3;
setbkcolor(LIGHTBLUE);
break;
outtextxy(10,10,"Archivo");line(10,25,20,25
); }
//ixquierda
outtextxy(110,10,"Edicion");line(110,25,120,25);
case 75: switch(f)
switch(r) rectangle(5,30,205,300);
{//flecha derecha.
outtextxy(50,40,"nuevo");line(5,60,205,60);
f=1; f=2; break; break;
outtextxy(530,40,"ayuda");line(515,120,705,120);
outtextxy(50,40,"nuevo");line(5,60,205,60);
[Fecha] 1
8
f=3;
break;
}getch();
f=1; break; }while(r!=ESC);
case 3: //ultimo no se puede. getch();
bar(105,30,205,300);
rectangle(105,30,205,300); closegraph
( );
outtextxy(115,40,"edi");line(105,60,205,60);
return( 0 );
f=2;
break; }}
}
break; case'a':
case'A':bar(5,30,205,300);
[Fecha] 1
9
rectangle(5,30,205,300);
outtextxy(50,40,"nuevo");line(5,60,205,60);
f=1;
break;
case'e':
case'E':bar(105,30,205,300);
rectangle(105,30,205,300);
outtextxy(115,40,"edi");line(105,60,205,60);
setcolor(WHITE); //fantasma(200,200,RED);
pieslice(x+15,y+10,0,360,6);//oj
[Fecha] 2
0
//fantasma(400,350,GREEN); delay(100); cleardevice();
setcolor(YELLOW);
setfillstyle(1,YELLOW);
switch(f)
pieslice(xp,yp,30,330,30);//pacm
an a la {
derecha
//flecha arriba
do{
setcolor(RED); case 72:
fantasma(200,200,RED);
if (yp>30)
fantasma(400,350,GREEN);setfillstyle(1, pieslice(xp,yp-=10,120,60,30);//pacman
YELLOW);
hacia arriba
getch();
else
f=getch();
pieslice(xp,yp,120,60,30);
cleardevice();
break;
pieslice(xp,yp,0,3
//flecha abajo case 80:
60,30);
if(yp<570)
pieslice(xp,yp+=10,300,240,30);//pacman hacia
abajo
else
pieslice(xp,yp,120,60,30);
break;
[Fecha] 2
1
pieslice(xp+=30,yp,30,330,30);//pacman a
#include <stdio.h>
la derecha
else #include <iostream>
pieslice(xp,yp,120,60,30); #include<stdlib.h>
} {
while(f!=27) x=rand()%800;
closegraph( ); y=rand()%600;
return( 0 ); setcolor(color);
} if(color==15) color=1;
circle(x,y,30);
rectangle(x,y,x+100,y+100);
//putpixel(x,y,color);
delay(1);//retardo en milisegundos
[Fecha] 2
2
} { //x=100+x;
//while(!kbhit()); //y=100;
} for(i=1;i<5;i++)
void circulos(void)
bar(x+=100,y,x+50,y+50);
{
y+=50; if(x==500) x=150;
int x=400,y=300,color=1,r=30;
if(x==550) x=100;
do{
}
setcolor(color++);
getch();
if(color==15) color=1;
}
circle(x,y,r+=10);
setfillstyle(1,YELLOW); tablero.");
x=100; y=100;
bar(x+50,y,x+450,y+350); outtextxy(200,250,"4. Salir.");
setfillstyle(1,RED);
for(j=1;j<8;j++)
[Fecha] 2
3
outtextxy(150,300,"Elije una
Opcion"); resp=getch();
cleardevice(); switch(resp)
[Fecha] 2
4
case '1':figuras(); break;
defaul:outtextxy(250,300,"opcion no
valida");
getch(); break;
} while(resp!='4');
getch();
Este programa realiza funciones
de usuario.
closegraph(); Pr1
} #include<iostream>
char m[30];
[Fecha] 2
5
};
{ fecha aux;
cout<<"dia:";
cumple=pidefecha(); muestrafecha(cumple);
cin>>aux.d; hoy=pidefecha(); muestrafecha(hoy);
cout<<"mes;"; getch(); return(0);
cin>>aux.m;
}
cout<<"ano:"; Pr2: Utilizamos matrices y funciones de
cin>>aux.a; return usuario para direccionesy telfono etc.
(aux); #include<iostream>
#include<conio2.h>
}
using namespace std;
void muestrafecha (fecha f)
struct fecha {int d,a;
{
char name[50],dir[80],tel[30],email[50];
cout<<"la fecha es \n\n"
int edad;
<<"\ndia:"<<f.d
};
<<"\n\nmes:"<<f.m
void pidedatos (void) { datos
<<"\nAno:"<<f.a;
auxDatos; char l;
// cout<<"la fecha es \n\n"
cout<<"dame Nombre";
//<<f.d<<"\"
cin.get(auxDatos.name,50);
}
cout<<"dame Direccion";
{ fecha cumple,hoy; cout<<"dame una
fecha de cumpleaos\n";
[Fecha] 2
6
cin.get(l); getch();
cin.get(auxDatos.dir,80); return(0)
cout<<"dame Telefono";
}
cin.get(l);
cin.get(auxDatos.tel,30); }
cout<<"dame e-mail"; Pr3: Este programa retorna y manda
los datos.
cin.get(l);
#include<iostream>
cin.get(auxDatos.email,50);
#include<conio2.h>
cout<<"dame edad";
using namespace
cin>>auxdatos.edad;
std; struct fecha {int
return(auxdatos);
d,a; char m[30];
}
};
void muestradatos(datos A)
struct datos
{
{
out<<"dame Nombre"<<auxdatos.name;
char name[50],dir[80],tel[30],email[50];
cout<<" Direccion"<<auxdatos.dir;
int edad; fecha cumple;
cout<<"Telefono"<<auxdatos.tel;
};
cout<<" e-mail"<<auxdatos.email;
fecha pidefecha (void) { fecha
cout<<" edad"<<auxedad.edad;
aux;
cin>>auxdatos.edad;
cout<<"dia:"; cin>>aux.d;
int main()
cout<<"mes;"; cin>>aux.m;
datos A;
cout<<"Ao:"; cin>>aux.a;
A=pidedatos;
return (aux);
muestradatos(A)
[Fecha] 2
7
} cout<<"\nmes"; cin>>auxDatos.cumple.m;
<<"\ndia:"<<f.d return(auxDatos);
<<"\n\nmes:"<<f.m }
edad"<<A.edad; cout<<"dame
cout<<"dame Nombre";
cin.get(auxDatos.name,50); Nombre"<<A.name; cout<<"FECHA
Direccion"; muestrafecha(A.cumple);
cin.get(l);
cin.get(auxDatos.dir,80); cout<<"dame }
{
cin.get(l); cin.get(auxDatos.tel,30);
datos A;
cout<<"dame e-mail";
A=pidedatos();
cin.get(l); muestradatos(A);
cin.get(auxDatos.email,50); cout<<"dame
getch();
edad"; // cin>>auxdatos.edad;
return(0)
cout<<"dame fecha de nacimiento:\n";
cout<<"dia"; cin>>auxDatos.cumple.d; }
[Fecha] 2
8
Pr3_1:Este programa pide datos <<"\n\nmes:"<<f.m
con struct.
<<"\nAo:"<<f.a;
#include<iostream>
// cout<<"la fecha es \n\n"
#include<conio2.h>
//<<f.d<<"\"
using namespace std;
}
struct fecha {int d,a;
void pide (void) { datos auxDatos;
char m[30];
char l;
};
{ cin.get(auxDatos.name,50);
char name[50],dir[80],tel[30],email[50];
// ffluss(stdin);
int edad; fecha cumple; cout<<"dame Direccion";
cin.get(l);
};
fecha pidefecha (void) { fecha aux; cin.get(auxDatos.dir,80);
cout<<"dame Telefono";
//cout<<"dame una fecha\n";
return (aux);
cin.get(l);
} cin.get(auxDatos.email,50);
cin>>auxdatos.edad; cout<<"dame
{
fecha de nacimiento:\n"; cout<<"dia";
cout<<"la fecha es \n\n"
cin>>auxDatos.cumple.d;
<<"\ndia:"<<f.d
[Fecha] 2
9
cout<<"\nmes";
cin>>auxDatos.cumple.m; #include<iostream>
} { int d,a;
void muestradatos(datos A)
char m[30];
{
};
cout<<" Direccion"<<A.dir;
cout<<"Telefono"<<A.tel; cout<<"
struct datos
e-mail"<<A.email; cout<<"
edad"<<A.edad;
{ char name[50],dir[80],tel[30],email[50];
cin>>auxdatos.edad; int edad; fecha Nac; void
cout<<"Mes:";cin>>Nac.m;
} cout<<"Ao:";cin>>Nac.a;
getch(); }
{
}
char l;
Pr4: Programa que usa dos struct con
funciones de usuario cout<<"Dame Nombre:";
[Fecha] 3
0
cin.get(name,50); cout<<"Dame cout<<"Dame Email:"; cin.get(l);//l es para
cout<<"\nDia:"; getch();
cin>>auxDatos.cumple.d;
return 0;
cout<<"\nmes:";
}
cin>>auxDatos.cumple.m;
cout<<"\nanio:";
cin>>auxDatos.cumple.a; */
clrscr();
[Fecha] 3
1
cout<<"Nombre:"<<name; void pideDatos (void);
cout<<"/"<<A.cumple.m; }; fecha /*
datos A; cout<<"Mes:";cin>>Nac.m;
struct datos
A.pideDatos(); cout<<"\nanio:";
A.muestraDatos(); cout<<"Ao:";cin>>Nac.a;
{ char name[50],dir[80],tel[30],email[50];
cin>>auxDatos.cumple.a; */
int edad;
fecha Nac; } }
void pideFecha (void);
void datos::muestraFecha(void)
void datos:: muestraDatos (void)
cin.get(email,50); void {
cout<<Nac.d<<"/"<<Nac.m<<"/"<<Na
muestraFecha (void); c.a; {
} clrscr();
cout<<"Dame Edad:";
[Fecha] 3
2
void datos::pideDatos(void) cin.get(l);//l es para limpiar buffer
cout<<"Nombre:"<<name; de teclado muestraFecha();
{ cout<<"\nDireccion:"<<dir; cin.get(dir,80);
{ };
datos A;
name[50],dir[80],tel[30],email[50];
getch();
[Fecha] 3
3
cout<<"\nFecha de nacimiento:"; cin>>auxDatos.cumple.m; cout<<"\nanio:";
cout<<"Dia:";cin>>Nac.d; cin>>auxDatos.cumple.a; */
cout<<"Mes:";cin>>Nac.m;
}
cout<<"Ao:";cin>>Nac.a;
void datos:: muestraDatos (void)
} { clrscr();
void datos::muestraFecha(void)
cout<<"Nombre:"<<name;
{ cout<<Nac.d<<"/"<<Nac.m<<"/"<<Nac.a;
cout<<"\nDireccion:"<<dir; cout<<"\nDame
}
Telefono:" <<tel; cout<<"\nDame
void datos::pideDatos(void)
Email:"<<email; cout<<"\nDame
{
Edad:"<<edad; cout<<"\nFecha de
char l;
nacimiento:"; muestraFecha();
cout<<"Dame Nombre:";
cin.get(name,50); cout<<"Dame
/*cout<<A.cumple.d; cout<<"/"<<A.cumple.m;
Direccion:"; cin.get(l);//l es para limpiar
cout<<"/"<<A.cumple.a;*/
buffer de teclado cin.get(dir,80);
[Fecha] 3
4
}
void pideFecha (void);
Pr6: //Programa que usa CLASS y
realiza un men. void muestraFecha (int i); public:
fecha cout<<"Dia:";cin>>Agenda[cont].Nac.d;
cout<<"Mes:";cin>>Agenda[cont].Nac.m;
{
cout<<"Ao:";cin>>Agenda[cont].Nac.a;
int d,a;
char }
{
};
cin.get(Agenda[cont].dir,80);
{ cin.get(Agenda[cont].tel,30);
[Fecha] 3
5
cont++; //contador se mueve ala siguiente vacia.
caja
/*
cout<<"\nDia:"; }
cin>>auxDatos.cumple.d; }
cout<<"\nmes:"; }
cout<<Agenda[i].Nac.d<<"/"<<Agenda[i].Nac.m<< cin>>auxDatos.cumple.m;
"/"<<Agenda[i].Nac.a; cout<<"\nanio:";
//espara la segunda caja.
cin>>auxDatos.cumple.a; */
}
}
void datos::pideDatos(void)
void datos:: muestraDatos (void)
{
{clrscr();
char l;
int i;
//esto es para despues de la segunda caja
if(cont>0)
if(cont>0)
cin.get(l);
{ for(i=0;i<cont;i++)
cout<<"\nDame Nombre:";
{ cout<<"Nombre:"<<Agenda[i].name;
cin.get(Agenda[cont].name,50);
cout<<"\nDireccion:"<<Agenda[i].dir;
cout<<"\nDame Direccion:";
cout<<"\nDame Telefono:" <<Agenda[i].tel;
cin.get(l);//l es para limpiar buffer de teclado
cout<<"\nDame Email:"<<Agenda[i].email;
cout<<"\nDame Edad:"<<Agenda[i].edad; int main() {
clrscr();
getch();
[Fecha] 3
6
cout<<"1.introduce\n"; using namespace std;
cout<<"3.salir\n"; cout<<"Elige
{ int r,i;
una opcion\n"; r=getch();
};
switch(r) {case'1':A.pideDatos();
complejo pedir (void) {
break; complejo aux;
case'2':A.muestraDatos(); cout<<"\nreal:";
break; cin>>aux.r;
cout<<"opcion no valida.....";
cin>>aux.i;
} return (aux);
}while(r!='3');
}
getch(); return 0;
void mostrar (complejo x)
}
{ if(x.i>0) //para verificar o validar el signo del
numero
cout<<x.r<<"+"<<x.i<<"i"<<endl;
else
cout<<x.r<<x.i<<"i"<<endl;
return (aux);
#include<iostream>
#include<conio2.h> }
[Fecha] 3
7
int main() { complejo A,B,C; void pedir (void); void mostrar
complejo B);
A=pedir(); cout<<"dame complejo
A="; };
void complejo::pedir(void)
B=pedir(); C=suma(A,B);
{ complejo aux;
clrscr(); cout<<"\nreal:";
cout<<"A="; mostrar(A);
cin>>r;
cout<<"B="; mostrar(B);
cout<<"\nimag:";
cout<<"la suma es C=";
}
}
// clase struct
#include<iostream>
#include<conio2.h>
struct complejo
{ int r,i;
[Fecha] 3
8
if(i>0) //para verificar o validar el signo del Pr7_2: suma de nmeros
complejos
numero con un auxiliar utilizando class
cout<<r<<"+"<<i<<"i"<<endl; // clase struct };
else #include<iostream>
#include<conio2.h> using
cout<<r<<i<<"i"<<endl;
namespace std;
}
void complejo:: suma (complejo A, complejo B) class complejo
{ void complejo::pedir(void)
cout<<"\nreal:"; cin>>r;
//return (aux);
} cout<<"\nimag:";
complejo A=";
}
A.pedir();
void complejo:: mostrar (void )
cout<<"\ndame complejo B=";
{
B.pedir(); C.suma(A,B);
if(i>0) //para verificar o validar el signo del
system("cls"); cout<<"\nA="; numero
A.mostrar(); cout<<"\nB="; cout<<r<<"+"<<i<<"i"<<endl;
B.mostrar(); cout<<"\nla suma es C="; else
C.mostrar(); getch(); return 0; cout<<r<<i<<"i"<<endl;
} }
{ int r,i;
public:
complejo B);
[Fecha] 3
9
r=A.r+B.r; using namespace std; cout<<"\nla suma es C="; { case
cout<<"\n1.voltaje";
C.suma(A,B);
cout<<"\nDame voltaje:";
cout<<"\n2.resistencia"
cin>>v;
; system("cls");
Pr8:Este programa realiza la
cout<<"\n3.corriente"; ley de cout<<"\nDame
corriente:"; ohm.
cout<<"\nA=";
cin>>i;
cout<<"\n4.salir"; r=v/i; A.m
cout<<"\nElige 0;
case '3': cout<<"\nDame voltaje:";
opcion:";
cin>>v; }
cout<<"\nB=";
cout<<"\nDame resistencia:";
opc=getch(); cin>>r; i=v/r;
B.mostrar(); break;
switch(opc)
case '4': break;
[Fecha] 4
0
default: cout<<"\nopcion no valida...."; int edad; fecha
getch();
Nac; void pideFecha
(void); void
}
muestraFecha (void); public:
return(opc);
void pideDatos (void);
}
void muestraDatos (void); };
void ohm::mostrar(char sal)
{case'1':cout<<"\nvoltaje="<<v<<endl; {
; cout<<"Dia:";cin>>Nac.d;
} cout<<"Mes:";cin>>Nac.m;
#include<iostream>
}
#include<conio2.h>
void datos::muestraFecha(void)
using namespace std;
{ cout<<Nac.d<<"/"<<Nac.m<<"/"<<Nac.a;
struct fecha
}
int d,a; void datos::pideDatos(void)
char m[30]; {
}; char l;
cout<<"Dame Nombre:";
class datos cin.get(name,50); cout<<"Dame
{ private: char Direccion:"; cin.get(l);//l es para limpiar
name[50],dir[80],tel[30],email[50]; buffer de teclado cin.get(dir,80);
[Fecha] 4
1
para limpiar buffer de teclado /*cout<<A.cumple.d;
cin.get(tel,30); cout<<"/"<<A.cumple.m;
cout<<"/"<<A.cumple.a;*/
cout<<"Dame Email:"; cin.get(l);//l es
cin>>edad; pideFecha();
/* int main()
cout<<"\nDia:"; {
cin>>auxDatos.cumple.d; datos A;
cout<<"\nmes:";
A.pideDatos();
cin>>auxDatos.cumple.m;
A.muestraDato
cout<<"\nanio:";
s(); getch();
cin>>auxDatos.cumple.a; */
return 0;
}
}
void datos:: muestraDatos (void)
Pr6: //Programa que usa CLASS y
{ clrscr();
realiza un men.
cout<<"Nombre:"<<name;
cout<<"\nDireccion:"<<dir; #include<iostre
cont=0; struct
fecha
[Fecha] 4
2
{ cout<<"Mes:";cin>>Agenda[cont].Nac.m;
int cout<<"Ao:";cin>>Agenda[cont].Nac.a;
d,a;
}
char
void datos::muestraFecha(int i)
m[30];
{
};
cin.get(Agenda[cont].dir,80);
cout<<"\nDame Telefono:";
class datos
cin.get(l);//l es para limpiar buffer de
{struct personales
teclado cin.get(Agenda[cont].tel,30);
{
cout<<"\nDame Email:"; cin.get(l);//l
name[50],dir[80],tel[30],email[50]; cin.get(Agenda[cont].email,50);
cin>>Agenda[cont].edad; pideFecha();
}Agenda[t];
cout<<"\nFecha de nacimiento:";
void pideDatos (void);
muestraFecha(i);
void muestraDatos (void);
getch();
};
}
void datos::pideFecha(void)
}
{
}
cout<<"\nFecha de nacimiento:";
cout<<"Dia:";cin>>Agenda[cont].Nac.d;
[Fecha] 4
3
int
main() {
datos A;
char r;
do{
clrscr();
Pr7: // suma de numeros
cout<<"1.introduce\n"; complejos con un auxiliar
cout<<"2.mostrar\n";
cout<<"3.salir\n"; #include<iostream>
complejo
break;
break; };
cout<<"\nreal:";
}
cin>>aux.r;
cout<<"\nimag:";
}while(r!='3');
0; return (aux);
}
}
[Fecha] 4
4
{ if(x.i>0) //para verificar o validar el signo using namespace
del
std; struct
numero
complejo
cout<<x.r<<"+"<<x.i<<"i"<<endl;
aux.r=A.r+B.r; };
(aux); complejo::pedir(void
) { complejo aux;
}
cout<<"\nreal:";
int main() { complejo A,B,C;
cout<<"\nimag:";
A=pedir(); cout<<"dame
B=pedir(); C=suma(A,B);
}
// clase struct
#include<iostream>
#include<conio2.h>
[Fecha] 4
5
if(i>0) //para verificar o validar el signo del Pr7_2: suma de nmeros
complejos
numero con un auxiliar utilizando class
cout<<r<<"+"<<i<<"i"<<endl; // clase struct
else #include<iostream>
#include<conio2.h> using
cout<<r<<i<<"i"<<endl;
namespace std;
}
void complejo:: suma (complejo A, complejo B) class complejo
{ };
complejo::pedir(void
//return (aux);
) { complejo aux;
}
cout<<"\nreal:";
int main() { complejo A,B,C;
cin>>r;
cout<<"\ndame complejo A=";
cout<<"\nimag:";
A.pedir();
cin>>i;
cout<<"\ndame complejo B=";
B.pedir(); C.suma(A,B);
}
system("cls"); cout<<"\nA=";
void complejo:: mostrar (void )
A.mostrar(); cout<<"\nB=";
{
B.mostrar(); cout<<"\nla suma es
if(i>0) //para verificar o validar el signo
C="; C.mostrar(); getch(); del numero
return 0; cout<<r<<"+"<<i<<"i"<<endl;
} else
{ int r,i; cout<<r<<i<<"i"<<endl;
public:
}
void pedir (void); void mostrar APUNTADORES.
(void); void suma (complejo A, #include<iostream>
complejo B);
#include<conio2.h>
[Fecha] 4
6
using namespace std; void Datos::mostrar(void)
{ pf=&f;
void Datos::pedir(void)
cout<<"mes:"; #include<conio2.h>
} { if(x>y)
[Fecha] 4
7
return (x); cout<<endl;
else }
} { float precios[]={1.1,2.2,3.3,4.4};
getch();
return 0;
//arreglos
[Fecha] 4
8
private:char tipo[30]; tarjeta::velocidad=velocidad;
}; }
<<resy<<endl; private:
} char marca[50];
class tarjeta //clase 2 int disco duro;
{ public: char perifericos[88];
tarjeta(int,int,int); };
void muestraTarjeta(void); computadora::computadora(char*marca,int
disco duro,char*perifericos,char*tipo,long
private:
colores,int resx,int resy,int procesador,int
int procesador,velocidad,memoria; velocidad,int memoria)
}; :monitor(tipo,colores,resx,resy),tarjeta(proc
esador,velocidad,memoria)
tarjeta::tarjeta(int procesador,int
velocidad,int memoria) {strcpy(computadora::marca,marca);
{tarjeta::procesador=procesador; strcpy(computadora::perfifericos,perifereric
os);
[Fecha] 4
9
computadora::disco_duro=disco_duro; using namespace std;
} class monitor
{coun<<"\nMarca:"<<marca<<endl<<"\nDis monitor(char*,long,int,int);
co
duro:"<<disco_duro<<"\nPerifericos:"<<per void muestraMonitor(void);
ifericos<<endl;
int resx,resy;
muestraMonitor();
private:char tipo[30];
muestraTarjeta();
long colores;
getch();
};
}
monitor::monitor(char*tipo,long colores,int
int main() resx,int resy)
{cout<<"tipo de
video:"<<tipo<<"colores"
<<colores<<"resolucion:"<<resx<<"x"
<<resy<<endl;
#include<iostream> { public:
#include<conio2.h> tarjeta(int,int,int);
#include<string.h>
[Fecha] 5
0
void muestraTarjeta(void); computadora::computadora(char*marca,int
disco duro,char*perifericos,char*tipo,long
private: colores,int resx,int resy,int procesador,int
velocidad,int memoria)
int procesador,velocidad,memoria;
:monitor(tipo,colores,resx,resy),tarjeta(proc
}; esador,velocidad,memoria)
tarjeta::tarjeta(int procesador,int {strcpy(computadora::marca,marca);
velocidad,int memoria)
strcpy(computadora::perfifericos,perifereric
{tarjeta::procesador=procesador;
os);
tarjeta::velocidad=velocidad; computadora::disco_duro=disco_duro;
tarjeta::memoria=memoria; }
} void computadora::muestraCompu(void)
void tarjeta:: muestraTarjeta(void) {coun<<"\nMarca:"<<marca<<endl<<"\nDis
cont<<"\nprocesador:"<<procesador<<"\nV co
elocidad:"<<velocidad<<"\nMemoria:"<<m duro:"<<disco_duro<<"\nPerifericos:"<<per
emoria<<endl; ifericos<<endl;
} muestraMonitor();
int main()
computadora(char*,int,char*,char*,long,int
,int,int,int,int);/////// {computadora NVA("DELL",500,"DVD-
RW","HD",16000,1200,800,2,2,4);
void muestraCompu(void);
NVA.muestraCompu();
getch();
private:
return 0;
char marca[50];
}
int disco duro;
char perifericos[88];
};
[Fecha] 5
1
#include<iostream> //programa de herencia simple.
#include<conio2.h> #include<iostream>
{ clrscr();
cout<<"Nombre:"<<name<<endl
[Fecha] 5
2
<<"Direccion:"<<dir<<endl char puesto[40],turno[20],horario[40];
} public:
public:
};
alumno (char*,char*,char*,char
*,char*, char*); docente::docente(char*name,char*dir,char
*tel)
void mostrarAlumno(void);
{strcpy(docente::puesto,puesto);
};
strcpy(docente::turno,turno);
alumno::alumno(char*carrera,char*turno,c
har*horario,char*name,char*dir,char*tel):p strcpy(docente::horario,horario);
ersonales(name,dir,tel)
strcpy(docente::salario,salario);
{strcpy(alumno::carrera,carrera);
}
strcpy(alumno::turno,turno);
void docente::muestaDocente(void);
strcpy(alumno::horario,horario);
mostrar();
}
{
void alumno::personales
cout<<"puesto:"<<puesto<<endl
{ mostrar();
<<"turno:"<<turno<<endl
clrscr();
<<"horario:"<<horario<<endl;
cout<<"carrera:"<<carrera<<endl
<<"salario:"<<salario<<endl;
<<"turno:"<<turno<<endl
}
<<"horario:"<<horario<<endl;
int main()
}
{
class docente::muestaDocente(void)
docente
{ profe("america","desconocida","456123","s
upervisora","mixto","7:00-20:00",10000.0);
[Fecha] 5
3
Profe.muestraDocente();
//personales A("aby","av.del
radar","2014300175");
// alumno ICE("angel","san
martin","2014658","ICE","mat","7.89");
// A.mostrar();
//getch();
// ICE.mostrarAlumno();
getch();
return 0;
[Fecha] 5
4
[Fecha] 5
5
Programa del juego Pacman que permite al usuario jugar, comindose las bolitas, realizado con
memoria dinmica.
pieslice(x+8,y+20,0,360,4);
#include <iostream> pieslice(x-8,y+20,0,360,4);
#include <graphics.h> //ojitos
#include<stdlib.h> setcolor(BLACK);
using namespace std; setfillstyle(1,BLACK);
class juegos pieslice(x-3,y,0,360,2);
{ //Declaracin de las funciones pieslice(x+3,y,0,360,2);
public: }
void PacmanIz(int x, int y); void juegos::fantasma3(void)
void PacmanIzC(int x, int y); { int x=265, y=315;
void PacmanDer(int x, int y); //cuerpo del fantasma
void PacmanDerC(int x, int y); setcolor( LIGHTMAGENTA);
void PacmanArr(int x, int y); setfillstyle(1, LIGHTMAGENTA);
void PacmanArrC(int x, int y); pieslice(x,y,0,360,8);
void PacmanAba(int x, int y); bar(x-8,y,x+8,y+20);
void PacmanAbaC(int x, int y); //onditas del color del fondo
void fantasma1(void); setcolor(BLACK);
void fantasma2(void); setfillstyle(1,BLACK);
void fantasma3(void); pieslice(x,y+20,0,360,4);
void bolitas(); pieslice(x+8,y+20,0,360,4);
void escenario(); pieslice(x-8,y+20,0,360,4);
}; //ojitos
void juegos::fantasma1(void) setcolor(WHITE);
{ int x=235, y=290; setfillstyle(1,WHITE);
//cuerpo del fantasma pieslice(x-3,y,0,360,2);
setcolor(LIGHTBLUE); pieslice(x+3,y,0,360,2);
setfillstyle(1,LIGHTBLUE); }
pieslice(x,y,0,360,8); void juegos::escenario(void)
bar(x-8,y,x+8,y+20); {
//onditas del color del fondo setcolor(WHITE);
setcolor(BLACK); setfillstyle(1,WHITE);
setfillstyle(1,BLACK); bar(3,61,477,62);
pieslice(x,y+20,0,360,4); bar(5,63,231,64);//mitad arriba
pieslice(x+8,y+20,0,360,4); bar(241,63,475,64);//tambien mitad arriba
pieslice(x-8,y+20,0,360,4); bar(3,589,477,590);//abajo 1
//ojitos bar(5,587,475,588);//abajo dos
setcolor(WHITE); bar(3,298,83,299);
setfillstyle(1,WHITE); bar(3,300,84,301);
pieslice(x-3,y,0,360,2); bar(3,343,83,344);
pieslice(x+3,y,0,360,2); bar(3,341,84,342);
} bar(3,218,83,219);
void juegos::fantasma2(void) bar(3,216,84,217);
{ int x=205, y=315; bar(3,423,83,424);
//cuerpo del fantasma bar(3,425,84,426);
setcolor(LIGHTGREEN); bar(3,61,4,218);
setfillstyle(1,LIGHTGREEN); bar(5,63,6,216);
pieslice(x,y,0,360,8); bar(3,423,4,589);
bar(x-8,y,x+8,y+20); bar(5,425,6,500);
//onditas del color del fondo bar(5,510,6,587);
setcolor(BLACK); bar(82,218,83,298);
setfillstyle(1,BLACK); bar(84,217,85,300);
pieslice(x,y+20,0,360,4); bar(82,343,83,423);
[Fecha] 5
6
bar(84,342,85,425); rectangle(477,420,477,513);
bar(4,500,24,501); rectangle(474,513,474,587);
bar(4,510,24,511); rectangle(477,513,477,589);
bar(24,500,25,511); rectangle(396,298,477,298);
bar(231,63,232,121);//mitad tope arriba rectangle(394,300,477,300);
bar(241,63,242,121); rectangle(395,348,477,348);
bar(231,121,242,122); rectangle(397,350,477,350);
rectangle(36,93,84,121);//primeros rectangle(397,420,477,420);
rectangulo rectangle(394,422,474,422);
rectangle(114,93,197,121); rectangle(394,219,394,300);
rectangle(394,93,444,121);//segundos rectangle(396,221,396,298);
rectangulo rectangle(394,348,394,423);
rectangle(274,93,364,121); rectangle(397,348,397,423);
rectangle(36,151,84,181);//abajo rectangle(457,503,475,513);
rectangulo setcolor(BLACK);
rectangle(394,151,444,181); line(475,503,475,513);
rectangle(114,151,134,298); line(115,474,133,474);
rectangle(134,219,198,239); line(345,474,363,474);
setcolor(BLACK); line(165,298,183,298);
line(134,220,134,238); line(285,298,303,298);
line(334,220,334,238); line(165,343,183,343);
setcolor(WHITE); line(285,343,303,343);
setfillstyle(1,WHITE); line(395,474,413,474);
line(394,218,474,218); line(334,220,334,238);
line(396,220,477,220); line(225,181,243,181);
rectangle(334,151,354,298); line(225,423,243,423);
rectangle(274,219,334,239); line(225,524,243,524);
rectangle(164,151,304,181); line(65,474,83,474);
rectangle(224,181,244,239); }
rectangle(114,344,134,424); void juegos::bolitas(void)
rectangle(334,344,354,424); { int x=20, y=80;
rectangle(164,393,304,423); setcolor(WHITE);
rectangle(224,423,244,473); setfillstyle(1,WHITE);
rectangle(164,504,304,524); pieslice(x,y,0,360,4);
rectangle(224,524,244,559); pieslice(x+40,y,0,360,4);
rectangle(114,454,198,474); pieslice(x+80,y,0,360,4);
rectangle(274,454,364,474); pieslice(x+120,y,0,360,4);
rectangle(34,454,84,474); pieslice(x+160,y,0,360,4);
rectangle(64,474,84,514); pieslice(x+200,y,0,360,4);
rectangle(34,544,134,559); pieslice(x+240,y,0,360,4);
rectangle(334,544,444,559); pieslice(x+280,y,0,360,4);
rectangle(394,474,414,514); pieslice(x+320,y,0,360,4);
rectangle(394,454,444,474); pieslice(x+360,y,0,360,4);
rectangle(164,278,204,298); pieslice(x+400,y,0,360,4);
rectangle(264,278,304,298); pieslice(x+440,y,0,360,4);
rectangle(164,298,184,343); pieslice(x,y+30,0,360,4);
rectangle(164,343,304,363); pieslice(x,y+60,0,360,4);
rectangle(284,298,304,343); pieslice(x,y+90,0,360,4);
rectangle(284,298,304,343); pieslice(x,y+120,0,360,4);
rectangle(344,474,364,514); pieslice(x+40,y+60,0,360,4);
rectangle(114,474,134,514); pieslice(x+80,y+60,0,360,4);
rectangle(474,63,474,218); pieslice(x+120,y+60,0,360,4);
rectangle(477,61,477,220); pieslice(x+160,y+60,0,360,4);
rectangle(474,423,474,503); pieslice(x+200,y+60,0,360,4);
[Fecha] 5
7
pieslice(x+240,y+60,0,360,4); pieslice(x+200,y+490,0,360,4);
pieslice(x+280,y+60,0,360,4); pieslice(x+170,y+490,0,360,4);
pieslice(x+320,y+60,0,360,4); pieslice(x+140,y+490,0,360,4);
pieslice(x+360,y+60,0,360,4); pieslice(x+110,y+490,0,360,4);
pieslice(x+400,y+60,0,360,4); pieslice(x+80,y+490,0,360,4);
pieslice(x+440,y+60,0,360,4); pieslice(x+50,y+490,0,360,4);
pieslice(x+80,y+30,0,360,4); pieslice(x+25,y+490,0,360,4);
pieslice(x+200,y+30,0,360,4); pieslice(x,y+490,0,360,4);
pieslice(x+240,y+30,0,360,4); pieslice(x,y+465,0,360,4);
pieslice(x+360,y+30,0,360,4); pieslice(x+30,y+445,0,360,4);
pieslice(x+440,y+30,0,360,4); pieslice(x+60,y+445,0,360,4);
pieslice(x+40,y+120,0,360,4); pieslice(x+90,y+445,0,360,4);
pieslice(x+80,y+120,0,360,4); pieslice(x+120,y+445,0,360,4);
pieslice(x+130,y+120,0,360,4); pieslice(x,y+445,0,360,4);
pieslice(x+160,y+120,0,360,4); pieslice(x+80,y+160,0,360,4);
pieslice(x+190,y+120,0,360,4); pieslice(x+80,y+200,0,360,4);
pieslice(x+190,y+150,0,360,4); pieslice(x+80,y+240,0,360,4);
pieslice(x+190,y+180,0,360,4); pieslice(x+80,y+280,0,360,4);
pieslice(x+130,y+180,0,360,4); pieslice(x+80,y+320,0,360,4);
pieslice(x+160,y+180,0,360,4); pieslice(x+80,y+360,0,360,4);
pieslice(x+190,y+180,0,360,4); pieslice(x+80,y+400,0,360,4);
pieslice(x+215,y+180,0,360,4); pieslice(x+50,y+240,0,360,4);
pieslice(x+245,y+180,0,360,4); pieslice(x+20,y+240,0,360,4);
pieslice(x+275,y+180,0,360,4); pieslice(x-10,y+240,0,360,4);
pieslice(x+300,y+180,0,360,4); pieslice(x+105,y+240,0,360,4);
pieslice(x+300,y+210,0,360,4); pieslice(x+130,y+240,0,360,4);
pieslice(x+300,y+240,0,360,4); pieslice(x+325,y+240,0,360,4);
pieslice(x+300,y+270,0,360,4); pieslice(x+350,y+240,0,360,4);
pieslice(x+300,y+300,0,360,4); pieslice(x+380,y+240,0,360,4);
pieslice(x+300,y+330,0,360,4); pieslice(x+410,y+240,0,360,4);
pieslice(x+300,y+360,0,360,4); pieslice(x+440,y+240,0,360,4);
pieslice(x+270,y+360,0,360,4); pieslice(x+350,y+270,0,360,4);
pieslice(x+240,y+360,0,360,4); pieslice(x+350,y+300,0,360,4);
pieslice(x+300,y+360,0,360,4); pieslice(x+350,y+330,0,360,4);
pieslice(x+330,y+360,0,360,4); pieslice(x+350,y+210,0,360,4);
pieslice(x+360,y+360,0,360,4); pieslice(x+350,y+180,0,360,4);
pieslice(x+390,y+360,0,360,4); pieslice(x+350,y+150,0,360,4);
pieslice(x+415,y+360,0,360,4); pieslice(x+350,y+120,0,360,4);
pieslice(x+440,y+360,0,360,4); pieslice(x+350,y+80,0,360,4);
pieslice(x+440,y+385,0,360,4); pieslice(x+380,y+120,0,360,4);
pieslice(x+440,y+410,0,360,4); pieslice(x+410,y+120,0,360,4);
pieslice(x+410,y+410,0,360,4); pieslice(x+440,y+120,0,360,4);
pieslice(x+410,y+430,0,360,4); pieslice(x+440,y+90,0,360,4);
pieslice(x+410,y+450,0,360,4); pieslice(x+300,y+120,0,360,4);
pieslice(x+440,y+450,0,360,4); pieslice(x+270,y+120,0,360,4);
pieslice(x+440,y+470,0,360,4); pieslice(x+240,y+120,0,360,4);
pieslice(x+440,y+490,0,360,4); pieslice(x+300,y+90,0,360,4);
pieslice(x+410,y+490,0,360,4); pieslice(x+130,y+90,0,360,4);
pieslice(x+380,y+490,0,360,4); pieslice(x+80,y+90,0,360,4);
pieslice(x+350,y+490,0,360,4); pieslice(x+130,y+210,0,360,4);
pieslice(x+320,y+490,0,360,4); pieslice(x+130,y+270,0,360,4);
pieslice(x+290,y+490,0,360,4); pieslice(x+130,y+300,0,360,4);
pieslice(x+260,y+490,0,360,4); pieslice(x+130,y+330,0,360,4);
pieslice(x+230,y+490,0,360,4); pieslice(x+130,y+360,0,360,4);
[Fecha] 5
8
pieslice(x+160,y+360,0,360,4); {
pieslice(x+190,y+360,0,360,4); setcolor(YELLOW);
pieslice(x+190,y+385,0,360,4); setfillstyle(1,YELLOW);
pieslice(x+190,y+410,0,360,4); pieslice(x,y,0,360,10);
pieslice(x+160,y+410,0,360,4); }
pieslice(x+130,y+410,0,360,4); void juegos::PacmanArr(int x, int y)
pieslice(x+220,y+410,0,360,4); {
pieslice(x+250,y+410,0,360,4); setcolor(YELLOW);
pieslice(x+280,y+410,0,360,4); setfillstyle(1,YELLOW);
pieslice(x+310,y+410,0,360,4); pieslice(x,y,135,45,10);
pieslice(x+310,y+430,0,360,4); }
pieslice(x+310,y+450,0,360,4); void juegos::PacmanArrC(int x, int y)
pieslice(x+335,y+450,0,360,4); {
pieslice(x+360,y+450,0,360,4); setcolor(YELLOW);
pieslice(x+385,y+450,0,360,4); setfillstyle(1,YELLOW);
pieslice(x+360,y+420,0,360,4); pieslice(x,y,0,360,10);
pieslice(x+360,y+390,0,360,4); }
pieslice(x+160,y+300,0,360,4);
pieslice(x+190,y+300,0,360,4); void juegos::PacmanAba(int x, int y)
pieslice(x+220,y+300,0,360,4); {
pieslice(x+250,y+300,0,360,4); setcolor(YELLOW);
pieslice(x+275,y+300,0,360,4); setfillstyle(1,YELLOW);
pieslice(x,y+360,0,360,4); pieslice(x,y,315,225,10);
pieslice(x+30,y+360,0,360,4); }
pieslice(x+55,y+360,0,360,4); void juegos::PacmanAbaC(int x, int y)
pieslice(x,y+385,0,360,4); {
pieslice(x,y+410,0,360,4); setcolor(YELLOW);
pieslice(x+30,y+410,0,360,4); setfillstyle(1,YELLOW);
pieslice(x+130,y+465,0,360,4); pieslice(x,y,0,360,10);
pieslice(x+160,y+465,0,360,4); }
pieslice(x+190,y+465,0,360,4); int main( )
pieslice(x+240,y+465,0,360,4); {
pieslice(x+270,y+465,0,360,4); juegos m; //Creacin del objeto
pieslice(x+300,y+465,0,360,4); char f;
} int x=220,y=479;
void juegos::PacmanIz(int x, int y) //Creacion de los punteros
{ void *PacmanIz;
setcolor(YELLOW); void *PacmanIzC;
setfillstyle(1,YELLOW); void *PacmanDer;
pieslice(x,y,225,135,10); void *PacmanDerC;
} void *PacmanArr;
void juegos::PacmanIzC(int x, int y) void *PacmanArrC;
{ void *PacmanAba;
setcolor(YELLOW); void *PacmanAbaC;
setfillstyle(1,YELLOW); initwindow( 480 , 640 , "Pacman 1.0" );
pieslice(x,y,0,360,10); //Asignacin de memoria dinmica
} m.PacmanDer(x,y);
void juegos::PacmanDer(int x, int y) PacmanDer=malloc(imagesize(x-15,y-
{ 10,x+9,y+10));
setcolor(YELLOW); getimage(x-15,y-10,x+9,y+10,PacmanDer);
setfillstyle(1,YELLOW); cleardevice();
pieslice(x,y,45,315,10); m.PacmanDerC(x,y);
} PacmanDerC=malloc(imagesize(x-15,y-
void juegos::PacmanDerC(int x, int y) 10,x+9,y+10));
[Fecha] 5
9
getimage(x-15,y- {
10,x+9,y+10,PacmanDerC); putimage(x,y,PacmanArr,OR_PUT); //Corte
cleardevice(); putimage(x,y--
m.PacmanIz(x,y); ,PacmanArr,AND_PUT);//Pega
PacmanIz=malloc(imagesize(x-12,y- delay(100);
10,x+11,y+12)); putimage(x,y--,PacmanArrC,OR_PUT);
getimage(x-12,y-10,x+11,y+12,PacmanIz); putimage(x,y--,PacmanArrC,AND_PUT);
cleardevice(); delay(100);
m.PacmanIzC(x,y); putimage(x,y--,PacmanArr,OR_PUT);
PacmanIzC=malloc(imagesize(x-12,y- putimage(x,y--,PacmanArr,AND_PUT);
10,x+11,y+12)); }
getimage(x-12,y- break;
10,x+11,y+12,PacmanIzC); //Abajo
cleardevice(); case 80: if(y<560)
m.PacmanArr(x,y); {
PacmanArr=malloc(imagesize(x-10,y- putimage(x,y,PacmanAba,OR_PUT);
10,x+12,y+12)); putimage(x,y++,PacmanAba,AND_PUT);
getimage(x-10,y- delay(100);
10,x+12,y+12,PacmanArr); putimage(x,y++,PacmanAbaC,OR_PUT);
cleardevice(); putimage(x,y++,PacmanAbaC,AND_PUT);
m.PacmanArrC(x,y); delay(100);
PacmanArrC=malloc(imagesize(x-10,y- putimage(x,y++,PacmanAba,OR_PUT);
10,x+12,y+12)); putimage(x,y++,PacmanAba,AND_PUT);
getimage(x-10,y- }
10,x+12,y+12,PacmanArrC); break;
cleardevice(); //Izquierda
m.PacmanAba(x,y); case 75: if(x>10)
PacmanAba=malloc(imagesize(x-12,y- {
12,x+12,y+10)); putimage(x,y,PacmanIz,OR_PUT);
getimage(x-12,y- putimage(x--,y,PacmanIz,AND_PUT);
12,x+12,y+10,PacmanAba); delay(100);
cleardevice(); putimage(x--,y,PacmanIzC,OR_PUT);
m.PacmanAbaC(x,y); putimage(x--,y,PacmanIzC,AND_PUT);
PacmanAbaC=malloc(imagesize(x-12,y- delay(100);
12,x+12,y+10)); putimage(x--,y,PacmanIz,OR_PUT);
getimage(x-12,y- putimage(x--,y,PacmanIz,AND_PUT);
12,x+12,y+10,PacmanAbaC); }
cleardevice(); break;
//Llamado de las funciones //Derecha
m.escenario(); case 77: if(x<448)
m.fantasma1(); {
m.fantasma2(); putimage(x,y,PacmanDer,OR_PUT);
m.fantasma3(); putimage(x++,y,PacmanDer,AND_PUT);
m.bolitas(); delay(100);
putimage(x,y,PacmanDer,OR_PUT); putimage(x++,y,PacmanDerC,OR_PUT);
putimage(x,y,PacmanDer,AND_PUT); putimage(x++,y,PacmanDerC,AND_PUT);
do delay(100);
{ putimage(x++,y,PacmanDer,OR_PUT);
getch(); putimage(x++,y,PacmanDer,AND_PUT);
f=getch(); }
switch (f) break;
{ }//Fin del Switch
//Arriba }while (f!=27);
case 72: if (y>65) getch();
[Fecha] 6
0
closegraph( ); }
return( 0 );
Programa sobre una calculadora que realiza operaciones bsicas (suma, resta, multiplicacin y
divisin). Utilizando plantillas en l.
[Fecha] 6
1
circle(127,220,25); case '*':
circle(194,220,25); a3=a2*a1;
circle(261,220,25); a3.muestra();
circle(60,290,25); break;
circle(127,290,25); case '/':
circle(194,290,25); a3=a2/a1;
circle(261,290,25); a3.muestra();
circle(60,360,25); break;
circle(127,360,25); case '=':
circle(194,360,25); break; }
circle(261,360,25); }while (op!=27);
setbkcolor(WHITE); getch();
settextstyle(6,0,4); closegraph( );
outtextxy(50,135,"1"); return( 0 ); }
outtextxy(117,135,"2"); template <class T>
outtextxy(184,135,"3"); T calculadora<T>::operator < (T f)
outtextxy(251,135,"+"); {
outtextxy(50,205,"4"); calculadora::num1=ingresa<float>();
outtextxy(117,205,"5"); return f;
outtextxy(184,205,"6"); }
outtextxy(251,205,"-"); template <class T>
outtextxy(50,275,"7"); void calculadora<T>::muestra(void){
outtextxy(117,275,"8"); char aux1[10];
outtextxy(184,275,"9"); sprintf(aux1,"%.2f",num1);
outtextxy(251,275,"*"); bar(40,40,285,85);
outtextxy(50,345,"0"); outtextxy(200,45,aux1);}
outtextxy(117,345,"."); template <class T>
outtextxy(184,345,"="); calculadora<T> calculadora<T>::operator
outtextxy(251,345,"/"); +(calculadora a){
setbkcolor(LIGHTGRAY); calculadora<float> c;
setcolor(RED); calculadora::num1=ingresa<float>();
settextstyle(1,0,2); c.num1=num1+a.num1;
outtextxy(30,6,"Casio"); return c;}
settextstyle(5,0,1); template <class T>
outtextxy(190,6,"fx~01 Plus"); } calculadora<T> calculadora<T>::operator -
char op; (calculadora a){
template <class T> calculadora<float> c;
T ingresa (void); calculadora::num1=ingresa<float>();
int main( ) c.num1=a.num1-num1;
{ return c;}
initwindow( 320 , 410 , "Calculadora" ); template <class T>
fondo(); calculadora<T> calculadora<T>::operator
calculadora<float> a1,a2,a3; *(calculadora a){
do{ calculadora<float> c;
a1<op; calculadora::num1=ingresa<float>();
switch(op){ c.num1=num1*a.num1;
case '+': return c;}
a3=a2+a1; template <class T>
a3.muestra(); calculadora<T> calculadora<T>::operator
break; /(calculadora a){
case '-': calculadora<float> c;
a3=a2-a1; calculadora::num1=ingresa<float>();
a3.muestra(); c.num1=a.num1/num1;
break; return c;}
[Fecha] 6
2
template <class T> fondo();
calculadora<T>::calculadora(T num) outtextxy(250-(c*20),45,aux);
{num1=num;} c++;
template <class T> break;
calculadora<T>::calculadora(void) case'6':
{num1=0;} aux[c]=opcion;
template <class T> aux[c+1]='\0';
T ingresa (void) fondo();
{ int opcion; outtextxy(250-(c*20),45,aux);
char aux[8]; c++;
T num; break;
int c=0; case'7':
do{ aux[c]=opcion;
opcion=getch(); aux[c+1]='\0';
if (c<=8) fondo();
{ switch (opcion) outtextxy(250-(c*20),45,aux);
{ case'0': c++;
aux[c]=opcion; break;
aux[c+1]='\0'; case'8':
fondo(); aux[c]=opcion;
outtextxy(250-(c*20),45,aux); aux[c+1]='\0';
c++; fondo();
break; outtextxy(250-(c*20),45,aux);
case'1': c++;
aux[c]=opcion; break;
aux[c+1]='\0'; case'9':
fondo(); aux[c]=opcion;
outtextxy(250-(c*20),45,aux); aux[c+1]='\0';
c++; fondo();
break; outtextxy(250-(c*20),45,aux);
case'2': c++;
aux[c]=opcion; break;
aux[c+1]='\0'; case'.':
fondo(); aux[c]=opcion;
outtextxy(250-(c*20),45,aux); aux[c+1]='\0';
c++; fondo();
break; outtextxy(250-(c*20),45,aux);
case'3': c++;
aux[c]=opcion; break;
aux[c+1]='\0'; default:
fondo(); if (opcion=='+'||opcion=='-
outtextxy(250-(c*20),45,aux); '||opcion=='*'||opcion=='/'||opcion=='='||opcio
c++; n=='\r')
break; {
case'4': c=8;
aux[c]=opcion; op=opcion;
aux[c+1]='\0'; }
fondo(); else{
outtextxy(250-(c*20),45,aux); fondo();
c++; outtextxy(250-(c*20),45,aux);}
break; break;
case'5': case'\b':
aux[c]=opcion; aux[c-1]='\0';
aux[c+1]='\0'; fondo();
[Fecha] 6
3
outtextxy(250-(c*20),45,aux);
c--;
break;
case 27:
c=8;
op=27;
break; } } }while (c<8);
return atof(aux);
}
Programa del juego Mario Bros el cual permite moverse de izquierda a derecha, as como saltar y agacharse hacia ambos lados por medio de
memoria dinmica
#include <graphics.h> //CUADROS bar(w+69*w2,w1-40*w2,w+70*w2,w1-41*w2);//punto4
#define t 6 outtextxy(w+72*w2,w1-46*w2,"?");
#define b 6 //Cuadro1 //Cuadro2
using namespace std; setfillstyle(1,BLACK); setfillstyle(1,BLACK);
class juegos bar(w+60*w2,w1-50*w2,w+61*w2,w1-48*w2); bar(w+86*w2,w1-50*w2,w+87*w2,w1-48*w2);
{ bar(w+54*w2,w1-48*w2,w+67*w2,w1-47*w2); bar(w+80*w2,w1-48*w2,w+93*w2,w1-47*w2);
public: bar(w+57*w2,w1-47*w2,w+58*w2,w1-45*w2); bar(w+83*w2,w1-47*w2,w+84*w2,w1-45*w2);
void hongo2(int x, int y,int c,int sf); bar(w+63*w2,w1-47*w2,w+64*w2,w1-45*w2); bar(w+89*w2,w1-47*w2,w+90*w2,w1-45*w2);
void sMarioParadoDer(int x, int y,int c); bar(w+54*w2,w1-45*w2,w+67*w2,w1-44*w2); bar(w+80*w2,w1-45*w2,w+93*w2,w1-44*w2);
void sMarioParadoDer1(int x, int y,int c); bar(w+60*w2,w1-44*w2,w+61*w2,w1-42*w2); bar(w+86*w2,w1-44*w2,w+87*w2,w1-42*w2);
void sMarioParadoDerA(int x, int y,int c); bar(w+54*w2,w1-42*w2,w+67*w2,w1-41*w2); bar(w+80*w2,w1-42*w2,w+93*w2,w1-41*w2);
void sMarioParadoDerA1(int x, int y,int c); bar(w+57*w2,w1-41*w2,w+58*w2,w1-39*w2); bar(w+83*w2,w1-41*w2,w+84*w2,w1-39*w2);
void sMarioParadoArr(int x, int y,int c); bar(w+63*w2,w1-41*w2,w+64*w2,w1-39*w2); bar(w+89*w2,w1-41*w2,w+90*w2,w1-39*w2);
void sMarioParadoArrA(int x, int y,int c); bar(w+54*w2,w1-39*w2,w+67*w2,w1-38*w2); bar(w+80*w2,w1-39*w2,w+93*w2,w1-38*w2);
void sMarioParadoCam(int x, int y,int c); setfillstyle(1,RED); setfillstyle(1,RED);
void sMarioParadoCamA(int x, int y,int c); bar(w+54*w2,w1-50*w2,w+60*w2,w1-48*w2); bar(w+80*w2,w1-50*w2,w+86*w2,w1-48*w2);
void sMario1(int x, int y,int c); bar(w+61*w2,w1-50*w2,w+67*w2,w1-48*w2); bar(w+87*w2,w1-50*w2,w+93*w2,w1-48*w2);
void sMario1Ab(int x, int y,int c); bar(w+54*w2,w1-47*w2,w+57*w2,w1-45*w2); bar(w+80*w2,w1-47*w2,w+83*w2,w1-45*w2);
void sMario2(int x, int y,int c); bar(w+58*w2,w1-47*w2,w+63*w2,w1-45*w2); bar(w+84*w2,w1-47*w2,w+89*w2,w1-45*w2);
void sMario2Ab(int x, int y,int c); bar(w+64*w2,w1-47*w2,w+67*w2,w1-45*w2); bar(w+90*w2,w1-47*w2,w+93*w2,w1-45*w2);
void sMarioParadoArr1(int x, int y,int c); bar(w+54*w2,w1-44*w2,w+60*w2,w1-42*w2); bar(w+80*w2,w1-44*w2,w+86*w2,w1-42*w2);
void sMarioParadoArrA1(int x, int y,int c); bar(w+61*w2,w1-44*w2,w+67*w2,w1-42*w2); bar(w+87*w2,w1-44*w2,w+93*w2,w1-42*w2);
void sMarioParadoCam1(int x, int y,int c); bar(w+54*w2,w1-41*w2,w+57*w2,w1-39*w2); bar(w+80*w2,w1-41*w2,w+83*w2,w1-39*w2);
void sMarioParadoCamA1(int x, int y,int c); bar(w+58*w2,w1-41*w2,w+63*w2,w1-39*w2); bar(w+84*w2,w1-41*w2,w+89*w2,w1-39*w2);
void sMario11(int x, int y,int c); bar(w+64*w2,w1-41*w2,w+67*w2,w1-39*w2); bar(w+90*w2,w1-41*w2,w+93*w2,w1-39*w2);
void sMario1Ab1(int x, int y,int c);
void sMario21(int x, int y,int c); //Cuadro1_1 //Cuadro2_1
void sMario2Ab1(int x, int y,int c); setfillstyle(1,BROWN); setfillstyle(1,BROWN);
void sNube(int h,int e,int g); bar(w+68*w2,w1-50*w2,w+79*w2,w1-49*w2); bar(w+94*w2,w1-50*w2,w+105*w2,w1-49*w2);
void sPoste(int h1, int e1, int g1); bar(w+67*w2,w1-39*w2,w+68*w2,w1-49*w2); bar(w+93*w2,w1-39*w2,w+94*w2,w1-49*w2);
void sSuelo(int h2, int e2, int g2); setfillstyle(1,YELLOW); setfillstyle(1,YELLOW);
void sNube2(int h3,int e3,int g3); bar(w+68*w2,w1-49*w2,w+79*w2,w1-39*w2); bar(w+94*w2,w1-49*w2,w+106*w2,w1-39*w2);
void sPasto1(int h4,int e4,int g4); setfillstyle(1,BLACK); setfillstyle(1,BLACK);
void sPasto2(int h5,int e5,int g5); bar(w+79*w2,w1-49*w2,w+80*w2,w1-38*w2); bar(w+105*w2,w1-49*w2,w+106*w2,w1-38*w2);
void sCuadros(int w, int w1, int w2); bar(w+79*w2,w1-38*w2,w+66*w2,w1-39*w2); bar(w+105*w2,w1-38*w2,w+92*w2,w1-39*w2);
}; bar(w+69*w2,w1-48*w2,w+70*w2,w1-47*w2);//punto1 bar(w+95*w2,w1-48*w2,w+96*w2,w1-47*w2);//punto1
bar(w+77*w2,w1-48*w2,w+78*w2,w1-47*w2);//punto2 bar(w+103*w2,w1-48*w2,w+104*w2,w1-
void juegos::sCuadros(int w, int w1, int w2) bar(w+77*w2,w1-40*w2,w+78*w2,w1-41*w2);//punto3 47*w2);//punto2
{
[Fecha] 6
4
bar(w+103*w2,w1-40*w2,w+104*w2,w1- bar(h+37*g,e+22*g,h+39*g,e+23*g); void juegos::sNube2(int h3, int e3, int g3)
41*w2);//punto3 bar(h+33*g,e+23*g,h+37*g,e+24*g); { setcolor(BLACK);
bar(w+95*w2,w1-40*w2,w+96*w2,w1-41*w2);//punto4 bar(h+31*g,e+22*g,h+33*g,e+23*g); setfillstyle(1,BLACK);
outtextxy(w+98*w2,w1-46*w2,"?"); bar(h+30*g,e+21*g,h+31*g,e+22*g); bar(h3,e3+13*g3,h3+1*g3,e3+15*g3);
bar(h+29*g,e+22*g,h+30*g,e+23*g); bar(h3+1*g3,e3+12*g3,h3+3*g3,e3+13*g3);
//Cuadro3 bar(h+26*g,e+23*g,h+29*g,e+24*g); bar(h3+3*g3,e3+11*g3,h3+4*g3,e3+12*g3);
setfillstyle(1,BLACK); bar(h+24*g,e+22*g,h+26*g,e+23*g); bar(h3+4*g3,e3+10*g3,h3+5*g3,e3+11*g3);
bar(w+112*w2,w1-50*w2,w+113*w2,w1-48*w2); bar(h+23*g,e+21*g,h+24*g,e+22*g); bar(h3+5*g3,e3+9*g3,h3+8*g3,e3+10*g3);
bar(w+106*w2,w1-48*w2,w+119*w2,w1-47*w2); bar(h+21*g,e+22*g,h+23*g,e+23*g); bar(h3+8*g3,e3+8*g3,h3+9*g3,e3+9*g3);
bar(w+109*w2,w1-47*w2,w+110*w2,w1-45*w2); bar(h+17*g,e+23*g,h+21*g,e+24*g); bar(h3+9*g3,e3+7*g3,h3+10*g3,e3+8*g3);
bar(w+115*w2,w1-47*w2,w+116*w2,w1-45*w2); bar(h+15*g,e+22*g,h+17*g,e+23*g); bar(h3+10*g3,e3+4*g3,h3+11*g3,e3+7*g3);
bar(w+106*w2,w1-45*w2,w+119*w2,w1-44*w2); bar(h+14*g,e+21*g,h+15*g,e+22*g); bar(h3+11*g3,e3+3*g3,h3+13*g3,e3+4*g3);
bar(w+112*w2,w1-44*w2,w+113*w2,w1-42*w2); bar(h+13*g,e+22*g,h+14*g,e+23*g); bar(h3+13*g3,e3+2*g3,h3+14*g3,e3+3*g3);
bar(w+106*w2,w1-42*w2,w+119*w2,w1-41*w2); bar(h+10*g,e+23*g,h+13*g,e+24*g); bar(h3+14*g3,e3+1*g3,h3+18*g3,e3+2*g3);
bar(w+109*w2,w1-41*w2,w+110*w2,w1-39*w2); bar(h+8*g,e+22*g,h+10*g,e+23*g); bar(h3+18*g3,e3+2*g3,h3+19*g3,e3+3*g3);
bar(w+115*w2,w1-41*w2,w+116*w2,w1-39*w2); bar(h+7*g,e+21*g,h+8*g,e+22*g); bar(h3+19*g3,e3+3*g3,h3+20*g3,e3+5*g3);
bar(w+106*w2,w1-39*w2,w+119*w2,w1-38*w2); bar(h+4*g,e+20*g,h+7*g,e+21*g); bar(h3+20*g3,e3+5*g3,h3+21*g3,e3+6*g3);
setfillstyle(1,RED); bar(h+3*g,e+18*g,h+4*g,e+20*g); bar(h3+21*g3,e3+4*g3,h3+22*g3,e3+5*g3);
bar(w+106*w2,w1-50*w2,w+112*w2,w1-48*w2); bar(h+2*g,e+17*g,h+3*g,e+18*g); bar(h3+22*g3,e3+5*g3,h3+23*g3,e3+6*g3);
bar(w+113*w2,w1-50*w2,w+119*w2,w1-48*w2); bar(h+1*g,e+15*g,h+2*g,e+17*g); bar(h3+23*g3,e3+6*g3,h3+24*g3,e3+8*g3);
bar(w+106*w2,w1-47*w2,w+109*w2,w1-45*w2); bar(h+0*g,e+13*g,h+1*g,e+15*g); bar(h3+23*g3,e3+8*g3,h3+25*g3,e3+9*g3);
bar(w+110*w2,w1-47*w2,w+115*w2,w1-45*w2); setcolor(WHITE); bar(h3+25*g3,e3+7*g3,h3+26*g3,e3+8*g3);
bar(w+116*w2,w1-47*w2,w+119*w2,w1-45*w2); setfillstyle(1,WHITE); bar(h3+26*g3,e3+5*g3,h3+27*g3,e3+7*g3);
bar(w+106*w2,w1-44*w2,w+112*w2,w1-42*w2); bar(h+1*g,e+13*g,h+3*g,e+15*g); bar(h3+27*g3,e3+4*g3,h3+29*g3,e3+5*g3);
bar(w+113*w2,w1-44*w2,w+119*w2,w1-42*w2); bar(h+2*g,e+15*g,h+3*g,e+17*g); bar(h3+29*g3,e3+3*g3,h3+30*g3,e3+4*g3);
bar(w+106*w2,w1-41*w2,w+109*w2,w1-39*w2); bar(h+3*g,e+12*g,h+4*g,e+18*g); bar(h3+30*g3,e3+2*g3,h3+33*g3,e3+3*g3);
bar(w+110*w2,w1-41*w2,w+115*w2,w1-39*w2); bar(h+4*g,e+11*g,h+5*g,e+12*g); bar(h3+33*g3,e3+3*g3,h3+34*g3,e3+4*g3);
bar(w+116*w2,w1-41*w2,w+119*w2,w1-39*w2); bar(h+4*g,e+12*g,h+7*g,e+20*g); bar(h3+34*g3,e3+4*g3,h3+35*g3,e3+6*g3);
} bar(h+5*g,e+10*g,h+8*g,e+12*g); bar(h3+35*g3,e3+6*g3,h3+36*g3,e3+7*g3);
bar(h+8*g,e+9*g,h+9*g,e+12*g); bar(h3+36*g3,e3+5*g3,h3+37*g3,e3+6*g3);
bar(h+7*g,e+12*g,h+9*g,e+21*g); bar(h3+37*g3,e3+6*g3,h3+38*g3,e3+7*g3);
void juegos::sNube(int h, int e, int g) bar(h+9*g,e+8*g,h+10*g,e+21*g); bar(h3+38*g3,e3+7*g3,h3+39*g3,e3+10*g3);
{ setcolor(BLACK); bar(h+8*g,e+21*g,h+10*g,e+22*g); bar(h3+39*g3,e3+10*g3,h3+40*g3,e3+12*g3);
setfillstyle(1,BLACK); bar(h+11*g,e+4*g,h+13*g,e+7*g); bar(h3+40*g3,e3+12*g3,h3+41*g3,e3+13*g3);
bar(h,e+13*g,h+1*g,e+15*g); bar(h+10*g,e+7*g,h+12*g,e+9*g); bar(h3+41*g3,e3+11*g3,h3+42*g3,e3+12*g3);
bar(h+1*g,e+12*g,h+3*g,e+13*g); bar(h+10*g,e+9*g,h+13*g,e+23*g); bar(h3+42*g3,e3+10*g3,h3+43*g3,e3+11*g3);
bar(h+3*g,e+11*g,h+4*g,e+12*g); bar(h+13*g,e+3*g,h+15*g,e+7*g); bar(h3+43*g3,e3+11*g3,h3+44*g3,e3+14*g3);
bar(h+4*g,e+10*g,h+5*g,e+11*g); bar(h+13*g,e+8*g,h+15*g,e+21*g); bar(h3+44*g3,e3+14*g3,h3+45*g3,e3+15*g3);
bar(h+5*g,e+9*g,h+8*g,e+10*g); bar(h+13*g,e+21*g,h+14*g,e+22*g); bar(h3+45*g3,e3+13*g3,h3+46*g3,e3+14*g3);
bar(h+8*g,e+8*g,h+9*g,e+9*g); bar(h+14*g,e+2*g,h+18*g,e+3*g); bar(h3+46*g3,e3+14*g3,h3+47*g3,e3+16*g3);
bar(h+9*g,e+7*g,h+10*g,e+8*g); bar(h+15*g,e+3*g,h+17*g,e+22*g); bar(h3+45*g3,e3+16*g3,h3+46*g3,e3+17*g3);
bar(h+10*g,e+4*g,h+11*g,e+7*g); bar(h+17*g,e+3*g,h+19*g,e+6*g); bar(h3+44*g3,e3+17*g3,h3+45*g3,e3+18*g3);
bar(h+11*g,e+3*g,h+13*g,e+4*g); bar(h+18*g,e+6*g,h+19*g,e+7*g); bar(h3+45*g3,e3+18*g3,h3+46*g3,e3+19*g3);
bar(h+13*g,e+2*g,h+14*g,e+3*g); bar(h+19*g,e+5*g,h+20*g,e+6*g); bar(h3+46*g3,e3+19*g3,h3+47*g3,e3+20*g3);
bar(h+14*g,e+1*g,h+18*g,e+2*g); bar(h+19*g,e+6*g,h+21*g,e+8*g); bar(h3+44*g3,e3+20*g3,h3+46*g3,e3+21*g3);
bar(h+18*g,e+2*g,h+19*g,e+3*g); bar(h+17*g,e+7*g,h+18*g,e+8*g); bar(h3+42*g3,e3+21*g3,h3+44*g3,e3+22*g3);
bar(h+19*g,e+3*g,h+20*g,e+5*g); bar(h+17*g,e+8*g,h+21*g,e+23*g); bar(h3+40*g3,e3+22*g3,h3+42*g3,e3+23*g3);
bar(h+20*g,e+5*g,h+21*g,e+6*g); bar(h+21*g,e+5*g,h+22*g,e+6*g); bar(h3+39*g3,e3+21*g3,h3+40*g3,e3+22*g3);
bar(h+21*g,e+4*g,h+22*g,e+5*g); bar(h+21*g,e+6*g,h+24*g,e+22*g); bar(h3+37*g3,e3+22*g3,h3+39*g3,e3+23*g3);
bar(h+22*g,e+5*g,h+23*g,e+6*g); bar(h+23*g,e+9*g,h+25*g,e+21*g); bar(h3+33*g3,e3+23*g3,h3+37*g3,e3+24*g3);
bar(h+23*g,e+6*g,h+24*g,e+8*g); bar(h+24*g,e+21*g,h+25*g,e+22*g); bar(h3+31*g3,e3+22*g3,h3+33*g3,e3+23*g3);
bar(h+23*g,e+8*g,h+25*g,e+9*g); bar(h+26*g,e+7*g,h+27*g,e+8*g); bar(h3+30*g3,e3+21*g3,h3+31*g3,e3+22*g3);
bar(h+25*g,e+7*g,h+26*g,e+8*g); bar(h+25*g,e+8*g,h+28*g,e+22*g); bar(h3+29*g3,e3+22*g3,h3+30*g3,e3+23*g3);
bar(h+26*g,e+5*g,h+27*g,e+7*g); bar(h+27*g,e+5*g,h+29*g,e+8*g); bar(h3+26*g3,e3+23*g3,h3+29*g3,e3+24*g3);
bar(h+27*g,e+4*g,h+29*g,e+5*g); bar(h+26*g,e+22*g,h+29*g,e+23*g); bar(h3+24*g3,e3+22*g3,h3+26*g3,e3+23*g3);
bar(h+29*g,e+3*g,h+30*g,e+4*g); bar(h+30*g,e+3*g,h+33*g,e+4*g); bar(h3+23*g3,e3+21*g3,h3+24*g3,e3+22*g3);
bar(h+30*g,e+2*g,h+33*g,e+3*g); bar(h+29*g,e+4*g,h+31*g,e+7*g); bar(h3+21*g3,e3+22*g3,h3+23*g3,e3+23*g3);
bar(h+33*g,e+3*g,h+34*g,e+4*g); bar(h+29*g,e+8*g,h+30*g,e+9*g); bar(h3+17*g3,e3+23*g3,h3+21*g3,e3+24*g3);
bar(h+34*g,e+4*g,h+35*g,e+6*g); bar(h+28*g,e+9*g,h+30*g,e+22*g); bar(h3+15*g3,e3+22*g3,h3+17*g3,e3+23*g3);
bar(h+35*g,e+6*g,h+36*g,e+7*g); bar(h+31*g,e+4*g,h+34*g,e+6*g); bar(h3+14*g3,e3+21*g3,h3+15*g3,e3+22*g3);
bar(h+36*g,e+5*g,h+37*g,e+6*g); bar(h+31*g,e+6*g,h+32*g,e+7*g); bar(h3+13*g3,e3+22*g3,h3+14*g3,e3+23*g3);
bar(h+37*g,e+6*g,h+38*g,e+7*g); bar(h+30*g,e+8*g,h+31*g,e+21*g); bar(h3+10*g3,e3+23*g3,h3+13*g3,e3+24*g3);
bar(h+38*g,e+7*g,h+39*g,e+10*g); bar(h+31*g,e+7*g,h+33*g,e+22*g); bar(h3+8*g3,e3+22*g3,h3+10*g3,e3+23*g3);
bar(h+39*g,e+10*g,h+40*g,e+12*g); bar(h+33*g,e+6*g,h+35*g,e+7*g); bar(h3+7*g3,e3+21*g3,h3+8*g3,e3+22*g3);
bar(h+40*g,e+12*g,h+41*g,e+13*g); bar(h+33*g,e+7*g,h+37*g,e+23*g); bar(h3+4*g3,e3+20*g3,h3+7*g3,e3+21*g3);
bar(h+41*g,e+11*g,h+42*g,e+12*g); bar(h+36*g,e+6*g,h+37*g,e+7*g); bar(h3+3*g3,e3+18*g3,h3+4*g3,e3+20*g3);
bar(h+42*g,e+10*g,h+43*g,e+11*g); bar(h+37*g,e+7*g,h+38*g,e+22*g);
bar(h+43*g,e+11*g,h+44*g,e+14*g); bar(h+38*g,e+10*g,h+39*g,e+22*g); bar(h3+2*g3,e3+17*g3,h3+3*g3,e3+18*g3);
bar(h+44*g,e+14*g,h+45*g,e+15*g); bar(h+39*g,e+12*g,h+40*g,e+21*g); bar(h3+1*g3,e3+15*g3,h3+2*g3,e3+17*g3);
bar(h+45*g,e+13*g,h+46*g,e+14*g); bar(h+40*g,e+13*g,h+42*g,e+22*g); bar(h3+0*g3,e3+13*g3,h3+1*g3,e3+15*g3);
bar(h+46*g,e+14*g,h+47*g,e+16*g); bar(h+41*g,e+12*g,h+42*g,e+13*g); setcolor(WHITE);
bar(h+45*g,e+16*g,h+46*g,e+17*g); bar(h+42*g,e+11*g,h+43*g,e+14*g); setfillstyle(1,WHITE);
bar(h+44*g,e+17*g,h+45*g,e+18*g); bar(h+42*g,e+14*g,h+44*g,e+21*g); bar(h3+1*g3,e3+13*g3,h3+3*g3,e3+15*g3);
bar(h+45*g,e+18*g,h+46*g,e+19*g); bar(h+44*g,e+15*g,h+45*g,e+17*g); bar(h3+2*g3,e3+15*g3,h3+3*g3,e3+17*g3);
bar(h+46*g,e+19*g,h+47*g,e+20*g); bar(h+45*g,e+14*g,h+46*g,e+16*g); bar(h3+3*g3,e3+12*g3,h3+4*g3,e3+18*g3);
bar(h+44*g,e+20*g,h+46*g,e+21*g); bar(h+44*g,e+18*g,h+45*g,e+20*g); bar(h3+4*g3,e3+11*g3,h3+5*g3,e3+12*g3);
bar(h+42*g,e+21*g,h+44*g,e+22*g); bar(h+45*g,e+19*g,h+46*g,e+20*g); bar(h3+4*g3,e3+12*g3,h3+7*g3,e3+20*g3);
bar(h+40*g,e+22*g,h+42*g,e+23*g); } bar(h3+5*g3,e3+10*g3,h3+8*g3,e3+12*g3);
bar(h+39*g,e+21*g,h+40*g,e+22*g); bar(h3+8*g3,e3+9*g3,h3+9*g3,e3+12*g3);
bar(h3+7*g3,e3+12*g3,h3+9*g3,e3+21*g3); bar(h1+14*g1,e1+15*g1,h1+16*g1,e1+32*g1); bar(h2+103*g2,e2+1*g2,h2+110*g2,e2+4*g2);
bar(h3+9*g3,e3+8*g3,h3+10*g3,e3+21*g3); bar(h1+24*g1,e1+15*g1,h1+29*g1,e1+32*g1); bar(h2+110*g2,e2+1*g2,h2+118*g2,e2+9*g2);
bar(h3+8*g3,e3+21*g3,h3+10*g3,e3+22*g3); } bar(h2+103*g2,e2+5*g2,h2+109*g2,e2+9*g2);
bar(h3+11*g3,e3+4*g3,h3+13*g3,e3+7*g3); setcolor(BLACK);
bar(h3+10*g3,e3+7*g3,h3+12*g3,e3+9*g3); void juegos::sSuelo(int h2, int e2, int g2) setfillstyle(1,BLACK);
bar(h3+10*g3,e3+9*g3,h3+13*g3,e3+23*g3); { setcolor(BROWN); bar(h2+102*g2,e2,h2+103*g2,e2+9*g2);
bar(h3+13*g3,e3+3*g3,h3+15*g3,e3+7*g3); setfillstyle(1,BROWN); bar(h2+103*g2,e2,h2+119*g2,e2+1*g2);
bar(h3+13*g3,e3+8*g3,h3+15*g3,e3+21*g3); bar(h2+1*g2,e2+1*g2,h2+7*g2,e2+4*g2); bar(h2+103*g2,e2+4*g2,h2+109*g2,e2+5*g2);
bar(h3+13*g3,e3+21*g3,h3+14*g3,e3+22*g3); bar(h2+8*g2,e2+1*g2,h2+16*g2,e2+9*g2); bar(h2+109*g2,e2+1*g2,h2+110*g2,e2+9*g2);
bar(h3+14*g3,e3+2*g3,h3+18*g3,e3+3*g3); bar(h2+1*g2,e2+5*g2,h2+7*g2,e2+9*g2); bar(h2+118*g2,e2,h2+119*g2,e2+9*g2);
bar(h3+15*g3,e3+3*g3,h3+17*g3,e3+22*g3); setcolor(BLACK); setcolor(BROWN);
bar(h3+17*g3,e3+3*g3,h3+19*g3,e3+6*g3); setfillstyle(1,BLACK); setfillstyle(1,BROWN);
bar(h3+18*g3,e3+6*g3,h3+19*g3,e3+7*g3); bar(h2,e2,h2+1*g2,e2+9*g2); bar(h2+120*g2,e2+1*g2,h2+127*g2,e2+4*g2);
bar(h3+19*g3,e3+5*g3,h3+20*g3,e3+6*g3); bar(h2+1*g2,e2,h2+17*g2,e2+1*g2); bar(h2+127*g2,e2+1*g2,h2+135*g2,e2+9*g2);
bar(h3+19*g3,e3+6*g3,h3+21*g3,e3+8*g3); bar(h2+1*g2,e2+4*g2,h2+7*g2,e2+5*g2); bar(h2+120*g2,e2+5*g2,h2+126*g2,e2+9*g2);
bar(h3+17*g3,e3+7*g3,h3+18*g3,e3+8*g3); bar(h2+7*g2,e2+1*g2,h2+8*g2,e2+9*g2); setcolor(BLACK);
bar(h3+17*g3,e3+8*g3,h3+21*g3,e3+23*g3); bar(h2+16*g2,e2,h2+17*g2,e2+9*g2); setfillstyle(1,BLACK);
bar(h3+21*g3,e3+5*g3,h3+22*g3,e3+6*g3); setcolor(BROWN); bar(h2+119*g2,e2,h2+120*g2,e2+9*g2);
bar(h3+21*g3,e3+6*g3,h3+24*g3,e3+22*g3); setfillstyle(1,BROWN); bar(h2+120*g2,e2,h2+136*g2,e2+1*g2);
bar(h3+23*g3,e3+9*g3,h3+25*g3,e3+21*g3); bar(h2+18*g2,e2+1*g2,h2+25*g2,e2+4*g2); bar(h2+120*g2,e2+4*g2,h2+126*g2,e2+5*g2);
bar(h3+24*g3,e3+21*g3,h3+25*g3,e3+22*g3); bar(h2+25*g2,e2+1*g2,h2+33*g2,e2+9*g2); bar(h2+126*g2,e2+1*g2,h2+127*g2,e2+9*g2);
bar(h3+26*g3,e3+7*g3,h3+27*g3,e3+8*g3); bar(h2+18*g2,e2+5*g2,h2+24*g2,e2+9*g2); bar(h2+135*g2,e2,h2+136*g2,e2+9*g2);
bar(h3+25*g3,e3+8*g3,h3+28*g3,e3+22*g3); setcolor(BLACK); setfillstyle(1,BROWN);
bar(h3+27*g3,e3+5*g3,h3+29*g3,e3+8*g3); setfillstyle(1,BLACK); bar(h2+137*g2,e2+1*g2,h2+144*g2,e2+4*g2);
bar(h3+26*g3,e3+22*g3,h3+29*g3,e3+23*g3); bar(h2+17*g2,e2,h2+18*g2,e2+9*g2); bar(h2+144*g2,e2+1*g2,h2+152*g2,e2+9*g2);
bar(h3+30*g3,e3+3*g3,h3+33*g3,e3+4*g3); bar(h2+18*g2,e2,h2+34*g2,e2+1*g2); bar(h2+137*g2,e2+5*g2,h2+143*g2,e2+9*g2);
bar(h3+29*g3,e3+4*g3,h3+31*g3,e3+7*g3); bar(h2+18*g2,e2+4*g2,h2+24*g2,e2+5*g2); setcolor(BLACK);
bar(h3+29*g3,e3+8*g3,h3+30*g3,e3+9*g3); bar(h2+24*g2,e2+1*g2,h2+25*g2,e2+9*g2); setfillstyle(1,BLACK);
bar(h2+33*g2,e2,h2+34*g2,e2+9*g2); bar(h2+136*g2,e2,h2+137*g2,e2+9*g2);
bar(h3+28*g3,e3+9*g3,h3+30*g3,e3+22*g3); setcolor(BROWN); bar(h2+137*g2,e2,h2+153*g2,e2+1*g2);
bar(h3+31*g3,e3+4*g3,h3+34*g3,e3+6*g3); setfillstyle(1,BROWN); bar(h2+137*g2,e2+4*g2,h2+143*g2,e2+5*g2);
bar(h3+31*g3,e3+6*g3,h3+32*g3,e3+7*g3); bar(h2+35*g2,e2+1*g2,h2+42*g2,e2+4*g2); bar(h2+143*g2,e2+1*g2,h2+144*g2,e2+9*g2);
bar(h3+30*g3,e3+8*g3,h3+31*g3,e3+21*g3); bar(h2+42*g2,e2+1*g2,h2+50*g2,e2+9*g2); bar(h2+152*g2,e2,h2+153*g2,e2+9*g2);
bar(h3+31*g3,e3+7*g3,h3+33*g3,e3+22*g3); bar(h2+35*g2,e2+5*g2,h2+41*g2,e2+9*g2); setfillstyle(1,BROWN);
bar(h3+33*g3,e3+6*g3,h3+35*g3,e3+7*g3); setcolor(BLACK); bar(h2+154*g2,e2+1*g2,h2+161*g2,e2+4*g2);
bar(h3+33*g3,e3+7*g3,h3+37*g3,e3+23*g3); setfillstyle(1,BLACK); bar(h2+161*g2,e2+1*g2,h2+169*g2,e2+9*g2);
bar(h3+36*g3,e3+6*g3,h3+37*g3,e3+7*g3); bar(h2+34*g2,e2,h2+35*g2,e2+9*g2); bar(h2+154*g2,e2+5*g2,h2+160*g2,e2+9*g2);
bar(h3+37*g3,e3+7*g3,h3+38*g3,e3+22*g3); bar(h2+35*g2,e2,h2+51*g2,e2+1*g2); setcolor(BLACK);
bar(h3+38*g3,e3+10*g3,h3+39*g3,e3+22*g3); bar(h2+35*g2,e2+4*g2,h2+41*g2,e2+5*g2); setfillstyle(1,BLACK);
bar(h3+39*g3,e3+12*g3,h3+40*g3,e3+21*g3); bar(h2+41*g2,e2+1*g2,h2+42*g2,e2+9*g2); bar(h2+153*g2,e2,h2+154*g2,e2+9*g2);
bar(h3+40*g3,e3+13*g3,h3+42*g3,e3+22*g3); bar(h2+50*g2,e2,h2+51*g2,e2+9*g2); bar(h2+154*g2,e2,h2+170*g2,e2+1*g2);
bar(h3+41*g3,e3+12*g3,h3+42*g3,e3+13*g3); setcolor(BROWN); bar(h2+154*g2,e2+4*g2,h2+160*g2,e2+5*g2);
bar(h3+42*g3,e3+11*g3,h3+43*g3,e3+14*g3); setfillstyle(1,BROWN); bar(h2+160*g2,e2+1*g2,h2+161*g2,e2+9*g2);
bar(h3+42*g3,e3+14*g3,h3+44*g3,e3+21*g3); bar(h2+52*g2,e2+1*g2,h2+59*g2,e2+4*g2); bar(h2+169*g2,e2,h2+170*g2,e2+9*g2);
bar(h3+44*g3,e3+15*g3,h3+45*g3,e3+17*g3); bar(h2+59*g2,e2+1*g2,h2+67*g2,e2+9*g2); setfillstyle(1,BROWN);
bar(h3+45*g3,e3+14*g3,h3+46*g3,e3+16*g3); bar(h2+52*g2,e2+5*g2,h2+58*g2,e2+9*g2); bar(h2+171*g2,e2+1*g2,h2+178*g2,e2+4*g2);
bar(h3+44*g3,e3+18*g3,h3+45*g3,e3+20*g3); setcolor(BLACK); bar(h2+178*g2,e2+1*g2,h2+186*g2,e2+9*g2);
bar(h3+45*g3,e3+19*g3,h3+46*g3,e3+20*g3); setfillstyle(1,BLACK); bar(h2+171*g2,e2+5*g2,h2+177*g2,e2+9*g2);
} bar(h2+51*g2,e2,h2+52*g2,e2+9*g2); setcolor(BLACK);
bar(h2+52*g2,e2,h2+68*g2,e2+1*g2); setfillstyle(1,BLACK);
void juegos::sPoste(int h1, int e1, int g1) bar(h2+52*g2,e2+4*g2,h2+58*g2,e2+5*g2); bar(h2+170*g2,e2,h2+171*g2,e2+9*g2);
{ setcolor(BLACK); bar(h2+58*g2,e2+1*g2,h2+59*g2,e2+9*g2); bar(h2+171*g2,e2,h2+187*g2,e2+1*g2);
setfillstyle(1,BLACK); bar(h2+67*g2,e2,h2+68*g2,e2+9*g2); bar(h2+171*g2,e2+4*g2,h2+178*g2,e2+5*g2);
bar(h1,e1,h1+32*g1,e1+1*g1); setcolor(BROWN); bar(h2+177*g2,e2+1*g2,h2+178*g2,e2+9*g2);
bar(h1,e1+1*g1,h1+1*g1,e1+14*g1); setfillstyle(1,BROWN); bar(h2+186*g2,e2,h2+187*g2,e2+9*g2);
bar(h1+1*g1,e1+13*g1,h1+31*g1,e1+14*g1); bar(h2+69*g2,e2+1*g2,h2+76*g2,e2+4*g2); setfillstyle(1,BROWN);
bar(h1+31*g1,e1+1*g1,h1+32*g1,e1+14*g1); bar(h2+76*g2,e2+1*g2,h2+84*g2,e2+9*g2); bar(h2+188*g2,e2+1*g2,h2+195*g2,e2+4*g2);
bar(h1+2*g1,e1+14*g1,h1+3*g1,e1+32*g1); bar(h2+69*g2,e2+5*g2,h2+75*g2,e2+9*g2); bar(h2+195*g2,e2+1*g2,h2+203*g2,e2+9*g2);
bar(h1+3*g1,e1+14*g1,h1+30*g1,e1+15*g1); setcolor(BLACK); bar(h2+188*g2,e2+5*g2,h2+194*g2,e2+9*g2);
bar(h1+29*g1,e1+14*g1,h1+30*g1,e1+32*g1); setfillstyle(1,BLACK); setcolor(BLACK);
setcolor(GREEN); bar(h2+68*g2,e2,h2+69*g2,e2+9*g2); setfillstyle(1,BLACK);
setfillstyle(1,GREEN); bar(h2+69*g2,e2,h2+85*g2,e2+1*g2); bar(h2+187*g2,e2,h2+188*g2,e2+9*g2);
bar(h1+1*g1,e1+2*g1,h1+6*g1,e1+3*g1); bar(h2+69*g2,e2+4*g2,h2+75*g2,e2+5*g2); bar(h2+188*g2,e2,h2+204*g2,e2+1*g2);
bar(h1+4*g1,e1+3*g1,h1+6*g1,e1+13*g1); bar(h2+75*g2,e2+1*g2,h2+76*g2,e2+9*g2); bar(h2+188*g2,e2+4*g2,h2+195*g2,e2+5*g2);
bar(h1+12*g1,e1+2*g1,h1+31*g1,e1+3*g1); bar(h2+84*g2,e2,h2+85*g2,e2+9*g2); bar(h2+194*g2,e2+1*g2,h2+195*g2,e2+9*g2);
bar(h1+12*g1,e1+3*g1,h1+13*g1,e1+13*g1); setcolor(BROWN); bar(h2+203*g2,e2,h2+204*g2,e2+9*g2);
bar(h1+15*g1,e1+3*g1,h1+25*g1,e1+13*g1); setfillstyle(1,BROWN); setfillstyle(1,BROWN);
bar(h1+6*g1,e1+15*g1,h1+8*g1,e1+32*g1); bar(h2+86*g2,e2+1*g2,h2+93*g2,e2+4*g2); bar(h2+205*g2,e2+1*g2,h2+212*g2,e2+4*g2);
bar(h1+13*g1,e1+15*g1,h1+14*g1,e1+32*g1); bar(h2+93*g2,e2+1*g2,h2+101*g2,e2+9*g2); bar(h2+212*g2,e2+1*g2,h2+220*g2,e2+9*g2);
bar(h1+16*g1,e1+15*g1,h1+24*g1,e1+32*g1); bar(h2+86*g2,e2+5*g2,h2+92*g2,e2+9*g2); bar(h2+205*g2,e2+5*g2,h2+211*g2,e2+9*g2);
setcolor(LIGHTGREEN); setcolor(BLACK); setcolor(BLACK);
setfillstyle(1,LIGHTGREEN); setfillstyle(1,BLACK); setfillstyle(1,BLACK);
bar(h1+1*g1,e1+1*g1,h1+31*g1,e1+2*g1); bar(h2+85*g2,e2,h2+86*g2,e2+9*g2); bar(h2+204*g2,e2,h2+205*g2,e2+9*g2);
bar(h1+1*g1,e1+3*g1,h1+4*g1,e1+13*g1); bar(h2+86*g2,e2,h2+102*g2,e2+1*g2); bar(h2+205*g2,e2,h2+221*g2,e2+1*g2);
bar(h1+6*g1,e1+2*g1,h1+12*g1,e1+13*g1); bar(h2+86*g2,e2+4*g2,h2+92*g2,e2+5*g2); bar(h2+205*g2,e2+4*g2,h2+212*g2,e2+5*g2);
bar(h1+13*g1,e1+3*g1,h1+15*g1,e1+13*g1); bar(h2+92*g2,e2+1*g2,h2+93*g2,e2+9*g2); bar(h2+211*g2,e2+1*g2,h2+212*g2,e2+9*g2);
bar(h1+25*g1,e1+3*g1,h1+31*g1,e1+13*g1); bar(h2+101*g2,e2,h2+102*g2,e2+9*g2); bar(h2+220*g2,e2,h2+221*g2,e2+9*g2);
bar(h1+3*g1,e1+15*g1,h1+6*g1,e1+32*g1); setcolor(BROWN); setfillstyle(1,BROWN);
bar(h1+8*g1,e1+15*g1,h1+13*g1,e1+32*g1); setfillstyle(1,BROWN); bar(h2+222*g2,e2+1*g2,h2+229*g2,e2+4*g2);
bar(h2+229*g2,e2+1*g2,h2+237*g2,e2+9*g2); bar(h4+21*g4,e4+22*g4,h4+23*g4,e4+23*g4); bar(h5+4*g5,e5+10*g5,h5+5*g5,e5+11*g5);
bar(h2+222*g2,e2+5*g2,h2+228*g2,e2+9*g2); bar(h4+17*g4,e4+23*g4,h4+21*g4,e4+24*g4); bar(h5+5*g5,e5+9*g5,h5+8*g5,e5+10*g5);
setcolor(BLACK); bar(h4+15*g4,e4+22*g4,h4+17*g4,e4+23*g4); bar(h5+8*g5,e5+8*g5,h5+9*g5,e5+9*g5);
setfillstyle(1,BLACK); bar(h4+14*g4,e4+21*g4,h4+15*g4,e4+22*g4); bar(h5+9*g5,e5+7*g5,h5+10*g5,e5+8*g5);
bar(h2+221*g2,e2,h2+222*g2,e2+9*g2); bar(h4+13*g4,e4+22*g4,h4+14*g4,e4+23*g4); bar(h5+10*g5,e5+4*g5,h5+11*g5,e5+7*g5);
bar(h2+222*g2,e2,h2+238*g2,e2+1*g2); bar(h4+10*g4,e4+23*g4,h4+13*g4,e4+24*g4); bar(h5+11*g5,e5+3*g5,h5+13*g5,e5+4*g5);
bar(h2+222*g2,e2+4*g2,h2+229*g2,e2+5*g2); bar(h4+8*g4,e4+22*g4,h4+10*g4,e4+23*g4); bar(h5+13*g5,e5+2*g5,h5+14*g5,e5+3*g5);
bar(h2+228*g2,e2+1*g2,h2+229*g2,e2+9*g2); bar(h4+7*g4,e4+21*g4,h4+8*g4,e4+22*g4); bar(h5+14*g5,e5+1*g5,h5+18*g5,e5+2*g5);
bar(h2+237*g2,e2,h2+238*g2,e2+9*g2); bar(h4+4*g4,e4+20*g4,h4+7*g4,e4+21*g4); bar(h5+18*g5,e5+2*g5,h5+19*g5,e5+3*g5);
setfillstyle(1,BROWN); bar(h4+3*g4,e4+18*g4,h4+4*g4,e4+20*g4); bar(h5+19*g5,e5+3*g5,h5+20*g5,e5+5*g5);
bar(h2+239*g2,e2+1*g2,h2+246*g2,e2+4*g2); bar(h5+20*g5,e5+5*g5,h5+21*g5,e5+6*g5);
bar(h2+246*g2,e2+1*g2,h2+254*g2,e2+9*g2); bar(h4+2*g4,e4+17*g4,h4+3*g4,e4+18*g4); bar(h5+21*g5,e5+4*g5,h5+22*g5,e5+5*g5);
bar(h2+239*g2,e2+5*g2,h2+245*g2,e2+9*g2); bar(h4+1*g4,e4+15*g4,h4+2*g4,e4+17*g4); bar(h5+22*g5,e5+5*g5,h5+23*g5,e5+6*g5);
setcolor(BLACK); bar(h4+0*g4,e4+13*g4,h4+1*g4,e4+15*g4); bar(h5+23*g5,e5+6*g5,h5+24*g5,e5+8*g5);
setfillstyle(1,BLACK); setcolor(GREEN); bar(h5+23*g5,e5+8*g5,h5+25*g5,e5+9*g5);
bar(h2+238*g2,e2,h2+239*g2,e2+9*g2); setfillstyle(1,GREEN); bar(h5+25*g5,e5+7*g5,h5+26*g5,e5+8*g5);
bar(h2+239*g2,e2,h2+255*g2,e2+1*g2); bar(h4+1*g4,e4+13*g4,h4+3*g4,e4+15*g4); bar(h5+26*g5,e5+5*g5,h5+27*g5,e5+7*g5);
bar(h2+239*g2,e2+4*g2,h2+246*g2,e2+5*g2); bar(h4+2*g4,e4+15*g4,h4+3*g4,e4+17*g4); bar(h5+27*g5,e5+4*g5,h5+29*g5,e5+5*g5);
bar(h2+245*g2,e2+1*g2,h2+246*g2,e2+9*g2); bar(h4+3*g4,e4+12*g4,h4+4*g4,e4+18*g4); bar(h5+29*g5,e5+3*g5,h5+30*g5,e5+4*g5);
bar(h2+254*g2,e2,h2+255*g2,e2+9*g2); bar(h4+4*g4,e4+11*g4,h4+5*g4,e4+12*g4); bar(h5+30*g5,e5+2*g5,h5+33*g5,e5+3*g5);
bar(h4+4*g4,e4+12*g4,h4+7*g4,e4+20*g4); bar(h5+33*g5,e5+3*g5,h5+34*g5,e5+4*g5);
} bar(h4+5*g4,e4+10*g4,h4+8*g4,e4+12*g4); bar(h5+34*g5,e5+4*g5,h5+35*g5,e5+6*g5);
bar(h4+8*g4,e4+9*g4,h4+9*g4,e4+12*g4); bar(h5+35*g5,e5+6*g5,h5+36*g5,e5+7*g5);
void juegos::sPasto1(int h4, int e4, int g4) bar(h4+7*g4,e4+12*g4,h4+9*g4,e4+21*g4); bar(h5+36*g5,e5+5*g5,h5+37*g5,e5+6*g5);
{ setcolor(BLACK); bar(h4+9*g4,e4+8*g4,h4+10*g4,e4+21*g4); bar(h5+37*g5,e5+6*g5,h5+38*g5,e5+7*g5);
setfillstyle(1,BLACK); bar(h4+8*g4,e4+21*g4,h4+10*g4,e4+22*g4); bar(h5+38*g5,e5+7*g5,h5+39*g5,e5+10*g5);
bar(h4,e4+13*g4,h4+1*g4,e4+15*g4); bar(h4+11*g4,e4+4*g4,h4+13*g4,e4+7*g4); bar(h5+39*g5,e5+10*g5,h5+40*g5,e5+12*g5);
bar(h4+1*g4,e4+12*g4,h4+3*g4,e4+13*g4); bar(h4+10*g4,e4+7*g4,h4+12*g4,e4+9*g4); bar(h5+40*g5,e5+12*g5,h5+41*g5,e5+13*g5);
bar(h4+3*g4,e4+11*g4,h4+4*g4,e4+12*g4); bar(h4+10*g4,e4+9*g4,h4+13*g4,e4+23*g4); bar(h5+41*g5,e5+11*g5,h5+42*g5,e5+12*g5);
bar(h4+4*g4,e4+10*g4,h4+5*g4,e4+11*g4); bar(h4+13*g4,e4+3*g4,h4+15*g4,e4+7*g4); bar(h5+42*g5,e5+10*g5,h5+43*g5,e5+11*g5);
bar(h4+5*g4,e4+9*g4,h4+8*g4,e4+10*g4); bar(h4+13*g4,e4+8*g4,h4+15*g4,e4+21*g4); bar(h5+43*g5,e5+11*g5,h5+44*g5,e5+14*g5);
bar(h4+8*g4,e4+8*g4,h4+9*g4,e4+9*g4); bar(h4+13*g4,e4+21*g4,h4+14*g4,e4+22*g4); bar(h5+44*g5,e5+14*g5,h5+45*g5,e5+15*g5);
bar(h4+9*g4,e4+7*g4,h4+10*g4,e4+8*g4); bar(h4+14*g4,e4+2*g4,h4+18*g4,e4+3*g4); bar(h5+45*g5,e5+13*g5,h5+46*g5,e5+14*g5);
bar(h4+10*g4,e4+4*g4,h4+11*g4,e4+7*g4); bar(h4+15*g4,e4+3*g4,h4+17*g4,e4+22*g4); bar(h5+46*g5,e5+14*g5,h5+47*g5,e5+16*g5);
bar(h4+11*g4,e4+3*g4,h4+13*g4,e4+4*g4); bar(h4+17*g4,e4+3*g4,h4+19*g4,e4+6*g4); bar(h5+45*g5,e5+16*g5,h5+46*g5,e5+17*g5);
bar(h4+13*g4,e4+2*g4,h4+14*g4,e4+3*g4); bar(h4+18*g4,e4+6*g4,h4+19*g4,e4+7*g4); bar(h5+44*g5,e5+17*g5,h5+45*g5,e5+18*g5);
bar(h4+14*g4,e4+1*g4,h4+18*g4,e4+2*g4); bar(h4+19*g4,e4+5*g4,h4+20*g4,e4+6*g4); bar(h5+45*g5,e5+18*g5,h5+46*g5,e5+19*g5);
bar(h4+18*g4,e4+2*g4,h4+19*g4,e4+3*g4); bar(h4+19*g4,e4+6*g4,h4+21*g4,e4+8*g4); bar(h5+46*g5,e5+19*g5,h5+47*g5,e5+20*g5);
bar(h4+19*g4,e4+3*g4,h4+20*g4,e4+5*g4); bar(h4+17*g4,e4+7*g4,h4+18*g4,e4+8*g4); bar(h5+44*g5,e5+20*g5,h5+46*g5,e5+21*g5);
bar(h4+20*g4,e4+5*g4,h4+21*g4,e4+6*g4); bar(h4+17*g4,e4+8*g4,h4+21*g4,e4+23*g4); bar(h5+42*g5,e5+21*g5,h5+44*g5,e5+22*g5);
bar(h4+21*g4,e4+4*g4,h4+22*g4,e4+5*g4); bar(h4+21*g4,e4+5*g4,h4+22*g4,e4+6*g4); bar(h5+40*g5,e5+22*g5,h5+42*g5,e5+23*g5);
bar(h4+22*g4,e4+5*g4,h4+23*g4,e4+6*g4); bar(h4+21*g4,e4+6*g4,h4+24*g4,e4+22*g4); bar(h5+39*g5,e5+21*g5,h5+40*g5,e5+22*g5);
bar(h4+23*g4,e4+6*g4,h4+24*g4,e4+8*g4); bar(h4+23*g4,e4+9*g4,h4+25*g4,e4+21*g4); bar(h5+37*g5,e5+22*g5,h5+39*g5,e5+23*g5);
bar(h4+23*g4,e4+8*g4,h4+25*g4,e4+9*g4); bar(h4+24*g4,e4+21*g4,h4+25*g4,e4+22*g4); bar(h5+33*g5,e5+23*g5,h5+37*g5,e5+24*g5);
bar(h4+25*g4,e4+7*g4,h4+26*g4,e4+8*g4); bar(h4+26*g4,e4+7*g4,h4+27*g4,e4+8*g4); bar(h5+31*g5,e5+22*g5,h5+33*g5,e5+23*g5);
bar(h4+26*g4,e4+5*g4,h4+27*g4,e4+7*g4); bar(h4+25*g4,e4+8*g4,h4+28*g4,e4+22*g4); bar(h5+30*g5,e5+21*g5,h5+31*g5,e5+22*g5);
bar(h4+27*g4,e4+4*g4,h4+29*g4,e4+5*g4); bar(h4+27*g4,e4+5*g4,h4+29*g4,e4+8*g4); bar(h5+29*g5,e5+22*g5,h5+30*g5,e5+23*g5);
bar(h4+29*g4,e4+3*g4,h4+30*g4,e4+4*g4); bar(h4+26*g4,e4+22*g4,h4+29*g4,e4+23*g4); bar(h5+26*g5,e5+23*g5,h5+29*g5,e5+24*g5);
bar(h4+30*g4,e4+2*g4,h4+33*g4,e4+3*g4); bar(h4+30*g4,e4+3*g4,h4+33*g4,e4+4*g4); bar(h5+24*g5,e5+22*g5,h5+26*g5,e5+23*g5);
bar(h4+33*g4,e4+3*g4,h4+34*g4,e4+4*g4); bar(h4+29*g4,e4+4*g4,h4+31*g4,e4+7*g4); bar(h5+23*g5,e5+21*g5,h5+24*g5,e5+22*g5);
bar(h4+34*g4,e4+4*g4,h4+35*g4,e4+6*g4); bar(h4+29*g4,e4+8*g4,h4+30*g4,e4+9*g4); bar(h5+21*g5,e5+22*g5,h5+23*g5,e5+23*g5);
bar(h4+35*g4,e4+6*g4,h4+36*g4,e4+7*g4); bar(h5+17*g5,e5+23*g5,h5+21*g5,e5+24*g5);
bar(h4+36*g4,e4+5*g4,h4+37*g4,e4+6*g4); bar(h4+28*g4,e4+9*g4,h4+30*g4,e4+22*g4); bar(h5+15*g5,e5+22*g5,h5+17*g5,e5+23*g5);
bar(h4+37*g4,e4+6*g4,h4+38*g4,e4+7*g4); bar(h4+31*g4,e4+4*g4,h4+34*g4,e4+6*g4); bar(h5+14*g5,e5+21*g5,h5+15*g5,e5+22*g5);
bar(h4+38*g4,e4+7*g4,h4+39*g4,e4+10*g4); bar(h4+31*g4,e4+6*g4,h4+32*g4,e4+7*g4); bar(h5+13*g5,e5+22*g5,h5+14*g5,e5+23*g5);
bar(h4+39*g4,e4+10*g4,h4+40*g4,e4+12*g4); bar(h4+30*g4,e4+8*g4,h4+31*g4,e4+21*g4); bar(h5+10*g5,e5+23*g5,h5+13*g5,e5+24*g5);
bar(h4+40*g4,e4+12*g4,h4+41*g4,e4+13*g4); bar(h4+31*g4,e4+7*g4,h4+33*g4,e4+22*g4); bar(h5+8*g5,e5+22*g5,h5+10*g5,e5+23*g5);
bar(h4+41*g4,e4+11*g4,h4+42*g4,e4+12*g4); bar(h4+33*g4,e4+6*g4,h4+35*g4,e4+7*g4); bar(h5+7*g5,e5+21*g5,h5+8*g5,e5+22*g5);
bar(h4+42*g4,e4+10*g4,h4+43*g4,e4+11*g4); bar(h4+33*g4,e4+7*g4,h4+37*g4,e4+23*g4); bar(h5+4*g5,e5+20*g5,h5+7*g5,e5+21*g5);
bar(h4+43*g4,e4+11*g4,h4+44*g4,e4+14*g4); bar(h4+36*g4,e4+6*g4,h4+37*g4,e4+7*g4); bar(h5+3*g5,e5+18*g5,h5+4*g5,e5+20*g5);
bar(h4+44*g4,e4+14*g4,h4+45*g4,e4+15*g4); bar(h4+37*g4,e4+7*g4,h4+38*g4,e4+22*g4);
bar(h4+45*g4,e4+13*g4,h4+46*g4,e4+14*g4); bar(h4+38*g4,e4+10*g4,h4+39*g4,e4+22*g4); bar(h5+2*g5,e5+17*g5,h5+3*g5,e5+18*g5);
bar(h4+46*g4,e4+14*g4,h4+47*g4,e4+16*g4); bar(h4+39*g4,e4+12*g4,h4+40*g4,e4+21*g4); bar(h5+1*g5,e5+15*g5,h5+2*g5,e5+17*g5);
bar(h4+45*g4,e4+16*g4,h4+46*g4,e4+17*g4); bar(h4+40*g4,e4+13*g4,h4+42*g4,e4+22*g4); bar(h5+0*g5,e5+13*g5,h5+1*g5,e5+15*g5);
bar(h4+44*g4,e4+17*g4,h4+45*g4,e4+18*g4); bar(h4+41*g4,e4+12*g4,h4+42*g4,e4+13*g4); setcolor(GREEN);
bar(h4+45*g4,e4+18*g4,h4+46*g4,e4+19*g4); bar(h4+42*g4,e4+11*g4,h4+43*g4,e4+14*g4); setfillstyle(1,GREEN);
bar(h4+46*g4,e4+19*g4,h4+47*g4,e4+20*g4); bar(h4+42*g4,e4+14*g4,h4+44*g4,e4+21*g4); bar(h5+1*g5,e5+13*g5,h5+3*g5,e5+15*g5);
bar(h4+44*g4,e4+20*g4,h4+46*g4,e4+21*g4); bar(h4+44*g4,e4+15*g4,h4+45*g4,e4+17*g4); bar(h5+2*g5,e5+15*g5,h5+3*g5,e5+17*g5);
bar(h4+42*g4,e4+21*g4,h4+44*g4,e4+22*g4); bar(h4+45*g4,e4+14*g4,h4+46*g4,e4+16*g4); bar(h5+3*g5,e5+12*g5,h5+4*g5,e5+18*g5);
bar(h4+40*g4,e4+22*g4,h4+42*g4,e4+23*g4); bar(h4+44*g4,e4+18*g4,h4+45*g4,e4+20*g4); bar(h5+4*g5,e5+11*g5,h5+5*g5,e5+12*g5);
bar(h4+39*g4,e4+21*g4,h4+40*g4,e4+22*g4); bar(h4+45*g4,e4+19*g4,h4+46*g4,e4+20*g4); bar(h5+4*g5,e5+12*g5,h5+7*g5,e5+20*g5);
bar(h4+37*g4,e4+22*g4,h4+39*g4,e4+23*g4); } bar(h5+5*g5,e5+10*g5,h5+8*g5,e5+12*g5);
bar(h4+33*g4,e4+23*g4,h4+37*g4,e4+24*g4); bar(h5+8*g5,e5+9*g5,h5+9*g5,e5+12*g5);
bar(h4+31*g4,e4+22*g4,h4+33*g4,e4+23*g4); void juegos::sPasto2(int h5, int e5, int g5) bar(h5+7*g5,e5+12*g5,h5+9*g5,e5+21*g5);
bar(h4+30*g4,e4+21*g4,h4+31*g4,e4+22*g4); { setcolor(BLACK); bar(h5+9*g5,e5+8*g5,h5+10*g5,e5+21*g5);
bar(h4+29*g4,e4+22*g4,h4+30*g4,e4+23*g4); setfillstyle(1,BLACK); bar(h5+8*g5,e5+21*g5,h5+10*g5,e5+22*g5);
bar(h4+26*g4,e4+23*g4,h4+29*g4,e4+24*g4); bar(h5,e5+13*g5,h5+1*g5,e5+15*g5); bar(h5+11*g5,e5+4*g5,h5+13*g5,e5+7*g5);
bar(h4+24*g4,e4+22*g4,h4+26*g4,e4+23*g4); bar(h5+1*g5,e5+12*g5,h5+3*g5,e5+13*g5); bar(h5+10*g5,e5+7*g5,h5+12*g5,e5+9*g5);
bar(h4+23*g4,e4+21*g4,h4+24*g4,e4+22*g4); bar(h5+3*g5,e5+11*g5,h5+4*g5,e5+12*g5); bar(h5+10*g5,e5+9*g5,h5+13*g5,e5+23*g5);
bar(h5+13*g5,e5+3*g5,h5+15*g5,e5+7*g5); bar(x1,y1+8*c,x1+2*c,y1+9*c);//31 bar(x-6*c,y+19*c,x-2*c,y+21*c);//52
bar(h5+13*g5,e5+8*g5,h5+15*g5,e5+21*g5); bar(x1+6*c,y1+8*c,x1+8*c,y1+9*c);//32 bar(x+6*c,y+19*c,x+10*c,y+21*c);//53
bar(h5+13*g5,e5+21*g5,h5+14*g5,e5+22*g5); bar(x1-4*c,y1+9*c,x1-3*c,y1+10*c);//33 bar(x-5*c,y+21*c,x-2*c,y+22*c);//54
bar(h5+14*g5,e5+2*g5,h5+18*g5,e5+3*g5); bar(x1-1*c,y1+9*c,x1+8*c,y1+10*c);//34 bar(x+6*c,y+21*c,x+9*c,y+22*c);//55
bar(h5+15*g5,e5+3*g5,h5+17*g5,e5+22*g5); bar(x1-4*c,y1+10*c,x1-1*c,y1+11*c);//35 bar(x-5*c,y+22*c,x-3*c,y+23*c);//56
bar(h5+17*g5,e5+3*g5,h5+19*g5,e5+6*g5); bar(x1+7*c,y1+10*c,x1+9*c,y1+11*c);//36 bar(x+7*c,y+22*c,x+9*c,y+23*c);//57
bar(h5+18*g5,e5+6*g5,h5+19*g5,e5+7*g5); } setfillstyle(1,BROWN);
bar(h5+19*g5,e5+5*g5,h5+20*g5,e5+6*g5); bar(x-4*c,y+27*c,x,y+29*c);//58
bar(h5+19*g5,e5+6*g5,h5+21*g5,e5+8*g5); void juegos::sMarioParadoDer(int x, int y,int c) bar(x+4*c,y+27*c,x+8*c,y+29*c);//59
bar(h5+17*g5,e5+7*g5,h5+18*g5,e5+8*g5); { //cabeza bar(x-6*c,y+29*c,x,y+31*c);//60
bar(h5+17*g5,e5+8*g5,h5+21*g5,e5+23*g5); setcolor(BLACK); bar(x+4*c,y+29*c,x+10*c,y+31*c);//61
bar(h5+21*g5,e5+5*g5,h5+22*g5,e5+6*g5); setfillstyle(1,RED); setfillstyle(1,YELLOW);
bar(h5+21*g5,e5+6*g5,h5+24*g5,e5+22*g5); bar(x,y,x+5*c,y+1*c);//1 bar(x-1*c,y+19*c,x,y+20*c);//62
bar(h5+23*g5,e5+9*g5,h5+25*g5,e5+21*g5); bar(x-2*c,y+1*c,x+5*c,y+2*c);//2 bar(x+4*c,y+19*c,x+5*c,y+20*c);//63
bar(h5+24*g5,e5+21*g5,h5+25*g5,e5+22*g5); bar(x-3*c,y+2*c,x+4*c,y+3*c);//3 }
bar(h5+26*g5,e5+7*g5,h5+27*g5,e5+8*g5); bar(x-3*c,y+3*c,x+9*c,y+4*c);//4 void juegos::sMarioParadoDer1(int x, int y,int c)
bar(h5+25*g5,e5+8*g5,h5+28*g5,e5+22*g5); setfillstyle(1,BLACK); { //cabeza
bar(h5+27*g5,e5+5*g5,h5+29*g5,e5+8*g5); bar(x+4*c,y+1*c,x+5*c,y+2*c);//5 setcolor(BLACK);
bar(h5+26*g5,e5+22*g5,h5+29*g5,e5+23*g5); bar(x+3*c,y+2*c,x+5*c,y+3*c);//6 setfillstyle(1,BLUE);
bar(h5+30*g5,e5+3*g5,h5+33*g5,e5+4*g5); bar(x,y,x+5*c,y+1*c);//1
bar(h5+29*g5,e5+4*g5,h5+31*g5,e5+7*g5); setfillstyle(1,BROWN); bar(x-2*c,y+1*c,x+5*c,y+2*c);//2
bar(h5+29*g5,e5+8*g5,h5+30*g5,e5+9*g5); bar(x-4*c,y+5*c,x-3*c,y+7*c);//7 bar(x-3*c,y+2*c,x+4*c,y+3*c);//3
bar(x-5*c,y+7*c,x-3*c,y+10*c);//8 bar(x-3*c,y+3*c,x+9*c,y+4*c);//4
bar(h5+28*g5,e5+9*g5,h5+30*g5,e5+22*g5); bar(x-3*c,y+9*c,x-2*c,y+11*c);//9 setfillstyle(1,BLACK);
bar(h5+31*g5,e5+4*g5,h5+34*g5,e5+6*g5); bar(x-2*c,y+10*c,x-1*c,y+11*c);//10 bar(x+4*c,y+1*c,x+5*c,y+2*c);//5
bar(h5+31*g5,e5+6*g5,h5+32*g5,e5+7*g5); bar(x+3*c,y+2*c,x+5*c,y+3*c);//6
bar(h5+30*g5,e5+8*g5,h5+31*g5,e5+21*g5); bar(x-3*c,y+4*c,x,y+5*c);//11
bar(h5+31*g5,e5+7*g5,h5+33*g5,e5+22*g5); bar(x+2*c,y+4*c,x+3*c,y+5*c);//12 setfillstyle(1,BROWN);
bar(h5+33*g5,e5+6*g5,h5+35*g5,e5+7*g5); bar(x-1*c,y+5*c,x,y+6*c);//13 bar(x-4*c,y+5*c,x-3*c,y+7*c);//7
bar(h5+33*g5,e5+7*g5,h5+37*g5,e5+23*g5); bar(x+2*c,y+5*c,x+4*c,y+6*c);//14 bar(x-5*c,y+7*c,x-3*c,y+10*c);//8
bar(h5+36*g5,e5+6*g5,h5+37*g5,e5+7*g5); bar(x-1*c,y+6*c,x+1*c,y+8*c);//15 bar(x-3*c,y+9*c,x-2*c,y+11*c);//9
bar(h5+37*g5,e5+7*g5,h5+38*g5,e5+22*g5); bar(x+4*c,y+7*c,x+5*c,y+8*c);//16 bar(x-2*c,y+10*c,x-1*c,y+11*c);//10
bar(h5+38*g5,e5+10*g5,h5+39*g5,e5+22*g5); bar(x+2*c,y+8*c,x+9*c,y+9*c);//17
bar(h5+39*g5,e5+12*g5,h5+40*g5,e5+21*g5); bar(x+3*c,y+9*c,x+9*c,y+10*c);//18 bar(x-3*c,y+4*c,x,y+5*c);//11
bar(h5+40*g5,e5+13*g5,h5+42*g5,e5+22*g5); bar(x+4*c,y+11*c,x+5*c,y+12*c);//19 bar(x+2*c,y+4*c,x+3*c,y+5*c);//12
bar(h5+41*g5,e5+12*g5,h5+42*g5,e5+13*g5); bar(x-1*c,y+5*c,x,y+6*c);//13
bar(h5+42*g5,e5+11*g5,h5+43*g5,e5+14*g5); bar(x+2*c,y+5*c,x+4*c,y+6*c);//14
bar(h5+42*g5,e5+14*g5,h5+44*g5,e5+21*g5); setfillstyle(1,YELLOW); bar(x-1*c,y+6*c,x+1*c,y+8*c);//15
bar(h5+44*g5,e5+15*g5,h5+45*g5,e5+17*g5); bar(x-3*c,y+5*c,x-1*c,y+9*c);//20 bar(x+4*c,y+7*c,x+5*c,y+8*c);//16
bar(h5+45*g5,e5+14*g5,h5+46*g5,e5+16*g5); bar(x,y+4*c,x+2*c,y+6*c);//21 bar(x+2*c,y+8*c,x+9*c,y+9*c);//17
bar(h5+44*g5,e5+18*g5,h5+45*g5,e5+20*g5); bar(x+3*c,y+4*c,x+7*c,y+5*c);//22 bar(x+3*c,y+9*c,x+9*c,y+10*c);//18
bar(h5+45*g5,e5+19*g5,h5+46*g5,e5+20*g5); bar(x+4*c,y+5*c,x+9*c,y+6*c);//23 bar(x+4*c,y+11*c,x+5*c,y+12*c);//19
} bar(x+1*c,y+6*c,x+11*c,y+7*c);//24
bar(x+1*c,y+7*c,x+4*c,y+8*c);//25
void juegos::hongo2(int x1, int y1,int c,int sf) bar(x+5*c,y+7*c,x+11*c,y+8*c);//26 setfillstyle(1,YELLOW);
{ bar(x-1*c,y+8*c,x+2*c,y+9*c);//27 bar(x-3*c,y+5*c,x-1*c,y+9*c);//20
setcolor(BLACK); bar(x-2*c,y+9*c,x+3*c,y+10*c);//28 bar(x,y+4*c,x+2*c,y+6*c);//21
setfillstyle(1,BLACK); bar(x-1*c,y+10*c,x+8*c,y+11*c);//29 bar(x+3*c,y+4*c,x+7*c,y+5*c);//22
bar(x1,y1,x1+6*c,y1+1*c);//1 bar(x-1*c,y+11*c,x+4*c,y+12*c);//30 bar(x+4*c,y+5*c,x+9*c,y+6*c);//23
bar(x1-1*c,y1+10*c,x1+7*c,y1+11*c);//2 bar(x+1*c,y+6*c,x+11*c,y+7*c);//24
bar(x1-4*c,y1+11*c,x1-1*c,y1+12*c);//4 setfillstyle(1,RED); bar(x+1*c,y+7*c,x+4*c,y+8*c);//25
bar(x1+7*c,y1+11*c,x1+10*c,y1+12*c);//5 bar(x-2*c,y+11*c,x-1*c,y+12*c);//31 bar(x+5*c,y+7*c,x+11*c,y+8*c);//26
bar(x1-3*c,y1+12*c,x1-2*c,y1+14*c);//6 bar(x-1*c,y+12*c,x,y+16*c);//32 bar(x-1*c,y+8*c,x+2*c,y+9*c);//27
bar(x1-2*c,y1+14*c,x1-1*c,y1+15*c);//10 bar(x+4*c,y+12*c,x+5*c,y+16*c);//33 bar(x-2*c,y+9*c,x+3*c,y+10*c);//28
bar(x1+1*c,y1+11*c,x1+2*c,y1+13*c);//7 bar(x-2*c,y+16*c,x,y+18*c);//34 bar(x-1*c,y+10*c,x+8*c,y+11*c);//29
bar(x1+4*c,y1+11*c,x1+5*c,y1+13*c);//8 bar(x+4*c,y+16*c,x+6*c,y+18*c);//35 bar(x-1*c,y+11*c,x+4*c,y+12*c);//30
bar(x1+8*c,y1+12*c,x1+9*c,y1+14*c);//9 bar(x-2*c,y+18*c,x+6*c,y+24*c);//36
bar(x1+7*c,y1+14*c,x1+8*c,y1+15*c);//11 bar(x-3*c,y+22*c,x-2*c,y+24*c);//37 setfillstyle(1,BLUE);
bar(x1-5*c,y1+5*c,x1-4*c,y1+11*c);//12 bar(x+6*c,y+22*c,x+7*c,y+24*c);//38 bar(x-2*c,y+11*c,x-1*c,y+12*c);//31
bar(x1+10*c,y1+5*c,x1+11*c,y1+11*c);//13 bar(x-4*c,y+23*c,x-3*c,y+24*c);//39 bar(x-1*c,y+12*c,x,y+16*c);//32
bar(x1-4*c,y1+3*c,x1-3*c,y1+5*c);//14 bar(x+7*c,y+23*c,x+8*c,y+24*c);//40 bar(x+4*c,y+12*c,x+5*c,y+16*c);//33
bar(x1+9*c,y1+3*c,x1+10*c,y1+5*c);//15 bar(x-5*c,y+24*c,x+1*c,y+25*c);//41 bar(x-2*c,y+16*c,x,y+18*c);//34
bar(x1-3*c,y1+2*c,x1-2*c,y1+3*c);//16 bar(x+3*c,y+24*c,x+9*c,y+25*c);//42 bar(x+4*c,y+16*c,x+6*c,y+18*c);//35
bar(x1+8*c,y1+2*c,x1+9*c,y1+3*c);//17 bar(x-5*c,y+25*c,x,y+27*c);//43 bar(x-2*c,y+18*c,x+6*c,y+24*c);//36
bar(x1-2*c,y1+1*c,x1,y1+2*c);//18 bar(x+4*c,y+25*c,x+9*c,y+27*c);//44 bar(x-3*c,y+22*c,x-2*c,y+24*c);//37
bar(x1+6*c,y1+1*c,x1+8*c,y1+2*c);//19 setfillstyle(1,BROWN); bar(x+6*c,y+22*c,x+7*c,y+24*c);//38
bar(x1-1*c,y1+15*c,x1+7*c,y1+16*c);//3 bar(x-2*c,y+12*c,x-1*c,y+16*c);//45 bar(x-4*c,y+23*c,x-3*c,y+24*c);//39
setfillstyle(1,sf); bar(x+5*c,y+12*c,x+6*c,y+16*c);//46 bar(x+7*c,y+23*c,x+8*c,y+24*c);//40
bar(x1+2*c,y1+1*c,x1+6*c,y1+3*c);//20 bar(x-3*c,y+13*c,x-2*c,y+19*c);//47 bar(x-5*c,y+24*c,x+1*c,y+25*c);//41
bar(x1+1*c,y1+3*c,x1+7*c,y1+4*c);//21 bar(x+6*c,y+13*c,x+7*c,y+19*c);//48 bar(x+3*c,y+24*c,x+9*c,y+25*c);//42
bar(x1,y1+4*c,x1+2*c,y1+5*c);//22 bar(x-4*c,y+14*c,x-3*c,y+19*c);//47 bar(x-5*c,y+25*c,x,y+27*c);//43
bar(x1+6*c,y1+4*c,x1+8*c,y1+5*c);//23 bar(x+7*c,y+14*c,x+8*c,y+19*c);//48 bar(x+4*c,y+25*c,x+9*c,y+27*c);//44
bar(x1-4*c,y1+5*c,x1+1*c,y1+6*c);//24 bar(x-5*c,y+15*c,x-4*c,y+19*c);//49 setfillstyle(1,LIGHTGRAY);
bar(x1+7*c,y1+5*c,x1+10*c,y1+6*c);//25 bar(x+8*c,y+15*c,x+9*c,y+19*c);//50 bar(x-2*c,y+12*c,x-1*c,y+16*c);//45
bar(x1-4*c,y1+6*c,x1-3*c,y1+7*c);//26 bar(x-6*c,y+17*c,x-5*c,y+19*c);//49 bar(x+5*c,y+12*c,x+6*c,y+16*c);//46
bar(x1-1*c,y1+6*c,x1+1*c,y1+7*c);//27 bar(x+9*c,y+17*c,x+10*c,y+19*c);//50 bar(x-3*c,y+13*c,x-2*c,y+19*c);//47
bar(x1+7*c,y1+6*c,x1+10*c,y1+7*c);//28 bar(x,y+12*c,x+4*c,y+18*c);//51 bar(x+6*c,y+13*c,x+7*c,y+19*c);//48
bar(x1,y1+7*c,x1+1*c,y1+8*c);//29 bar(x-4*c,y+14*c,x-3*c,y+19*c);//47
bar(x1+7*c,y1+7*c,x1+9*c,y1+8*c);//30 setfillstyle(1,YELLOW); bar(x+7*c,y+14*c,x+8*c,y+19*c);//48
bar(x-5*c,y+15*c,x-4*c,y+19*c);//49 bar(x+4*c,y+15*c,x+5,y+17*c);//15-17 bar(x-2*c,y+5*c,x-4*c,y+6*c);//14
bar(x+8*c,y+15*c,x+9*c,y+19*c);//50 bar(x-7*c,y+21*c,x-6,y+22*c);//21 bar(x+1*c,y+6*c,x-1*c,y+8*c);//15
bar(x-6*c,y+17*c,x-5*c,y+19*c);//49 bar(x-6*c,y+22*c,x-5,y+23*c);//22 bar(x-4*c,y+7*c,x-5*c,y+8*c);//16
bar(x+9*c,y+17*c,x+10*c,y+19*c);//50 bar(x-5*c,y+23*c,x-3,y+24*c);//23 bar(x-2*c,y+8*c,x-9*c,y+9*c);//17
bar(x,y+12*c,x+4*c,y+18*c);//51 bar(x-3*c,y+24*c,x-2,y+25*c);//24 bar(x-3*c,y+9*c,x-9*c,y+10*c);//18
bar(x-4*c,y+11*c,x-5*c,y+12*c);//19
setfillstyle(1,YELLOW); //Oberol
bar(x-6*c,y+19*c,x-2*c,y+21*c);//52 setfillstyle(1,RED); // cara
bar(x+6*c,y+19*c,x+10*c,y+21*c);//53 bar(x-2*c,y+11*c,x+2*c,y+12*c);//11 setfillstyle(1,YELLOW);
bar(x-5*c,y+21*c,x-2*c,y+22*c);//54 bar(x-3*c,y+12*c,x-1,y+13*c);//12 bar(x+3*c,y+5*c,x+1*c,y+9*c);//20
bar(x+6*c,y+21*c,x+9*c,y+22*c);//55 bar(x+2*c,y+12*c,x+3*c,y+15*c);//12-13-14 bar(x,y+4*c,x-2*c,y+6*c);//21
bar(x-5*c,y+22*c,x-3*c,y+23*c);//56 bar(x-4*c,y+13*c,x-2,y+14*c);//13 bar(x-3*c,y+4*c,x-7*c,y+5*c);//22
bar(x+7*c,y+22*c,x+9*c,y+23*c);//57 bar(x-6*c,y+14*c,x-3*c,y+15*c);//14 bar(x-4*c,y+5*c,x-9*c,y+6*c);//23
setfillstyle(1,LIGHTGRAY); bar(x+2*c,y+15*c,x+4*c,y+16*c);//15 bar(x-1*c,y+6*c,x-11*c,y+7*c);//24
bar(x-4*c,y+27*c,x,y+29*c);//58 bar(x+1*c,y+16*c,x+4*c,y+18*c);//16 bar(x-1*c,y+7*c,x-4*c,y+8*c);//25
bar(x+4*c,y+27*c,x+8*c,y+29*c);//59 bar(x,y+18*c,x+4*c,y+19*c);//18 bar(x-5*c,y+7*c,x-11*c,y+8*c);//26
bar(x-6*c,y+29*c,x,y+31*c);//60 bar(x-3*c,y+19*c,x+4*c,y+20*c);//19 bar(x+1*c,y+8*c,x-2*c,y+9*c);//27
bar(x+4*c,y+29*c,x+10*c,y+31*c);//61 bar(x-7*c,y+19*c,x-6*c,y+20*c);//19 bar(x+2*c,y+9*c,x-3*c,y+10*c);//28
setfillstyle(1,YELLOW); bar(x-7*c,y+20*c,x+4*c,y+21*c);//20 bar(x+1*c,y+10*c,x-8*c,y+11*c);//29
bar(x-1*c,y+19*c,x,y+20*c);//62 bar(x-6*c,y+21*c,x+4*c,y+22*c);//21 bar(x+1*c,y+11*c,x-4*c,y+12*c);//30
bar(x+4*c,y+19*c,x+5*c,y+20*c);//63 bar(x-9*c,y+22*c,x-6*c,y+23*c);//22
} bar(x-9*c,y+23*c,x-5*c,y+24*c);//23 //Cuerpo
bar(x-8*c,y+24*c,x-3*c,y+26*c);//24 setfillstyle(1,BROWN);
bar(x-5*c,y+22*c,x+3*c,y+23*c);//22 bar(x+1*c,y+10*c,x+2,y+11*c);//10
bar(x-3*c,y+23*c,x+3*c,y+24*c);//23 bar(x-2*c,y+11*c,x-4,y+12*c);//11
void juegos::sMarioParadoArrA(int x, int y,int c) bar(x-2*c,y+24*c,x+3*c,y+25*c);//24 bar(x+2*c,y+11*c,x+3,y+12*c);//11
{ //cabeza bar(x,y+25*c,x+3*c,y+26*c);//25 bar(x-4*c,y+12*c,x-3*c,y+13*c);//12
//Gorrito //Playera bar(x+3*c,y+12*c,x+4*c,y+13*c);//12
setcolor(BLACK); setfillstyle(1,BROWN); bar(x-5*c,y+13*c,x-4*c,y+14*c);//13
setfillstyle(1,RED); bar(x-1*c,y+12*c,x+2*c,y+13*c);//12 bar(x+3*c,y+13*c,x+4*c,y+14*c);//13
bar(x,y,x-6*c,y+1*c);//1 bar(x-2*c,y+13*c,x+2*c,y+14*c);//13 bar(x+4*c,y+14*c,x+5,y+15*c);//14
bar(x+2*c,y+1*c,x-5*c,y+2*c);//2 bar(x-3*c,y+14*c,x+2*c,y+15*c);//14 bar(x+4*c,y+15*c,x+5,y+17*c);//15-17
bar(x+3*c,y+2*c,x-4*c,y+3*c);//3 bar(x-6*c,y+15*c,x+2*c,y+16*c);//15 bar(x-7*c,y+21*c,x-6,y+22*c);//21
bar(x+3*c,y+3*c,x-9*c,y+4*c);//4 bar(x-6*c,y+16*c,x+1*c,y+17*c);//16 bar(x-6*c,y+22*c,x-5,y+23*c);//22
setfillstyle(1,BLACK); bar(x-7*c,y+17*c,x+1*c,y+18*c);//17 bar(x-5*c,y+23*c,x-3,y+24*c);//23
bar(x-5*c,y+1*c,x-6*c,y+2*c);//5 bar(x-7*c,y+18*c,x,y+19*c);//18 bar(x-3*c,y+24*c,x-2,y+25*c);//24
bar(x-4*c,y+2*c,x-6*c,y+3*c);//6 bar(x-6*c,y+19*c,x-3*c,y+20*c);//19
//Oberol
//Barba y cabello //Manos setfillstyle(1,BLUE);
setfillstyle(1,BROWN); setfillstyle(1,YELLOW); bar(x-2*c,y+11*c,x+2*c,y+12*c);//11
bar(x+4*c,y+5*c,x+3*c,y+7*c);//7 bar(x-8*c,y+14*c,x-6*c,y+15*c);//14 bar(x-3*c,y+12*c,x-1,y+13*c);//12
bar(x+5*c,y+7*c,x+3*c,y+10*c);//8 bar(x-11*c,y+15*c,x-6*c,y+17*c);//15 bar(x+2*c,y+12*c,x+3*c,y+15*c);//12-13-14
bar(x+3*c,y+9*c,x+2*c,y+11*c);//9 bar(x-11*c,y+17*c,x-7*c,y+19*c);//17 bar(x-4*c,y+13*c,x-2,y+14*c);//13
bar(x+2*c,y+10*c,x+1*c,y+11*c);//10 bar(x-6*c,y+14*c,x-3*c,y+15*c);//14
//Pies bar(x+2*c,y+15*c,x+4*c,y+16*c);//15
bar(x+3*c,y+4*c,x,y+5*c);//11 setfillstyle(1,BROWN); bar(x+1*c,y+16*c,x+4*c,y+18*c);//16
bar(x-2*c,y+4*c,x-3*c,y+5*c);//12 bar(x+3*c,y+22*c,x+8*c,y+27*c);//22 bar(x,y+18*c,x+4*c,y+19*c);//18
bar(x+1*c,y+5*c,x,y+6*c);//13 bar(x+5*c,y+27*c,x+8*c,y+28*c);//22 bar(x-3*c,y+19*c,x+4*c,y+20*c);//19
bar(x-2*c,y+5*c,x-4*c,y+6*c);//14 bar(x+6*c,y+28*c,x+8*c,y+29*c);//22 bar(x-7*c,y+19*c,x-6*c,y+20*c);//19
bar(x+1*c,y+6*c,x-1*c,y+8*c);//15 bar(x-7*c,y+20*c,x+4*c,y+21*c);//20
bar(x-4*c,y+7*c,x-5*c,y+8*c);//16 bar(x-6*c,y+21*c,x+4*c,y+22*c);//21
bar(x-2*c,y+8*c,x-9*c,y+9*c);//17 bar(x-8*c,y+26*c,x-3*c,y+30*c);//26 bar(x-9*c,y+22*c,x-6*c,y+23*c);//22
bar(x-3*c,y+9*c,x-9*c,y+10*c);//18 bar(x-10*c,y+28*c,x-8*c,y+30*c);//28 bar(x-9*c,y+23*c,x-5*c,y+24*c);//23
bar(x-4*c,y+11*c,x-5*c,y+12*c);//19 bar(x-11*c,y+29*c,x-10*c,y+30*c);//29 bar(x-8*c,y+24*c,x-3*c,y+26*c);//24
} bar(x-5*c,y+22*c,x+3*c,y+23*c);//22
// cara bar(x-3*c,y+23*c,x+3*c,y+24*c);//23
setfillstyle(1,YELLOW); void juegos::sMarioParadoArrA1(int x, int y,int c) bar(x-2*c,y+24*c,x+3*c,y+25*c);//24
bar(x+3*c,y+5*c,x+1*c,y+9*c);//20 { //cabeza bar(x,y+25*c,x+3*c,y+26*c);//25
bar(x,y+4*c,x-2*c,y+6*c);//21 //Gorrito //Playera
bar(x-3*c,y+4*c,x-7*c,y+5*c);//22 setcolor(BLACK); setfillstyle(1,LIGHTGRAY);
bar(x-4*c,y+5*c,x-9*c,y+6*c);//23 setfillstyle(1,BLUE); bar(x-1*c,y+12*c,x+2*c,y+13*c);//12
bar(x-1*c,y+6*c,x-11*c,y+7*c);//24 bar(x,y,x-6*c,y+1*c);//1 bar(x-2*c,y+13*c,x+2*c,y+14*c);//13
bar(x-1*c,y+7*c,x-4*c,y+8*c);//25 bar(x+2*c,y+1*c,x-5*c,y+2*c);//2 bar(x-3*c,y+14*c,x+2*c,y+15*c);//14
bar(x-5*c,y+7*c,x-11*c,y+8*c);//26 bar(x+3*c,y+2*c,x-4*c,y+3*c);//3 bar(x-6*c,y+15*c,x+2*c,y+16*c);//15
bar(x+1*c,y+8*c,x-2*c,y+9*c);//27 bar(x+3*c,y+3*c,x-9*c,y+4*c);//4 bar(x-6*c,y+16*c,x+1*c,y+17*c);//16
bar(x+2*c,y+9*c,x-3*c,y+10*c);//28 setfillstyle(1,BLACK); bar(x-7*c,y+17*c,x+1*c,y+18*c);//17
bar(x+1*c,y+10*c,x-8*c,y+11*c);//29 bar(x-5*c,y+1*c,x-6*c,y+2*c);//5 bar(x-7*c,y+18*c,x,y+19*c);//18
bar(x+1*c,y+11*c,x-4*c,y+12*c);//30 bar(x-4*c,y+2*c,x-6*c,y+3*c);//6 bar(x-6*c,y+19*c,x-3*c,y+20*c);//19
m.sMario1(x,y,t); m.sMarioParadoCam(x,y,t);
Mario1=malloc(imagesize(x-15*c,y-8,x+15*c,y+25*c)); MarioParadoCam=malloc(imagesize(x-15*c,y,x+15*c,y+26*c));
getimage(x-15*c,y-8,x+15*c,y+25*c,Mario1); getimage(x-15*c,y,x+15*c,y+26*c,MarioParadoCam);
cleardevice(); cleardevice();
m.sMario11(x,y,t); m.sMarioParadoCam1(x,y,t);
Mario11=malloc(imagesize(x-15*c,y-8,x+15*c,y+25*c)); MarioParadoCam1=malloc(imagesize(x-15*c,y,x+15*c,y+26*c));
getimage(x-15*c,y-8,x+15*c,y+25*c,Mario11); getimage(x-15*c,y,x+15*c,y+26*c,MarioParadoCam1);
cleardevice(); cleardevice();
m.sMario2(x,y,t); m.sMarioParadoCamA(x,y,t);
Mario2=malloc(imagesize(x-15*c,y,x+15*c,y+26*c)); MarioParadoCamA=malloc(imagesize(x-15*c,y,x+15*c,y+26*c));
getimage(x-15*c,y,x+15*c,y+26*c,Mario2); getimage(x-15*c,y,x+15*c,y+26*c,MarioParadoCamA);
cleardevice(); cleardevice();
m.sMario21(x,y,t); m.sMarioParadoCamA1(x,y,t);
Mario21=malloc(imagesize(x-15*c,y,x+15*c,y+26*c)); MarioParadoCamA1=malloc(imagesize(x-
getimage(x-15*c,y,x+15*c,y+26*c,Mario21); 15*c,y,x+15*c,y+26*c));
cleardevice(); getimage(x-15*c,y,x+15*c,y+26*c,MarioParadoCamA1);
cleardevice();
m.sMario1Ab(x,y,t);
Mario1Ab=malloc(imagesize(x-15*c,y-8,x+15*c,y+25*c)); m.sMarioParadoArr(x,y,t);
getimage(x-15*c,y-8,x+15*c,y+25*c,Mario1Ab); MarioParadoArr=malloc(imagesize(x-15*c,y,x+15*c,y+26*c));
getimage(x-15*c,y,x+15*c,y+26*c,MarioParadoArr); for(y=442;y<=472;y++)
cleardevice(); {
putimage(x,y,Mario1Ab1,OR_PUT);
m.sMarioParadoArr1(x,y,t); putimage(x,y,Mario1Ab1,AND_PUT);
MarioParadoArr1=malloc(imagesize(x-15*c,y,x+15*c,y+26*c)); }
getimage(x-15*c,y,x+15*c,y+26*c,MarioParadoArr1); putimage(x,y,MarioParadoDerA1,OR_PUT);
cleardevice(); putimage(x,y,MarioParadoDerA1,AND_PUT);
}
m.sMarioParadoArrA(x,y,t); else
MarioParadoArrA=malloc(imagesize(x-15*c,y,x+15*c,y+26*c)); {
getimage(x-15*c,y,x+15*c,y+26*c,MarioParadoArrA); for(a=472;a>=442;a--)
cleardevice(); {
putimage(x,a,Mario11,OR_PUT);
m.sMarioParadoArrA1(x,y,t); putimage(x,a,Mario11,AND_PUT);
MarioParadoArrA1=malloc(imagesize(x-15*c,y,x+15*c,y+26*c));
getimage(x-15*c,y,x+15*c,y+26*c,MarioParadoArrA1); }
cleardevice(); for(a=442;a<=472;a++)
{
m.hongo2(x1,y1,5,MAGENTA); putimage(x,a,Mario11,OR_PUT);
hongo2=malloc(imagesize(x1-4*c,y1-1*c,x1+8*c,y1+11*c)); putimage(x,a,Mario11,AND_PUT);
getimage(x1-4*c,y1-1*c,x1+8*c,y1+11*c,hongo2); }
cleardevice(); putimage(x,y,MarioParadoDer1,OR_PUT);
putimage(x,y,MarioParadoDer1,AND_PUT);
setfillstyle(1,LIGHTBLUE); }}
bar(0,0,1200,400); else
{
setfillstyle(1,BLACK); if(opc==1)
bar(0,398,1200,402); {
for(y=472;y>=442;y--)
m.sNube(h,e,g); {
m.sNube2(h3,e3,g3); putimage(x,y,Mario1Ab,OR_PUT);
m.sPoste(h1,e1,g1); putimage(x,y,Mario1Ab,AND_PUT);
m.sPasto1(h4,e4,g4);
m.sPasto2(h5,e5,g5); }
m.sSuelo(h2,e2,g2); for(y=442;y<=472;y++)
m.sCuadros(w,w1,w2); {
setfillstyle(1,LIGHTGREEN); putimage(x,y,Mario1Ab,OR_PUT);
bar(0,402,290,425); putimage(x,y,Mario1Ab,AND_PUT);
bar(700,402,1200,425); }
putimage(x,y,MarioParadoDerA,OR_PUT);
putimage(x,y,MarioParadoDer,OR_PUT); putimage(x,y,MarioParadoDerA,AND_PUT);
putimage(x,y,MarioParadoDer,AND_PUT); }
else
{
do for(a=472;a>=442;a--)
{ {
getch(); putimage(x,a,Mario1,OR_PUT);
f=getch(); putimage(x,a,Mario1,AND_PUT);
switch (f)
{ }
//Arriba for(a=442;a<=472;a++)
case 72: if (y>0) {
{ putimage(x,a,Mario1,OR_PUT);
if(col==1) putimage(x,a,Mario1,AND_PUT);
{ if(opc==1) }
{ putimage(x,y,MarioParadoDer,OR_PUT);
for(y=472;y>=442;y--) putimage(x,y,MarioParadoDer,AND_PUT);
{ }}
putimage(x,y,Mario1Ab1,OR_PUT); }
putimage(x,y,Mario1Ab1,AND_PUT); break;
} //Abajo
case 80: if(y<670) cont--;
{ }
if(col==1) else
{if(opc==1) {
{ putimage(x--,y,MarioParadoDerA,OR_PUT);
putimage(x,y,Mario2Ab1,OR_PUT); putimage(x--,y,MarioParadoDerA,AND_PUT);
putimage(x,y,Mario2Ab1,AND_PUT); Sleep(100);
delay(200); putimage(x--,y,MarioParadoArrA,OR_PUT);
putimage(x,y,MarioParadoDerA1,OR_PUT); putimage(x--,y,MarioParadoArrA,AND_PUT);
putimage(x,y,MarioParadoDerA1,AND_PUT); Sleep(100);
} putimage(x--,y,MarioParadoCamA,OR_PUT);
else putimage(x--,y,MarioParadoCamA,AND_PUT);
{ Sleep(100);
putimage(x,y,Mario21,OR_PUT); putimage(x--,y,MarioParadoArrA,OR_PUT);
putimage(x,y,Mario21,AND_PUT); putimage(x--,y,MarioParadoArrA,AND_PUT);
delay(200); Sleep(100);
putimage(x,y,MarioParadoDer1,OR_PUT); putimage(x--,y,MarioParadoDerA,OR_PUT);
putimage(x,y,MarioParadoDer1,AND_PUT); putimage(x--,y,MarioParadoDerA,AND_PUT);
} Sleep(100);
} opc=1;
else cont-=10;
{ }}
if(opc==1) break;
{ //Derecha
putimage(x,y,Mario2Ab,OR_PUT); case 77: if(x<635)
putimage(x,y,Mario2Ab,AND_PUT); {
delay(200); if(col==1)
putimage(x,y,MarioParadoDerA,OR_PUT); {
putimage(x,y,MarioParadoDerA,AND_PUT); putimage(x++,y,MarioParadoDer1,OR_PUT);
} putimage(x++,y,MarioParadoDer1,AND_PUT);
else delay(100);
{ putimage(x++,y,MarioParadoArr1,OR_PUT);
putimage(x,y,Mario2,OR_PUT); putimage(x++,y,MarioParadoArr1,AND_PUT);
putimage(x,y,Mario2,AND_PUT); delay(100);
delay(200); putimage(x++,y,MarioParadoCam1,OR_PUT);
putimage(x,y,MarioParadoDer,OR_PUT); putimage(x++,y,MarioParadoCam1,AND_PUT);
putimage(x,y,MarioParadoDer,AND_PUT); delay(100);
}} putimage(x++,y,MarioParadoArr1,OR_PUT);
} putimage(x++,y,MarioParadoArr1,AND_PUT);
break; delay(100);
//Izquierda putimage(x++,y,MarioParadoDer1,OR_PUT);
case 75: if(x>-40) putimage(x++,y,MarioParadoDer1,AND_PUT);
{ delay(100);
if(col==1) opc=0;
{ cont+=10;
putimage(x--,y,MarioParadoDerA1,OR_PUT); }
putimage(x--,y,MarioParadoDerA1,AND_PUT); else
Sleep(100); {
putimage(x--,y,MarioParadoArrA1,OR_PUT); putimage(x++,y,MarioParadoDer,OR_PUT);
putimage(x--,y,MarioParadoArrA1,AND_PUT); putimage(x++,y,MarioParadoDer,AND_PUT);
Sleep(100); delay(100);
putimage(x--,y,MarioParadoCamA1,OR_PUT); putimage(x++,y,MarioParadoArr,OR_PUT);
putimage(x--,y,MarioParadoCamA1,AND_PUT); putimage(x++,y,MarioParadoArr,AND_PUT);
Sleep(100); delay(100);
putimage(x--,y,MarioParadoArrA1,OR_PUT); putimage(x++,y,MarioParadoCam,OR_PUT);
putimage(x--,y,MarioParadoArrA1,AND_PUT); putimage(x++,y,MarioParadoCam,AND_PUT);
Sleep(100); delay(100);
putimage(x--,y,MarioParadoDerA1,OR_PUT); putimage(x++,y,MarioParadoArr,OR_PUT);
putimage(x--,y,MarioParadoDerA1,AND_PUT); putimage(x++,y,MarioParadoArr,AND_PUT);
Sleep(100); delay(100);
opc=1; putimage(x++,y,MarioParadoDer,OR_PUT);
putimage(x++,y,MarioParadoDer,AND_PUT);
delay(100);
opc=0;
cont+=10;
}
}
break;
}//Fin del Switch
if(cont==520)
{ int x11,y11;
for(y11=432;y11<=500;y11++)
{ putimage(x1,y1++,hongo2,OR_PUT);
putimage(x1,y1++,hongo2,AND_PUT);
}
for(x11=438;x11>=350;x11--)
{ putimage(x1--,y1,hongo2,OR_PUT);
putimage(x1--,y1,hongo2,AND_PUT);
}
for(x11=350;x11<=470;x11++)
{ putimage(x1++,y1,hongo2,OR_PUT);
putimage(x1++,y1,hongo2,AND_PUT);
}
for(x11=470;x11>=0;x11--)
{ putimage(x1--,y1,hongo2,OR_PUT);
putimage(x1--,y1,hongo2,AND_PUT);
}
col=1;
}
}while (f!=27);
getch();
free(MarioParadoDer);
free(MarioParadoCam);
free(MarioParadoArr);
free(MarioParadoDerA);
free(MarioParadoCamA);
free(MarioParadoArrA);
closegraph( );
return( 0 );
}