Quasi totes les músiques ficades. La imatge de mort també
This commit is contained in:
Binary file not shown.
@@ -2,22 +2,4 @@
|
||||
<Bucket
|
||||
type = "1"
|
||||
version = "2.0">
|
||||
<Breakpoints>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "jfile.cpp"
|
||||
timestampString = "477527894.254081"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "34"
|
||||
endingLineNumber = "34"
|
||||
landmarkName = "JF_SetResourceFile(const char *p_resourceFileName)"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
</Breakpoints>
|
||||
</Bucket>
|
||||
|
||||
@@ -9,7 +9,7 @@ bool JS_Init() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void JS_LoadMusic(char *musicFilename)
|
||||
void JS_LoadMusic(const char *musicFilename)
|
||||
{
|
||||
if (music != NULL) {
|
||||
Mix_HaltMusic();
|
||||
|
||||
2
jsound.h
2
jsound.h
@@ -5,7 +5,7 @@ typedef Mix_Chunk JS_Sound;
|
||||
|
||||
bool JS_Init();
|
||||
|
||||
void JS_LoadMusic(char *musicFilename);
|
||||
void JS_LoadMusic(const char *musicFilename);
|
||||
|
||||
void JS_SetMusicVolume(int volume);
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "jgame.h"
|
||||
#include "jdraw8.h"
|
||||
#include "jsound.h"
|
||||
#include "jinput.h"
|
||||
#include "jfile.h"
|
||||
|
||||
@@ -47,6 +48,10 @@ ModuleGame::~ModuleGame(void) {
|
||||
int ModuleGame::Go() {
|
||||
|
||||
this->Draw();
|
||||
|
||||
JS_LoadMusic(this->info->num_piramide==3 ? "00000008.xm" : (this->info->num_piramide==2 ? "00000007.xm" : "00000006.xm"));
|
||||
JS_PlayMusic(-1);
|
||||
|
||||
JD8_FadeToPal( JD8_LoadPalette( "frames.gif" ) );
|
||||
|
||||
while (this->final == 0 && !JG_Quitting()) {
|
||||
@@ -55,18 +60,22 @@ int ModuleGame::Go() {
|
||||
this->Update();
|
||||
}
|
||||
|
||||
JS_FadeOutMusic();
|
||||
|
||||
if( this->final == 1 ) {
|
||||
this->info->num_habitacio++;
|
||||
if( this->info->num_habitacio == 6 ) {
|
||||
this->info->num_habitacio = 1;
|
||||
this->info->num_piramide++;
|
||||
}
|
||||
}
|
||||
} else if (this->final == 2) {
|
||||
this->info->num_piramide = 100;
|
||||
}
|
||||
|
||||
if( JG_Quitting() ) {
|
||||
return -1;
|
||||
} else {
|
||||
if( this->info->num_habitacio == 1 ) {
|
||||
if( this->info->num_habitacio == 1 || this->info->num_piramide == 100 ) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
|
||||
@@ -22,7 +22,7 @@ int ModuleSequence::Go() {
|
||||
case 255: // Intro
|
||||
doIntro();
|
||||
break;
|
||||
case 0: // Men<65>
|
||||
case 0: // Men<65>
|
||||
doMenu();
|
||||
break;
|
||||
case 1: // Slides
|
||||
@@ -41,6 +41,9 @@ int ModuleSequence::Go() {
|
||||
case 8: // Credits
|
||||
doCredits();
|
||||
break;
|
||||
case 100: // Mort
|
||||
doMort();
|
||||
break;
|
||||
}
|
||||
|
||||
JD8_FadeOut();
|
||||
@@ -59,6 +62,10 @@ int ModuleSequence::Go() {
|
||||
return 1;
|
||||
} else if( this->info->num_piramide == 8 ) {
|
||||
this->info->num_piramide = 255;
|
||||
return 1;
|
||||
} else if( this->info->num_piramide == 100 ) {
|
||||
this->info->num_piramide = 0;
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
@@ -686,6 +693,7 @@ void ModuleSequence::doSlides() {
|
||||
step++;
|
||||
break;
|
||||
case 8:
|
||||
JS_FadeOutMusic();
|
||||
exit = true;
|
||||
break;
|
||||
}
|
||||
@@ -697,6 +705,9 @@ void ModuleSequence::doSlides() {
|
||||
}
|
||||
|
||||
void ModuleSequence::doBanner() {
|
||||
JS_LoadMusic("00000004.xm");
|
||||
JS_PlayMusic(-1);
|
||||
|
||||
this->contador = 5000;
|
||||
|
||||
JD8_Surface gfx = JD8_LoadSurface( "ffase.gif" );
|
||||
@@ -736,6 +747,7 @@ void ModuleSequence::doBanner() {
|
||||
if( contador == 0 ) exit = true;
|
||||
}
|
||||
}
|
||||
JS_FadeOutMusic();
|
||||
}
|
||||
|
||||
void ModuleSequence::doSecreta() {
|
||||
@@ -744,3 +756,34 @@ void ModuleSequence::doSecreta() {
|
||||
void ModuleSequence::doCredits() {
|
||||
}
|
||||
|
||||
void ModuleSequence::doMort() {
|
||||
JS_LoadMusic("00000001.xm");
|
||||
JS_PlayMusic(-1);
|
||||
|
||||
this->contador = 5000;
|
||||
|
||||
JD8_Surface gfx = JD8_LoadSurface( "gameover.gif" );
|
||||
JD8_Palette pal = JD8_LoadPalette( "gameover.gif" );
|
||||
|
||||
JD8_ClearScreen( 0 );
|
||||
|
||||
JD8_Blit( gfx );
|
||||
|
||||
JD8_FadeToPal( pal );
|
||||
|
||||
bool exit = false;
|
||||
while( !exit && !JG_Quitting() ) {
|
||||
if (JG_ShouldUpdate()) {
|
||||
JI_Update();
|
||||
|
||||
if( JI_AnyKey() ) {
|
||||
exit = true;
|
||||
}
|
||||
|
||||
contador--;
|
||||
if( contador == 0 ) exit = true;
|
||||
}
|
||||
}
|
||||
JS_FadeOutMusic();
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ private:
|
||||
void doBanner();
|
||||
void doSecreta();
|
||||
void doCredits();
|
||||
void doMort();
|
||||
|
||||
Info* info;
|
||||
int contador;
|
||||
|
||||
Reference in New Issue
Block a user