diff options
-rw-r--r-- | engines/bladerunner/actor.cpp | 4 | ||||
-rw-r--r-- | engines/bladerunner/aud_stream.cpp | 4 | ||||
-rw-r--r-- | engines/bladerunner/aud_stream.h | 5 | ||||
-rw-r--r-- | engines/bladerunner/audio_speech.cpp | 5 | ||||
-rw-r--r-- | engines/bladerunner/bladerunner.cpp | 1 | ||||
-rw-r--r-- | engines/bladerunner/bladerunner.h | 1 | ||||
-rw-r--r-- | engines/bladerunner/detection.cpp | 10 | ||||
-rw-r--r-- | engines/bladerunner/detection_tables.h | 13 | ||||
-rw-r--r-- | engines/bladerunner/slice_renderer.cpp | 2 |
9 files changed, 29 insertions, 16 deletions
diff --git a/engines/bladerunner/actor.cpp b/engines/bladerunner/actor.cpp index ef89bb876c..f0bc39919f 100644 --- a/engines/bladerunner/actor.cpp +++ b/engines/bladerunner/actor.cpp @@ -727,7 +727,9 @@ bool Actor::draw(Common::Rect *screenRect) { float drawAngle = M_PI - _facing * (M_PI / 512.0f); float drawScale = _scale; - // TODO: Handle SHORTY mode + if (_vm->_shortyMode) { + drawScale = 0.7f; + } _vm->_sliceRenderer->drawInWorld(_animationId, _animationFrame, drawPosition, drawAngle, drawScale, _vm->_surfaceFront, _vm->_zbuffer->getData()); _vm->_sliceRenderer->getScreenRectangle(screenRect, _animationId, _animationFrame, drawPosition, drawAngle, drawScale); diff --git a/engines/bladerunner/aud_stream.cpp b/engines/bladerunner/aud_stream.cpp index 3d14f948d2..9cdd35d190 100644 --- a/engines/bladerunner/aud_stream.cpp +++ b/engines/bladerunner/aud_stream.cpp @@ -28,9 +28,10 @@ namespace BladeRunner { -AudStream::AudStream(byte *data) { +AudStream::AudStream(byte *data, int overrideFrequency) { _hash = 0; _cache = nullptr; + _overrideFrequency = overrideFrequency; init(data); } @@ -40,6 +41,7 @@ AudStream::AudStream(AudioCache *cache, int32 hash) { _cache = cache; _hash = hash; + _overrideFrequency = -1; _cache->incRef(_hash); diff --git a/engines/bladerunner/aud_stream.h b/engines/bladerunner/aud_stream.h index a13cdde84f..0316e25d29 100644 --- a/engines/bladerunner/aud_stream.h +++ b/engines/bladerunner/aud_stream.h @@ -45,19 +45,20 @@ class AudStream : public Audio::RewindableAudioStream { uint32 _sizeDecompressed; byte _flags; byte _compressionType; + int _overrideFrequency; ADPCMWestwoodDecoder _decoder; void init(byte *data); public: - AudStream(byte *data); + AudStream(byte *data, int overrideFrequency = -1); AudStream(AudioCache *cache, int32 hash); ~AudStream(); int readBuffer(int16 *buffer, const int numSamples); bool isStereo() const { return false; } - int getRate() const { return _frequency; }; + int getRate() const { return _overrideFrequency > 0 ? _overrideFrequency : _frequency; }; bool endOfData() const { return _p == _end; } bool rewind(); int getLength() const; diff --git a/engines/bladerunner/audio_speech.cpp b/engines/bladerunner/audio_speech.cpp index ce8c632655..6963b7071a 100644 --- a/engines/bladerunner/audio_speech.cpp +++ b/engines/bladerunner/audio_speech.cpp @@ -59,7 +59,6 @@ AudioSpeech::~AudioSpeech() { } bool AudioSpeech::playSpeech(const Common::String &name, int pan) { - // debug("AudioSpeech::playSpeech(\"%s\")", name); Common::ScopedPtr<Common::SeekableReadStream> r(_vm->getResourceStream(name)); if (!r) { @@ -82,9 +81,7 @@ bool AudioSpeech::playSpeech(const Common::String &name, int pan) { return false; } - AudStream *audioStream = new AudStream(_data); - - // TODO: shorty mode - set rate of sound to 33khz + AudStream *audioStream = new AudStream(_data, _vm->_shortyMode ? 33000 : -1); _channel = _vm->_audioMixer->play( Audio::Mixer::kSpeechSoundType, diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp index 48cc6179e9..a12e37565b 100644 --- a/engines/bladerunner/bladerunner.cpp +++ b/engines/bladerunner/bladerunner.cpp @@ -414,6 +414,7 @@ bool BladeRunnerEngine::startup(bool hasSavegames) { _subtitlesEnabled = ConfMan.getBool("subtitles"); _sitcomMode = ConfMan.getBool("sitcom"); + _shortyMode = ConfMan.getBool("shorty"); _items = new Items(this); diff --git a/engines/bladerunner/bladerunner.h b/engines/bladerunner/bladerunner.h index 1122e21eff..f52f808b25 100644 --- a/engines/bladerunner/bladerunner.h +++ b/engines/bladerunner/bladerunner.h @@ -195,6 +195,7 @@ public: bool _vqaStopIsRequested; bool _subtitlesEnabled; // tracks the state of whether subtitles are enabled or disabled from ScummVM GUI option or KIA checkbox (the states are synched) bool _sitcomMode; + bool _shortyMode; int _walkSoundId; int _walkSoundVolume; diff --git a/engines/bladerunner/detection.cpp b/engines/bladerunner/detection.cpp index d6ecf74105..b9819f91b7 100644 --- a/engines/bladerunner/detection.cpp +++ b/engines/bladerunner/detection.cpp @@ -50,7 +50,15 @@ static const ADExtraGuiOptionsMap optionsList[] = { false } }, - + { + GAMEOPTION_SHORTY, + { + _s("Shorty mode"), + _s("Game will shrink the actors and make their voices high pitched"), + "shorty", + false + } + }, AD_EXTRA_GUI_OPTIONS_TERMINATOR }; diff --git a/engines/bladerunner/detection_tables.h b/engines/bladerunner/detection_tables.h index 12e9d68118..5ee96c8c82 100644 --- a/engines/bladerunner/detection_tables.h +++ b/engines/bladerunner/detection_tables.h @@ -26,6 +26,7 @@ #include "engines/advancedDetector.h" #define GAMEOPTION_SITCOM GUIO_GAMEOPTIONS1 +#define GAMEOPTION_SHORTY GUIO_GAMEOPTIONS2 namespace BladeRunner { @@ -38,7 +39,7 @@ static const ADGameDescription gameDescriptions[] = { Common::EN_ANY, Common::kPlatformWindows, ADGF_NO_FLAGS, - GUIO1(GAMEOPTION_SITCOM) + GUIO2(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY) }, // BladeRunner (German) @@ -49,7 +50,7 @@ static const ADGameDescription gameDescriptions[] = { Common::DE_DEU, Common::kPlatformWindows, ADGF_NO_FLAGS, - GUIO1(GAMEOPTION_SITCOM) + GUIO2(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY) }, // BladeRunner (French) - Bug #9722 @@ -60,7 +61,7 @@ static const ADGameDescription gameDescriptions[] = { Common::FR_FRA, Common::kPlatformWindows, ADGF_NO_FLAGS, - GUIO1(GAMEOPTION_SITCOM) + GUIO2(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY) }, // BladeRunner (Italian) @@ -71,7 +72,7 @@ static const ADGameDescription gameDescriptions[] = { Common::IT_ITA, Common::kPlatformWindows, ADGF_NO_FLAGS, - GUIO1(GAMEOPTION_SITCOM) + GUIO2(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY) }, // BladeRunner (Russian) @@ -82,7 +83,7 @@ static const ADGameDescription gameDescriptions[] = { Common::RU_RUS, Common::kPlatformWindows, ADGF_NO_FLAGS, - GUIO1(GAMEOPTION_SITCOM) + GUIO2(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY) }, // BladeRunner (Spanish) @@ -93,7 +94,7 @@ static const ADGameDescription gameDescriptions[] = { Common::ES_ESP, Common::kPlatformWindows, ADGF_NO_FLAGS, - GUIO1(GAMEOPTION_SITCOM) + GUIO2(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY) }, AD_TABLE_END_MARKER diff --git a/engines/bladerunner/slice_renderer.cpp b/engines/bladerunner/slice_renderer.cpp index 5cf818c1ff..1fd0030857 100644 --- a/engines/bladerunner/slice_renderer.cpp +++ b/engines/bladerunner/slice_renderer.cpp @@ -375,7 +375,7 @@ void SliceRenderer::drawInWorld(int animationId, int animationFrame, Vector3 pos assert(_setEffects); //assert(_view); - setupFrameInWorld(animationId, animationFrame, position, facing); + setupFrameInWorld(animationId, animationFrame, position, facing, scale); assert(_sliceFramePtr); |