Description:
Limit sound to Debug builds for now.
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r470:e8820be9623e -

@@ -43,7 +43,9
43 private MouseState mousePrev = new MouseState();
43 private MouseState mousePrev = new MouseState();
44
44
45 private SpriteBatch batch;
45 private SpriteBatch batch;
46 #if DEBUG
46 private SoundEffect sound;
47 private SoundEffect sound;
48 #endif
47 private SpriteFont monoFont;
49 private SpriteFont monoFont;
48 private SpriteFont largeMonoFont;
50 private SpriteFont largeMonoFont;
49
51
@@ -185,7 +187,9
185 // Create the batch...
187 // Create the batch...
186 batch = new SpriteBatch(GraphicsDevice);
188 batch = new SpriteBatch(GraphicsDevice);
187
189
190 #if DEBUG
188 sound = Content.Load<SoundEffect>("FNASound");
191 sound = Content.Load<SoundEffect>("FNASound");
192 #endif
189 Tile.TileSetTexture = Content.Load<Texture2D>(@"part4_tileset");
193 Tile.TileSetTexture = Content.Load<Texture2D>(@"part4_tileset");
190 var texture = Content.Load<Texture2D>(@"solid_tileset");
194 var texture = Content.Load<Texture2D>(@"solid_tileset");
191
195
@@ -396,7 +400,9
396 protected override void UnloadContent()
400 protected override void UnloadContent()
397 {
401 {
398 batch.Dispose();
402 batch.Dispose();
403 #if DEBUG
399 sound.Dispose();
404 sound.Dispose();
405 #endif
400 Tile.TileSetTexture.Dispose();
406 Tile.TileSetTexture.Dispose();
401 Logging.Success("Disposed of Tile texture.");
407 Logging.Success("Disposed of Tile texture.");
402 if (Quad.PixelTexture != null)
408 if (Quad.PixelTexture != null)
@@ -485,12 +491,14
485 #region input
491 #region input
486 //
492 //
487 #region misc_keys
493 #region misc_keys
494 #if DEBUG
488 if (keyboardCur.IsKeyDown(Keys.OemBackslash)
495 if (keyboardCur.IsKeyDown(Keys.OemBackslash)
489 && keyboardPrev.IsKeyUp(Keys.OemBackslash)
496 && keyboardPrev.IsKeyUp(Keys.OemBackslash)
490 && keyboardCur.IsKeyDown(Keys.LeftShift))
497 && keyboardCur.IsKeyDown(Keys.LeftShift))
491 {
498 {
492 sound.Play(volume, pitch, pan);
499 sound.Play(volume, pitch, pan);
493 }
500 }
501 #endif
494 if (keyboardCur.IsKeyDown(Keys.V) && keyboardPrev.IsKeyUp(Keys.V))
502 if (keyboardCur.IsKeyDown(Keys.V) && keyboardPrev.IsKeyUp(Keys.V))
495 {
503 {
496 // debugWindow.swap();
504 // debugWindow.swap();
You need to be logged in to leave comments. Login now