class presentacion
{
public:
presentacion();
void persiana();
void titulo();
private:
int coordenadaXpantalla;
int coordenadaYpantalla;
};
presentacion::presentacion()
{
coordenadaXpantalla=800;
coordenadaYpantalla=600;
initwindow(coordenadaXpantalla,coordenadaYpantalla);
}
void presentacion::persiana()
{
setcolor(BLUE);
int xBLUE=0;
int yBLUE=0;
int z4=0;
while(z4<100)
{
while(xBLUE<coordenadaXpantalla)
{
putpixel(xBLUE,yBLUE,BLUE);
xBLUE++;
}
z4++;
yBLUE++;
xBLUE=0;
delay(5);
}
Beep(100,100);
setcolor(RED);
int xRED=0;
int yRED=100;
int z3=0;
while(z3<100)
{
while(xRED<coordenadaXpantalla)
{
putpixel(xRED,yRED,RED);
xRED++;
}
z3++;
yRED++;
xRED=0;
delay(5);
}
Beep(200,100);
setcolor(GREEN);
int xGREEN=0;
int yGREEN=400;
int z2=0;
while(z2<100)
{
while(xGREEN<coordenadaXpantalla)
{
putpixel(xGREEN,yGREEN,GREEN);
xGREEN++;
}
z2++;
yGREEN++;
xGREEN=0;
delay(5);
}
Beep(300,100);
setcolor(YELLOW);
int xYELLOW=0;
int yYELLOW=500;
int z1=0;
while(z1<coordenadaYpantalla)
{
while(xYELLOW<coordenadaXpantalla)
{
putpixel(xYELLOW,yYELLOW,YELLOW);
xYELLOW++;
}
z1++;
yYELLOW++;
xYELLOW=0;
delay(5);
}
Beep(500,100);
settextstyle(9,0,3); //(estilo,forma,tamaño)
outtextxy(300,550,"Pulsa una tecla para continuar");
int continuar=(int)getch();
fflush(stdin);
}
void presentacion::titulo()
{
// TEXTO DE SIMON
setcolor(WHITE);
line(470,230,790,230);
setcolor(CYAN);
line(50,230,450,230);
outtextxy(470,250,"Videojuego creado en C++ (using winbgim)");
outtextxy(470,270,"Code posteado en e-root.org");
outtextxy(470,290,"Por ---- Endif");
setcolor(BLUE);
int auxr;
int auxr1=610;
int auxr2=320;
int auxr3=630;
int auxr4=340;
for (auxr=0; auxr<11; auxr++)
{
rectangle(auxr1,auxr2,auxr3,auxr4);
auxr1++;
auxr2++;
auxr3--;
auxr4--;
}
setcolor(RED);
int auxb;
int auxb1=631;
int auxb2=320;
int auxb3=651;
int auxb4=340;
for (auxb=0; auxb<11; auxb++)
{
rectangle(auxb1,auxb2,auxb3,auxb4);
auxb1++;
auxb2++;
auxb3--;
auxb4--;
}
setcolor(GREEN);
int auxg;
int auxg1=610;
int auxg2=341;
int auxg3=630;
int auxg4=361;
for (auxg=0; auxg<11; auxg++)
{
rectangle(auxg1,auxg2,auxg3,auxg4);
auxg1++;
auxg2++;
auxg3--;
auxg4--;
}
setcolor(YELLOW);
int auxy;
int auxy1=631;
int auxy2=341;
int auxy3=651;
int auxy4=361;
for (auxy=0; auxy<11; auxy++)
{
rectangle(auxy1,auxy2,auxy3,auxy4);
auxy1++;
auxy2++;
auxy3--;
auxy4--;
}
setcolor(WHITE);
rectangle(610,320,651,361);
// LETRA S
setcolor(WHITE);
rectangle(50,250,170,270);
int s1=51;
int s2=251;
int s3=169;
int s4=269;
int s5;
for (s5=0; s5<10; s5++)
{
rectangle(s1,s2,s3,s4);
s1++;
s2++;
s3--;
s4--;
}
rectangle(50,270,70,300);
int s6=51;
int s7=271;
int s8=69;
int s9=299;
int s10;
for (s10=0; s10<10; s10++)
{
rectangle(s6,s7,s8,s9);
s6++;
s7++;
s8--;
s9--;
}
rectangle(50,300,170,320);
int s11=51;
int s12=301;
int s13=169;
int s14=319;
int s15;
for (s15=0; s15<10; s15++)
{
rectangle(s11,s12,s13,s14);
s11++;
s12++;
s13--;
s14--;
}
rectangle(150,320,170,350);
int s16=151;
int s17=321;
int s18=169;
int s19=349;
int s20;
for (s20=0; s20<10; s20++)
{
rectangle(s16,s17,s18,s19);
s16++;
s17++;
s18--;
s19--;
}
rectangle(50,350,170,370);
int s25=51;
int s21=351;
int s22=169;
int s23=369;
int s24;
for (s24=0; s24<10; s24++)
{
rectangle(s25,s21,s22,s23);
s25++;
s21++;
s22--;
s23--;
}
// letra I
setcolor(WHITE);
rectangle(180,250,200,370);
int i1=181;
int i2=251;
int i3=199;
int i4=369;
int i5;
for (i5=0; i5<10; i5++)
{
rectangle(i1,i2,i3,i4);
i1++;
i2++;
i3--;
i4--;
}
// letra M
setcolor(WHITE);
rectangle(210,250,230,370);
int i6=211;
int i7=251;
int i8=229;
int i9=369;
int i10;
for (i10=0; i10<10; i10++)
{
rectangle(i6,i7,i8,i9);
i6++;
i7++;
i8--;
i9--;
}
rectangle(250,250,270,370);
int i11=251;
int i12=251;
int i13=269;
int i14=369;
int i15;
for (i15=0; i15<10; i15++)
{
rectangle(i11,i12,i13,i14);
i11++;
i12++;
i13--;
i14--;
}
rectangle(290,250,310,370);
int i16=291;
int i17=251;
int i18=309;
int i19=369;
int i20;
for (i20=0; i20<10; i20++)
{
rectangle(i16,i17,i18,i19);
i16++;
i17++;
i18--;
i19--;
}
rectangle(210,250,310,270);
int i21=211;
int i22=251;
int i23=309;
int i24=269;
int i25;
for (i25=0; i25<10; i25++)
{
rectangle(i21,i22,i23,i24);
i21++;
i22++;
i23--;
i24--;
}
//LA O
setcolor(WHITE);
rectangle(320,250,380,370);
int o1=321;
int o2=251;
int o3=379;
int o4=369;
int o5;
for (o5=0; o5<20; o5++)
{
rectangle(o1,o2,o3,o4);
o1++;
o2++;
o3--;
o4--;
}
//la n
rectangle(390,250,410,370);
int n1=391;
int n2=251;
int n3=409;
int n4=369;
int n5;
for (n5=0; n5<10; n5++)
{
rectangle(n1,n2,n3,n4);
n1++;
n2++;
n3--;
n4--;
}
rectangle(430,250,450,370);
int n6=431;
int n7=251;
int n8=449;
int n9=369;
int n10;
for (n10=0; n10<10; n10++)
{
rectangle(n6,n7,n8,n9);
n6++;
n7++;
n8--;
n9--;
}
rectangle(390,250,450,270);
int n11=391;
int n12=251;
int n13=449;
int n14=269;
int n15;
for (n15=0; n15<10; n15++)
{
rectangle(n11,n12,n13,n14);
n11++;
n12++;
n13--;
n14--;
}
}