finals fets. Credits fets. Personatge secret fet
This commit is contained in:
@@ -27,7 +27,6 @@ int ModuleSequence::Go() {
|
||||
break;
|
||||
case 1: // Slides
|
||||
case 7:
|
||||
//doSecreta();
|
||||
doSlides();
|
||||
break;
|
||||
case 2: // Pre-pir<69>mide
|
||||
@@ -56,8 +55,9 @@ int ModuleSequence::Go() {
|
||||
this->info->num_piramide = 0;
|
||||
return 1;
|
||||
} else if( this->info->num_piramide == 0 ) {
|
||||
this->info->num_piramide = 6;
|
||||
this->info->diners = 200;
|
||||
this->info->num_piramide = 1;
|
||||
//this->info->num_piramide = 6;
|
||||
//this->info->diners = 200;
|
||||
return 1;
|
||||
} else if( this->info->num_piramide == 7 ) {
|
||||
this->info->num_piramide = 8;
|
||||
@@ -596,7 +596,7 @@ void ModuleSequence::doMenu() {
|
||||
int camello = 0;
|
||||
|
||||
JI_Update();
|
||||
while( !JI_AnyKey() && !JG_Quitting() ) {
|
||||
while( !JI_AnyKey() && !JG_Quitting() && !JI_KeyPressed(SDL_SCANCODE_P)) {
|
||||
|
||||
JD8_Blit( 0, 0, fondo, 0, 0, 320, 100 ); // fondo sol estatic
|
||||
|
||||
@@ -613,6 +613,7 @@ void ModuleSequence::doMenu() {
|
||||
JD8_BlitCK( 303, 193, gfx, 305, 143, 15, 5, 255 ); // versio
|
||||
|
||||
if( contador%100 > 30 ) JD8_BlitCK( 98, 130, gfx, 161, 92, 127, 9, 255 ); // pulsa tecla...
|
||||
if ((contador % 100 > 30) && this->info->nou_personatge) JD8_BlitCK(68, 141, gfx, 128, 105, 189, 9, 255); // 'p' per a personatge nou...
|
||||
|
||||
JD8_Flip();
|
||||
|
||||
@@ -624,7 +625,8 @@ void ModuleSequence::doMenu() {
|
||||
JI_Update();
|
||||
}
|
||||
}
|
||||
|
||||
this->info->pepe_activat = JI_KeyPressed(SDL_SCANCODE_P);
|
||||
JI_DisableKeyboard(60);
|
||||
JD8_FreeSurface( fondo );
|
||||
JD8_FreeSurface( gfx );
|
||||
free( pal );
|
||||
@@ -688,7 +690,7 @@ void ModuleSequence::doSlides() {
|
||||
case 4:
|
||||
case 7:
|
||||
contador--;
|
||||
if( contador == 1 ) step++;
|
||||
if (contador == -150) { contador = 0; step++; }
|
||||
break;
|
||||
case 2:
|
||||
case 5:
|
||||
@@ -845,7 +847,9 @@ void ModuleSequence::doSecreta() {
|
||||
|
||||
void ModuleSequence::doCredits() {
|
||||
|
||||
JD8_ClearScreen(0);
|
||||
struct { Uint16 x, y; } frames_coche[8] = { { 214, 152 }, { 214, 104 }, { 214, 56 }, { 214, 104 }, { 214, 152 }, { 214, 8 }, { 108, 152 }, { 214, 8 } };
|
||||
const Uint32 n_frames_coche = 8;
|
||||
const Uint32 velocitat_coche = 3;
|
||||
|
||||
JD8_Surface vaddr2 = JD8_LoadSurface("final.gif");
|
||||
JD8_Surface vaddr3 = JD8_LoadSurface("finals.gif");
|
||||
@@ -861,25 +865,48 @@ void ModuleSequence::doCredits() {
|
||||
if (JG_ShouldUpdate()) {
|
||||
JI_Update();
|
||||
|
||||
if (JI_AnyKey()) {
|
||||
if (JI_AnyKey() || contador >= 3100) {
|
||||
exit = true;
|
||||
}
|
||||
|
||||
JD8_ClearScreen(255);
|
||||
|
||||
if (contador < 2750) {
|
||||
JD8_BlitCKCut(115, 200 - (contador / 10), vaddr2, 0, 0, 80, 200, 255);
|
||||
JD8_BlitCKCut(115, 200 - (contador / 6), vaddr2, 0, 0, 80, 200, 0);
|
||||
}
|
||||
|
||||
if ((contador > 2000) && (contador < 3800)) {
|
||||
JD8_BlitCKCut(100, 200 - ((contador-2000) / 10), vaddr2, 85, 0, 120, 140, 255);
|
||||
} else if (contador >= 3750) {
|
||||
JD8_BlitCK(100, 20, vaddr2, 85, 0, 120, 140, 255);
|
||||
if ((contador > 1200) && (contador < 2280)) {
|
||||
JD8_BlitCKCut(100, 200 - ((contador-1200) / 6), vaddr2, 85, 0, 120, 140, 0);
|
||||
} else if (contador >= 2250) {
|
||||
JD8_BlitCK(100, 20, vaddr2, 85, 0, 120, 140, 0);
|
||||
}
|
||||
|
||||
if (this->info->diamants == 16) {
|
||||
//scroll_final_joc(vaddr3, vaddr, contador_final);
|
||||
JD8_BlitCKScroll(50, vaddr3, ((contador >> 3) % 320) + 1, 0, 50, 255);
|
||||
JD8_BlitCKScroll(50, vaddr3, ((contador >> 2) % 320) + 1, 50, 50, 255);
|
||||
JD8_BlitCKScroll(50, vaddr3, ((contador >> 1) % 320) + 1, 100, 50, 255);
|
||||
JD8_BlitCKScroll(50, vaddr3, (contador % 320) + 1, 150, 50, 255);
|
||||
|
||||
JD8_BlitCK(100, 50, vaddr2, frames_coche[(contador / velocitat_coche) % n_frames_coche].x, frames_coche[(contador / velocitat_coche) % n_frames_coche].y, 106, 48, 255);
|
||||
} else {
|
||||
JD8_BlitCK(0, 50, vaddr3, 0, 0, 320, 50, 255);
|
||||
JD8_BlitCK(0, 50, vaddr3, 0, 50, 320, 50, 255);
|
||||
}
|
||||
|
||||
JD8_FillSquare(0, 50, 255);
|
||||
JD8_FillSquare(100, 10, 255);
|
||||
|
||||
JD8_Flip();
|
||||
contador++;
|
||||
}
|
||||
}
|
||||
|
||||
FILE* ini = fopen("trick.ini", "wb");
|
||||
fwrite("1", 1, 1, ini);
|
||||
fclose(ini);
|
||||
this->info->nou_personatge = true;
|
||||
|
||||
JD8_FreeSurface(vaddr3);
|
||||
JD8_FreeSurface(vaddr2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user