Sounds in rogue & new assets

master
Ondřej Hruška 11 years ago
parent 4fcd5f98fd
commit 162bcc9b7e
  1. BIN
      res/audio/effects/break.ogg
  2. BIN
      res/audio/effects/click.ogg
  3. BIN
      res/audio/effects/crate.ogg
  4. BIN
      res/audio/effects/door.ogg
  5. BIN
      res/audio/effects/drop.ogg
  6. BIN
      res/audio/effects/eat.ogg
  7. BIN
      res/audio/effects/hurt.ogg
  8. BIN
      res/audio/effects/lose.ogg
  9. BIN
      res/audio/effects/mouse1.ogg
  10. BIN
      res/audio/effects/mouse2.ogg
  11. BIN
      res/audio/effects/mouse3.ogg
  12. BIN
      res/audio/effects/mouse4.ogg
  13. BIN
      res/audio/effects/mouse5.ogg
  14. BIN
      res/audio/effects/pickup.ogg
  15. 0
      res/audio/effects/shutter.ogg
  16. BIN
      res/audio/effects/win.ogg
  17. BIN
      res/audio/music/8bit_Dungeon_Boss.ogg
  18. BIN
      res/audio/music/8bit_Dungeon_Level.ogg
  19. BIN
      res/audio/music/Home_Base_Groove.ogg
  20. BIN
      res/audio/music/Lightless Dawn.mp3
  21. BIN
      res/audio/music/Video Dungeon Crawl.mp3
  22. 1
      src/mightypork/rogue/Launcher.java
  23. 3
      src/mightypork/rogue/RogueApp.java
  24. 30
      src/mightypork/rogue/RogueResources.java
  25. 8
      src/mightypork/rogue/screens/game/LayerWin.java
  26. 9
      src/mightypork/rogue/screens/game/ScreenGame.java
  27. 24
      src/mightypork/rogue/screens/menu/ScreenMainMenu.java

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -76,6 +76,7 @@ public class Launcher {
final BaseApp app = new RogueApp(workdir, true); final BaseApp app = new RogueApp(workdir, true);
app.opt().setLogLevel(llFile, llSyso); app.opt().setLogLevel(llFile, llSyso);
app.opt().setBusLogging(false);//TODO temporary
app.start(); app.start();
} }

@ -127,6 +127,8 @@ public final class RogueApp extends BaseApp implements ViewportChangeListener, S
@Override @Override
protected void postInit() protected void postInit()
{ {
getEventBus().send(new MainLoopRequest(new Runnable() { getEventBus().send(new MainLoopRequest(new Runnable() {
@Override @Override
@ -165,6 +167,7 @@ public final class RogueApp extends BaseApp implements ViewportChangeListener, S
Res.getSoundEffect("gui.shutter").play(0.8); Res.getSoundEffect("gui.shutter").play(0.8);
} }
@Override @Override
protected void writeLogHeader() protected void writeLogHeader()
{ {

@ -41,7 +41,35 @@ public class RogueResources implements ResourceSetup {
@Override @Override
public void addSounds(SoundRegistry sounds) public void addSounds(SoundRegistry sounds)
{ {
sounds.addEffect("gui.shutter", "/res/audio/shutter.ogg", 1, 1);
//sounds.addLoop("music.dungeon", "/res/audio/music/Lightless_Dawn.ogg", 1, 1, 3, 1.5);
sounds.addLoop("music.menu", "/res/audio/music/Home_Base_Groove.ogg", 1, 0.7, 3, 1.5);
sounds.addLoop("music.dungeon", "/res/audio/music/8bit_Dungeon_Level.ogg", 1, 0.6, 3, 1.5);
//sounds.addLoop("music.dungeon2.boss", "/res/audio/music/8bit_Dungeon_Boss.ogg", 1, 0.6, 3, 1.5);
sounds.addEffect("gui.shutter", "/res/audio/effects/shutter.ogg", 1, 1);
sounds.addEffect("gui.click", "/res/audio/effects/click.ogg", 1, 1);
sounds.addEffect("game.win", "/res/audio/effects/win.ogg", 1, 0.7);
sounds.addEffect("game.lose", "/res/audio/effects/lose.ogg", 1, 1);
sounds.addEffect("item.drop", "/res/audio/effects/drop.ogg", 1, 1);
sounds.addEffect("item.pickup", "/res/audio/effects/pickup.ogg", 1, 1);
sounds.addEffect("item.break", "/res/audio/effects/break.ogg", 1, 1);
sounds.addEffect("player.eat", "/res/audio/effects/eat.ogg", 1, 1);
sounds.addEffect("player.hurt", "/res/audio/effects/hurt.ogg", 1, 1);
sounds.addEffect("crate.open", "/res/audio/effects/crate.ogg", 1, 1);
sounds.addEffect("door.open", "/res/audio/effects/door.ogg", 1, 1);
sounds.addEffect("door.close", "/res/audio/effects/door.ogg", 0.8, 1);
sounds.addEffect("rat.sqeak1", "/res/audio/effects/mouse1.ogg", 1, 1);
sounds.addEffect("rat.sqeak2", "/res/audio/effects/mouse2.ogg", 1, 1);
sounds.addEffect("rat.sqeak3", "/res/audio/effects/mouse3.ogg", 1, 1);
sounds.addEffect("rat.sqeak4", "/res/audio/effects/mouse4.ogg", 1, 1);
sounds.addEffect("rat.sqeak5", "/res/audio/effects/mouse5.ogg", 1, 1);
} }

@ -15,6 +15,7 @@ import mightypork.gamecore.gui.components.painters.TextPainter;
import mightypork.gamecore.gui.screens.impl.FadingLayer; import mightypork.gamecore.gui.screens.impl.FadingLayer;
import mightypork.gamecore.input.KeyStroke.Edge; import mightypork.gamecore.input.KeyStroke.Edge;
import mightypork.gamecore.resources.Res; import mightypork.gamecore.resources.Res;
import mightypork.gamecore.resources.audio.SoundSystem;
import mightypork.gamecore.resources.fonts.GLFont; import mightypork.gamecore.resources.fonts.GLFont;
import mightypork.gamecore.util.math.color.pal.RGB; import mightypork.gamecore.util.math.color.pal.RGB;
import mightypork.gamecore.util.math.constraints.num.Num; import mightypork.gamecore.util.math.constraints.num.Num;
@ -81,4 +82,11 @@ public class LayerWin extends FadingLayer {
return 300; return 300;
} }
@Override
protected void onShowFinished()
{
getSoundSystem().fadeOutAllLoops();
Res.getSoundEffect("game.win").play(1);
}
} }

@ -8,8 +8,12 @@ import mightypork.gamecore.core.events.UserQuitRequest;
import mightypork.gamecore.core.modules.AppAccess; import mightypork.gamecore.core.modules.AppAccess;
import mightypork.gamecore.gui.Action; import mightypork.gamecore.gui.Action;
import mightypork.gamecore.gui.ActionGroup; import mightypork.gamecore.gui.ActionGroup;
import mightypork.gamecore.input.KeyStroke;
import mightypork.gamecore.input.KeyStroke.Edge; import mightypork.gamecore.input.KeyStroke.Edge;
import mightypork.gamecore.input.Keys;
import mightypork.gamecore.logging.Log; import mightypork.gamecore.logging.Log;
import mightypork.gamecore.resources.Res;
import mightypork.gamecore.resources.audio.SoundSystem;
import mightypork.gamecore.util.math.color.Color; import mightypork.gamecore.util.math.color.Color;
import mightypork.rogue.Const; import mightypork.rogue.Const;
import mightypork.rogue.RogueStateManager.RogueState; import mightypork.rogue.RogueStateManager.RogueState;
@ -306,6 +310,9 @@ public class ScreenGame extends RogueScreen implements PlayerDeathHandler, GameW
setState(GScrState.WORLD); setState(GScrState.WORLD);
hideAllPopups(); hideAllPopups();
getSoundSystem().fadeOutAllLoops();
Res.getSoundLoop("music.dungeon").fadeIn();
} }
@ -314,6 +321,8 @@ public class ScreenGame extends RogueScreen implements PlayerDeathHandler, GameW
{ {
super.onScreenLeave(); super.onScreenLeave();
WorldProvider.get().setListening(false); WorldProvider.get().setListening(false);
Res.getSoundLoop("music.dungeon").fadeOut();
} }

@ -33,13 +33,6 @@ import mightypork.rogue.screens.RogueScreen;
public class ScreenMainMenu extends RogueScreen { public class ScreenMainMenu extends RogueScreen {
public ScreenMainMenu(AppAccess app)
{
super(app);
addLayer(new MenuLayer(this));
}
/** /**
* The layer * The layer
* *
@ -134,4 +127,21 @@ public class ScreenMainMenu extends RogueScreen {
} }
} }
public ScreenMainMenu(AppAccess app)
{
super(app);
addLayer(new MenuLayer(this));
}
@Override
protected void onScreenEnter()
{
super.onScreenEnter();
getSoundSystem().fadeOutAllLoops();
Res.getSoundLoop("music.menu").fadeIn();
}
} }

Loading…
Cancel
Save