Music integration started. Only menu music included in game. All music is already on the data.jrf

This commit is contained in:
2016-02-19 19:51:17 +01:00
parent f9ef26deda
commit c746a131c1
5 changed files with 9 additions and 1 deletions

View File

@@ -5,6 +5,8 @@ recursos/*
bin/* bin/*
obj/* obj/*
Debug/* Debug/*
Release/*
data/*
*.suo *.suo
*.sdf *.sdf
*.opensdf *.opensdf

BIN
data.jrf

Binary file not shown.

View File

@@ -22,7 +22,6 @@ void JS_LoadMusic(char *musicFilename)
SDL_RWops *rw = SDL_RWFromMem(buffer, filesize); SDL_RWops *rw = SDL_RWFromMem(buffer, filesize);
music = Mix_LoadMUS_RW(rw, 1); music = Mix_LoadMUS_RW(rw, 1);
} }
void JS_SetMusicVolume(int volume) { void JS_SetMusicVolume(int volume) {

View File

@@ -1,5 +1,6 @@
#include "jgame.h" #include "jgame.h"
#include "jdraw8.h" #include "jdraw8.h"
#include "jsound.h"
#include "jfile.h" #include "jfile.h"
#include "info.h" #include "info.h"
#include "modulegame.h" #include "modulegame.h"
@@ -31,6 +32,7 @@ int main( int argc, char* args[] ) {
JG_Init(); JG_Init();
JD8_Init("Aventures En Egipte"); JD8_Init("Aventures En Egipte");
JS_Init();
Info info; Info info;
info.num_habitacio = 1; info.num_habitacio = 1;
@@ -60,6 +62,7 @@ int main( int argc, char* args[] ) {
} }
JF_Quit(); JF_Quit();
JS_Finalize();
JD8_Quit(); JD8_Quit();
JG_Finalize(); JG_Finalize();

View File

@@ -3,6 +3,7 @@
#include "jgame.h" #include "jgame.h"
#include "jdraw8.h" #include "jdraw8.h"
#include "jinput.h" #include "jinput.h"
#include "jsound.h"
#include <stdlib.h> #include <stdlib.h>
#include <string> #include <string>
@@ -73,6 +74,9 @@ const int minim( const int a, const int b ) {
void ModuleSequence::doIntro() { void ModuleSequence::doIntro() {
JG_SetUpdateTicks(1000); JG_SetUpdateTicks(1000);
JS_LoadMusic("00000003.xm");
JS_PlayMusic(-1);
JD8_Surface gfx = JD8_LoadSurface( "logo.gif" ); JD8_Surface gfx = JD8_LoadSurface( "logo.gif" );
JD8_Palette pal = JD8_LoadPalette( "logo.gif" ); JD8_Palette pal = JD8_LoadPalette( "logo.gif" );
JD8_SetScreenPalette( pal ); JD8_SetScreenPalette( pal );