- [NEW] Passat a SDL3
- [NEW] Passat a de SDL_Mixer a JailAudio - [NEW] Actualitzat a Respack2 - [NEW] Llevat el data.jrf i afegit el directori 'data' amb els arxius. Molt millor per a developar. - [CHG] Músiques passades a OGG - [NEW] Afegit lagueirtofile
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
#include "jgame.h"
|
||||
#include "jdraw8.h"
|
||||
#include "jinput.h"
|
||||
#include "jsound.h"
|
||||
#include "jfile.h"
|
||||
#include "jail_audio.h"
|
||||
#include <stdlib.h>
|
||||
#include <string>
|
||||
|
||||
@@ -22,14 +23,14 @@ int ModuleSequence::Go() {
|
||||
case 255: // Intro
|
||||
doIntro();
|
||||
break;
|
||||
case 0: // Men<65>
|
||||
case 0: // Men<65>
|
||||
doMenu();
|
||||
break;
|
||||
case 1: // Slides
|
||||
case 7:
|
||||
doSlides();
|
||||
break;
|
||||
case 2: // Pre-pir<69>mide
|
||||
case 2: // Pre-pir<69>mide
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
@@ -80,11 +81,17 @@ const int minim( const int a, const int b ) {
|
||||
if( b < a ) { return b; } else { return a; }
|
||||
}
|
||||
|
||||
void play_music(const char *music, bool loop = -1)
|
||||
{
|
||||
int size;
|
||||
char *buffer = file_getfilebuffer(music, size);
|
||||
JA_PlayMusic(JA_LoadMusic((Uint8*)buffer, size, music), loop);
|
||||
}
|
||||
|
||||
void ModuleSequence::doIntro() {
|
||||
JG_SetUpdateTicks(1000);
|
||||
|
||||
JS_LoadMusic("00000003.xm");
|
||||
JS_PlayMusic(-1);
|
||||
play_music("00000003.ogg");
|
||||
|
||||
JD8_Surface gfx = JD8_LoadSurface( "logo.gif" );
|
||||
JD8_Palette pal = JD8_LoadPalette( "logo.gif" );
|
||||
@@ -638,8 +645,7 @@ void ModuleSequence::doSlides() {
|
||||
|
||||
const char* arxiu;
|
||||
if( this->info->num_piramide == 7 ) {
|
||||
JS_LoadMusic("00000005.xm");
|
||||
JS_PlayMusic(1);
|
||||
play_music("00000005.ogg", 1);
|
||||
if (this->info->diners < 200) {
|
||||
arxiu = "intro2.gif";
|
||||
} else {
|
||||
@@ -700,7 +706,7 @@ void ModuleSequence::doSlides() {
|
||||
step++;
|
||||
break;
|
||||
case 8:
|
||||
if (this->info->num_piramide != 7) JS_FadeOutMusic();
|
||||
if (this->info->num_piramide != 7) JA_FadeOutMusic(250);
|
||||
exit = true;
|
||||
break;
|
||||
}
|
||||
@@ -712,8 +718,7 @@ void ModuleSequence::doSlides() {
|
||||
}
|
||||
|
||||
void ModuleSequence::doBanner() {
|
||||
JS_LoadMusic("00000004.xm");
|
||||
JS_PlayMusic(-1);
|
||||
play_music("00000004.ogg");
|
||||
|
||||
this->contador = 5000;
|
||||
|
||||
@@ -754,12 +759,11 @@ void ModuleSequence::doBanner() {
|
||||
if( contador == 0 ) exit = true;
|
||||
}
|
||||
}
|
||||
JS_FadeOutMusic();
|
||||
JA_FadeOutMusic(250);
|
||||
}
|
||||
|
||||
void ModuleSequence::doSecreta() {
|
||||
JS_LoadMusic("00000002.xm");
|
||||
JS_PlayMusic(-1);
|
||||
play_music("00000002.ogg");
|
||||
JG_SetUpdateTicks(20);
|
||||
JD8_FadeOut();
|
||||
JD8_Surface gfx = JD8_LoadSurface("tomba1.gif");
|
||||
@@ -834,7 +838,7 @@ void ModuleSequence::doSecreta() {
|
||||
JD8_FadeOut();
|
||||
memcpy(pal, pal_aux, 768);
|
||||
JD8_ClearScreen(255);
|
||||
JS_FadeOutMusic();
|
||||
JA_FadeOutMusic(250);
|
||||
exit = true;
|
||||
break;
|
||||
}
|
||||
@@ -912,8 +916,7 @@ void ModuleSequence::doCredits() {
|
||||
}
|
||||
|
||||
void ModuleSequence::doMort() {
|
||||
JS_LoadMusic("00000001.xm");
|
||||
JS_PlayMusic(1);
|
||||
play_music("00000001.ogg");
|
||||
|
||||
JI_DisableKeyboard(60);
|
||||
|
||||
@@ -942,7 +945,6 @@ void ModuleSequence::doMort() {
|
||||
if( contador == 0 ) exit = true;
|
||||
}
|
||||
}
|
||||
JS_LoadMusic("00000003.xm");
|
||||
JS_PlayMusic(-1);
|
||||
play_music("00000003.ogg");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user