Don't loop title screen music.

This commit is contained in:
Steve 2016-05-29 11:48:11 +01:00
parent 1f9c329ca3
commit 2fbe225570
9 changed files with 10 additions and 10 deletions

View File

@ -130,7 +130,7 @@ void initChallengeHome(void)
endSectionTransition(); endSectionTransition();
playMusic("music/main/covert_operations.mp3"); playMusic("music/main/covert_operations.mp3", 1);
} }
static void nextPage(void) static void nextPage(void)

View File

@ -56,7 +56,7 @@ extern char *getTranslatedString(char *string);
extern void blit(SDL_Texture *t, int x, int y, int centered); extern void blit(SDL_Texture *t, int x, int y, int centered);
extern char *getBackgroundTextureName(int n); extern char *getBackgroundTextureName(int n);
extern char *getPlanetTextureName(int n); extern char *getPlanetTextureName(int n);
extern void playMusic(char *filename); extern void playMusic(char *filename, int loop);
extern char *timeToString(long millis, int showHours); extern char *timeToString(long millis, int showHours);
extern char *getChallengeDescription(Challenge *c); extern char *getChallengeDescription(Challenge *c);
extern void clearInput(void); extern void clearInput(void);

View File

@ -122,7 +122,7 @@ void initGalacticMap(void)
endSectionTransition(); endSectionTransition();
playMusic("music/main/Pressure.ogg"); playMusic("music/main/Pressure.ogg", 1);
} }
static void updatePandoranAdvance(void) static void updatePandoranAdvance(void)

View File

@ -36,7 +36,7 @@ extern void endSectionTransition(void);
extern void blit(SDL_Texture *t, int x, int y, int centered); extern void blit(SDL_Texture *t, int x, int y, int centered);
extern int collision(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2); extern int collision(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2);
extern void drawCircle(int cx, int cy, int radius, int r, int g, int b, int a); extern void drawCircle(int cx, int cy, int radius, int r, int g, int b, int a);
extern void playMusic(char *filename); extern void playMusic(char *filename, int loop);
extern void stopMusic(void); extern void stopMusic(void);
extern void doStars(float dx, float dy); extern void doStars(float dx, float dy);
extern void drawStars(void); extern void drawStars(void);

View File

@ -200,7 +200,7 @@ void loadMission(char *filename)
addAllToQuadtree(); addAllToQuadtree();
playMusic(music); playMusic(music, 1);
} }
static char *getAutoBackground(char *filename) static char *getAutoBackground(char *filename)

View File

@ -28,7 +28,7 @@ extern char *readFile(char *filename);
extern SDL_Texture *getTexture(char *filename); extern SDL_Texture *getTexture(char *filename);
extern void startSectionTransition(void); extern void startSectionTransition(void);
extern void endSectionTransition(void); extern void endSectionTransition(void);
extern void playMusic(char *filename); extern void playMusic(char *filename, int loop);
extern void stopMusic(void); extern void stopMusic(void);
extern void initPlayer(void); extern void initPlayer(void);
extern long flagsToLong(char *flags, int *add); extern long flagsToLong(char *flags, int *add);

View File

@ -91,7 +91,7 @@ void initTitle(void)
endSectionTransition(); endSectionTransition();
playMusic("music/main/Rise of spirit.ogg"); playMusic("music/main/Rise of spirit.ogg", 0);
} }
static void initFighters(void) static void initFighters(void)

View File

@ -48,7 +48,7 @@ extern void initGalacticMap(void);
extern void initOptions(void (*returnFromOptions)(void)); extern void initOptions(void (*returnFromOptions)(void));
extern void drawOptions(void); extern void drawOptions(void);
extern void initStatsDisplay(void); extern void initStatsDisplay(void);
extern void playMusic(char *filename); extern void playMusic(char *filename, int loop);
extern void destroyBattle(void); extern void destroyBattle(void);
extern void playSound(int id); extern void playSound(int id);
extern void initEffects(void); extern void initEffects(void);

View File

@ -37,7 +37,7 @@ void initSounds(void)
loadSounds(); loadSounds();
} }
void playMusic(char *filename) void playMusic(char *filename, int loop)
{ {
if (music != NULL) if (music != NULL)
{ {
@ -48,7 +48,7 @@ void playMusic(char *filename)
music = Mix_LoadMUS(getFileLocation(filename)); music = Mix_LoadMUS(getFileLocation(filename));
Mix_PlayMusic(music, -1); Mix_PlayMusic(music, (loop) ? -1 : 0);
} }
void stopMusic(void) void stopMusic(void)