]> git.r.bdr.sh - rbdr/super-polarity/blobdiff - SuperPolarity/SuperPolarity.cs
Re-include the mac project in the main solution
[rbdr/super-polarity] / SuperPolarity / SuperPolarity.cs
index 9311d5311c59c371127f151afdf51821761f9b60..7fa387cb3710926215431e70a772d15959fc801e 100644 (file)
@@ -10,6 +10,7 @@ using Microsoft.Xna.Framework.GamerServices;
 using Microsoft.Xna.Framework.Media;
 using Microsoft.Xna.Framework.Audio;
 using SuperPolarity;
+using Tao.Sdl;
 #endregion
 
 namespace SuperPolarity
@@ -28,8 +29,8 @@ namespace SuperPolarity
 
         Screen EntryScreen;
 
-        protected Song TitleSong;
-        protected Song GameSong;
+        protected SoundEffect GameSong;
+        protected SoundEffectInstance GameSongHandle;
         protected SoundEffect GameOverSound;
 
         public SuperPolarity()
@@ -39,9 +40,9 @@ namespace SuperPolarity
             Components.Add(new GamerServicesComponent(this));
 
             graphics.PreferMultiSampling = true;
-            graphics.PreferredBackBufferWidth = 1280;
             graphics.PreferredBackBufferHeight = 720;
-            graphics.ToggleFullScreen();
+            graphics.PreferredBackBufferWidth = 1280;
+            //graphics.ToggleFullScreen();
 
             Content.RootDirectory = "Content";
             ActorFactory.SetGame(this);
@@ -84,7 +85,8 @@ namespace SuperPolarity
         {
 
             MediaPlayer.IsRepeating = true;
-            GameSong = Content.Load<Song>("Sound\\polaritytheme.wav");
+            GameSong = Content.Load<SoundEffect>("Sound\\polaritytheme");
+            GameSongHandle = GameSong.CreateInstance();
             GameOverSound = Content.Load<SoundEffect>("Sound\\gameover");
 
             // Create a new SpriteBatch, which can be used to draw textures.
@@ -143,7 +145,7 @@ namespace SuperPolarity
             // temp stuff before media manager is in
             if (songName == "game")
             {
-                MediaPlayer.Play(GameSong);
+                GameSongHandle.Play();
             }
         }
 
@@ -152,7 +154,7 @@ namespace SuperPolarity
             var scoreScreen = new ScoreScreen(this);
             scoreScreen.Initialize();
 
-            MediaPlayer.Stop();
+            GameSongHandle.Stop();
             GameOverSound.Play();
             ScreenManager.Pop();
             ScreenManager.Push(scoreScreen);