Assumptes #1 al #6 finiquitats. Piràmide secreta funcionant, amb la seua intro.

This commit is contained in:
2016-02-22 17:52:49 +01:00
parent f00afcf9a2
commit de9bac2b2c
12 changed files with 188 additions and 34 deletions

View File

@@ -49,6 +49,14 @@ void Mapa::draw() {
}
JD8_Blit( this->fondo );
// Pinta tombes
for (int y = 0; y < 4; y++) {
for (int x = 0; x < 4; x++) {
JD8_BlitCK(35 + (x * 65), 45 + (y * 35), this->gfx, this->tombes[x + y * 4].x, this->tombes[x + y * 4].y, 50, 20, 255);
}
}
JD8_BlitCK( 45, 15, this->gfx, 30 + ( this->frame_torxes * 25 ), 80, 25, 15, 255 );
JD8_BlitCK( 95, 15, this->gfx, 30 + ( this->frame_torxes * 25 ), 80, 25, 15, 255 );
JD8_BlitCK( 195, 15, this->gfx, 30 + ( this->frame_torxes * 25 ), 80, 25, 15, 255 );
@@ -89,10 +97,16 @@ void Mapa::preparaFondoEstatic() {
// Prepara el fondo est<73>tic de l'habitaci<63>
this->fondo = JD8_NewSurface();
JD8_BlitToSurface( 9, 2, this->gfx, 60, 185, 39, 7, this->fondo ); // Text "NIVELL"
JD8_BlitToSurface( 72, 6, this->gfx, 153, 189, 3, 1, this->fondo ); // Ralleta entre num piramide i num habitacio
JD8_BlitToSurface( 130, 2, this->gfx, 225, 192, 19, 8, this->fondo ); // Montonet de monedes + signe '='
JD8_BlitToSurface( 220, 2, this->gfx, 160, 185, 48, 7, this->fondo ); // Text "ENERGIA"
if (info->num_piramide == 6) {
JD8_BlitToSurface(9, 2, this->gfx, 227, 185, 92, 7, this->fondo); // Text "SECRETA"
}
else {
JD8_BlitToSurface(9, 2, this->gfx, 60, 185, 39, 7, this->fondo); // Text "NIVELL"
JD8_BlitToSurface(72, 6, this->gfx, 153, 189, 3, 1, this->fondo); // Ralleta entre num piramide i num habitacio
}
JD8_BlitToSurface(130, 2, this->gfx, 225, 192, 19, 8, this->fondo); // Montonet de monedes + signe '='
JD8_BlitToSurface(220, 2, this->gfx, 160, 185, 48, 7, this->fondo); // Text "ENERGIA"
if (this->info->diners >= 200) JD8_BlitToSurface(175, 3, this->gfx, 60, 193, 7, 6, this->fondo);
// Pinta taulells
for( int y = 0; y < 11; y++ ) {
@@ -113,16 +127,13 @@ void Mapa::preparaFondoEstatic() {
case 5:
JD8_BlitToSurface( 20+(x*15), 30+(y*15), this->gfx, 130, 80, 15, 15, this->fondo );
break;
case 6:
JD8_BlitToSurface(20 + (x * 15), 30 + (y * 15), this->gfx, 145, 80, 15, 15, this->fondo);
break;
}
}
}
// Pinta tombes
for( int y = 0; y < 4; y++ ) {
for( int x = 0; x < 4; x++ ) {
JD8_BlitCKToSurface( 35+(x*65), 45+(y*35), this->gfx, 0, 0, 50, 20, this->fondo, 255 );
}
}
// Pinta vores de les parets
JD8_BlitCKToSurface( 5, 15, this->gfx, 30, 110, 15, 15, this->fondo, 255 );
@@ -157,14 +168,21 @@ void swap( Uint8& a, Uint8& b ) {
}
void Mapa::preparaTombes() {
const Uint8 contingut = this->info->num_piramide == 6 ? CONTE_DIAMANT : CONTE_RES;
int cx = this->info->num_piramide == 6 ? 270 : 0;
int cy = this->info->num_piramide == 6 ? 50 : 0;
for( int i = 0; i < 16; i++ ) {
this->tombes[i].contingut = CONTE_RES;
this->tombes[i].contingut = contingut;
this->tombes[i].oberta = false;
this->tombes[i].costat[0] = false;
this->tombes[i].costat[1] = false;
this->tombes[i].costat[2] = false;
this->tombes[i].costat[3] = false;
this->tombes[i].x = cx;
this->tombes[i].y = cy;
}
if (this->info->num_piramide == 6) return;
this->tombes[0].contingut = CONTE_FARAO;
this->tombes[1].contingut = CONTE_CLAU;
this->tombes[2].contingut = CONTE_PERGAMI;
@@ -228,30 +246,37 @@ void Mapa::comprovaCaixa( Uint8 num ) {
int y = num / 4;
switch( this->tombes[num].contingut ) {
case CONTE_RES:
JD8_BlitCKToSurface( 35+(x*65), 45+(y*35), this->gfx, 50, 0, 50, 20, this->fondo, 255 );
//JD8_BlitCKToSurface( 35+(x*65), 45+(y*35), this->gfx, 50, 0, 50, 20, this->fondo, 255 );
this->tombes[num].x = 50;
break;
case CONTE_TRESOR:
JD8_BlitCKToSurface( 35+(x*65), 45+(y*35), this->gfx, 100, 0, 50, 20, this->fondo, 255 );
//JD8_BlitCKToSurface( 35+(x*65), 45+(y*35), this->gfx, 100, 0, 50, 20, this->fondo, 255 );
this->tombes[num].x = 100;
info->diners++;
break;
case CONTE_FARAO:
JD8_BlitCKToSurface( 35+(x*65), 45+(y*35), this->gfx, 150, 0, 50, 20, this->fondo, 255 );
//JD8_BlitCKToSurface( 35+(x*65), 45+(y*35), this->gfx, 150, 0, 50, 20, this->fondo, 255 );
this->tombes[num].x = 150;
this->farao = true;
break;
case CONTE_CLAU:
JD8_BlitCKToSurface( 35+(x*65), 45+(y*35), this->gfx, 200, 0, 50, 20, this->fondo, 255 );
//JD8_BlitCKToSurface( 35+(x*65), 45+(y*35), this->gfx, 200, 0, 50, 20, this->fondo, 255 );
this->tombes[num].x = 200;
this->clau = true;
break;
case CONTE_MOMIA:
JD8_BlitCKToSurface( 35+(x*65), 45+(y*35), this->gfx, 0, 175, 50, 20, this->fondo, 255 );
//JD8_BlitCKToSurface( 35+(x*65), 45+(y*35), this->gfx, 0, 175, 50, 20, this->fondo, 255 );
this->tombes[num].y = 175;
this->nova_momia = true;
break;
case CONTE_PERGAMI:
JD8_BlitCKToSurface( 35+(x*65), 45+(y*35), this->gfx, 250, 0, 50, 20, this->fondo, 255 );
//JD8_BlitCKToSurface( 35+(x*65), 45+(y*35), this->gfx, 250, 0, 50, 20, this->fondo, 255 );
this->tombes[num].x = 250;
this->sam->pergami = true;
break;
case CONTE_DIAMANT:
JD8_BlitCKToSurface( 35+(x*65), 45+(y*35), this->gfx, 150, 0, 50, 20, this->fondo, 255 );
//JD8_BlitCKToSurface( 35+(x*65), 45+(y*35), this->gfx, 270, 70, 50, 20, this->fondo, 255 );
this->tombes[num].y = 70;
info->diamants++;
info->diners += VALOR_DIAMANT;
break;