mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
update adventure BGM..
This commit is contained in:
@@ -312,6 +312,8 @@ public class Forge implements ApplicationListener {
|
|||||||
GuiBase.setIsAdventureMode(false);
|
GuiBase.setIsAdventureMode(false);
|
||||||
openHomeScreen(-1, null); //default for startup
|
openHomeScreen(-1, null); //default for startup
|
||||||
isMobileAdventureMode = false;
|
isMobileAdventureMode = false;
|
||||||
|
MusicPlaylist.invalidateMusicPlaylist();
|
||||||
|
SoundSystem.instance.setBackgroundMusic(MusicPlaylist.MENUS);
|
||||||
if (isLandscapeMode()) { //open preferred new game screen by default if landscape mode
|
if (isLandscapeMode()) { //open preferred new game screen by default if landscape mode
|
||||||
NewGameMenu.getPreferredScreen().open();
|
NewGameMenu.getPreferredScreen().open();
|
||||||
}
|
}
|
||||||
@@ -338,8 +340,11 @@ public class Forge implements ApplicationListener {
|
|||||||
try {
|
try {
|
||||||
Config.instance().loadResources();
|
Config.instance().loadResources();
|
||||||
SpellSmithScene.instance().loadEditions();
|
SpellSmithScene.instance().loadEditions();
|
||||||
if (startScene)
|
if (startScene) {
|
||||||
|
MusicPlaylist.invalidateMusicPlaylist();
|
||||||
|
SoundSystem.instance.setBackgroundMusic(MusicPlaylist.MENUS);
|
||||||
switchScene(StartScene.instance());
|
switchScene(StartScene.instance());
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@@ -404,8 +409,6 @@ public class Forge implements ApplicationListener {
|
|||||||
clearSplashScreen();
|
clearSplashScreen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//start background music
|
|
||||||
SoundSystem.instance.setBackgroundMusic(MusicPlaylist.MENUS);
|
|
||||||
safeToClose = true;
|
safeToClose = true;
|
||||||
clearTransitionScreen();
|
clearTransitionScreen();
|
||||||
}, takeScreenshot(), false, false, true, false));
|
}, takeScreenshot(), false, false, true, false));
|
||||||
|
|||||||
@@ -327,12 +327,12 @@ public class ArenaScene extends UIScene implements IAfterMatch {
|
|||||||
pane.clear();
|
pane.clear();
|
||||||
arenaTable.clear();
|
arenaTable.clear();
|
||||||
if (Forge.isLandscapeMode()) {
|
if (Forge.isLandscapeMode()) {
|
||||||
arenaTable.add(Controls.newTextraLabel("[;][%150]" + GameScene.instance().getAdventurePlayerLocation(true) + " Arena")).top();
|
arenaTable.add(Controls.newTextraLabel("[;][%150]" + GameScene.instance().getAdventurePlayerLocation(true, true) + " Arena")).top();
|
||||||
arenaTable.row();
|
arenaTable.row();
|
||||||
arenaTable.add(arenaPlane).width(arenaPlane.getWidth()).height(arenaPlane.getHeight());
|
arenaTable.add(arenaPlane).width(arenaPlane.getWidth()).height(arenaPlane.getHeight());
|
||||||
pane.setActor(arenaTable);
|
pane.setActor(arenaTable);
|
||||||
} else {
|
} else {
|
||||||
arenaTable.add(Controls.newTextraLabel("[;][%150]" + GameScene.instance().getAdventurePlayerLocation(true) + " Arena")).colspan(3).top();
|
arenaTable.add(Controls.newTextraLabel("[;][%150]" + GameScene.instance().getAdventurePlayerLocation(true, true) + " Arena")).colspan(3).top();
|
||||||
arenaTable.row();
|
arenaTable.row();
|
||||||
int size = fighters.size;
|
int size = fighters.size;
|
||||||
int pv = 0;
|
int pv = 0;
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ public class GameScene extends HudScene {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static GameScene object;
|
private static GameScene object;
|
||||||
|
private String location = "";
|
||||||
|
|
||||||
public static GameScene instance() {
|
public static GameScene instance() {
|
||||||
if (object == null)
|
if (object == null)
|
||||||
@@ -57,27 +58,31 @@ public class GameScene extends HudScene {
|
|||||||
WorldStage.getInstance().handlePointsOfInterestCollision();
|
WorldStage.getInstance().handlePointsOfInterestCollision();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAdventurePlayerLocation(boolean forHeader) {
|
public String getAdventurePlayerLocation(boolean forHeader, boolean skipRoads) {
|
||||||
String location = "";
|
|
||||||
if (MapStage.getInstance().isInMap()) {
|
if (MapStage.getInstance().isInMap()) {
|
||||||
location = forHeader ? TileMapScene.instance().rootPoint.getData().name : TileMapScene.instance().rootPoint.getData().type;
|
location = forHeader ? TileMapScene.instance().rootPoint.getData().name : TileMapScene.instance().rootPoint.getData().type;
|
||||||
} else {
|
} else {
|
||||||
World world = Current.world();
|
World world = Current.world();
|
||||||
int currentBiome = World.highestBiome(world.getBiome((int) Current.player().getWorldPosX() / world.getTileSize(), (int) Current.player().getWorldPosY() / world.getTileSize()));
|
//this gets the name of the layer... this shoud be based on boundaries...
|
||||||
|
int currentBiome = World.highestBiome(world.getBiome((int) stage.getPlayerSprite().getX() / world.getTileSize(), (int) stage.getPlayerSprite().getY() / world.getTileSize()));
|
||||||
List<BiomeData> biomeData = world.getData().GetBiomes();
|
List<BiomeData> biomeData = world.getData().GetBiomes();
|
||||||
try {
|
if (biomeData.size() <= currentBiome) //on roads....
|
||||||
|
if (skipRoads) {
|
||||||
|
location = forHeader ? "Waste Map" : "waste";
|
||||||
|
} else {
|
||||||
|
//should load while walking on "road"
|
||||||
|
location = "";
|
||||||
|
}
|
||||||
|
else {
|
||||||
BiomeData data = biomeData.get(currentBiome);
|
BiomeData data = biomeData.get(currentBiome);
|
||||||
location = forHeader ? TextUtil.capitalize(data.name) + " Map" : data.name;
|
location = forHeader ? TextUtil.capitalize(data.name) + " Map" : data.name;
|
||||||
} catch (Exception e) {
|
|
||||||
//e.printStackTrace();
|
|
||||||
location = forHeader ? "Waste Map" : "waste";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return location;
|
return location;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isNotInWorldMap() {
|
public boolean isNotInWorldMap() {
|
||||||
String location = getAdventurePlayerLocation(false);
|
String location = getAdventurePlayerLocation(false, true);
|
||||||
Set<String> locationTypes = Sets.newHashSet("capital", "castle", "cave", "dungeon", "town");
|
Set<String> locationTypes = Sets.newHashSet("capital", "castle", "cave", "dungeon", "town");
|
||||||
return locationTypes.contains(location);
|
return locationTypes.contains(location);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import forge.adventure.util.KeyBinding;
|
|||||||
/**
|
/**
|
||||||
* Hud base scene
|
* Hud base scene
|
||||||
*/
|
*/
|
||||||
public abstract class HudScene extends Scene implements InputProcessor, IAfterMatch {
|
public abstract class HudScene extends Scene implements InputProcessor, IAfterMatch {
|
||||||
|
|
||||||
GameHUD hud;
|
GameHUD hud;
|
||||||
GameStage stage;
|
GameStage stage;
|
||||||
@@ -27,10 +27,12 @@ public abstract class HudScene extends Scene implements InputProcessor, IAfterMa
|
|||||||
public void connected(final Controller controller) {
|
public void connected(final Controller controller) {
|
||||||
hud.ui.controllerConnected();
|
hud.ui.controllerConnected();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void disconnected(final Controller controller) {
|
public void disconnected(final Controller controller) {
|
||||||
hud.ui.controllerDisconnected();
|
hud.ui.controllerDisconnected();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean leave() {
|
public boolean leave() {
|
||||||
stage.leave();
|
stage.leave();
|
||||||
@@ -51,18 +53,16 @@ public abstract class HudScene extends Scene implements InputProcessor, IAfterMa
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void act(float delta)
|
public void act(float delta) {
|
||||||
{
|
|
||||||
stage.act(delta);
|
stage.act(delta);
|
||||||
hud.act(delta);
|
hud.act(delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render() {
|
public void render() {
|
||||||
|
|
||||||
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
|
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
|
||||||
stage.draw();
|
stage.draw();
|
||||||
hud.draw();
|
hud.draw();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -72,38 +72,38 @@ public abstract class HudScene extends Scene implements InputProcessor, IAfterMa
|
|||||||
}
|
}
|
||||||
if (hud.keyDown(keycode))
|
if (hud.keyDown(keycode))
|
||||||
return true;
|
return true;
|
||||||
if(isInHudOnlyMode())
|
if (isInHudOnlyMode())
|
||||||
return false;
|
return false;
|
||||||
return stage.keyDown(keycode);
|
return stage.keyDown(keycode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean keyUp(int keycode) {
|
public boolean keyUp(int keycode) {
|
||||||
|
|
||||||
if (MapStage.getInstance().isDialogOnlyInput()) {
|
if (MapStage.getInstance().isDialogOnlyInput()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (hud.keyUp(keycode))
|
if (hud.keyUp(keycode))
|
||||||
return true;
|
return true;
|
||||||
if(isInHudOnlyMode())
|
if (isInHudOnlyMode())
|
||||||
return false;
|
return false;
|
||||||
return stage.keyUp(keycode);
|
return stage.keyUp(keycode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean buttonDown(Controller var1, int var2) {
|
public boolean buttonDown(Controller var1, int var2) {
|
||||||
return keyDown(KeyBinding.controllerButtonToKey(var1,var2));
|
return keyDown(KeyBinding.controllerButtonToKey(var1, var2));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean buttonUp(Controller var1, int var2) {
|
public boolean buttonUp(Controller var1, int var2) {
|
||||||
return keyUp(KeyBinding.controllerButtonToKey(var1,var2));
|
return keyUp(KeyBinding.controllerButtonToKey(var1, var2));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean keyTyped(char character) {
|
public boolean keyTyped(char character) {
|
||||||
|
|
||||||
if (hud.keyTyped(character))
|
if (hud.keyTyped(character))
|
||||||
return true;
|
return true;
|
||||||
if(isInHudOnlyMode())
|
if (isInHudOnlyMode())
|
||||||
return false;
|
return false;
|
||||||
return stage.keyTyped(character);
|
return stage.keyTyped(character);
|
||||||
}
|
}
|
||||||
@@ -112,7 +112,7 @@ public abstract class HudScene extends Scene implements InputProcessor, IAfterMa
|
|||||||
public boolean touchDown(int screenX, int screenY, int pointer, int button) {
|
public boolean touchDown(int screenX, int screenY, int pointer, int button) {
|
||||||
if (hud.touchDown(screenX, screenY, pointer, button))
|
if (hud.touchDown(screenX, screenY, pointer, button))
|
||||||
return true;
|
return true;
|
||||||
if(isInHudOnlyMode())
|
if (isInHudOnlyMode())
|
||||||
return false;
|
return false;
|
||||||
return stage.touchDown(screenX, screenY, pointer, button);
|
return stage.touchDown(screenX, screenY, pointer, button);
|
||||||
}
|
}
|
||||||
@@ -121,7 +121,7 @@ public abstract class HudScene extends Scene implements InputProcessor, IAfterMa
|
|||||||
public boolean touchUp(int screenX, int screenY, int pointer, int button) {
|
public boolean touchUp(int screenX, int screenY, int pointer, int button) {
|
||||||
if (hud.touchUp(screenX, screenY, pointer, button))
|
if (hud.touchUp(screenX, screenY, pointer, button))
|
||||||
return true;
|
return true;
|
||||||
if(isInHudOnlyMode())
|
if (isInHudOnlyMode())
|
||||||
return false;
|
return false;
|
||||||
return stage.touchUp(screenX, screenY, pointer, button);
|
return stage.touchUp(screenX, screenY, pointer, button);
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@ public abstract class HudScene extends Scene implements InputProcessor, IAfterMa
|
|||||||
public boolean touchDragged(int screenX, int screenY, int pointer) {
|
public boolean touchDragged(int screenX, int screenY, int pointer) {
|
||||||
if (hud.touchDragged(screenX, screenY, pointer))
|
if (hud.touchDragged(screenX, screenY, pointer))
|
||||||
return true;
|
return true;
|
||||||
if(isInHudOnlyMode())
|
if (isInHudOnlyMode())
|
||||||
return false;
|
return false;
|
||||||
return stage.touchDragged(screenX, screenY, pointer);
|
return stage.touchDragged(screenX, screenY, pointer);
|
||||||
}
|
}
|
||||||
@@ -139,7 +139,7 @@ public abstract class HudScene extends Scene implements InputProcessor, IAfterMa
|
|||||||
public boolean mouseMoved(int screenX, int screenY) {
|
public boolean mouseMoved(int screenX, int screenY) {
|
||||||
if (hud.mouseMoved(screenX, screenY))
|
if (hud.mouseMoved(screenX, screenY))
|
||||||
return true;
|
return true;
|
||||||
if(isInHudOnlyMode())
|
if (isInHudOnlyMode())
|
||||||
return false;
|
return false;
|
||||||
return stage.mouseMoved(screenX, screenY);
|
return stage.mouseMoved(screenX, screenY);
|
||||||
}
|
}
|
||||||
@@ -148,22 +148,22 @@ public abstract class HudScene extends Scene implements InputProcessor, IAfterMa
|
|||||||
public boolean scrolled(float amountX, float amountY) {
|
public boolean scrolled(float amountX, float amountY) {
|
||||||
if (hud.scrolled(amountX, amountY))
|
if (hud.scrolled(amountX, amountY))
|
||||||
return true;
|
return true;
|
||||||
if(isInHudOnlyMode())
|
if (isInHudOnlyMode())
|
||||||
return false;
|
return false;
|
||||||
return stage.scrolled(amountX, amountY);
|
return stage.scrolled(amountX, amountY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean axisMoved(Controller controller, int axisIndex, float value) {
|
public boolean axisMoved(Controller controller, int axisIndex, float value) {
|
||||||
|
|
||||||
return stage.axisMoved(controller, axisIndex, value);
|
return stage.axisMoved(controller, axisIndex, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setWinner(boolean winner) {
|
public void setWinner(boolean winner) {
|
||||||
stage.setWinner(winner);
|
stage.setWinner(winner);
|
||||||
}
|
}
|
||||||
public boolean isInHudOnlyMode()
|
|
||||||
{
|
public boolean isInHudOnlyMode() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -218,6 +218,7 @@ public class InventoryScene extends UIScene {
|
|||||||
clearSelectable();
|
clearSelectable();
|
||||||
inventoryButtons.clear();
|
inventoryButtons.clear();
|
||||||
inventory.clear();
|
inventory.clear();
|
||||||
|
Current.player().getItems().sort();
|
||||||
for (int i = 0; i < Current.player().getItems().size; i++) {
|
for (int i = 0; i < Current.player().getItems().size; i++) {
|
||||||
|
|
||||||
if (i % columns == 0)
|
if (i % columns == 0)
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ public class SaveLoadScene extends UIScene {
|
|||||||
|
|
||||||
|
|
||||||
public void save() {
|
public void save() {
|
||||||
if (WorldSave.getCurrentSave().save(textInput.getText() + ASCII_179 + GameScene.instance().getAdventurePlayerLocation(true), currentSlot)) {
|
if (WorldSave.getCurrentSave().save(textInput.getText() + ASCII_179 + GameScene.instance().getAdventurePlayerLocation(true, true), currentSlot)) {
|
||||||
updateFiles();
|
updateFiles();
|
||||||
//ensure the dialog is hidden before switching
|
//ensure the dialog is hidden before switching
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ import forge.adventure.world.WorldSave;
|
|||||||
import forge.deck.Deck;
|
import forge.deck.Deck;
|
||||||
import forge.gui.FThreads;
|
import forge.gui.FThreads;
|
||||||
import forge.gui.GuiBase;
|
import forge.gui.GuiBase;
|
||||||
|
import forge.sound.MusicPlaylist;
|
||||||
|
import forge.sound.SoundSystem;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stage to handle everything rendered in the HUD
|
* Stage to handle everything rendered in the HUD
|
||||||
@@ -238,7 +240,6 @@ public class GameHUD extends Stage {
|
|||||||
return super.touchDown(screenX, screenY, pointer, button);
|
return super.touchDown(screenX, screenY, pointer, button);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw() {
|
public void draw() {
|
||||||
updatelife = false;
|
updatelife = false;
|
||||||
@@ -274,6 +275,7 @@ public class GameHUD extends Stage {
|
|||||||
updatelife = false;
|
updatelife = false;
|
||||||
lifePoints.setText("[%95][+Life]" + lifepointsTextColor + " " + AdventurePlayer.current().getLife() + "/" + AdventurePlayer.current().getMaxLife());
|
lifePoints.setText("[%95][+Life]" + lifepointsTextColor + " " + AdventurePlayer.current().getLife() + "/" + AdventurePlayer.current().getMaxLife());
|
||||||
}
|
}
|
||||||
|
updateMusic();
|
||||||
}
|
}
|
||||||
|
|
||||||
Texture miniMapTexture;
|
Texture miniMapTexture;
|
||||||
@@ -299,6 +301,7 @@ public class GameHUD extends Stage {
|
|||||||
} else {
|
} else {
|
||||||
deckActor.setColor(menuActor.getColor());
|
deckActor.setColor(menuActor.getColor());
|
||||||
}
|
}
|
||||||
|
updateMusic();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openDeck() {
|
private void openDeck() {
|
||||||
@@ -326,7 +329,6 @@ public class GameHUD extends Stage {
|
|||||||
dialog.getContentTable().add(L).width(120f);
|
dialog.getContentTable().add(L).width(120f);
|
||||||
dialog.setKeepWithinStage(true);
|
dialog.setKeepWithinStage(true);
|
||||||
showDialog();
|
showDialog();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void exitDungeonCallback() {
|
private void exitDungeonCallback() {
|
||||||
@@ -475,7 +477,6 @@ public class GameHUD extends Stage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void showDialog() {
|
private void showDialog() {
|
||||||
|
|
||||||
dialogButtonMap.clear();
|
dialogButtonMap.clear();
|
||||||
for (int i = 0; i < dialog.getButtonTable().getCells().size; i++) {
|
for (int i = 0; i < dialog.getButtonTable().getCells().size; i++) {
|
||||||
dialogButtonMap.add((TextraButton) dialog.getButtonTable().getCells().get(i).getActor());
|
dialogButtonMap.add((TextraButton) dialog.getButtonTable().getCells().get(i).getActor());
|
||||||
@@ -560,7 +561,47 @@ public class GameHUD extends Stage {
|
|||||||
if (count > 1)
|
if (count > 1)
|
||||||
showButtons();
|
showButtons();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateMusic() {
|
||||||
|
switch (GameScene.instance().getAdventurePlayerLocation(false, false)) {
|
||||||
|
case "green":
|
||||||
|
changeBGM(MusicPlaylist.GREEN);
|
||||||
|
break;
|
||||||
|
case "red":
|
||||||
|
changeBGM(MusicPlaylist.RED);
|
||||||
|
break;
|
||||||
|
case "blue":
|
||||||
|
changeBGM(MusicPlaylist.BLUE);
|
||||||
|
break;
|
||||||
|
case "black":
|
||||||
|
changeBGM(MusicPlaylist.BLACK);
|
||||||
|
break;
|
||||||
|
case "white":
|
||||||
|
changeBGM(MusicPlaylist.WHITE);
|
||||||
|
break;
|
||||||
|
case "capital":
|
||||||
|
case "town":
|
||||||
|
changeBGM(MusicPlaylist.TOWN);
|
||||||
|
break;
|
||||||
|
case "cave":
|
||||||
|
changeBGM(MusicPlaylist.CAVE);
|
||||||
|
break;
|
||||||
|
case "castle":
|
||||||
|
changeBGM(MusicPlaylist.CASTLE);
|
||||||
|
break;
|
||||||
|
case "waste":
|
||||||
|
changeBGM(MusicPlaylist.MENUS);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
float fade = 1f;
|
||||||
|
|
||||||
|
void changeBGM(MusicPlaylist playlist) {
|
||||||
|
if (!playlist.equals(SoundSystem.instance.getCurrentPlaylist())) {
|
||||||
|
SoundSystem.instance.setBackgroundMusic(playlist);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -818,7 +818,7 @@ public class MatchScreen extends FScreen {
|
|||||||
|
|
||||||
FSkinTexture getBG() {
|
FSkinTexture getBG() {
|
||||||
if (Forge.isMobileAdventureMode) {
|
if (Forge.isMobileAdventureMode) {
|
||||||
switch (GameScene.instance().getAdventurePlayerLocation(false)) {
|
switch (GameScene.instance().getAdventurePlayerLocation(false, true)) {
|
||||||
case "green":
|
case "green":
|
||||||
return FSkinTexture.ADV_BG_FOREST;
|
return FSkinTexture.ADV_BG_FOREST;
|
||||||
case "black":
|
case "black":
|
||||||
|
|||||||
BIN
forge-gui/res/adventure/music/black/black1.mp3
Normal file
BIN
forge-gui/res/adventure/music/black/black1.mp3
Normal file
Binary file not shown.
BIN
forge-gui/res/adventure/music/blue/blue1.mp3
Normal file
BIN
forge-gui/res/adventure/music/blue/blue1.mp3
Normal file
Binary file not shown.
BIN
forge-gui/res/adventure/music/cave/cave1.mp3
Normal file
BIN
forge-gui/res/adventure/music/cave/cave1.mp3
Normal file
Binary file not shown.
BIN
forge-gui/res/adventure/music/green/green1.mp3
Normal file
BIN
forge-gui/res/adventure/music/green/green1.mp3
Normal file
Binary file not shown.
BIN
forge-gui/res/adventure/music/match/match1.mp3
Normal file
BIN
forge-gui/res/adventure/music/match/match1.mp3
Normal file
Binary file not shown.
BIN
forge-gui/res/adventure/music/match/match2.mp3
Normal file
BIN
forge-gui/res/adventure/music/match/match2.mp3
Normal file
Binary file not shown.
BIN
forge-gui/res/adventure/music/match/match3.mp3
Normal file
BIN
forge-gui/res/adventure/music/match/match3.mp3
Normal file
Binary file not shown.
BIN
forge-gui/res/adventure/music/menus/menu1.mp3
Normal file
BIN
forge-gui/res/adventure/music/menus/menu1.mp3
Normal file
Binary file not shown.
BIN
forge-gui/res/adventure/music/red/red1.mp3
Normal file
BIN
forge-gui/res/adventure/music/red/red1.mp3
Normal file
Binary file not shown.
BIN
forge-gui/res/adventure/music/town/town1.mp3
Normal file
BIN
forge-gui/res/adventure/music/town/town1.mp3
Normal file
Binary file not shown.
BIN
forge-gui/res/adventure/music/white/white1.mp3
Normal file
BIN
forge-gui/res/adventure/music/white/white1.mp3
Normal file
Binary file not shown.
@@ -84,6 +84,7 @@ public final class ForgeConstants {
|
|||||||
public static final String AI_PROFILE_DIR = RES_DIR + "ai" + PATH_SEPARATOR;
|
public static final String AI_PROFILE_DIR = RES_DIR + "ai" + PATH_SEPARATOR;
|
||||||
public static final String SOUND_DIR = RES_DIR + "sound" + PATH_SEPARATOR;
|
public static final String SOUND_DIR = RES_DIR + "sound" + PATH_SEPARATOR;
|
||||||
public static final String MUSIC_DIR = RES_DIR + "music" + PATH_SEPARATOR;
|
public static final String MUSIC_DIR = RES_DIR + "music" + PATH_SEPARATOR;
|
||||||
|
public static final String ADVENTURE_MUSIC_DIR = ADVENTURE_DIR + "music" + PATH_SEPARATOR;
|
||||||
public static final String LANG_DIR = RES_DIR + "languages" + PATH_SEPARATOR;
|
public static final String LANG_DIR = RES_DIR + "languages" + PATH_SEPARATOR;
|
||||||
public static final String EFFECTS_DIR = RES_DIR + "effects" + PATH_SEPARATOR;
|
public static final String EFFECTS_DIR = RES_DIR + "effects" + PATH_SEPARATOR;
|
||||||
public static final String PUZZLE_DIR = RES_DIR + "puzzle" + PATH_SEPARATOR;
|
public static final String PUZZLE_DIR = RES_DIR + "puzzle" + PATH_SEPARATOR;
|
||||||
|
|||||||
@@ -6,8 +6,16 @@ import java.io.FilenameFilter;
|
|||||||
import forge.util.MyRandom;
|
import forge.util.MyRandom;
|
||||||
|
|
||||||
public enum MusicPlaylist {
|
public enum MusicPlaylist {
|
||||||
MENUS("menus/"),
|
BLACK ("black/"),
|
||||||
MATCH("match/");
|
BLUE ("blue/"),
|
||||||
|
RED ("red/"),
|
||||||
|
GREEN ("green/"),
|
||||||
|
WHITE ("white/"),
|
||||||
|
CASTLE ("castle/"),
|
||||||
|
CAVE ("cave/"),
|
||||||
|
TOWN ("town/"),
|
||||||
|
MENUS ("menus/"),
|
||||||
|
MATCH ("match/");
|
||||||
|
|
||||||
private final String subDir;
|
private final String subDir;
|
||||||
private int mostRecentTrackIdx = -1;
|
private int mostRecentTrackIdx = -1;
|
||||||
|
|||||||
@@ -192,6 +192,10 @@ public class SoundSystem {
|
|||||||
changeBackgroundTrack();
|
changeBackgroundTrack();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MusicPlaylist getCurrentPlaylist() {
|
||||||
|
return currentPlaylist;
|
||||||
|
}
|
||||||
|
|
||||||
public void changeBackgroundTrack() {
|
public void changeBackgroundTrack() {
|
||||||
//ensure old track stopped and disposed of if needed
|
//ensure old track stopped and disposed of if needed
|
||||||
if (currentTrack != null) {
|
if (currentTrack != null) {
|
||||||
@@ -300,6 +304,8 @@ public class SoundSystem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getMusicDirectory() {
|
public String getMusicDirectory() {
|
||||||
|
if (GuiBase.isAdventureMode())
|
||||||
|
return ForgeConstants.ADVENTURE_MUSIC_DIR;
|
||||||
String profileName = FModel.getPreferences().getPref(ForgePreferences.FPref.UI_CURRENT_MUSIC_SET);
|
String profileName = FModel.getPreferences().getPref(ForgePreferences.FPref.UI_CURRENT_MUSIC_SET);
|
||||||
if (profileName.equals("Default")) {
|
if (profileName.equals("Default")) {
|
||||||
return ForgeConstants.MUSIC_DIR;
|
return ForgeConstants.MUSIC_DIR;
|
||||||
|
|||||||
Reference in New Issue
Block a user