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

@@ -27,6 +27,7 @@ int ModuleSequence::Go() {
break;
case 1: // Slides
case 7:
//doSecreta();
doSlides();
break;
case 2: // Pre-pir<69>mide
@@ -751,6 +752,91 @@ void ModuleSequence::doBanner() {
}
void ModuleSequence::doSecreta() {
JS_LoadMusic("00000002.xm");
JS_PlayMusic(-1);
JG_SetUpdateTicks(20);
JD8_FadeOut();
JD8_Surface gfx = JD8_LoadSurface("tomba1.gif");
JD8_Palette pal_aux = JD8_LoadPalette("tomba1.gif");
JD8_Palette pal = (JD8_Palette)malloc(768);
memcpy(pal, pal_aux, 768);
JD8_ClearScreen(255);
JD8_SetScreenPalette(pal);
bool exit = false;
int step = 0;
contador = 1;
while (!exit && !JG_Quitting()) {
if (JG_ShouldUpdate()) {
JI_Update();
if (JI_AnyKey()) {
exit = true;
}
switch (step) {
case 0:
JD8_Blit(70, 60, gfx, 0, contador, 178, 70); //Put_Sprite(from, where, 0 + (320 * i), 178, 70, 70, 60);
JD8_BlitCK(70, 60, gfx, 178, contador >> 1, 142, 70, 255); //Put_Sprite(from, where, 178 + (320 * (i div 2)), 142, 70, 70, 60);
JD8_Flip();
contador++;
if (contador == 128) step++;
break;
case 1:
case 4:
case 7:
case 9:
contador--;
if (contador == 0) step++;
break;
case 2:
JD8_ClearScreen(255);
JD8_Flip();
gfx = JD8_LoadSurface("tomba2.gif");
pal_aux = JD8_LoadPalette("tomba2.gif");
memcpy(pal, pal_aux, 768);
JD8_SetScreenPalette(pal);
step++;
break;
case 3:
JD8_Blit(55, 53, gfx, 0, 158-contador, 211, contador); //Put_Sprite(from, where, 0 + ((158 - i) * 320), 211, i, 55, 53);
JD8_Flip();
contador++;
if (contador == 94) step++;
break;
case 5:
JD8_ClearScreen(0);
JD8_Flip();
JD8_SetPaletteColor(254, 12, 11, 11);
JD8_SetPaletteColor(253, 12, 11, 11);
step++;
break;
case 6:
JD8_Blit(80, 68, gfx, 160 - (contador*2), 0, contador*2, 64); //Put_Sprite(from, where, 160 - (i * 2), (i * 2), 64, 80, 68);
JD8_Flip();
contador++;
if (contador == 80) step++;
break;
case 8:
JD8_SetPaletteColor(254, contador+12, 11, 11);
JD8_SetPaletteColor(253, (contador+12) >> 1, 11, 11);
JD8_Flip();
contador++;
if (contador == 51) step++;
break;
case 10:
JD8_FadeOut();
memcpy(pal, pal_aux, 768);
JD8_ClearScreen(255);
JS_FadeOutMusic();
exit = true;
break;
}
}
}
JD8_FreeSurface(gfx);
free(pal_aux);
}
void ModuleSequence::doCredits() {
@@ -758,9 +844,12 @@ void ModuleSequence::doCredits() {
void ModuleSequence::doMort() {
JS_LoadMusic("00000001.xm");
JS_PlayMusic(-1);
JS_PlayMusic(1);
this->contador = 5000;
JI_DisableKeyboard(60);
this->info->vida = 5;
this->contador = 1000;
JD8_Surface gfx = JD8_LoadSurface( "gameover.gif" );
JD8_Palette pal = JD8_LoadPalette( "gameover.gif" );
@@ -784,6 +873,7 @@ void ModuleSequence::doMort() {
if( contador == 0 ) exit = true;
}
}
JS_FadeOutMusic();
JS_LoadMusic("00000003.xm");
JS_PlayMusic(-1);
}