ref: ae730c8d493b92bcc630806267532f063bad35f4
parent: d6986d5f616a7cd189abb239e2ec2019819cfeb9
author: Iliyas Jorio <[email protected]>
date: Sat Feb 11 06:57:09 EST 2023
Get theme music going in splash screen
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -15,6 +15,7 @@
#include "grays.h"
#include "level.h"
#include "keyselect.h"
+#include "music.h"
SDL_Surface* backdropSurface = NULL;
@@ -169,7 +170,6 @@
RetrieveResources( );
- MTicks time = MTickCount() + 120;
SDLU_AcquireSurface( g_frontSurface );
DrawPICTInSurface( g_frontSurface, picTitle );
@@ -183,6 +183,11 @@
}
SDLU_ReleaseSurface( g_frontSurface );
+ ChooseMusic( 13 );
+
+ QuickFadeIn( NULL );
+
+ MTicks time = MTickCount() + 150;
while( time > MTickCount() && !SDLU_Button() )
{
SDLU_Present();
binary files a/src/main.c b/src/main.c differ
--- a/src/music.c
+++ b/src/music.c
@@ -64,6 +64,11 @@
}
}
+int GetCurrentMusic( void )
+{
+ return musicSelection;
+}
+
void ChooseMusic( short which )
{
// Kill existing song first, if any
--- a/src/music.h
+++ b/src/music.h
@@ -6,6 +6,7 @@
void ResumeMusic( void );
void FastMusic( void );
void SlowMusic( void );
+int GetCurrentMusic( void );
void ChooseMusic( short which );
void ShutdownMusic();