[Scummvm-git-logs] scummvm master -> 45ec2a7a9df10b754c49baea37a35e8982b60a06
antoniou79
a.antoniou79 at gmail.com
Wed Nov 18 11:49:32 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
45ec2a7a9d BLADERUNNER: DEBUGGER: Add music command
Commit: 45ec2a7a9df10b754c49baea37a35e8982b60a06
https://github.com/scummvm/scummvm/commit/45ec2a7a9df10b754c49baea37a35e8982b60a06
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2020-11-18T13:48:52+02:00
Commit Message:
BLADERUNNER: DEBUGGER: Add music command
Changed paths:
engines/bladerunner/debugger.cpp
engines/bladerunner/debugger.h
engines/bladerunner/game_constants.h
diff --git a/engines/bladerunner/debugger.cpp b/engines/bladerunner/debugger.cpp
index aabd2cbd60..c3e184c961 100644
--- a/engines/bladerunner/debugger.cpp
+++ b/engines/bladerunner/debugger.cpp
@@ -23,6 +23,7 @@
#include "bladerunner/debugger.h"
#include "bladerunner/actor.h"
+#include "bladerunner/ambient_sounds.h"
#include "bladerunner/bladerunner.h"
#include "bladerunner/boundingbox.h"
#include "bladerunner/combat.h"
@@ -33,6 +34,7 @@
#include "bladerunner/game_info.h"
#include "bladerunner/light.h"
#include "bladerunner/lights.h"
+#include "bladerunner/music.h"
#include "bladerunner/regions.h"
#include "bladerunner/savefile.h"
#include "bladerunner/scene.h"
@@ -117,6 +119,7 @@ Debugger::Debugger(BladeRunnerEngine *vm) : GUI::Debugger() {
registerCmd("goal", WRAP_METHOD(Debugger, cmdGoal));
registerCmd("loop", WRAP_METHOD(Debugger, cmdLoop));
registerCmd("pos", WRAP_METHOD(Debugger, cmdPosition));
+ registerCmd("music", WRAP_METHOD(Debugger, cmdMusic));
registerCmd("say", WRAP_METHOD(Debugger, cmdSay));
registerCmd("scene", WRAP_METHOD(Debugger, cmdScene));
registerCmd("var", WRAP_METHOD(Debugger, cmdVariable));
@@ -575,6 +578,67 @@ bool Debugger::cmdPosition(int argc, const char **argv) {
return true;
}
+// Tracks marked as (G) are only available in-game ie. not in the official OST by Frank Klepacki on his site.
+//
+// Note that there are a few tracks that are not proper music tracks but rather SFX tracks.
+// For example, the re-used track "Iron Fist"
+// from Command & Conquer - The Covert Operations (OST)
+// which is played at the NightClub Row (NR01), is "kSfxMUSBLEED" (looping)
+// TODO maybe support those too?
+const char* kMusicTracksArr[] = {"Animoid Row (G)", // kMusicArabLoop
+ "Battle Theme", // kMusicBatl226M
+ "Blade Runner Blues", // kMusicBRBlues
+ "Etsuko Theme", // kMusicKyoto
+ "One More Time, Love (G)", // kMusicOneTime
+ "Gothic Club 2", // kMusicGothic3
+ "Ark Dragon Fly (G)", // kMusicArkdFly1
+ "Ark Dance (G)", // kMusicArkDnce1
+ "Taffy's Club 2", // kMusicTaffy2
+ "Enigma Drift", // kMusicTaffy3
+ "Late Call", // kMusicTaffy4
+ "Nexus (aka Beating 1)", // kMusicBeating1
+ "Awakenings (aka Crystal Dies 1)", // kMusicCrysDie1
+ "Gothic Club", // kMusicGothic1
+ "Transition", // kMusicGothic2
+ "The Eyes Follow", // kMusicStrip1
+ "Dektora Dance (G)", // kMusicDkoDnce1
+ "End Credits", // kMusicCredits
+ "Ending (aka Moraji)", // kMusicMoraji
+ "Remorse (aka Clovis Dies 1)", // kMusicClovDie1
+ "Solitude (aka Clovis Dies)", // kMusicClovDies
+ "Love Theme"}; // kMusicLoveSong
+
+bool Debugger::cmdMusic(int argc, const char** argv) {
+ if (argc != 2) {
+ debugPrintf("Play the specified music track, list the available tracks or stop the current playing track.\n");
+ debugPrintf("Usage: %s (list|stop|<musicId>)\n", argv[0]);
+ debugPrintf("Usage: %s <musicId>\nmusicId can be in [0, %d]\n", argv[0], (int)_vm->_gameInfo->getMusicTrackCount() - 1);
+ return true;
+ }
+
+ Common::String trackArgStr = argv[1];
+ if (trackArgStr == "list") {
+ for (int i = 0; i < (int)_vm->_gameInfo->getMusicTrackCount(); ++i) {
+ debugPrintf("%2d %s\n", i, kMusicTracksArr[i]);
+ }
+ return true;
+ } else if (trackArgStr == "stop") {
+ _vm->_music->stop(0);
+ //_vm->_ambientSounds->removeLoopingSound(kSfxMUSBLEED, 0);
+ } else {
+ int musicId = atoi(argv[1]);
+ if (musicId >= 0 && musicId < (int)_vm->_gameInfo->getMusicTrackCount()) {
+ _vm->_music->stop(0);
+ _vm->_music->play(_vm->_gameInfo->getMusicTrack(musicId), 100, 0, 0, -1, 0, 0);
+ } else {
+ debugPrintf("Invalid music track id specified. Please choose an integer between 0 and %d.\n", (int)_vm->_gameInfo->getMusicTrackCount()-1);
+ }
+ //_vm->_ambientSounds->removeLoopingSound(kSfxMUSBLEED, 0);
+ //_vm->_ambientSounds->addLoopingSound(kSfxMUSBLEED, 100, 0, 0);
+ }
+ return false;
+}
+
bool Debugger::cmdSay(int argc, const char **argv) {
if (argc != 3) {
debugPrintf("Actor will say specified line.\n");
diff --git a/engines/bladerunner/debugger.h b/engines/bladerunner/debugger.h
index 4610a65c4e..2888c1d2f4 100644
--- a/engines/bladerunner/debugger.h
+++ b/engines/bladerunner/debugger.h
@@ -92,12 +92,13 @@ public:
bool cmdAnimation(int argc, const char **argv);
bool cmdHealth(int argc, const char **argv);
- bool cmdChapter(int argc, const char **argv);
+// bool cmdChapter(int argc, const char **argv);
bool cmdDraw(int argc, const char **argv);
bool cmdFlag(int argc, const char **argv);
bool cmdGoal(int argc, const char **argv);
bool cmdLoop(int argc, const char **argv);
bool cmdPosition(int argc, const char **argv);
+ bool cmdMusic(int argc, const char** argv);
bool cmdSay(int argc, const char **argv);
bool cmdScene(int argc, const char **argv);
bool cmdVariable(int argc, const char **argv);
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index 433ec4a1b2..a540bb79af 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -2754,7 +2754,7 @@ enum ActorTimers {
// Certain tracks are available at Frank Klepacki's website/portfolio for Blade Runner
// Those are noted with their "official" name in a side-comment here, as they appear at the website
-// A few may not match the incremental number given in-game (eg kMusicGothic3 is "Gothic Club 2")
+// A few may not match the incremental number given in-game (eg. kMusicGothic3 is "Gothic Club 2")
enum MusicTracks {
kMusicArabLoop = 0, // Animoid Row track (Not available at Frank Klepacki's website/portfolio for Blade Runner)
kMusicBatl226M = 1, // "Battle Theme"
@@ -2765,18 +2765,18 @@ enum MusicTracks {
kMusicArkdFly1 = 6,
kMusicArkDnce1 = 7,
kMusicTaffy2 = 8, // "Taffy's Club 2"
- kMusicTaffy3 = 9,
- kMusicTaffy4 = 10,
- kMusicBeating1 = 11,
- kMusicCrysDie1 = 12,
+ kMusicTaffy3 = 9, // "Enigma Drift"
+ kMusicTaffy4 = 10, // "Late Call"
+ kMusicBeating1 = 11, // "Nexus"
+ kMusicCrysDie1 = 12, // "Awakenings"
kMusicGothic1 = 13, // "Gothic Club"
- kMusicGothic2 = 14,
- kMusicStrip1 = 15,
+ kMusicGothic2 = 14, // "Transition"
+ kMusicStrip1 = 15, // "The Eyes Follow"
kMusicDkoDnce1 = 16,
- kMusicCredits = 17, // "Blade Runner End Credits"
- kMusicMoraji = 18,
- kMusicClovDie1 = 19,
- kMusicClovDies = 20,
+ kMusicCredits = 17, // "End Credits"
+ kMusicMoraji = 18, // "Ending"
+ kMusicClovDie1 = 19, // "Remorse"
+ kMusicClovDies = 20, // "Solitude"
kMusicLoveSong = 21 // "Love Theme" (Lucy, Dektora, Subway drive ending)
};
@@ -3143,7 +3143,7 @@ enum SFXSounds {
kSfxSTONDOR1 = 359,
kSfxSTONDOR2 = 360,
kSfxSEXYAD2 = 361,
- kSfxMUSBLEED = 362, // - Looping
+ kSfxMUSBLEED = 362, // - Looping ("Iron Fist" track from Command & Conquer - The Covert Operations (OST))
kSfxSUNROOM1 = 363,
kSfxSUNROOM2 = 364,
kSfxSUNROOM3 = 365,
More information about the Scummvm-git-logs
mailing list