diff --git a/Content/title_screen.ogg b/Content/title_screen.ogg new file mode 100644 index 0000000..aadd670 Binary files /dev/null and b/Content/title_screen.ogg differ diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json new file mode 100644 index 0000000..d2c6756 --- /dev/null +++ b/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "MoonWorksTest": { + "commandName": "Project", + "nativeDebugging": true + } + } +} \ No newline at end of file diff --git a/lib/MoonWorks b/lib/MoonWorks index 408e438..ec28d17 160000 --- a/lib/MoonWorks +++ b/lib/MoonWorks @@ -1 +1 @@ -Subproject commit 408e438efcf8a19992c3b0ecd74bfd11b65441e6 +Subproject commit ec28d17a755e267bafd4354d615c3f6ddb1f0cc2 diff --git a/src/Program.cs b/src/Program.cs index ab4464e..68e7681 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -8,6 +8,7 @@ namespace MoonWorksTest { WindowCreateInfo windowCreateInfo = new WindowCreateInfo { + WindowTitle = "MoonWorksTest", WindowWidth = 1280, WindowHeight = 720, ScreenMode = ScreenMode.Windowed diff --git a/src/TestGame.cs b/src/TestGame.cs index a2ebfaf..aefa14d 100644 --- a/src/TestGame.cs +++ b/src/TestGame.cs @@ -1,6 +1,8 @@ using MoonWorks; +using MoonWorks.Audio; using MoonWorks.Graphics; using RefreshCS; +using System.IO; using System.Threading; namespace MoonWorksTest @@ -34,6 +36,9 @@ namespace MoonWorksTest uint screenShotBufferSize; Thread screenshotThread; + StaticSound music; + StaticSoundInstance musicInstance; + public TestGame(WindowCreateInfo windowCreateInfo, PresentMode presentMode, int targetTimestep = 60, bool debugMode = false) : base(windowCreateInfo, presentMode, targetTimestep, debugMode) { var windowWidth = windowCreateInfo.WindowWidth; @@ -249,6 +254,14 @@ namespace MoonWorksTest screenshotPixels = new byte[screenShotBufferSize]; screenshotBuffer = new Buffer(GraphicsDevice, 0, screenShotBufferSize); screenshotThread = new Thread(new ThreadStart(SaveScreenshot)); + + music = StaticSound.LoadOgg(AudioDevice, new FileInfo(Path.Combine("Content", "title_screen.ogg"))); + musicInstance = music.CreateInstance(); + musicInstance.Play(); + + //music = new DynamicSound(AudioDevice, new FileInfo(Path.Combine("Content", "title_screen.ogg"))); + //musicInstance = music.CreateInstance(); + //musicInstance.Play(); } protected override void Update(double dt)