[Scummvm-git-logs] scummvm master -> 8fd42faaeed6abf00ea0753084ddf733b33576f8
neuromancer
noreply at scummvm.org
Tue Oct 27 10:29:17 UTC 2026
This automated email contains information about 14 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
ac4eb589da HOLLYWOOD: preliminary code for the runaway german demo
92d40becdf HOLLYWOOD: reorganized the engine to accomodate both game specific code as well the common one
2815b2f45b HOLLYWOOD: implemented intro in runaway german demo
14db87f41a HOLLYWOOD: improve support for original UI in runaway demo including inventory and fonts
c41d7bdd24 HOLLYWOOD: add support for runaway french demo
611cae8157 HOLLYWOOD: add support for runaway spanish demo
e9c2154728 HOLLYWOOD: add missing sounds for runaway demo
c982217b14 HOLLYWOOD: initial menu implementation for the runaway demo
5825ea194f HOLLYWOOD: allow to play cutscenes and implemented window interaction
e3430ddd4d HOLLYWOOD: implement runaway demo intro and outro
9b0c399e87 HOLLYWOOD: lip-sync during gameplay in runaway demo
8373101ca3 HOLLYWOOD: better animations in runaway demo
17f3e11ad1 HOLLYWOOD: added save/load to runaway demo
8fd42faaee HOLLYWOOD: adjusted the code to use the new APIs
Commit: ac4eb589dabab295210d41b95af3a9f76cb92c50
https://github.com/scummvm/scummvm/commit/ac4eb589dabab295210d41b95af3a9f76cb92c50
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-10-27T11:28:15+01:00
Commit Message:
HOLLYWOOD: preliminary code for the runaway german demo
Changed paths:
A engines/hollywood/runaway/audio.cpp
A engines/hollywood/runaway/audio.h
A engines/hollywood/runaway/engine.cpp
A engines/hollywood/runaway/engine.h
A engines/hollywood/runaway/graphics.cpp
A engines/hollywood/runaway/graphics.h
A engines/hollywood/runaway/scene5030.cpp
A engines/hollywood/runaway/scene5030.h
engines/hollywood/configure.engine
engines/hollywood/detection.cpp
engines/hollywood/metaengine.cpp
engines/hollywood/module.mk
engines/hollywood/resource.cpp
engines/hollywood/resource.h
diff --git a/engines/hollywood/configure.engine b/engines/hollywood/configure.engine
index 201b4225427..8c290a96663 100644
--- a/engines/hollywood/configure.engine
+++ b/engines/hollywood/configure.engine
@@ -1,3 +1,3 @@
# This file is included from the main "configure" script
# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] [components]
-add_engine hollywood "Hollywood Monsters" no
+add_engine hollywood "Hollywood Monsters & Runaway" no "" "" "16bit highres"
diff --git a/engines/hollywood/detection.cpp b/engines/hollywood/detection.cpp
index 6f959736200..b9823f1e3b7 100644
--- a/engines/hollywood/detection.cpp
+++ b/engines/hollywood/detection.cpp
@@ -32,9 +32,15 @@ namespace Hollywood {
const PlainGameDescriptor plainGameDescriptors[] = {
{"hollywood", "Hollywood Monsters"},
+ {"runaway", "Runaway: A Road Adventure"},
{nullptr, nullptr}
};
+const char *const directoryGlobs[] = {
+ "resource",
+ nullptr
+};
+
const DebugChannelDef debugFlagList[] = {
{Hollywood::kDebugGeneral, "general", "General debug level"},
{Hollywood::kDebugResources, "resources", "Resource archive loading"},
@@ -44,6 +50,19 @@ const DebugChannelDef debugFlagList[] = {
};
const ADGameDescription gameDescriptions[] = {
+ // German Runaway demo, starting in the shack (scene 5030).
+ {
+ "runaway",
+ "Demo",
+ AD_ENTRY3s("RESOURCE.E03", "df350293b7dab8f39aead666dcedce72", 41872288,
+ "RESOURCE.003", "6e7e639375a14c5b694879c88a8aeaa6", 444292,
+ "RESOURCE.000", "3ccd0619e1475efd4f1212b92db25843", 38045367),
+ Common::DE_DEU,
+ Common::kPlatformWindows,
+ ADGF_DEMO | ADGF_UNSTABLE,
+ GUIO2(GUIO_NOMIDI, GUIO_NOLAUNCHLOAD)
+ },
+
// Spanish DOS demo.
{
"hollywood",
@@ -248,6 +267,8 @@ class HollywoodMetaEngineDetection : public AdvancedMetaEngineDetection<ADGameDe
public:
HollywoodMetaEngineDetection() : AdvancedMetaEngineDetection(Hollywood::gameDescriptions, plainGameDescriptors) {
_flags = kADFlagPreferFallbackDetection;
+ _maxScanDepth = 2;
+ _directoryGlobs = directoryGlobs;
}
ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist,
@@ -275,11 +296,11 @@ public:
}
const char *getEngineName() const override {
- return "Hollywood Monsters";
+ return "Hollywood Monsters & Runaway";
}
const char *getOriginalCopyright() const override {
- return "Hollywood Monsters (C) 1997 Pendulo Studios";
+ return "Hollywood Monsters and Runaway (C) Pendulo Studios";
}
const DebugChannelDef *getDebugChannels() const override {
diff --git a/engines/hollywood/metaengine.cpp b/engines/hollywood/metaengine.cpp
index c21c5fd075b..f296ba1bb92 100644
--- a/engines/hollywood/metaengine.cpp
+++ b/engines/hollywood/metaengine.cpp
@@ -27,6 +27,7 @@
#include "hollywood/hollywood.h"
#include "hollywood/detection.h"
+#include "hollywood/runaway/engine.h"
namespace Hollywood {
@@ -59,13 +60,17 @@ public:
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
bool hasFeature(MetaEngineFeature f) const override;
void registerDefaultSettings(const Common::String &target) const override;
+ Common::Array<Common::Keymap *> initKeymaps(const char *target) const override;
protected:
void getSavegameThumbnail(Graphics::Surface &thumb) override;
};
Common::Error HollywoodMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
- *engine = new HollywoodEngine(syst, desc);
+ if (!strcmp(desc->gameId, "runaway"))
+ *engine = new RunawayEngine(syst);
+ else
+ *engine = new HollywoodEngine(syst, desc);
return Common::kNoError;
}
@@ -80,7 +85,7 @@ void HollywoodMetaEngine::registerDefaultSettings(const Common::String &) const
}
void HollywoodMetaEngine::getSavegameThumbnail(Graphics::Surface &thumb) {
- if (g_engine) {
+ if (g_engine && ConfMan.get("gameid") == "hollywood") {
HollywoodEngine *engine = (HollywoodEngine *)g_engine;
if (engine->copyLastGameplayThumbnail(thumb))
return;
@@ -89,6 +94,12 @@ void HollywoodMetaEngine::getSavegameThumbnail(Graphics::Surface &thumb) {
Graphics::createThumbnail(thumb);
}
+Common::Array<Common::Keymap *> HollywoodMetaEngine::initKeymaps(const char *target) const {
+ if (getGameId(target) == "runaway")
+ return RunawayEngine::initKeymaps();
+ return MetaEngine::initKeymaps(target);
+}
+
} // End of namespace Hollywood
#if PLUGIN_ENABLED_DYNAMIC(HOLLYWOOD)
diff --git a/engines/hollywood/module.mk b/engines/hollywood/module.mk
index 31a3f981324..7f300860019 100644
--- a/engines/hollywood/module.mk
+++ b/engines/hollywood/module.mk
@@ -20,6 +20,10 @@ MODULE_OBJS = \
metaengine.o \
music.o \
resource.o \
+ runaway/audio.o \
+ runaway/engine.o \
+ runaway/graphics.o \
+ runaway/scene5030.o \
saveload.o \
scenes/chapter_intro_scene.o \
scenes/presentation_scene.o \
diff --git a/engines/hollywood/resource.cpp b/engines/hollywood/resource.cpp
index 252a6e8d437..7c7122cc803 100644
--- a/engines/hollywood/resource.cpp
+++ b/engines/hollywood/resource.cpp
@@ -31,31 +31,35 @@
namespace Hollywood {
void ResourceChunkTable::clear() {
- for (int i = 0; i < kResourceChunkCount; ++i) {
+ count = 0;
+ for (int i = 0; i < kMaxResourceChunkCount; ++i) {
offsets[i] = 0;
sizes[i] = 0;
}
}
-bool ResourceChunkTable::load(Common::SeekableReadStream &stream) {
+bool ResourceChunkTable::load(Common::SeekableReadStream &stream, uint chunkCount) {
clear();
- if (stream.size() < kResourceChunkCount * 8)
+ if (chunkCount == 0 || chunkCount > kMaxResourceChunkCount || stream.size() < chunkCount * 8)
return false;
if (!stream.seek(0))
return false;
- for (int i = 0; i < kResourceChunkCount; ++i)
+ for (uint i = 0; i < chunkCount; ++i)
offsets[i] = stream.readUint32LE();
- for (int i = 0; i < kResourceChunkCount; ++i)
+ for (uint i = 0; i < chunkCount; ++i)
sizes[i] = stream.readUint32LE();
- return !stream.err();
+ if (stream.err() || stream.eos())
+ return false;
+ count = chunkCount;
+ return true;
}
bool ResourceChunkTable::isValidChunk(uint index) const {
- return index < kResourceChunkCount && sizes[index] != 0;
+ return index < count && sizes[index] != 0;
}
Common::SeekableReadStream *createResourceChunkReadStream(const Common::Path &fileName, uint index) {
@@ -93,7 +97,7 @@ ChunkArchive::ChunkArchive() :
_chunkTable.clear();
}
-bool ChunkArchive::open(const Common::Path &fileName) {
+bool ChunkArchive::open(const Common::Path &fileName, uint chunkCount) {
close();
_fileName = fileName;
@@ -102,7 +106,7 @@ bool ChunkArchive::open(const Common::Path &fileName) {
return false;
}
- if (!_chunkTable.load(_file)) {
+ if (!_chunkTable.load(_file, chunkCount)) {
close();
return false;
}
@@ -127,7 +131,7 @@ uint32 ChunkArchive::chunkSize(uint index) const {
uint32 ChunkArchive::totalChunkSize(uint firstChunk, uint lastChunk) const {
uint32 byteCount = 0;
- for (uint i = firstChunk; i <= lastChunk && i < kResourceChunkCount; ++i)
+ for (uint i = firstChunk; i <= lastChunk && i < _chunkTable.count; ++i)
byteCount += _chunkTable.sizes[i];
return byteCount;
}
diff --git a/engines/hollywood/resource.h b/engines/hollywood/resource.h
index 7900820a0e5..0b4e7213719 100644
--- a/engines/hollywood/resource.h
+++ b/engines/hollywood/resource.h
@@ -36,15 +36,17 @@ namespace Hollywood {
class IndexedSurfaceBuffer;
enum {
- kResourceChunkCount = 40
+ kResourceChunkCount = 40,
+ kMaxResourceChunkCount = 50
};
struct ResourceChunkTable {
- uint32 offsets[kResourceChunkCount];
- uint32 sizes[kResourceChunkCount];
+ uint32 offsets[kMaxResourceChunkCount];
+ uint32 sizes[kMaxResourceChunkCount];
+ uint count = 0;
void clear();
- bool load(Common::SeekableReadStream &stream);
+ bool load(Common::SeekableReadStream &stream, uint chunkCount = kResourceChunkCount);
bool isValidChunk(uint index) const;
};
@@ -55,7 +57,7 @@ class ChunkArchive {
public:
ChunkArchive();
- bool open(const Common::Path &fileName);
+ bool open(const Common::Path &fileName, uint chunkCount = kResourceChunkCount);
void close();
const Common::Path &fileName() const { return _fileName; }
diff --git a/engines/hollywood/runaway/audio.cpp b/engines/hollywood/runaway/audio.cpp
new file mode 100644
index 00000000000..cbc63e611b3
--- /dev/null
+++ b/engines/hollywood/runaway/audio.cpp
@@ -0,0 +1,114 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "audio/audiostream.h"
+#include "audio/decoders/raw.h"
+#include "common/debug.h"
+#include "common/file.h"
+#include "common/substream.h"
+
+#include "hollywood/debug.h"
+#include "hollywood/runaway/audio.h"
+
+namespace Hollywood {
+
+RunawayAudio::~RunawayAudio() {
+ _mixer->stopHandle(_music);
+ stopSpeech();
+ stopEffect();
+}
+
+uint32 RunawayAudio::play(const char *archive, uint16 cue, uint tableCount, bool pairedTables,
+ byte flags, Audio::Mixer::SoundType type, Audio::SoundHandle &handle, byte volume, bool loop) {
+ _mixer->stopHandle(handle);
+ const uint headerSize = tableCount * (pairedTables ? 8 : 4);
+ Common::File *file = new Common::File();
+ if (cue >= tableCount - (pairedTables ? 0 : 1) || !file->open(archive) || file->size() < headerSize) {
+ warning("Runaway demo: cannot read %s cue %u", archive, cue);
+ delete file;
+ return 0;
+ }
+ file->seek(cue * 4);
+ const uint32 start = file->readUint32LE();
+ uint32 size;
+ if (pairedTables) {
+ file->seek((tableCount + cue) * 4);
+ size = file->readUint32LE();
+ } else {
+ const uint32 end = file->readUint32LE();
+ size = end > start ? end - start : 0;
+ }
+ const uint frameSize = ((flags & Audio::FLAG_16BITS) ? 2 : 1) * ((flags & Audio::FLAG_STEREO) ? 2 : 1);
+ if (file->err() || start < headerSize || !size || start > file->size() ||
+ size > file->size() - start || size % frameSize) {
+ warning("Runaway demo: invalid %s cue %u range", archive, cue);
+ delete file;
+ return 0;
+ }
+ // The DirectSound setup at 0x4051f0 uses 16000 Hz for all three formats:
+ // speech: unsigned 8-bit mono; SFX: signed 16-bit mono; music: 16-bit stereo.
+ const uint rate = 16000;
+ Common::SeekableReadStream *stream = new Common::SeekableSubReadStream(file, start, start + size, DisposeAfterUse::YES);
+ Audio::SeekableAudioStream *pcm = Audio::makeRawStream(stream, rate, flags, DisposeAfterUse::YES);
+ if (!pcm) {
+ delete stream;
+ return 0;
+ }
+ Audio::AudioStream *playback = loop ? Audio::makeLoopingAudioStream(pcm, 0) : pcm;
+ _mixer->playStream(type, &handle, playback, -1, volume, 0, DisposeAfterUse::YES);
+ const uint32 duration = (uint64)size * 1000 / (rate * frameSize);
+ debugC(1, kDebugResources, "Runaway audio: %s cue %u, %u Hz, %u-bit %s, %u ms, offset=%u size=%u",
+ archive, cue, rate, (flags & Audio::FLAG_16BITS) ? 16 : 8,
+ (flags & Audio::FLAG_STEREO) ? "stereo" : "mono", duration, start, size);
+ return duration;
+}
+
+void RunawayAudio::playMusic(uint16 cue) {
+ play("RESOURCE.M03", cue, 100, false, Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN | Audio::FLAG_STEREO,
+ Audio::Mixer::kMusicSoundType, _music, 96, true);
+}
+
+uint32 RunawayAudio::playSpeech(uint16 sample) {
+ // DATAACA3 has independent 6000-entry offset and length tables. Its global
+ // sample IDs include stale offsets for other chapters, so never derive a
+ // length by subtracting adjacent offsets as with the M/S archives.
+ return play("DATAACA3.000", sample, 6000, true, Audio::FLAG_UNSIGNED,
+ Audio::Mixer::kSpeechSoundType, _speech, Audio::Mixer::kMaxChannelVolume, false);
+}
+
+void RunawayAudio::playEffect(uint16 cue, byte volume) {
+ play("RESOURCE.S03", cue, 1000, false, Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN,
+ Audio::Mixer::kSFXSoundType, _effect, volume, false);
+}
+
+void RunawayAudio::stopSpeech() {
+ _mixer->stopHandle(_speech);
+}
+
+void RunawayAudio::stopEffect() {
+ _mixer->stopHandle(_effect);
+}
+
+bool RunawayAudio::speechPlaying() const {
+ return _mixer->isSoundHandleActive(_speech);
+}
+
+} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/audio.h b/engines/hollywood/runaway/audio.h
new file mode 100644
index 00000000000..72d38464e63
--- /dev/null
+++ b/engines/hollywood/runaway/audio.h
@@ -0,0 +1,49 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef HOLLYWOOD_RUNAWAY_AUDIO_H
+#define HOLLYWOOD_RUNAWAY_AUDIO_H
+
+#include "audio/mixer.h"
+
+namespace Hollywood {
+
+class RunawayAudio {
+public:
+ explicit RunawayAudio(Audio::Mixer *mixer) : _mixer(mixer) {}
+ ~RunawayAudio();
+ void playMusic(uint16 cue);
+ uint32 playSpeech(uint16 sample);
+ void playEffect(uint16 cue, byte volume = Audio::Mixer::kMaxChannelVolume);
+ void stopSpeech();
+ void stopEffect();
+ bool speechPlaying() const;
+
+private:
+ uint32 play(const char *archive, uint16 cue, uint tableCount, bool pairedTables,
+ byte flags, Audio::Mixer::SoundType type, Audio::SoundHandle &handle, byte volume, bool loop);
+ Audio::Mixer *_mixer;
+ Audio::SoundHandle _music, _speech, _effect;
+};
+
+} // End of namespace Hollywood
+
+#endif
diff --git a/engines/hollywood/runaway/engine.cpp b/engines/hollywood/runaway/engine.cpp
new file mode 100644
index 00000000000..c265334c899
--- /dev/null
+++ b/engines/hollywood/runaway/engine.cpp
@@ -0,0 +1,189 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "backends/keymapper/action.h"
+#include "backends/keymapper/keymap.h"
+#include "backends/keymapper/standard-actions.h"
+#include "common/archive.h"
+#include "common/config-manager.h"
+#include "common/events.h"
+#include "common/fs.h"
+#include "common/system.h"
+#include "common/translation.h"
+#include "engines/util.h"
+#include "graphics/cursorman.h"
+#include "gui/debugger.h"
+
+#include "hollywood/runaway/engine.h"
+#include "hollywood/runaway/scene5030.h"
+
+namespace Hollywood {
+namespace {
+
+enum RunawayAction {
+ kScrollLeft,
+ kScrollRight,
+ kScrollStart,
+ kScrollEnd,
+ kReturnToLauncher
+};
+
+} // End of anonymous namespace
+
+void RunawayEngine::initializePath(const Common::FSNode &gamePath) {
+ Engine::initializePath(gamePath);
+ SearchMan.addSubDirectoryMatching(gamePath, "Resource");
+ SearchMan.addSubDirectoryMatching(gamePath, "Dataa");
+ // Also support targets added directly from the Resource directory.
+ SearchMan.addSubDirectoryMatching(gamePath.getParent(), "Dataa");
+}
+
+bool RunawayEngine::hasFeature(EngineFeature feature) const {
+ return feature == kSupportsReturnToLauncher || feature == kSupportsSubtitleOptions;
+}
+
+void RunawayEngine::syncSoundSettings() {
+ Engine::syncSoundSettings();
+ const bool mute = ConfMan.hasKey("mute") && ConfMan.getBool("mute");
+ _mixer->muteSoundType(Audio::Mixer::kMusicSoundType, mute || ConfMan.getBool("music_mute"));
+ _mixer->muteSoundType(Audio::Mixer::kSFXSoundType, mute || ConfMan.getBool("sfx_mute"));
+}
+
+Common::Error RunawayEngine::run() {
+ const Graphics::PixelFormat format(2, 5, 6, 5, 0, 11, 5, 0, 0);
+ initGraphics(RunawayScene5030::kScreenWidth, RunawayScene5030::kScreenHeight, &format);
+ if (_system->getScreenFormat() != format)
+ return Common::kUnsupportedColorMode;
+ setDebugger(new GUI::Debugger());
+ syncSoundSettings();
+
+ RunawayScene5030 scene(_mixer);
+ if (!scene.load())
+ return Common::Error(Common::kReadingFailed, "Cannot load the Runaway demo room, actor or animation data");
+ scene.start(getTotalPlayTime());
+ CursorMan.setDefaultArrowCursor();
+ CursorMan.showMouse(true);
+ _system->warpMouse(RunawayScene5030::kScreenWidth / 2, RunawayScene5030::kRoomTop + RunawayScene5030::kRoomHeight / 2);
+
+ bool leftPressed = false, rightPressed = false;
+ while (!shouldQuit()) {
+ Common::Event event;
+ while (_eventMan->pollEvent(event)) {
+ if (event.type == Common::EVENT_LBUTTONDOWN || event.type == Common::EVENT_RBUTTONDOWN) {
+ scene.click(event.mouse, event.type == Common::EVENT_RBUTTONDOWN);
+ } else if (event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_START || event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_END) {
+ const bool pressed = event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_START;
+ switch (event.customType) {
+ case kScrollLeft:
+ leftPressed = pressed;
+ break;
+ case kScrollRight:
+ rightPressed = pressed;
+ break;
+ case kScrollStart:
+ if (pressed)
+ scene.setCameraX(0);
+ break;
+ case kScrollEnd:
+ if (pressed)
+ scene.setCameraX(RunawayScene5030::kRoomWidth - RunawayScene5030::kScreenWidth);
+ break;
+ case kReturnToLauncher:
+ if (pressed)
+ return Common::kNoError;
+ break;
+ }
+ }
+ }
+ if (shouldQuit())
+ break;
+ int direction = (int)rightPressed - (int)leftPressed;
+ const Common::Point mouse = _eventMan->getMousePos();
+ if (!direction && mouse.y >= RunawayScene5030::kRoomTop && mouse.y < RunawayScene5030::kRoomTop + RunawayScene5030::kRoomHeight) {
+ if (mouse.x < 24)
+ direction = -1;
+ else if (mouse.x >= RunawayScene5030::kScreenWidth - 24)
+ direction = 1;
+ }
+ // The engine clock excludes time spent in ScummVM dialogs, keeping
+ // animation frames and subtitle deadlines in sync with paused audio.
+ scene.update(getTotalPlayTime(), direction);
+ scene.draw(mouse);
+ const Graphics::ManagedSurface &screen = scene.screen();
+ _system->copyRectToScreen(screen.getPixels(), screen.pitch, 0, 0, screen.w, screen.h);
+ _system->updateScreen();
+ _system->delayMillis(16);
+ }
+ return Common::kNoError;
+}
+
+Common::Array<Common::Keymap *> RunawayEngine::initKeymaps() {
+ using namespace Common;
+ Keymap *keymap = new Keymap(Keymap::kKeymapTypeGame, "runaway", "Runaway: A Road Adventure");
+ keymap->setPartialMatchAllowed(false);
+
+ Action *action = new Action(kStandardActionLeftClick, _("Walk / Use"));
+ action->setLeftClickEvent();
+ action->addDefaultInputMapping("MOUSE_LEFT");
+ action->addDefaultInputMapping("JOY_A");
+ keymap->addAction(action);
+
+ action = new Action(kStandardActionRightClick, _("Examine"));
+ action->setRightClickEvent();
+ action->addDefaultInputMapping("MOUSE_RIGHT");
+ action->addDefaultInputMapping("JOY_B");
+ keymap->addAction(action);
+
+ action = new Action("SCROLL_LEFT", _("Scroll left"));
+ action->setCustomEngineActionEvent(kScrollLeft);
+ action->addDefaultInputMapping("LEFT");
+ keymap->addAction(action);
+
+ action = new Action("SCROLL_RIGHT", _("Scroll right"));
+ action->setCustomEngineActionEvent(kScrollRight);
+ action->addDefaultInputMapping("RIGHT");
+ keymap->addAction(action);
+
+ action = new Action("SCROLL_START", _("Scroll to the left edge"));
+ action->setCustomEngineActionEvent(kScrollStart);
+ action->addDefaultInputMapping("HOME");
+ keymap->addAction(action);
+
+ action = new Action("SCROLL_END", _("Scroll to the right edge"));
+ action->setCustomEngineActionEvent(kScrollEnd);
+ action->addDefaultInputMapping("END");
+ keymap->addAction(action);
+
+ action = new Action(kStandardActionOpenMainMenu, _("Game menu"));
+ action->setEvent(EVENT_MAINMENU);
+ action->addDefaultInputMapping("F5");
+ action->addDefaultInputMapping("JOY_START");
+ keymap->addAction(action);
+
+ action = new Action("RETURN_TO_LAUNCHER", _("Return to launcher"));
+ action->setCustomEngineActionEvent(kReturnToLauncher);
+ action->addDefaultInputMapping("ESCAPE");
+ keymap->addAction(action);
+
+ return Keymap::arrayOf(keymap);
+}
+
+} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/engine.h b/engines/hollywood/runaway/engine.h
new file mode 100644
index 00000000000..ad0946a7ba4
--- /dev/null
+++ b/engines/hollywood/runaway/engine.h
@@ -0,0 +1,50 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef HOLLYWOOD_RUNAWAY_ENGINE_H
+#define HOLLYWOOD_RUNAWAY_ENGINE_H
+
+#include "common/array.h"
+#include "engines/engine.h"
+
+namespace Common {
+class Keymap;
+}
+
+namespace Hollywood {
+
+// Runaway shares the archive and text formats with Hollywood Monsters, but
+// has its own RGB565 renderer, scene state and audio formats.
+class RunawayEngine : public Engine {
+public:
+ explicit RunawayEngine(OSystem *syst) : Engine(syst) {}
+
+ Common::Error run() override;
+ void initializePath(const Common::FSNode &gamePath) override;
+ bool hasFeature(EngineFeature feature) const override;
+ void syncSoundSettings() override;
+
+ static Common::Array<Common::Keymap *> initKeymaps();
+};
+
+} // End of namespace Hollywood
+
+#endif // HOLLYWOOD_RUNAWAY_ENGINE_H
diff --git a/engines/hollywood/runaway/graphics.cpp b/engines/hollywood/runaway/graphics.cpp
new file mode 100644
index 00000000000..6f646cd9e80
--- /dev/null
+++ b/engines/hollywood/runaway/graphics.cpp
@@ -0,0 +1,225 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/endian.h"
+#include "common/file.h"
+#include "common/util.h"
+
+#include "hollywood/resource.h"
+#include "hollywood/runaway/graphics.h"
+
+namespace Hollywood {
+
+bool RunawayAnimation::load(ChunkArchive &archive, uint chunk, uint frames) {
+ _frames = 0;
+ if (!frames || frames > 1000 || !archive.readVariableChunk(chunk, _data) || _data.size() < frames * 14)
+ return false;
+ uint cursor = frames * 14;
+ for (uint frame = 0; frame < frames; ++frame) {
+ const byte *descriptor = _data.data() + frame * 14;
+ if (READ_LE_UINT32(descriptor) != cursor - frames * 14)
+ return false;
+ const uint spans = READ_LE_UINT16(descriptor + 12);
+ for (uint span = 0; span < spans; ++span) {
+ if (_data.size() - cursor < 5)
+ return false;
+ const byte *run = _data.data() + cursor;
+ const uint x = READ_LE_UINT16(run), y = READ_LE_UINT16(run + 2), length = run[4];
+ cursor += 5;
+ if (x + length > 1376 || y >= 600 || !length || length * 2 > _data.size() - cursor)
+ return false;
+ cursor += length * 2;
+ }
+ }
+ if (cursor != _data.size())
+ return false;
+ _frames = frames;
+ return true;
+}
+
+void RunawayAnimation::draw(Graphics::ManagedSurface &surface, uint frame, int cameraX, int roomTop) const {
+ if (frame >= _frames)
+ return;
+ const byte *descriptor = _data.data() + frame * 14;
+ const byte *run = _data.data() + _frames * 14 + READ_LE_UINT32(descriptor);
+ const uint spans = READ_LE_UINT16(descriptor + 12);
+ for (uint span = 0; span < spans; ++span) {
+ const int x = READ_LE_UINT16(run) - cameraX;
+ const int y = READ_LE_UINT16(run + 2) + roomTop;
+ const uint length = run[4];
+ run += 5;
+ if (y >= 0 && y < surface.h) {
+ const int first = MAX(0, -x), last = MIN<int>(length, surface.w - x);
+ if (first < last) {
+ uint16 *out = (uint16 *)surface.getBasePtr(x + first, y);
+ for (int i = first; i < last; ++i)
+ *out++ = READ_LE_UINT16(run + i * 2);
+ }
+ }
+ run += length * 2;
+ }
+}
+
+static bool readActorChunk(Common::File &file, uint chunk, Common::Array<byte> &data) {
+ if (!file.seek(10 + chunk * 4))
+ return false;
+ const uint32 offset = file.readUint32LE();
+ if (!file.seek(10 + 500 * 4 + chunk * 4))
+ return false;
+ const uint32 size = file.readUint32LE();
+ if (!size || size > 2 * 1024 * 1024 || offset > file.size() || size > file.size() - offset ||
+ !file.seek(offset))
+ return false;
+ data.resize(size);
+ return file.read(data.data(), size) == size;
+}
+
+bool RunawayActor::load() {
+ Common::File file;
+ Common::Array<byte> palette;
+ // Native chapter-five actor loader at 0x40b590 selects entry 44. Entry 45
+ // is the palette, and 46..53 are the eight banks of 19 walking cels.
+ if (!file.open("RESOURCE.000") || !readActorChunk(file, 44, _descriptors) ||
+ _descriptors.size() != kFacings * kFrames * 32 ||
+ !readActorChunk(file, 45, palette) || palette.size() != 512)
+ return false;
+ for (uint i = 0; i < 256; ++i)
+ _palette[i] = READ_LE_UINT16(palette.data() + i * 2);
+ _pixels.resize(kWidth * kHeight);
+ _opacity.resize(kWidth * kHeight);
+ _shadow.resize(kWidth * kHeight);
+ for (uint facing = 0; facing < kFacings; ++facing) {
+ if (!readActorChunk(file, 46 + facing, _banks[facing]))
+ return false;
+ for (uint frame = 0; frame < kFrames; ++frame) {
+ if (!setFrame(facing, frame))
+ return false;
+ }
+ }
+ return setFrame(3, 0);
+}
+
+bool RunawayActor::setFrame(uint facing, uint frame) {
+ if (facing >= kFacings || frame >= kFrames)
+ return false;
+ if (_facing == (int)facing && _frame == (int)frame)
+ return true;
+ const byte *descriptor = _descriptors.data() + (facing * kFrames + frame) * 32;
+ const Common::Array<byte> &bank = _banks[facing];
+ uint cursor = READ_LE_UINT32(descriptor);
+ const uint end = frame + 1 < kFrames ? READ_LE_UINT32(descriptor + 32) : bank.size();
+ if (cursor > end || end > bank.size())
+ return false;
+ const int left = 168 - (int)READ_LE_UINT32(descriptor + 16);
+ const int top = 434 - (int)READ_LE_UINT32(descriptor + 20);
+ const uint width = READ_LE_UINT32(descriptor + 24), height = READ_LE_UINT32(descriptor + 28);
+ if (left < 0 || top < 0 || width > kWidth || height > kHeight ||
+ left + width > kWidth || top + height > kHeight)
+ return false;
+ _bounds = Common::Rect(left, top, left + width, top + height);
+ memset(_pixels.data(), 0, _pixels.size());
+ memset(_opacity.data(), 0, _opacity.size());
+ memset(_shadow.data(), 0, _shadow.size());
+ // Packed streams: color spans (x,y,length), then opacity and shadow spans
+ // (x,y,literal,length). A nonliteral mask span expands to opaque bytes.
+ const uint counts[] = { READ_LE_UINT32(descriptor + 4), READ_LE_UINT32(descriptor + 12),
+ READ_LE_UINT32(descriptor + 8) };
+ for (uint plane = 0; plane < 3; ++plane) {
+ byte *destination = plane == 0 ? _pixels.data() : plane == 1 ? _opacity.data() : _shadow.data();
+ const uint header = plane == 0 ? 6 : 7;
+ for (uint span = 0; span < counts[plane]; ++span) {
+ if (end - cursor < header)
+ return false;
+ const byte *run = bank.data() + cursor;
+ const uint x = READ_LE_UINT16(run), y = READ_LE_UINT16(run + 2);
+ const bool literal = plane == 0 || run[4] != 0;
+ const uint length = READ_LE_UINT16(run + header - 2);
+ cursor += header;
+ if (!length || x + length > kWidth || y >= kHeight || (literal && length > end - cursor))
+ return false;
+ if (literal) {
+ memcpy(destination + y * kWidth + x, bank.data() + cursor, length);
+ cursor += length;
+ } else {
+ memset(destination + y * kWidth + x, 255, length);
+ }
+ }
+ }
+ if (cursor != end)
+ return false;
+ _facing = facing;
+ _frame = frame;
+ return true;
+}
+
+static uint16 blend565(uint16 source, uint16 destination, uint alpha) {
+ const uint red = ((source >> 11) * alpha + (destination >> 11) * (255 - alpha)) / 255;
+ const uint green = (((source >> 5) & 63) * alpha + ((destination >> 5) & 63) * (255 - alpha)) / 255;
+ const uint blue = ((source & 31) * alpha + (destination & 31) * (255 - alpha)) / 255;
+ return (red << 11) | (green << 5) | blue;
+}
+
+void RunawayActor::draw(Graphics::ManagedSurface &surface, Common::Point position, int cameraX,
+ int roomTop, const Common::Array<byte> &mask, const Common::Array<byte> &maps) const {
+ // Perspective planes from the demo's scene callback at 0x438970. Actor
+ // coordinates are anchored at (168,434) in a nominal 455-pixel-high image.
+ float height;
+ if (position.x > 1079 && position.y < 542)
+ height = position.y * 0.98648649f - 93.675674f;
+ else if (position.x > 1215)
+ height = position.x * 0.2857143f + 93.85714f;
+ else
+ height = (position.y * 1.47f - 348.04f + position.x * 0.058927f + 362.462616f) * 0.5f;
+ const int scale = CLIP<int>((int)(height * 256 / 455), 64, 256);
+ const int originX = position.x - cameraX - 168 * scale / 256;
+ const int originY = position.y + roomTop - 434 * scale / 256;
+ const int x0 = MAX(0, originX + _bounds.left * scale / 256);
+ const int y0 = MAX(roomTop, originY + _bounds.top * scale / 256);
+ const int x1 = MIN<int>(surface.w, originX + _bounds.right * scale / 256);
+ const int y1 = MIN<int>(roomTop + 600, originY + _bounds.bottom * scale / 256);
+ if (x0 >= x1 || y0 >= y1)
+ return;
+ // Scene lighting and occlusion come from the same pixel lookup as hotspots.
+ const byte light = MIN<byte>(5, maps[768 + mask[position.y * 1376 + position.x]]);
+ const byte lights[6][3] = { {100,100,100}, {55,50,45}, {55,50,45},
+ {85,80,75}, {75,70,65}, {70,65,60} };
+ uint16 palette[256];
+ for (uint i = 0; i < 256; ++i) {
+ const uint16 c = _palette[i];
+ palette[i] = (((c >> 11) * lights[light][0] / 100) << 11) |
+ ((((c >> 5) & 63) * lights[light][1] / 100) << 5) | ((c & 31) * lights[light][2] / 100);
+ }
+ for (int y = y0; y < y1; ++y) {
+ uint16 *out = (uint16 *)surface.getBasePtr(x0, y);
+ const int sourceY = (y - originY) * 256 / scale;
+ for (int x = x0; x < x1; ++x, ++out) {
+ if (maps[512 + mask[(y - roomTop) * 1376 + x + cameraX]])
+ continue;
+ const int source = sourceY * kWidth + (x - originX) * 256 / scale;
+ if (_shadow[source])
+ *out = blend565(0, *out, _shadow[source] / 2);
+ if (_opacity[source])
+ *out = blend565(palette[_pixels[source]], *out, _opacity[source]);
+ }
+ }
+}
+
+} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/graphics.h b/engines/hollywood/runaway/graphics.h
new file mode 100644
index 00000000000..e9b9945672a
--- /dev/null
+++ b/engines/hollywood/runaway/graphics.h
@@ -0,0 +1,68 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef HOLLYWOOD_RUNAWAY_GRAPHICS_H
+#define HOLLYWOOD_RUNAWAY_GRAPHICS_H
+
+#include "common/array.h"
+#include "common/rect.h"
+#include "graphics/managed_surface.h"
+
+namespace Hollywood {
+
+class ChunkArchive;
+
+// Runaway's room animations retain Hollywood's 14-byte descriptors, but use
+// RGB565 spans. Coordinates are absolute room coordinates, including shadows.
+class RunawayAnimation {
+public:
+ bool load(ChunkArchive &archive, uint chunk, uint frames);
+ void draw(Graphics::ManagedSurface &surface, uint frame, int cameraX, int roomTop) const;
+ uint frameCount() const { return _frames; }
+
+private:
+ Common::Array<byte> _data;
+ uint _frames = 0;
+};
+
+// Brian's walking banks are indexed RGB565 with separate opacity and shadow
+// planes. This is a different representation from the room animation spans.
+class RunawayActor {
+public:
+ bool load();
+ bool setFrame(uint facing, uint frame);
+ void draw(Graphics::ManagedSurface &surface, Common::Point position, int cameraX,
+ int roomTop, const Common::Array<byte> &mask, const Common::Array<byte> &maps) const;
+
+private:
+ enum { kWidth = 345, kHeight = 518, kFacings = 8, kFrames = 19 };
+ Common::Array<byte> _descriptors;
+ Common::Array<byte> _banks[kFacings];
+ Common::Array<byte> _pixels, _opacity, _shadow;
+ uint16 _palette[256];
+ Common::Rect _bounds;
+ int _facing = -1;
+ int _frame = -1;
+};
+
+} // End of namespace Hollywood
+
+#endif
diff --git a/engines/hollywood/runaway/scene5030.cpp b/engines/hollywood/runaway/scene5030.cpp
new file mode 100644
index 00000000000..c001412447b
--- /dev/null
+++ b/engines/hollywood/runaway/scene5030.cpp
@@ -0,0 +1,443 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/config-manager.h"
+#include "common/debug.h"
+#include "common/endian.h"
+#include "common/str-enc.h"
+#include "common/util.h"
+#include "graphics/font.h"
+#include "graphics/fontman.h"
+
+#include "hollywood/debug.h"
+#include "hollywood/runaway/scene5030.h"
+
+namespace Hollywood {
+namespace {
+
+struct SceneHotspot {
+ const char *name;
+ int x, y;
+ uint16 description;
+ byte facing;
+};
+
+// Approach points and facings from the scene initializer at 0x439e40. The
+// hit regions themselves are decoded from E03; these are not bounding boxes.
+const SceneHotspot kHotspots[] = {
+ {"", 0, 0, 0, 0},
+ {"T\xc3\xbcr", 101, 507, 511, 7},
+ {"Spalt", 101, 507, 519, 7},
+ {"Fenster", 406, 383, 520, 0},
+ {"Fenster", 1062, 473, 523, 1},
+ {"Knauf", 942, 407, 528, 0},
+ {"Fallt\xc3\xbcr", 1215, 542, 530, 7},
+ {"Hemd", 406, 383, 572, 7},
+ {"K\xc3\xbchlbox", 1062, 473, 535, 7},
+ {"Lederst\xc3\xbc" "ck", 1019, 405, 552, 0},
+ {"Stecker", 1215, 542, 554, 7},
+ {"Abfluss", 1215, 542, 557, 7},
+ {"Telefon", 495, 381, 565, 7},
+ {"Regal", 873, 409, 567, 1},
+ {"Eisenstange", 974, 406, 570, 7},
+ {"Brille", 262, 426, 614, 0},
+ {"Blasebalg", 262, 426, 576, 7},
+ {"Reinigungsmittel", 609, 379, 577, 1},
+ {"Deckel", 1062, 473, 580, 1},
+ {"Abfluss", 1215, 542, 557, 7}
+};
+
+} // End of anonymous namespace
+
+bool RunawayScene5030::load() {
+ const Graphics::PixelFormat format(2, 5, 6, 5, 0, 11, 5, 0, 0);
+ Common::Array<byte> pixels, packedMask;
+ if (!_archive.open(Common::Path("RESOURCE.E03"), 50) ||
+ _archive.chunkSize(0) != kRoomWidth * kRoomHeight * 2 ||
+ !_archive.readVariableChunk(0, pixels) || !_archive.readVariableChunk(1, packedMask) ||
+ !_archive.readVariableChunk(2, _maps) || _maps.size() != 1536 ||
+ !_text.loadStage("RESOURCE.003", "Runaway shack", 503))
+ return false;
+ _background.create(kRoomWidth, kRoomHeight, format);
+ _screen.create(kScreenWidth, kScreenHeight, format);
+ for (int y = 0; y < kRoomHeight; ++y) {
+ uint16 *out = (uint16 *)_background.getBasePtr(0, y);
+ for (int x = 0; x < kRoomWidth; ++x)
+ out[x] = READ_LE_UINT16(pixels.data() + (y * kRoomWidth + x) * 2);
+ }
+ // 0x42b380 expands (byte value, uint16 length) runs into one room pixel
+ // lookup. Tables 0..3 map those values to walking, hotspots, depth, lighting.
+ _mask.resize(kRoomWidth * kRoomHeight);
+ uint offset = 0;
+ if (packedMask.size() % 3)
+ return false;
+ for (uint i = 0; i < packedMask.size(); i += 3) {
+ const uint length = READ_LE_UINT16(packedMask.data() + i + 1);
+ if (!length || length > _mask.size() - offset)
+ return false;
+ memset(_mask.data() + offset, packedMask[i], length);
+ offset += length;
+ }
+ if (offset != _mask.size() || !_actor.load() ||
+ !_intro.load(_archive, 47, 20) || !_lidActor.load(_archive, 43, 33) ||
+ !_lid.load(_archive, 44, 5) || !_unplug.load(_archive, 40, 59) ||
+ !loadPatch(5, _unplugPatch) || !loadPatch(7, _openLidPatch) || !loadPatch(9, _closedLidPatch))
+ return false;
+ const uint rows = _text._stageLargeRows.size() / 321;
+ _voiceSamples.resize(rows, 0);
+ _cueEnds.resize(rows, 0);
+ // The shared five-byte cue descriptors map each line (including all
+ // continuations) to its actual global voice ID in DATAACA3.
+ for (uint cueOffset = 0; cueOffset + 5 <= _text._stageBlock.size(); cueOffset += 5) {
+ const byte *cue = _text._stageBlock.data() + cueOffset;
+ const uint row = READ_LE_UINT16(cue), count = MAX<uint>(1, cue[2]);
+ const uint sample = READ_LE_UINT16(cue + 3);
+ if (row < 500 || row + count > 500 + rows || !sample || sample + count > 6000)
+ continue;
+ for (uint i = 0; i < count; ++i) {
+ _voiceSamples[row - 500 + i] = sample + i;
+ _cueEnds[row - 500 + i] = row + count - 1;
+ }
+ }
+ debugC(1, kDebugScene, "Runaway demo: scene 5030, 152 walking cels, room animations and hotspot mask loaded");
+ return true;
+}
+
+void RunawayScene5030::start(uint32 now) {
+ _now = _lastUpdate = now;
+ _audio.playMusic(11);
+ startAction(kIntro);
+}
+
+void RunawayScene5030::setCameraX(int x) {
+ _cameraX = CLIP<int>(x, 0, kRoomWidth - kScreenWidth);
+}
+
+bool RunawayScene5030::loadPatch(uint chunk, Common::Array<byte> &patch) {
+ if (!_archive.readVariableChunk(chunk, patch) || patch.size() < 2)
+ return false;
+ uint cursor = 2;
+ for (uint i = 0; i < READ_LE_UINT16(patch.data()); ++i) {
+ if (patch.size() - cursor < 6)
+ return false;
+ const byte *run = patch.data() + cursor;
+ const uint x = READ_LE_UINT16(run), y = READ_LE_UINT16(run + 2), length = READ_LE_UINT16(run + 4);
+ cursor += 6;
+ if (!length || x + length > kRoomWidth || y >= kRoomHeight || length * 2 > patch.size() - cursor)
+ return false;
+ cursor += length * 2;
+ }
+ return cursor == patch.size();
+}
+
+void RunawayScene5030::drawPatch(const Common::Array<byte> &patch) {
+ const byte *run = patch.data() + 2;
+ for (uint i = 0; i < READ_LE_UINT16(patch.data()); ++i) {
+ const uint x = READ_LE_UINT16(run), y = READ_LE_UINT16(run + 2), length = READ_LE_UINT16(run + 4);
+ uint16 *out = (uint16 *)_background.getBasePtr(x, y);
+ run += 6;
+ for (uint pixel = 0; pixel < length; ++pixel)
+ *out++ = READ_LE_UINT16(run + pixel * 2);
+ run += length * 2;
+ }
+}
+
+byte RunawayScene5030::hotspotAt(Common::Point mouse) const {
+ if (mouse.x < 0 || mouse.x >= kScreenWidth || mouse.y < kRoomTop || mouse.y >= kRoomTop + kRoomHeight)
+ return 0;
+ byte id = _maps[256 + _mask[(mouse.y - kRoomTop) * kRoomWidth + mouse.x + _cameraX]];
+ // The initial cooler hides the hatch and its later position. These remaps
+ // correspond to the native room-state updater at 0x438ce0.
+ if (id == 6 || id == 20)
+ id = 8;
+ if (id == 21 || (id == 10 && _unplugged))
+ id = 0;
+ return id < ARRAYSIZE(kHotspots) ? id : 0;
+}
+
+bool RunawayScene5030::walkable(int x, int y) const {
+ return x >= 0 && x < kRoomWidth && y >= 0 && y < kRoomHeight && _maps[_mask[y * kRoomWidth + x]] != 0;
+}
+
+bool RunawayScene5030::clearPath(Common::Point start, Common::Point end) const {
+ const int count = MAX(ABS(end.x - start.x), ABS(end.y - start.y));
+ for (int i = 0; i <= count; ++i) {
+ const int x = start.x + (end.x - start.x) * i / MAX(1, count);
+ const int y = start.y + (end.y - start.y) * i / MAX(1, count);
+ if (!walkable(x, y))
+ return false;
+ }
+ return true;
+}
+
+void RunawayScene5030::walkTo(Common::Point target) {
+ _path.clear();
+ _pathIndex = 0;
+ // Search only the connected floor. Using pixel resolution preserves the
+ // one-pixel-wide approach to the plug, which a coarse navigation grid loses.
+ Common::Array<int32> parent;
+ Common::Array<int> queue;
+ parent.resize(_mask.size());
+ for (uint i = 0; i < parent.size(); ++i)
+ parent[i] = -1;
+ const int start = _position.y * kRoomWidth + _position.x;
+ parent[start] = start;
+ queue.push_back(start);
+ int closest = start, bestDistance = 0x7fffffff;
+ const int dx[] = {1, -1, 0, 0, 1, 1, -1, -1};
+ const int dy[] = {0, 0, 1, -1, 1, -1, 1, -1};
+ for (uint head = 0; head < queue.size(); ++head) {
+ const int pixel = queue[head], x = pixel % kRoomWidth, y = pixel / kRoomWidth;
+ const int distance = (x - target.x) * (x - target.x) + (y - target.y) * (y - target.y);
+ if (distance < bestDistance) {
+ closest = pixel;
+ bestDistance = distance;
+ if (!distance)
+ break;
+ }
+ for (uint direction = 0; direction < 8; ++direction) {
+ const int nx = x + dx[direction], ny = y + dy[direction], next = ny * kRoomWidth + nx;
+ if (walkable(nx, ny) && parent[next] == -1) {
+ parent[next] = pixel;
+ queue.push_back(next);
+ }
+ }
+ }
+ Common::Array<Common::Point> reverse;
+ for (int pixel = closest; pixel != start; pixel = parent[pixel])
+ reverse.push_back(Common::Point(pixel % kRoomWidth, pixel / kRoomWidth));
+ Common::Point previous = _position;
+ for (int i = (int)reverse.size() - 1; i >= 0;) {
+ int next = i;
+ while (next > 0 && clearPath(previous, reverse[next - 1]))
+ --next;
+ previous = reverse[next];
+ _path.push_back(previous);
+ i = next - 1;
+ }
+ _walkStarted = _now;
+ debugC(1, kDebugScene, "Runaway demo: walk to %d,%d, reachable %d,%d, %u waypoints",
+ target.x, target.y, closest % kRoomWidth, closest / kRoomWidth, _path.size());
+ if (_path.empty())
+ arrive();
+}
+
+void RunawayScene5030::say(uint16 row) {
+ stopSpeech();
+ if (row < 500 || row - 500 >= _voiceSamples.size())
+ return;
+ _speechRow = row;
+ _speechEnd = MAX<uint16>(row, _cueEnds[row - 500]);
+ showSpeechRow();
+}
+
+void RunawayScene5030::showSpeechRow() {
+ _subtitle = Common::U32String(_text.largeTextRecord(_speechRow), Common::kDos850);
+ const uint16 sample = _voiceSamples[_speechRow - 500];
+ const uint32 duration = sample ? _audio.playSpeech(sample) : 0;
+ _subtitleUntil = _now + (duration ? MAX<uint>(1000, duration + 150) : MAX<uint>(3000, _subtitle.size() * 55));
+ debugC(1, kDebugScene, "Runaway demo: dialogue row %u, voice %u, ends at row %u",
+ _speechRow, sample, _speechEnd);
+}
+
+void RunawayScene5030::stopSpeech() {
+ _audio.stopSpeech();
+ _speechRow = _speechEnd = 0;
+ _subtitle.clear();
+}
+
+void RunawayScene5030::click(Common::Point mouse, bool examine) {
+ if (_action != kNone || mouse.y < kRoomTop || mouse.y >= kRoomTop + kRoomHeight)
+ return;
+ const byte id = hotspotAt(mouse);
+ debugC(1, kDebugScene, "Runaway demo: %s click at %d,%d, hotspot %u",
+ examine ? "examine" : "use", mouse.x + _cameraX, mouse.y - kRoomTop, id);
+ if (examine) {
+ if (id == 18)
+ say(_lidOpen ? 581 : 580);
+ else if (id == 8)
+ say(!_lidOpen ? 535 : _unplugged ? 537 : 536);
+ else if (id)
+ say(kHotspots[id].description);
+ return;
+ }
+ stopSpeech();
+ _pendingHotspot = id;
+ const Common::Point target = id ? Common::Point(kHotspots[id].x, kHotspots[id].y) :
+ Common::Point(mouse.x + _cameraX, mouse.y - kRoomTop);
+ walkTo(target);
+}
+
+void RunawayScene5030::arrive() {
+ const byte id = _pendingHotspot;
+ _pendingHotspot = 0;
+ if (!id)
+ return;
+ _facing = kHotspots[id].facing;
+ if (id == 18 || (id == 8 && !_lidOpen)) {
+ startAction(_lidOpen ? kCloseLid : kOpenLid);
+ } else if (id == 10 && !_unplugged) {
+ startAction(kUnplug);
+ } else {
+ const uint16 responses[] = {0, 512, 519, 521, 526, 528, 532, 572, 546, 552,
+ 555, 558, 566, 569, 570, 617, 576, 577, 580, 558};
+ say(responses[id]);
+ }
+}
+
+void RunawayScene5030::startAction(Action action) {
+ _action = action;
+ _actionStarted = _now;
+ _step = 0;
+ stopSpeech();
+ debugC(1, kDebugScene, "Runaway demo: animation %u started", (uint)action);
+}
+
+void RunawayScene5030::finishAction() {
+ const Action completed = _action;
+ _action = kNone;
+ if (completed == kIntro) {
+ say(500);
+ } else if (completed == kOpenLid || completed == kCloseLid) {
+ _lidOpen = completed == kOpenLid;
+ drawPatch(_lidOpen ? _openLidPatch : _closedLidPatch);
+ _facing = 1;
+ say(_lidOpen ? (_unplugged ? 537 : 536) : 580);
+ } else if (completed == kUnplug) {
+ _unplugged = true;
+ drawPatch(_unplugPatch);
+ _facing = 7;
+ say(555);
+ }
+ debugC(1, kDebugScene, "Runaway demo: animation %u finished, lid=%u unplugged=%u",
+ (uint)completed, (uint)_lidOpen, (uint)_unplugged);
+}
+
+void RunawayScene5030::update(uint32 now, int scrollDirection) {
+ _now = now;
+ const uint elapsed = MIN<uint>(100, now - _lastUpdate);
+ _lastUpdate = now;
+ if (_action != kNone) {
+ const uint previousStep = _step;
+ _step = (now - _actionStarted) / 80;
+ // Frame triggers in 0x437110/0x4373e0 (lid) and 0x435a50 (plug).
+ if (_action == kOpenLid || _action == kCloseLid) {
+ const uint start = _action == kOpenLid ? 18 : 11;
+ if (previousStep < start && _step >= start)
+ _audio.playEffect(80, 153);
+ if (previousStep < start + 4 && _step >= start + 4)
+ _audio.stopEffect();
+ } else if (_action == kUnplug && previousStep < 45 && _step >= 45) {
+ _audio.playEffect(83);
+ }
+ const uint length = _action == kIntro ? 20 : _action == kUnplug ? 83 : 33;
+ if (_step >= length)
+ finishAction();
+ } else if (_pathIndex < _path.size()) {
+ float travel = elapsed * 0.18f;
+ while (travel > 0 && _pathIndex < _path.size()) {
+ const Common::Point target = _path[_pathIndex];
+ const float dx = target.x - _x, dy = target.y - _y;
+ const float distance = sqrtf(dx * dx + dy * dy);
+ if (distance > 0) {
+ if (ABS(dx) > ABS(dy) * 2)
+ _facing = dx > 0 ? 2 : 6;
+ else if (ABS(dy) > ABS(dx) * 2)
+ _facing = dy > 0 ? 4 : 0;
+ else
+ _facing = dy > 0 ? (dx > 0 ? 3 : 5) : (dx > 0 ? 1 : 7);
+ }
+ if (distance <= travel) {
+ _x = target.x;
+ _y = target.y;
+ travel -= distance;
+ ++_pathIndex;
+ } else {
+ _x += dx * travel / distance;
+ _y += dy * travel / distance;
+ travel = 0;
+ }
+ }
+ _position = Common::Point((int)(_x + 0.5f), (int)(_y + 0.5f));
+ if (_pathIndex == _path.size()) {
+ debugC(1, kDebugScene, "Runaway demo: arrived at %d,%d", _position.x, _position.y);
+ arrive();
+ }
+ }
+ const bool walking = _pathIndex < _path.size();
+ _actor.setFrame(_facing, walking ? 1 + ((now - _walkStarted) / 70) % 18 : 0);
+ if (scrollDirection)
+ _cameraX += scrollDirection * MAX<int>(1, elapsed / 2);
+ else if (walking || (_action != kNone && _action != kIntro))
+ _cameraX += CLIP<int>(_position.x - kScreenWidth / 2 - _cameraX, -8, 8);
+ setCameraX(_cameraX);
+ if (_speechRow && !_audio.speechPlaying() && (int32)(now - _subtitleUntil) >= 0) {
+ if (_speechRow < _speechEnd) {
+ ++_speechRow;
+ showSpeechRow();
+ } else {
+ stopSpeech();
+ }
+ }
+}
+
+void RunawayScene5030::draw(Common::Point mouse) {
+ _screen.clear();
+ _screen.copyRectToSurface(_background, 0, kRoomTop,
+ Common::Rect(_cameraX, 0, _cameraX + kScreenWidth, kRoomHeight));
+ uint lidFrame = _lidOpen ? 4 : 0;
+ if (_action == kOpenLid)
+ lidFrame = CLIP<int>((int)_step - 17, 0, 4);
+ else if (_action == kCloseLid)
+ lidFrame = CLIP<int>(15 - (int)_step, 0, 4);
+ _lid.draw(_screen, lidFrame, _cameraX, kRoomTop);
+ if (_action == kIntro) {
+ _intro.draw(_screen, _step, _cameraX, kRoomTop);
+ } else if (_action == kOpenLid || _action == kCloseLid) {
+ _lidActor.draw(_screen, _action == kOpenLid ? _step : 32 - _step, _cameraX, kRoomTop);
+ } else if (_action == kUnplug) {
+ // Original 0x435a50 sequence: crouch, pull the plug, return to standing.
+ const uint frame = _step <= 36 ? MAX<int>(0, (int)_step - 1) : _step <= 47 ? _step + 10 : 83 - _step;
+ _unplug.draw(_screen, frame, _cameraX, kRoomTop);
+ } else {
+ _actor.draw(_screen, _position, _cameraX, kRoomTop, _mask, _maps);
+ }
+ const Graphics::Font *font = FontMan.getFontByUsage(Graphics::FontManager::kBigGUIFont);
+ const uint32 white = _screen.format.RGBToColor(255, 255, 255);
+ if (!_subtitle.empty() && (!ConfMan.hasKey("subtitles") || ConfMan.getBool("subtitles") || ConfMan.getBool("speech_mute"))) {
+ Common::Array<Common::U32String> lines;
+ font->wordWrapText(_subtitle, kScreenWidth - 100, lines);
+ int y = kRoomTop + kRoomHeight + 12;
+ for (uint i = 0; i < lines.size(); ++i, y += font->getFontHeight() + 2)
+ font->drawString(_screen.surfacePtr(), lines[i], 50, y, kScreenWidth - 100, white, Graphics::kTextAlignCenter);
+ }
+ const byte id = _action == kNone ? hotspotAt(mouse) : 0;
+ if (id) {
+ const Common::U32String name(kHotspots[id].name);
+ const int width = font->getStringWidth(name) + 8;
+ const int x = CLIP<int>(mouse.x - width / 2, 0, kScreenWidth - width);
+ const int y = MAX<int>(kRoomTop, mouse.y - font->getFontHeight() - 14);
+ font->drawString(_screen.surfacePtr(), name, x + 1, y + 1, width, 0, Graphics::kTextAlignCenter);
+ font->drawString(_screen.surfacePtr(), name, x, y, width, white, Graphics::kTextAlignCenter);
+ }
+}
+
+} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/scene5030.h b/engines/hollywood/runaway/scene5030.h
new file mode 100644
index 00000000000..c6c7533cc90
--- /dev/null
+++ b/engines/hollywood/runaway/scene5030.h
@@ -0,0 +1,87 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef HOLLYWOOD_RUNAWAY_SCENE5030_H
+#define HOLLYWOOD_RUNAWAY_SCENE5030_H
+
+#include "common/ustr.h"
+#include "hollywood/resource.h"
+#include "hollywood/runaway/audio.h"
+#include "hollywood/runaway/graphics.h"
+#include "hollywood/scenes/scene_text_store.h"
+
+namespace Hollywood {
+
+// The demo starts in the shack. This scene owns its room resources, actor,
+// interactions and audio; RunawayEngine owns the backend and event loop.
+class RunawayScene5030 {
+public:
+ enum { kScreenWidth = 1024, kScreenHeight = 768, kRoomWidth = 1376, kRoomHeight = 600, kRoomTop = 84 };
+
+ explicit RunawayScene5030(Audio::Mixer *mixer) : _audio(mixer) {}
+ bool load();
+ void start(uint32 now);
+ void click(Common::Point mouse, bool examine);
+ void update(uint32 now, int scrollDirection);
+ void draw(Common::Point mouse);
+ void setCameraX(int x);
+ const Graphics::ManagedSurface &screen() const { return _screen; }
+
+private:
+ enum Action { kNone, kIntro, kOpenLid, kCloseLid, kUnplug };
+ byte hotspotAt(Common::Point mouse) const;
+ bool walkable(int x, int y) const;
+ bool clearPath(Common::Point start, Common::Point end) const;
+ void walkTo(Common::Point target);
+ void arrive();
+ void say(uint16 row);
+ void showSpeechRow();
+ void stopSpeech();
+ void startAction(Action action);
+ void finishAction();
+ bool loadPatch(uint chunk, Common::Array<byte> &patch);
+ void drawPatch(const Common::Array<byte> &patch);
+
+ int _cameraX = 111;
+ ChunkArchive _archive;
+ SceneTextStore _text;
+ Graphics::ManagedSurface _background, _screen;
+ Common::Array<byte> _mask, _maps, _unplugPatch, _openLidPatch, _closedLidPatch;
+ Common::Array<uint16> _voiceSamples, _cueEnds;
+ RunawayAudio _audio;
+ RunawayActor _actor;
+ RunawayAnimation _intro, _lidActor, _lid, _unplug;
+ Common::Point _position = Common::Point(623, 447);
+ Common::Array<Common::Point> _path;
+ uint _pathIndex = 0;
+ float _x = 623, _y = 447;
+ byte _facing = 3, _pendingHotspot = 0;
+ Action _action = kNone;
+ bool _lidOpen = false, _unplugged = false;
+ uint32 _now = 0, _lastUpdate = 0, _actionStarted = 0, _walkStarted = 0, _subtitleUntil = 0;
+ uint _step = 0;
+ uint16 _speechRow = 0, _speechEnd = 0;
+ Common::U32String _subtitle;
+};
+
+} // End of namespace Hollywood
+
+#endif // HOLLYWOOD_RUNAWAY_SCENE5030_H
Commit: 92d40becdfcd46af15f83fe8f8b4583d5c800795
https://github.com/scummvm/scummvm/commit/92d40becdfcd46af15f83fe8f8b4583d5c800795
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-10-27T11:28:15+01:00
Commit Message:
HOLLYWOOD: reorganized the engine to accomodate both game specific code as well the common one
Changed paths:
A engines/hollywood/monsters/console.cpp
A engines/hollywood/monsters/console.h
A engines/hollywood/monsters/detection.cpp
A engines/hollywood/monsters/detection.h
A engines/hollywood/monsters/detection_tables.h
A engines/hollywood/monsters/font.cpp
A engines/hollywood/monsters/font.h
A engines/hollywood/monsters/game_strings.cpp
A engines/hollywood/monsters/game_strings.h
A engines/hollywood/monsters/gameplay/actor_renderer.cpp
A engines/hollywood/monsters/gameplay/actor_renderer.h
A engines/hollywood/monsters/gameplay/cursor.cpp
A engines/hollywood/monsters/gameplay/cursor.h
A engines/hollywood/monsters/gameplay/dialogue_menu.cpp
A engines/hollywood/monsters/gameplay/dialogue_menu.h
A engines/hollywood/monsters/gameplay/frankenstein_reward.cpp
A engines/hollywood/monsters/gameplay/frankenstein_reward.h
A engines/hollywood/monsters/gameplay/game_loop.cpp
A engines/hollywood/monsters/gameplay/game_loop.h
A engines/hollywood/monsters/gameplay/game_state.h
A engines/hollywood/monsters/gameplay/hotspots.cpp
A engines/hollywood/monsters/gameplay/hotspots.h
A engines/hollywood/monsters/gameplay/inventory_actions.cpp
A engines/hollywood/monsters/gameplay/inventory_actions.h
A engines/hollywood/monsters/gameplay/inventory_media.cpp
A engines/hollywood/monsters/gameplay/inventory_media.h
A engines/hollywood/monsters/gameplay/options_menu.cpp
A engines/hollywood/monsters/gameplay/options_menu.h
A engines/hollywood/monsters/gameplay/panel_art.cpp
A engines/hollywood/monsters/gameplay/panel_art.h
A engines/hollywood/monsters/gameplay/travel_screen.cpp
A engines/hollywood/monsters/gameplay/travel_screen.h
A engines/hollywood/monsters/graphics.cpp
A engines/hollywood/monsters/graphics.h
A engines/hollywood/monsters/hollywood.cpp
A engines/hollywood/monsters/hollywood.h
A engines/hollywood/monsters/metaengine.cpp
A engines/hollywood/monsters/metaengine.h
A engines/hollywood/monsters/music.cpp
A engines/hollywood/monsters/music.h
A engines/hollywood/monsters/saveload.cpp
A engines/hollywood/monsters/scenes/animation_channels.h
A engines/hollywood/monsters/scenes/animation_events.h
A engines/hollywood/monsters/scenes/animation_layers.h
A engines/hollywood/monsters/scenes/animation_player.h
A engines/hollywood/monsters/scenes/chapter_intro_scene.cpp
A engines/hollywood/monsters/scenes/chapter_intro_scene.h
A engines/hollywood/monsters/scenes/intro/demo_montage.cpp
A engines/hollywood/monsters/scenes/intro/demo_montage.h
A engines/hollywood/monsters/scenes/intro/scene1000.cpp
A engines/hollywood/monsters/scenes/intro/scene1000.h
A engines/hollywood/monsters/scenes/intro/scene9000.cpp
A engines/hollywood/monsters/scenes/intro/scene9000.h
A engines/hollywood/monsters/scenes/intro/scene9010.cpp
A engines/hollywood/monsters/scenes/intro/scene9010.h
A engines/hollywood/monsters/scenes/intro/scene9030.cpp
A engines/hollywood/monsters/scenes/intro/scene9030.h
A engines/hollywood/monsters/scenes/intro/scene9050.cpp
A engines/hollywood/monsters/scenes/intro/scene9050.h
A engines/hollywood/monsters/scenes/intro/scene9090.cpp
A engines/hollywood/monsters/scenes/intro/scene9090.h
A engines/hollywood/monsters/scenes/intro/scene9100.cpp
A engines/hollywood/monsters/scenes/intro/scene9100.h
A engines/hollywood/monsters/scenes/intro/scene9110.cpp
A engines/hollywood/monsters/scenes/intro/scene9110.h
A engines/hollywood/monsters/scenes/intro/scene9120.cpp
A engines/hollywood/monsters/scenes/intro/scene9120.h
A engines/hollywood/monsters/scenes/intro/scene9130.cpp
A engines/hollywood/monsters/scenes/intro/scene9130.h
A engines/hollywood/monsters/scenes/intro/scene9140.cpp
A engines/hollywood/monsters/scenes/intro/scene9140.h
A engines/hollywood/monsters/scenes/intro/scene9150.cpp
A engines/hollywood/monsters/scenes/intro/scene9150.h
A engines/hollywood/monsters/scenes/intro/scene9160.cpp
A engines/hollywood/monsters/scenes/intro/scene9160.h
A engines/hollywood/monsters/scenes/intro/scene9170.cpp
A engines/hollywood/monsters/scenes/intro/scene9170.h
A engines/hollywood/monsters/scenes/intro/scene9180.cpp
A engines/hollywood/monsters/scenes/intro/scene9180.h
A engines/hollywood/monsters/scenes/playable/action_overlay.h
A engines/hollywood/monsters/scenes/playable/action_overlay_player.cpp
A engines/hollywood/monsters/scenes/playable/action_overlay_player.h
A engines/hollywood/monsters/scenes/playable/actor_path_controller.cpp
A engines/hollywood/monsters/scenes/playable/actor_path_controller.h
A engines/hollywood/monsters/scenes/playable/actor_types.h
A engines/hollywood/monsters/scenes/playable/ambient_audio.h
A engines/hollywood/monsters/scenes/playable/playable_scene.cpp
A engines/hollywood/monsters/scenes/playable/playable_scene.h
A engines/hollywood/monsters/scenes/playable/playable_scene_actions.cpp
A engines/hollywood/monsters/scenes/playable/scene1010.cpp
A engines/hollywood/monsters/scenes/playable/scene1010.h
A engines/hollywood/monsters/scenes/playable/scene1020.cpp
A engines/hollywood/monsters/scenes/playable/scene1020.h
A engines/hollywood/monsters/scenes/playable/scene1030.cpp
A engines/hollywood/monsters/scenes/playable/scene1030.h
A engines/hollywood/monsters/scenes/playable/scene1040.cpp
A engines/hollywood/monsters/scenes/playable/scene1040.h
A engines/hollywood/monsters/scenes/playable/scene1050.cpp
A engines/hollywood/monsters/scenes/playable/scene1050.h
A engines/hollywood/monsters/scenes/playable/scene1060.cpp
A engines/hollywood/monsters/scenes/playable/scene1060.h
A engines/hollywood/monsters/scenes/playable/scene1070.cpp
A engines/hollywood/monsters/scenes/playable/scene1070.h
A engines/hollywood/monsters/scenes/playable/scene1080.cpp
A engines/hollywood/monsters/scenes/playable/scene1080.h
A engines/hollywood/monsters/scenes/playable/scene1090.cpp
A engines/hollywood/monsters/scenes/playable/scene1090.h
A engines/hollywood/monsters/scenes/playable/scene2000.cpp
A engines/hollywood/monsters/scenes/playable/scene2000.h
A engines/hollywood/monsters/scenes/playable/scene2010.cpp
A engines/hollywood/monsters/scenes/playable/scene2010.h
A engines/hollywood/monsters/scenes/playable/scene2020.cpp
A engines/hollywood/monsters/scenes/playable/scene2020.h
A engines/hollywood/monsters/scenes/playable/scene2030.cpp
A engines/hollywood/monsters/scenes/playable/scene2030.h
A engines/hollywood/monsters/scenes/playable/scene2040.cpp
A engines/hollywood/monsters/scenes/playable/scene2040.h
A engines/hollywood/monsters/scenes/playable/scene2050.cpp
A engines/hollywood/monsters/scenes/playable/scene2050.h
A engines/hollywood/monsters/scenes/playable/scene2060.cpp
A engines/hollywood/monsters/scenes/playable/scene2060.h
A engines/hollywood/monsters/scenes/playable/scene2070.cpp
A engines/hollywood/monsters/scenes/playable/scene2070.h
A engines/hollywood/monsters/scenes/playable/scene2080.cpp
A engines/hollywood/monsters/scenes/playable/scene2080.h
A engines/hollywood/monsters/scenes/playable/scene2090.cpp
A engines/hollywood/monsters/scenes/playable/scene2090.h
A engines/hollywood/monsters/scenes/playable/scene2100.cpp
A engines/hollywood/monsters/scenes/playable/scene2100.h
A engines/hollywood/monsters/scenes/playable/scene2110.cpp
A engines/hollywood/monsters/scenes/playable/scene2110.h
A engines/hollywood/monsters/scenes/playable/scene3000.cpp
A engines/hollywood/monsters/scenes/playable/scene3000.h
A engines/hollywood/monsters/scenes/playable/scene3010.cpp
A engines/hollywood/monsters/scenes/playable/scene3010.h
A engines/hollywood/monsters/scenes/playable/scene3020.cpp
A engines/hollywood/monsters/scenes/playable/scene3020.h
A engines/hollywood/monsters/scenes/playable/scene3030.cpp
A engines/hollywood/monsters/scenes/playable/scene3030.h
A engines/hollywood/monsters/scenes/playable/scene3040.cpp
A engines/hollywood/monsters/scenes/playable/scene3040.h
A engines/hollywood/monsters/scenes/playable/scene3050.cpp
A engines/hollywood/monsters/scenes/playable/scene3050.h
A engines/hollywood/monsters/scenes/playable/scene3060.cpp
A engines/hollywood/monsters/scenes/playable/scene3060.h
A engines/hollywood/monsters/scenes/playable/scene3070.cpp
A engines/hollywood/monsters/scenes/playable/scene3070.h
A engines/hollywood/monsters/scenes/playable/scene3080.cpp
A engines/hollywood/monsters/scenes/playable/scene3080.h
A engines/hollywood/monsters/scenes/playable/scene3090.cpp
A engines/hollywood/monsters/scenes/playable/scene3090.h
A engines/hollywood/monsters/scenes/playable/scene3100.cpp
A engines/hollywood/monsters/scenes/playable/scene3100.h
A engines/hollywood/monsters/scenes/playable/scene3110.cpp
A engines/hollywood/monsters/scenes/playable/scene3110.h
A engines/hollywood/monsters/scenes/playable/scene4000.cpp
A engines/hollywood/monsters/scenes/playable/scene4000.h
A engines/hollywood/monsters/scenes/playable/scene4010.cpp
A engines/hollywood/monsters/scenes/playable/scene4010.h
A engines/hollywood/monsters/scenes/playable/scene4020.cpp
A engines/hollywood/monsters/scenes/playable/scene4020.h
A engines/hollywood/monsters/scenes/playable/scene4030.cpp
A engines/hollywood/monsters/scenes/playable/scene4030.h
A engines/hollywood/monsters/scenes/playable/scene4040.cpp
A engines/hollywood/monsters/scenes/playable/scene4040.h
A engines/hollywood/monsters/scenes/playable/scene4050.cpp
A engines/hollywood/monsters/scenes/playable/scene4050.h
A engines/hollywood/monsters/scenes/playable/scene4060.cpp
A engines/hollywood/monsters/scenes/playable/scene4060.h
A engines/hollywood/monsters/scenes/playable/scene4070.cpp
A engines/hollywood/monsters/scenes/playable/scene4070.h
A engines/hollywood/monsters/scenes/playable/scene4080.cpp
A engines/hollywood/monsters/scenes/playable/scene4080.h
A engines/hollywood/monsters/scenes/playable/scene4090.cpp
A engines/hollywood/monsters/scenes/playable/scene4090.h
A engines/hollywood/monsters/scenes/playable/scene4100.cpp
A engines/hollywood/monsters/scenes/playable/scene4100.h
A engines/hollywood/monsters/scenes/playable/scene4110.cpp
A engines/hollywood/monsters/scenes/playable/scene4110.h
A engines/hollywood/monsters/scenes/playable/scene5000.cpp
A engines/hollywood/monsters/scenes/playable/scene5000.h
A engines/hollywood/monsters/scenes/playable/scene5010.cpp
A engines/hollywood/monsters/scenes/playable/scene5010.h
A engines/hollywood/monsters/scenes/playable/scene5020.cpp
A engines/hollywood/monsters/scenes/playable/scene5020.h
A engines/hollywood/monsters/scenes/playable/scene5030.cpp
A engines/hollywood/monsters/scenes/playable/scene5030.h
A engines/hollywood/monsters/scenes/playable/scene5040.cpp
A engines/hollywood/monsters/scenes/playable/scene5040.h
A engines/hollywood/monsters/scenes/playable/scene5050.cpp
A engines/hollywood/monsters/scenes/playable/scene5050.h
A engines/hollywood/monsters/scenes/playable/scene5060.cpp
A engines/hollywood/monsters/scenes/playable/scene5060.h
A engines/hollywood/monsters/scenes/playable/scene5070.cpp
A engines/hollywood/monsters/scenes/playable/scene5070.h
A engines/hollywood/monsters/scenes/playable/scene5080.cpp
A engines/hollywood/monsters/scenes/playable/scene5080.h
A engines/hollywood/monsters/scenes/playable/scene5090.cpp
A engines/hollywood/monsters/scenes/playable/scene5090.h
A engines/hollywood/monsters/scenes/playable/scene5100.cpp
A engines/hollywood/monsters/scenes/playable/scene5100.h
A engines/hollywood/monsters/scenes/playable/scene5110.cpp
A engines/hollywood/monsters/scenes/playable/scene5110.h
A engines/hollywood/monsters/scenes/playable/scene5120.cpp
A engines/hollywood/monsters/scenes/playable/scene5120.h
A engines/hollywood/monsters/scenes/playable/scene5130.cpp
A engines/hollywood/monsters/scenes/playable/scene5130.h
A engines/hollywood/monsters/scenes/playable/scene6000.cpp
A engines/hollywood/monsters/scenes/playable/scene6000.h
A engines/hollywood/monsters/scenes/playable/scene6010.cpp
A engines/hollywood/monsters/scenes/playable/scene6010.h
A engines/hollywood/monsters/scenes/playable/scene6020.cpp
A engines/hollywood/monsters/scenes/playable/scene6020.h
A engines/hollywood/monsters/scenes/playable/scene6030.cpp
A engines/hollywood/monsters/scenes/playable/scene6030.h
A engines/hollywood/monsters/scenes/playable/scene6040.cpp
A engines/hollywood/monsters/scenes/playable/scene6040.h
A engines/hollywood/monsters/scenes/playable/scene6050.cpp
A engines/hollywood/monsters/scenes/playable/scene6050.h
A engines/hollywood/monsters/scenes/playable/scene6060.cpp
A engines/hollywood/monsters/scenes/playable/scene6060.h
A engines/hollywood/monsters/scenes/playable/scene6070.cpp
A engines/hollywood/monsters/scenes/playable/scene6070.h
A engines/hollywood/monsters/scenes/playable/scene6080.cpp
A engines/hollywood/monsters/scenes/playable/scene6080.h
A engines/hollywood/monsters/scenes/playable/scene6090.cpp
A engines/hollywood/monsters/scenes/playable/scene6090.h
A engines/hollywood/monsters/scenes/playable/scene6100.cpp
A engines/hollywood/monsters/scenes/playable/scene6100.h
A engines/hollywood/monsters/scenes/playable/scene7000.cpp
A engines/hollywood/monsters/scenes/playable/scene7000.h
A engines/hollywood/monsters/scenes/playable/scene7010.cpp
A engines/hollywood/monsters/scenes/playable/scene7010.h
A engines/hollywood/monsters/scenes/playable/scene7020.cpp
A engines/hollywood/monsters/scenes/playable/scene7020.h
A engines/hollywood/monsters/scenes/playable/scene7030.cpp
A engines/hollywood/monsters/scenes/playable/scene7030.h
A engines/hollywood/monsters/scenes/playable/scene7040.cpp
A engines/hollywood/monsters/scenes/playable/scene7040.h
A engines/hollywood/monsters/scenes/playable/scene7050.cpp
A engines/hollywood/monsters/scenes/playable/scene7050.h
A engines/hollywood/monsters/scenes/playable/scene7060.cpp
A engines/hollywood/monsters/scenes/playable/scene7060.h
A engines/hollywood/monsters/scenes/playable/scene7070.cpp
A engines/hollywood/monsters/scenes/playable/scene7070.h
A engines/hollywood/monsters/scenes/playable/scene7080.cpp
A engines/hollywood/monsters/scenes/playable/scene7080.h
A engines/hollywood/monsters/scenes/playable/scene7090.cpp
A engines/hollywood/monsters/scenes/playable/scene7090.h
A engines/hollywood/monsters/scenes/playable/scene7100.cpp
A engines/hollywood/monsters/scenes/playable/scene7100.h
A engines/hollywood/monsters/scenes/playable/scene8000.cpp
A engines/hollywood/monsters/scenes/playable/scene8000.h
A engines/hollywood/monsters/scenes/playable/scene8010.cpp
A engines/hollywood/monsters/scenes/playable/scene8010.h
A engines/hollywood/monsters/scenes/playable/scene8020.cpp
A engines/hollywood/monsters/scenes/playable/scene8020.h
A engines/hollywood/monsters/scenes/playable/scene_config.h
A engines/hollywood/monsters/scenes/playable/scene_surface_state.cpp
A engines/hollywood/monsters/scenes/playable/scene_surface_state.h
A engines/hollywood/monsters/scenes/playable/speech_controller.cpp
A engines/hollywood/monsters/scenes/playable/speech_controller.h
A engines/hollywood/monsters/scenes/presentation_scene.cpp
A engines/hollywood/monsters/scenes/presentation_scene.h
A engines/hollywood/monsters/scenes/resource_delta_clip_player.cpp
A engines/hollywood/monsters/scenes/resource_delta_clip_player.h
A engines/hollywood/monsters/scenes/scene_data.h
A engines/hollywood/monsters/scenes/scene_registry.cpp
A engines/hollywood/monsters/scenes/scene_registry.h
A engines/hollywood/monsters/scenes/scene_resources.cpp
A engines/hollywood/monsters/scenes/scene_resources.h
A engines/hollywood/monsters/scenes/shared_frame_sequences.cpp
A engines/hollywood/monsters/scenes/shared_frame_sequences.h
A engines/hollywood/monsters/scenes/speech_overlay.cpp
A engines/hollywood/monsters/scenes/speech_overlay.h
A engines/hollywood/runaway/detection_tables.h
A engines/hollywood/scene_text_store.cpp
A engines/hollywood/scene_text_store.h
R engines/hollywood/console.cpp
R engines/hollywood/console.h
R engines/hollywood/detection.h
R engines/hollywood/font.cpp
R engines/hollywood/font.h
R engines/hollywood/game_strings.cpp
R engines/hollywood/game_strings.h
R engines/hollywood/gameplay/actor_renderer.cpp
R engines/hollywood/gameplay/actor_renderer.h
R engines/hollywood/gameplay/cursor.cpp
R engines/hollywood/gameplay/cursor.h
R engines/hollywood/gameplay/dialogue_menu.cpp
R engines/hollywood/gameplay/dialogue_menu.h
R engines/hollywood/gameplay/frankenstein_reward.cpp
R engines/hollywood/gameplay/frankenstein_reward.h
R engines/hollywood/gameplay/game_loop.cpp
R engines/hollywood/gameplay/game_loop.h
R engines/hollywood/gameplay/game_state.h
R engines/hollywood/gameplay/hotspots.cpp
R engines/hollywood/gameplay/hotspots.h
R engines/hollywood/gameplay/inventory_actions.cpp
R engines/hollywood/gameplay/inventory_actions.h
R engines/hollywood/gameplay/inventory_media.cpp
R engines/hollywood/gameplay/inventory_media.h
R engines/hollywood/gameplay/options_menu.cpp
R engines/hollywood/gameplay/options_menu.h
R engines/hollywood/gameplay/panel_art.cpp
R engines/hollywood/gameplay/panel_art.h
R engines/hollywood/gameplay/travel_screen.cpp
R engines/hollywood/gameplay/travel_screen.h
R engines/hollywood/graphics.cpp
R engines/hollywood/graphics.h
R engines/hollywood/hollywood.cpp
R engines/hollywood/hollywood.h
R engines/hollywood/music.cpp
R engines/hollywood/music.h
R engines/hollywood/saveload.cpp
R engines/hollywood/scenes/animation_channels.h
R engines/hollywood/scenes/animation_events.h
R engines/hollywood/scenes/animation_layers.h
R engines/hollywood/scenes/animation_player.h
R engines/hollywood/scenes/chapter_intro_scene.cpp
R engines/hollywood/scenes/chapter_intro_scene.h
R engines/hollywood/scenes/intro/demo_montage.cpp
R engines/hollywood/scenes/intro/demo_montage.h
R engines/hollywood/scenes/intro/scene1000.cpp
R engines/hollywood/scenes/intro/scene1000.h
R engines/hollywood/scenes/intro/scene9000.cpp
R engines/hollywood/scenes/intro/scene9000.h
R engines/hollywood/scenes/intro/scene9010.cpp
R engines/hollywood/scenes/intro/scene9010.h
R engines/hollywood/scenes/intro/scene9030.cpp
R engines/hollywood/scenes/intro/scene9030.h
R engines/hollywood/scenes/intro/scene9050.cpp
R engines/hollywood/scenes/intro/scene9050.h
R engines/hollywood/scenes/intro/scene9090.cpp
R engines/hollywood/scenes/intro/scene9090.h
R engines/hollywood/scenes/intro/scene9100.cpp
R engines/hollywood/scenes/intro/scene9100.h
R engines/hollywood/scenes/intro/scene9110.cpp
R engines/hollywood/scenes/intro/scene9110.h
R engines/hollywood/scenes/intro/scene9120.cpp
R engines/hollywood/scenes/intro/scene9120.h
R engines/hollywood/scenes/intro/scene9130.cpp
R engines/hollywood/scenes/intro/scene9130.h
R engines/hollywood/scenes/intro/scene9140.cpp
R engines/hollywood/scenes/intro/scene9140.h
R engines/hollywood/scenes/intro/scene9150.cpp
R engines/hollywood/scenes/intro/scene9150.h
R engines/hollywood/scenes/intro/scene9160.cpp
R engines/hollywood/scenes/intro/scene9160.h
R engines/hollywood/scenes/intro/scene9170.cpp
R engines/hollywood/scenes/intro/scene9170.h
R engines/hollywood/scenes/intro/scene9180.cpp
R engines/hollywood/scenes/intro/scene9180.h
R engines/hollywood/scenes/playable/action_overlay.h
R engines/hollywood/scenes/playable/action_overlay_player.cpp
R engines/hollywood/scenes/playable/action_overlay_player.h
R engines/hollywood/scenes/playable/actor_path_controller.cpp
R engines/hollywood/scenes/playable/actor_path_controller.h
R engines/hollywood/scenes/playable/actor_types.h
R engines/hollywood/scenes/playable/ambient_audio.h
R engines/hollywood/scenes/playable/playable_scene.cpp
R engines/hollywood/scenes/playable/playable_scene.h
R engines/hollywood/scenes/playable/playable_scene_actions.cpp
R engines/hollywood/scenes/playable/scene1010.cpp
R engines/hollywood/scenes/playable/scene1010.h
R engines/hollywood/scenes/playable/scene1020.cpp
R engines/hollywood/scenes/playable/scene1020.h
R engines/hollywood/scenes/playable/scene1030.cpp
R engines/hollywood/scenes/playable/scene1030.h
R engines/hollywood/scenes/playable/scene1040.cpp
R engines/hollywood/scenes/playable/scene1040.h
R engines/hollywood/scenes/playable/scene1050.cpp
R engines/hollywood/scenes/playable/scene1050.h
R engines/hollywood/scenes/playable/scene1060.cpp
R engines/hollywood/scenes/playable/scene1060.h
R engines/hollywood/scenes/playable/scene1070.cpp
R engines/hollywood/scenes/playable/scene1070.h
R engines/hollywood/scenes/playable/scene1080.cpp
R engines/hollywood/scenes/playable/scene1080.h
R engines/hollywood/scenes/playable/scene1090.cpp
R engines/hollywood/scenes/playable/scene1090.h
R engines/hollywood/scenes/playable/scene2000.cpp
R engines/hollywood/scenes/playable/scene2000.h
R engines/hollywood/scenes/playable/scene2010.cpp
R engines/hollywood/scenes/playable/scene2010.h
R engines/hollywood/scenes/playable/scene2020.cpp
R engines/hollywood/scenes/playable/scene2020.h
R engines/hollywood/scenes/playable/scene2030.cpp
R engines/hollywood/scenes/playable/scene2030.h
R engines/hollywood/scenes/playable/scene2040.cpp
R engines/hollywood/scenes/playable/scene2040.h
R engines/hollywood/scenes/playable/scene2050.cpp
R engines/hollywood/scenes/playable/scene2050.h
R engines/hollywood/scenes/playable/scene2060.cpp
R engines/hollywood/scenes/playable/scene2060.h
R engines/hollywood/scenes/playable/scene2070.cpp
R engines/hollywood/scenes/playable/scene2070.h
R engines/hollywood/scenes/playable/scene2080.cpp
R engines/hollywood/scenes/playable/scene2080.h
R engines/hollywood/scenes/playable/scene2090.cpp
R engines/hollywood/scenes/playable/scene2090.h
R engines/hollywood/scenes/playable/scene2100.cpp
R engines/hollywood/scenes/playable/scene2100.h
R engines/hollywood/scenes/playable/scene2110.cpp
R engines/hollywood/scenes/playable/scene2110.h
R engines/hollywood/scenes/playable/scene3000.cpp
R engines/hollywood/scenes/playable/scene3000.h
R engines/hollywood/scenes/playable/scene3010.cpp
R engines/hollywood/scenes/playable/scene3010.h
R engines/hollywood/scenes/playable/scene3020.cpp
R engines/hollywood/scenes/playable/scene3020.h
R engines/hollywood/scenes/playable/scene3030.cpp
R engines/hollywood/scenes/playable/scene3030.h
R engines/hollywood/scenes/playable/scene3040.cpp
R engines/hollywood/scenes/playable/scene3040.h
R engines/hollywood/scenes/playable/scene3050.cpp
R engines/hollywood/scenes/playable/scene3050.h
R engines/hollywood/scenes/playable/scene3060.cpp
R engines/hollywood/scenes/playable/scene3060.h
R engines/hollywood/scenes/playable/scene3070.cpp
R engines/hollywood/scenes/playable/scene3070.h
R engines/hollywood/scenes/playable/scene3080.cpp
R engines/hollywood/scenes/playable/scene3080.h
R engines/hollywood/scenes/playable/scene3090.cpp
R engines/hollywood/scenes/playable/scene3090.h
R engines/hollywood/scenes/playable/scene3100.cpp
R engines/hollywood/scenes/playable/scene3100.h
R engines/hollywood/scenes/playable/scene3110.cpp
R engines/hollywood/scenes/playable/scene3110.h
R engines/hollywood/scenes/playable/scene4000.cpp
R engines/hollywood/scenes/playable/scene4000.h
R engines/hollywood/scenes/playable/scene4010.cpp
R engines/hollywood/scenes/playable/scene4010.h
R engines/hollywood/scenes/playable/scene4020.cpp
R engines/hollywood/scenes/playable/scene4020.h
R engines/hollywood/scenes/playable/scene4030.cpp
R engines/hollywood/scenes/playable/scene4030.h
R engines/hollywood/scenes/playable/scene4040.cpp
R engines/hollywood/scenes/playable/scene4040.h
R engines/hollywood/scenes/playable/scene4050.cpp
R engines/hollywood/scenes/playable/scene4050.h
R engines/hollywood/scenes/playable/scene4060.cpp
R engines/hollywood/scenes/playable/scene4060.h
R engines/hollywood/scenes/playable/scene4070.cpp
R engines/hollywood/scenes/playable/scene4070.h
R engines/hollywood/scenes/playable/scene4080.cpp
R engines/hollywood/scenes/playable/scene4080.h
R engines/hollywood/scenes/playable/scene4090.cpp
R engines/hollywood/scenes/playable/scene4090.h
R engines/hollywood/scenes/playable/scene4100.cpp
R engines/hollywood/scenes/playable/scene4100.h
R engines/hollywood/scenes/playable/scene4110.cpp
R engines/hollywood/scenes/playable/scene4110.h
R engines/hollywood/scenes/playable/scene5000.cpp
R engines/hollywood/scenes/playable/scene5000.h
R engines/hollywood/scenes/playable/scene5010.cpp
R engines/hollywood/scenes/playable/scene5010.h
R engines/hollywood/scenes/playable/scene5020.cpp
R engines/hollywood/scenes/playable/scene5020.h
R engines/hollywood/scenes/playable/scene5030.cpp
R engines/hollywood/scenes/playable/scene5030.h
R engines/hollywood/scenes/playable/scene5040.cpp
R engines/hollywood/scenes/playable/scene5040.h
R engines/hollywood/scenes/playable/scene5050.cpp
R engines/hollywood/scenes/playable/scene5050.h
R engines/hollywood/scenes/playable/scene5060.cpp
R engines/hollywood/scenes/playable/scene5060.h
R engines/hollywood/scenes/playable/scene5070.cpp
R engines/hollywood/scenes/playable/scene5070.h
R engines/hollywood/scenes/playable/scene5080.cpp
R engines/hollywood/scenes/playable/scene5080.h
R engines/hollywood/scenes/playable/scene5090.cpp
R engines/hollywood/scenes/playable/scene5090.h
R engines/hollywood/scenes/playable/scene5100.cpp
R engines/hollywood/scenes/playable/scene5100.h
R engines/hollywood/scenes/playable/scene5110.cpp
R engines/hollywood/scenes/playable/scene5110.h
R engines/hollywood/scenes/playable/scene5120.cpp
R engines/hollywood/scenes/playable/scene5120.h
R engines/hollywood/scenes/playable/scene5130.cpp
R engines/hollywood/scenes/playable/scene5130.h
R engines/hollywood/scenes/playable/scene6000.cpp
R engines/hollywood/scenes/playable/scene6000.h
R engines/hollywood/scenes/playable/scene6010.cpp
R engines/hollywood/scenes/playable/scene6010.h
R engines/hollywood/scenes/playable/scene6020.cpp
R engines/hollywood/scenes/playable/scene6020.h
R engines/hollywood/scenes/playable/scene6030.cpp
R engines/hollywood/scenes/playable/scene6030.h
R engines/hollywood/scenes/playable/scene6040.cpp
R engines/hollywood/scenes/playable/scene6040.h
R engines/hollywood/scenes/playable/scene6050.cpp
R engines/hollywood/scenes/playable/scene6050.h
R engines/hollywood/scenes/playable/scene6060.cpp
R engines/hollywood/scenes/playable/scene6060.h
R engines/hollywood/scenes/playable/scene6070.cpp
R engines/hollywood/scenes/playable/scene6070.h
R engines/hollywood/scenes/playable/scene6080.cpp
R engines/hollywood/scenes/playable/scene6080.h
R engines/hollywood/scenes/playable/scene6090.cpp
R engines/hollywood/scenes/playable/scene6090.h
R engines/hollywood/scenes/playable/scene6100.cpp
R engines/hollywood/scenes/playable/scene6100.h
R engines/hollywood/scenes/playable/scene7000.cpp
R engines/hollywood/scenes/playable/scene7000.h
R engines/hollywood/scenes/playable/scene7010.cpp
R engines/hollywood/scenes/playable/scene7010.h
R engines/hollywood/scenes/playable/scene7020.cpp
R engines/hollywood/scenes/playable/scene7020.h
R engines/hollywood/scenes/playable/scene7030.cpp
R engines/hollywood/scenes/playable/scene7030.h
R engines/hollywood/scenes/playable/scene7040.cpp
R engines/hollywood/scenes/playable/scene7040.h
R engines/hollywood/scenes/playable/scene7050.cpp
R engines/hollywood/scenes/playable/scene7050.h
R engines/hollywood/scenes/playable/scene7060.cpp
R engines/hollywood/scenes/playable/scene7060.h
R engines/hollywood/scenes/playable/scene7070.cpp
R engines/hollywood/scenes/playable/scene7070.h
R engines/hollywood/scenes/playable/scene7080.cpp
R engines/hollywood/scenes/playable/scene7080.h
R engines/hollywood/scenes/playable/scene7090.cpp
R engines/hollywood/scenes/playable/scene7090.h
R engines/hollywood/scenes/playable/scene7100.cpp
R engines/hollywood/scenes/playable/scene7100.h
R engines/hollywood/scenes/playable/scene8000.cpp
R engines/hollywood/scenes/playable/scene8000.h
R engines/hollywood/scenes/playable/scene8010.cpp
R engines/hollywood/scenes/playable/scene8010.h
R engines/hollywood/scenes/playable/scene8020.cpp
R engines/hollywood/scenes/playable/scene8020.h
R engines/hollywood/scenes/playable/scene_config.h
R engines/hollywood/scenes/playable/scene_surface_state.cpp
R engines/hollywood/scenes/playable/scene_surface_state.h
R engines/hollywood/scenes/playable/speech_controller.cpp
R engines/hollywood/scenes/playable/speech_controller.h
R engines/hollywood/scenes/presentation_scene.cpp
R engines/hollywood/scenes/presentation_scene.h
R engines/hollywood/scenes/resource_delta_clip_player.cpp
R engines/hollywood/scenes/resource_delta_clip_player.h
R engines/hollywood/scenes/scene_data.h
R engines/hollywood/scenes/scene_registry.cpp
R engines/hollywood/scenes/scene_registry.h
R engines/hollywood/scenes/scene_resources.cpp
R engines/hollywood/scenes/scene_resources.h
R engines/hollywood/scenes/scene_text_store.cpp
R engines/hollywood/scenes/scene_text_store.h
R engines/hollywood/scenes/shared_frame_sequences.cpp
R engines/hollywood/scenes/shared_frame_sequences.h
R engines/hollywood/scenes/speech_overlay.cpp
R engines/hollywood/scenes/speech_overlay.h
engines/hollywood/detection.cpp
engines/hollywood/metaengine.cpp
engines/hollywood/module.mk
engines/hollywood/resource.cpp
engines/hollywood/resource.h
engines/hollywood/runaway/scene5030.h
diff --git a/engines/hollywood/detection.cpp b/engines/hollywood/detection.cpp
index b9823f1e3b7..46ff7d7f7b1 100644
--- a/engines/hollywood/detection.cpp
+++ b/engines/hollywood/detection.cpp
@@ -20,13 +20,11 @@
*/
#include "base/plugins.h"
-#include "common/file.h"
#include "engines/advancedDetector.h"
#include "engines/game.h"
#include "hollywood/debug.h"
-#include "hollywood/detection.h"
-#include "hollywood/graphics.h"
+#include "hollywood/monsters/detection.h"
namespace Hollywood {
@@ -50,219 +48,12 @@ const DebugChannelDef debugFlagList[] = {
};
const ADGameDescription gameDescriptions[] = {
- // German Runaway demo, starting in the shack (scene 5030).
- {
- "runaway",
- "Demo",
- AD_ENTRY3s("RESOURCE.E03", "df350293b7dab8f39aead666dcedce72", 41872288,
- "RESOURCE.003", "6e7e639375a14c5b694879c88a8aeaa6", 444292,
- "RESOURCE.000", "3ccd0619e1475efd4f1212b92db25843", 38045367),
- Common::DE_DEU,
- Common::kPlatformWindows,
- ADGF_DEMO | ADGF_UNSTABLE,
- GUIO2(GUIO_NOMIDI, GUIO_NOLAUNCHLOAD)
- },
-
- // Spanish DOS demo.
- {
- "hollywood",
- "Demo",
- AD_ENTRY4s("MONSTERS.EXE", "54a1e8749448e08086a1929510ec4b6a", 1027587,
- "RESOURCE.000", "0f86d33d0519b0dcef62de5f46754e85", 4348283,
- "RESOURCE.M04", "396d3a7cbe11f14747cdc52f1ac038ba", 2286658,
- "RESOURCE.S0D", "96bba558e5508affca4ffab8d546de83", 1408634),
- Common::ES_ESP,
- Common::kPlatformDOS,
- ADGF_DEMO | ADGF_UNSTABLE,
- GUIO2(GAMEOPTION_RESTORED_CONTENT, GUIO_NOMIDI)
- },
-
- // Italian Windows demo distributed with the Italian release.
- {
- "hollywood",
- "Demo",
- AD_ENTRY4s("MONSTERS.EXE", "fd174231edb65bafcaea04c911c2d4bb", 671232,
- "RESOURCE.000", "b16a8300ca1af75a0322e443a8971159", 3662162,
- "RESOURCE.003", "cd0ecdca8faaf56c905e0b52d025c8e4", 2185543,
- "RESOURCE.S0D", "96bba558e5508affca4ffab8d546de83", 1408634),
- Common::IT_ITA,
- Common::kPlatformWindows,
- ADGF_DEMO | ADGF_UNSTABLE,
- GUIO3(GAMEOPTION_RESTORED_CONTENT, GUIO_NOMIDI, GUIO_NOSPEECH)
- },
-
- // Spanish Windows first edition full game, installed MONSTERS directory.
- {
- "hollywood",
- "1st edition",
- AD_ENTRY4s("MONSTERS.EXE", "1129cea40124683fc4aabaeaf6478f5a", 1167360,
- "RESOURCE.000", "b16a8300ca1af75a0322e443a8971159", 3662162,
- "RESOURCE.003", "352126965c51832ce970faece65cc2f8", 9444153,
- "RESOURCE.004", "a79d937879665b899c255957c7310d42", 265002432),
- Common::ES_ESP,
- Common::kPlatformWindows,
- ADGF_UNSTABLE,
- GUIO2(GAMEOPTION_RESTORED_CONTENT, GUIO_NOMIDI)
- },
-
- // Italian Windows full game, installed Monsters directory.
- {
- "hollywood",
- nullptr,
- AD_ENTRY4s("MONSTERS.EXE", "d047170b3a143eaef506dec2f18fe993", 1559552,
- "RESOURCE.000", "b16a8300ca1af75a0322e443a8971159", 3662162,
- "RESOURCE.003", "72475bb0eff3f4920452342537584569", 9444153,
- "RESOURCE.004", "fb9f09029e73eb5ee708b995db9823d0", 256474138),
- Common::IT_ITA,
- Common::kPlatformWindows,
- ADGF_UNSTABLE,
- GUIO2(GAMEOPTION_RESTORED_CONTENT, GUIO_NOMIDI)
- },
-
- // Spanish Windows full game, installed MONSTERS directory.
- {
- "hollywood",
- nullptr,
- AD_ENTRY3s("MONSTERS.EXE", "5b097e04e6ca7225d9dea6cd99909f6d", 1431552,
- "RESOURCE.000", "bf580b6b3eedf45e427bb83ab29ccd21", 4320424,
- "RESOURCE.003", "352126965c51832ce970faece65cc2f8", 9444153),
- Common::ES_ESP,
- Common::kPlatformWindows,
- ADGF_UNSTABLE,
- GUIO2(GAMEOPTION_RESTORED_CONTENT, GUIO_NOMIDI)
- },
-
- // Spanish DOS CD full game, MONSTERS directory from the CD.
- {
- "hollywood",
- nullptr,
- AD_ENTRY3s("MONSTERS.EXE", "54a1e8749448e08086a1929510ec4b6a", 2513867,
- "RESOURCE.000", "bf580b6b3eedf45e427bb83ab29ccd21", 4320424,
- "RESOURCE.003", "352126965c51832ce970faece65cc2f8", 9444153),
- Common::ES_ESP,
- Common::kPlatformDOS,
- ADGF_UNSTABLE,
- GUIO2(GAMEOPTION_RESTORED_CONTENT, GUIO_NOMIDI)
- },
+#include "hollywood/runaway/detection_tables.h"
+#include "hollywood/monsters/detection_tables.h"
AD_TABLE_END_MARKER
};
-const ADGameDescription fallbackWindowsDescription = {
- "hollywood",
- "",
- AD_ENTRY1(nullptr, nullptr),
- Common::UNK_LANG,
- Common::kPlatformWindows,
- ADGF_UNSTABLE,
- GUIO2(GAMEOPTION_RESTORED_CONTENT, GUIO_NOMIDI)
-};
-
-const ADGameDescription fallbackDosDescription = {
- "hollywood",
- "Unknown DOS version",
- AD_ENTRY1(nullptr, nullptr),
- Common::UNK_LANG,
- Common::kPlatformDOS,
- ADGF_UNSTABLE,
- GUIO2(GAMEOPTION_RESTORED_CONTENT, GUIO_NOMIDI)
-};
-
-const ADFileBasedFallback fileBasedFallback[] = {
- { &fallbackDosDescription, { "MONSTERS.EXE", "RESOURCE.000", "RESOURCE.003", "RESOURCE.004", nullptr } },
- { nullptr, { nullptr } }
-};
-
-enum Resource000FallbackEntry {
- kFallbackOptionsFramebufferEntry = 0x2a,
- kFallbackInventoryPagesEntry = 0x2b,
- kFallbackBottomPanelEntry = 0x2c,
- kFallbackDialoguePanelEntry = 0x2f,
- kFallbackObjectPaletteEntry = 0x31
-};
-
-const uint kFallbackResource000HeaderByteCount = 1;
-const uint kFallbackResource000OffsetTableSize = 400;
-const uint kFallbackResource000SizeTableSize = 400;
-const uint kFallbackMinimumInventoryPagesSize = 0x7e000;
-const uint kFallbackMinimumBottomPanelSize = 0x41d8;
-const uint kFallbackMinimumDialoguePanelSourceSize = 45 * 1024;
-const uint kFallbackObjectPaletteSize = 0x60;
-
-bool readResource000Entry(Common::File &file, uint entryIndex, uint32 &offset, uint32 &size) {
- const uint offsetTablePosition = kFallbackResource000HeaderByteCount + entryIndex * 4;
- const uint sizeTablePosition = kFallbackResource000HeaderByteCount +
- kFallbackResource000OffsetTableSize + entryIndex * 4;
- if (sizeTablePosition + 4 > (uint32)file.size())
- return false;
-
- file.seek(offsetTablePosition);
- offset = file.readUint32LE();
- file.seek(sizeTablePosition);
- size = file.readUint32LE();
-
- return !file.err() && size != 0 && offset <= (uint32)file.size() &&
- size <= (uint32)file.size() - offset;
-}
-
-bool hasResource000Entry(Common::File &file, uint entryIndex, uint32 minimumSize) {
- uint32 offset = 0;
- uint32 size = 0;
- return readResource000Entry(file, entryIndex, offset, size) && size >= minimumSize;
-}
-
-bool hasValidResource000StartupLayout(const AdvancedMetaEngineBase::FileMap &allFiles) {
- if (!allFiles.contains("RESOURCE.000"))
- return false;
-
- Common::File file;
- if (!file.open(allFiles["RESOURCE.000"]))
- return false;
-
- const uint32 startupTablesSize = kFallbackResource000HeaderByteCount +
- kFallbackResource000OffsetTableSize + kFallbackResource000SizeTableSize;
- if ((uint32)file.size() < startupTablesSize)
- return false;
-
- if (!hasResource000Entry(file, kFallbackOptionsFramebufferEntry, kSceneBufferByteCount))
- return false;
- if (!hasResource000Entry(file, kFallbackInventoryPagesEntry, kFallbackMinimumInventoryPagesSize))
- return false;
- if (!hasResource000Entry(file, kFallbackBottomPanelEntry, kFallbackMinimumBottomPanelSize))
- return false;
- if (!hasResource000Entry(file, kFallbackDialoguePanelEntry, kFallbackMinimumDialoguePanelSourceSize))
- return false;
- if (!hasResource000Entry(file, kFallbackObjectPaletteEntry, kFallbackObjectPaletteSize))
- return false;
-
- return true;
-}
-
-Common::Platform detectExecutablePlatform(const AdvancedMetaEngineBase::FileMap &allFiles) {
- if (!allFiles.contains("MONSTERS.EXE"))
- return Common::kPlatformUnknown;
-
- Common::File file;
- if (!file.open(allFiles["MONSTERS.EXE"]) || file.size() < 0x40)
- return Common::kPlatformUnknown;
-
- file.seek(0);
- const byte mzHeader[2] = { file.readByte(), file.readByte() };
- if (mzHeader[0] != 'M' || mzHeader[1] != 'Z')
- return Common::kPlatformUnknown;
-
- file.seek(0x3c);
- const uint32 peHeaderOffset = file.readUint32LE();
- if (peHeaderOffset + 4 <= (uint32)file.size()) {
- file.seek(peHeaderOffset);
- if (file.readByte() == 'P' && file.readByte() == 'E' &&
- file.readByte() == 0 && file.readByte() == 0)
- return Common::kPlatformWindows;
- }
-
- return Common::kPlatformDOS;
-}
-
class HollywoodMetaEngineDetection : public AdvancedMetaEngineDetection<ADGameDescription> {
public:
HollywoodMetaEngineDetection() : AdvancedMetaEngineDetection(Hollywood::gameDescriptions, plainGameDescriptors) {
@@ -273,19 +64,12 @@ public:
ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist,
ADDetectedGameExtraInfo **extra) const override {
- ADDetectedGame game = detectGameFilebased(allFiles, Hollywood::fileBasedFallback);
+ ADDetectedGame game = detectGameFilebased(allFiles, monstersFileBasedFallback);
if (!game.desc)
return ADDetectedGame();
- if (!hasValidResource000StartupLayout(allFiles))
- return ADDetectedGame();
-
- const Common::Platform platform = detectExecutablePlatform(allFiles);
- if (platform == Common::kPlatformWindows)
- game.desc = &Hollywood::fallbackWindowsDescription;
- else if (platform == Common::kPlatformDOS)
- game.desc = &Hollywood::fallbackDosDescription;
- else
+ game.desc = detectMonstersVariant(allFiles);
+ if (!game.desc)
return ADDetectedGame();
return game;
diff --git a/engines/hollywood/metaengine.cpp b/engines/hollywood/metaengine.cpp
index f296ba1bb92..044013ffa7f 100644
--- a/engines/hollywood/metaengine.cpp
+++ b/engines/hollywood/metaengine.cpp
@@ -21,32 +21,15 @@
#include "base/plugins.h"
#include "common/config-manager.h"
-#include "common/translation.h"
#include "engines/advancedDetector.h"
#include "graphics/thumbnail.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/detection.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/metaengine.h"
#include "hollywood/runaway/engine.h"
namespace Hollywood {
-const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_RESTORED_CONTENT,
- {
- _s("Enable restored content"),
- _s("Play optional content present in the game data but unused by the original release"),
- "restored_content",
- true,
- 0,
- 0
- }
- },
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
class HollywoodMetaEngine : public AdvancedMetaEngine<ADGameDescription> {
public:
const char *getName() const override {
@@ -54,7 +37,7 @@ public:
}
const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
- return optionsList;
+ return getMonstersExtraGuiOptions();
}
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
@@ -81,14 +64,13 @@ bool HollywoodMetaEngine::hasFeature(MetaEngineFeature f) const {
void HollywoodMetaEngine::registerDefaultSettings(const Common::String &) const {
ConfMan.registerDefault("subtitles", true);
- ConfMan.registerDefault("restored_content", true);
+ registerMonstersDefaultSettings();
}
void HollywoodMetaEngine::getSavegameThumbnail(Graphics::Surface &thumb) {
if (g_engine && ConfMan.get("gameid") == "hollywood") {
- HollywoodEngine *engine = (HollywoodEngine *)g_engine;
- if (engine->copyLastGameplayThumbnail(thumb))
- return;
+ getMonstersSavegameThumbnail(thumb);
+ return;
}
Graphics::createThumbnail(thumb);
diff --git a/engines/hollywood/module.mk b/engines/hollywood/module.mk
index 7f300860019..83064e6aeb7 100644
--- a/engines/hollywood/module.mk
+++ b/engines/hollywood/module.mk
@@ -1,144 +1,145 @@
MODULE := engines/hollywood
MODULE_OBJS = \
- console.o \
- font.o \
- game_strings.o \
- gameplay/actor_renderer.o \
- gameplay/cursor.o \
- gameplay/dialogue_menu.o \
- gameplay/frankenstein_reward.o \
- gameplay/game_loop.o \
- gameplay/hotspots.o \
- gameplay/inventory_media.o \
- gameplay/inventory_actions.o \
- gameplay/options_menu.o \
- gameplay/panel_art.o \
- gameplay/travel_screen.o \
- graphics.o \
- hollywood.o \
metaengine.o \
- music.o \
resource.o \
+ scene_text_store.o \
+ monsters/console.o \
+ monsters/font.o \
+ monsters/game_strings.o \
+ monsters/gameplay/actor_renderer.o \
+ monsters/gameplay/cursor.o \
+ monsters/gameplay/dialogue_menu.o \
+ monsters/gameplay/frankenstein_reward.o \
+ monsters/gameplay/game_loop.o \
+ monsters/gameplay/hotspots.o \
+ monsters/gameplay/inventory_media.o \
+ monsters/gameplay/inventory_actions.o \
+ monsters/gameplay/options_menu.o \
+ monsters/gameplay/panel_art.o \
+ monsters/gameplay/travel_screen.o \
+ monsters/graphics.o \
+ monsters/hollywood.o \
+ monsters/metaengine.o \
+ monsters/music.o \
+ monsters/saveload.o \
+ monsters/scenes/chapter_intro_scene.o \
+ monsters/scenes/presentation_scene.o \
+ monsters/scenes/resource_delta_clip_player.o \
+ monsters/scenes/scene_resources.o \
+ monsters/scenes/scene_registry.o \
+ monsters/scenes/shared_frame_sequences.o \
+ monsters/scenes/speech_overlay.o \
+ monsters/scenes/intro/scene1000.o \
+ monsters/scenes/intro/scene9000.o \
+ monsters/scenes/intro/demo_montage.o \
+ monsters/scenes/intro/scene9010.o \
+ monsters/scenes/intro/scene9030.o \
+ monsters/scenes/intro/scene9050.o \
+ monsters/scenes/intro/scene9090.o \
+ monsters/scenes/intro/scene9100.o \
+ monsters/scenes/intro/scene9110.o \
+ monsters/scenes/intro/scene9120.o \
+ monsters/scenes/intro/scene9130.o \
+ monsters/scenes/intro/scene9140.o \
+ monsters/scenes/intro/scene9150.o \
+ monsters/scenes/intro/scene9160.o \
+ monsters/scenes/intro/scene9170.o \
+ monsters/scenes/intro/scene9180.o \
+ monsters/scenes/playable/actor_path_controller.o \
+ monsters/scenes/playable/action_overlay_player.o \
+ monsters/scenes/playable/scene1010.o \
+ monsters/scenes/playable/scene1020.o \
+ monsters/scenes/playable/scene1030.o \
+ monsters/scenes/playable/scene1040.o \
+ monsters/scenes/playable/scene1050.o \
+ monsters/scenes/playable/scene1060.o \
+ monsters/scenes/playable/scene1070.o \
+ monsters/scenes/playable/scene1080.o \
+ monsters/scenes/playable/scene1090.o \
+ monsters/scenes/playable/scene2000.o \
+ monsters/scenes/playable/scene2010.o \
+ monsters/scenes/playable/scene2020.o \
+ monsters/scenes/playable/scene2030.o \
+ monsters/scenes/playable/scene2040.o \
+ monsters/scenes/playable/scene2050.o \
+ monsters/scenes/playable/scene2060.o \
+ monsters/scenes/playable/scene2070.o \
+ monsters/scenes/playable/scene2080.o \
+ monsters/scenes/playable/scene2090.o \
+ monsters/scenes/playable/scene2100.o \
+ monsters/scenes/playable/scene2110.o \
+ monsters/scenes/playable/scene3000.o \
+ monsters/scenes/playable/scene3010.o \
+ monsters/scenes/playable/scene3020.o \
+ monsters/scenes/playable/scene3030.o \
+ monsters/scenes/playable/scene3040.o \
+ monsters/scenes/playable/scene3050.o \
+ monsters/scenes/playable/scene3060.o \
+ monsters/scenes/playable/scene3070.o \
+ monsters/scenes/playable/scene3080.o \
+ monsters/scenes/playable/scene3090.o \
+ monsters/scenes/playable/scene3100.o \
+ monsters/scenes/playable/scene3110.o \
+ monsters/scenes/playable/scene4000.o \
+ monsters/scenes/playable/scene4010.o \
+ monsters/scenes/playable/scene4020.o \
+ monsters/scenes/playable/scene4030.o \
+ monsters/scenes/playable/scene4040.o \
+ monsters/scenes/playable/scene4050.o \
+ monsters/scenes/playable/scene4060.o \
+ monsters/scenes/playable/scene4070.o \
+ monsters/scenes/playable/scene4080.o \
+ monsters/scenes/playable/scene4090.o \
+ monsters/scenes/playable/scene4100.o \
+ monsters/scenes/playable/scene4110.o \
+ monsters/scenes/playable/scene5000.o \
+ monsters/scenes/playable/scene5010.o \
+ monsters/scenes/playable/scene5020.o \
+ monsters/scenes/playable/scene5030.o \
+ monsters/scenes/playable/scene5040.o \
+ monsters/scenes/playable/scene5050.o \
+ monsters/scenes/playable/scene5060.o \
+ monsters/scenes/playable/scene5070.o \
+ monsters/scenes/playable/scene5080.o \
+ monsters/scenes/playable/scene5090.o \
+ monsters/scenes/playable/scene5100.o \
+ monsters/scenes/playable/scene5110.o \
+ monsters/scenes/playable/scene5120.o \
+ monsters/scenes/playable/scene5130.o \
+ monsters/scenes/playable/scene6000.o \
+ monsters/scenes/playable/scene6010.o \
+ monsters/scenes/playable/scene6020.o \
+ monsters/scenes/playable/scene6030.o \
+ monsters/scenes/playable/scene6040.o \
+ monsters/scenes/playable/scene6050.o \
+ monsters/scenes/playable/scene6060.o \
+ monsters/scenes/playable/scene6070.o \
+ monsters/scenes/playable/scene6080.o \
+ monsters/scenes/playable/scene6090.o \
+ monsters/scenes/playable/scene6100.o \
+ monsters/scenes/playable/scene7000.o \
+ monsters/scenes/playable/scene7010.o \
+ monsters/scenes/playable/scene7020.o \
+ monsters/scenes/playable/scene7030.o \
+ monsters/scenes/playable/scene7040.o \
+ monsters/scenes/playable/scene7050.o \
+ monsters/scenes/playable/scene7060.o \
+ monsters/scenes/playable/scene7070.o \
+ monsters/scenes/playable/scene7080.o \
+ monsters/scenes/playable/scene7090.o \
+ monsters/scenes/playable/scene7100.o \
+ monsters/scenes/playable/scene8000.o \
+ monsters/scenes/playable/scene8010.o \
+ monsters/scenes/playable/scene8020.o \
+ monsters/scenes/playable/scene_surface_state.o \
+ monsters/scenes/playable/speech_controller.o \
+ monsters/scenes/playable/playable_scene.o \
+ monsters/scenes/playable/playable_scene_actions.o \
runaway/audio.o \
runaway/engine.o \
runaway/graphics.o \
- runaway/scene5030.o \
- saveload.o \
- scenes/chapter_intro_scene.o \
- scenes/presentation_scene.o \
- scenes/resource_delta_clip_player.o \
- scenes/scene_resources.o \
- scenes/scene_registry.o \
- scenes/scene_text_store.o \
- scenes/shared_frame_sequences.o \
- scenes/speech_overlay.o \
- scenes/intro/scene1000.o \
- scenes/intro/scene9000.o \
- scenes/intro/demo_montage.o \
- scenes/intro/scene9010.o \
- scenes/intro/scene9030.o \
- scenes/intro/scene9050.o \
- scenes/intro/scene9090.o \
- scenes/intro/scene9100.o \
- scenes/intro/scene9110.o \
- scenes/intro/scene9120.o \
- scenes/intro/scene9130.o \
- scenes/intro/scene9140.o \
- scenes/intro/scene9150.o \
- scenes/intro/scene9160.o \
- scenes/intro/scene9170.o \
- scenes/intro/scene9180.o \
- scenes/playable/actor_path_controller.o \
- scenes/playable/action_overlay_player.o \
- scenes/playable/scene1010.o \
- scenes/playable/scene1020.o \
- scenes/playable/scene1030.o \
- scenes/playable/scene1040.o \
- scenes/playable/scene1050.o \
- scenes/playable/scene1060.o \
- scenes/playable/scene1070.o \
- scenes/playable/scene1080.o \
- scenes/playable/scene1090.o \
- scenes/playable/scene2000.o \
- scenes/playable/scene2010.o \
- scenes/playable/scene2020.o \
- scenes/playable/scene2030.o \
- scenes/playable/scene2040.o \
- scenes/playable/scene2050.o \
- scenes/playable/scene2060.o \
- scenes/playable/scene2070.o \
- scenes/playable/scene2080.o \
- scenes/playable/scene2090.o \
- scenes/playable/scene2100.o \
- scenes/playable/scene2110.o \
- scenes/playable/scene3000.o \
- scenes/playable/scene3010.o \
- scenes/playable/scene3020.o \
- scenes/playable/scene3030.o \
- scenes/playable/scene3040.o \
- scenes/playable/scene3050.o \
- scenes/playable/scene3060.o \
- scenes/playable/scene3070.o \
- scenes/playable/scene3080.o \
- scenes/playable/scene3090.o \
- scenes/playable/scene3100.o \
- scenes/playable/scene3110.o \
- scenes/playable/scene4000.o \
- scenes/playable/scene4010.o \
- scenes/playable/scene4020.o \
- scenes/playable/scene4030.o \
- scenes/playable/scene4040.o \
- scenes/playable/scene4050.o \
- scenes/playable/scene4060.o \
- scenes/playable/scene4070.o \
- scenes/playable/scene4080.o \
- scenes/playable/scene4090.o \
- scenes/playable/scene4100.o \
- scenes/playable/scene4110.o \
- scenes/playable/scene5000.o \
- scenes/playable/scene5010.o \
- scenes/playable/scene5020.o \
- scenes/playable/scene5030.o \
- scenes/playable/scene5040.o \
- scenes/playable/scene5050.o \
- scenes/playable/scene5060.o \
- scenes/playable/scene5070.o \
- scenes/playable/scene5080.o \
- scenes/playable/scene5090.o \
- scenes/playable/scene5100.o \
- scenes/playable/scene5110.o \
- scenes/playable/scene5120.o \
- scenes/playable/scene5130.o \
- scenes/playable/scene6000.o \
- scenes/playable/scene6010.o \
- scenes/playable/scene6020.o \
- scenes/playable/scene6030.o \
- scenes/playable/scene6040.o \
- scenes/playable/scene6050.o \
- scenes/playable/scene6060.o \
- scenes/playable/scene6070.o \
- scenes/playable/scene6080.o \
- scenes/playable/scene6090.o \
- scenes/playable/scene6100.o \
- scenes/playable/scene7000.o \
- scenes/playable/scene7010.o \
- scenes/playable/scene7020.o \
- scenes/playable/scene7030.o \
- scenes/playable/scene7040.o \
- scenes/playable/scene7050.o \
- scenes/playable/scene7060.o \
- scenes/playable/scene7070.o \
- scenes/playable/scene7080.o \
- scenes/playable/scene7090.o \
- scenes/playable/scene7100.o \
- scenes/playable/scene8000.o \
- scenes/playable/scene8010.o \
- scenes/playable/scene8020.o \
- scenes/playable/scene_surface_state.o \
- scenes/playable/speech_controller.o \
- scenes/playable/playable_scene.o \
- scenes/playable/playable_scene_actions.o
+ runaway/scene5030.o
# This module can be built as a plugin
ifeq ($(ENABLE_HOLLYWOOD), DYNAMIC_PLUGIN)
@@ -149,4 +150,4 @@ endif
include $(srcdir)/rules.mk
# Detection objects
-DETECT_OBJS += $(MODULE)/detection.o
+DETECT_OBJS += $(MODULE)/detection.o $(MODULE)/monsters/detection.o
diff --git a/engines/hollywood/console.cpp b/engines/hollywood/monsters/console.cpp
similarity index 97%
rename from engines/hollywood/console.cpp
rename to engines/hollywood/monsters/console.cpp
index 467537db0b9..c23211cc7c9 100644
--- a/engines/hollywood/console.cpp
+++ b/engines/hollywood/monsters/console.cpp
@@ -22,11 +22,11 @@
#include "common/str.h"
#include "common/util.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/console.h"
-#include "hollywood/gameplay/frankenstein_reward.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/scenes/scene_registry.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/console.h"
+#include "hollywood/monsters/gameplay/frankenstein_reward.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/scenes/scene_registry.h"
namespace Hollywood {
diff --git a/engines/hollywood/console.h b/engines/hollywood/monsters/console.h
similarity index 91%
rename from engines/hollywood/console.h
rename to engines/hollywood/monsters/console.h
index b22f4035823..72948c7ea13 100644
--- a/engines/hollywood/console.h
+++ b/engines/hollywood/monsters/console.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_CONSOLE_H
-#define HOLLYWOOD_CONSOLE_H
+#ifndef HOLLYWOOD_MONSTERS_CONSOLE_H
+#define HOLLYWOOD_MONSTERS_CONSOLE_H
#include "gui/debugger.h"
@@ -45,4 +45,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_CONSOLE_H
+#endif // HOLLYWOOD_MONSTERS_CONSOLE_H
diff --git a/engines/hollywood/monsters/detection.cpp b/engines/hollywood/monsters/detection.cpp
new file mode 100644
index 00000000000..47b13278f7c
--- /dev/null
+++ b/engines/hollywood/monsters/detection.cpp
@@ -0,0 +1,160 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/file.h"
+
+#include "hollywood/monsters/detection.h"
+#include "hollywood/monsters/graphics.h"
+
+namespace Hollywood {
+namespace {
+
+const ADGameDescription fallbackWindowsDescription = {
+ "hollywood",
+ "",
+ AD_ENTRY1(nullptr, nullptr),
+ Common::UNK_LANG,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO2(GAMEOPTION_RESTORED_CONTENT, GUIO_NOMIDI)
+};
+
+const ADGameDescription fallbackDosDescription = {
+ "hollywood",
+ "Unknown DOS version",
+ AD_ENTRY1(nullptr, nullptr),
+ Common::UNK_LANG,
+ Common::kPlatformDOS,
+ ADGF_UNSTABLE,
+ GUIO2(GAMEOPTION_RESTORED_CONTENT, GUIO_NOMIDI)
+};
+
+
+enum Resource000FallbackEntry {
+ kFallbackOptionsFramebufferEntry = 0x2a,
+ kFallbackInventoryPagesEntry = 0x2b,
+ kFallbackBottomPanelEntry = 0x2c,
+ kFallbackDialoguePanelEntry = 0x2f,
+ kFallbackObjectPaletteEntry = 0x31
+};
+
+const uint kFallbackResource000HeaderByteCount = 1;
+const uint kFallbackResource000OffsetTableSize = 400;
+const uint kFallbackResource000SizeTableSize = 400;
+const uint kFallbackMinimumInventoryPagesSize = 0x7e000;
+const uint kFallbackMinimumBottomPanelSize = 0x41d8;
+const uint kFallbackMinimumDialoguePanelSourceSize = 45 * 1024;
+const uint kFallbackObjectPaletteSize = 0x60;
+
+bool readResource000Entry(Common::File &file, uint entryIndex, uint32 &offset, uint32 &size) {
+ const uint offsetTablePosition = kFallbackResource000HeaderByteCount + entryIndex * 4;
+ const uint sizeTablePosition = kFallbackResource000HeaderByteCount +
+ kFallbackResource000OffsetTableSize + entryIndex * 4;
+ if (sizeTablePosition + 4 > (uint32)file.size())
+ return false;
+
+ file.seek(offsetTablePosition);
+ offset = file.readUint32LE();
+ file.seek(sizeTablePosition);
+ size = file.readUint32LE();
+
+ return !file.err() && size != 0 && offset <= (uint32)file.size() &&
+ size <= (uint32)file.size() - offset;
+}
+
+bool hasResource000Entry(Common::File &file, uint entryIndex, uint32 minimumSize) {
+ uint32 offset = 0;
+ uint32 size = 0;
+ return readResource000Entry(file, entryIndex, offset, size) && size >= minimumSize;
+}
+
+bool hasValidResource000StartupLayout(const AdvancedMetaEngineBase::FileMap &allFiles) {
+ if (!allFiles.contains("RESOURCE.000"))
+ return false;
+
+ Common::File file;
+ if (!file.open(allFiles["RESOURCE.000"]))
+ return false;
+
+ const uint32 startupTablesSize = kFallbackResource000HeaderByteCount +
+ kFallbackResource000OffsetTableSize + kFallbackResource000SizeTableSize;
+ if ((uint32)file.size() < startupTablesSize)
+ return false;
+
+ if (!hasResource000Entry(file, kFallbackOptionsFramebufferEntry, kSceneBufferByteCount))
+ return false;
+ if (!hasResource000Entry(file, kFallbackInventoryPagesEntry, kFallbackMinimumInventoryPagesSize))
+ return false;
+ if (!hasResource000Entry(file, kFallbackBottomPanelEntry, kFallbackMinimumBottomPanelSize))
+ return false;
+ if (!hasResource000Entry(file, kFallbackDialoguePanelEntry, kFallbackMinimumDialoguePanelSourceSize))
+ return false;
+ if (!hasResource000Entry(file, kFallbackObjectPaletteEntry, kFallbackObjectPaletteSize))
+ return false;
+
+ return true;
+}
+
+Common::Platform detectExecutablePlatform(const AdvancedMetaEngineBase::FileMap &allFiles) {
+ if (!allFiles.contains("MONSTERS.EXE"))
+ return Common::kPlatformUnknown;
+
+ Common::File file;
+ if (!file.open(allFiles["MONSTERS.EXE"]) || file.size() < 0x40)
+ return Common::kPlatformUnknown;
+
+ file.seek(0);
+ const byte mzHeader[2] = { file.readByte(), file.readByte() };
+ if (mzHeader[0] != 'M' || mzHeader[1] != 'Z')
+ return Common::kPlatformUnknown;
+
+ file.seek(0x3c);
+ const uint32 peHeaderOffset = file.readUint32LE();
+ if (peHeaderOffset + 4 <= (uint32)file.size()) {
+ file.seek(peHeaderOffset);
+ if (file.readByte() == 'P' && file.readByte() == 'E' &&
+ file.readByte() == 0 && file.readByte() == 0)
+ return Common::kPlatformWindows;
+ }
+
+ return Common::kPlatformDOS;
+}
+
+} // End of anonymous namespace
+
+const ADFileBasedFallback monstersFileBasedFallback[] = {
+ { &fallbackDosDescription, { "MONSTERS.EXE", "RESOURCE.000", "RESOURCE.003", "RESOURCE.004", nullptr } },
+ { nullptr, { nullptr } }
+};
+
+const ADGameDescription *detectMonstersVariant(const AdvancedMetaEngineBase::FileMap &allFiles) {
+ if (!hasValidResource000StartupLayout(allFiles))
+ return nullptr;
+
+ const Common::Platform platform = detectExecutablePlatform(allFiles);
+ if (platform == Common::kPlatformWindows)
+ return &fallbackWindowsDescription;
+ if (platform == Common::kPlatformDOS)
+ return &fallbackDosDescription;
+ return nullptr;
+}
+
+} // End of namespace Hollywood
diff --git a/engines/hollywood/detection.h b/engines/hollywood/monsters/detection.h
similarity index 74%
rename from engines/hollywood/detection.h
rename to engines/hollywood/monsters/detection.h
index 3dc233f632a..2ef23863048 100644
--- a/engines/hollywood/detection.h
+++ b/engines/hollywood/monsters/detection.h
@@ -19,11 +19,18 @@
*
*/
-#ifndef HOLLYWOOD_DETECTION_H
-#define HOLLYWOOD_DETECTION_H
+#ifndef HOLLYWOOD_MONSTERS_DETECTION_H
+#define HOLLYWOOD_MONSTERS_DETECTION_H
#include "engines/advancedDetector.h"
#define GAMEOPTION_RESTORED_CONTENT GUIO_GAMEOPTIONS1
-#endif
+namespace Hollywood {
+
+extern const ADFileBasedFallback monstersFileBasedFallback[];
+const ADGameDescription *detectMonstersVariant(const AdvancedMetaEngineBase::FileMap &allFiles);
+
+} // End of namespace Hollywood
+
+#endif // HOLLYWOOD_MONSTERS_DETECTION_H
diff --git a/engines/hollywood/monsters/detection_tables.h b/engines/hollywood/monsters/detection_tables.h
new file mode 100644
index 00000000000..8831419ef9d
--- /dev/null
+++ b/engines/hollywood/monsters/detection_tables.h
@@ -0,0 +1,108 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef HOLLYWOOD_MONSTERS_DETECTION_TABLES_H
+#define HOLLYWOOD_MONSTERS_DETECTION_TABLES_H
+
+// Included in the shared ADGameDescription array in hollywood/detection.cpp.
+ // Spanish DOS demo.
+ {
+ "hollywood",
+ "Demo",
+ AD_ENTRY4s("MONSTERS.EXE", "54a1e8749448e08086a1929510ec4b6a", 1027587,
+ "RESOURCE.000", "0f86d33d0519b0dcef62de5f46754e85", 4348283,
+ "RESOURCE.M04", "396d3a7cbe11f14747cdc52f1ac038ba", 2286658,
+ "RESOURCE.S0D", "96bba558e5508affca4ffab8d546de83", 1408634),
+ Common::ES_ESP,
+ Common::kPlatformDOS,
+ ADGF_DEMO | ADGF_UNSTABLE,
+ GUIO2(GAMEOPTION_RESTORED_CONTENT, GUIO_NOMIDI)
+ },
+
+ // Italian Windows demo distributed with the Italian release.
+ {
+ "hollywood",
+ "Demo",
+ AD_ENTRY4s("MONSTERS.EXE", "fd174231edb65bafcaea04c911c2d4bb", 671232,
+ "RESOURCE.000", "b16a8300ca1af75a0322e443a8971159", 3662162,
+ "RESOURCE.003", "cd0ecdca8faaf56c905e0b52d025c8e4", 2185543,
+ "RESOURCE.S0D", "96bba558e5508affca4ffab8d546de83", 1408634),
+ Common::IT_ITA,
+ Common::kPlatformWindows,
+ ADGF_DEMO | ADGF_UNSTABLE,
+ GUIO3(GAMEOPTION_RESTORED_CONTENT, GUIO_NOMIDI, GUIO_NOSPEECH)
+ },
+
+ // Spanish Windows first edition full game, installed MONSTERS directory.
+ {
+ "hollywood",
+ "1st edition",
+ AD_ENTRY4s("MONSTERS.EXE", "1129cea40124683fc4aabaeaf6478f5a", 1167360,
+ "RESOURCE.000", "b16a8300ca1af75a0322e443a8971159", 3662162,
+ "RESOURCE.003", "352126965c51832ce970faece65cc2f8", 9444153,
+ "RESOURCE.004", "a79d937879665b899c255957c7310d42", 265002432),
+ Common::ES_ESP,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO2(GAMEOPTION_RESTORED_CONTENT, GUIO_NOMIDI)
+ },
+
+ // Italian Windows full game, installed Monsters directory.
+ {
+ "hollywood",
+ nullptr,
+ AD_ENTRY4s("MONSTERS.EXE", "d047170b3a143eaef506dec2f18fe993", 1559552,
+ "RESOURCE.000", "b16a8300ca1af75a0322e443a8971159", 3662162,
+ "RESOURCE.003", "72475bb0eff3f4920452342537584569", 9444153,
+ "RESOURCE.004", "fb9f09029e73eb5ee708b995db9823d0", 256474138),
+ Common::IT_ITA,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO2(GAMEOPTION_RESTORED_CONTENT, GUIO_NOMIDI)
+ },
+
+ // Spanish Windows full game, installed MONSTERS directory.
+ {
+ "hollywood",
+ nullptr,
+ AD_ENTRY3s("MONSTERS.EXE", "5b097e04e6ca7225d9dea6cd99909f6d", 1431552,
+ "RESOURCE.000", "bf580b6b3eedf45e427bb83ab29ccd21", 4320424,
+ "RESOURCE.003", "352126965c51832ce970faece65cc2f8", 9444153),
+ Common::ES_ESP,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO2(GAMEOPTION_RESTORED_CONTENT, GUIO_NOMIDI)
+ },
+
+ // Spanish DOS CD full game, MONSTERS directory from the CD.
+ {
+ "hollywood",
+ nullptr,
+ AD_ENTRY3s("MONSTERS.EXE", "54a1e8749448e08086a1929510ec4b6a", 2513867,
+ "RESOURCE.000", "bf580b6b3eedf45e427bb83ab29ccd21", 4320424,
+ "RESOURCE.003", "352126965c51832ce970faece65cc2f8", 9444153),
+ Common::ES_ESP,
+ Common::kPlatformDOS,
+ ADGF_UNSTABLE,
+ GUIO2(GAMEOPTION_RESTORED_CONTENT, GUIO_NOMIDI)
+ },
+
+#endif // HOLLYWOOD_MONSTERS_DETECTION_TABLES_H
diff --git a/engines/hollywood/font.cpp b/engines/hollywood/monsters/font.cpp
similarity index 99%
rename from engines/hollywood/font.cpp
rename to engines/hollywood/monsters/font.cpp
index 3548e7f2405..39eeda4d8b7 100644
--- a/engines/hollywood/font.cpp
+++ b/engines/hollywood/monsters/font.cpp
@@ -26,7 +26,7 @@
#include "graphics/surface.h"
#include "hollywood/debug.h"
-#include "hollywood/font.h"
+#include "hollywood/monsters/font.h"
namespace Hollywood {
diff --git a/engines/hollywood/font.h b/engines/hollywood/monsters/font.h
similarity index 95%
rename from engines/hollywood/font.h
rename to engines/hollywood/monsters/font.h
index 3443ce8b37e..e2d8cc7d00b 100644
--- a/engines/hollywood/font.h
+++ b/engines/hollywood/monsters/font.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_FONT_H
-#define HOLLYWOOD_FONT_H
+#ifndef HOLLYWOOD_MONSTERS_FONT_H
+#define HOLLYWOOD_MONSTERS_FONT_H
#include "common/array.h"
#include "common/path.h"
@@ -68,4 +68,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_FONT_H
+#endif // HOLLYWOOD_MONSTERS_FONT_H
diff --git a/engines/hollywood/game_strings.cpp b/engines/hollywood/monsters/game_strings.cpp
similarity index 98%
rename from engines/hollywood/game_strings.cpp
rename to engines/hollywood/monsters/game_strings.cpp
index d982944d518..44d0dbda9d1 100644
--- a/engines/hollywood/game_strings.cpp
+++ b/engines/hollywood/monsters/game_strings.cpp
@@ -19,7 +19,7 @@
*
*/
-#include "hollywood/game_strings.h"
+#include "hollywood/monsters/game_strings.h"
namespace Hollywood {
diff --git a/engines/hollywood/game_strings.h b/engines/hollywood/monsters/game_strings.h
similarity index 95%
rename from engines/hollywood/game_strings.h
rename to engines/hollywood/monsters/game_strings.h
index 2f7cbed17f1..23c0efd3ffc 100644
--- a/engines/hollywood/game_strings.h
+++ b/engines/hollywood/monsters/game_strings.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_GAME_STRINGS_H
-#define HOLLYWOOD_GAME_STRINGS_H
+#ifndef HOLLYWOOD_MONSTERS_GAME_STRINGS_H
+#define HOLLYWOOD_MONSTERS_GAME_STRINGS_H
#include "common/language.h"
@@ -79,4 +79,4 @@ const HollywoodGameStrings &getGameStrings(Common::Language language);
} // End of namespace Hollywood
-#endif // HOLLYWOOD_GAME_STRINGS_H
+#endif // HOLLYWOOD_MONSTERS_GAME_STRINGS_H
diff --git a/engines/hollywood/gameplay/actor_renderer.cpp b/engines/hollywood/monsters/gameplay/actor_renderer.cpp
similarity index 99%
rename from engines/hollywood/gameplay/actor_renderer.cpp
rename to engines/hollywood/monsters/gameplay/actor_renderer.cpp
index 7cd1e32103b..febeb359132 100644
--- a/engines/hollywood/gameplay/actor_renderer.cpp
+++ b/engines/hollywood/monsters/gameplay/actor_renderer.cpp
@@ -21,8 +21,8 @@
#include "graphics/surface.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/actor_renderer.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/actor_renderer.h"
namespace Hollywood {
diff --git a/engines/hollywood/gameplay/actor_renderer.h b/engines/hollywood/monsters/gameplay/actor_renderer.h
similarity index 94%
rename from engines/hollywood/gameplay/actor_renderer.h
rename to engines/hollywood/monsters/gameplay/actor_renderer.h
index c856d2afb7f..5fa0df8ef29 100644
--- a/engines/hollywood/gameplay/actor_renderer.h
+++ b/engines/hollywood/monsters/gameplay/actor_renderer.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_GAMEPLAY_ACTOR_RENDERER_H
-#define HOLLYWOOD_GAMEPLAY_ACTOR_RENDERER_H
+#ifndef HOLLYWOOD_MONSTERS_GAMEPLAY_ACTOR_RENDERER_H
+#define HOLLYWOOD_MONSTERS_GAMEPLAY_ACTOR_RENDERER_H
#include "common/array.h"
#include "common/types.h"
@@ -70,4 +70,4 @@ void buildPresentationPaletteRemapTable(const Common::Array<byte> &palette, Comm
} // End of namespace Hollywood
-#endif // HOLLYWOOD_GAMEPLAY_ACTOR_RENDERER_H
+#endif // HOLLYWOOD_MONSTERS_GAMEPLAY_ACTOR_RENDERER_H
diff --git a/engines/hollywood/gameplay/cursor.cpp b/engines/hollywood/monsters/gameplay/cursor.cpp
similarity index 99%
rename from engines/hollywood/gameplay/cursor.cpp
rename to engines/hollywood/monsters/gameplay/cursor.cpp
index cf51434e13d..79eec05d7e6 100644
--- a/engines/hollywood/gameplay/cursor.cpp
+++ b/engines/hollywood/monsters/gameplay/cursor.cpp
@@ -28,7 +28,7 @@
#include "graphics/cursorman.h"
#include "graphics/wincursor.h"
-#include "hollywood/gameplay/cursor.h"
+#include "hollywood/monsters/gameplay/cursor.h"
namespace Hollywood {
diff --git a/engines/hollywood/gameplay/cursor.h b/engines/hollywood/monsters/gameplay/cursor.h
similarity index 92%
rename from engines/hollywood/gameplay/cursor.h
rename to engines/hollywood/monsters/gameplay/cursor.h
index 8623520142d..08aa25c2536 100644
--- a/engines/hollywood/gameplay/cursor.h
+++ b/engines/hollywood/monsters/gameplay/cursor.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_GAMEPLAY_CURSOR_H
-#define HOLLYWOOD_GAMEPLAY_CURSOR_H
+#ifndef HOLLYWOOD_MONSTERS_GAMEPLAY_CURSOR_H
+#define HOLLYWOOD_MONSTERS_GAMEPLAY_CURSOR_H
#include "common/array.h"
#include "common/types.h"
@@ -69,4 +69,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_GAMEPLAY_CURSOR_H
+#endif // HOLLYWOOD_MONSTERS_GAMEPLAY_CURSOR_H
diff --git a/engines/hollywood/gameplay/dialogue_menu.cpp b/engines/hollywood/monsters/gameplay/dialogue_menu.cpp
similarity index 98%
rename from engines/hollywood/gameplay/dialogue_menu.cpp
rename to engines/hollywood/monsters/gameplay/dialogue_menu.cpp
index f74e552077d..1a461e9285e 100644
--- a/engines/hollywood/gameplay/dialogue_menu.cpp
+++ b/engines/hollywood/monsters/gameplay/dialogue_menu.cpp
@@ -22,10 +22,10 @@
#include "common/events.h"
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/font.h"
-#include "hollywood/gameplay/cursor.h"
-#include "hollywood/gameplay/dialogue_menu.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/font.h"
+#include "hollywood/monsters/gameplay/cursor.h"
+#include "hollywood/monsters/gameplay/dialogue_menu.h"
namespace Hollywood {
diff --git a/engines/hollywood/gameplay/dialogue_menu.h b/engines/hollywood/monsters/gameplay/dialogue_menu.h
similarity index 95%
rename from engines/hollywood/gameplay/dialogue_menu.h
rename to engines/hollywood/monsters/gameplay/dialogue_menu.h
index 4580404e67b..ddd2c35a1b4 100644
--- a/engines/hollywood/gameplay/dialogue_menu.h
+++ b/engines/hollywood/monsters/gameplay/dialogue_menu.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_GAMEPLAY_DIALOGUE_MENU_H
-#define HOLLYWOOD_GAMEPLAY_DIALOGUE_MENU_H
+#ifndef HOLLYWOOD_MONSTERS_GAMEPLAY_DIALOGUE_MENU_H
+#define HOLLYWOOD_MONSTERS_GAMEPLAY_DIALOGUE_MENU_H
#include "common/array.h"
#include "common/str.h"
@@ -116,4 +116,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_GAMEPLAY_DIALOGUE_MENU_H
+#endif // HOLLYWOOD_MONSTERS_GAMEPLAY_DIALOGUE_MENU_H
diff --git a/engines/hollywood/gameplay/frankenstein_reward.cpp b/engines/hollywood/monsters/gameplay/frankenstein_reward.cpp
similarity index 95%
rename from engines/hollywood/gameplay/frankenstein_reward.cpp
rename to engines/hollywood/monsters/gameplay/frankenstein_reward.cpp
index e4f56caf5ad..6940ab71441 100644
--- a/engines/hollywood/gameplay/frankenstein_reward.cpp
+++ b/engines/hollywood/monsters/gameplay/frankenstein_reward.cpp
@@ -19,7 +19,7 @@
*
*/
-#include "hollywood/gameplay/frankenstein_reward.h"
+#include "hollywood/monsters/gameplay/frankenstein_reward.h"
namespace Hollywood {
diff --git a/engines/hollywood/gameplay/frankenstein_reward.h b/engines/hollywood/monsters/gameplay/frankenstein_reward.h
similarity index 87%
rename from engines/hollywood/gameplay/frankenstein_reward.h
rename to engines/hollywood/monsters/gameplay/frankenstein_reward.h
index c69938b6846..2321fbb9532 100644
--- a/engines/hollywood/gameplay/frankenstein_reward.h
+++ b/engines/hollywood/monsters/gameplay/frankenstein_reward.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_GAMEPLAY_FRANKENSTEIN_REWARD_H
-#define HOLLYWOOD_GAMEPLAY_FRANKENSTEIN_REWARD_H
+#ifndef HOLLYWOOD_MONSTERS_GAMEPLAY_FRANKENSTEIN_REWARD_H
+#define HOLLYWOOD_MONSTERS_GAMEPLAY_FRANKENSTEIN_REWARD_H
#include "common/types.h"
@@ -36,4 +36,4 @@ extern const byte kFrankensteinPartItems[kFrankensteinPartCount];
} // End of namespace Hollywood
-#endif // HOLLYWOOD_GAMEPLAY_FRANKENSTEIN_REWARD_H
+#endif // HOLLYWOOD_MONSTERS_GAMEPLAY_FRANKENSTEIN_REWARD_H
diff --git a/engines/hollywood/gameplay/game_loop.cpp b/engines/hollywood/monsters/gameplay/game_loop.cpp
similarity index 99%
rename from engines/hollywood/gameplay/game_loop.cpp
rename to engines/hollywood/monsters/gameplay/game_loop.cpp
index 2d731fe247a..e9b2397a81d 100644
--- a/engines/hollywood/gameplay/game_loop.cpp
+++ b/engines/hollywood/monsters/gameplay/game_loop.cpp
@@ -23,13 +23,13 @@
#include "common/events.h"
#include "common/system.h"
-#include "hollywood/hollywood.h"
+#include "hollywood/monsters/hollywood.h"
#include "hollywood/debug.h"
-#include "hollywood/game_strings.h"
-#include "hollywood/gameplay/game_loop.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/gameplay/inventory_actions.h"
-#include "hollywood/gameplay/options_menu.h"
+#include "hollywood/monsters/game_strings.h"
+#include "hollywood/monsters/gameplay/game_loop.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/gameplay/inventory_actions.h"
+#include "hollywood/monsters/gameplay/options_menu.h"
namespace Hollywood {
diff --git a/engines/hollywood/gameplay/game_loop.h b/engines/hollywood/monsters/gameplay/game_loop.h
similarity index 97%
rename from engines/hollywood/gameplay/game_loop.h
rename to engines/hollywood/monsters/gameplay/game_loop.h
index 8bde939fed1..7638d729c19 100644
--- a/engines/hollywood/gameplay/game_loop.h
+++ b/engines/hollywood/monsters/gameplay/game_loop.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_GAMEPLAY_GAME_LOOP_H
-#define HOLLYWOOD_GAMEPLAY_GAME_LOOP_H
+#ifndef HOLLYWOOD_MONSTERS_GAMEPLAY_GAME_LOOP_H
+#define HOLLYWOOD_MONSTERS_GAMEPLAY_GAME_LOOP_H
#include "common/array.h"
#include "common/keyboard.h"
@@ -28,7 +28,7 @@
#include "common/str.h"
#include "common/types.h"
-#include "hollywood/gameplay/hotspots.h"
+#include "hollywood/monsters/gameplay/hotspots.h"
namespace Graphics {
struct Surface;
@@ -185,4 +185,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_GAMEPLAY_GAME_LOOP_H
+#endif // HOLLYWOOD_MONSTERS_GAMEPLAY_GAME_LOOP_H
diff --git a/engines/hollywood/gameplay/game_state.h b/engines/hollywood/monsters/gameplay/game_state.h
similarity index 99%
rename from engines/hollywood/gameplay/game_state.h
rename to engines/hollywood/monsters/gameplay/game_state.h
index a17927f0aaf..3a34b27e85e 100644
--- a/engines/hollywood/gameplay/game_state.h
+++ b/engines/hollywood/monsters/gameplay/game_state.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_GAMEPLAY_GAME_STATE_H
-#define HOLLYWOOD_GAMEPLAY_GAME_STATE_H
+#ifndef HOLLYWOOD_MONSTERS_GAMEPLAY_GAME_STATE_H
+#define HOLLYWOOD_MONSTERS_GAMEPLAY_GAME_STATE_H
#include "common/scummsys.h"
@@ -1219,4 +1219,4 @@ struct GameplayState {
} // End of namespace Hollywood
-#endif // HOLLYWOOD_GAMEPLAY_GAME_STATE_H
+#endif // HOLLYWOOD_MONSTERS_GAMEPLAY_GAME_STATE_H
diff --git a/engines/hollywood/gameplay/hotspots.cpp b/engines/hollywood/monsters/gameplay/hotspots.cpp
similarity index 98%
rename from engines/hollywood/gameplay/hotspots.cpp
rename to engines/hollywood/monsters/gameplay/hotspots.cpp
index 4a387b1388f..c53a400c05a 100644
--- a/engines/hollywood/gameplay/hotspots.cpp
+++ b/engines/hollywood/monsters/gameplay/hotspots.cpp
@@ -21,11 +21,11 @@
#include "graphics/surface.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/font.h"
-#include "hollywood/game_strings.h"
-#include "hollywood/gameplay/hotspots.h"
-#include "hollywood/graphics.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/font.h"
+#include "hollywood/monsters/game_strings.h"
+#include "hollywood/monsters/gameplay/hotspots.h"
+#include "hollywood/monsters/graphics.h"
namespace Hollywood {
diff --git a/engines/hollywood/gameplay/hotspots.h b/engines/hollywood/monsters/gameplay/hotspots.h
similarity index 96%
rename from engines/hollywood/gameplay/hotspots.h
rename to engines/hollywood/monsters/gameplay/hotspots.h
index d9c775bbea6..426bae2ec0c 100644
--- a/engines/hollywood/gameplay/hotspots.h
+++ b/engines/hollywood/monsters/gameplay/hotspots.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_GAMEPLAY_HOTSPOTS_H
-#define HOLLYWOOD_GAMEPLAY_HOTSPOTS_H
+#ifndef HOLLYWOOD_MONSTERS_GAMEPLAY_HOTSPOTS_H
+#define HOLLYWOOD_MONSTERS_GAMEPLAY_HOTSPOTS_H
#include "common/array.h"
#include "common/language.h"
@@ -28,7 +28,7 @@
#include "common/str.h"
#include "common/types.h"
-#include "hollywood/scenes/scene_data.h"
+#include "hollywood/monsters/scenes/scene_data.h"
namespace Graphics {
struct Surface;
@@ -164,4 +164,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_GAMEPLAY_HOTSPOTS_H
+#endif // HOLLYWOOD_MONSTERS_GAMEPLAY_HOTSPOTS_H
diff --git a/engines/hollywood/gameplay/inventory_actions.cpp b/engines/hollywood/monsters/gameplay/inventory_actions.cpp
similarity index 99%
rename from engines/hollywood/gameplay/inventory_actions.cpp
rename to engines/hollywood/monsters/gameplay/inventory_actions.cpp
index 002fb59638b..601297a0633 100644
--- a/engines/hollywood/gameplay/inventory_actions.cpp
+++ b/engines/hollywood/monsters/gameplay/inventory_actions.cpp
@@ -22,12 +22,12 @@
#include "common/events.h"
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/cursor.h"
-#include "hollywood/gameplay/game_loop.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/gameplay/inventory_actions.h"
-#include "hollywood/gameplay/inventory_media.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/cursor.h"
+#include "hollywood/monsters/gameplay/game_loop.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/gameplay/inventory_actions.h"
+#include "hollywood/monsters/gameplay/inventory_media.h"
namespace Hollywood {
diff --git a/engines/hollywood/gameplay/inventory_actions.h b/engines/hollywood/monsters/gameplay/inventory_actions.h
similarity index 89%
rename from engines/hollywood/gameplay/inventory_actions.h
rename to engines/hollywood/monsters/gameplay/inventory_actions.h
index d0ddc176437..c0e781166a3 100644
--- a/engines/hollywood/gameplay/inventory_actions.h
+++ b/engines/hollywood/monsters/gameplay/inventory_actions.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_GAMEPLAY_INVENTORY_ACTIONS_H
-#define HOLLYWOOD_GAMEPLAY_INVENTORY_ACTIONS_H
+#ifndef HOLLYWOOD_MONSTERS_GAMEPLAY_INVENTORY_ACTIONS_H
+#define HOLLYWOOD_MONSTERS_GAMEPLAY_INVENTORY_ACTIONS_H
#include "common/types.h"
@@ -39,4 +39,4 @@ bool dispatchSharedInventoryAction(HollywoodEngine *vm, GameplayLoopDelegate *de
} // End of namespace Hollywood
-#endif // HOLLYWOOD_GAMEPLAY_INVENTORY_ACTIONS_H
+#endif // HOLLYWOOD_MONSTERS_GAMEPLAY_INVENTORY_ACTIONS_H
diff --git a/engines/hollywood/gameplay/inventory_media.cpp b/engines/hollywood/monsters/gameplay/inventory_media.cpp
similarity index 97%
rename from engines/hollywood/gameplay/inventory_media.cpp
rename to engines/hollywood/monsters/gameplay/inventory_media.cpp
index 111d79b89bf..52652cdb980 100644
--- a/engines/hollywood/gameplay/inventory_media.cpp
+++ b/engines/hollywood/monsters/gameplay/inventory_media.cpp
@@ -24,8 +24,8 @@
#include "common/stream.h"
#include "common/textconsole.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/inventory_media.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/inventory_media.h"
#include "hollywood/resource.h"
namespace Hollywood {
diff --git a/engines/hollywood/gameplay/inventory_media.h b/engines/hollywood/monsters/gameplay/inventory_media.h
similarity index 90%
rename from engines/hollywood/gameplay/inventory_media.h
rename to engines/hollywood/monsters/gameplay/inventory_media.h
index 9beb608fdac..82caa08e35e 100644
--- a/engines/hollywood/gameplay/inventory_media.h
+++ b/engines/hollywood/monsters/gameplay/inventory_media.h
@@ -19,13 +19,13 @@
*
*/
-#ifndef HOLLYWOOD_GAMEPLAY_INVENTORY_MEDIA_H
-#define HOLLYWOOD_GAMEPLAY_INVENTORY_MEDIA_H
+#ifndef HOLLYWOOD_MONSTERS_GAMEPLAY_INVENTORY_MEDIA_H
+#define HOLLYWOOD_MONSTERS_GAMEPLAY_INVENTORY_MEDIA_H
#include "common/array.h"
#include "common/types.h"
-#include "hollywood/graphics.h"
+#include "hollywood/monsters/graphics.h"
namespace Graphics {
struct Surface;
@@ -74,4 +74,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_GAMEPLAY_INVENTORY_MEDIA_H
+#endif // HOLLYWOOD_MONSTERS_GAMEPLAY_INVENTORY_MEDIA_H
diff --git a/engines/hollywood/gameplay/options_menu.cpp b/engines/hollywood/monsters/gameplay/options_menu.cpp
similarity index 99%
rename from engines/hollywood/gameplay/options_menu.cpp
rename to engines/hollywood/monsters/gameplay/options_menu.cpp
index 11c0dfc8a20..953f986ea5f 100644
--- a/engines/hollywood/gameplay/options_menu.cpp
+++ b/engines/hollywood/monsters/gameplay/options_menu.cpp
@@ -30,12 +30,12 @@
#include "graphics/pixelformat.h"
#include "graphics/surface.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/font.h"
-#include "hollywood/game_strings.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/gameplay/options_menu.h"
-#include "hollywood/graphics.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/font.h"
+#include "hollywood/monsters/game_strings.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/gameplay/options_menu.h"
+#include "hollywood/monsters/graphics.h"
namespace Hollywood {
diff --git a/engines/hollywood/gameplay/options_menu.h b/engines/hollywood/monsters/gameplay/options_menu.h
similarity index 94%
rename from engines/hollywood/gameplay/options_menu.h
rename to engines/hollywood/monsters/gameplay/options_menu.h
index a3b890b7041..ff3c31c6ecd 100644
--- a/engines/hollywood/gameplay/options_menu.h
+++ b/engines/hollywood/monsters/gameplay/options_menu.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_GAMEPLAY_OPTIONS_MENU_H
-#define HOLLYWOOD_GAMEPLAY_OPTIONS_MENU_H
+#ifndef HOLLYWOOD_MONSTERS_GAMEPLAY_OPTIONS_MENU_H
+#define HOLLYWOOD_MONSTERS_GAMEPLAY_OPTIONS_MENU_H
#include "common/array.h"
#include "common/path.h"
@@ -28,8 +28,8 @@
#include "common/types.h"
#include "graphics/managed_surface.h"
-#include "hollywood/graphics.h"
-#include "hollywood/music.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/music.h"
namespace Graphics {
struct Surface;
@@ -138,4 +138,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_GAMEPLAY_OPTIONS_MENU_H
+#endif // HOLLYWOOD_MONSTERS_GAMEPLAY_OPTIONS_MENU_H
diff --git a/engines/hollywood/gameplay/panel_art.cpp b/engines/hollywood/monsters/gameplay/panel_art.cpp
similarity index 98%
rename from engines/hollywood/gameplay/panel_art.cpp
rename to engines/hollywood/monsters/gameplay/panel_art.cpp
index 9e6a3ccf649..2152c2e7f28 100644
--- a/engines/hollywood/gameplay/panel_art.cpp
+++ b/engines/hollywood/monsters/gameplay/panel_art.cpp
@@ -27,13 +27,13 @@
#include "common/textconsole.h"
#include "graphics/surface.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/font.h"
-#include "hollywood/game_strings.h"
-#include "hollywood/gameplay/dialogue_menu.h"
-#include "hollywood/gameplay/game_loop.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/gameplay/panel_art.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/font.h"
+#include "hollywood/monsters/game_strings.h"
+#include "hollywood/monsters/gameplay/dialogue_menu.h"
+#include "hollywood/monsters/gameplay/game_loop.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/gameplay/panel_art.h"
namespace Hollywood {
diff --git a/engines/hollywood/gameplay/panel_art.h b/engines/hollywood/monsters/gameplay/panel_art.h
similarity index 96%
rename from engines/hollywood/gameplay/panel_art.h
rename to engines/hollywood/monsters/gameplay/panel_art.h
index a81c95b1a6a..47e2e8b4d51 100644
--- a/engines/hollywood/gameplay/panel_art.h
+++ b/engines/hollywood/monsters/gameplay/panel_art.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_GAMEPLAY_PANEL_ART_H
-#define HOLLYWOOD_GAMEPLAY_PANEL_ART_H
+#ifndef HOLLYWOOD_MONSTERS_GAMEPLAY_PANEL_ART_H
+#define HOLLYWOOD_MONSTERS_GAMEPLAY_PANEL_ART_H
#include "common/array.h"
#include "common/language.h"
@@ -88,4 +88,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_GAMEPLAY_PANEL_ART_H
+#endif // HOLLYWOOD_MONSTERS_GAMEPLAY_PANEL_ART_H
diff --git a/engines/hollywood/gameplay/travel_screen.cpp b/engines/hollywood/monsters/gameplay/travel_screen.cpp
similarity index 98%
rename from engines/hollywood/gameplay/travel_screen.cpp
rename to engines/hollywood/monsters/gameplay/travel_screen.cpp
index 9df02ab7f4e..947f3a51186 100644
--- a/engines/hollywood/gameplay/travel_screen.cpp
+++ b/engines/hollywood/monsters/gameplay/travel_screen.cpp
@@ -25,10 +25,10 @@
#include "common/system.h"
#include "common/textconsole.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/cursor.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/gameplay/travel_screen.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/cursor.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/gameplay/travel_screen.h"
#include "hollywood/resource.h"
namespace Hollywood {
diff --git a/engines/hollywood/gameplay/travel_screen.h b/engines/hollywood/monsters/gameplay/travel_screen.h
similarity index 91%
rename from engines/hollywood/gameplay/travel_screen.h
rename to engines/hollywood/monsters/gameplay/travel_screen.h
index 2ab3d745d47..969edbd254c 100644
--- a/engines/hollywood/gameplay/travel_screen.h
+++ b/engines/hollywood/monsters/gameplay/travel_screen.h
@@ -19,14 +19,14 @@
*
*/
-#ifndef HOLLYWOOD_GAMEPLAY_TRAVEL_SCREEN_H
-#define HOLLYWOOD_GAMEPLAY_TRAVEL_SCREEN_H
+#ifndef HOLLYWOOD_MONSTERS_GAMEPLAY_TRAVEL_SCREEN_H
+#define HOLLYWOOD_MONSTERS_GAMEPLAY_TRAVEL_SCREEN_H
#include "common/array.h"
#include "common/types.h"
#include "graphics/managed_surface.h"
-#include "hollywood/graphics.h"
+#include "hollywood/monsters/graphics.h"
namespace Hollywood {
@@ -66,4 +66,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_GAMEPLAY_TRAVEL_SCREEN_H
+#endif // HOLLYWOOD_MONSTERS_GAMEPLAY_TRAVEL_SCREEN_H
diff --git a/engines/hollywood/graphics.cpp b/engines/hollywood/monsters/graphics.cpp
similarity index 94%
rename from engines/hollywood/graphics.cpp
rename to engines/hollywood/monsters/graphics.cpp
index f7dc466ce70..33e71aac538 100644
--- a/engines/hollywood/graphics.cpp
+++ b/engines/hollywood/monsters/graphics.cpp
@@ -25,32 +25,11 @@
#include "graphics/paletteman.h"
#include "graphics/surface.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/graphics.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/graphics.h"
namespace Hollywood {
-uint16 readUint16LE(const Common::Array<byte> &source, uint offset) {
- if (offset + 2 > source.size())
- return 0;
-
- return source[offset] | (source[offset + 1] << 8);
-}
-
-int16 readSint16LE(const Common::Array<byte> &source, uint offset) {
- return (int16)readUint16LE(source, offset);
-}
-
-uint32 readUint32LE(const Common::Array<byte> &source, uint offset) {
- if (offset + 4 > source.size())
- return 0;
-
- return source[offset] |
- (source[offset + 1] << 8) |
- (source[offset + 2] << 16) |
- (source[offset + 3] << 24);
-}
-
Palette6Bit::Palette6Bit() :
_palette(256),
_dirtyStart(0),
diff --git a/engines/hollywood/graphics.h b/engines/hollywood/monsters/graphics.h
similarity index 93%
rename from engines/hollywood/graphics.h
rename to engines/hollywood/monsters/graphics.h
index b3dabc1b0e0..509e0b5bf98 100644
--- a/engines/hollywood/graphics.h
+++ b/engines/hollywood/monsters/graphics.h
@@ -19,14 +19,16 @@
*
*/
-#ifndef HOLLYWOOD_GRAPHICS_H
-#define HOLLYWOOD_GRAPHICS_H
+#ifndef HOLLYWOOD_MONSTERS_GRAPHICS_H
+#define HOLLYWOOD_MONSTERS_GRAPHICS_H
#include "common/array.h"
#include "common/types.h"
#include "graphics/managed_surface.h"
#include "graphics/palette.h"
+#include "hollywood/resource.h"
+
namespace Graphics {
struct Surface;
}
@@ -39,10 +41,6 @@ enum {
kFrameDescriptorSize = 14
};
-uint16 readUint16LE(const Common::Array<byte> &source, uint offset);
-int16 readSint16LE(const Common::Array<byte> &source, uint offset);
-uint32 readUint32LE(const Common::Array<byte> &source, uint offset);
-
/**
* Converts the game's 256-entry RGB palette to backend 8-bit components.
*
@@ -117,4 +115,4 @@ void drawResourceBlockList(const Common::Array<byte> &resource, uint32 baseOffse
} // End of namespace Hollywood
-#endif // HOLLYWOOD_GRAPHICS_H
+#endif // HOLLYWOOD_MONSTERS_GRAPHICS_H
diff --git a/engines/hollywood/hollywood.cpp b/engines/hollywood/monsters/hollywood.cpp
similarity index 95%
rename from engines/hollywood/hollywood.cpp
rename to engines/hollywood/monsters/hollywood.cpp
index f278ab979b6..4e369bb87f1 100644
--- a/engines/hollywood/hollywood.cpp
+++ b/engines/hollywood/monsters/hollywood.cpp
@@ -29,21 +29,21 @@
#include "graphics/pixelformat.h"
#include "graphics/thumbnail.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/console.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/console.h"
#include "hollywood/debug.h"
-#include "hollywood/font.h"
-#include "hollywood/gameplay/travel_screen.h"
+#include "hollywood/monsters/font.h"
+#include "hollywood/monsters/gameplay/travel_screen.h"
#include "hollywood/resource.h"
-#include "hollywood/scenes/intro/demo_montage.h"
-#include "hollywood/scenes/intro/scene9000.h"
-#include "hollywood/scenes/intro/scene9010.h"
-#include "hollywood/scenes/intro/scene9030.h"
-#include "hollywood/scenes/intro/scene9050.h"
-#include "hollywood/scenes/intro/scene9100.h"
-#include "hollywood/scenes/intro/scene9110.h"
-#include "hollywood/scenes/intro/scene9120.h"
-#include "hollywood/scenes/scene_registry.h"
+#include "hollywood/monsters/scenes/intro/demo_montage.h"
+#include "hollywood/monsters/scenes/intro/scene9000.h"
+#include "hollywood/monsters/scenes/intro/scene9010.h"
+#include "hollywood/monsters/scenes/intro/scene9030.h"
+#include "hollywood/monsters/scenes/intro/scene9050.h"
+#include "hollywood/monsters/scenes/intro/scene9100.h"
+#include "hollywood/monsters/scenes/intro/scene9110.h"
+#include "hollywood/monsters/scenes/intro/scene9120.h"
+#include "hollywood/monsters/scenes/scene_registry.h"
namespace Hollywood {
diff --git a/engines/hollywood/hollywood.h b/engines/hollywood/monsters/hollywood.h
similarity index 93%
rename from engines/hollywood/hollywood.h
rename to engines/hollywood/monsters/hollywood.h
index 6624ecb6178..24d34fed343 100644
--- a/engines/hollywood/hollywood.h
+++ b/engines/hollywood/monsters/hollywood.h
@@ -19,17 +19,17 @@
*
*/
-#ifndef HOLLYWOOD_H
-#define HOLLYWOOD_H
+#ifndef HOLLYWOOD_MONSTERS_HOLLYWOOD_H
+#define HOLLYWOOD_MONSTERS_HOLLYWOOD_H
#include "common/language.h"
#include "common/platform.h"
#include "engines/engine.h"
#include "graphics/surface.h"
-#include "hollywood/gameplay/cursor.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/music.h"
+#include "hollywood/monsters/gameplay/cursor.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/music.h"
struct ADGameDescription;
@@ -114,4 +114,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_H
+#endif // HOLLYWOOD_MONSTERS_HOLLYWOOD_H
diff --git a/engines/hollywood/monsters/metaengine.cpp b/engines/hollywood/monsters/metaengine.cpp
new file mode 100644
index 00000000000..938e12e338c
--- /dev/null
+++ b/engines/hollywood/monsters/metaengine.cpp
@@ -0,0 +1,65 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/config-manager.h"
+#include "common/translation.h"
+#include "graphics/thumbnail.h"
+
+#include "hollywood/monsters/detection.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/metaengine.h"
+
+namespace Hollywood {
+namespace {
+
+const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_RESTORED_CONTENT,
+ {
+ _s("Enable restored content"),
+ _s("Play optional content present in the game data but unused by the original release"),
+ "restored_content",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
+} // End of anonymous namespace
+
+const ADExtraGuiOptionsMap *getMonstersExtraGuiOptions() {
+ return optionsList;
+}
+
+void registerMonstersDefaultSettings() {
+ ConfMan.registerDefault("restored_content", true);
+}
+
+void getMonstersSavegameThumbnail(Graphics::Surface &thumb) {
+ if (g_engine && static_cast<HollywoodEngine *>(g_engine)->copyLastGameplayThumbnail(thumb))
+ return;
+ Graphics::createThumbnail(thumb);
+}
+
+} // End of namespace Hollywood
diff --git a/engines/hollywood/monsters/metaengine.h b/engines/hollywood/monsters/metaengine.h
new file mode 100644
index 00000000000..e9bfabd8b44
--- /dev/null
+++ b/engines/hollywood/monsters/metaengine.h
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef HOLLYWOOD_MONSTERS_METAENGINE_H
+#define HOLLYWOOD_MONSTERS_METAENGINE_H
+
+struct ADExtraGuiOptionsMap;
+
+namespace Graphics {
+struct Surface;
+}
+
+namespace Hollywood {
+
+const ADExtraGuiOptionsMap *getMonstersExtraGuiOptions();
+void registerMonstersDefaultSettings();
+void getMonstersSavegameThumbnail(Graphics::Surface &thumb);
+
+} // End of namespace Hollywood
+
+#endif // HOLLYWOOD_MONSTERS_METAENGINE_H
diff --git a/engines/hollywood/music.cpp b/engines/hollywood/monsters/music.cpp
similarity index 99%
rename from engines/hollywood/music.cpp
rename to engines/hollywood/monsters/music.cpp
index 0966895128a..ebbe3d3a23b 100644
--- a/engines/hollywood/music.cpp
+++ b/engines/hollywood/monsters/music.cpp
@@ -28,7 +28,7 @@
#include "common/util.h"
#include "hollywood/debug.h"
-#include "hollywood/music.h"
+#include "hollywood/monsters/music.h"
namespace Hollywood {
diff --git a/engines/hollywood/music.h b/engines/hollywood/monsters/music.h
similarity index 97%
rename from engines/hollywood/music.h
rename to engines/hollywood/monsters/music.h
index 792139b2934..670cfeac410 100644
--- a/engines/hollywood/music.h
+++ b/engines/hollywood/monsters/music.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_MUSIC_H
-#define HOLLYWOOD_MUSIC_H
+#ifndef HOLLYWOOD_MONSTERS_MUSIC_H
+#define HOLLYWOOD_MONSTERS_MUSIC_H
#include "audio/mixer.h"
#include "common/language.h"
@@ -120,4 +120,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_MUSIC_H
+#endif // HOLLYWOOD_MONSTERS_MUSIC_H
diff --git a/engines/hollywood/saveload.cpp b/engines/hollywood/monsters/saveload.cpp
similarity index 99%
rename from engines/hollywood/saveload.cpp
rename to engines/hollywood/monsters/saveload.cpp
index be7e31df184..831685247fa 100644
--- a/engines/hollywood/saveload.cpp
+++ b/engines/hollywood/monsters/saveload.cpp
@@ -22,9 +22,9 @@
#include "common/debug.h"
#include "common/serializer.h"
-#include "hollywood/hollywood.h"
+#include "hollywood/monsters/hollywood.h"
#include "hollywood/debug.h"
-#include "hollywood/scenes/scene_registry.h"
+#include "hollywood/monsters/scenes/scene_registry.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/animation_channels.h b/engines/hollywood/monsters/scenes/animation_channels.h
similarity index 98%
rename from engines/hollywood/scenes/animation_channels.h
rename to engines/hollywood/monsters/scenes/animation_channels.h
index 277d44d4dc4..d9c80490574 100644
--- a/engines/hollywood/scenes/animation_channels.h
+++ b/engines/hollywood/monsters/scenes/animation_channels.h
@@ -19,14 +19,14 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_ANIMATION_CHANNELS_H
-#define HOLLYWOOD_SCENES_ANIMATION_CHANNELS_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_ANIMATION_CHANNELS_H
+#define HOLLYWOOD_MONSTERS_SCENES_ANIMATION_CHANNELS_H
#include "common/array.h"
#include "common/random.h"
#include "common/types.h"
-#include "hollywood/scenes/animation_layers.h"
+#include "hollywood/monsters/scenes/animation_layers.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/animation_events.h b/engines/hollywood/monsters/scenes/animation_events.h
similarity index 98%
rename from engines/hollywood/scenes/animation_events.h
rename to engines/hollywood/monsters/scenes/animation_events.h
index 9a36bf02ab2..ec303f28108 100644
--- a/engines/hollywood/scenes/animation_events.h
+++ b/engines/hollywood/monsters/scenes/animation_events.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_ANIMATION_EVENTS_H
-#define HOLLYWOOD_SCENES_ANIMATION_EVENTS_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_ANIMATION_EVENTS_H
+#define HOLLYWOOD_MONSTERS_SCENES_ANIMATION_EVENTS_H
#include "common/array.h"
#include "common/types.h"
@@ -336,4 +336,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_ANIMATION_EVENTS_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_ANIMATION_EVENTS_H
diff --git a/engines/hollywood/scenes/animation_layers.h b/engines/hollywood/monsters/scenes/animation_layers.h
similarity index 98%
rename from engines/hollywood/scenes/animation_layers.h
rename to engines/hollywood/monsters/scenes/animation_layers.h
index 295957a0ec6..7d706199348 100644
--- a/engines/hollywood/scenes/animation_layers.h
+++ b/engines/hollywood/monsters/scenes/animation_layers.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_ANIMATION_LAYERS_H
-#define HOLLYWOOD_SCENES_ANIMATION_LAYERS_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_ANIMATION_LAYERS_H
+#define HOLLYWOOD_MONSTERS_SCENES_ANIMATION_LAYERS_H
#include "common/array.h"
#include "common/types.h"
@@ -325,4 +325,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_ANIMATION_LAYERS_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_ANIMATION_LAYERS_H
diff --git a/engines/hollywood/scenes/animation_player.h b/engines/hollywood/monsters/scenes/animation_player.h
similarity index 97%
rename from engines/hollywood/scenes/animation_player.h
rename to engines/hollywood/monsters/scenes/animation_player.h
index 573dbf9b6be..5b12847f56f 100644
--- a/engines/hollywood/scenes/animation_player.h
+++ b/engines/hollywood/monsters/scenes/animation_player.h
@@ -19,13 +19,13 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_ANIMATION_PLAYER_H
-#define HOLLYWOOD_SCENES_ANIMATION_PLAYER_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_ANIMATION_PLAYER_H
+#define HOLLYWOOD_MONSTERS_SCENES_ANIMATION_PLAYER_H
#include "common/array.h"
#include "common/types.h"
-#include "hollywood/scenes/animation_events.h"
+#include "hollywood/monsters/scenes/animation_events.h"
namespace Hollywood {
@@ -315,4 +315,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_ANIMATION_PLAYER_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_ANIMATION_PLAYER_H
diff --git a/engines/hollywood/scenes/chapter_intro_scene.cpp b/engines/hollywood/monsters/scenes/chapter_intro_scene.cpp
similarity index 95%
rename from engines/hollywood/scenes/chapter_intro_scene.cpp
rename to engines/hollywood/monsters/scenes/chapter_intro_scene.cpp
index 2be49671d92..02210b12add 100644
--- a/engines/hollywood/scenes/chapter_intro_scene.cpp
+++ b/engines/hollywood/monsters/scenes/chapter_intro_scene.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/scenes/chapter_intro_scene.h"
-#include "hollywood/scenes/resource_delta_clip_player.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/scenes/chapter_intro_scene.h"
+#include "hollywood/monsters/scenes/resource_delta_clip_player.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/chapter_intro_scene.h b/engines/hollywood/monsters/scenes/chapter_intro_scene.h
similarity index 88%
rename from engines/hollywood/scenes/chapter_intro_scene.h
rename to engines/hollywood/monsters/scenes/chapter_intro_scene.h
index f96fdafb33d..007131f2907 100644
--- a/engines/hollywood/scenes/chapter_intro_scene.h
+++ b/engines/hollywood/monsters/scenes/chapter_intro_scene.h
@@ -19,13 +19,13 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_CHAPTER_INTRO_SCENE_H
-#define HOLLYWOOD_SCENES_CHAPTER_INTRO_SCENE_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_CHAPTER_INTRO_SCENE_H
+#define HOLLYWOOD_MONSTERS_SCENES_CHAPTER_INTRO_SCENE_H
#include "common/array.h"
-#include "hollywood/music.h"
-#include "hollywood/scenes/presentation_scene.h"
+#include "hollywood/monsters/music.h"
+#include "hollywood/monsters/scenes/presentation_scene.h"
namespace Hollywood {
@@ -68,4 +68,4 @@ protected:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_CHAPTER_INTRO_SCENE_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_CHAPTER_INTRO_SCENE_H
diff --git a/engines/hollywood/scenes/intro/demo_montage.cpp b/engines/hollywood/monsters/scenes/intro/demo_montage.cpp
similarity index 99%
rename from engines/hollywood/scenes/intro/demo_montage.cpp
rename to engines/hollywood/monsters/scenes/intro/demo_montage.cpp
index 69ba7f04030..0d5099e7774 100644
--- a/engines/hollywood/scenes/intro/demo_montage.cpp
+++ b/engines/hollywood/monsters/scenes/intro/demo_montage.cpp
@@ -19,12 +19,12 @@
*
*/
-#include "hollywood/scenes/intro/demo_montage.h"
+#include "hollywood/monsters/scenes/intro/demo_montage.h"
#include "common/events.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/scenes/playable/playable_scene.h"
-#include "hollywood/scenes/presentation_scene.h"
-#include "hollywood/scenes/shared_frame_sequences.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/presentation_scene.h"
+#include "hollywood/monsters/scenes/shared_frame_sequences.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/intro/demo_montage.h b/engines/hollywood/monsters/scenes/intro/demo_montage.h
similarity index 91%
rename from engines/hollywood/scenes/intro/demo_montage.h
rename to engines/hollywood/monsters/scenes/intro/demo_montage.h
index 852c180d2a2..aa94f1e2226 100644
--- a/engines/hollywood/scenes/intro/demo_montage.h
+++ b/engines/hollywood/monsters/scenes/intro/demo_montage.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_INTRO_DEMO_MONTAGE_H
-#define HOLLYWOOD_SCENES_INTRO_DEMO_MONTAGE_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_INTRO_DEMO_MONTAGE_H
+#define HOLLYWOOD_MONSTERS_SCENES_INTRO_DEMO_MONTAGE_H
namespace Hollywood {
diff --git a/engines/hollywood/scenes/intro/scene1000.cpp b/engines/hollywood/monsters/scenes/intro/scene1000.cpp
similarity index 96%
rename from engines/hollywood/scenes/intro/scene1000.cpp
rename to engines/hollywood/monsters/scenes/intro/scene1000.cpp
index fe12b38d4f2..3941cfef251 100644
--- a/engines/hollywood/scenes/intro/scene1000.cpp
+++ b/engines/hollywood/monsters/scenes/intro/scene1000.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/scenes/intro/scene1000.h"
-#include "hollywood/scenes/shared_frame_sequences.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/scenes/intro/scene1000.h"
+#include "hollywood/monsters/scenes/shared_frame_sequences.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/intro/scene1000.h b/engines/hollywood/monsters/scenes/intro/scene1000.h
similarity index 89%
rename from engines/hollywood/scenes/intro/scene1000.h
rename to engines/hollywood/monsters/scenes/intro/scene1000.h
index 858097c63c5..9a3f1a80e65 100644
--- a/engines/hollywood/scenes/intro/scene1000.h
+++ b/engines/hollywood/monsters/scenes/intro/scene1000.h
@@ -19,12 +19,12 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_INTRO_SCENE1000_H
-#define HOLLYWOOD_SCENES_INTRO_SCENE1000_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE1000_H
+#define HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE1000_H
#include "common/random.h"
-#include "hollywood/scenes/chapter_intro_scene.h"
+#include "hollywood/monsters/scenes/chapter_intro_scene.h"
namespace Hollywood {
@@ -65,4 +65,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_INTRO_SCENE1000_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE1000_H
diff --git a/engines/hollywood/scenes/intro/scene9000.cpp b/engines/hollywood/monsters/scenes/intro/scene9000.cpp
similarity index 97%
rename from engines/hollywood/scenes/intro/scene9000.cpp
rename to engines/hollywood/monsters/scenes/intro/scene9000.cpp
index 7e037a154fb..257359564fe 100644
--- a/engines/hollywood/scenes/intro/scene9000.cpp
+++ b/engines/hollywood/monsters/scenes/intro/scene9000.cpp
@@ -19,8 +19,8 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/scenes/intro/scene9000.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/scenes/intro/scene9000.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/intro/scene9000.h b/engines/hollywood/monsters/scenes/intro/scene9000.h
similarity index 86%
rename from engines/hollywood/scenes/intro/scene9000.h
rename to engines/hollywood/monsters/scenes/intro/scene9000.h
index 4a5bc5a764b..3559f6d5676 100644
--- a/engines/hollywood/scenes/intro/scene9000.h
+++ b/engines/hollywood/monsters/scenes/intro/scene9000.h
@@ -19,13 +19,13 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_INTRO_SCENE9000_H
-#define HOLLYWOOD_SCENES_INTRO_SCENE9000_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9000_H
+#define HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9000_H
#include "common/array.h"
-#include "hollywood/music.h"
-#include "hollywood/scenes/presentation_scene.h"
+#include "hollywood/monsters/music.h"
+#include "hollywood/monsters/scenes/presentation_scene.h"
namespace Hollywood {
@@ -64,4 +64,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_INTRO_SCENE9000_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9000_H
diff --git a/engines/hollywood/scenes/intro/scene9010.cpp b/engines/hollywood/monsters/scenes/intro/scene9010.cpp
similarity index 99%
rename from engines/hollywood/scenes/intro/scene9010.cpp
rename to engines/hollywood/monsters/scenes/intro/scene9010.cpp
index c59a0df1b3a..8763c45d94a 100644
--- a/engines/hollywood/scenes/intro/scene9010.cpp
+++ b/engines/hollywood/monsters/scenes/intro/scene9010.cpp
@@ -22,10 +22,10 @@
#include "common/debug.h"
#include "common/file.h"
-#include "hollywood/hollywood.h"
+#include "hollywood/monsters/hollywood.h"
#include "hollywood/debug.h"
-#include "hollywood/font.h"
-#include "hollywood/scenes/intro/scene9010.h"
+#include "hollywood/monsters/font.h"
+#include "hollywood/monsters/scenes/intro/scene9010.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/intro/scene9010.h b/engines/hollywood/monsters/scenes/intro/scene9010.h
similarity index 92%
rename from engines/hollywood/scenes/intro/scene9010.h
rename to engines/hollywood/monsters/scenes/intro/scene9010.h
index f5054bd7cc2..046434c6ee2 100644
--- a/engines/hollywood/scenes/intro/scene9010.h
+++ b/engines/hollywood/monsters/scenes/intro/scene9010.h
@@ -19,17 +19,17 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_INTRO_SCENE9010_H
-#define HOLLYWOOD_SCENES_INTRO_SCENE9010_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9010_H
+#define HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9010_H
#include "common/array.h"
#include "common/file.h"
#include "common/str.h"
-#include "hollywood/music.h"
+#include "hollywood/monsters/music.h"
#include "hollywood/resource.h"
-#include "hollywood/scenes/presentation_scene.h"
-#include "hollywood/scenes/scene_text_store.h"
+#include "hollywood/monsters/scenes/presentation_scene.h"
+#include "hollywood/scene_text_store.h"
namespace Hollywood {
@@ -120,4 +120,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_INTRO_SCENE9010_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9010_H
diff --git a/engines/hollywood/scenes/intro/scene9030.cpp b/engines/hollywood/monsters/scenes/intro/scene9030.cpp
similarity index 98%
rename from engines/hollywood/scenes/intro/scene9030.cpp
rename to engines/hollywood/monsters/scenes/intro/scene9030.cpp
index 4eaa399bfa8..881923e4fef 100644
--- a/engines/hollywood/scenes/intro/scene9030.cpp
+++ b/engines/hollywood/monsters/scenes/intro/scene9030.cpp
@@ -23,9 +23,9 @@
#include "common/file.h"
#include "common/path.h"
-#include "hollywood/hollywood.h"
+#include "hollywood/monsters/hollywood.h"
#include "hollywood/debug.h"
-#include "hollywood/scenes/intro/scene9030.h"
+#include "hollywood/monsters/scenes/intro/scene9030.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/intro/scene9030.h b/engines/hollywood/monsters/scenes/intro/scene9030.h
similarity index 87%
rename from engines/hollywood/scenes/intro/scene9030.h
rename to engines/hollywood/monsters/scenes/intro/scene9030.h
index 97d58f9960e..05c4fef4364 100644
--- a/engines/hollywood/scenes/intro/scene9030.h
+++ b/engines/hollywood/monsters/scenes/intro/scene9030.h
@@ -19,12 +19,12 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_INTRO_SCENE9030_H
-#define HOLLYWOOD_SCENES_INTRO_SCENE9030_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9030_H
+#define HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9030_H
#include "common/array.h"
-#include "hollywood/scenes/presentation_scene.h"
+#include "hollywood/monsters/scenes/presentation_scene.h"
namespace Hollywood {
@@ -50,4 +50,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_INTRO_SCENE9030_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9030_H
diff --git a/engines/hollywood/scenes/intro/scene9050.cpp b/engines/hollywood/monsters/scenes/intro/scene9050.cpp
similarity index 99%
rename from engines/hollywood/scenes/intro/scene9050.cpp
rename to engines/hollywood/monsters/scenes/intro/scene9050.cpp
index 969975024cb..16c66007fca 100644
--- a/engines/hollywood/scenes/intro/scene9050.cpp
+++ b/engines/hollywood/monsters/scenes/intro/scene9050.cpp
@@ -21,11 +21,11 @@
#include "common/debug.h"
-#include "hollywood/hollywood.h"
+#include "hollywood/monsters/hollywood.h"
#include "hollywood/debug.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/intro/scene9050.h"
-#include "hollywood/scenes/resource_delta_clip_player.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/intro/scene9050.h"
+#include "hollywood/monsters/scenes/resource_delta_clip_player.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/intro/scene9050.h b/engines/hollywood/monsters/scenes/intro/scene9050.h
similarity index 95%
rename from engines/hollywood/scenes/intro/scene9050.h
rename to engines/hollywood/monsters/scenes/intro/scene9050.h
index 57d16f68ba3..969594be796 100644
--- a/engines/hollywood/scenes/intro/scene9050.h
+++ b/engines/hollywood/monsters/scenes/intro/scene9050.h
@@ -19,14 +19,14 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_INTRO_SCENE9050_H
-#define HOLLYWOOD_SCENES_INTRO_SCENE9050_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9050_H
+#define HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9050_H
#include "common/array.h"
#include "common/random.h"
-#include "hollywood/music.h"
-#include "hollywood/scenes/presentation_scene.h"
+#include "hollywood/monsters/music.h"
+#include "hollywood/monsters/scenes/presentation_scene.h"
namespace Hollywood {
@@ -153,4 +153,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_INTRO_SCENE9050_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9050_H
diff --git a/engines/hollywood/scenes/intro/scene9090.cpp b/engines/hollywood/monsters/scenes/intro/scene9090.cpp
similarity index 98%
rename from engines/hollywood/scenes/intro/scene9090.cpp
rename to engines/hollywood/monsters/scenes/intro/scene9090.cpp
index 55985f16c6f..b69157ee996 100644
--- a/engines/hollywood/scenes/intro/scene9090.cpp
+++ b/engines/hollywood/monsters/scenes/intro/scene9090.cpp
@@ -23,13 +23,13 @@
#include "common/file.h"
#include "common/path.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/font.h"
-#include "hollywood/gameplay/actor_renderer.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/intro/scene9090.h"
-#include "hollywood/scenes/shared_frame_sequences.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/font.h"
+#include "hollywood/monsters/gameplay/actor_renderer.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/intro/scene9090.h"
+#include "hollywood/monsters/scenes/shared_frame_sequences.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/intro/scene9090.h b/engines/hollywood/monsters/scenes/intro/scene9090.h
similarity index 90%
rename from engines/hollywood/scenes/intro/scene9090.h
rename to engines/hollywood/monsters/scenes/intro/scene9090.h
index a5be76256b4..3285ececfef 100644
--- a/engines/hollywood/scenes/intro/scene9090.h
+++ b/engines/hollywood/monsters/scenes/intro/scene9090.h
@@ -19,16 +19,16 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_INTRO_SCENE9090_H
-#define HOLLYWOOD_SCENES_INTRO_SCENE9090_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9090_H
+#define HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9090_H
#include "common/random.h"
-#include "hollywood/gameplay/actor_renderer.h"
-#include "hollywood/music.h"
-#include "hollywood/scenes/presentation_scene.h"
-#include "hollywood/scenes/scene_text_store.h"
-#include "hollywood/scenes/speech_overlay.h"
+#include "hollywood/monsters/gameplay/actor_renderer.h"
+#include "hollywood/monsters/music.h"
+#include "hollywood/monsters/scenes/presentation_scene.h"
+#include "hollywood/scene_text_store.h"
+#include "hollywood/monsters/scenes/speech_overlay.h"
namespace Hollywood {
@@ -121,4 +121,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_INTRO_SCENE9090_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9090_H
diff --git a/engines/hollywood/scenes/intro/scene9100.cpp b/engines/hollywood/monsters/scenes/intro/scene9100.cpp
similarity index 99%
rename from engines/hollywood/scenes/intro/scene9100.cpp
rename to engines/hollywood/monsters/scenes/intro/scene9100.cpp
index 458924243f0..54b2924c6e8 100644
--- a/engines/hollywood/scenes/intro/scene9100.cpp
+++ b/engines/hollywood/monsters/scenes/intro/scene9100.cpp
@@ -23,13 +23,13 @@
#include "graphics/pixelformat.h"
#include "graphics/surface.h"
-#include "hollywood/hollywood.h"
+#include "hollywood/monsters/hollywood.h"
#include "hollywood/debug.h"
-#include "hollywood/font.h"
-#include "hollywood/gameplay/actor_renderer.h"
-#include "hollywood/scenes/intro/scene9100.h"
-#include "hollywood/scenes/scene_data.h"
-#include "hollywood/scenes/shared_frame_sequences.h"
+#include "hollywood/monsters/font.h"
+#include "hollywood/monsters/gameplay/actor_renderer.h"
+#include "hollywood/monsters/scenes/intro/scene9100.h"
+#include "hollywood/monsters/scenes/scene_data.h"
+#include "hollywood/monsters/scenes/shared_frame_sequences.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/intro/scene9100.h b/engines/hollywood/monsters/scenes/intro/scene9100.h
similarity index 95%
rename from engines/hollywood/scenes/intro/scene9100.h
rename to engines/hollywood/monsters/scenes/intro/scene9100.h
index a02fa0a8729..7c57153f708 100644
--- a/engines/hollywood/scenes/intro/scene9100.h
+++ b/engines/hollywood/monsters/scenes/intro/scene9100.h
@@ -19,17 +19,17 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_INTRO_SCENE9100_H
-#define HOLLYWOOD_SCENES_INTRO_SCENE9100_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9100_H
+#define HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9100_H
#include "common/array.h"
#include "common/random.h"
#include "common/str.h"
-#include "hollywood/gameplay/actor_renderer.h"
-#include "hollywood/music.h"
-#include "hollywood/scenes/presentation_scene.h"
-#include "hollywood/scenes/scene_text_store.h"
+#include "hollywood/monsters/gameplay/actor_renderer.h"
+#include "hollywood/monsters/music.h"
+#include "hollywood/monsters/scenes/presentation_scene.h"
+#include "hollywood/scene_text_store.h"
namespace Hollywood {
@@ -194,4 +194,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_INTRO_SCENE9100_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9100_H
diff --git a/engines/hollywood/scenes/intro/scene9110.cpp b/engines/hollywood/monsters/scenes/intro/scene9110.cpp
similarity index 98%
rename from engines/hollywood/scenes/intro/scene9110.cpp
rename to engines/hollywood/monsters/scenes/intro/scene9110.cpp
index 91f8c4cb3d5..c0963c36863 100644
--- a/engines/hollywood/scenes/intro/scene9110.cpp
+++ b/engines/hollywood/monsters/scenes/intro/scene9110.cpp
@@ -23,11 +23,11 @@
#include "graphics/pixelformat.h"
#include "graphics/surface.h"
-#include "hollywood/hollywood.h"
+#include "hollywood/monsters/hollywood.h"
#include "hollywood/debug.h"
-#include "hollywood/font.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/intro/scene9110.h"
+#include "hollywood/monsters/font.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/intro/scene9110.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/intro/scene9110.h b/engines/hollywood/monsters/scenes/intro/scene9110.h
similarity index 89%
rename from engines/hollywood/scenes/intro/scene9110.h
rename to engines/hollywood/monsters/scenes/intro/scene9110.h
index 0dbfdbf394e..9ab56fd5da5 100644
--- a/engines/hollywood/scenes/intro/scene9110.h
+++ b/engines/hollywood/monsters/scenes/intro/scene9110.h
@@ -19,16 +19,16 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_INTRO_SCENE9110_H
-#define HOLLYWOOD_SCENES_INTRO_SCENE9110_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9110_H
+#define HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9110_H
#include "common/array.h"
#include "common/random.h"
#include "common/str.h"
-#include "hollywood/music.h"
-#include "hollywood/scenes/presentation_scene.h"
-#include "hollywood/scenes/scene_text_store.h"
+#include "hollywood/monsters/music.h"
+#include "hollywood/monsters/scenes/presentation_scene.h"
+#include "hollywood/scene_text_store.h"
namespace Hollywood {
@@ -109,4 +109,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_INTRO_SCENE9110_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9110_H
diff --git a/engines/hollywood/scenes/intro/scene9120.cpp b/engines/hollywood/monsters/scenes/intro/scene9120.cpp
similarity index 98%
rename from engines/hollywood/scenes/intro/scene9120.cpp
rename to engines/hollywood/monsters/scenes/intro/scene9120.cpp
index 511453cd23a..3cbdde977a3 100644
--- a/engines/hollywood/scenes/intro/scene9120.cpp
+++ b/engines/hollywood/monsters/scenes/intro/scene9120.cpp
@@ -19,9 +19,9 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/intro/scene9120.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/intro/scene9120.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/intro/scene9120.h b/engines/hollywood/monsters/scenes/intro/scene9120.h
similarity index 91%
rename from engines/hollywood/scenes/intro/scene9120.h
rename to engines/hollywood/monsters/scenes/intro/scene9120.h
index fc8947cc9aa..e626ed6f983 100644
--- a/engines/hollywood/scenes/intro/scene9120.h
+++ b/engines/hollywood/monsters/scenes/intro/scene9120.h
@@ -19,14 +19,14 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_INTRO_SCENE9120_H
-#define HOLLYWOOD_SCENES_INTRO_SCENE9120_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9120_H
+#define HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9120_H
#include "common/array.h"
#include "common/random.h"
-#include "hollywood/music.h"
-#include "hollywood/scenes/presentation_scene.h"
+#include "hollywood/monsters/music.h"
+#include "hollywood/monsters/scenes/presentation_scene.h"
namespace Hollywood {
@@ -95,4 +95,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_INTRO_SCENE9120_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9120_H
diff --git a/engines/hollywood/scenes/intro/scene9130.cpp b/engines/hollywood/monsters/scenes/intro/scene9130.cpp
similarity index 96%
rename from engines/hollywood/scenes/intro/scene9130.cpp
rename to engines/hollywood/monsters/scenes/intro/scene9130.cpp
index 76f1622244d..9e68e331221 100644
--- a/engines/hollywood/scenes/intro/scene9130.cpp
+++ b/engines/hollywood/monsters/scenes/intro/scene9130.cpp
@@ -21,11 +21,11 @@
#include "common/debug.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/intro/scene9130.h"
-#include "hollywood/scenes/resource_delta_clip_player.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/intro/scene9130.h"
+#include "hollywood/monsters/scenes/resource_delta_clip_player.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/intro/scene9130.h b/engines/hollywood/monsters/scenes/intro/scene9130.h
similarity index 85%
rename from engines/hollywood/scenes/intro/scene9130.h
rename to engines/hollywood/monsters/scenes/intro/scene9130.h
index 70f2f66c0a5..8be05469314 100644
--- a/engines/hollywood/scenes/intro/scene9130.h
+++ b/engines/hollywood/monsters/scenes/intro/scene9130.h
@@ -19,12 +19,12 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_INTRO_SCENE9130_H
-#define HOLLYWOOD_SCENES_INTRO_SCENE9130_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9130_H
+#define HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9130_H
-#include "hollywood/music.h"
-#include "hollywood/scenes/presentation_scene.h"
-#include "hollywood/scenes/scene_text_store.h"
+#include "hollywood/monsters/music.h"
+#include "hollywood/monsters/scenes/presentation_scene.h"
+#include "hollywood/scene_text_store.h"
namespace Hollywood {
@@ -63,4 +63,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_INTRO_SCENE9130_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9130_H
diff --git a/engines/hollywood/scenes/intro/scene9140.cpp b/engines/hollywood/monsters/scenes/intro/scene9140.cpp
similarity index 97%
rename from engines/hollywood/scenes/intro/scene9140.cpp
rename to engines/hollywood/monsters/scenes/intro/scene9140.cpp
index 06bbf1c1454..68e539bbec7 100644
--- a/engines/hollywood/scenes/intro/scene9140.cpp
+++ b/engines/hollywood/monsters/scenes/intro/scene9140.cpp
@@ -21,11 +21,11 @@
#include "common/debug.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/intro/scene9140.h"
-#include "hollywood/scenes/shared_frame_sequences.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/intro/scene9140.h"
+#include "hollywood/monsters/scenes/shared_frame_sequences.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/intro/scene9140.h b/engines/hollywood/monsters/scenes/intro/scene9140.h
similarity index 87%
rename from engines/hollywood/scenes/intro/scene9140.h
rename to engines/hollywood/monsters/scenes/intro/scene9140.h
index 437bcb0691c..e4cfc8895ac 100644
--- a/engines/hollywood/scenes/intro/scene9140.h
+++ b/engines/hollywood/monsters/scenes/intro/scene9140.h
@@ -19,12 +19,12 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_INTRO_SCENE9140_H
-#define HOLLYWOOD_SCENES_INTRO_SCENE9140_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9140_H
+#define HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9140_H
-#include "hollywood/music.h"
-#include "hollywood/scenes/presentation_scene.h"
-#include "hollywood/scenes/scene_text_store.h"
+#include "hollywood/monsters/music.h"
+#include "hollywood/monsters/scenes/presentation_scene.h"
+#include "hollywood/scene_text_store.h"
namespace Hollywood {
@@ -77,4 +77,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_INTRO_SCENE9140_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9140_H
diff --git a/engines/hollywood/scenes/intro/scene9150.cpp b/engines/hollywood/monsters/scenes/intro/scene9150.cpp
similarity index 96%
rename from engines/hollywood/scenes/intro/scene9150.cpp
rename to engines/hollywood/monsters/scenes/intro/scene9150.cpp
index 0082df46b26..16fb47f697c 100644
--- a/engines/hollywood/scenes/intro/scene9150.cpp
+++ b/engines/hollywood/monsters/scenes/intro/scene9150.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/intro/scene9150.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/intro/scene9150.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/intro/scene9150.h b/engines/hollywood/monsters/scenes/intro/scene9150.h
similarity index 83%
rename from engines/hollywood/scenes/intro/scene9150.h
rename to engines/hollywood/monsters/scenes/intro/scene9150.h
index 6d0790908a9..39dc33a287d 100644
--- a/engines/hollywood/scenes/intro/scene9150.h
+++ b/engines/hollywood/monsters/scenes/intro/scene9150.h
@@ -19,12 +19,12 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_INTRO_SCENE9150_H
-#define HOLLYWOOD_SCENES_INTRO_SCENE9150_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9150_H
+#define HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9150_H
-#include "hollywood/music.h"
-#include "hollywood/scenes/presentation_scene.h"
-#include "hollywood/scenes/scene_text_store.h"
+#include "hollywood/monsters/music.h"
+#include "hollywood/monsters/scenes/presentation_scene.h"
+#include "hollywood/scene_text_store.h"
namespace Hollywood {
@@ -55,4 +55,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_INTRO_SCENE9150_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9150_H
diff --git a/engines/hollywood/scenes/intro/scene9160.cpp b/engines/hollywood/monsters/scenes/intro/scene9160.cpp
similarity index 97%
rename from engines/hollywood/scenes/intro/scene9160.cpp
rename to engines/hollywood/monsters/scenes/intro/scene9160.cpp
index 5677ae50180..210ac620c5d 100644
--- a/engines/hollywood/scenes/intro/scene9160.cpp
+++ b/engines/hollywood/monsters/scenes/intro/scene9160.cpp
@@ -21,10 +21,10 @@
#include "common/debug.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/intro/scene9160.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/intro/scene9160.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/intro/scene9160.h b/engines/hollywood/monsters/scenes/intro/scene9160.h
similarity index 87%
rename from engines/hollywood/scenes/intro/scene9160.h
rename to engines/hollywood/monsters/scenes/intro/scene9160.h
index c45e332a184..274bee5dbf9 100644
--- a/engines/hollywood/scenes/intro/scene9160.h
+++ b/engines/hollywood/monsters/scenes/intro/scene9160.h
@@ -19,11 +19,11 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_INTRO_SCENE9160_H
-#define HOLLYWOOD_SCENES_INTRO_SCENE9160_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9160_H
+#define HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9160_H
-#include "hollywood/music.h"
-#include "hollywood/scenes/presentation_scene.h"
+#include "hollywood/monsters/music.h"
+#include "hollywood/monsters/scenes/presentation_scene.h"
namespace Hollywood {
@@ -61,4 +61,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_INTRO_SCENE9160_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9160_H
diff --git a/engines/hollywood/scenes/intro/scene9170.cpp b/engines/hollywood/monsters/scenes/intro/scene9170.cpp
similarity index 99%
rename from engines/hollywood/scenes/intro/scene9170.cpp
rename to engines/hollywood/monsters/scenes/intro/scene9170.cpp
index 6bc716d88df..084a53c717a 100644
--- a/engines/hollywood/scenes/intro/scene9170.cpp
+++ b/engines/hollywood/monsters/scenes/intro/scene9170.cpp
@@ -21,10 +21,10 @@
#include "common/debug.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/intro/scene9170.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/intro/scene9170.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/intro/scene9170.h b/engines/hollywood/monsters/scenes/intro/scene9170.h
similarity index 92%
rename from engines/hollywood/scenes/intro/scene9170.h
rename to engines/hollywood/monsters/scenes/intro/scene9170.h
index 887e780076b..09e0a94cd28 100644
--- a/engines/hollywood/scenes/intro/scene9170.h
+++ b/engines/hollywood/monsters/scenes/intro/scene9170.h
@@ -19,14 +19,14 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_INTRO_SCENE9170_H
-#define HOLLYWOOD_SCENES_INTRO_SCENE9170_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9170_H
+#define HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9170_H
#include "common/random.h"
-#include "hollywood/music.h"
-#include "hollywood/scenes/presentation_scene.h"
-#include "hollywood/scenes/scene_text_store.h"
+#include "hollywood/monsters/music.h"
+#include "hollywood/monsters/scenes/presentation_scene.h"
+#include "hollywood/scene_text_store.h"
namespace Hollywood {
@@ -107,4 +107,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_INTRO_SCENE9170_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9170_H
diff --git a/engines/hollywood/scenes/intro/scene9180.cpp b/engines/hollywood/monsters/scenes/intro/scene9180.cpp
similarity index 98%
rename from engines/hollywood/scenes/intro/scene9180.cpp
rename to engines/hollywood/monsters/scenes/intro/scene9180.cpp
index 9e30ad2301c..6f1e14e3f09 100644
--- a/engines/hollywood/scenes/intro/scene9180.cpp
+++ b/engines/hollywood/monsters/scenes/intro/scene9180.cpp
@@ -21,10 +21,10 @@
#include "common/debug.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/intro/scene9180.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/intro/scene9180.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/intro/scene9180.h b/engines/hollywood/monsters/scenes/intro/scene9180.h
similarity index 87%
rename from engines/hollywood/scenes/intro/scene9180.h
rename to engines/hollywood/monsters/scenes/intro/scene9180.h
index 269eea691b6..3f61d3906be 100644
--- a/engines/hollywood/scenes/intro/scene9180.h
+++ b/engines/hollywood/monsters/scenes/intro/scene9180.h
@@ -19,14 +19,14 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_INTRO_SCENE9180_H
-#define HOLLYWOOD_SCENES_INTRO_SCENE9180_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9180_H
+#define HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9180_H
#include "common/random.h"
-#include "hollywood/music.h"
-#include "hollywood/scenes/presentation_scene.h"
-#include "hollywood/scenes/scene_text_store.h"
+#include "hollywood/monsters/music.h"
+#include "hollywood/monsters/scenes/presentation_scene.h"
+#include "hollywood/scene_text_store.h"
namespace Hollywood {
@@ -73,4 +73,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_INTRO_SCENE9180_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_INTRO_SCENE9180_H
diff --git a/engines/hollywood/scenes/playable/action_overlay.h b/engines/hollywood/monsters/scenes/playable/action_overlay.h
similarity index 96%
rename from engines/hollywood/scenes/playable/action_overlay.h
rename to engines/hollywood/monsters/scenes/playable/action_overlay.h
index ae15343bc2a..46f985f764b 100644
--- a/engines/hollywood/scenes/playable/action_overlay.h
+++ b/engines/hollywood/monsters/scenes/playable/action_overlay.h
@@ -19,13 +19,13 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_ACTION_OVERLAY_H
-#define HOLLYWOOD_SCENES_PLAYABLE_ACTION_OVERLAY_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_ACTION_OVERLAY_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_ACTION_OVERLAY_H
#include "common/types.h"
-#include "hollywood/scenes/animation_events.h"
-#include "hollywood/scenes/animation_layers.h"
+#include "hollywood/monsters/scenes/animation_events.h"
+#include "hollywood/monsters/scenes/animation_layers.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/action_overlay_player.cpp b/engines/hollywood/monsters/scenes/playable/action_overlay_player.cpp
similarity index 96%
rename from engines/hollywood/scenes/playable/action_overlay_player.cpp
rename to engines/hollywood/monsters/scenes/playable/action_overlay_player.cpp
index 4622e71676d..f668cdebd72 100644
--- a/engines/hollywood/scenes/playable/action_overlay_player.cpp
+++ b/engines/hollywood/monsters/scenes/playable/action_overlay_player.cpp
@@ -19,7 +19,7 @@
*
*/
-#include "hollywood/scenes/playable/action_overlay_player.h"
+#include "hollywood/monsters/scenes/playable/action_overlay_player.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/action_overlay_player.h b/engines/hollywood/monsters/scenes/playable/action_overlay_player.h
similarity index 89%
rename from engines/hollywood/scenes/playable/action_overlay_player.h
rename to engines/hollywood/monsters/scenes/playable/action_overlay_player.h
index 2d20e3d132a..75b8b496efe 100644
--- a/engines/hollywood/scenes/playable/action_overlay_player.h
+++ b/engines/hollywood/monsters/scenes/playable/action_overlay_player.h
@@ -19,12 +19,12 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_ACTION_OVERLAY_PLAYER_H
-#define HOLLYWOOD_SCENES_PLAYABLE_ACTION_OVERLAY_PLAYER_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_ACTION_OVERLAY_PLAYER_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_ACTION_OVERLAY_PLAYER_H
#include "common/types.h"
-#include "hollywood/scenes/animation_layers.h"
+#include "hollywood/monsters/scenes/animation_layers.h"
namespace Hollywood {
@@ -65,4 +65,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_ACTION_OVERLAY_PLAYER_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_ACTION_OVERLAY_PLAYER_H
diff --git a/engines/hollywood/scenes/playable/actor_path_controller.cpp b/engines/hollywood/monsters/scenes/playable/actor_path_controller.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/actor_path_controller.cpp
rename to engines/hollywood/monsters/scenes/playable/actor_path_controller.cpp
index 8be6285c765..b70be6ab830 100644
--- a/engines/hollywood/scenes/playable/actor_path_controller.cpp
+++ b/engines/hollywood/monsters/scenes/playable/actor_path_controller.cpp
@@ -23,8 +23,8 @@
#include "common/util.h"
#include "hollywood/debug.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/actor_path_controller.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/actor_path_controller.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/actor_path_controller.h b/engines/hollywood/monsters/scenes/playable/actor_path_controller.h
similarity index 93%
rename from engines/hollywood/scenes/playable/actor_path_controller.h
rename to engines/hollywood/monsters/scenes/playable/actor_path_controller.h
index 8a650cbf6f7..6f52f61b0a9 100644
--- a/engines/hollywood/scenes/playable/actor_path_controller.h
+++ b/engines/hollywood/monsters/scenes/playable/actor_path_controller.h
@@ -19,14 +19,14 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_ACTOR_PATH_CONTROLLER_H
-#define HOLLYWOOD_SCENES_PLAYABLE_ACTOR_PATH_CONTROLLER_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_ACTOR_PATH_CONTROLLER_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_ACTOR_PATH_CONTROLLER_H
#include "common/array.h"
#include "common/types.h"
-#include "hollywood/scenes/playable/actor_types.h"
-#include "hollywood/scenes/scene_data.h"
+#include "hollywood/monsters/scenes/playable/actor_types.h"
+#include "hollywood/monsters/scenes/scene_data.h"
namespace Hollywood {
@@ -109,4 +109,4 @@ uint defaultActorPathStepDeltaTableSize();
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_ACTOR_PATH_CONTROLLER_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_ACTOR_PATH_CONTROLLER_H
diff --git a/engines/hollywood/scenes/playable/actor_types.h b/engines/hollywood/monsters/scenes/playable/actor_types.h
similarity index 94%
rename from engines/hollywood/scenes/playable/actor_types.h
rename to engines/hollywood/monsters/scenes/playable/actor_types.h
index b0a96f1dbdd..fb97bd98f4e 100644
--- a/engines/hollywood/scenes/playable/actor_types.h
+++ b/engines/hollywood/monsters/scenes/playable/actor_types.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_ACTOR_TYPES_H
-#define HOLLYWOOD_SCENES_PLAYABLE_ACTOR_TYPES_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_ACTOR_TYPES_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_ACTOR_TYPES_H
#include "common/types.h"
diff --git a/engines/hollywood/scenes/playable/ambient_audio.h b/engines/hollywood/monsters/scenes/playable/ambient_audio.h
similarity index 94%
rename from engines/hollywood/scenes/playable/ambient_audio.h
rename to engines/hollywood/monsters/scenes/playable/ambient_audio.h
index 40868f23090..974deb36dea 100644
--- a/engines/hollywood/scenes/playable/ambient_audio.h
+++ b/engines/hollywood/monsters/scenes/playable/ambient_audio.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_AMBIENT_AUDIO_H
-#define HOLLYWOOD_SCENES_PLAYABLE_AMBIENT_AUDIO_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_AMBIENT_AUDIO_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_AMBIENT_AUDIO_H
#include "common/types.h"
diff --git a/engines/hollywood/scenes/playable/playable_scene.cpp b/engines/hollywood/monsters/scenes/playable/playable_scene.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/playable_scene.cpp
rename to engines/hollywood/monsters/scenes/playable/playable_scene.cpp
index 0559c1dee57..5bc70b3abb2 100644
--- a/engines/hollywood/scenes/playable/playable_scene.cpp
+++ b/engines/hollywood/monsters/scenes/playable/playable_scene.cpp
@@ -26,17 +26,17 @@
#include "common/system.h"
#include "graphics/surface.h"
-#include "hollywood/hollywood.h"
+#include "hollywood/monsters/hollywood.h"
#include "hollywood/debug.h"
-#include "hollywood/font.h"
-#include "hollywood/gameplay/actor_renderer.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/gameplay/inventory_media.h"
-#include "hollywood/gameplay/travel_screen.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/playable_scene.h"
-#include "hollywood/scenes/resource_delta_clip_player.h"
-#include "hollywood/scenes/scene_registry.h"
+#include "hollywood/monsters/font.h"
+#include "hollywood/monsters/gameplay/actor_renderer.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/gameplay/inventory_media.h"
+#include "hollywood/monsters/gameplay/travel_screen.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/resource_delta_clip_player.h"
+#include "hollywood/monsters/scenes/scene_registry.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/playable_scene.h b/engines/hollywood/monsters/scenes/playable/playable_scene.h
similarity index 96%
rename from engines/hollywood/scenes/playable/playable_scene.h
rename to engines/hollywood/monsters/scenes/playable/playable_scene.h
index 6b8de2f7e95..3e6170d9176 100644
--- a/engines/hollywood/scenes/playable/playable_scene.h
+++ b/engines/hollywood/monsters/scenes/playable/playable_scene.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_PLAYABLE_SCENE_H
-#define HOLLYWOOD_SCENES_PLAYABLE_PLAYABLE_SCENE_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_PLAYABLE_SCENE_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_PLAYABLE_SCENE_H
#include "common/array.h"
#include "common/random.h"
@@ -28,27 +28,27 @@
#include "common/types.h"
#include "graphics/managed_surface.h"
-#include "hollywood/gameplay/dialogue_menu.h"
-#include "hollywood/gameplay/game_loop.h"
-#include "hollywood/gameplay/panel_art.h"
-#include "hollywood/graphics.h"
-#include "hollywood/music.h"
+#include "hollywood/monsters/gameplay/dialogue_menu.h"
+#include "hollywood/monsters/gameplay/game_loop.h"
+#include "hollywood/monsters/gameplay/panel_art.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/music.h"
#include "hollywood/resource.h"
-#include "hollywood/scenes/animation_channels.h"
-#include "hollywood/scenes/animation_layers.h"
-#include "hollywood/scenes/animation_player.h"
-#include "hollywood/scenes/playable/action_overlay.h"
-#include "hollywood/scenes/playable/action_overlay_player.h"
-#include "hollywood/scenes/playable/actor_path_controller.h"
-#include "hollywood/scenes/playable/actor_types.h"
-#include "hollywood/scenes/playable/ambient_audio.h"
-#include "hollywood/scenes/playable/scene_config.h"
-#include "hollywood/scenes/playable/scene_surface_state.h"
-#include "hollywood/scenes/playable/speech_controller.h"
-#include "hollywood/scenes/scene_data.h"
-#include "hollywood/scenes/scene_resources.h"
-#include "hollywood/scenes/scene_text_store.h"
-#include "hollywood/scenes/speech_overlay.h"
+#include "hollywood/monsters/scenes/animation_channels.h"
+#include "hollywood/monsters/scenes/animation_layers.h"
+#include "hollywood/monsters/scenes/animation_player.h"
+#include "hollywood/monsters/scenes/playable/action_overlay.h"
+#include "hollywood/monsters/scenes/playable/action_overlay_player.h"
+#include "hollywood/monsters/scenes/playable/actor_path_controller.h"
+#include "hollywood/monsters/scenes/playable/actor_types.h"
+#include "hollywood/monsters/scenes/playable/ambient_audio.h"
+#include "hollywood/monsters/scenes/playable/scene_config.h"
+#include "hollywood/monsters/scenes/playable/scene_surface_state.h"
+#include "hollywood/monsters/scenes/playable/speech_controller.h"
+#include "hollywood/monsters/scenes/scene_data.h"
+#include "hollywood/monsters/scenes/scene_resources.h"
+#include "hollywood/scene_text_store.h"
+#include "hollywood/monsters/scenes/speech_overlay.h"
namespace Graphics {
struct Surface;
@@ -817,4 +817,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_PLAYABLE_SCENE_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_PLAYABLE_SCENE_H
diff --git a/engines/hollywood/scenes/playable/playable_scene_actions.cpp b/engines/hollywood/monsters/scenes/playable/playable_scene_actions.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/playable_scene_actions.cpp
rename to engines/hollywood/monsters/scenes/playable/playable_scene_actions.cpp
index daf958943d4..48e2a0e7b8c 100644
--- a/engines/hollywood/scenes/playable/playable_scene_actions.cpp
+++ b/engines/hollywood/monsters/scenes/playable/playable_scene_actions.cpp
@@ -23,10 +23,10 @@
#include "common/events.h"
#include "common/system.h"
-#include "hollywood/hollywood.h"
+#include "hollywood/monsters/hollywood.h"
#include "hollywood/debug.h"
-#include "hollywood/gameplay/cursor.h"
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/gameplay/cursor.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene1010.cpp b/engines/hollywood/monsters/scenes/playable/scene1010.cpp
similarity index 97%
rename from engines/hollywood/scenes/playable/scene1010.cpp
rename to engines/hollywood/monsters/scenes/playable/scene1010.cpp
index 381e4ddaaef..3d1db5a8245 100644
--- a/engines/hollywood/scenes/playable/scene1010.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene1010.cpp
@@ -21,11 +21,11 @@
#include "common/debug.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene1010.h"
-#include "hollywood/scenes/shared_frame_sequences.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene1010.h"
+#include "hollywood/monsters/scenes/shared_frame_sequences.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene1010.h b/engines/hollywood/monsters/scenes/playable/scene1010.h
similarity index 92%
rename from engines/hollywood/scenes/playable/scene1010.h
rename to engines/hollywood/monsters/scenes/playable/scene1010.h
index 5ce6e6a710f..90851790955 100644
--- a/engines/hollywood/scenes/playable/scene1010.h
+++ b/engines/hollywood/monsters/scenes/playable/scene1010.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE1010_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE1010_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1010_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1010_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene1020.cpp b/engines/hollywood/monsters/scenes/playable/scene1020.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene1020.cpp
rename to engines/hollywood/monsters/scenes/playable/scene1020.cpp
index 8c21f704f3e..047b43bf3fa 100644
--- a/engines/hollywood/scenes/playable/scene1020.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene1020.cpp
@@ -21,11 +21,11 @@
#include "common/debug.h"
-#include "hollywood/hollywood.h"
+#include "hollywood/monsters/hollywood.h"
#include "hollywood/debug.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene1020.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene1020.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene1020.h b/engines/hollywood/monsters/scenes/playable/scene1020.h
similarity index 93%
rename from engines/hollywood/scenes/playable/scene1020.h
rename to engines/hollywood/monsters/scenes/playable/scene1020.h
index bcf2b673815..82617cb8b09 100644
--- a/engines/hollywood/scenes/playable/scene1020.h
+++ b/engines/hollywood/monsters/scenes/playable/scene1020.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE1020_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE1020_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1020_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1020_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -76,4 +76,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE1020_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1020_H
diff --git a/engines/hollywood/scenes/playable/scene1030.cpp b/engines/hollywood/monsters/scenes/playable/scene1030.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene1030.cpp
rename to engines/hollywood/monsters/scenes/playable/scene1030.cpp
index 62ac2029623..0a8ac64b0a6 100644
--- a/engines/hollywood/scenes/playable/scene1030.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene1030.cpp
@@ -21,12 +21,12 @@
#include "common/debug.h"
-#include "hollywood/hollywood.h"
+#include "hollywood/monsters/hollywood.h"
#include "hollywood/debug.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene1030.h"
-#include "hollywood/scenes/shared_frame_sequences.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene1030.h"
+#include "hollywood/monsters/scenes/shared_frame_sequences.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene1030.h b/engines/hollywood/monsters/scenes/playable/scene1030.h
similarity index 93%
rename from engines/hollywood/scenes/playable/scene1030.h
rename to engines/hollywood/monsters/scenes/playable/scene1030.h
index f1e81a3ad16..40480cbd189 100644
--- a/engines/hollywood/scenes/playable/scene1030.h
+++ b/engines/hollywood/monsters/scenes/playable/scene1030.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE1030_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE1030_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1030_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1030_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -88,4 +88,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE1030_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1030_H
diff --git a/engines/hollywood/scenes/playable/scene1040.cpp b/engines/hollywood/monsters/scenes/playable/scene1040.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene1040.cpp
rename to engines/hollywood/monsters/scenes/playable/scene1040.cpp
index 616ef579e13..744d9c7b378 100644
--- a/engines/hollywood/scenes/playable/scene1040.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene1040.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene1040.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene1040.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene1040.h b/engines/hollywood/monsters/scenes/playable/scene1040.h
similarity index 89%
rename from engines/hollywood/scenes/playable/scene1040.h
rename to engines/hollywood/monsters/scenes/playable/scene1040.h
index 6a6791d25c4..5dace5f50ab 100644
--- a/engines/hollywood/scenes/playable/scene1040.h
+++ b/engines/hollywood/monsters/scenes/playable/scene1040.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE1040_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE1040_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1040_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1040_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -57,4 +57,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE1040_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1040_H
diff --git a/engines/hollywood/scenes/playable/scene1050.cpp b/engines/hollywood/monsters/scenes/playable/scene1050.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene1050.cpp
rename to engines/hollywood/monsters/scenes/playable/scene1050.cpp
index dda025ae6a3..857b604c537 100644
--- a/engines/hollywood/scenes/playable/scene1050.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene1050.cpp
@@ -19,11 +19,11 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene1050.h"
-#include "hollywood/scenes/shared_frame_sequences.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene1050.h"
+#include "hollywood/monsters/scenes/shared_frame_sequences.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene1050.h b/engines/hollywood/monsters/scenes/playable/scene1050.h
similarity index 92%
rename from engines/hollywood/scenes/playable/scene1050.h
rename to engines/hollywood/monsters/scenes/playable/scene1050.h
index 85df3d8038b..7e215c722e7 100644
--- a/engines/hollywood/scenes/playable/scene1050.h
+++ b/engines/hollywood/monsters/scenes/playable/scene1050.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE1050_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE1050_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1050_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1050_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -75,4 +75,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE1050_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1050_H
diff --git a/engines/hollywood/scenes/playable/scene1060.cpp b/engines/hollywood/monsters/scenes/playable/scene1060.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene1060.cpp
rename to engines/hollywood/monsters/scenes/playable/scene1060.cpp
index 071030b7512..beb228ba2cc 100644
--- a/engines/hollywood/scenes/playable/scene1060.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene1060.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene1060.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene1060.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene1060.h b/engines/hollywood/monsters/scenes/playable/scene1060.h
similarity index 95%
rename from engines/hollywood/scenes/playable/scene1060.h
rename to engines/hollywood/monsters/scenes/playable/scene1060.h
index 91169220531..ea155c1bac8 100644
--- a/engines/hollywood/scenes/playable/scene1060.h
+++ b/engines/hollywood/monsters/scenes/playable/scene1060.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE1060_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE1060_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1060_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1060_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -117,4 +117,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE1060_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1060_H
diff --git a/engines/hollywood/scenes/playable/scene1070.cpp b/engines/hollywood/monsters/scenes/playable/scene1070.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene1070.cpp
rename to engines/hollywood/monsters/scenes/playable/scene1070.cpp
index a5b6164c7ef..785ea4ef22d 100644
--- a/engines/hollywood/scenes/playable/scene1070.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene1070.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene1070.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene1070.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene1070.h b/engines/hollywood/monsters/scenes/playable/scene1070.h
similarity index 93%
rename from engines/hollywood/scenes/playable/scene1070.h
rename to engines/hollywood/monsters/scenes/playable/scene1070.h
index 4269f0ac62e..2f197bbba55 100644
--- a/engines/hollywood/scenes/playable/scene1070.h
+++ b/engines/hollywood/monsters/scenes/playable/scene1070.h
@@ -19,11 +19,11 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE1070_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE1070_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1070_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1070_H
-#include "hollywood/gameplay/dialogue_menu.h"
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/gameplay/dialogue_menu.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -97,4 +97,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE1070_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1070_H
diff --git a/engines/hollywood/scenes/playable/scene1080.cpp b/engines/hollywood/monsters/scenes/playable/scene1080.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene1080.cpp
rename to engines/hollywood/monsters/scenes/playable/scene1080.cpp
index 692dd9c389d..97b6afee201 100644
--- a/engines/hollywood/scenes/playable/scene1080.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene1080.cpp
@@ -19,11 +19,11 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene1080.h"
-#include "hollywood/scenes/shared_frame_sequences.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene1080.h"
+#include "hollywood/monsters/scenes/shared_frame_sequences.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene1080.h b/engines/hollywood/monsters/scenes/playable/scene1080.h
similarity index 90%
rename from engines/hollywood/scenes/playable/scene1080.h
rename to engines/hollywood/monsters/scenes/playable/scene1080.h
index 8393b1af7b4..f01357378d6 100644
--- a/engines/hollywood/scenes/playable/scene1080.h
+++ b/engines/hollywood/monsters/scenes/playable/scene1080.h
@@ -19,11 +19,11 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE1080_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE1080_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1080_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1080_H
-#include "hollywood/gameplay/dialogue_menu.h"
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/gameplay/dialogue_menu.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -72,4 +72,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE1080_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1080_H
diff --git a/engines/hollywood/scenes/playable/scene1090.cpp b/engines/hollywood/monsters/scenes/playable/scene1090.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene1090.cpp
rename to engines/hollywood/monsters/scenes/playable/scene1090.cpp
index 7c2e571c920..47722da25f8 100644
--- a/engines/hollywood/scenes/playable/scene1090.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene1090.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene1090.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene1090.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene1090.h b/engines/hollywood/monsters/scenes/playable/scene1090.h
similarity index 91%
rename from engines/hollywood/scenes/playable/scene1090.h
rename to engines/hollywood/monsters/scenes/playable/scene1090.h
index d1bd432a0d2..7b28eae79fc 100644
--- a/engines/hollywood/scenes/playable/scene1090.h
+++ b/engines/hollywood/monsters/scenes/playable/scene1090.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE1090_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE1090_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1090_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1090_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -61,4 +61,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE1090_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1090_H
diff --git a/engines/hollywood/scenes/playable/scene2000.cpp b/engines/hollywood/monsters/scenes/playable/scene2000.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene2000.cpp
rename to engines/hollywood/monsters/scenes/playable/scene2000.cpp
index 6527f9892fb..cfe5d1be958 100644
--- a/engines/hollywood/scenes/playable/scene2000.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene2000.cpp
@@ -19,8 +19,8 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/scenes/playable/scene2000.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/scenes/playable/scene2000.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene2000.h b/engines/hollywood/monsters/scenes/playable/scene2000.h
similarity index 86%
rename from engines/hollywood/scenes/playable/scene2000.h
rename to engines/hollywood/monsters/scenes/playable/scene2000.h
index 7418cebffa3..c04a80f8c7d 100644
--- a/engines/hollywood/scenes/playable/scene2000.h
+++ b/engines/hollywood/monsters/scenes/playable/scene2000.h
@@ -19,13 +19,13 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE2000_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE2000_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2000_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2000_H
#include "common/random.h"
-#include "hollywood/music.h"
-#include "hollywood/scenes/chapter_intro_scene.h"
+#include "hollywood/monsters/music.h"
+#include "hollywood/monsters/scenes/chapter_intro_scene.h"
namespace Hollywood {
@@ -60,4 +60,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE2000_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2000_H
diff --git a/engines/hollywood/scenes/playable/scene2010.cpp b/engines/hollywood/monsters/scenes/playable/scene2010.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene2010.cpp
rename to engines/hollywood/monsters/scenes/playable/scene2010.cpp
index a44bde57a5e..5166a84b0e9 100644
--- a/engines/hollywood/scenes/playable/scene2010.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene2010.cpp
@@ -21,10 +21,10 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene2010.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene2010.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene2010.h b/engines/hollywood/monsters/scenes/playable/scene2010.h
similarity index 91%
rename from engines/hollywood/scenes/playable/scene2010.h
rename to engines/hollywood/monsters/scenes/playable/scene2010.h
index 7fb1e191fea..67923d3ec03 100644
--- a/engines/hollywood/scenes/playable/scene2010.h
+++ b/engines/hollywood/monsters/scenes/playable/scene2010.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE2010_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE2010_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2010_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2010_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -64,4 +64,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE2010_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2010_H
diff --git a/engines/hollywood/scenes/playable/scene2020.cpp b/engines/hollywood/monsters/scenes/playable/scene2020.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene2020.cpp
rename to engines/hollywood/monsters/scenes/playable/scene2020.cpp
index dca01ab0da6..f09da989330 100644
--- a/engines/hollywood/scenes/playable/scene2020.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene2020.cpp
@@ -21,10 +21,10 @@
#include "common/rect.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene2020.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene2020.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene2020.h b/engines/hollywood/monsters/scenes/playable/scene2020.h
similarity index 94%
rename from engines/hollywood/scenes/playable/scene2020.h
rename to engines/hollywood/monsters/scenes/playable/scene2020.h
index 02c53faff7d..75025b64d39 100644
--- a/engines/hollywood/scenes/playable/scene2020.h
+++ b/engines/hollywood/monsters/scenes/playable/scene2020.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE2020_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE2020_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2020_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2020_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -104,4 +104,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE2020_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2020_H
diff --git a/engines/hollywood/scenes/playable/scene2030.cpp b/engines/hollywood/monsters/scenes/playable/scene2030.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene2030.cpp
rename to engines/hollywood/monsters/scenes/playable/scene2030.cpp
index 336fc313c70..c7852cad876 100644
--- a/engines/hollywood/scenes/playable/scene2030.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene2030.cpp
@@ -19,12 +19,12 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/dialogue_menu.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene2030.h"
-#include "hollywood/scenes/resource_delta_clip_player.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/dialogue_menu.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene2030.h"
+#include "hollywood/monsters/scenes/resource_delta_clip_player.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene2030.h b/engines/hollywood/monsters/scenes/playable/scene2030.h
similarity index 95%
rename from engines/hollywood/scenes/playable/scene2030.h
rename to engines/hollywood/monsters/scenes/playable/scene2030.h
index 5e2c7648dda..4099cebc963 100644
--- a/engines/hollywood/scenes/playable/scene2030.h
+++ b/engines/hollywood/monsters/scenes/playable/scene2030.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE2030_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE2030_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2030_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2030_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -108,4 +108,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE2030_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2030_H
diff --git a/engines/hollywood/scenes/playable/scene2040.cpp b/engines/hollywood/monsters/scenes/playable/scene2040.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene2040.cpp
rename to engines/hollywood/monsters/scenes/playable/scene2040.cpp
index a7c2eccb9d2..911bcaf64f5 100644
--- a/engines/hollywood/scenes/playable/scene2040.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene2040.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene2040.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene2040.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene2040.h b/engines/hollywood/monsters/scenes/playable/scene2040.h
similarity index 92%
rename from engines/hollywood/scenes/playable/scene2040.h
rename to engines/hollywood/monsters/scenes/playable/scene2040.h
index 4261aad4365..a7555c8f459 100644
--- a/engines/hollywood/scenes/playable/scene2040.h
+++ b/engines/hollywood/monsters/scenes/playable/scene2040.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE2040_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE2040_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2040_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2040_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -78,4 +78,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE2040_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2040_H
diff --git a/engines/hollywood/scenes/playable/scene2050.cpp b/engines/hollywood/monsters/scenes/playable/scene2050.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene2050.cpp
rename to engines/hollywood/monsters/scenes/playable/scene2050.cpp
index afc6bb3438f..9fff6cb01e6 100644
--- a/engines/hollywood/scenes/playable/scene2050.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene2050.cpp
@@ -22,10 +22,10 @@
#include "common/events.h"
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene2050.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene2050.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene2050.h b/engines/hollywood/monsters/scenes/playable/scene2050.h
similarity index 93%
rename from engines/hollywood/scenes/playable/scene2050.h
rename to engines/hollywood/monsters/scenes/playable/scene2050.h
index f7634a13da3..6d0a27b0212 100644
--- a/engines/hollywood/scenes/playable/scene2050.h
+++ b/engines/hollywood/monsters/scenes/playable/scene2050.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE2050_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE2050_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2050_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2050_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -93,4 +93,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE2050_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2050_H
diff --git a/engines/hollywood/scenes/playable/scene2060.cpp b/engines/hollywood/monsters/scenes/playable/scene2060.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene2060.cpp
rename to engines/hollywood/monsters/scenes/playable/scene2060.cpp
index a1af3799eb0..a64534ae80c 100644
--- a/engines/hollywood/scenes/playable/scene2060.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene2060.cpp
@@ -21,12 +21,12 @@
#include "common/endian.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/game_strings.h"
-#include "hollywood/gameplay/actor_renderer.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene2060.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/game_strings.h"
+#include "hollywood/monsters/gameplay/actor_renderer.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene2060.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene2060.h b/engines/hollywood/monsters/scenes/playable/scene2060.h
similarity index 92%
rename from engines/hollywood/scenes/playable/scene2060.h
rename to engines/hollywood/monsters/scenes/playable/scene2060.h
index 36c6e86f8fa..8d6c8843ff8 100644
--- a/engines/hollywood/scenes/playable/scene2060.h
+++ b/engines/hollywood/monsters/scenes/playable/scene2060.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE2060_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE2060_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2060_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2060_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -75,4 +75,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE2060_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2060_H
diff --git a/engines/hollywood/scenes/playable/scene2070.cpp b/engines/hollywood/monsters/scenes/playable/scene2070.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene2070.cpp
rename to engines/hollywood/monsters/scenes/playable/scene2070.cpp
index ed46f1aed19..9237f6c46f6 100644
--- a/engines/hollywood/scenes/playable/scene2070.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene2070.cpp
@@ -21,10 +21,10 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene2070.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene2070.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene2070.h b/engines/hollywood/monsters/scenes/playable/scene2070.h
similarity index 89%
rename from engines/hollywood/scenes/playable/scene2070.h
rename to engines/hollywood/monsters/scenes/playable/scene2070.h
index b66f08b4d11..8fd795917d3 100644
--- a/engines/hollywood/scenes/playable/scene2070.h
+++ b/engines/hollywood/monsters/scenes/playable/scene2070.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE2070_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE2070_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2070_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2070_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -60,4 +60,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE2070_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2070_H
diff --git a/engines/hollywood/scenes/playable/scene2080.cpp b/engines/hollywood/monsters/scenes/playable/scene2080.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene2080.cpp
rename to engines/hollywood/monsters/scenes/playable/scene2080.cpp
index fc0a9eb75bb..0b9a0c35073 100644
--- a/engines/hollywood/scenes/playable/scene2080.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene2080.cpp
@@ -21,10 +21,10 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene2080.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene2080.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene2080.h b/engines/hollywood/monsters/scenes/playable/scene2080.h
similarity index 95%
rename from engines/hollywood/scenes/playable/scene2080.h
rename to engines/hollywood/monsters/scenes/playable/scene2080.h
index de3ce3d027c..37d0e8143c8 100644
--- a/engines/hollywood/scenes/playable/scene2080.h
+++ b/engines/hollywood/monsters/scenes/playable/scene2080.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE2080_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE2080_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2080_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2080_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -103,4 +103,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE2080_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2080_H
diff --git a/engines/hollywood/scenes/playable/scene2090.cpp b/engines/hollywood/monsters/scenes/playable/scene2090.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene2090.cpp
rename to engines/hollywood/monsters/scenes/playable/scene2090.cpp
index 328e95d9e4f..abc2af449cc 100644
--- a/engines/hollywood/scenes/playable/scene2090.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene2090.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene2090.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene2090.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene2090.h b/engines/hollywood/monsters/scenes/playable/scene2090.h
similarity index 91%
rename from engines/hollywood/scenes/playable/scene2090.h
rename to engines/hollywood/monsters/scenes/playable/scene2090.h
index 9e58d88266a..b1a1f2f612e 100644
--- a/engines/hollywood/scenes/playable/scene2090.h
+++ b/engines/hollywood/monsters/scenes/playable/scene2090.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE2090_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE2090_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2090_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2090_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -65,4 +65,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE2090_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2090_H
diff --git a/engines/hollywood/scenes/playable/scene2100.cpp b/engines/hollywood/monsters/scenes/playable/scene2100.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene2100.cpp
rename to engines/hollywood/monsters/scenes/playable/scene2100.cpp
index 2aca3ab50e9..2a982bf2849 100644
--- a/engines/hollywood/scenes/playable/scene2100.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene2100.cpp
@@ -21,11 +21,11 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene2100.h"
-#include "hollywood/scenes/shared_frame_sequences.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene2100.h"
+#include "hollywood/monsters/scenes/shared_frame_sequences.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene2100.h b/engines/hollywood/monsters/scenes/playable/scene2100.h
similarity index 94%
rename from engines/hollywood/scenes/playable/scene2100.h
rename to engines/hollywood/monsters/scenes/playable/scene2100.h
index 3c5f31dffff..20e01921cd9 100644
--- a/engines/hollywood/scenes/playable/scene2100.h
+++ b/engines/hollywood/monsters/scenes/playable/scene2100.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE2100_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE2100_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2100_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2100_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -102,4 +102,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE2100_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2100_H
diff --git a/engines/hollywood/scenes/playable/scene2110.cpp b/engines/hollywood/monsters/scenes/playable/scene2110.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene2110.cpp
rename to engines/hollywood/monsters/scenes/playable/scene2110.cpp
index e6ebbe6a3ce..546001b8e48 100644
--- a/engines/hollywood/scenes/playable/scene2110.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene2110.cpp
@@ -21,10 +21,10 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/frankenstein_reward.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/scenes/playable/scene2110.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/frankenstein_reward.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/scenes/playable/scene2110.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene2110.h b/engines/hollywood/monsters/scenes/playable/scene2110.h
similarity index 91%
rename from engines/hollywood/scenes/playable/scene2110.h
rename to engines/hollywood/monsters/scenes/playable/scene2110.h
index 3992764f9c0..e6a31f841d2 100644
--- a/engines/hollywood/scenes/playable/scene2110.h
+++ b/engines/hollywood/monsters/scenes/playable/scene2110.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE2110_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE2110_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2110_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2110_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -65,4 +65,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE2110_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2110_H
diff --git a/engines/hollywood/scenes/playable/scene3000.cpp b/engines/hollywood/monsters/scenes/playable/scene3000.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene3000.cpp
rename to engines/hollywood/monsters/scenes/playable/scene3000.cpp
index c9ab1ae002c..0f305f4ad5a 100644
--- a/engines/hollywood/scenes/playable/scene3000.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene3000.cpp
@@ -19,8 +19,8 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/scenes/playable/scene3000.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/scenes/playable/scene3000.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene3000.h b/engines/hollywood/monsters/scenes/playable/scene3000.h
similarity index 87%
rename from engines/hollywood/scenes/playable/scene3000.h
rename to engines/hollywood/monsters/scenes/playable/scene3000.h
index 6b5c4b5a4b3..ad1836c3e10 100644
--- a/engines/hollywood/scenes/playable/scene3000.h
+++ b/engines/hollywood/monsters/scenes/playable/scene3000.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE3000_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE3000_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3000_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3000_H
-#include "hollywood/scenes/chapter_intro_scene.h"
+#include "hollywood/monsters/scenes/chapter_intro_scene.h"
namespace Hollywood {
@@ -53,4 +53,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE3000_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3000_H
diff --git a/engines/hollywood/scenes/playable/scene3010.cpp b/engines/hollywood/monsters/scenes/playable/scene3010.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene3010.cpp
rename to engines/hollywood/monsters/scenes/playable/scene3010.cpp
index 5bf613f6045..37b64396aed 100644
--- a/engines/hollywood/scenes/playable/scene3010.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene3010.cpp
@@ -19,11 +19,11 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene3010.h"
-#include "hollywood/scenes/resource_delta_clip_player.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene3010.h"
+#include "hollywood/monsters/scenes/resource_delta_clip_player.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene3010.h b/engines/hollywood/monsters/scenes/playable/scene3010.h
similarity index 92%
rename from engines/hollywood/scenes/playable/scene3010.h
rename to engines/hollywood/monsters/scenes/playable/scene3010.h
index 345bf7f8f91..dc05ab8e4a9 100644
--- a/engines/hollywood/scenes/playable/scene3010.h
+++ b/engines/hollywood/monsters/scenes/playable/scene3010.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE3010_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE3010_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3010_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3010_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -71,4 +71,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE3010_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3010_H
diff --git a/engines/hollywood/scenes/playable/scene3020.cpp b/engines/hollywood/monsters/scenes/playable/scene3020.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene3020.cpp
rename to engines/hollywood/monsters/scenes/playable/scene3020.cpp
index 886d91d5abf..ff440730bd7 100644
--- a/engines/hollywood/scenes/playable/scene3020.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene3020.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene3020.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene3020.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene3020.h b/engines/hollywood/monsters/scenes/playable/scene3020.h
similarity index 90%
rename from engines/hollywood/scenes/playable/scene3020.h
rename to engines/hollywood/monsters/scenes/playable/scene3020.h
index 09150c2426c..516507fabf9 100644
--- a/engines/hollywood/scenes/playable/scene3020.h
+++ b/engines/hollywood/monsters/scenes/playable/scene3020.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE3020_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE3020_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3020_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3020_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -59,4 +59,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE3020_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3020_H
diff --git a/engines/hollywood/scenes/playable/scene3030.cpp b/engines/hollywood/monsters/scenes/playable/scene3030.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene3030.cpp
rename to engines/hollywood/monsters/scenes/playable/scene3030.cpp
index cc6cde5bddc..a40fb1ca31f 100644
--- a/engines/hollywood/scenes/playable/scene3030.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene3030.cpp
@@ -19,11 +19,11 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene3030.h"
-#include "hollywood/scenes/resource_delta_clip_player.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene3030.h"
+#include "hollywood/monsters/scenes/resource_delta_clip_player.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene3030.h b/engines/hollywood/monsters/scenes/playable/scene3030.h
similarity index 91%
rename from engines/hollywood/scenes/playable/scene3030.h
rename to engines/hollywood/monsters/scenes/playable/scene3030.h
index a00134e4761..6b70e60330e 100644
--- a/engines/hollywood/scenes/playable/scene3030.h
+++ b/engines/hollywood/monsters/scenes/playable/scene3030.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE3030_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE3030_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3030_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3030_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -66,4 +66,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE3030_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3030_H
diff --git a/engines/hollywood/scenes/playable/scene3040.cpp b/engines/hollywood/monsters/scenes/playable/scene3040.cpp
similarity index 97%
rename from engines/hollywood/scenes/playable/scene3040.cpp
rename to engines/hollywood/monsters/scenes/playable/scene3040.cpp
index 1eb0442878c..29637e00cce 100644
--- a/engines/hollywood/scenes/playable/scene3040.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene3040.cpp
@@ -21,10 +21,10 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene3040.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene3040.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene3040.h b/engines/hollywood/monsters/scenes/playable/scene3040.h
similarity index 89%
rename from engines/hollywood/scenes/playable/scene3040.h
rename to engines/hollywood/monsters/scenes/playable/scene3040.h
index df3f0d0d237..d6772accfce 100644
--- a/engines/hollywood/scenes/playable/scene3040.h
+++ b/engines/hollywood/monsters/scenes/playable/scene3040.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE3040_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE3040_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3040_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3040_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -60,4 +60,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE3040_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3040_H
diff --git a/engines/hollywood/scenes/playable/scene3050.cpp b/engines/hollywood/monsters/scenes/playable/scene3050.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene3050.cpp
rename to engines/hollywood/monsters/scenes/playable/scene3050.cpp
index ed82e662e8e..633cbb8145c 100644
--- a/engines/hollywood/scenes/playable/scene3050.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene3050.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene3050.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene3050.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene3050.h b/engines/hollywood/monsters/scenes/playable/scene3050.h
similarity index 92%
rename from engines/hollywood/scenes/playable/scene3050.h
rename to engines/hollywood/monsters/scenes/playable/scene3050.h
index d19588d8d82..d813a476c0d 100644
--- a/engines/hollywood/scenes/playable/scene3050.h
+++ b/engines/hollywood/monsters/scenes/playable/scene3050.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE3050_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE3050_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3050_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3050_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -78,4 +78,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE3050_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3050_H
diff --git a/engines/hollywood/scenes/playable/scene3060.cpp b/engines/hollywood/monsters/scenes/playable/scene3060.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene3060.cpp
rename to engines/hollywood/monsters/scenes/playable/scene3060.cpp
index 6fc57b45fa6..14784a731d8 100644
--- a/engines/hollywood/scenes/playable/scene3060.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene3060.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene3060.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene3060.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene3060.h b/engines/hollywood/monsters/scenes/playable/scene3060.h
similarity index 93%
rename from engines/hollywood/scenes/playable/scene3060.h
rename to engines/hollywood/monsters/scenes/playable/scene3060.h
index e0fc705d5a1..5945eea22fa 100644
--- a/engines/hollywood/scenes/playable/scene3060.h
+++ b/engines/hollywood/monsters/scenes/playable/scene3060.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE3060_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE3060_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3060_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3060_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -79,4 +79,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE3060_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3060_H
diff --git a/engines/hollywood/scenes/playable/scene3070.cpp b/engines/hollywood/monsters/scenes/playable/scene3070.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene3070.cpp
rename to engines/hollywood/monsters/scenes/playable/scene3070.cpp
index 382e5d4b79e..cc3df7783d2 100644
--- a/engines/hollywood/scenes/playable/scene3070.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene3070.cpp
@@ -19,11 +19,11 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene3070.h"
-#include "hollywood/scenes/shared_frame_sequences.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene3070.h"
+#include "hollywood/monsters/scenes/shared_frame_sequences.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene3070.h b/engines/hollywood/monsters/scenes/playable/scene3070.h
similarity index 93%
rename from engines/hollywood/scenes/playable/scene3070.h
rename to engines/hollywood/monsters/scenes/playable/scene3070.h
index 03f8468bd81..cf6d8b08b31 100644
--- a/engines/hollywood/scenes/playable/scene3070.h
+++ b/engines/hollywood/monsters/scenes/playable/scene3070.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE3070_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE3070_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3070_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3070_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -80,4 +80,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE3070_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3070_H
diff --git a/engines/hollywood/scenes/playable/scene3080.cpp b/engines/hollywood/monsters/scenes/playable/scene3080.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene3080.cpp
rename to engines/hollywood/monsters/scenes/playable/scene3080.cpp
index 8f47f946924..86cff8dc851 100644
--- a/engines/hollywood/scenes/playable/scene3080.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene3080.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene3080.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene3080.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene3080.h b/engines/hollywood/monsters/scenes/playable/scene3080.h
similarity index 91%
rename from engines/hollywood/scenes/playable/scene3080.h
rename to engines/hollywood/monsters/scenes/playable/scene3080.h
index f078bfbcbaa..fa607bd8149 100644
--- a/engines/hollywood/scenes/playable/scene3080.h
+++ b/engines/hollywood/monsters/scenes/playable/scene3080.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE3080_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE3080_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3080_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3080_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -70,4 +70,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE3080_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3080_H
diff --git a/engines/hollywood/scenes/playable/scene3090.cpp b/engines/hollywood/monsters/scenes/playable/scene3090.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene3090.cpp
rename to engines/hollywood/monsters/scenes/playable/scene3090.cpp
index 63cfd8ce70f..5cd8afe4895 100644
--- a/engines/hollywood/scenes/playable/scene3090.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene3090.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene3090.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene3090.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene3090.h b/engines/hollywood/monsters/scenes/playable/scene3090.h
similarity index 93%
rename from engines/hollywood/scenes/playable/scene3090.h
rename to engines/hollywood/monsters/scenes/playable/scene3090.h
index e14d7bb8087..4a941651659 100644
--- a/engines/hollywood/scenes/playable/scene3090.h
+++ b/engines/hollywood/monsters/scenes/playable/scene3090.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE3090_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE3090_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3090_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3090_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -93,4 +93,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE3090_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3090_H
diff --git a/engines/hollywood/scenes/playable/scene3100.cpp b/engines/hollywood/monsters/scenes/playable/scene3100.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene3100.cpp
rename to engines/hollywood/monsters/scenes/playable/scene3100.cpp
index e138b4b93a0..97a6b43d22a 100644
--- a/engines/hollywood/scenes/playable/scene3100.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene3100.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene3100.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene3100.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene3100.h b/engines/hollywood/monsters/scenes/playable/scene3100.h
similarity index 92%
rename from engines/hollywood/scenes/playable/scene3100.h
rename to engines/hollywood/monsters/scenes/playable/scene3100.h
index 6c0de2beee7..58f2a12a6ab 100644
--- a/engines/hollywood/scenes/playable/scene3100.h
+++ b/engines/hollywood/monsters/scenes/playable/scene3100.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE3100_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE3100_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3100_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3100_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -77,4 +77,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE3100_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3100_H
diff --git a/engines/hollywood/scenes/playable/scene3110.cpp b/engines/hollywood/monsters/scenes/playable/scene3110.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene3110.cpp
rename to engines/hollywood/monsters/scenes/playable/scene3110.cpp
index a3c33795f23..2e9a735a59c 100644
--- a/engines/hollywood/scenes/playable/scene3110.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene3110.cpp
@@ -19,9 +19,9 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/scenes/playable/scene3110.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/scenes/playable/scene3110.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene3110.h b/engines/hollywood/monsters/scenes/playable/scene3110.h
similarity index 94%
rename from engines/hollywood/scenes/playable/scene3110.h
rename to engines/hollywood/monsters/scenes/playable/scene3110.h
index f83d26a49be..c6e65142458 100644
--- a/engines/hollywood/scenes/playable/scene3110.h
+++ b/engines/hollywood/monsters/scenes/playable/scene3110.h
@@ -19,15 +19,15 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE3110_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE3110_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3110_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3110_H
#include "common/array.h"
-#include "hollywood/graphics.h"
-#include "hollywood/music.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/music.h"
#include "hollywood/resource.h"
-#include "hollywood/scenes/presentation_scene.h"
+#include "hollywood/monsters/scenes/presentation_scene.h"
namespace Hollywood {
@@ -136,4 +136,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE3110_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE3110_H
diff --git a/engines/hollywood/scenes/playable/scene4000.cpp b/engines/hollywood/monsters/scenes/playable/scene4000.cpp
similarity index 97%
rename from engines/hollywood/scenes/playable/scene4000.cpp
rename to engines/hollywood/monsters/scenes/playable/scene4000.cpp
index 551a4be9e14..3135107ade7 100644
--- a/engines/hollywood/scenes/playable/scene4000.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene4000.cpp
@@ -19,9 +19,9 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene4000.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene4000.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene4000.h b/engines/hollywood/monsters/scenes/playable/scene4000.h
similarity index 87%
rename from engines/hollywood/scenes/playable/scene4000.h
rename to engines/hollywood/monsters/scenes/playable/scene4000.h
index 19ec83ed64a..4ffe484c4b9 100644
--- a/engines/hollywood/scenes/playable/scene4000.h
+++ b/engines/hollywood/monsters/scenes/playable/scene4000.h
@@ -19,13 +19,13 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE4000_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE4000_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4000_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4000_H
#include "common/random.h"
-#include "hollywood/music.h"
-#include "hollywood/scenes/chapter_intro_scene.h"
+#include "hollywood/monsters/music.h"
+#include "hollywood/monsters/scenes/chapter_intro_scene.h"
namespace Hollywood {
@@ -64,4 +64,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE4000_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4000_H
diff --git a/engines/hollywood/scenes/playable/scene4010.cpp b/engines/hollywood/monsters/scenes/playable/scene4010.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene4010.cpp
rename to engines/hollywood/monsters/scenes/playable/scene4010.cpp
index 12179a673b9..d70b5cb6c06 100644
--- a/engines/hollywood/scenes/playable/scene4010.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene4010.cpp
@@ -21,11 +21,11 @@
#include "graphics/pixelformat.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene4010.h"
-#include "hollywood/scenes/shared_frame_sequences.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene4010.h"
+#include "hollywood/monsters/scenes/shared_frame_sequences.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene4010.h b/engines/hollywood/monsters/scenes/playable/scene4010.h
similarity index 95%
rename from engines/hollywood/scenes/playable/scene4010.h
rename to engines/hollywood/monsters/scenes/playable/scene4010.h
index 3c4038f85cb..ed750703f40 100644
--- a/engines/hollywood/scenes/playable/scene4010.h
+++ b/engines/hollywood/monsters/scenes/playable/scene4010.h
@@ -19,12 +19,12 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE4010_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE4010_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4010_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4010_H
#include "graphics/managed_surface.h"
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -119,4 +119,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE4010_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4010_H
diff --git a/engines/hollywood/scenes/playable/scene4020.cpp b/engines/hollywood/monsters/scenes/playable/scene4020.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene4020.cpp
rename to engines/hollywood/monsters/scenes/playable/scene4020.cpp
index 01aa1cce9ef..1bed806f07f 100644
--- a/engines/hollywood/scenes/playable/scene4020.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene4020.cpp
@@ -19,9 +19,9 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/scenes/playable/scene4020.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/scenes/playable/scene4020.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene4020.h b/engines/hollywood/monsters/scenes/playable/scene4020.h
similarity index 87%
rename from engines/hollywood/scenes/playable/scene4020.h
rename to engines/hollywood/monsters/scenes/playable/scene4020.h
index 5c6ef324ab8..afff607157a 100644
--- a/engines/hollywood/scenes/playable/scene4020.h
+++ b/engines/hollywood/monsters/scenes/playable/scene4020.h
@@ -19,11 +19,11 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE4020_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE4020_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4020_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4020_H
-#include "hollywood/scenes/animation_channels.h"
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/animation_channels.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -57,4 +57,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE4020_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4020_H
diff --git a/engines/hollywood/scenes/playable/scene4030.cpp b/engines/hollywood/monsters/scenes/playable/scene4030.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene4030.cpp
rename to engines/hollywood/monsters/scenes/playable/scene4030.cpp
index 9f1dfa1536f..87aae5cb4db 100644
--- a/engines/hollywood/scenes/playable/scene4030.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene4030.cpp
@@ -21,11 +21,11 @@
#include "graphics/managed_surface.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene4030.h"
-#include "hollywood/scenes/resource_delta_clip_player.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene4030.h"
+#include "hollywood/monsters/scenes/resource_delta_clip_player.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene4030.h b/engines/hollywood/monsters/scenes/playable/scene4030.h
similarity index 90%
rename from engines/hollywood/scenes/playable/scene4030.h
rename to engines/hollywood/monsters/scenes/playable/scene4030.h
index ca449797def..f653028d54d 100644
--- a/engines/hollywood/scenes/playable/scene4030.h
+++ b/engines/hollywood/monsters/scenes/playable/scene4030.h
@@ -19,11 +19,11 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE4030_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE4030_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4030_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4030_H
-#include "hollywood/scenes/animation_channels.h"
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/animation_channels.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Graphics {
class ManagedSurface;
@@ -79,4 +79,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE4030_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4030_H
diff --git a/engines/hollywood/scenes/playable/scene4040.cpp b/engines/hollywood/monsters/scenes/playable/scene4040.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene4040.cpp
rename to engines/hollywood/monsters/scenes/playable/scene4040.cpp
index e9ce1e79483..9141d769a5d 100644
--- a/engines/hollywood/scenes/playable/scene4040.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene4040.cpp
@@ -19,11 +19,11 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene4040.h"
-#include "hollywood/scenes/resource_delta_clip_player.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene4040.h"
+#include "hollywood/monsters/scenes/resource_delta_clip_player.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene4040.h b/engines/hollywood/monsters/scenes/playable/scene4040.h
similarity index 92%
rename from engines/hollywood/scenes/playable/scene4040.h
rename to engines/hollywood/monsters/scenes/playable/scene4040.h
index 932d0e85c60..caa11e1cda9 100644
--- a/engines/hollywood/scenes/playable/scene4040.h
+++ b/engines/hollywood/monsters/scenes/playable/scene4040.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE4040_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE4040_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4040_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4040_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -76,4 +76,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE4040_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4040_H
diff --git a/engines/hollywood/scenes/playable/scene4050.cpp b/engines/hollywood/monsters/scenes/playable/scene4050.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene4050.cpp
rename to engines/hollywood/monsters/scenes/playable/scene4050.cpp
index 0b6060ce0c5..c4208564623 100644
--- a/engines/hollywood/scenes/playable/scene4050.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene4050.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene4050.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene4050.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene4050.h b/engines/hollywood/monsters/scenes/playable/scene4050.h
similarity index 92%
rename from engines/hollywood/scenes/playable/scene4050.h
rename to engines/hollywood/monsters/scenes/playable/scene4050.h
index 5fbe5a593d7..9a6b19398c2 100644
--- a/engines/hollywood/scenes/playable/scene4050.h
+++ b/engines/hollywood/monsters/scenes/playable/scene4050.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE4050_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE4050_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4050_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4050_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -75,4 +75,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE4050_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4050_H
diff --git a/engines/hollywood/scenes/playable/scene4060.cpp b/engines/hollywood/monsters/scenes/playable/scene4060.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene4060.cpp
rename to engines/hollywood/monsters/scenes/playable/scene4060.cpp
index 349ced7dca9..477c280dd76 100644
--- a/engines/hollywood/scenes/playable/scene4060.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene4060.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/scenes/intro/demo_montage.h"
-#include "hollywood/scenes/playable/scene4060.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/scenes/intro/demo_montage.h"
+#include "hollywood/monsters/scenes/playable/scene4060.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene4060.h b/engines/hollywood/monsters/scenes/playable/scene4060.h
similarity index 94%
rename from engines/hollywood/scenes/playable/scene4060.h
rename to engines/hollywood/monsters/scenes/playable/scene4060.h
index e30ce982c71..c570bb911ca 100644
--- a/engines/hollywood/scenes/playable/scene4060.h
+++ b/engines/hollywood/monsters/scenes/playable/scene4060.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE4060_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE4060_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4060_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4060_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -96,4 +96,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE4060_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4060_H
diff --git a/engines/hollywood/scenes/playable/scene4070.cpp b/engines/hollywood/monsters/scenes/playable/scene4070.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene4070.cpp
rename to engines/hollywood/monsters/scenes/playable/scene4070.cpp
index 27544769b34..5ae22e9663d 100644
--- a/engines/hollywood/scenes/playable/scene4070.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene4070.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/frankenstein_reward.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/scenes/playable/scene4070.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/frankenstein_reward.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/scenes/playable/scene4070.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene4070.h b/engines/hollywood/monsters/scenes/playable/scene4070.h
similarity index 93%
rename from engines/hollywood/scenes/playable/scene4070.h
rename to engines/hollywood/monsters/scenes/playable/scene4070.h
index bbd053fd934..9148fe1d41c 100644
--- a/engines/hollywood/scenes/playable/scene4070.h
+++ b/engines/hollywood/monsters/scenes/playable/scene4070.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE4070_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE4070_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4070_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4070_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -89,4 +89,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE4070_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4070_H
diff --git a/engines/hollywood/scenes/playable/scene4080.cpp b/engines/hollywood/monsters/scenes/playable/scene4080.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene4080.cpp
rename to engines/hollywood/monsters/scenes/playable/scene4080.cpp
index b696d4b3265..98965f20f15 100644
--- a/engines/hollywood/scenes/playable/scene4080.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene4080.cpp
@@ -19,11 +19,11 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene4080.h"
-#include "hollywood/scenes/shared_frame_sequences.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene4080.h"
+#include "hollywood/monsters/scenes/shared_frame_sequences.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene4080.h b/engines/hollywood/monsters/scenes/playable/scene4080.h
similarity index 94%
rename from engines/hollywood/scenes/playable/scene4080.h
rename to engines/hollywood/monsters/scenes/playable/scene4080.h
index 0158c41e47a..5c73a33e0b9 100644
--- a/engines/hollywood/scenes/playable/scene4080.h
+++ b/engines/hollywood/monsters/scenes/playable/scene4080.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE4080_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE4080_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4080_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4080_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -94,4 +94,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE4080_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4080_H
diff --git a/engines/hollywood/scenes/playable/scene4090.cpp b/engines/hollywood/monsters/scenes/playable/scene4090.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene4090.cpp
rename to engines/hollywood/monsters/scenes/playable/scene4090.cpp
index e0bbf4a561d..46483c6e200 100644
--- a/engines/hollywood/scenes/playable/scene4090.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene4090.cpp
@@ -19,12 +19,12 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/game_strings.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene4090.h"
-#include "hollywood/scenes/shared_frame_sequences.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/game_strings.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene4090.h"
+#include "hollywood/monsters/scenes/shared_frame_sequences.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene4090.h b/engines/hollywood/monsters/scenes/playable/scene4090.h
similarity index 93%
rename from engines/hollywood/scenes/playable/scene4090.h
rename to engines/hollywood/monsters/scenes/playable/scene4090.h
index ce599abe315..f72bda55e72 100644
--- a/engines/hollywood/scenes/playable/scene4090.h
+++ b/engines/hollywood/monsters/scenes/playable/scene4090.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE4090_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE4090_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4090_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4090_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -90,4 +90,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE4090_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4090_H
diff --git a/engines/hollywood/scenes/playable/scene4100.cpp b/engines/hollywood/monsters/scenes/playable/scene4100.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene4100.cpp
rename to engines/hollywood/monsters/scenes/playable/scene4100.cpp
index 451e75d08d7..b57c50feea2 100644
--- a/engines/hollywood/scenes/playable/scene4100.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene4100.cpp
@@ -19,9 +19,9 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/scenes/playable/scene4100.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/scenes/playable/scene4100.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene4100.h b/engines/hollywood/monsters/scenes/playable/scene4100.h
similarity index 91%
rename from engines/hollywood/scenes/playable/scene4100.h
rename to engines/hollywood/monsters/scenes/playable/scene4100.h
index 603695b7037..c79258c8352 100644
--- a/engines/hollywood/scenes/playable/scene4100.h
+++ b/engines/hollywood/monsters/scenes/playable/scene4100.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE4100_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE4100_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4100_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4100_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -65,4 +65,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE4100_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4100_H
diff --git a/engines/hollywood/scenes/playable/scene4110.cpp b/engines/hollywood/monsters/scenes/playable/scene4110.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene4110.cpp
rename to engines/hollywood/monsters/scenes/playable/scene4110.cpp
index 446523489e5..fb6b2ec79f3 100644
--- a/engines/hollywood/scenes/playable/scene4110.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene4110.cpp
@@ -19,9 +19,9 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/scenes/playable/scene4110.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/scenes/playable/scene4110.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene4110.h b/engines/hollywood/monsters/scenes/playable/scene4110.h
similarity index 90%
rename from engines/hollywood/scenes/playable/scene4110.h
rename to engines/hollywood/monsters/scenes/playable/scene4110.h
index 3e1c5f2ec83..f41c810152a 100644
--- a/engines/hollywood/scenes/playable/scene4110.h
+++ b/engines/hollywood/monsters/scenes/playable/scene4110.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE4110_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE4110_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4110_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4110_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -68,4 +68,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE4110_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE4110_H
diff --git a/engines/hollywood/scenes/playable/scene5000.cpp b/engines/hollywood/monsters/scenes/playable/scene5000.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene5000.cpp
rename to engines/hollywood/monsters/scenes/playable/scene5000.cpp
index 3037b37b465..8d6ad631da9 100644
--- a/engines/hollywood/scenes/playable/scene5000.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene5000.cpp
@@ -19,8 +19,8 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/scenes/playable/scene5000.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/scenes/playable/scene5000.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene5000.h b/engines/hollywood/monsters/scenes/playable/scene5000.h
similarity index 88%
rename from engines/hollywood/scenes/playable/scene5000.h
rename to engines/hollywood/monsters/scenes/playable/scene5000.h
index b7e739154bf..2140b5ce6ab 100644
--- a/engines/hollywood/scenes/playable/scene5000.h
+++ b/engines/hollywood/monsters/scenes/playable/scene5000.h
@@ -19,12 +19,12 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE5000_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE5000_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5000_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5000_H
#include "common/random.h"
-#include "hollywood/scenes/chapter_intro_scene.h"
+#include "hollywood/monsters/scenes/chapter_intro_scene.h"
namespace Hollywood {
@@ -61,4 +61,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE5000_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5000_H
diff --git a/engines/hollywood/scenes/playable/scene5010.cpp b/engines/hollywood/monsters/scenes/playable/scene5010.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene5010.cpp
rename to engines/hollywood/monsters/scenes/playable/scene5010.cpp
index 103957969d6..b0512954e30 100644
--- a/engines/hollywood/scenes/playable/scene5010.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene5010.cpp
@@ -22,12 +22,12 @@
#include "common/events.h"
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/font.h"
-#include "hollywood/game_strings.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene5010.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/font.h"
+#include "hollywood/monsters/game_strings.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene5010.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene5010.h b/engines/hollywood/monsters/scenes/playable/scene5010.h
similarity index 93%
rename from engines/hollywood/scenes/playable/scene5010.h
rename to engines/hollywood/monsters/scenes/playable/scene5010.h
index 0eeeb35d5fe..c57b7a93218 100644
--- a/engines/hollywood/scenes/playable/scene5010.h
+++ b/engines/hollywood/monsters/scenes/playable/scene5010.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE5010_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE5010_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5010_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5010_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -80,4 +80,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE5010_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5010_H
diff --git a/engines/hollywood/scenes/playable/scene5020.cpp b/engines/hollywood/monsters/scenes/playable/scene5020.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene5020.cpp
rename to engines/hollywood/monsters/scenes/playable/scene5020.cpp
index 596a9829340..5ada475816a 100644
--- a/engines/hollywood/scenes/playable/scene5020.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene5020.cpp
@@ -19,11 +19,11 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
#include "hollywood/resource.h"
-#include "hollywood/scenes/playable/scene5020.h"
+#include "hollywood/monsters/scenes/playable/scene5020.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene5020.h b/engines/hollywood/monsters/scenes/playable/scene5020.h
similarity index 90%
rename from engines/hollywood/scenes/playable/scene5020.h
rename to engines/hollywood/monsters/scenes/playable/scene5020.h
index 616fb229db4..960610febfc 100644
--- a/engines/hollywood/scenes/playable/scene5020.h
+++ b/engines/hollywood/monsters/scenes/playable/scene5020.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE5020_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE5020_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5020_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5020_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -58,4 +58,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE5020_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5020_H
diff --git a/engines/hollywood/scenes/playable/scene5030.cpp b/engines/hollywood/monsters/scenes/playable/scene5030.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene5030.cpp
rename to engines/hollywood/monsters/scenes/playable/scene5030.cpp
index 202a27a2c26..66659e838d8 100644
--- a/engines/hollywood/scenes/playable/scene5030.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene5030.cpp
@@ -19,11 +19,11 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
#include "hollywood/resource.h"
-#include "hollywood/scenes/playable/scene5030.h"
+#include "hollywood/monsters/scenes/playable/scene5030.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene5030.h b/engines/hollywood/monsters/scenes/playable/scene5030.h
similarity index 95%
rename from engines/hollywood/scenes/playable/scene5030.h
rename to engines/hollywood/monsters/scenes/playable/scene5030.h
index 2cdefa25512..3c48a29359a 100644
--- a/engines/hollywood/scenes/playable/scene5030.h
+++ b/engines/hollywood/monsters/scenes/playable/scene5030.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE5030_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE5030_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5030_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5030_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -120,4 +120,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE5030_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5030_H
diff --git a/engines/hollywood/scenes/playable/scene5040.cpp b/engines/hollywood/monsters/scenes/playable/scene5040.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene5040.cpp
rename to engines/hollywood/monsters/scenes/playable/scene5040.cpp
index 304e23599b0..f0cda541aed 100644
--- a/engines/hollywood/scenes/playable/scene5040.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene5040.cpp
@@ -19,11 +19,11 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
#include "hollywood/resource.h"
-#include "hollywood/scenes/playable/scene5040.h"
+#include "hollywood/monsters/scenes/playable/scene5040.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene5040.h b/engines/hollywood/monsters/scenes/playable/scene5040.h
similarity index 94%
rename from engines/hollywood/scenes/playable/scene5040.h
rename to engines/hollywood/monsters/scenes/playable/scene5040.h
index 20c326cccb0..2d4ae606fbe 100644
--- a/engines/hollywood/scenes/playable/scene5040.h
+++ b/engines/hollywood/monsters/scenes/playable/scene5040.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE5040_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE5040_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5040_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5040_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -92,4 +92,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE5040_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5040_H
diff --git a/engines/hollywood/scenes/playable/scene5050.cpp b/engines/hollywood/monsters/scenes/playable/scene5050.cpp
similarity index 97%
rename from engines/hollywood/scenes/playable/scene5050.cpp
rename to engines/hollywood/monsters/scenes/playable/scene5050.cpp
index 2526ba9a0b5..1ccdd793faf 100644
--- a/engines/hollywood/scenes/playable/scene5050.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene5050.cpp
@@ -19,11 +19,11 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/frankenstein_reward.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene5050.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/frankenstein_reward.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene5050.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene5050.h b/engines/hollywood/monsters/scenes/playable/scene5050.h
similarity index 90%
rename from engines/hollywood/scenes/playable/scene5050.h
rename to engines/hollywood/monsters/scenes/playable/scene5050.h
index 7941d0cbb6c..90f7744790f 100644
--- a/engines/hollywood/scenes/playable/scene5050.h
+++ b/engines/hollywood/monsters/scenes/playable/scene5050.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE5050_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE5050_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5050_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5050_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -61,4 +61,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE5050_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5050_H
diff --git a/engines/hollywood/scenes/playable/scene5060.cpp b/engines/hollywood/monsters/scenes/playable/scene5060.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene5060.cpp
rename to engines/hollywood/monsters/scenes/playable/scene5060.cpp
index 3780b057c3a..bc7605168f5 100644
--- a/engines/hollywood/scenes/playable/scene5060.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene5060.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene5060.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene5060.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene5060.h b/engines/hollywood/monsters/scenes/playable/scene5060.h
similarity index 91%
rename from engines/hollywood/scenes/playable/scene5060.h
rename to engines/hollywood/monsters/scenes/playable/scene5060.h
index 99b1e39b158..99972b1bb97 100644
--- a/engines/hollywood/scenes/playable/scene5060.h
+++ b/engines/hollywood/monsters/scenes/playable/scene5060.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE5060_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE5060_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5060_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5060_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -63,4 +63,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE5060_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5060_H
diff --git a/engines/hollywood/scenes/playable/scene5070.cpp b/engines/hollywood/monsters/scenes/playable/scene5070.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene5070.cpp
rename to engines/hollywood/monsters/scenes/playable/scene5070.cpp
index 38d527f1adc..44acba3cac8 100644
--- a/engines/hollywood/scenes/playable/scene5070.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene5070.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene5070.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene5070.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene5070.h b/engines/hollywood/monsters/scenes/playable/scene5070.h
similarity index 90%
rename from engines/hollywood/scenes/playable/scene5070.h
rename to engines/hollywood/monsters/scenes/playable/scene5070.h
index 44dc559e6ad..766bdca274a 100644
--- a/engines/hollywood/scenes/playable/scene5070.h
+++ b/engines/hollywood/monsters/scenes/playable/scene5070.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE5070_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE5070_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5070_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5070_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -60,4 +60,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE5070_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5070_H
diff --git a/engines/hollywood/scenes/playable/scene5080.cpp b/engines/hollywood/monsters/scenes/playable/scene5080.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene5080.cpp
rename to engines/hollywood/monsters/scenes/playable/scene5080.cpp
index 68103f7b428..c830cf65341 100644
--- a/engines/hollywood/scenes/playable/scene5080.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene5080.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene5080.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene5080.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene5080.h b/engines/hollywood/monsters/scenes/playable/scene5080.h
similarity index 92%
rename from engines/hollywood/scenes/playable/scene5080.h
rename to engines/hollywood/monsters/scenes/playable/scene5080.h
index bd35a69944c..9e73a60ba4d 100644
--- a/engines/hollywood/scenes/playable/scene5080.h
+++ b/engines/hollywood/monsters/scenes/playable/scene5080.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE5080_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE5080_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5080_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5080_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -75,4 +75,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE5080_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5080_H
diff --git a/engines/hollywood/scenes/playable/scene5090.cpp b/engines/hollywood/monsters/scenes/playable/scene5090.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene5090.cpp
rename to engines/hollywood/monsters/scenes/playable/scene5090.cpp
index 9a69515d248..70ff5daa7ba 100644
--- a/engines/hollywood/scenes/playable/scene5090.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene5090.cpp
@@ -21,10 +21,10 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene5090.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene5090.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene5090.h b/engines/hollywood/monsters/scenes/playable/scene5090.h
similarity index 90%
rename from engines/hollywood/scenes/playable/scene5090.h
rename to engines/hollywood/monsters/scenes/playable/scene5090.h
index 77b92cd9d2b..3be14874011 100644
--- a/engines/hollywood/scenes/playable/scene5090.h
+++ b/engines/hollywood/monsters/scenes/playable/scene5090.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE5090_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE5090_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5090_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5090_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -66,4 +66,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE5090_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5090_H
diff --git a/engines/hollywood/scenes/playable/scene5100.cpp b/engines/hollywood/monsters/scenes/playable/scene5100.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene5100.cpp
rename to engines/hollywood/monsters/scenes/playable/scene5100.cpp
index fc72dd7ece3..3280ede96dc 100644
--- a/engines/hollywood/scenes/playable/scene5100.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene5100.cpp
@@ -21,11 +21,11 @@
#include "engines/engine.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
#include "hollywood/resource.h"
-#include "hollywood/scenes/playable/scene5100.h"
+#include "hollywood/monsters/scenes/playable/scene5100.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene5100.h b/engines/hollywood/monsters/scenes/playable/scene5100.h
similarity index 90%
rename from engines/hollywood/scenes/playable/scene5100.h
rename to engines/hollywood/monsters/scenes/playable/scene5100.h
index cc6258bbf95..efd6576b90b 100644
--- a/engines/hollywood/scenes/playable/scene5100.h
+++ b/engines/hollywood/monsters/scenes/playable/scene5100.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE5100_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE5100_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5100_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5100_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -63,4 +63,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE5100_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5100_H
diff --git a/engines/hollywood/scenes/playable/scene5110.cpp b/engines/hollywood/monsters/scenes/playable/scene5110.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene5110.cpp
rename to engines/hollywood/monsters/scenes/playable/scene5110.cpp
index 8da086e9bb6..2557db582c6 100644
--- a/engines/hollywood/scenes/playable/scene5110.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene5110.cpp
@@ -21,12 +21,12 @@
#include "engines/engine.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
#include "hollywood/resource.h"
-#include "hollywood/scenes/playable/scene5110.h"
-#include "hollywood/scenes/shared_frame_sequences.h"
+#include "hollywood/monsters/scenes/playable/scene5110.h"
+#include "hollywood/monsters/scenes/shared_frame_sequences.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene5110.h b/engines/hollywood/monsters/scenes/playable/scene5110.h
similarity index 94%
rename from engines/hollywood/scenes/playable/scene5110.h
rename to engines/hollywood/monsters/scenes/playable/scene5110.h
index 6285cd607e8..448ad099a44 100644
--- a/engines/hollywood/scenes/playable/scene5110.h
+++ b/engines/hollywood/monsters/scenes/playable/scene5110.h
@@ -19,11 +19,11 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE5110_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE5110_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5110_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5110_H
-#include "hollywood/gameplay/dialogue_menu.h"
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/gameplay/dialogue_menu.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -119,4 +119,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE5110_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5110_H
diff --git a/engines/hollywood/scenes/playable/scene5120.cpp b/engines/hollywood/monsters/scenes/playable/scene5120.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene5120.cpp
rename to engines/hollywood/monsters/scenes/playable/scene5120.cpp
index 8b334152909..d5e6da54b39 100644
--- a/engines/hollywood/scenes/playable/scene5120.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene5120.cpp
@@ -19,11 +19,11 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
#include "hollywood/resource.h"
-#include "hollywood/scenes/playable/scene5120.h"
+#include "hollywood/monsters/scenes/playable/scene5120.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene5120.h b/engines/hollywood/monsters/scenes/playable/scene5120.h
similarity index 94%
rename from engines/hollywood/scenes/playable/scene5120.h
rename to engines/hollywood/monsters/scenes/playable/scene5120.h
index 27210c2a021..3ee09635a0d 100644
--- a/engines/hollywood/scenes/playable/scene5120.h
+++ b/engines/hollywood/monsters/scenes/playable/scene5120.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE5120_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE5120_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5120_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5120_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -94,4 +94,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE5120_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5120_H
diff --git a/engines/hollywood/scenes/playable/scene5130.cpp b/engines/hollywood/monsters/scenes/playable/scene5130.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene5130.cpp
rename to engines/hollywood/monsters/scenes/playable/scene5130.cpp
index 73e25ea7217..b454b3a3d51 100644
--- a/engines/hollywood/scenes/playable/scene5130.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene5130.cpp
@@ -25,16 +25,16 @@
#include "common/textconsole.h"
#include "common/util.h"
-#include "hollywood/hollywood.h"
+#include "hollywood/monsters/hollywood.h"
#include "hollywood/debug.h"
-#include "hollywood/font.h"
-#include "hollywood/game_strings.h"
-#include "hollywood/gameplay/cursor.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
+#include "hollywood/monsters/font.h"
+#include "hollywood/monsters/game_strings.h"
+#include "hollywood/monsters/gameplay/cursor.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
#include "hollywood/resource.h"
-#include "hollywood/scenes/playable/scene5130.h"
-#include "hollywood/scenes/scene_data.h"
+#include "hollywood/monsters/scenes/playable/scene5130.h"
+#include "hollywood/monsters/scenes/scene_data.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene5130.h b/engines/hollywood/monsters/scenes/playable/scene5130.h
similarity index 91%
rename from engines/hollywood/scenes/playable/scene5130.h
rename to engines/hollywood/monsters/scenes/playable/scene5130.h
index 149b3f758bd..b2d172ff49b 100644
--- a/engines/hollywood/scenes/playable/scene5130.h
+++ b/engines/hollywood/monsters/scenes/playable/scene5130.h
@@ -19,17 +19,17 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE5130_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE5130_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5130_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5130_H
#include "common/array.h"
#include "common/random.h"
#include "common/str.h"
#include "common/types.h"
-#include "hollywood/music.h"
-#include "hollywood/scenes/presentation_scene.h"
-#include "hollywood/scenes/scene_text_store.h"
+#include "hollywood/monsters/music.h"
+#include "hollywood/monsters/scenes/presentation_scene.h"
+#include "hollywood/scene_text_store.h"
namespace Hollywood {
@@ -111,4 +111,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE5130_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5130_H
diff --git a/engines/hollywood/scenes/playable/scene6000.cpp b/engines/hollywood/monsters/scenes/playable/scene6000.cpp
similarity index 97%
rename from engines/hollywood/scenes/playable/scene6000.cpp
rename to engines/hollywood/monsters/scenes/playable/scene6000.cpp
index f8e155bee68..4b4e5f90a08 100644
--- a/engines/hollywood/scenes/playable/scene6000.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene6000.cpp
@@ -19,8 +19,8 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/scenes/playable/scene6000.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/scenes/playable/scene6000.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene6000.h b/engines/hollywood/monsters/scenes/playable/scene6000.h
similarity index 87%
rename from engines/hollywood/scenes/playable/scene6000.h
rename to engines/hollywood/monsters/scenes/playable/scene6000.h
index 3866c73a1c1..9bac0956882 100644
--- a/engines/hollywood/scenes/playable/scene6000.h
+++ b/engines/hollywood/monsters/scenes/playable/scene6000.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE6000_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE6000_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6000_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6000_H
-#include "hollywood/scenes/chapter_intro_scene.h"
+#include "hollywood/monsters/scenes/chapter_intro_scene.h"
namespace Hollywood {
@@ -50,4 +50,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE6000_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6000_H
diff --git a/engines/hollywood/scenes/playable/scene6010.cpp b/engines/hollywood/monsters/scenes/playable/scene6010.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene6010.cpp
rename to engines/hollywood/monsters/scenes/playable/scene6010.cpp
index ece5a9ce510..4c3647bab3f 100644
--- a/engines/hollywood/scenes/playable/scene6010.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene6010.cpp
@@ -22,10 +22,10 @@
#include "common/debug.h"
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene6010.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene6010.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene6010.h b/engines/hollywood/monsters/scenes/playable/scene6010.h
similarity index 93%
rename from engines/hollywood/scenes/playable/scene6010.h
rename to engines/hollywood/monsters/scenes/playable/scene6010.h
index d99d522e2f4..ff85b4ba4ad 100644
--- a/engines/hollywood/scenes/playable/scene6010.h
+++ b/engines/hollywood/monsters/scenes/playable/scene6010.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE6010_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE6010_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6010_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6010_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -75,4 +75,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE6010_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6010_H
diff --git a/engines/hollywood/scenes/playable/scene6020.cpp b/engines/hollywood/monsters/scenes/playable/scene6020.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene6020.cpp
rename to engines/hollywood/monsters/scenes/playable/scene6020.cpp
index 65778feb90e..4eafa00d672 100644
--- a/engines/hollywood/scenes/playable/scene6020.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene6020.cpp
@@ -21,10 +21,10 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene6020.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene6020.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene6020.h b/engines/hollywood/monsters/scenes/playable/scene6020.h
similarity index 94%
rename from engines/hollywood/scenes/playable/scene6020.h
rename to engines/hollywood/monsters/scenes/playable/scene6020.h
index 92f42439d10..4bd3d3ee4b9 100644
--- a/engines/hollywood/scenes/playable/scene6020.h
+++ b/engines/hollywood/monsters/scenes/playable/scene6020.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE6020_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE6020_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6020_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6020_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -107,4 +107,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE6020_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6020_H
diff --git a/engines/hollywood/scenes/playable/scene6030.cpp b/engines/hollywood/monsters/scenes/playable/scene6030.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene6030.cpp
rename to engines/hollywood/monsters/scenes/playable/scene6030.cpp
index e45146341a4..f79d847a576 100644
--- a/engines/hollywood/scenes/playable/scene6030.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene6030.cpp
@@ -21,10 +21,10 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene6030.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene6030.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene6030.h b/engines/hollywood/monsters/scenes/playable/scene6030.h
similarity index 93%
rename from engines/hollywood/scenes/playable/scene6030.h
rename to engines/hollywood/monsters/scenes/playable/scene6030.h
index 8e9040dece7..41b0a19859e 100644
--- a/engines/hollywood/scenes/playable/scene6030.h
+++ b/engines/hollywood/monsters/scenes/playable/scene6030.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE6030_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE6030_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6030_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6030_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -75,4 +75,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE6030_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6030_H
diff --git a/engines/hollywood/scenes/playable/scene6040.cpp b/engines/hollywood/monsters/scenes/playable/scene6040.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene6040.cpp
rename to engines/hollywood/monsters/scenes/playable/scene6040.cpp
index d38bfaae459..bd11f136bfb 100644
--- a/engines/hollywood/scenes/playable/scene6040.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene6040.cpp
@@ -21,10 +21,10 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene6040.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene6040.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene6040.h b/engines/hollywood/monsters/scenes/playable/scene6040.h
similarity index 88%
rename from engines/hollywood/scenes/playable/scene6040.h
rename to engines/hollywood/monsters/scenes/playable/scene6040.h
index 17cda373956..aa4ac950245 100644
--- a/engines/hollywood/scenes/playable/scene6040.h
+++ b/engines/hollywood/monsters/scenes/playable/scene6040.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE6040_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE6040_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6040_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6040_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -57,4 +57,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE6040_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6040_H
diff --git a/engines/hollywood/scenes/playable/scene6050.cpp b/engines/hollywood/monsters/scenes/playable/scene6050.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene6050.cpp
rename to engines/hollywood/monsters/scenes/playable/scene6050.cpp
index a9c19b0955e..e738bd67a0f 100644
--- a/engines/hollywood/scenes/playable/scene6050.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene6050.cpp
@@ -19,10 +19,10 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene6050.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene6050.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene6050.h b/engines/hollywood/monsters/scenes/playable/scene6050.h
similarity index 93%
rename from engines/hollywood/scenes/playable/scene6050.h
rename to engines/hollywood/monsters/scenes/playable/scene6050.h
index ac990a75cef..92dc83df21c 100644
--- a/engines/hollywood/scenes/playable/scene6050.h
+++ b/engines/hollywood/monsters/scenes/playable/scene6050.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE6050_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE6050_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6050_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6050_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -85,4 +85,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE6050_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6050_H
diff --git a/engines/hollywood/scenes/playable/scene6060.cpp b/engines/hollywood/monsters/scenes/playable/scene6060.cpp
similarity index 97%
rename from engines/hollywood/scenes/playable/scene6060.cpp
rename to engines/hollywood/monsters/scenes/playable/scene6060.cpp
index ba40250d446..2f8f8614701 100644
--- a/engines/hollywood/scenes/playable/scene6060.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene6060.cpp
@@ -19,9 +19,9 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/scenes/playable/scene6060.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/scenes/playable/scene6060.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene6060.h b/engines/hollywood/monsters/scenes/playable/scene6060.h
similarity index 88%
rename from engines/hollywood/scenes/playable/scene6060.h
rename to engines/hollywood/monsters/scenes/playable/scene6060.h
index 78e1f7f1d7d..6108e64568e 100644
--- a/engines/hollywood/scenes/playable/scene6060.h
+++ b/engines/hollywood/monsters/scenes/playable/scene6060.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE6060_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE6060_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6060_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6060_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -47,4 +47,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE6060_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6060_H
diff --git a/engines/hollywood/scenes/playable/scene6070.cpp b/engines/hollywood/monsters/scenes/playable/scene6070.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene6070.cpp
rename to engines/hollywood/monsters/scenes/playable/scene6070.cpp
index 121357c2728..d08ce23c4f0 100644
--- a/engines/hollywood/scenes/playable/scene6070.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene6070.cpp
@@ -21,11 +21,11 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene6070.h"
-#include "hollywood/scenes/shared_frame_sequences.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene6070.h"
+#include "hollywood/monsters/scenes/shared_frame_sequences.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene6070.h b/engines/hollywood/monsters/scenes/playable/scene6070.h
similarity index 94%
rename from engines/hollywood/scenes/playable/scene6070.h
rename to engines/hollywood/monsters/scenes/playable/scene6070.h
index 3018e61b32c..4a2f608fb84 100644
--- a/engines/hollywood/scenes/playable/scene6070.h
+++ b/engines/hollywood/monsters/scenes/playable/scene6070.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE6070_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE6070_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6070_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6070_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -89,4 +89,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE6070_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6070_H
diff --git a/engines/hollywood/scenes/playable/scene6080.cpp b/engines/hollywood/monsters/scenes/playable/scene6080.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene6080.cpp
rename to engines/hollywood/monsters/scenes/playable/scene6080.cpp
index 847b9d35a72..1dbed05208d 100644
--- a/engines/hollywood/scenes/playable/scene6080.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene6080.cpp
@@ -21,10 +21,10 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/scenes/playable/scene6080.h"
-#include "hollywood/scenes/shared_frame_sequences.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/scenes/playable/scene6080.h"
+#include "hollywood/monsters/scenes/shared_frame_sequences.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene6080.h b/engines/hollywood/monsters/scenes/playable/scene6080.h
similarity index 93%
rename from engines/hollywood/scenes/playable/scene6080.h
rename to engines/hollywood/monsters/scenes/playable/scene6080.h
index 96fc1edeaa9..53b9294313d 100644
--- a/engines/hollywood/scenes/playable/scene6080.h
+++ b/engines/hollywood/monsters/scenes/playable/scene6080.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE6080_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE6080_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6080_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6080_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -89,4 +89,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE6080_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6080_H
diff --git a/engines/hollywood/scenes/playable/scene6090.cpp b/engines/hollywood/monsters/scenes/playable/scene6090.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene6090.cpp
rename to engines/hollywood/monsters/scenes/playable/scene6090.cpp
index 7dc7dcee57a..b06dea55ccd 100644
--- a/engines/hollywood/scenes/playable/scene6090.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene6090.cpp
@@ -22,10 +22,10 @@
#include "common/system.h"
#include "graphics/managed_surface.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene6090.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene6090.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene6090.h b/engines/hollywood/monsters/scenes/playable/scene6090.h
similarity index 94%
rename from engines/hollywood/scenes/playable/scene6090.h
rename to engines/hollywood/monsters/scenes/playable/scene6090.h
index cd45a015d59..942adce89e0 100644
--- a/engines/hollywood/scenes/playable/scene6090.h
+++ b/engines/hollywood/monsters/scenes/playable/scene6090.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE6090_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE6090_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6090_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6090_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -116,4 +116,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE6090_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6090_H
diff --git a/engines/hollywood/scenes/playable/scene6100.cpp b/engines/hollywood/monsters/scenes/playable/scene6100.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene6100.cpp
rename to engines/hollywood/monsters/scenes/playable/scene6100.cpp
index 0a312563606..5b0eb0c8390 100644
--- a/engines/hollywood/scenes/playable/scene6100.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene6100.cpp
@@ -21,9 +21,9 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/scenes/playable/scene6100.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/scenes/playable/scene6100.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene6100.h b/engines/hollywood/monsters/scenes/playable/scene6100.h
similarity index 93%
rename from engines/hollywood/scenes/playable/scene6100.h
rename to engines/hollywood/monsters/scenes/playable/scene6100.h
index e1202c064b1..bf9533b0a0b 100644
--- a/engines/hollywood/scenes/playable/scene6100.h
+++ b/engines/hollywood/monsters/scenes/playable/scene6100.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE6100_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE6100_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6100_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6100_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -84,4 +84,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE6100_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE6100_H
diff --git a/engines/hollywood/scenes/playable/scene7000.cpp b/engines/hollywood/monsters/scenes/playable/scene7000.cpp
similarity index 96%
rename from engines/hollywood/scenes/playable/scene7000.cpp
rename to engines/hollywood/monsters/scenes/playable/scene7000.cpp
index cdd9e4df4e9..5b25dfc7c26 100644
--- a/engines/hollywood/scenes/playable/scene7000.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene7000.cpp
@@ -26,10 +26,10 @@
#include "common/path.h"
#include "common/textconsole.h"
-#include "hollywood/hollywood.h"
+#include "hollywood/monsters/hollywood.h"
#include "hollywood/debug.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/scenes/playable/scene7000.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/scenes/playable/scene7000.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene7000.h b/engines/hollywood/monsters/scenes/playable/scene7000.h
similarity index 86%
rename from engines/hollywood/scenes/playable/scene7000.h
rename to engines/hollywood/monsters/scenes/playable/scene7000.h
index 8ab83d7dc6a..3c135c317e6 100644
--- a/engines/hollywood/scenes/playable/scene7000.h
+++ b/engines/hollywood/monsters/scenes/playable/scene7000.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE7000_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE7000_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7000_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7000_H
namespace Hollywood {
@@ -40,4 +40,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE7000_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7000_H
diff --git a/engines/hollywood/scenes/playable/scene7010.cpp b/engines/hollywood/monsters/scenes/playable/scene7010.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene7010.cpp
rename to engines/hollywood/monsters/scenes/playable/scene7010.cpp
index b83f03abbce..cb2bdf74dd7 100644
--- a/engines/hollywood/scenes/playable/scene7010.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene7010.cpp
@@ -22,10 +22,10 @@
#include "common/debug.h"
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/dialogue_menu.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/scenes/playable/scene7010.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/dialogue_menu.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/scenes/playable/scene7010.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene7010.h b/engines/hollywood/monsters/scenes/playable/scene7010.h
similarity index 95%
rename from engines/hollywood/scenes/playable/scene7010.h
rename to engines/hollywood/monsters/scenes/playable/scene7010.h
index d51f03cbdc0..a47e47ab7e0 100644
--- a/engines/hollywood/scenes/playable/scene7010.h
+++ b/engines/hollywood/monsters/scenes/playable/scene7010.h
@@ -19,11 +19,11 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE7010_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE7010_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7010_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7010_H
-#include "hollywood/gameplay/dialogue_menu.h"
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/gameplay/dialogue_menu.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene7020.cpp b/engines/hollywood/monsters/scenes/playable/scene7020.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene7020.cpp
rename to engines/hollywood/monsters/scenes/playable/scene7020.cpp
index a33e5b5e325..f7219c478ce 100644
--- a/engines/hollywood/scenes/playable/scene7020.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene7020.cpp
@@ -22,10 +22,10 @@
#include "common/file.h"
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene7020.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene7020.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene7020.h b/engines/hollywood/monsters/scenes/playable/scene7020.h
similarity index 94%
rename from engines/hollywood/scenes/playable/scene7020.h
rename to engines/hollywood/monsters/scenes/playable/scene7020.h
index 7f7f2707424..7d619415fee 100644
--- a/engines/hollywood/scenes/playable/scene7020.h
+++ b/engines/hollywood/monsters/scenes/playable/scene7020.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE7020_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE7020_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7020_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7020_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene7030.cpp b/engines/hollywood/monsters/scenes/playable/scene7030.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene7030.cpp
rename to engines/hollywood/monsters/scenes/playable/scene7030.cpp
index dc22570b334..7833edf4939 100644
--- a/engines/hollywood/scenes/playable/scene7030.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene7030.cpp
@@ -21,9 +21,9 @@
#include "common/debug.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/scenes/playable/scene7030.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/scenes/playable/scene7030.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene7030.h b/engines/hollywood/monsters/scenes/playable/scene7030.h
similarity index 94%
rename from engines/hollywood/scenes/playable/scene7030.h
rename to engines/hollywood/monsters/scenes/playable/scene7030.h
index b6461a10b8b..a1882499829 100644
--- a/engines/hollywood/scenes/playable/scene7030.h
+++ b/engines/hollywood/monsters/scenes/playable/scene7030.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE7030_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE7030_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7030_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7030_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene7040.cpp b/engines/hollywood/monsters/scenes/playable/scene7040.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene7040.cpp
rename to engines/hollywood/monsters/scenes/playable/scene7040.cpp
index eef2ebf3791..c5701a5e074 100644
--- a/engines/hollywood/scenes/playable/scene7040.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene7040.cpp
@@ -21,10 +21,10 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene7040.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene7040.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene7040.h b/engines/hollywood/monsters/scenes/playable/scene7040.h
similarity index 96%
rename from engines/hollywood/scenes/playable/scene7040.h
rename to engines/hollywood/monsters/scenes/playable/scene7040.h
index 5a5bd784d51..55cfb9c9292 100644
--- a/engines/hollywood/scenes/playable/scene7040.h
+++ b/engines/hollywood/monsters/scenes/playable/scene7040.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE7040_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE7040_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7040_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7040_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene7050.cpp b/engines/hollywood/monsters/scenes/playable/scene7050.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene7050.cpp
rename to engines/hollywood/monsters/scenes/playable/scene7050.cpp
index a7aff970f0c..09155f11edc 100644
--- a/engines/hollywood/scenes/playable/scene7050.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene7050.cpp
@@ -21,11 +21,11 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/game_strings.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene7050.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/game_strings.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene7050.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene7050.h b/engines/hollywood/monsters/scenes/playable/scene7050.h
similarity index 93%
rename from engines/hollywood/scenes/playable/scene7050.h
rename to engines/hollywood/monsters/scenes/playable/scene7050.h
index 08987e17bff..de403724f2b 100644
--- a/engines/hollywood/scenes/playable/scene7050.h
+++ b/engines/hollywood/monsters/scenes/playable/scene7050.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE7050_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE7050_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7050_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7050_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene7060.cpp b/engines/hollywood/monsters/scenes/playable/scene7060.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene7060.cpp
rename to engines/hollywood/monsters/scenes/playable/scene7060.cpp
index 5a22de6e7b3..2fdeb3352a4 100644
--- a/engines/hollywood/scenes/playable/scene7060.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene7060.cpp
@@ -21,10 +21,10 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene7060.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene7060.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene7060.h b/engines/hollywood/monsters/scenes/playable/scene7060.h
similarity index 95%
rename from engines/hollywood/scenes/playable/scene7060.h
rename to engines/hollywood/monsters/scenes/playable/scene7060.h
index 551aee25412..7ae1e127b99 100644
--- a/engines/hollywood/scenes/playable/scene7060.h
+++ b/engines/hollywood/monsters/scenes/playable/scene7060.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE7060_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE7060_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7060_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7060_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene7070.cpp b/engines/hollywood/monsters/scenes/playable/scene7070.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene7070.cpp
rename to engines/hollywood/monsters/scenes/playable/scene7070.cpp
index 0e2e8b691ed..7a147f3de6d 100644
--- a/engines/hollywood/scenes/playable/scene7070.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene7070.cpp
@@ -21,11 +21,11 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
#include "hollywood/resource.h"
-#include "hollywood/scenes/playable/scene7070.h"
+#include "hollywood/monsters/scenes/playable/scene7070.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene7070.h b/engines/hollywood/monsters/scenes/playable/scene7070.h
similarity index 90%
rename from engines/hollywood/scenes/playable/scene7070.h
rename to engines/hollywood/monsters/scenes/playable/scene7070.h
index 1b843102ee1..f243c9643e4 100644
--- a/engines/hollywood/scenes/playable/scene7070.h
+++ b/engines/hollywood/monsters/scenes/playable/scene7070.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE7070_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE7070_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7070_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7070_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene7080.cpp b/engines/hollywood/monsters/scenes/playable/scene7080.cpp
similarity index 97%
rename from engines/hollywood/scenes/playable/scene7080.cpp
rename to engines/hollywood/monsters/scenes/playable/scene7080.cpp
index db22d12e5af..2880016ec97 100644
--- a/engines/hollywood/scenes/playable/scene7080.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene7080.cpp
@@ -21,11 +21,11 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
#include "hollywood/resource.h"
-#include "hollywood/scenes/playable/scene7080.h"
+#include "hollywood/monsters/scenes/playable/scene7080.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene7080.h b/engines/hollywood/monsters/scenes/playable/scene7080.h
similarity index 89%
rename from engines/hollywood/scenes/playable/scene7080.h
rename to engines/hollywood/monsters/scenes/playable/scene7080.h
index a69a26940ed..0d358280fd4 100644
--- a/engines/hollywood/scenes/playable/scene7080.h
+++ b/engines/hollywood/monsters/scenes/playable/scene7080.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE7080_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE7080_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7080_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7080_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene7090.cpp b/engines/hollywood/monsters/scenes/playable/scene7090.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene7090.cpp
rename to engines/hollywood/monsters/scenes/playable/scene7090.cpp
index 8889b195d25..fb05e8fca8e 100644
--- a/engines/hollywood/scenes/playable/scene7090.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene7090.cpp
@@ -21,11 +21,11 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
#include "hollywood/resource.h"
-#include "hollywood/scenes/playable/scene7090.h"
+#include "hollywood/monsters/scenes/playable/scene7090.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene7090.h b/engines/hollywood/monsters/scenes/playable/scene7090.h
similarity index 90%
rename from engines/hollywood/scenes/playable/scene7090.h
rename to engines/hollywood/monsters/scenes/playable/scene7090.h
index 2e189dcb39d..bb463780a3b 100644
--- a/engines/hollywood/scenes/playable/scene7090.h
+++ b/engines/hollywood/monsters/scenes/playable/scene7090.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE7090_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE7090_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7090_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7090_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene7100.cpp b/engines/hollywood/monsters/scenes/playable/scene7100.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene7100.cpp
rename to engines/hollywood/monsters/scenes/playable/scene7100.cpp
index 11cb1000757..e01638d1e52 100644
--- a/engines/hollywood/scenes/playable/scene7100.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene7100.cpp
@@ -21,11 +21,11 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
#include "hollywood/resource.h"
-#include "hollywood/scenes/playable/scene7100.h"
+#include "hollywood/monsters/scenes/playable/scene7100.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene7100.h b/engines/hollywood/monsters/scenes/playable/scene7100.h
similarity index 95%
rename from engines/hollywood/scenes/playable/scene7100.h
rename to engines/hollywood/monsters/scenes/playable/scene7100.h
index f15721d5c13..3e50bfece7c 100644
--- a/engines/hollywood/scenes/playable/scene7100.h
+++ b/engines/hollywood/monsters/scenes/playable/scene7100.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE7100_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE7100_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7100_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE7100_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene8000.cpp b/engines/hollywood/monsters/scenes/playable/scene8000.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/scene8000.cpp
rename to engines/hollywood/monsters/scenes/playable/scene8000.cpp
index 4ac95ff6060..8d7acaff32d 100644
--- a/engines/hollywood/scenes/playable/scene8000.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene8000.cpp
@@ -19,9 +19,9 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene8000.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene8000.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene8000.h b/engines/hollywood/monsters/scenes/playable/scene8000.h
similarity index 87%
rename from engines/hollywood/scenes/playable/scene8000.h
rename to engines/hollywood/monsters/scenes/playable/scene8000.h
index 3d2ebba01ce..1776d1d0fa5 100644
--- a/engines/hollywood/scenes/playable/scene8000.h
+++ b/engines/hollywood/monsters/scenes/playable/scene8000.h
@@ -19,13 +19,13 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE8000_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE8000_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE8000_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE8000_H
#include "common/random.h"
-#include "hollywood/music.h"
-#include "hollywood/scenes/chapter_intro_scene.h"
+#include "hollywood/monsters/music.h"
+#include "hollywood/monsters/scenes/chapter_intro_scene.h"
namespace Hollywood {
@@ -64,4 +64,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE8000_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE8000_H
diff --git a/engines/hollywood/scenes/playable/scene8010.cpp b/engines/hollywood/monsters/scenes/playable/scene8010.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene8010.cpp
rename to engines/hollywood/monsters/scenes/playable/scene8010.cpp
index f605de08596..9cdd5a5da04 100644
--- a/engines/hollywood/scenes/playable/scene8010.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene8010.cpp
@@ -23,11 +23,11 @@
#include "common/events.h"
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/cursor.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene8010.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/cursor.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene8010.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene8010.h b/engines/hollywood/monsters/scenes/playable/scene8010.h
similarity index 94%
rename from engines/hollywood/scenes/playable/scene8010.h
rename to engines/hollywood/monsters/scenes/playable/scene8010.h
index b2eac4b68fe..ecfb7750d26 100644
--- a/engines/hollywood/scenes/playable/scene8010.h
+++ b/engines/hollywood/monsters/scenes/playable/scene8010.h
@@ -19,12 +19,12 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE8010_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE8010_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE8010_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE8010_H
#include "common/str.h"
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -106,4 +106,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE8010_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE8010_H
diff --git a/engines/hollywood/scenes/playable/scene8020.cpp b/engines/hollywood/monsters/scenes/playable/scene8020.cpp
similarity index 99%
rename from engines/hollywood/scenes/playable/scene8020.cpp
rename to engines/hollywood/monsters/scenes/playable/scene8020.cpp
index 62e2f76e959..e0610523c80 100644
--- a/engines/hollywood/scenes/playable/scene8020.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene8020.cpp
@@ -21,10 +21,10 @@
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/game_state.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/playable/scene8020.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/game_state.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/playable/scene8020.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene8020.h b/engines/hollywood/monsters/scenes/playable/scene8020.h
similarity index 91%
rename from engines/hollywood/scenes/playable/scene8020.h
rename to engines/hollywood/monsters/scenes/playable/scene8020.h
index c3b14b036a9..79ddf229ff4 100644
--- a/engines/hollywood/scenes/playable/scene8020.h
+++ b/engines/hollywood/monsters/scenes/playable/scene8020.h
@@ -19,10 +19,10 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE8020_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE8020_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE8020_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE8020_H
-#include "hollywood/scenes/playable/playable_scene.h"
+#include "hollywood/monsters/scenes/playable/playable_scene.h"
namespace Hollywood {
@@ -66,4 +66,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE8020_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE8020_H
diff --git a/engines/hollywood/scenes/playable/scene_config.h b/engines/hollywood/monsters/scenes/playable/scene_config.h
similarity index 95%
rename from engines/hollywood/scenes/playable/scene_config.h
rename to engines/hollywood/monsters/scenes/playable/scene_config.h
index 5767d4fe85c..a7026f5353a 100644
--- a/engines/hollywood/scenes/playable/scene_config.h
+++ b/engines/hollywood/monsters/scenes/playable/scene_config.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE_CONFIG_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE_CONFIG_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE_CONFIG_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE_CONFIG_H
#include "common/str.h"
#include "common/types.h"
@@ -124,4 +124,4 @@ struct PlayableSceneConfig {
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE_CONFIG_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE_CONFIG_H
diff --git a/engines/hollywood/scenes/playable/scene_surface_state.cpp b/engines/hollywood/monsters/scenes/playable/scene_surface_state.cpp
similarity index 96%
rename from engines/hollywood/scenes/playable/scene_surface_state.cpp
rename to engines/hollywood/monsters/scenes/playable/scene_surface_state.cpp
index f81152e9b69..d291f391625 100644
--- a/engines/hollywood/scenes/playable/scene_surface_state.cpp
+++ b/engines/hollywood/monsters/scenes/playable/scene_surface_state.cpp
@@ -22,9 +22,9 @@
#include "common/rect.h"
#include "graphics/pixelformat.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/gameplay/actor_renderer.h"
-#include "hollywood/scenes/playable/scene_surface_state.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/gameplay/actor_renderer.h"
+#include "hollywood/monsters/scenes/playable/scene_surface_state.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/scene_surface_state.h b/engines/hollywood/monsters/scenes/playable/scene_surface_state.h
similarity index 93%
rename from engines/hollywood/scenes/playable/scene_surface_state.h
rename to engines/hollywood/monsters/scenes/playable/scene_surface_state.h
index ba85e30dc8b..f5cef96585f 100644
--- a/engines/hollywood/scenes/playable/scene_surface_state.h
+++ b/engines/hollywood/monsters/scenes/playable/scene_surface_state.h
@@ -19,14 +19,14 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SCENE_SURFACE_STATE_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SCENE_SURFACE_STATE_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE_SURFACE_STATE_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE_SURFACE_STATE_H
#include "common/array.h"
#include "common/types.h"
#include "graphics/managed_surface.h"
-#include "hollywood/graphics.h"
+#include "hollywood/monsters/graphics.h"
namespace Hollywood {
@@ -84,4 +84,4 @@ public:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SCENE_SURFACE_STATE_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE_SURFACE_STATE_H
diff --git a/engines/hollywood/scenes/playable/speech_controller.cpp b/engines/hollywood/monsters/scenes/playable/speech_controller.cpp
similarity index 98%
rename from engines/hollywood/scenes/playable/speech_controller.cpp
rename to engines/hollywood/monsters/scenes/playable/speech_controller.cpp
index 0e747dae850..a7f5784ef59 100644
--- a/engines/hollywood/scenes/playable/speech_controller.cpp
+++ b/engines/hollywood/monsters/scenes/playable/speech_controller.cpp
@@ -19,7 +19,7 @@
*
*/
-#include "hollywood/scenes/playable/speech_controller.h"
+#include "hollywood/monsters/scenes/playable/speech_controller.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/playable/speech_controller.h b/engines/hollywood/monsters/scenes/playable/speech_controller.h
similarity index 90%
rename from engines/hollywood/scenes/playable/speech_controller.h
rename to engines/hollywood/monsters/scenes/playable/speech_controller.h
index 60b1b30631c..1d3f1920d5e 100644
--- a/engines/hollywood/scenes/playable/speech_controller.h
+++ b/engines/hollywood/monsters/scenes/playable/speech_controller.h
@@ -19,14 +19,14 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PLAYABLE_SPEECH_CONTROLLER_H
-#define HOLLYWOOD_SCENES_PLAYABLE_SPEECH_CONTROLLER_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SPEECH_CONTROLLER_H
+#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SPEECH_CONTROLLER_H
#include "common/random.h"
#include "common/types.h"
-#include "hollywood/music.h"
-#include "hollywood/scenes/speech_overlay.h"
+#include "hollywood/monsters/music.h"
+#include "hollywood/monsters/scenes/speech_overlay.h"
namespace Hollywood {
@@ -72,4 +72,4 @@ public:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PLAYABLE_SPEECH_CONTROLLER_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SPEECH_CONTROLLER_H
diff --git a/engines/hollywood/scenes/presentation_scene.cpp b/engines/hollywood/monsters/scenes/presentation_scene.cpp
similarity index 98%
rename from engines/hollywood/scenes/presentation_scene.cpp
rename to engines/hollywood/monsters/scenes/presentation_scene.cpp
index 33240ce4950..b4fc4d71ba5 100644
--- a/engines/hollywood/scenes/presentation_scene.cpp
+++ b/engines/hollywood/monsters/scenes/presentation_scene.cpp
@@ -22,9 +22,9 @@
#include "common/events.h"
#include "common/system.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/font.h"
-#include "hollywood/scenes/presentation_scene.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/font.h"
+#include "hollywood/monsters/scenes/presentation_scene.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/presentation_scene.h b/engines/hollywood/monsters/scenes/presentation_scene.h
similarity index 91%
rename from engines/hollywood/scenes/presentation_scene.h
rename to engines/hollywood/monsters/scenes/presentation_scene.h
index 021fdecab19..e8ad5a5e6f0 100644
--- a/engines/hollywood/scenes/presentation_scene.h
+++ b/engines/hollywood/monsters/scenes/presentation_scene.h
@@ -19,16 +19,16 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_PRESENTATION_SCENE_H
-#define HOLLYWOOD_SCENES_PRESENTATION_SCENE_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_PRESENTATION_SCENE_H
+#define HOLLYWOOD_MONSTERS_SCENES_PRESENTATION_SCENE_H
#include "common/array.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/animation_channels.h"
-#include "hollywood/scenes/animation_player.h"
-#include "hollywood/scenes/scene_resources.h"
-#include "hollywood/scenes/speech_overlay.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/animation_channels.h"
+#include "hollywood/monsters/scenes/animation_player.h"
+#include "hollywood/monsters/scenes/scene_resources.h"
+#include "hollywood/monsters/scenes/speech_overlay.h"
namespace Hollywood {
@@ -133,4 +133,4 @@ protected:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_PRESENTATION_SCENE_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_PRESENTATION_SCENE_H
diff --git a/engines/hollywood/scenes/resource_delta_clip_player.cpp b/engines/hollywood/monsters/scenes/resource_delta_clip_player.cpp
similarity index 96%
rename from engines/hollywood/scenes/resource_delta_clip_player.cpp
rename to engines/hollywood/monsters/scenes/resource_delta_clip_player.cpp
index 714d7afebd4..58e5dda3a85 100644
--- a/engines/hollywood/scenes/resource_delta_clip_player.cpp
+++ b/engines/hollywood/monsters/scenes/resource_delta_clip_player.cpp
@@ -19,9 +19,9 @@
*
*/
-#include "hollywood/hollywood.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/resource_delta_clip_player.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/resource_delta_clip_player.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/resource_delta_clip_player.h b/engines/hollywood/monsters/scenes/resource_delta_clip_player.h
similarity index 90%
rename from engines/hollywood/scenes/resource_delta_clip_player.h
rename to engines/hollywood/monsters/scenes/resource_delta_clip_player.h
index 33596610544..fb611cac2bd 100644
--- a/engines/hollywood/scenes/resource_delta_clip_player.h
+++ b/engines/hollywood/monsters/scenes/resource_delta_clip_player.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_RESOURCE_DELTA_CLIP_PLAYER_H
-#define HOLLYWOOD_SCENES_RESOURCE_DELTA_CLIP_PLAYER_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_RESOURCE_DELTA_CLIP_PLAYER_H
+#define HOLLYWOOD_MONSTERS_SCENES_RESOURCE_DELTA_CLIP_PLAYER_H
#include "common/array.h"
#include "common/types.h"
@@ -44,4 +44,4 @@ bool drawResourceDeltaClipFrame(const Common::Array<byte> &resource, uint32 fram
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_RESOURCE_DELTA_CLIP_PLAYER_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_RESOURCE_DELTA_CLIP_PLAYER_H
diff --git a/engines/hollywood/scenes/scene_data.h b/engines/hollywood/monsters/scenes/scene_data.h
similarity index 92%
rename from engines/hollywood/scenes/scene_data.h
rename to engines/hollywood/monsters/scenes/scene_data.h
index 91613af784c..efea1c32a95 100644
--- a/engines/hollywood/scenes/scene_data.h
+++ b/engines/hollywood/monsters/scenes/scene_data.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_SCENE_DATA_H
-#define HOLLYWOOD_SCENES_SCENE_DATA_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_SCENE_DATA_H
+#define HOLLYWOOD_MONSTERS_SCENES_SCENE_DATA_H
#include "common/types.h"
@@ -60,4 +60,4 @@ enum ScenePaletteMapOffset {
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_SCENE_DATA_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_SCENE_DATA_H
diff --git a/engines/hollywood/monsters/scenes/scene_registry.cpp b/engines/hollywood/monsters/scenes/scene_registry.cpp
new file mode 100644
index 00000000000..3e053d162cf
--- /dev/null
+++ b/engines/hollywood/monsters/scenes/scene_registry.cpp
@@ -0,0 +1,287 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "hollywood/monsters/scenes/intro/scene1000.h"
+#include "hollywood/monsters/scenes/intro/scene9090.h"
+#include "hollywood/monsters/scenes/intro/scene9100.h"
+#include "hollywood/monsters/scenes/intro/scene9130.h"
+#include "hollywood/monsters/scenes/intro/scene9140.h"
+#include "hollywood/monsters/scenes/intro/scene9150.h"
+#include "hollywood/monsters/scenes/intro/scene9160.h"
+#include "hollywood/monsters/scenes/intro/scene9170.h"
+#include "hollywood/monsters/scenes/intro/scene9180.h"
+#include "hollywood/monsters/scenes/playable/scene1010.h"
+#include "hollywood/monsters/scenes/playable/scene1020.h"
+#include "hollywood/monsters/scenes/playable/scene1030.h"
+#include "hollywood/monsters/scenes/playable/scene1040.h"
+#include "hollywood/monsters/scenes/playable/scene1050.h"
+#include "hollywood/monsters/scenes/playable/scene1060.h"
+#include "hollywood/monsters/scenes/playable/scene1070.h"
+#include "hollywood/monsters/scenes/playable/scene1080.h"
+#include "hollywood/monsters/scenes/playable/scene1090.h"
+#include "hollywood/monsters/scenes/playable/scene2000.h"
+#include "hollywood/monsters/scenes/playable/scene2010.h"
+#include "hollywood/monsters/scenes/playable/scene2020.h"
+#include "hollywood/monsters/scenes/playable/scene2030.h"
+#include "hollywood/monsters/scenes/playable/scene2040.h"
+#include "hollywood/monsters/scenes/playable/scene2050.h"
+#include "hollywood/monsters/scenes/playable/scene2060.h"
+#include "hollywood/monsters/scenes/playable/scene2070.h"
+#include "hollywood/monsters/scenes/playable/scene2080.h"
+#include "hollywood/monsters/scenes/playable/scene2090.h"
+#include "hollywood/monsters/scenes/playable/scene2100.h"
+#include "hollywood/monsters/scenes/playable/scene2110.h"
+#include "hollywood/monsters/scenes/playable/scene3000.h"
+#include "hollywood/monsters/scenes/playable/scene3010.h"
+#include "hollywood/monsters/scenes/playable/scene3020.h"
+#include "hollywood/monsters/scenes/playable/scene3030.h"
+#include "hollywood/monsters/scenes/playable/scene3040.h"
+#include "hollywood/monsters/scenes/playable/scene3050.h"
+#include "hollywood/monsters/scenes/playable/scene3060.h"
+#include "hollywood/monsters/scenes/playable/scene3070.h"
+#include "hollywood/monsters/scenes/playable/scene3080.h"
+#include "hollywood/monsters/scenes/playable/scene3090.h"
+#include "hollywood/monsters/scenes/playable/scene3100.h"
+#include "hollywood/monsters/scenes/playable/scene3110.h"
+#include "hollywood/monsters/scenes/playable/scene4000.h"
+#include "hollywood/monsters/scenes/playable/scene4010.h"
+#include "hollywood/monsters/scenes/playable/scene4020.h"
+#include "hollywood/monsters/scenes/playable/scene4030.h"
+#include "hollywood/monsters/scenes/playable/scene4040.h"
+#include "hollywood/monsters/scenes/playable/scene4050.h"
+#include "hollywood/monsters/scenes/playable/scene4060.h"
+#include "hollywood/monsters/scenes/playable/scene4070.h"
+#include "hollywood/monsters/scenes/playable/scene4080.h"
+#include "hollywood/monsters/scenes/playable/scene4090.h"
+#include "hollywood/monsters/scenes/playable/scene4100.h"
+#include "hollywood/monsters/scenes/playable/scene4110.h"
+#include "hollywood/monsters/scenes/playable/scene5000.h"
+#include "hollywood/monsters/scenes/playable/scene5010.h"
+#include "hollywood/monsters/scenes/playable/scene5020.h"
+#include "hollywood/monsters/scenes/playable/scene5030.h"
+#include "hollywood/monsters/scenes/playable/scene5040.h"
+#include "hollywood/monsters/scenes/playable/scene5050.h"
+#include "hollywood/monsters/scenes/playable/scene5060.h"
+#include "hollywood/monsters/scenes/playable/scene5070.h"
+#include "hollywood/monsters/scenes/playable/scene5080.h"
+#include "hollywood/monsters/scenes/playable/scene5090.h"
+#include "hollywood/monsters/scenes/playable/scene5100.h"
+#include "hollywood/monsters/scenes/playable/scene5110.h"
+#include "hollywood/monsters/scenes/playable/scene5120.h"
+#include "hollywood/monsters/scenes/playable/scene5130.h"
+#include "hollywood/monsters/scenes/playable/scene6000.h"
+#include "hollywood/monsters/scenes/playable/scene6010.h"
+#include "hollywood/monsters/scenes/playable/scene6020.h"
+#include "hollywood/monsters/scenes/playable/scene6030.h"
+#include "hollywood/monsters/scenes/playable/scene6040.h"
+#include "hollywood/monsters/scenes/playable/scene6050.h"
+#include "hollywood/monsters/scenes/playable/scene6060.h"
+#include "hollywood/monsters/scenes/playable/scene6070.h"
+#include "hollywood/monsters/scenes/playable/scene6080.h"
+#include "hollywood/monsters/scenes/playable/scene6090.h"
+#include "hollywood/monsters/scenes/playable/scene6100.h"
+#include "hollywood/monsters/scenes/playable/scene7000.h"
+#include "hollywood/monsters/scenes/playable/scene7010.h"
+#include "hollywood/monsters/scenes/playable/scene7020.h"
+#include "hollywood/monsters/scenes/playable/scene7030.h"
+#include "hollywood/monsters/scenes/playable/scene7040.h"
+#include "hollywood/monsters/scenes/playable/scene7050.h"
+#include "hollywood/monsters/scenes/playable/scene7060.h"
+#include "hollywood/monsters/scenes/playable/scene7070.h"
+#include "hollywood/monsters/scenes/playable/scene7080.h"
+#include "hollywood/monsters/scenes/playable/scene7090.h"
+#include "hollywood/monsters/scenes/playable/scene7100.h"
+#include "hollywood/monsters/scenes/playable/scene8000.h"
+#include "hollywood/monsters/scenes/playable/scene8010.h"
+#include "hollywood/monsters/scenes/playable/scene8020.h"
+#include "hollywood/monsters/scenes/scene_registry.h"
+
+namespace Hollywood {
+
+typedef bool (*SceneRunner)(HollywoodEngine *vm);
+
+struct SceneDefinition {
+ uint16 firstState;
+ uint16 lastState;
+ uint16 bootState;
+ SceneRunner run;
+};
+
+template<class Scene>
+bool playScene(HollywoodEngine *vm) {
+ Scene scene(vm);
+ return scene.play();
+}
+
+bool playScene9101(HollywoodEngine *vm) {
+ Scene9100 scene(vm);
+ return scene.playDialogueBranch();
+}
+
+#define SCENE(id, lastState) { id, lastState, id, &playScene<Scene##id> }
+#define BOOT_SCENE(id, lastState, bootState) { id, lastState, bootState, &playScene<Scene##id> }
+
+// A scene number is its first state; bootState records direct-boot exceptions.
+const SceneDefinition kSceneDefinitions[] = {
+ SCENE(1000, 1000),
+ BOOT_SCENE(1010, 0x03fb, 0x03f4),
+ SCENE(1020, 0x0405),
+ SCENE(1030, 0x0407),
+ SCENE(1040, 0x0419),
+ SCENE(1050, 0x0423),
+ SCENE(1060, 0x042d),
+ SCENE(1070, 0x0437),
+ SCENE(1080, 0x0441),
+ SCENE(1090, 0x044b),
+ SCENE(2000, 2000),
+ SCENE(2010, 0x07dc),
+ SCENE(2020, 0x07ed),
+ SCENE(2030, 0x07f7),
+ SCENE(2040, 0x0801),
+ SCENE(2050, 0x0803),
+ BOOT_SCENE(2060, 0x0811, 0x080e),
+ SCENE(2070, 0x0817),
+ SCENE(2080, 0x0821),
+ SCENE(2090, 0x082b),
+ SCENE(2100, 0x083d),
+ SCENE(2110, 0x083f),
+ SCENE(3000, 3000),
+ SCENE(3010, 0x0bcb),
+ SCENE(3020, 0x0bd5),
+ SCENE(3030, 0x0bdf),
+ SCENE(3040, 3040),
+ SCENE(3050, 0x0bf3),
+ SCENE(3060, 0x0bf5),
+ SCENE(3070, 0x0c07),
+ SCENE(3080, 0x0c11),
+ SCENE(3090, 0x0c1b),
+ SCENE(3100, 0x0c25),
+ SCENE(3110, 0x0c27),
+ SCENE(4000, 4000),
+ SCENE(4010, 0x0fb3),
+ SCENE(4020, 0x0fb5),
+ SCENE(4030, 0x0fc7),
+ SCENE(4040, 0x0fd1),
+ SCENE(4050, 0x0fdb),
+ SCENE(4060, 0x0fe5),
+ SCENE(4070, 0x0fef),
+ SCENE(4080, 4080),
+ SCENE(4090, 0x1003),
+ SCENE(4100, 0x100d),
+ SCENE(4110, 0x1017),
+ SCENE(5000, 5000),
+ SCENE(5010, 0x139b),
+ SCENE(5020, 5020),
+ SCENE(5030, 0x13af),
+ SCENE(5040, 0x13b9),
+ SCENE(5050, 0x13c3),
+ SCENE(5060, 0x13cd),
+ SCENE(5070, 5070),
+ SCENE(5080, 5080),
+ SCENE(5090, 0x13eb),
+ SCENE(5100, 0x13f5),
+ SCENE(5110, 0x13ff),
+ SCENE(5120, 0x1409),
+ SCENE(5130, 0x1413),
+ SCENE(6000, 6000),
+ SCENE(6010, 0x1783),
+ SCENE(6020, 0x178d),
+ SCENE(6030, 0x1797),
+ SCENE(6040, 0x17a1),
+ SCENE(6050, 0x17ab),
+ SCENE(6060, 0x17ad),
+ SCENE(6070, 0x17bf),
+ SCENE(6080, 0x17c9),
+ SCENE(6090, 6090),
+ SCENE(6100, 6100),
+ SCENE(7000, 7000),
+ SCENE(7010, 0x1b6b),
+ SCENE(7020, 7020),
+ SCENE(7030, 0x1b7f),
+ SCENE(7040, 0x1b89),
+ SCENE(7050, 7050),
+ SCENE(7060, 0x1b9d),
+ SCENE(7070, 0x1ba0),
+ SCENE(7080, 0x1bb1),
+ SCENE(7090, 0x1bbb),
+ SCENE(7100, 0x1bc5),
+ SCENE(8000, 8000),
+ SCENE(8010, 0x1f4b),
+ SCENE(8020, 8020),
+ SCENE(9090, 9090),
+ { 9101, 9101, 9101, &playScene9101 },
+ SCENE(9130, 9130),
+ SCENE(9140, 9140),
+ SCENE(9150, 9150),
+ SCENE(9160, 9160),
+ SCENE(9170, 9170),
+ SCENE(9180, 9180)
+};
+
+#undef BOOT_SCENE
+#undef SCENE
+
+const SceneDefinition *findSceneDefinition(uint16 stateId) {
+ for (uint i = 0; i < ARRAYSIZE(kSceneDefinitions); ++i) {
+ const SceneDefinition &definition = kSceneDefinitions[i];
+ if (stateId >= definition.firstState && stateId <= definition.lastState)
+ return &definition;
+ }
+
+ return nullptr;
+}
+
+bool isImplementedGameplayState(int stateId) {
+ if (stateId < 0 || stateId > 0xffff)
+ return false;
+
+ return stateId == 0xffff || findSceneDefinition((uint16)stateId) != nullptr;
+}
+
+bool isGameplayStateInScene(uint16 sceneStateId, uint16 stateId) {
+ const SceneDefinition *definition = findSceneDefinition(sceneStateId);
+ return definition && definition == findSceneDefinition(stateId);
+}
+
+int gameplaySceneNumberForState(uint16 stateId) {
+ const SceneDefinition *definition = findSceneDefinition(stateId);
+ return definition ? definition->firstState : -1;
+}
+
+int gameplayStateForBootParam(int bootParam) {
+ for (uint i = 0; i < ARRAYSIZE(kSceneDefinitions); ++i) {
+ const SceneDefinition &definition = kSceneDefinitions[i];
+ if (bootParam == definition.firstState)
+ return definition.bootState;
+ }
+
+ return bootParam;
+}
+
+GameplaySceneResult runGameplayScene(HollywoodEngine *vm, uint16 stateId) {
+ const SceneDefinition *definition = findSceneDefinition(stateId);
+ if (!definition)
+ return kGameplaySceneNotFound;
+
+ return definition->run(vm) ? kGameplaySceneCompleted : kGameplaySceneFailed;
+}
+
+} // End of namespace Hollywood
diff --git a/engines/hollywood/scenes/scene_registry.h b/engines/hollywood/monsters/scenes/scene_registry.h
similarity index 90%
rename from engines/hollywood/scenes/scene_registry.h
rename to engines/hollywood/monsters/scenes/scene_registry.h
index b13f38e65ac..cf3a79e290a 100644
--- a/engines/hollywood/scenes/scene_registry.h
+++ b/engines/hollywood/monsters/scenes/scene_registry.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_SCENE_REGISTRY_H
-#define HOLLYWOOD_SCENES_SCENE_REGISTRY_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_SCENE_REGISTRY_H
+#define HOLLYWOOD_MONSTERS_SCENES_SCENE_REGISTRY_H
#include "common/scummsys.h"
@@ -43,4 +43,4 @@ GameplaySceneResult runGameplayScene(HollywoodEngine *vm, uint16 stateId);
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_SCENE_REGISTRY_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_SCENE_REGISTRY_H
diff --git a/engines/hollywood/scenes/scene_resources.cpp b/engines/hollywood/monsters/scenes/scene_resources.cpp
similarity index 97%
rename from engines/hollywood/scenes/scene_resources.cpp
rename to engines/hollywood/monsters/scenes/scene_resources.cpp
index 768a807e5d7..c5a1594a618 100644
--- a/engines/hollywood/scenes/scene_resources.cpp
+++ b/engines/hollywood/monsters/scenes/scene_resources.cpp
@@ -24,8 +24,8 @@
#include "graphics/managed_surface.h"
#include "hollywood/debug.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/scene_resources.h"
+#include "hollywood/monsters/graphics.h"
+#include "hollywood/monsters/scenes/scene_resources.h"
namespace Hollywood {
@@ -107,7 +107,7 @@ bool SceneResources::loadFixedChunk(const char *sceneDebugName,
bool SceneResources::loadFixedChunk(const char *sceneDebugName,
uint index, IndexedSurfaceBuffer &destination, uint fixedSize) {
- return _archive.readFixedChunk(index, destination, fixedSize, sceneDebugName);
+ return _archive.readFixedChunk(index, destination.data(), destination.size(), fixedSize, sceneDebugName);
}
bool SceneResources::loadVariableChunk(uint index, Common::Array<byte> &destination) {
diff --git a/engines/hollywood/scenes/scene_resources.h b/engines/hollywood/monsters/scenes/scene_resources.h
similarity index 94%
rename from engines/hollywood/scenes/scene_resources.h
rename to engines/hollywood/monsters/scenes/scene_resources.h
index 66ca5599184..7ecaab47c24 100644
--- a/engines/hollywood/scenes/scene_resources.h
+++ b/engines/hollywood/monsters/scenes/scene_resources.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_SCENE_RESOURCES_H
-#define HOLLYWOOD_SCENES_SCENE_RESOURCES_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_SCENE_RESOURCES_H
+#define HOLLYWOOD_MONSTERS_SCENES_SCENE_RESOURCES_H
#include "common/array.h"
#include "common/types.h"
@@ -84,4 +84,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_SCENE_RESOURCES_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_SCENE_RESOURCES_H
diff --git a/engines/hollywood/scenes/shared_frame_sequences.cpp b/engines/hollywood/monsters/scenes/shared_frame_sequences.cpp
similarity index 97%
rename from engines/hollywood/scenes/shared_frame_sequences.cpp
rename to engines/hollywood/monsters/scenes/shared_frame_sequences.cpp
index 3e338224dee..10835a7fddb 100644
--- a/engines/hollywood/scenes/shared_frame_sequences.cpp
+++ b/engines/hollywood/monsters/scenes/shared_frame_sequences.cpp
@@ -19,7 +19,7 @@
*
*/
-#include "hollywood/scenes/shared_frame_sequences.h"
+#include "hollywood/monsters/scenes/shared_frame_sequences.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/shared_frame_sequences.h b/engines/hollywood/monsters/scenes/shared_frame_sequences.h
similarity index 91%
rename from engines/hollywood/scenes/shared_frame_sequences.h
rename to engines/hollywood/monsters/scenes/shared_frame_sequences.h
index f21fc9d4622..2c2e8cf58e3 100644
--- a/engines/hollywood/scenes/shared_frame_sequences.h
+++ b/engines/hollywood/monsters/scenes/shared_frame_sequences.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_SHARED_FRAME_SEQUENCES_H
-#define HOLLYWOOD_SCENES_SHARED_FRAME_SEQUENCES_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_SHARED_FRAME_SEQUENCES_H
+#define HOLLYWOOD_MONSTERS_SCENES_SHARED_FRAME_SEQUENCES_H
#include "common/types.h"
@@ -50,4 +50,4 @@ extern const byte kFiveFramePingPongFrames[kFiveFramePingPongFrameCount];
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_SHARED_FRAME_SEQUENCES_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_SHARED_FRAME_SEQUENCES_H
diff --git a/engines/hollywood/scenes/speech_overlay.cpp b/engines/hollywood/monsters/scenes/speech_overlay.cpp
similarity index 97%
rename from engines/hollywood/scenes/speech_overlay.cpp
rename to engines/hollywood/monsters/scenes/speech_overlay.cpp
index c3572b42b5f..0e70dac78f5 100644
--- a/engines/hollywood/scenes/speech_overlay.cpp
+++ b/engines/hollywood/monsters/scenes/speech_overlay.cpp
@@ -21,9 +21,9 @@
#include "graphics/surface.h"
-#include "hollywood/hollywood.h"
-#include "hollywood/font.h"
-#include "hollywood/scenes/speech_overlay.h"
+#include "hollywood/monsters/hollywood.h"
+#include "hollywood/monsters/font.h"
+#include "hollywood/monsters/scenes/speech_overlay.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/speech_overlay.h b/engines/hollywood/monsters/scenes/speech_overlay.h
similarity index 92%
rename from engines/hollywood/scenes/speech_overlay.h
rename to engines/hollywood/monsters/scenes/speech_overlay.h
index 1f1c8945ce4..bd457396628 100644
--- a/engines/hollywood/scenes/speech_overlay.h
+++ b/engines/hollywood/monsters/scenes/speech_overlay.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_SPEECH_OVERLAY_H
-#define HOLLYWOOD_SCENES_SPEECH_OVERLAY_H
+#ifndef HOLLYWOOD_MONSTERS_SCENES_SPEECH_OVERLAY_H
+#define HOLLYWOOD_MONSTERS_SCENES_SPEECH_OVERLAY_H
#include "common/array.h"
#include "common/str.h"
@@ -60,4 +60,4 @@ void drawSpeechOverlayText(const SpeechOverlay &overlay, HollywoodFont *font,
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_SPEECH_OVERLAY_H
+#endif // HOLLYWOOD_MONSTERS_SCENES_SPEECH_OVERLAY_H
diff --git a/engines/hollywood/resource.cpp b/engines/hollywood/resource.cpp
index 7c7122cc803..96fbd7dd6e2 100644
--- a/engines/hollywood/resource.cpp
+++ b/engines/hollywood/resource.cpp
@@ -25,11 +25,31 @@
#include "graphics/managed_surface.h"
#include "hollywood/debug.h"
-#include "hollywood/graphics.h"
#include "hollywood/resource.h"
namespace Hollywood {
+uint16 readUint16LE(const Common::Array<byte> &source, uint offset) {
+ if (offset + 2 > source.size())
+ return 0;
+
+ return source[offset] | (source[offset + 1] << 8);
+}
+
+int16 readSint16LE(const Common::Array<byte> &source, uint offset) {
+ return (int16)readUint16LE(source, offset);
+}
+
+uint32 readUint32LE(const Common::Array<byte> &source, uint offset) {
+ if (offset + 4 > source.size())
+ return 0;
+
+ return source[offset] |
+ (source[offset + 1] << 8) |
+ (source[offset + 2] << 16) |
+ (source[offset + 3] << 24);
+}
+
void ResourceChunkTable::clear() {
count = 0;
for (int i = 0; i < kMaxResourceChunkCount; ++i) {
@@ -138,61 +158,17 @@ uint32 ChunkArchive::totalChunkSize(uint firstChunk, uint lastChunk) const {
bool ChunkArchive::readFixedChunk(uint index, Common::Array<byte> &destination, uint fixedSize,
const char *debugName) {
- uint32 chunkOffset = 0;
- uint32 byteCount = 0;
- const Common::String archiveName = _fileName.toString();
- if (!chunkBounds(index, chunkOffset, byteCount)) {
- warning("Failed to open %s chunk %u", archiveName.c_str(), index);
- return false;
- }
-
- if (byteCount > fixedSize || destination.size() < fixedSize) {
- warning("%s chunk %u does not fit its fixed %s destination",
- archiveName.c_str(), index, debugName);
- return false;
- }
-
- memset(destination.data(), 0, destination.size());
- if (!readChunkBytes(index, destination.data(), destination.size())) {
- warning("Failed to read %s chunk %u", archiveName.c_str(), index);
- return false;
- }
-
- debugC(1, kDebugResources, "Loaded %s fixed chunk %u: offset=%u size=%u",
- archiveName.c_str(), index, chunkOffset, (uint)byteCount);
- return true;
+ return readFixedChunk(index, destination.data(), destination.size(), fixedSize, debugName);
}
bool ChunkArchive::readFixedChunk(uint index, Graphics::ManagedSurface &destination, uint fixedSize,
const char *debugName) {
- uint32 chunkOffset = 0;
- uint32 byteCount = 0;
- const Common::String archiveName = _fileName.toString();
- if (!chunkBounds(index, chunkOffset, byteCount)) {
- warning("Failed to open %s chunk %u", archiveName.c_str(), index);
- return false;
- }
-
- const uint destinationSize = destination.pitch * destination.h;
- if (byteCount > fixedSize || destinationSize < fixedSize) {
- warning("%s chunk %u does not fit its fixed %s destination",
- archiveName.c_str(), index, debugName);
- return false;
- }
-
- memset(destination.getPixels(), 0, destinationSize);
- if (!readChunkBytes(index, (byte *)destination.getPixels(), destinationSize)) {
- warning("Failed to read %s chunk %u", archiveName.c_str(), index);
- return false;
- }
-
- debugC(1, kDebugResources, "Loaded %s fixed chunk %u: offset=%u size=%u",
- archiveName.c_str(), index, chunkOffset, (uint)byteCount);
- return true;
+ return readFixedChunk(index, (byte *)destination.getPixels(), destination.pitch * destination.h,
+ fixedSize, debugName);
}
-bool ChunkArchive::readFixedChunk(uint index, IndexedSurfaceBuffer &destination, uint fixedSize,
- const char *debugName) {
+bool ChunkArchive::readFixedChunk(uint index, byte *destination, uint destinationSize,
+ uint fixedSize, const char *debugName) {
uint32 chunkOffset = 0;
uint32 byteCount = 0;
const Common::String archiveName = _fileName.toString();
@@ -201,14 +177,14 @@ bool ChunkArchive::readFixedChunk(uint index, IndexedSurfaceBuffer &destination,
return false;
}
- if (byteCount > fixedSize || destination.size() < fixedSize) {
+ if (byteCount > fixedSize || destinationSize < fixedSize) {
warning("%s chunk %u does not fit its fixed %s destination",
archiveName.c_str(), index, debugName);
return false;
}
- memset(destination.data(), 0, destination.size());
- if (!readChunkBytes(index, destination.data(), destination.size())) {
+ memset(destination, 0, destinationSize);
+ if (!readChunkBytes(index, destination, destinationSize)) {
warning("Failed to read %s chunk %u", archiveName.c_str(), index);
return false;
}
diff --git a/engines/hollywood/resource.h b/engines/hollywood/resource.h
index 0b4e7213719..cbad027a214 100644
--- a/engines/hollywood/resource.h
+++ b/engines/hollywood/resource.h
@@ -33,7 +33,10 @@ class ManagedSurface;
namespace Hollywood {
-class IndexedSurfaceBuffer;
+// Bounded little-endian reads shared by the archive and scene-data decoders.
+uint16 readUint16LE(const Common::Array<byte> &source, uint offset);
+int16 readSint16LE(const Common::Array<byte> &source, uint offset);
+uint32 readUint32LE(const Common::Array<byte> &source, uint offset);
enum {
kResourceChunkCount = 40,
@@ -70,8 +73,8 @@ public:
const char *debugName);
bool readFixedChunk(uint index, Graphics::ManagedSurface &destination, uint fixedSize,
const char *debugName);
- bool readFixedChunk(uint index, IndexedSurfaceBuffer &destination, uint fixedSize,
- const char *debugName);
+ bool readFixedChunk(uint index, byte *destination, uint destinationSize,
+ uint fixedSize, const char *debugName);
bool readVariableChunk(uint index, Common::Array<byte> &destination);
bool readChunkTo(uint index, Common::Array<byte> &destination, uint32 destinationOffset);
diff --git a/engines/hollywood/runaway/detection_tables.h b/engines/hollywood/runaway/detection_tables.h
new file mode 100644
index 00000000000..f50e13118b1
--- /dev/null
+++ b/engines/hollywood/runaway/detection_tables.h
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef HOLLYWOOD_RUNAWAY_DETECTION_TABLES_H
+#define HOLLYWOOD_RUNAWAY_DETECTION_TABLES_H
+
+// Included in the shared ADGameDescription array in hollywood/detection.cpp.
+ // German Runaway demo, starting in the shack (scene 5030).
+ {
+ "runaway",
+ "Demo",
+ AD_ENTRY3s("RESOURCE.E03", "df350293b7dab8f39aead666dcedce72", 41872288,
+ "RESOURCE.003", "6e7e639375a14c5b694879c88a8aeaa6", 444292,
+ "RESOURCE.000", "3ccd0619e1475efd4f1212b92db25843", 38045367),
+ Common::DE_DEU,
+ Common::kPlatformWindows,
+ ADGF_DEMO | ADGF_UNSTABLE,
+ GUIO2(GUIO_NOMIDI, GUIO_NOLAUNCHLOAD)
+ },
+
+#endif // HOLLYWOOD_RUNAWAY_DETECTION_TABLES_H
diff --git a/engines/hollywood/runaway/scene5030.h b/engines/hollywood/runaway/scene5030.h
index c6c7533cc90..72e6f22ac2e 100644
--- a/engines/hollywood/runaway/scene5030.h
+++ b/engines/hollywood/runaway/scene5030.h
@@ -26,7 +26,7 @@
#include "hollywood/resource.h"
#include "hollywood/runaway/audio.h"
#include "hollywood/runaway/graphics.h"
-#include "hollywood/scenes/scene_text_store.h"
+#include "hollywood/scene_text_store.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/scene_text_store.cpp b/engines/hollywood/scene_text_store.cpp
similarity index 99%
rename from engines/hollywood/scenes/scene_text_store.cpp
rename to engines/hollywood/scene_text_store.cpp
index 0c6cbd427df..35ac8de5734 100644
--- a/engines/hollywood/scenes/scene_text_store.cpp
+++ b/engines/hollywood/scene_text_store.cpp
@@ -24,8 +24,8 @@
#include "common/path.h"
#include "hollywood/debug.h"
-#include "hollywood/graphics.h"
-#include "hollywood/scenes/scene_text_store.h"
+#include "hollywood/resource.h"
+#include "hollywood/scene_text_store.h"
namespace Hollywood {
diff --git a/engines/hollywood/scenes/scene_text_store.h b/engines/hollywood/scene_text_store.h
similarity index 96%
rename from engines/hollywood/scenes/scene_text_store.h
rename to engines/hollywood/scene_text_store.h
index 9f1a563563f..76ebe6804df 100644
--- a/engines/hollywood/scenes/scene_text_store.h
+++ b/engines/hollywood/scene_text_store.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef HOLLYWOOD_SCENES_SCENE_TEXT_STORE_H
-#define HOLLYWOOD_SCENES_SCENE_TEXT_STORE_H
+#ifndef HOLLYWOOD_SCENE_TEXT_STORE_H
+#define HOLLYWOOD_SCENE_TEXT_STORE_H
#include "common/array.h"
#include "common/str.h"
@@ -109,4 +109,4 @@ private:
} // End of namespace Hollywood
-#endif // HOLLYWOOD_SCENES_SCENE_TEXT_STORE_H
+#endif // HOLLYWOOD_SCENE_TEXT_STORE_H
diff --git a/engines/hollywood/scenes/scene_registry.cpp b/engines/hollywood/scenes/scene_registry.cpp
deleted file mode 100644
index 2d374d04630..00000000000
--- a/engines/hollywood/scenes/scene_registry.cpp
+++ /dev/null
@@ -1,287 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "hollywood/scenes/intro/scene1000.h"
-#include "hollywood/scenes/intro/scene9090.h"
-#include "hollywood/scenes/intro/scene9100.h"
-#include "hollywood/scenes/intro/scene9130.h"
-#include "hollywood/scenes/intro/scene9140.h"
-#include "hollywood/scenes/intro/scene9150.h"
-#include "hollywood/scenes/intro/scene9160.h"
-#include "hollywood/scenes/intro/scene9170.h"
-#include "hollywood/scenes/intro/scene9180.h"
-#include "hollywood/scenes/playable/scene1010.h"
-#include "hollywood/scenes/playable/scene1020.h"
-#include "hollywood/scenes/playable/scene1030.h"
-#include "hollywood/scenes/playable/scene1040.h"
-#include "hollywood/scenes/playable/scene1050.h"
-#include "hollywood/scenes/playable/scene1060.h"
-#include "hollywood/scenes/playable/scene1070.h"
-#include "hollywood/scenes/playable/scene1080.h"
-#include "hollywood/scenes/playable/scene1090.h"
-#include "hollywood/scenes/playable/scene2000.h"
-#include "hollywood/scenes/playable/scene2010.h"
-#include "hollywood/scenes/playable/scene2020.h"
-#include "hollywood/scenes/playable/scene2030.h"
-#include "hollywood/scenes/playable/scene2040.h"
-#include "hollywood/scenes/playable/scene2050.h"
-#include "hollywood/scenes/playable/scene2060.h"
-#include "hollywood/scenes/playable/scene2070.h"
-#include "hollywood/scenes/playable/scene2080.h"
-#include "hollywood/scenes/playable/scene2090.h"
-#include "hollywood/scenes/playable/scene2100.h"
-#include "hollywood/scenes/playable/scene2110.h"
-#include "hollywood/scenes/playable/scene3000.h"
-#include "hollywood/scenes/playable/scene3010.h"
-#include "hollywood/scenes/playable/scene3020.h"
-#include "hollywood/scenes/playable/scene3030.h"
-#include "hollywood/scenes/playable/scene3040.h"
-#include "hollywood/scenes/playable/scene3050.h"
-#include "hollywood/scenes/playable/scene3060.h"
-#include "hollywood/scenes/playable/scene3070.h"
-#include "hollywood/scenes/playable/scene3080.h"
-#include "hollywood/scenes/playable/scene3090.h"
-#include "hollywood/scenes/playable/scene3100.h"
-#include "hollywood/scenes/playable/scene3110.h"
-#include "hollywood/scenes/playable/scene4000.h"
-#include "hollywood/scenes/playable/scene4010.h"
-#include "hollywood/scenes/playable/scene4020.h"
-#include "hollywood/scenes/playable/scene4030.h"
-#include "hollywood/scenes/playable/scene4040.h"
-#include "hollywood/scenes/playable/scene4050.h"
-#include "hollywood/scenes/playable/scene4060.h"
-#include "hollywood/scenes/playable/scene4070.h"
-#include "hollywood/scenes/playable/scene4080.h"
-#include "hollywood/scenes/playable/scene4090.h"
-#include "hollywood/scenes/playable/scene4100.h"
-#include "hollywood/scenes/playable/scene4110.h"
-#include "hollywood/scenes/playable/scene5000.h"
-#include "hollywood/scenes/playable/scene5010.h"
-#include "hollywood/scenes/playable/scene5020.h"
-#include "hollywood/scenes/playable/scene5030.h"
-#include "hollywood/scenes/playable/scene5040.h"
-#include "hollywood/scenes/playable/scene5050.h"
-#include "hollywood/scenes/playable/scene5060.h"
-#include "hollywood/scenes/playable/scene5070.h"
-#include "hollywood/scenes/playable/scene5080.h"
-#include "hollywood/scenes/playable/scene5090.h"
-#include "hollywood/scenes/playable/scene5100.h"
-#include "hollywood/scenes/playable/scene5110.h"
-#include "hollywood/scenes/playable/scene5120.h"
-#include "hollywood/scenes/playable/scene5130.h"
-#include "hollywood/scenes/playable/scene6000.h"
-#include "hollywood/scenes/playable/scene6010.h"
-#include "hollywood/scenes/playable/scene6020.h"
-#include "hollywood/scenes/playable/scene6030.h"
-#include "hollywood/scenes/playable/scene6040.h"
-#include "hollywood/scenes/playable/scene6050.h"
-#include "hollywood/scenes/playable/scene6060.h"
-#include "hollywood/scenes/playable/scene6070.h"
-#include "hollywood/scenes/playable/scene6080.h"
-#include "hollywood/scenes/playable/scene6090.h"
-#include "hollywood/scenes/playable/scene6100.h"
-#include "hollywood/scenes/playable/scene7000.h"
-#include "hollywood/scenes/playable/scene7010.h"
-#include "hollywood/scenes/playable/scene7020.h"
-#include "hollywood/scenes/playable/scene7030.h"
-#include "hollywood/scenes/playable/scene7040.h"
-#include "hollywood/scenes/playable/scene7050.h"
-#include "hollywood/scenes/playable/scene7060.h"
-#include "hollywood/scenes/playable/scene7070.h"
-#include "hollywood/scenes/playable/scene7080.h"
-#include "hollywood/scenes/playable/scene7090.h"
-#include "hollywood/scenes/playable/scene7100.h"
-#include "hollywood/scenes/playable/scene8000.h"
-#include "hollywood/scenes/playable/scene8010.h"
-#include "hollywood/scenes/playable/scene8020.h"
-#include "hollywood/scenes/scene_registry.h"
-
-namespace Hollywood {
-
-typedef bool (*SceneRunner)(HollywoodEngine *vm);
-
-struct SceneDefinition {
- uint16 firstState;
- uint16 lastState;
- uint16 bootState;
- SceneRunner run;
-};
-
-template<class Scene>
-bool playScene(HollywoodEngine *vm) {
- Scene scene(vm);
- return scene.play();
-}
-
-bool playScene9101(HollywoodEngine *vm) {
- Scene9100 scene(vm);
- return scene.playDialogueBranch();
-}
-
-#define SCENE(id, lastState) { id, lastState, id, &playScene<Scene##id> }
-#define BOOT_SCENE(id, lastState, bootState) { id, lastState, bootState, &playScene<Scene##id> }
-
-// A scene number is its first state; bootState records direct-boot exceptions.
-const SceneDefinition kSceneDefinitions[] = {
- SCENE(1000, 1000),
- BOOT_SCENE(1010, 0x03fb, 0x03f4),
- SCENE(1020, 0x0405),
- SCENE(1030, 0x0407),
- SCENE(1040, 0x0419),
- SCENE(1050, 0x0423),
- SCENE(1060, 0x042d),
- SCENE(1070, 0x0437),
- SCENE(1080, 0x0441),
- SCENE(1090, 0x044b),
- SCENE(2000, 2000),
- SCENE(2010, 0x07dc),
- SCENE(2020, 0x07ed),
- SCENE(2030, 0x07f7),
- SCENE(2040, 0x0801),
- SCENE(2050, 0x0803),
- BOOT_SCENE(2060, 0x0811, 0x080e),
- SCENE(2070, 0x0817),
- SCENE(2080, 0x0821),
- SCENE(2090, 0x082b),
- SCENE(2100, 0x083d),
- SCENE(2110, 0x083f),
- SCENE(3000, 3000),
- SCENE(3010, 0x0bcb),
- SCENE(3020, 0x0bd5),
- SCENE(3030, 0x0bdf),
- SCENE(3040, 3040),
- SCENE(3050, 0x0bf3),
- SCENE(3060, 0x0bf5),
- SCENE(3070, 0x0c07),
- SCENE(3080, 0x0c11),
- SCENE(3090, 0x0c1b),
- SCENE(3100, 0x0c25),
- SCENE(3110, 0x0c27),
- SCENE(4000, 4000),
- SCENE(4010, 0x0fb3),
- SCENE(4020, 0x0fb5),
- SCENE(4030, 0x0fc7),
- SCENE(4040, 0x0fd1),
- SCENE(4050, 0x0fdb),
- SCENE(4060, 0x0fe5),
- SCENE(4070, 0x0fef),
- SCENE(4080, 4080),
- SCENE(4090, 0x1003),
- SCENE(4100, 0x100d),
- SCENE(4110, 0x1017),
- SCENE(5000, 5000),
- SCENE(5010, 0x139b),
- SCENE(5020, 5020),
- SCENE(5030, 0x13af),
- SCENE(5040, 0x13b9),
- SCENE(5050, 0x13c3),
- SCENE(5060, 0x13cd),
- SCENE(5070, 5070),
- SCENE(5080, 5080),
- SCENE(5090, 0x13eb),
- SCENE(5100, 0x13f5),
- SCENE(5110, 0x13ff),
- SCENE(5120, 0x1409),
- SCENE(5130, 0x1413),
- SCENE(6000, 6000),
- SCENE(6010, 0x1783),
- SCENE(6020, 0x178d),
- SCENE(6030, 0x1797),
- SCENE(6040, 0x17a1),
- SCENE(6050, 0x17ab),
- SCENE(6060, 0x17ad),
- SCENE(6070, 0x17bf),
- SCENE(6080, 0x17c9),
- SCENE(6090, 6090),
- SCENE(6100, 6100),
- SCENE(7000, 7000),
- SCENE(7010, 0x1b6b),
- SCENE(7020, 7020),
- SCENE(7030, 0x1b7f),
- SCENE(7040, 0x1b89),
- SCENE(7050, 7050),
- SCENE(7060, 0x1b9d),
- SCENE(7070, 0x1ba0),
- SCENE(7080, 0x1bb1),
- SCENE(7090, 0x1bbb),
- SCENE(7100, 0x1bc5),
- SCENE(8000, 8000),
- SCENE(8010, 0x1f4b),
- SCENE(8020, 8020),
- SCENE(9090, 9090),
- { 9101, 9101, 9101, &playScene9101 },
- SCENE(9130, 9130),
- SCENE(9140, 9140),
- SCENE(9150, 9150),
- SCENE(9160, 9160),
- SCENE(9170, 9170),
- SCENE(9180, 9180)
-};
-
-#undef BOOT_SCENE
-#undef SCENE
-
-const SceneDefinition *findSceneDefinition(uint16 stateId) {
- for (uint i = 0; i < ARRAYSIZE(kSceneDefinitions); ++i) {
- const SceneDefinition &definition = kSceneDefinitions[i];
- if (stateId >= definition.firstState && stateId <= definition.lastState)
- return &definition;
- }
-
- return nullptr;
-}
-
-bool isImplementedGameplayState(int stateId) {
- if (stateId < 0 || stateId > 0xffff)
- return false;
-
- return stateId == 0xffff || findSceneDefinition((uint16)stateId) != nullptr;
-}
-
-bool isGameplayStateInScene(uint16 sceneStateId, uint16 stateId) {
- const SceneDefinition *definition = findSceneDefinition(sceneStateId);
- return definition && definition == findSceneDefinition(stateId);
-}
-
-int gameplaySceneNumberForState(uint16 stateId) {
- const SceneDefinition *definition = findSceneDefinition(stateId);
- return definition ? definition->firstState : -1;
-}
-
-int gameplayStateForBootParam(int bootParam) {
- for (uint i = 0; i < ARRAYSIZE(kSceneDefinitions); ++i) {
- const SceneDefinition &definition = kSceneDefinitions[i];
- if (bootParam == definition.firstState)
- return definition.bootState;
- }
-
- return bootParam;
-}
-
-GameplaySceneResult runGameplayScene(HollywoodEngine *vm, uint16 stateId) {
- const SceneDefinition *definition = findSceneDefinition(stateId);
- if (!definition)
- return kGameplaySceneNotFound;
-
- return definition->run(vm) ? kGameplaySceneCompleted : kGameplaySceneFailed;
-}
-
-} // End of namespace Hollywood
Commit: 2815b2f45bd6e6b9f1ce033b1c84aa9f4b61fb61
https://github.com/scummvm/scummvm/commit/2815b2f45bd6e6b9f1ce033b1c84aa9f4b61fb61
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-10-27T11:28:15+01:00
Commit Message:
HOLLYWOOD: implemented intro in runaway german demo
Changed paths:
A engines/hollywood/runaway/intro.cpp
A engines/hollywood/runaway/intro.h
engines/hollywood/module.mk
engines/hollywood/runaway/audio.cpp
engines/hollywood/runaway/audio.h
engines/hollywood/runaway/engine.cpp
engines/hollywood/runaway/engine.h
engines/hollywood/runaway/graphics.h
engines/hollywood/runaway/scene5030.h
diff --git a/engines/hollywood/module.mk b/engines/hollywood/module.mk
index 83064e6aeb7..d2f1aa48838 100644
--- a/engines/hollywood/module.mk
+++ b/engines/hollywood/module.mk
@@ -139,6 +139,7 @@ MODULE_OBJS = \
runaway/audio.o \
runaway/engine.o \
runaway/graphics.o \
+ runaway/intro.o \
runaway/scene5030.o
# This module can be built as a plugin
diff --git a/engines/hollywood/runaway/audio.cpp b/engines/hollywood/runaway/audio.cpp
index cbc63e611b3..205d2a0243d 100644
--- a/engines/hollywood/runaway/audio.cpp
+++ b/engines/hollywood/runaway/audio.cpp
@@ -31,7 +31,7 @@
namespace Hollywood {
RunawayAudio::~RunawayAudio() {
- _mixer->stopHandle(_music);
+ stopMusic();
stopSpeech();
stopEffect();
}
@@ -81,6 +81,13 @@ uint32 RunawayAudio::play(const char *archive, uint16 cue, uint tableCount, bool
return duration;
}
+void RunawayAudio::playIntroMusic() {
+ // The Pendulo logo uses RESOURCE.002 cue 2 on native channel 7, which
+ // has the same 16 kHz stereo PCM format as the room music channels.
+ play("RESOURCE.002", 2, 100, false, Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN | Audio::FLAG_STEREO,
+ Audio::Mixer::kMusicSoundType, _music, Audio::Mixer::kMaxChannelVolume, false);
+}
+
void RunawayAudio::playMusic(uint16 cue) {
play("RESOURCE.M03", cue, 100, false, Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN | Audio::FLAG_STEREO,
Audio::Mixer::kMusicSoundType, _music, 96, true);
@@ -99,6 +106,10 @@ void RunawayAudio::playEffect(uint16 cue, byte volume) {
Audio::Mixer::kSFXSoundType, _effect, volume, false);
}
+void RunawayAudio::stopMusic() {
+ _mixer->stopHandle(_music);
+}
+
void RunawayAudio::stopSpeech() {
_mixer->stopHandle(_speech);
}
@@ -107,6 +118,10 @@ void RunawayAudio::stopEffect() {
_mixer->stopHandle(_effect);
}
+bool RunawayAudio::musicPlaying() const {
+ return _mixer->isSoundHandleActive(_music);
+}
+
bool RunawayAudio::speechPlaying() const {
return _mixer->isSoundHandleActive(_speech);
}
diff --git a/engines/hollywood/runaway/audio.h b/engines/hollywood/runaway/audio.h
index 72d38464e63..989502a9d1b 100644
--- a/engines/hollywood/runaway/audio.h
+++ b/engines/hollywood/runaway/audio.h
@@ -30,11 +30,14 @@ class RunawayAudio {
public:
explicit RunawayAudio(Audio::Mixer *mixer) : _mixer(mixer) {}
~RunawayAudio();
+ void playIntroMusic();
void playMusic(uint16 cue);
uint32 playSpeech(uint16 sample);
void playEffect(uint16 cue, byte volume = Audio::Mixer::kMaxChannelVolume);
+ void stopMusic();
void stopSpeech();
void stopEffect();
+ bool musicPlaying() const;
bool speechPlaying() const;
private:
diff --git a/engines/hollywood/runaway/engine.cpp b/engines/hollywood/runaway/engine.cpp
index c265334c899..382de5ab099 100644
--- a/engines/hollywood/runaway/engine.cpp
+++ b/engines/hollywood/runaway/engine.cpp
@@ -33,6 +33,7 @@
#include "gui/debugger.h"
#include "hollywood/runaway/engine.h"
+#include "hollywood/runaway/intro.h"
#include "hollywood/runaway/scene5030.h"
namespace Hollywood {
@@ -43,7 +44,8 @@ enum RunawayAction {
kScrollRight,
kScrollStart,
kScrollEnd,
- kReturnToLauncher
+ kReturnToLauncher,
+ kSkipIntro
};
} // End of anonymous namespace
@@ -67,13 +69,49 @@ void RunawayEngine::syncSoundSettings() {
_mixer->muteSoundType(Audio::Mixer::kSFXSoundType, mute || ConfMan.getBool("sfx_mute"));
}
+Common::Error RunawayEngine::playIntro() {
+ RunawayIntro intro(_mixer);
+ if (!intro.load())
+ return Common::Error(Common::kReadingFailed, "Cannot load the Runaway demo logo or story card");
+ const bool cursorWasVisible = CursorMan.showMouse(false);
+ intro.start(getTotalPlayTime());
+ while (!shouldQuit() && !intro.finished()) {
+ bool skip = false;
+ Common::Event event;
+ while (_eventMan->pollEvent(event)) {
+ if (event.type == Common::EVENT_LBUTTONDOWN || event.type == Common::EVENT_RBUTTONDOWN) {
+ skip = true;
+ } else if (event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_START &&
+ (event.customType == kSkipIntro || event.customType == kReturnToLauncher)) {
+ skip = true;
+ }
+ }
+ if (shouldQuit())
+ break;
+ const uint32 now = getTotalPlayTime();
+ intro.update(now);
+ if (skip)
+ intro.skip(now);
+ intro.draw();
+ const Graphics::ManagedSurface &screen = intro.screen();
+ _system->copyRectToScreen(screen.getPixels(), screen.pitch, 0, 0, screen.w, screen.h);
+ _system->updateScreen();
+ _system->delayMillis(10);
+ }
+ CursorMan.showMouse(cursorWasVisible);
+ return Common::kNoError;
+}
+
Common::Error RunawayEngine::run() {
const Graphics::PixelFormat format(2, 5, 6, 5, 0, 11, 5, 0, 0);
- initGraphics(RunawayScene5030::kScreenWidth, RunawayScene5030::kScreenHeight, &format);
+ initGraphics(kRunawayScreenWidth, kRunawayScreenHeight, &format);
if (_system->getScreenFormat() != format)
return Common::kUnsupportedColorMode;
setDebugger(new GUI::Debugger());
syncSoundSettings();
+ const Common::Error introResult = playIntro();
+ if (introResult.getCode() != Common::kNoError || shouldQuit())
+ return introResult;
RunawayScene5030 scene(_mixer);
if (!scene.load())
@@ -183,6 +221,13 @@ Common::Array<Common::Keymap *> RunawayEngine::initKeymaps() {
action->addDefaultInputMapping("ESCAPE");
keymap->addAction(action);
+ action = new Action(kStandardActionSkip, _("Skip intro"));
+ action->setCustomEngineActionEvent(kSkipIntro);
+ action->addDefaultInputMapping("SPACE");
+ action->addDefaultInputMapping("RETURN");
+ action->addDefaultInputMapping("JOY_X");
+ keymap->addAction(action);
+
return Keymap::arrayOf(keymap);
}
diff --git a/engines/hollywood/runaway/engine.h b/engines/hollywood/runaway/engine.h
index ad0946a7ba4..2639e973fdf 100644
--- a/engines/hollywood/runaway/engine.h
+++ b/engines/hollywood/runaway/engine.h
@@ -43,6 +43,9 @@ public:
void syncSoundSettings() override;
static Common::Array<Common::Keymap *> initKeymaps();
+
+private:
+ Common::Error playIntro();
};
} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/graphics.h b/engines/hollywood/runaway/graphics.h
index e9b9945672a..aed0936f5b2 100644
--- a/engines/hollywood/runaway/graphics.h
+++ b/engines/hollywood/runaway/graphics.h
@@ -30,6 +30,13 @@ namespace Hollywood {
class ChunkArchive;
+enum {
+ kRunawayScreenWidth = 1024,
+ kRunawayScreenHeight = 768,
+ kRunawayViewportHeight = 600,
+ kRunawayViewportTop = (kRunawayScreenHeight - kRunawayViewportHeight) / 2
+};
+
// Runaway's room animations retain Hollywood's 14-byte descriptors, but use
// RGB565 spans. Coordinates are absolute room coordinates, including shadows.
class RunawayAnimation {
diff --git a/engines/hollywood/runaway/intro.cpp b/engines/hollywood/runaway/intro.cpp
new file mode 100644
index 00000000000..c6255afb81e
--- /dev/null
+++ b/engines/hollywood/runaway/intro.cpp
@@ -0,0 +1,189 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/debug.h"
+#include "common/endian.h"
+#include "common/util.h"
+
+#include "hollywood/debug.h"
+#include "hollywood/resource.h"
+#include "hollywood/runaway/intro.h"
+
+namespace Hollywood {
+namespace {
+
+// The native 10 ms timer (0x409140) advances the first logo track every
+// fourth tick and the remaining tracks every second tick. The frame and
+// lettering tracks retain the completed tracks underneath (0x44a940).
+const uint kLogoFrameCounts[] = { 175, 48, 48 };
+const uint kLogoFrameDelays[] = { 40, 20, 20 };
+const uint kLogoTrackStarts[] = {
+ 0,
+ (kLogoFrameCounts[0] - 1) * kLogoFrameDelays[0],
+ (kLogoFrameCounts[0] - 1) * kLogoFrameDelays[0] + kLogoFrameCounts[1] * kLogoFrameDelays[1]
+};
+const uint kLogoAnimationDuration = kLogoTrackStarts[2] + (kLogoFrameCounts[2] - 1) * kLogoFrameDelays[2];
+const uint kLogoHoldDuration = 2000;
+const uint kLogoFadeDuration = 1000;
+const uint kStoryFadeDuration = 500;
+const uint kStorySkipFadeDuration = 250;
+const uint kStoryHoldDuration = 40000;
+
+} // End of anonymous namespace
+
+bool RunawayIntro::load() {
+ ChunkArchive archive;
+ if (!archive.open(Common::Path("RESOURCE.A02")))
+ return false;
+ for (uint i = 0; i < ARRAYSIZE(_logo); ++i) {
+ if (!_logo[i].load(archive, i, kLogoFrameCounts[i]))
+ return false;
+ }
+
+ // 0x444390 displays X01 chunk 0 before entering scene 5030. The card
+ // already contains the localized story text and the Runaway title.
+ Common::Array<byte> pixels;
+ if (!archive.open(Common::Path("RESOURCE.X01")) ||
+ archive.chunkSize(0) != kRunawayScreenWidth * kRunawayViewportHeight * 2 ||
+ !archive.readVariableChunk(0, pixels))
+ return false;
+ const Graphics::PixelFormat format(2, 5, 6, 5, 0, 11, 5, 0, 0);
+ _story.create(kRunawayScreenWidth, kRunawayViewportHeight, format);
+ _screen.create(kRunawayScreenWidth, kRunawayScreenHeight, format);
+ for (int y = 0; y < _story.h; ++y) {
+ uint16 *out = (uint16 *)_story.getBasePtr(0, y);
+ for (int x = 0; x < _story.w; ++x)
+ out[x] = READ_LE_UINT16(pixels.data() + (y * _story.w + x) * 2);
+ }
+ debugC(1, kDebugScene, "Runaway demo: Pendulo logo and story card loaded");
+ return true;
+}
+
+void RunawayIntro::start(uint32 now) {
+ _phase = kLogo;
+ _phaseStarted = now;
+ _audio.playIntroMusic();
+ update(now);
+}
+
+void RunawayIntro::startStory(uint32 now) {
+ _audio.stopMusic();
+ _phase = kStoryFadeIn;
+ _phaseStarted = now;
+ _brightness = 0;
+}
+
+void RunawayIntro::skip(uint32 now) {
+ if (_phase == kLogo || _phase == kLogoAudio) {
+ startStory(now);
+ } else if (_phase == kStory) {
+ _phase = kStoryFadeOut;
+ _phaseStarted = now;
+ _storyFadeDuration = kStorySkipFadeDuration;
+ }
+ // The original clears pending input after the card's fade-in. Ignoring
+ // input during its fades also keeps one press from skipping both stages.
+}
+
+void RunawayIntro::update(uint32 now) {
+ // Carry elapsed time across timed phases so delayed frames do not extend
+ // the sequence. The engine clock stops while ScummVM dialogs pause audio.
+ for (;;) {
+ const uint32 elapsed = now - _phaseStarted;
+ switch (_phase) {
+ case kLogo: {
+ for (uint i = 0; i < ARRAYSIZE(_logo); ++i) {
+ _logoFrames[i] = elapsed < kLogoTrackStarts[i] ? -1 :
+ (int)MIN<uint32>((elapsed - kLogoTrackStarts[i]) / kLogoFrameDelays[i], kLogoFrameCounts[i] - 1);
+ }
+ const uint fadeStart = kLogoAnimationDuration + kLogoHoldDuration;
+ if (elapsed >= fadeStart + kLogoFadeDuration) {
+ _phase = kLogoAudio;
+ continue;
+ }
+ _brightness = elapsed <= fadeStart ? 255 :
+ 255 * (kLogoFadeDuration - (elapsed - fadeStart)) / kLogoFadeDuration;
+ return;
+ }
+ case kLogoAudio:
+ _brightness = 0;
+ if (_audio.musicPlaying())
+ return;
+ startStory(now);
+ return;
+ case kStoryFadeIn:
+ if (elapsed >= kStoryFadeDuration) {
+ _phase = kStory;
+ _phaseStarted += kStoryFadeDuration;
+ continue;
+ }
+ _brightness = 255 * elapsed / kStoryFadeDuration;
+ return;
+ case kStory:
+ if (elapsed >= kStoryHoldDuration) {
+ _phase = kStoryFadeOut;
+ _phaseStarted += kStoryHoldDuration;
+ _storyFadeDuration = kStoryFadeDuration;
+ continue;
+ }
+ _brightness = 255;
+ return;
+ case kStoryFadeOut:
+ if (elapsed >= _storyFadeDuration) {
+ _phase = kFinished;
+ continue;
+ }
+ _brightness = 255 * (_storyFadeDuration - elapsed) / _storyFadeDuration;
+ return;
+ case kFinished:
+ _brightness = 0;
+ return;
+ }
+ }
+}
+
+void RunawayIntro::draw() {
+ _screen.fillRect(Common::Rect(_screen.w, _screen.h), 0);
+ if (!_brightness)
+ return;
+ if (_phase == kLogo) {
+ for (uint i = 0; i < ARRAYSIZE(_logo); ++i) {
+ if (_logoFrames[i] >= 0)
+ _logo[i].draw(_screen, _logoFrames[i], 0, kRunawayViewportTop);
+ }
+ } else if (_phase == kStoryFadeIn || _phase == kStory || _phase == kStoryFadeOut) {
+ _screen.blitFrom(_story, Common::Point(0, kRunawayViewportTop));
+ }
+ if (_brightness == 255)
+ return;
+ // Apply the original gamma fades to the RGB565 viewport without changing
+ // backend gamma or affecting ScummVM's own dialogs.
+ for (int y = kRunawayViewportTop; y < kRunawayViewportTop + kRunawayViewportHeight; ++y) {
+ uint16 *out = (uint16 *)_screen.getBasePtr(0, y);
+ for (int x = 0; x < _screen.w; ++x) {
+ const uint16 color = out[x];
+ out[x] = (((color >> 11) * _brightness / 255) << 11) |
+ ((((color >> 5) & 63) * _brightness / 255) << 5) | ((color & 31) * _brightness / 255);
+ }
+ }
+}
+
+} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/intro.h b/engines/hollywood/runaway/intro.h
new file mode 100644
index 00000000000..cc5d608a69c
--- /dev/null
+++ b/engines/hollywood/runaway/intro.h
@@ -0,0 +1,59 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef HOLLYWOOD_RUNAWAY_INTRO_H
+#define HOLLYWOOD_RUNAWAY_INTRO_H
+
+#include "hollywood/runaway/audio.h"
+#include "hollywood/runaway/graphics.h"
+
+namespace Hollywood {
+
+// The demo's startup sequence: animated Pendulo logo, then the story card.
+// The engine supplies its pause-aware clock and handles input/presentation.
+class RunawayIntro {
+public:
+ explicit RunawayIntro(Audio::Mixer *mixer) : _audio(mixer) {}
+ bool load();
+ void start(uint32 now);
+ void skip(uint32 now);
+ void update(uint32 now);
+ void draw();
+ bool finished() const { return _phase == kFinished; }
+ const Graphics::ManagedSurface &screen() const { return _screen; }
+
+private:
+ enum Phase { kLogo, kLogoAudio, kStoryFadeIn, kStory, kStoryFadeOut, kFinished };
+ void startStory(uint32 now);
+
+ RunawayAudio _audio;
+ RunawayAnimation _logo[3];
+ Graphics::ManagedSurface _story, _screen;
+ Phase _phase = kFinished;
+ uint32 _phaseStarted = 0;
+ uint32 _storyFadeDuration = 0;
+ int _logoFrames[3] = { -1, -1, -1 };
+ uint _brightness = 255;
+};
+
+} // End of namespace Hollywood
+
+#endif // HOLLYWOOD_RUNAWAY_INTRO_H
diff --git a/engines/hollywood/runaway/scene5030.h b/engines/hollywood/runaway/scene5030.h
index 72e6f22ac2e..f0c89382b13 100644
--- a/engines/hollywood/runaway/scene5030.h
+++ b/engines/hollywood/runaway/scene5030.h
@@ -34,7 +34,10 @@ namespace Hollywood {
// interactions and audio; RunawayEngine owns the backend and event loop.
class RunawayScene5030 {
public:
- enum { kScreenWidth = 1024, kScreenHeight = 768, kRoomWidth = 1376, kRoomHeight = 600, kRoomTop = 84 };
+ enum {
+ kScreenWidth = kRunawayScreenWidth, kScreenHeight = kRunawayScreenHeight,
+ kRoomWidth = 1376, kRoomHeight = kRunawayViewportHeight, kRoomTop = kRunawayViewportTop
+ };
explicit RunawayScene5030(Audio::Mixer *mixer) : _audio(mixer) {}
bool load();
Commit: 14db87f41a7554af880a2a47a21daa3cf30a5162
https://github.com/scummvm/scummvm/commit/14db87f41a7554af880a2a47a21daa3cf30a5162
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-10-27T11:28:15+01:00
Commit Message:
HOLLYWOOD: improve support for original UI in runaway demo including inventory and fonts
Changed paths:
A engines/hollywood/runaway/font.cpp
A engines/hollywood/runaway/font.h
A engines/hollywood/runaway/inventory.cpp
A engines/hollywood/runaway/inventory.h
A engines/hollywood/runaway/ui.cpp
A engines/hollywood/runaway/ui.h
engines/hollywood/module.mk
engines/hollywood/runaway/audio.cpp
engines/hollywood/runaway/audio.h
engines/hollywood/runaway/engine.cpp
engines/hollywood/runaway/graphics.cpp
engines/hollywood/runaway/graphics.h
engines/hollywood/runaway/scene5030.cpp
engines/hollywood/runaway/scene5030.h
diff --git a/engines/hollywood/module.mk b/engines/hollywood/module.mk
index d2f1aa48838..3540398f986 100644
--- a/engines/hollywood/module.mk
+++ b/engines/hollywood/module.mk
@@ -138,9 +138,12 @@ MODULE_OBJS = \
monsters/scenes/playable/playable_scene_actions.o \
runaway/audio.o \
runaway/engine.o \
+ runaway/font.o \
runaway/graphics.o \
runaway/intro.o \
- runaway/scene5030.o
+ runaway/inventory.o \
+ runaway/scene5030.o \
+ runaway/ui.o
# This module can be built as a plugin
ifeq ($(ENABLE_HOLLYWOOD), DYNAMIC_PLUGIN)
diff --git a/engines/hollywood/runaway/audio.cpp b/engines/hollywood/runaway/audio.cpp
index 205d2a0243d..a12a03a2fc6 100644
--- a/engines/hollywood/runaway/audio.cpp
+++ b/engines/hollywood/runaway/audio.cpp
@@ -93,11 +93,11 @@ void RunawayAudio::playMusic(uint16 cue) {
Audio::Mixer::kMusicSoundType, _music, 96, true);
}
-uint32 RunawayAudio::playSpeech(uint16 sample) {
+uint32 RunawayAudio::playSpeech(uint16 sample, bool global) {
// DATAACA3 has independent 6000-entry offset and length tables. Its global
// sample IDs include stale offsets for other chapters, so never derive a
// length by subtracting adjacent offsets as with the M/S archives.
- return play("DATAACA3.000", sample, 6000, true, Audio::FLAG_UNSIGNED,
+ return play(global ? "DATAACA0.000" : "DATAACA3.000", sample, 6000, true, Audio::FLAG_UNSIGNED,
Audio::Mixer::kSpeechSoundType, _speech, Audio::Mixer::kMaxChannelVolume, false);
}
diff --git a/engines/hollywood/runaway/audio.h b/engines/hollywood/runaway/audio.h
index 989502a9d1b..39ff88e4a90 100644
--- a/engines/hollywood/runaway/audio.h
+++ b/engines/hollywood/runaway/audio.h
@@ -32,7 +32,7 @@ public:
~RunawayAudio();
void playIntroMusic();
void playMusic(uint16 cue);
- uint32 playSpeech(uint16 sample);
+ uint32 playSpeech(uint16 sample, bool global = false);
void playEffect(uint16 cue, byte volume = Audio::Mixer::kMaxChannelVolume);
void stopMusic();
void stopSpeech();
diff --git a/engines/hollywood/runaway/engine.cpp b/engines/hollywood/runaway/engine.cpp
index 382de5ab099..e7eb23c1caf 100644
--- a/engines/hollywood/runaway/engine.cpp
+++ b/engines/hollywood/runaway/engine.cpp
@@ -35,6 +35,7 @@
#include "hollywood/runaway/engine.h"
#include "hollywood/runaway/intro.h"
#include "hollywood/runaway/scene5030.h"
+#include "hollywood/runaway/ui.h"
namespace Hollywood {
namespace {
@@ -44,8 +45,10 @@ enum RunawayAction {
kScrollRight,
kScrollStart,
kScrollEnd,
- kReturnToLauncher,
- kSkipIntro
+ kCancelAction,
+ kSkip,
+ kToggleInventory,
+ kCycleAction
};
} // End of anonymous namespace
@@ -82,7 +85,7 @@ Common::Error RunawayEngine::playIntro() {
if (event.type == Common::EVENT_LBUTTONDOWN || event.type == Common::EVENT_RBUTTONDOWN) {
skip = true;
} else if (event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_START &&
- (event.customType == kSkipIntro || event.customType == kReturnToLauncher)) {
+ (event.customType == kSkip || event.customType == kCancelAction)) {
skip = true;
}
}
@@ -113,21 +116,44 @@ Common::Error RunawayEngine::run() {
if (introResult.getCode() != Common::kNoError || shouldQuit())
return introResult;
- RunawayScene5030 scene(_mixer);
- if (!scene.load())
- return Common::Error(Common::kReadingFailed, "Cannot load the Runaway demo room, actor or animation data");
+ RunawayInventory inventory;
+ RunawayScene5030 scene(_mixer, inventory);
+ RunawayUI ui(inventory);
+ if (!scene.load() || !ui.load())
+ return Common::Error(Common::kReadingFailed, "Cannot load the Runaway demo room, actor or interface data");
scene.start(getTotalPlayTime());
- CursorMan.setDefaultArrowCursor();
CursorMan.showMouse(true);
_system->warpMouse(RunawayScene5030::kScreenWidth / 2, RunawayScene5030::kRoomTop + RunawayScene5030::kRoomHeight / 2);
bool leftPressed = false, rightPressed = false;
while (!shouldQuit()) {
+ const uint32 now = getTotalPlayTime();
+ Common::Point mouse = _eventMan->getMousePos();
+ ui.update(now, mouse, scene.hotspotAt(mouse), scene.busy(), scene.speaking());
Common::Event event;
while (_eventMan->pollEvent(event)) {
if (event.type == Common::EVENT_LBUTTONDOWN || event.type == Common::EVENT_RBUTTONDOWN) {
- scene.click(event.mouse, event.type == Common::EVENT_RBUTTONDOWN);
+ ui.update(now, event.mouse, scene.hotspotAt(event.mouse), scene.busy(), scene.speaking());
+ const RunawayUI::Command command = ui.click(event.type == Common::EVENT_RBUTTONDOWN);
+ switch (command.type) {
+ case RunawayUI::Command::kRoom:
+ scene.click(command.mouse, command.verb, command.item);
+ break;
+ case RunawayUI::Command::kExamineItem:
+ scene.sayInventory(inventory.examine(command.target));
+ break;
+ case RunawayUI::Command::kCombine:
+ scene.sayInventory(inventory.combine(command.item, command.target));
+ break;
+ case RunawayUI::Command::kSkipSpeech:
+ scene.skipSpeech();
+ break;
+ default:
+ break;
+ }
} else if (event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_START || event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_END) {
+ mouse = _eventMan->getMousePos();
+ ui.update(now, mouse, scene.hotspotAt(mouse), scene.busy(), scene.speaking());
const bool pressed = event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_START;
switch (event.customType) {
case kScrollLeft:
@@ -137,16 +163,32 @@ Common::Error RunawayEngine::run() {
rightPressed = pressed;
break;
case kScrollStart:
- if (pressed)
+ if (pressed && !ui.inventoryOpen() && !scene.busy())
scene.setCameraX(0);
break;
case kScrollEnd:
- if (pressed)
+ if (pressed && !ui.inventoryOpen() && !scene.busy())
scene.setCameraX(RunawayScene5030::kRoomWidth - RunawayScene5030::kScreenWidth);
break;
- case kReturnToLauncher:
+ case kCancelAction:
+ if (pressed) {
+ if (scene.speaking())
+ scene.skipSpeech();
+ else if (!ui.cancel() && !scene.busy())
+ scene.cancelWalk();
+ }
+ break;
+ case kToggleInventory:
+ if (pressed)
+ ui.toggleInventory();
+ break;
+ case kCycleAction:
+ if (pressed && ui.click(true).type == RunawayUI::Command::kSkipSpeech)
+ scene.skipSpeech();
+ break;
+ case kSkip:
if (pressed)
- return Common::kNoError;
+ scene.skipSpeech();
break;
}
}
@@ -154,7 +196,7 @@ Common::Error RunawayEngine::run() {
if (shouldQuit())
break;
int direction = (int)rightPressed - (int)leftPressed;
- const Common::Point mouse = _eventMan->getMousePos();
+ mouse = _eventMan->getMousePos();
if (!direction && mouse.y >= RunawayScene5030::kRoomTop && mouse.y < RunawayScene5030::kRoomTop + RunawayScene5030::kRoomHeight) {
if (mouse.x < 24)
direction = -1;
@@ -163,9 +205,13 @@ Common::Error RunawayEngine::run() {
}
// The engine clock excludes time spent in ScummVM dialogs, keeping
// animation frames and subtitle deadlines in sync with paused audio.
- scene.update(getTotalPlayTime(), direction);
- scene.draw(mouse);
- const Graphics::ManagedSurface &screen = scene.screen();
+ scene.update(now, ui.inventoryOpen() || scene.busy() ? 0 : direction, ui.inventoryOpen());
+ ui.update(now, mouse, scene.hotspotAt(mouse), scene.busy(), scene.speaking());
+ scene.draw();
+ Graphics::ManagedSurface &screen = scene.screen();
+ const bool subtitles = !ConfMan.hasKey("subtitles") || ConfMan.getBool("subtitles") || ConfMan.getBool("speech_mute");
+ ui.draw(screen, scene.actionCaption(scene.hotspotAt(mouse), ui.verb(), inventory.selected()),
+ scene.committedCaption(), scene.subtitle(), subtitles);
_system->copyRectToScreen(screen.getPixels(), screen.pitch, 0, 0, screen.w, screen.h);
_system->updateScreen();
_system->delayMillis(16);
@@ -178,13 +224,13 @@ Common::Array<Common::Keymap *> RunawayEngine::initKeymaps() {
Keymap *keymap = new Keymap(Keymap::kKeymapTypeGame, "runaway", "Runaway: A Road Adventure");
keymap->setPartialMatchAllowed(false);
- Action *action = new Action(kStandardActionLeftClick, _("Walk / Use"));
+ Action *action = new Action(kStandardActionLeftClick, _("Perform action"));
action->setLeftClickEvent();
action->addDefaultInputMapping("MOUSE_LEFT");
action->addDefaultInputMapping("JOY_A");
keymap->addAction(action);
- action = new Action(kStandardActionRightClick, _("Examine"));
+ action = new Action(kStandardActionRightClick, _("Next action / Cancel"));
action->setRightClickEvent();
action->addDefaultInputMapping("MOUSE_RIGHT");
action->addDefaultInputMapping("JOY_B");
@@ -216,13 +262,24 @@ Common::Array<Common::Keymap *> RunawayEngine::initKeymaps() {
action->addDefaultInputMapping("JOY_START");
keymap->addAction(action);
- action = new Action("RETURN_TO_LAUNCHER", _("Return to launcher"));
- action->setCustomEngineActionEvent(kReturnToLauncher);
+ action = new Action("CANCEL_ACTION", _("Cancel action"));
+ action->setCustomEngineActionEvent(kCancelAction);
action->addDefaultInputMapping("ESCAPE");
keymap->addAction(action);
- action = new Action(kStandardActionSkip, _("Skip intro"));
- action->setCustomEngineActionEvent(kSkipIntro);
+ action = new Action("INVENTORY", _("Inventory"));
+ action->setCustomEngineActionEvent(kToggleInventory);
+ action->addDefaultInputMapping("i");
+ action->addDefaultInputMapping("JOY_Y");
+ keymap->addAction(action);
+
+ action = new Action("CYCLE_ACTION", _("Next action / Cancel"));
+ action->setCustomEngineActionEvent(kCycleAction);
+ action->addDefaultInputMapping("TAB");
+ keymap->addAction(action);
+
+ action = new Action(kStandardActionSkip, _("Skip intro / Skip line"));
+ action->setCustomEngineActionEvent(kSkip);
action->addDefaultInputMapping("SPACE");
action->addDefaultInputMapping("RETURN");
action->addDefaultInputMapping("JOY_X");
diff --git a/engines/hollywood/runaway/font.cpp b/engines/hollywood/runaway/font.cpp
new file mode 100644
index 00000000000..f25b48e4543
--- /dev/null
+++ b/engines/hollywood/runaway/font.cpp
@@ -0,0 +1,161 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/endian.h"
+#include "common/str-enc.h"
+#include "common/util.h"
+#include "graphics/surface.h"
+#include "hollywood/runaway/font.h"
+#include "hollywood/runaway/graphics.h"
+
+namespace Hollywood {
+namespace {
+
+// The demo's character table at 0x4641f0 uses DOS 850, with additional
+// punctuation in otherwise unused positions. 254 denotes a space.
+const byte kGlyphMap[256] = {
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 254, 83, 149, 89, 112, 90, 113, 149, 68, 69, 149, 71, 77, 70, 79, 75,
+ 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 80, 78, 73, 72, 74, 85,
+ 118, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 87, 76, 88, 149, 107,
+ 149, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 149, 149, 149, 91, 149,
+ 94, 108, 54, 149, 139, 96, 149, 95, 149, 140, 97, 141, 149, 98, 144, 149,
+ 102, 149, 149, 149, 142, 99, 149, 100, 143, 147, 109, 149, 149, 149, 149, 149,
+ 53, 55, 56, 57, 40, 86, 149, 149, 84, 114, 149, 149, 149, 82, 110, 111,
+ 149, 149, 149, 149, 149, 101, 149, 149, 106, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 115,
+ 116, 149, 149, 145, 149, 149, 103, 149, 146, 149, 149, 149, 149, 149, 149, 149,
+ 104, 93, 149, 149, 149, 149, 149, 149, 149, 105, 149, 149, 149, 149, 149, 149,
+ 92, 81, 149, 149, 149, 149, 149, 149, 149, 149, 117, 149, 149, 149, 149, 149,
+};
+
+} // End of anonymous namespace
+
+bool RunawayFont::load() {
+ Common::Array<byte> metrics;
+ if (!readRunawayGlobalChunk(125, _pixels) || !readRunawayGlobalChunk(126, metrics) || metrics.size() != 750)
+ return false;
+ for (uint i = 0; i < 150; ++i) {
+ const byte *data = metrics.data() + i * 5;
+ Glyph &glyph = _glyphs[i];
+ glyph.offset = READ_LE_UINT16(data);
+ glyph.top = data[2];
+ glyph.height = data[3];
+ glyph.width = data[4];
+ if (glyph.width > 28 || glyph.top + glyph.height > 28 ||
+ glyph.offset + glyph.width * glyph.height > _pixels.size())
+ return false;
+ }
+ char bytes[128];
+ for (uint i = 0; i < 128; ++i)
+ bytes[i] = i + 128;
+ _characters = Common::U32String(bytes, 128, Common::kDos850);
+ // Native 0x40ee40 packs adjacent contours, trying up to five pixels
+ // of overlap. Value 17 contributes only to the left glyph's spacing.
+ for (uint left = 0; left < 150; ++left) {
+ const Glyph &a = _glyphs[left];
+ for (uint right = 0; right < 150; ++right) {
+ const Glyph &b = _glyphs[right];
+ int shift = 1;
+ for (; shift < 5; ++shift) {
+ bool collision = false;
+ for (uint y = 0; y < b.height && !collision; ++y) {
+ const int ay = b.top + y - a.top;
+ if (ay < 0 || ay >= a.height)
+ continue;
+ for (uint x = 0; x < b.width; ++x) {
+ const int ax = a.width - shift + x;
+ if (ax >= 0 && ax < a.width && _pixels[b.offset + y * b.width + x] < 17 &&
+ _pixels[a.offset + ay * a.width + ax] < 18) {
+ collision = true;
+ break;
+ }
+ }
+ }
+ if (collision)
+ break;
+ if (shift >= b.width) {
+ shift = 1;
+ break;
+ }
+ }
+ _kerning[left][right] = -shift;
+ }
+ }
+ return true;
+}
+
+uint RunawayFont::glyphIndex(uint32 chr) const {
+ // These signs use game-specific positions rather than their DOS codes.
+ switch (chr) {
+ case 0x201c: return 92;
+ case 0x201d: return 81;
+ case 0x201e: return 92;
+ case '\'': return 90;
+ case '"': return 81;
+ }
+ if (chr < 128)
+ return kGlyphMap[chr];
+ for (uint i = 0; i < _characters.size(); ++i) {
+ if (_characters[i] == chr)
+ return kGlyphMap[i + 128];
+ }
+ return 149;
+}
+
+int RunawayFont::getCharWidth(uint32 chr) const {
+ const uint glyph = glyphIndex(chr);
+ return glyph == 254 ? 8 : _glyphs[glyph].width;
+}
+
+int RunawayFont::getKerningOffset(uint32 left, uint32 right) const {
+ const uint a = glyphIndex(left), b = glyphIndex(right);
+ return !left || !right || a == 254 || b == 254 ? 0 : _kerning[a][b];
+}
+
+void RunawayFont::drawChar(Graphics::Surface *dst, uint32 chr, int x, int y, uint32 color) const {
+ const uint index = glyphIndex(chr);
+ if (index == 254 || dst->format.bytesPerPixel != 2)
+ return;
+ const Glyph &glyph = _glyphs[index];
+ const uint r = (color >> 11) & 31, g = (color >> 5) & 63, b = color & 31;
+ for (uint row = 0; row < glyph.height; ++row) {
+ const int dy = y + glyph.top + row;
+ if (dy < 0 || dy >= dst->h)
+ continue;
+ for (uint column = 0; column < glyph.width; ++column) {
+ const int dx = x + column;
+ const byte level = _pixels[glyph.offset + row * glyph.width + column];
+ if (dx < 0 || dx >= dst->w || level >= 17)
+ continue;
+ const uint16 pixel = (((r * level + 8) / 16) << 11) |
+ (((g * level + 8) / 16) << 5) | ((b * level + 8) / 16);
+ uint16 *out = (uint16 *)dst->getBasePtr(dx, dy);
+ // The native text buffer keeps the brighter of overlapping glyphs.
+ *out = MAX<uint16>(*out, pixel);
+ }
+ }
+}
+
+} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/font.h b/engines/hollywood/runaway/font.h
new file mode 100644
index 00000000000..4fab084eb58
--- /dev/null
+++ b/engines/hollywood/runaway/font.h
@@ -0,0 +1,55 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef HOLLYWOOD_RUNAWAY_FONT_H
+#define HOLLYWOOD_RUNAWAY_FONT_H
+
+#include "common/array.h"
+#include "common/ustr.h"
+#include "graphics/font.h"
+
+namespace Hollywood {
+
+// RESOURCE.000 stores 150 antialiased glyphs, including their contour masks.
+class RunawayFont : public Graphics::Font {
+public:
+ bool load();
+ int getFontHeight() const override { return 28; }
+ int getMaxCharWidth() const override { return 28; }
+ int getCharWidth(uint32 chr) const override;
+ int getKerningOffset(uint32 left, uint32 right) const override;
+ void drawChar(Graphics::Surface *dst, uint32 chr, int x, int y, uint32 color) const override;
+
+private:
+ struct Glyph {
+ uint16 offset;
+ byte top, height, width;
+ };
+ uint glyphIndex(uint32 chr) const;
+ Glyph _glyphs[150];
+ int8 _kerning[150][150];
+ Common::Array<byte> _pixels;
+ Common::U32String _characters;
+};
+
+} // End of namespace Hollywood
+
+#endif
diff --git a/engines/hollywood/runaway/graphics.cpp b/engines/hollywood/runaway/graphics.cpp
index 6f646cd9e80..3776d0e2526 100644
--- a/engines/hollywood/runaway/graphics.cpp
+++ b/engines/hollywood/runaway/graphics.cpp
@@ -30,7 +30,17 @@ namespace Hollywood {
bool RunawayAnimation::load(ChunkArchive &archive, uint chunk, uint frames) {
_frames = 0;
- if (!frames || frames > 1000 || !archive.readVariableChunk(chunk, _data) || _data.size() < frames * 14)
+ return archive.readVariableChunk(chunk, _data) && validate(frames);
+}
+
+bool RunawayAnimation::load(const Common::Array<byte> &data, uint frames) {
+ _data = data;
+ return validate(frames);
+}
+
+bool RunawayAnimation::validate(uint frames) {
+ _frames = 0;
+ if (!frames || frames > 1000 || _data.size() < frames * 14)
return false;
uint cursor = frames * 14;
for (uint frame = 0; frame < frames; ++frame) {
@@ -78,28 +88,33 @@ void RunawayAnimation::draw(Graphics::ManagedSurface &surface, uint frame, int c
}
}
-static bool readActorChunk(Common::File &file, uint chunk, Common::Array<byte> &data) {
- if (!file.seek(10 + chunk * 4))
+static bool readGlobalChunk(Common::File &file, uint chunk, Common::Array<byte> &data) {
+ if (chunk >= 500 || file.size() < 4010 || !file.seek(10 + chunk * 4))
return false;
const uint32 offset = file.readUint32LE();
if (!file.seek(10 + 500 * 4 + chunk * 4))
return false;
const uint32 size = file.readUint32LE();
- if (!size || size > 2 * 1024 * 1024 || offset > file.size() || size > file.size() - offset ||
+ if (!size || size > 16 * 1024 * 1024 || offset < 4010 || offset > file.size() || size > file.size() - offset ||
!file.seek(offset))
return false;
data.resize(size);
return file.read(data.data(), size) == size;
}
+bool readRunawayGlobalChunk(uint chunk, Common::Array<byte> &data) {
+ Common::File file;
+ return file.open("RESOURCE.000") && readGlobalChunk(file, chunk, data);
+}
+
bool RunawayActor::load() {
Common::File file;
Common::Array<byte> palette;
// Native chapter-five actor loader at 0x40b590 selects entry 44. Entry 45
// is the palette, and 46..53 are the eight banks of 19 walking cels.
- if (!file.open("RESOURCE.000") || !readActorChunk(file, 44, _descriptors) ||
+ if (!file.open("RESOURCE.000") || !readGlobalChunk(file, 44, _descriptors) ||
_descriptors.size() != kFacings * kFrames * 32 ||
- !readActorChunk(file, 45, palette) || palette.size() != 512)
+ !readGlobalChunk(file, 45, palette) || palette.size() != 512)
return false;
for (uint i = 0; i < 256; ++i)
_palette[i] = READ_LE_UINT16(palette.data() + i * 2);
@@ -107,7 +122,7 @@ bool RunawayActor::load() {
_opacity.resize(kWidth * kHeight);
_shadow.resize(kWidth * kHeight);
for (uint facing = 0; facing < kFacings; ++facing) {
- if (!readActorChunk(file, 46 + facing, _banks[facing]))
+ if (!readGlobalChunk(file, 46 + facing, _banks[facing]))
return false;
for (uint frame = 0; frame < kFrames; ++frame) {
if (!setFrame(facing, frame))
diff --git a/engines/hollywood/runaway/graphics.h b/engines/hollywood/runaway/graphics.h
index aed0936f5b2..96da87e853c 100644
--- a/engines/hollywood/runaway/graphics.h
+++ b/engines/hollywood/runaway/graphics.h
@@ -30,6 +30,9 @@ namespace Hollywood {
class ChunkArchive;
+// RESOURCE.000 has a ten-byte header followed by two 500-entry tables.
+bool readRunawayGlobalChunk(uint chunk, Common::Array<byte> &data);
+
enum {
kRunawayScreenWidth = 1024,
kRunawayScreenHeight = 768,
@@ -42,10 +45,12 @@ enum {
class RunawayAnimation {
public:
bool load(ChunkArchive &archive, uint chunk, uint frames);
+ bool load(const Common::Array<byte> &data, uint frames);
void draw(Graphics::ManagedSurface &surface, uint frame, int cameraX, int roomTop) const;
uint frameCount() const { return _frames; }
private:
+ bool validate(uint frames);
Common::Array<byte> _data;
uint _frames = 0;
};
diff --git a/engines/hollywood/runaway/inventory.cpp b/engines/hollywood/runaway/inventory.cpp
new file mode 100644
index 00000000000..5c8ad0b0945
--- /dev/null
+++ b/engines/hollywood/runaway/inventory.cpp
@@ -0,0 +1,142 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/util.h"
+#include "hollywood/runaway/inventory.h"
+
+namespace Hollywood {
+namespace {
+
+// German demo labels from 0x44bea0. Pictures and cursor cels stay in RESOURCE.000.
+const char *const kItemNames[] = {
+ "",
+ "LEDERLAPPEN",
+ "BRECHSTANGE",
+ "SPR\303\234HREINIGER",
+ "PACKUNG BUTTER",
+ "SPRENGAUSR\303\234STUNG",
+ "HELM AUS DEM ZWEITEN WELTKRIEG",
+ "SCHRAUBE",
+ "GARDEROBENKNAUF",
+ "TABLETTE",
+ "LIPPENSTIFT",
+ "HAUFEN LIPPENSTIFTE",
+ "SONNEN\303\226L",
+ "WALKIE-TALKIE",
+ "MUNITIONSSTREIFEN",
+ "BASKETBALL",
+ "SATTLERNADEL UND FADEN",
+ "BEHELFS-BOHRER",
+ "SACK GESCH\303\204LTER ERDN\303\234SSE",
+ "GLAS ERDNUSSBUTTER",
+ "SONNENBRILLE",
+ "FUSSRASTE",
+ "HANDSTAUBSAUGER",
+ "PLAN",
+ "BLASEBALG",
+ "EIMER",
+ "SCHL\303\234SSEL",
+};
+const byte kItemCursors[] = {
+ 0, 41, 43, 45, 47, 49, 51, 55, 57, 59, 61, 63, 65, 67, 69,
+ 75, 79, 81, 83, 85, 87, 91, 93, 95, 103, 105, 111
+};
+const uint16 kExamineCues[] = {
+ 0, 150, 152, 153, 157, 158, 151, 159, 154, 160, 161, 162, 163,
+ 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 155, 175, 176
+};
+
+} // End of anonymous namespace
+
+bool RunawayInventory::contains(byte item) const {
+ for (uint i = 0; i < size(); ++i) {
+ if (_items[i] == item)
+ return true;
+ }
+ return false;
+}
+
+bool RunawayInventory::add(byte item) {
+ if (!item || item > kItemCount || contains(item))
+ return false;
+ _items.push_back(item);
+ _newItem = item;
+ return true;
+}
+
+void RunawayInventory::remove(byte item) {
+ for (uint i = 0; i < size(); ++i) {
+ if (_items[i] == item) {
+ _items.remove_at(i);
+ break;
+ }
+ }
+ if (_selected == item)
+ _selected = 0;
+ if (_newItem == item)
+ _newItem = 0;
+}
+
+Common::U32String RunawayInventory::name(byte item) const {
+ if (item == 1 && _clothState)
+ return Common::U32String(_clothState == 1 ? "PUTZLAPPEN" : "SCHMUTZLAPPEN");
+ return Common::U32String(item <= kItemCount ? kItemNames[item] : "");
+}
+
+uint RunawayInventory::icon(byte item) const {
+ if (item == 1 && _clothState)
+ return _clothState == 1 ? 34 : 35;
+ return item == 15 ? 29 : item;
+}
+
+uint RunawayInventory::cursor(byte item) const {
+ if (item == 1 && _clothState)
+ return _clothState == 1 ? 107 : 109;
+ return item <= kItemCount ? kItemCursors[item] : 0;
+}
+
+RunawayInventory::Reply RunawayInventory::examine(byte item) const {
+ return Reply(item && item <= kItemCount ? kExamineCues[item] : 1, item == 1 ? _clothState : 0);
+}
+
+RunawayInventory::Reply RunawayInventory::combine(byte first, byte second) {
+ if (!contains(first) || !contains(second) || first == second)
+ return Reply();
+ if (first > second)
+ SWAP(first, second);
+ // The combinations available among the shack's items, from 0x4158c0
+ // and 0x415bd0. A failed combination leaves both items in place.
+ if (first == 1 && second == 3) {
+ const byte previous = _clothState;
+ if (!previous)
+ _clothState = 1;
+ return Reply(156, previous);
+ }
+ if (first == 7 && second == 8) {
+ remove(7);
+ remove(8);
+ add(17);
+ return Reply(183, 1);
+ }
+ return Reply();
+}
+
+} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/inventory.h b/engines/hollywood/runaway/inventory.h
new file mode 100644
index 00000000000..1240bc2a430
--- /dev/null
+++ b/engines/hollywood/runaway/inventory.h
@@ -0,0 +1,63 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef HOLLYWOOD_RUNAWAY_INVENTORY_H
+#define HOLLYWOOD_RUNAWAY_INVENTORY_H
+
+#include "common/array.h"
+#include "common/ustr.h"
+
+namespace Hollywood {
+
+enum RunawayVerb { kVerbWalk, kVerbLook, kVerbUse };
+
+class RunawayInventory {
+public:
+ enum { kItemCount = 26 };
+ struct Reply {
+ uint16 cue;
+ byte variation;
+ Reply(uint16 c = 1, byte v = 0) : cue(c), variation(v) {}
+ };
+ bool contains(byte item) const;
+ bool add(byte item);
+ void remove(byte item);
+ uint size() const { return _items.size(); }
+ byte itemAt(uint slot) const { return slot < size() ? _items[slot] : 0; }
+ byte selected() const { return _selected; }
+ void select(byte item) { _selected = contains(item) ? item : 0; }
+ byte takeNewItem() { const byte item = _newItem; _newItem = 0; return item; }
+ Common::U32String name(byte item) const;
+ uint icon(byte item) const;
+ uint cursor(byte item) const;
+ Reply examine(byte item) const;
+ Reply combine(byte first, byte second);
+ byte clothState() const { return _clothState; }
+ void soilCloth() { _clothState = 2; }
+
+private:
+ Common::Array<byte> _items;
+ byte _selected = 0, _newItem = 0, _clothState = 0;
+};
+
+} // End of namespace Hollywood
+
+#endif
diff --git a/engines/hollywood/runaway/scene5030.cpp b/engines/hollywood/runaway/scene5030.cpp
index c001412447b..073b89d4141 100644
--- a/engines/hollywood/runaway/scene5030.cpp
+++ b/engines/hollywood/runaway/scene5030.cpp
@@ -19,13 +19,10 @@
*
*/
-#include "common/config-manager.h"
#include "common/debug.h"
#include "common/endian.h"
#include "common/str-enc.h"
#include "common/util.h"
-#include "graphics/font.h"
-#include "graphics/fontman.h"
#include "hollywood/debug.h"
#include "hollywood/runaway/scene5030.h"
@@ -48,20 +45,20 @@ const SceneHotspot kHotspots[] = {
{"Spalt", 101, 507, 519, 7},
{"Fenster", 406, 383, 520, 0},
{"Fenster", 1062, 473, 523, 1},
- {"Knauf", 942, 407, 528, 0},
+ {"Holzst\xc3\xbc" "ck", 942, 407, 528, 0},
{"Fallt\xc3\xbcr", 1215, 542, 530, 7},
- {"Hemd", 406, 383, 572, 7},
- {"K\xc3\xbchlbox", 1062, 473, 535, 7},
- {"Lederst\xc3\xbc" "ck", 1019, 405, 552, 0},
+ {"Stofffetzen", 406, 383, 572, 7},
+ {"K\xc3\xbchltruhe", 1062, 473, 535, 7},
+ {"Fetzen", 1019, 405, 552, 0},
{"Stecker", 1215, 542, 554, 7},
{"Abfluss", 1215, 542, 557, 7},
{"Telefon", 495, 381, 565, 7},
{"Regal", 873, 409, 567, 1},
- {"Eisenstange", 974, 406, 570, 7},
- {"Brille", 262, 426, 614, 0},
+ {"Brechstange", 974, 406, 570, 7},
+ {"Brillenreste", 262, 426, 614, 0},
{"Blasebalg", 262, 426, 576, 7},
- {"Reinigungsmittel", 609, 379, 577, 1},
- {"Deckel", 1062, 473, 580, 1},
+ {"Dose", 609, 379, 577, 1},
+ {"K\xc3\xbchltruhendeckel", 1062, 473, 580, 1},
{"Abfluss", 1215, 542, 557, 7}
};
@@ -74,7 +71,7 @@ bool RunawayScene5030::load() {
_archive.chunkSize(0) != kRoomWidth * kRoomHeight * 2 ||
!_archive.readVariableChunk(0, pixels) || !_archive.readVariableChunk(1, packedMask) ||
!_archive.readVariableChunk(2, _maps) || _maps.size() != 1536 ||
- !_text.loadStage("RESOURCE.003", "Runaway shack", 503))
+ !_text.load("RESOURCE.003", "Runaway shack", 503, 0, 0x1135))
return false;
_background.create(kRoomWidth, kRoomHeight, format);
_screen.create(kScreenWidth, kScreenHeight, format);
@@ -101,6 +98,11 @@ bool RunawayScene5030::load() {
!_lid.load(_archive, 44, 5) || !_unplug.load(_archive, 40, 59) ||
!loadPatch(5, _unplugPatch) || !loadPatch(7, _openLidPatch) || !loadPatch(9, _closedLidPatch))
return false;
+ const uint pickupChunks[] = {20, 18, 15, 19, 17};
+ for (uint i = 0; i < ARRAYSIZE(pickupChunks); ++i) {
+ if (!loadPatch(pickupChunks[i], _pickupPatches[i]))
+ return false;
+ }
const uint rows = _text._stageLargeRows.size() / 321;
_voiceSamples.resize(rows, 0);
_cueEnds.resize(rows, 0);
@@ -166,11 +168,13 @@ byte RunawayScene5030::hotspotAt(Common::Point mouse) const {
byte id = _maps[256 + _mask[(mouse.y - kRoomTop) * kRoomWidth + mouse.x + _cameraX]];
// The initial cooler hides the hatch and its later position. These remaps
// correspond to the native room-state updater at 0x438ce0.
+ if (id == 2)
+ id = 1;
if (id == 6 || id == 20)
id = 8;
if (id == 21 || (id == 10 && _unplugged))
id = 0;
- return id < ARRAYSIZE(kHotspots) ? id : 0;
+ return id < ARRAYSIZE(kHotspots) && !_pickedUp[id] ? id : 0;
}
bool RunawayScene5030::walkable(int x, int y) const {
@@ -244,6 +248,7 @@ void RunawayScene5030::say(uint16 row) {
stopSpeech();
if (row < 500 || row - 500 >= _voiceSamples.size())
return;
+ _globalSpeech = false;
_speechRow = row;
_speechEnd = MAX<uint16>(row, _cueEnds[row - 500]);
showSpeechRow();
@@ -251,8 +256,8 @@ void RunawayScene5030::say(uint16 row) {
void RunawayScene5030::showSpeechRow() {
_subtitle = Common::U32String(_text.largeTextRecord(_speechRow), Common::kDos850);
- const uint16 sample = _voiceSamples[_speechRow - 500];
- const uint32 duration = sample ? _audio.playSpeech(sample) : 0;
+ const uint16 sample = _globalSpeech ? _speechSample : _voiceSamples[_speechRow - 500];
+ const uint32 duration = sample ? _audio.playSpeech(sample, _globalSpeech) : 0;
_subtitleUntil = _now + (duration ? MAX<uint>(1000, duration + 150) : MAX<uint>(3000, _subtitle.size() * 55));
debugC(1, kDebugScene, "Runaway demo: dialogue row %u, voice %u, ends at row %u",
_speechRow, sample, _speechEnd);
@@ -264,35 +269,147 @@ void RunawayScene5030::stopSpeech() {
_subtitle.clear();
}
-void RunawayScene5030::click(Common::Point mouse, bool examine) {
- if (_action != kNone || mouse.y < kRoomTop || mouse.y >= kRoomTop + kRoomHeight)
+Common::U32String RunawayScene5030::actionCaption(byte id, RunawayVerb verb, byte item) const {
+ Common::U32String name(id < ARRAYSIZE(kHotspots) ? kHotspots[id].name : "");
+ if (id < ARRAYSIZE(kHotspots) && _examined[id]) {
+ if (id == 5 || id == 9 || id == 17)
+ name = _inventory.name(id == 5 ? 8 : id == 9 ? 1 : 3);
+ else if (id == 7)
+ name = Common::U32String("Hemd");
+ }
+ name.toUppercase();
+ if (item) {
+ Common::U32String caption = Common::U32String("BENUTZE ") + _inventory.name(item);
+ if (id)
+ caption += Common::U32String(" MIT ") + name;
+ return caption;
+ }
+ if (!id)
+ return Common::U32String();
+ if (verb == kVerbLook)
+ return Common::U32String(id == 3 || id == 4 ? "SIEH AUS DEM " : "BETRACHTE ") + name;
+ const char *action = "BENUTZE ";
+ if (id == 5 || id == 9 || id == 14 || id == 16 || id == 17)
+ action = "NIMM ";
+ else if (id == 18)
+ action = _lidOpen ? "SCHLIESSE " : "\xc3\x96" "FFNE ";
+ else if (id == 8)
+ action = _lidOpen ? "VERSCHIEBE " : "\xc3\x96" "FFNE ";
+ else if (id == 10)
+ return Common::U32String("ZIEHE DEN STECKER DER K\xc3\x9cHLTRUHE HERAUS");
+ else if (id == 12)
+ action = "BENUTZE DAS ";
+ else if (id == 13)
+ action = "NIMM ETWAS AUS DEM ";
+ else if (id == 1 || id == 3 || id == 4 || id == 6)
+ action = "\xc3\x96" "FFNE ";
+ return Common::U32String(action) + name;
+}
+
+void RunawayScene5030::sayInventory(const RunawayInventory::Reply &reply) {
+ stopSpeech();
+ uint16 row, sample;
+ byte count;
+ if (!_text.getStaticSpeechCue(reply.cue, reply.variation, row, count, sample))
return;
- const byte id = hotspotAt(mouse);
- debugC(1, kDebugScene, "Runaway demo: %s click at %d,%d, hotspot %u",
- examine ? "examine" : "use", mouse.x + _cameraX, mouse.y - kRoomTop, id);
- if (examine) {
- if (id == 18)
- say(_lidOpen ? 581 : 580);
- else if (id == 8)
- say(!_lidOpen ? 535 : _unplugged ? 537 : 536);
- else if (id)
- say(kHotspots[id].description);
+ if (!row || row + MAX<uint>(1, count) > _text._inventoryOwnerLargeRows.size() / 321 ||
+ sample + MAX<uint>(1, count) > 6000)
+ return;
+ _globalSpeech = true;
+ _speechRow = row;
+ _speechEnd = row + MAX<uint>(1, count) - 1;
+ _speechSample = sample;
+ showSpeechRow();
+}
+
+void RunawayScene5030::sayCue(uint16 cue, byte variation) {
+ const SceneSpeechCue speech = _text.stageCue(cue, variation);
+ if (speech.valid())
+ say(speech.textRecordId);
+}
+
+void RunawayScene5030::skipSpeech() {
+ if (!_speechRow)
return;
+ _audio.stopSpeech();
+ if (_speechRow < _speechEnd) {
+ ++_speechRow;
+ if (_globalSpeech)
+ ++_speechSample;
+ showSpeechRow();
+ } else {
+ stopSpeech();
}
- stopSpeech();
+}
+
+void RunawayScene5030::cancelWalk() {
+ _path.clear();
+ _pathIndex = 0;
+ _pendingHotspot = _pendingItem = 0;
+ _committedCaption.clear();
+}
+
+void RunawayScene5030::click(Common::Point mouse, RunawayVerb verb, byte item) {
+ if (_action != kNone || speaking() || mouse.y < kRoomTop || mouse.y >= kRoomTop + kRoomHeight)
+ return;
+ const byte id = hotspotAt(mouse);
+ debugC(1, kDebugScene, "Runaway demo: verb %u item %u at %d,%d, hotspot %u",
+ (uint)verb, item, mouse.x + _cameraX, mouse.y - kRoomTop, id);
_pendingHotspot = id;
+ _pendingItem = item;
+ _pendingVerb = verb;
+ _committedCaption = actionCaption(id, verb, item);
const Common::Point target = id ? Common::Point(kHotspots[id].x, kHotspots[id].y) :
Common::Point(mouse.x + _cameraX, mouse.y - kRoomTop);
walkTo(target);
}
+void RunawayScene5030::pickUp(byte hotspot, byte item, uint patch) {
+ if (!_inventory.add(item))
+ return;
+ _pickedUp[hotspot] = true;
+ drawPatch(_pickupPatches[patch]);
+ sayInventory(RunawayInventory::Reply(18, 0));
+}
+
+void RunawayScene5030::useItem(byte item, byte hotspot) {
+ _inventory.select(0);
+ // Dispatch the room's item actions separately from its ordinary verbs.
+ // Original rejected actions use the shared, voiced inventory responses.
+ if (item == 1 && hotspot == 3)
+ sayCue(33, 0);
+ else
+ sayInventory(RunawayInventory::Reply(1, 0));
+}
+
void RunawayScene5030::arrive() {
- const byte id = _pendingHotspot;
- _pendingHotspot = 0;
+ const byte id = _pendingHotspot, item = _pendingItem;
+ _pendingHotspot = _pendingItem = 0;
+ _committedCaption.clear();
if (!id)
return;
_facing = kHotspots[id].facing;
- if (id == 18 || (id == 8 && !_lidOpen)) {
+ if (item) {
+ useItem(item, id);
+ } else if (_pendingVerb == kVerbLook) {
+ _examined[id] = true;
+ if (id == 18)
+ say(_lidOpen ? 581 : 580);
+ else if (id == 8)
+ say(!_lidOpen ? 535 : _unplugged ? 537 : 536);
+ else
+ say(kHotspots[id].description);
+ } else if (id == 5) {
+ pickUp(id, 8, 0);
+ } else if (id == 9) {
+ pickUp(id, 1, 1);
+ } else if (id == 14) {
+ pickUp(id, 2, 2);
+ } else if (id == 16) {
+ pickUp(id, 24, 3);
+ } else if (id == 17) {
+ pickUp(id, 3, 4);
+ } else if (id == 18 || (id == 8 && !_lidOpen)) {
startAction(_lidOpen ? kCloseLid : kOpenLid);
} else if (id == 10 && !_unplugged) {
startAction(kUnplug);
@@ -331,10 +448,18 @@ void RunawayScene5030::finishAction() {
(uint)completed, (uint)_lidOpen, (uint)_unplugged);
}
-void RunawayScene5030::update(uint32 now, int scrollDirection) {
+void RunawayScene5030::update(uint32 now, int scrollDirection, bool inventoryOpen) {
_now = now;
const uint elapsed = MIN<uint>(100, now - _lastUpdate);
+ const uint32 pausedTime = now - _lastUpdate;
_lastUpdate = now;
+ if (speaking() && !_audio.speechPlaying() && (int32)(now - _subtitleUntil) >= 0)
+ skipSpeech();
+ if (inventoryOpen) {
+ _actionStarted += pausedTime;
+ _walkStarted += pausedTime;
+ return;
+ }
if (_action != kNone) {
const uint previousStep = _step;
_step = (now - _actionStarted) / 80;
@@ -389,17 +514,9 @@ void RunawayScene5030::update(uint32 now, int scrollDirection) {
else if (walking || (_action != kNone && _action != kIntro))
_cameraX += CLIP<int>(_position.x - kScreenWidth / 2 - _cameraX, -8, 8);
setCameraX(_cameraX);
- if (_speechRow && !_audio.speechPlaying() && (int32)(now - _subtitleUntil) >= 0) {
- if (_speechRow < _speechEnd) {
- ++_speechRow;
- showSpeechRow();
- } else {
- stopSpeech();
- }
- }
}
-void RunawayScene5030::draw(Common::Point mouse) {
+void RunawayScene5030::draw() {
_screen.clear();
_screen.copyRectToSurface(_background, 0, kRoomTop,
Common::Rect(_cameraX, 0, _cameraX + kScreenWidth, kRoomHeight));
@@ -420,24 +537,6 @@ void RunawayScene5030::draw(Common::Point mouse) {
} else {
_actor.draw(_screen, _position, _cameraX, kRoomTop, _mask, _maps);
}
- const Graphics::Font *font = FontMan.getFontByUsage(Graphics::FontManager::kBigGUIFont);
- const uint32 white = _screen.format.RGBToColor(255, 255, 255);
- if (!_subtitle.empty() && (!ConfMan.hasKey("subtitles") || ConfMan.getBool("subtitles") || ConfMan.getBool("speech_mute"))) {
- Common::Array<Common::U32String> lines;
- font->wordWrapText(_subtitle, kScreenWidth - 100, lines);
- int y = kRoomTop + kRoomHeight + 12;
- for (uint i = 0; i < lines.size(); ++i, y += font->getFontHeight() + 2)
- font->drawString(_screen.surfacePtr(), lines[i], 50, y, kScreenWidth - 100, white, Graphics::kTextAlignCenter);
- }
- const byte id = _action == kNone ? hotspotAt(mouse) : 0;
- if (id) {
- const Common::U32String name(kHotspots[id].name);
- const int width = font->getStringWidth(name) + 8;
- const int x = CLIP<int>(mouse.x - width / 2, 0, kScreenWidth - width);
- const int y = MAX<int>(kRoomTop, mouse.y - font->getFontHeight() - 14);
- font->drawString(_screen.surfacePtr(), name, x + 1, y + 1, width, 0, Graphics::kTextAlignCenter);
- font->drawString(_screen.surfacePtr(), name, x, y, width, white, Graphics::kTextAlignCenter);
- }
}
} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/scene5030.h b/engines/hollywood/runaway/scene5030.h
index f0c89382b13..6f22da18115 100644
--- a/engines/hollywood/runaway/scene5030.h
+++ b/engines/hollywood/runaway/scene5030.h
@@ -26,6 +26,7 @@
#include "hollywood/resource.h"
#include "hollywood/runaway/audio.h"
#include "hollywood/runaway/graphics.h"
+#include "hollywood/runaway/inventory.h"
#include "hollywood/scene_text_store.h"
namespace Hollywood {
@@ -39,23 +40,34 @@ public:
kRoomWidth = 1376, kRoomHeight = kRunawayViewportHeight, kRoomTop = kRunawayViewportTop
};
- explicit RunawayScene5030(Audio::Mixer *mixer) : _audio(mixer) {}
+ RunawayScene5030(Audio::Mixer *mixer, RunawayInventory &inventory) : _audio(mixer), _inventory(inventory) {}
bool load();
void start(uint32 now);
- void click(Common::Point mouse, bool examine);
- void update(uint32 now, int scrollDirection);
- void draw(Common::Point mouse);
+ void click(Common::Point mouse, RunawayVerb verb, byte item);
+ void update(uint32 now, int scrollDirection, bool inventoryOpen);
+ void draw();
void setCameraX(int x);
- const Graphics::ManagedSurface &screen() const { return _screen; }
+ Graphics::ManagedSurface &screen() { return _screen; }
+ byte hotspotAt(Common::Point mouse) const;
+ Common::U32String actionCaption(byte hotspot, RunawayVerb verb, byte item) const;
+ const Common::U32String &committedCaption() const { return _committedCaption; }
+ const Common::U32String &subtitle() const { return _subtitle; }
+ bool busy() const { return _action != kNone; }
+ bool speaking() const { return _speechRow != 0; }
+ void skipSpeech();
+ void cancelWalk();
+ void sayInventory(const RunawayInventory::Reply &reply);
private:
enum Action { kNone, kIntro, kOpenLid, kCloseLid, kUnplug };
- byte hotspotAt(Common::Point mouse) const;
bool walkable(int x, int y) const;
bool clearPath(Common::Point start, Common::Point end) const;
void walkTo(Common::Point target);
void arrive();
void say(uint16 row);
+ void sayCue(uint16 cue, byte variation);
+ void pickUp(byte hotspot, byte item, uint patch);
+ void useItem(byte item, byte hotspot);
void showSpeechRow();
void stopSpeech();
void startAction(Action action);
@@ -68,8 +80,10 @@ private:
SceneTextStore _text;
Graphics::ManagedSurface _background, _screen;
Common::Array<byte> _mask, _maps, _unplugPatch, _openLidPatch, _closedLidPatch;
+ Common::Array<byte> _pickupPatches[5];
Common::Array<uint16> _voiceSamples, _cueEnds;
RunawayAudio _audio;
+ RunawayInventory &_inventory;
RunawayActor _actor;
RunawayAnimation _intro, _lidActor, _lid, _unplug;
Common::Point _position = Common::Point(623, 447);
@@ -77,12 +91,19 @@ private:
uint _pathIndex = 0;
float _x = 623, _y = 447;
byte _facing = 3, _pendingHotspot = 0;
+ byte _pendingItem = 0;
+ RunawayVerb _pendingVerb = kVerbWalk;
Action _action = kNone;
bool _lidOpen = false, _unplugged = false;
+ bool _pickedUp[20] = {};
+ bool _examined[20] = {};
+ bool _globalSpeech = false;
uint32 _now = 0, _lastUpdate = 0, _actionStarted = 0, _walkStarted = 0, _subtitleUntil = 0;
uint _step = 0;
uint16 _speechRow = 0, _speechEnd = 0;
+ uint16 _speechSample = 0;
Common::U32String _subtitle;
+ Common::U32String _committedCaption;
};
} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/ui.cpp b/engines/hollywood/runaway/ui.cpp
new file mode 100644
index 00000000000..33b943490ac
--- /dev/null
+++ b/engines/hollywood/runaway/ui.cpp
@@ -0,0 +1,382 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/endian.h"
+#include "common/util.h"
+#include "graphics/cursorman.h"
+#include "hollywood/runaway/ui.h"
+
+namespace Hollywood {
+namespace {
+
+const Graphics::PixelFormat kUIFormat(2, 5, 6, 5, 0, 11, 5, 0, 0);
+const uint kCursorWidth = 60;
+const uint kButtonX = 312;
+
+void shadeBevelPixel(Graphics::ManagedSurface &screen, int x, int y, int amount) {
+ uint16 *pixel = (uint16 *)screen.getBasePtr(x, y);
+ int r = *pixel >> 11, g = (*pixel >> 5) & 63, b = *pixel & 31;
+ // Native 0x40c600 shades the texture, one step on horizontal edges and
+ // two on vertical edges, keeping all three channels away from clipping.
+ const int direction = amount < 0 ? -1 : 1;
+ for (int i = 0; i < ABS(amount); ++i) {
+ if ((direction < 0 && r && g && b) || (direction > 0 && r < 31 && g < 31 && b < 31)) {
+ r += direction;
+ g += direction;
+ b += direction;
+ }
+ }
+ *pixel = (r << 11) | (g << 5) | b;
+}
+
+} // End of anonymous namespace
+
+RunawayUI::~RunawayUI() {
+ if (_cursorPushed)
+ CursorMan.popCursor();
+}
+
+bool RunawayUI::loadSurface(uint chunk, int width, int height, Graphics::ManagedSurface &surface) {
+ Common::Array<byte> pixels;
+ if (!readRunawayGlobalChunk(chunk, pixels) || pixels.size() != (uint)(width * height * 2))
+ return false;
+ surface.create(width, height, kUIFormat);
+ for (int y = 0; y < height; ++y) {
+ uint16 *out = (uint16 *)surface.getBasePtr(0, y);
+ for (int x = 0; x < width; ++x)
+ out[x] = READ_LE_UINT16(pixels.data() + (y * width + x) * 2);
+ }
+ return true;
+}
+
+bool RunawayUI::load() {
+ Common::Array<byte> animation;
+ if (!_font.load() || !loadSurface(114, 904, 540, _cursors) ||
+ !loadSurface(118, 48, 48, _waitCursor) || !loadSurface(121, 80, 42 * 80, _icons) ||
+ !loadSurface(127, 700, 74, _inventoryButton) || !loadSurface(129, 700, 74, _returnButton) ||
+ !loadSurface(131, 1024, 600, _inventoryBackground) || !loadSurface(133, 768, 576, _inventoryTexture) ||
+ !readRunawayGlobalChunk(137, animation) || !_portrait.load(animation, 104) ||
+ !readRunawayGlobalChunk(141, animation) || !_idlePortrait.load(animation, 32))
+ return false;
+ _cursor.create(kCursorWidth, kCursorWidth, kUIFormat);
+ const uint16 key = *(const uint16 *)_cursors.getPixels();
+ _cursor.fillRect(Common::Rect(0, 0, kCursorWidth, kCursorWidth), key);
+ CursorMan.pushCursor(_cursor.getPixels(), kCursorWidth, kCursorWidth, 30, 30, key, false, &kUIFormat);
+ _cursorPushed = true;
+ return true;
+}
+
+Common::Rect RunawayUI::itemRect(uint slot) const {
+ // Original layout table at 0x464508: the grid grows symmetrically within
+ // the 768-pixel inventory texture, with 80-pixel icons on a 96-pixel pitch.
+ const uint count = _inventory.size();
+ const uint columns = count <= 4 ? MAX<uint>(1, count) : count <= 8 ? 4 : count <= 15 ? 5 : count <= 24 ? 6 : 7;
+ const uint rows = (count + columns - 1) / columns;
+ const int x = 356 - (columns - 1) * 48 + (slot % columns) * 96;
+ const int y = kRunawayViewportTop + 260 - (rows - 1) * 48 + (slot / columns) * 96;
+ return Common::Rect(x, y, x + 80, y + 80);
+}
+
+byte RunawayUI::itemAt(Common::Point mouse) const {
+ for (uint slot = 0; slot < _inventory.size(); ++slot) {
+ if (itemRect(slot).contains(mouse))
+ return _inventory.itemAt(slot);
+ }
+ return 0;
+}
+
+bool RunawayUI::overButton() const {
+ return Common::Rect(kButtonX, 0, kButtonX + 100, 74).contains(_mouse);
+}
+
+bool RunawayUI::inViewport() const {
+ return _mouse.x >= 0 && _mouse.x < kRunawayScreenWidth &&
+ _mouse.y >= kRunawayViewportTop && _mouse.y < kRunawayViewportTop + kRunawayViewportHeight;
+}
+
+void RunawayUI::setVerb(RunawayVerb verb) {
+ if (_verb != verb) {
+ _previousVerb = _verb;
+ _verb = verb;
+ _verbStarted = _now;
+ }
+}
+
+void RunawayUI::setInventoryOpen(bool open) {
+ _inventoryOpen = open;
+ _enteredInventory = inViewport();
+ _hovered = 0;
+ _idleStarted = 0;
+ _lastInteraction = _now;
+ setVerb(kVerbWalk);
+}
+
+void RunawayUI::toggleInventory() {
+ if (!_blocked && !_speaking && !busy())
+ setInventoryOpen(!_inventoryOpen);
+}
+
+bool RunawayUI::cancel() {
+ if (busy())
+ return true;
+ if (_inventory.selected()) {
+ _inventory.select(0);
+ return true;
+ }
+ if (_inventoryOpen) {
+ setInventoryOpen(false);
+ return true;
+ }
+ return false;
+}
+
+void RunawayUI::update(uint32 now, Common::Point mouse, byte roomHotspot, bool blocked, bool speaking) {
+ _now = now;
+ _mouse = mouse;
+ _blocked = blocked;
+ _speaking = speaking;
+ const byte added = _inventory.takeNewItem();
+ if (added) {
+ _returnAfterPickup = !_inventoryOpen;
+ setInventoryOpen(true);
+ _pickupItem = added;
+ _pickupStarted = now;
+ }
+ if (_pickupItem && now - _pickupStarted >= 18 * 60) {
+ _pickupItem = 0;
+ if (_returnAfterPickup && !_speaking)
+ setInventoryOpen(false);
+ }
+ if (_returnAfterPickup && !_pickupItem && !_speaking) {
+ _returnAfterPickup = false;
+ setInventoryOpen(false);
+ }
+ if (_inventoryOpen && !busy() && !_speaking && _inventory.selected()) {
+ if (inViewport())
+ _enteredInventory = true;
+ else if (_enteredInventory)
+ setInventoryOpen(false);
+ }
+ const byte hovered = _inventoryOpen ? itemAt(mouse) : roomHotspot;
+ if (_hovered != hovered) {
+ _hovered = hovered;
+ setVerb(hovered ? (_inventoryOpen ? kVerbUse : kVerbLook) : kVerbWalk);
+ }
+ if (now - _buttonTick >= 20) {
+ const uint steps = MIN<uint>(6, (now - _buttonTick) / 20);
+ _buttonTick = now;
+ if (_blocked || _speaking || busy())
+ _buttonFrame = 0;
+ else if (overButton())
+ _buttonFrame = 6;
+ else if (mouse.y < kRunawayViewportTop)
+ _buttonFrame = MIN<uint>(5, _buttonFrame + steps);
+ else
+ _buttonFrame = MAX<int>(0, MIN<int>(5, _buttonFrame) - steps);
+ }
+ if (_inventoryOpen && now - _portraitTick >= 60) {
+ _portraitTick = now;
+ if (_speaking) {
+ _mouth = _random.getRandomNumber(5);
+ _lastInteraction = now;
+ _idleStarted = 0;
+ } else if (!busy() && _random.getRandomNumber(49) == 0) {
+ _blinkUntil = now + 180;
+ }
+ if (!busy() && !_speaking && !_idleStarted && now - _lastInteraction >= 30000)
+ _idleStarted = now;
+ if (_idleStarted && now - _idleStarted >= 32 * 60) {
+ _idleStarted = 0;
+ _lastInteraction = now;
+ }
+ }
+ updateCursor();
+}
+
+RunawayUI::Command RunawayUI::click(bool right) {
+ Command command;
+ _lastInteraction = _now;
+ _idleStarted = 0;
+ if (_speaking) {
+ command.type = Command::kSkipSpeech;
+ return command;
+ }
+ if (_blocked || busy())
+ return command;
+ if (right) {
+ if (_inventory.selected())
+ _inventory.select(0);
+ else if (_hovered)
+ setVerb(_verb == kVerbLook ? kVerbUse : kVerbLook);
+ return command;
+ }
+ if (overButton()) {
+ toggleInventory();
+ return command;
+ }
+ if (!inViewport())
+ return command;
+ command.mouse = _mouse;
+ command.verb = _verb;
+ command.item = _inventory.selected();
+ command.target = _hovered;
+ if (!_inventoryOpen) {
+ command.type = Command::kRoom;
+ if (command.item) {
+ command.verb = kVerbUse;
+ if (_hovered)
+ _inventory.select(0);
+ }
+ } else if (_hovered) {
+ if (command.item == _hovered) {
+ _inventory.select(0);
+ } else if (command.item) {
+ command.type = Command::kCombine;
+ _inventory.select(0);
+ } else if (_verb == kVerbLook) {
+ command.type = Command::kExamineItem;
+ } else {
+ _inventory.select(_hovered);
+ }
+ }
+ return command;
+}
+
+void RunawayUI::updateCursor() {
+ const bool waiting = _blocked || _speaking || busy();
+ const byte item = _inventory.selected();
+ uint tile = _verb;
+ uint shade = 0;
+ if (item) {
+ tile = _inventory.cursor(item) + (_hovered != 0);
+ } else {
+ const uint phase = (_now - _verbStarted) / 20;
+ if (phase < 10) {
+ // Four cels collapse the old verb to a ball; four expand the new one.
+ tile = !phase ? (uint)_previousVerb : phase < 5 ? _previousVerb * 4 + 8 + phase :
+ phase == 5 ? 8 : _verb * 4 + 18 - phase;
+ } else {
+ const byte pulse[] = {0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 8, 7, 6, 5, 4, 3, 2, 1};
+ shade = pulse[(_now / 50) % ARRAYSIZE(pulse)];
+ }
+ }
+ const int key = waiting ? -2 : tile * 10 + shade;
+ if (key == _cursorKey)
+ return;
+ _cursorKey = key;
+ const uint16 transparent = *(const uint16 *)_cursors.getPixels();
+ _cursor.fillRect(Common::Rect(0, 0, 60, 60), transparent);
+ const Graphics::ManagedSurface &source = waiting ? _waitCursor : _cursors;
+ const uint16 sourceKey = *(const uint16 *)source.getPixels();
+ const uint width = waiting ? 48 : 60;
+ const uint sx = waiting ? 0 : (tile % 15) * 60;
+ const uint sy = waiting ? 0 : (tile / 15) * 60;
+ for (uint y = 0; y < width; ++y) {
+ const uint16 *src = (const uint16 *)source.getBasePtr(sx, sy + y);
+ uint16 *dst = (uint16 *)_cursor.getBasePtr(waiting ? 6 : 0, y + (waiting ? 6 : 0));
+ for (uint x = 0; x < width; ++x) {
+ if (src[x] == sourceKey)
+ continue;
+ const uint r = (src[x] >> 11) & 31, g = (src[x] >> 5) & 63, b = src[x] & 31;
+ dst[x] = ((r * (31 - shade) / 31) << 11) |
+ ((g * (31 - shade) / 31) << 5) | (b * (31 - shade) / 31);
+ }
+ }
+ CursorMan.replaceCursor(_cursor.getPixels(), 60, 60, 30, 30, transparent, false, &kUIFormat);
+}
+
+Common::U32String RunawayUI::inventoryCaption() const {
+ const byte selected = _inventory.selected();
+ if (selected) {
+ if (_hovered == selected)
+ return Common::U32String("VERSTAUE ") + _inventory.name(selected);
+ Common::U32String caption = Common::U32String("BENUTZE ") + _inventory.name(selected);
+ if (_hovered)
+ caption += Common::U32String(" MIT ") + _inventory.name(_hovered);
+ return caption;
+ }
+ if (!_hovered)
+ return Common::U32String();
+ return Common::U32String(_verb == kVerbLook ? "BETRACHTE " : "NIMM ") + _inventory.name(_hovered);
+}
+
+void RunawayUI::drawInventory(Graphics::ManagedSurface &screen) {
+ screen.copyRectToSurface(_inventoryBackground, 0, kRunawayViewportTop,
+ Common::Rect(0, 0, 1024, 600));
+ screen.copyRectToSurface(_inventoryTexture, 12, kRunawayViewportTop + 12,
+ Common::Rect(0, 0, 768, 576));
+ for (uint slot = 0; slot < _inventory.size(); ++slot) {
+ const byte item = _inventory.itemAt(slot);
+ const Common::Rect rect = itemRect(slot);
+ for (int edge = 0; edge < 4; ++edge) {
+ for (int pixel = edge + 1; pixel < 88 - edge; ++pixel) {
+ shadeBevelPixel(screen, rect.left - 4 + pixel, rect.top - 4 + edge, -1);
+ shadeBevelPixel(screen, rect.left + 83 - pixel, rect.top + 83 - edge, 1);
+ shadeBevelPixel(screen, rect.left - 4 + edge, rect.top + 83 - pixel, -2);
+ shadeBevelPixel(screen, rect.left + 83 - edge, rect.top - 4 + pixel, 2);
+ }
+ }
+ if (item == _inventory.selected() || (item == _pickupItem && _now - _pickupStarted < 12 * 60)) {
+ screen.fillRect(rect, 0);
+ } else {
+ const uint y = (_inventory.icon(item) - 1) * 80;
+ screen.copyRectToSurface(_icons, rect.left, rect.top, Common::Rect(0, y, 80, y + 80));
+ }
+ }
+ if (_pickupItem) {
+ _portrait.draw(screen, 64 + MIN<uint>(17, (_now - _pickupStarted) / 60), 0, kRunawayViewportTop);
+ } else if (_idleStarted) {
+ _idlePortrait.draw(screen, MIN<uint>(31, (_now - _idleStarted) / 60), 0, kRunawayViewportTop);
+ } else {
+ const uint frame = _speaking ? _mouth : (int32)(_blinkUntil - _now) > 0 ? 6 : 0;
+ _portrait.draw(screen, frame, 0, kRunawayViewportTop);
+ }
+}
+
+void RunawayUI::draw(Graphics::ManagedSurface &screen, const Common::U32String &roomCaption,
+ const Common::U32String &committedCaption, const Common::U32String &subtitle, bool showSubtitles) {
+ if (_inventoryOpen)
+ drawInventory(screen);
+ const Graphics::ManagedSurface &button = _inventoryOpen ? _returnButton : _inventoryButton;
+ screen.copyRectToSurface(button, kButtonX, 0, Common::Rect(_buttonFrame * 100, 0, (_buttonFrame + 1) * 100, 74));
+ if (_speaking) {
+ if (showSubtitles) {
+ Common::Array<Common::U32String> lines;
+ _font.wordWrapText(subtitle, 984, lines);
+ for (uint i = 0; i < MIN<uint>(3, lines.size()); ++i)
+ _font.drawString(screen.surfacePtr(), lines[i], 20, 684 + i * 28, 984,
+ kUIFormat.RGBToColor(255, 223, 206), Graphics::kTextAlignCenter);
+ }
+ return;
+ }
+ Common::U32String caption;
+ uint16 color = kUIFormat.RGBToColor(189, 166, 148);
+ if (!_inventoryOpen && !committedCaption.empty()) {
+ caption = committedCaption;
+ color = kUIFormat.RGBToColor(255, 223, 206);
+ } else if (!_blocked && !busy()) {
+ caption = overButton() ? Common::U32String(_inventoryOpen ? "WEITERSPIELEN" : "INVENTAR") :
+ _inventoryOpen ? inventoryCaption() : roomCaption;
+ }
+ _font.drawString(screen.surfacePtr(), caption, 20, 684, 984, color, Graphics::kTextAlignCenter);
+}
+
+} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/ui.h b/engines/hollywood/runaway/ui.h
new file mode 100644
index 00000000000..8704d731567
--- /dev/null
+++ b/engines/hollywood/runaway/ui.h
@@ -0,0 +1,86 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef HOLLYWOOD_RUNAWAY_UI_H
+#define HOLLYWOOD_RUNAWAY_UI_H
+
+#include "common/random.h"
+#include "hollywood/runaway/font.h"
+#include "hollywood/runaway/graphics.h"
+#include "hollywood/runaway/inventory.h"
+
+namespace Hollywood {
+
+class RunawayUI {
+public:
+ struct Command {
+ enum Type { kNone, kRoom, kExamineItem, kCombine, kSkipSpeech };
+ Type type = kNone;
+ RunawayVerb verb = kVerbWalk;
+ Common::Point mouse;
+ byte item = 0, target = 0;
+ };
+ explicit RunawayUI(RunawayInventory &inventory) : _inventory(inventory), _random("runaway-ui") {}
+ ~RunawayUI();
+ bool load();
+ void update(uint32 now, Common::Point mouse, byte roomHotspot, bool blocked, bool speaking);
+ Command click(bool right);
+ void toggleInventory();
+ bool cancel();
+ bool inventoryOpen() const { return _inventoryOpen; }
+ bool busy() const { return _pickupItem != 0; }
+ RunawayVerb verb() const { return _verb; }
+ byte hovered() const { return _hovered; }
+ void draw(Graphics::ManagedSurface &screen, const Common::U32String &roomCaption,
+ const Common::U32String &committedCaption, const Common::U32String &subtitle, bool showSubtitles);
+
+private:
+ bool loadSurface(uint chunk, int width, int height, Graphics::ManagedSurface &surface);
+ Common::Rect itemRect(uint slot) const;
+ byte itemAt(Common::Point mouse) const;
+ bool overButton() const;
+ bool inViewport() const;
+ void setInventoryOpen(bool open);
+ void setVerb(RunawayVerb verb);
+ void updateCursor();
+ Common::U32String inventoryCaption() const;
+ void drawInventory(Graphics::ManagedSurface &screen);
+
+ RunawayInventory &_inventory;
+ Common::RandomSource _random;
+ RunawayFont _font;
+ Graphics::ManagedSurface _cursors, _waitCursor, _cursor, _inventoryButton, _returnButton;
+ Graphics::ManagedSurface _inventoryBackground, _inventoryTexture, _icons;
+ RunawayAnimation _portrait, _idlePortrait;
+ Common::Point _mouse;
+ RunawayVerb _verb = kVerbWalk, _previousVerb = kVerbWalk;
+ byte _hovered = 0, _buttonFrame = 0, _pickupItem = 0;
+ bool _inventoryOpen = false, _enteredInventory = false, _returnAfterPickup = false;
+ bool _blocked = false, _speaking = false, _cursorPushed = false;
+ uint32 _now = 0, _buttonTick = 0, _verbStarted = 0, _portraitTick = 0;
+ uint32 _blinkUntil = 0, _idleStarted = 0, _lastInteraction = 0, _pickupStarted = 0;
+ uint _mouth = 0;
+ int _cursorKey = -1;
+};
+
+} // End of namespace Hollywood
+
+#endif
Commit: c41d7bdd248761f64c8b87c33bdc3d4960565d3b
https://github.com/scummvm/scummvm/commit/c41d7bdd248761f64c8b87c33bdc3d4960565d3b
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-10-27T11:28:15+01:00
Commit Message:
HOLLYWOOD: add support for runaway french demo
Changed paths:
A engines/hollywood/runaway/strings.cpp
A engines/hollywood/runaway/strings.h
engines/hollywood/metaengine.cpp
engines/hollywood/module.mk
engines/hollywood/runaway/detection_tables.h
engines/hollywood/runaway/engine.cpp
engines/hollywood/runaway/engine.h
engines/hollywood/runaway/font.cpp
engines/hollywood/runaway/font.h
engines/hollywood/runaway/inventory.cpp
engines/hollywood/runaway/inventory.h
engines/hollywood/runaway/scene5030.cpp
engines/hollywood/runaway/scene5030.h
engines/hollywood/runaway/ui.cpp
engines/hollywood/runaway/ui.h
diff --git a/engines/hollywood/metaengine.cpp b/engines/hollywood/metaengine.cpp
index 044013ffa7f..49604f4a97c 100644
--- a/engines/hollywood/metaengine.cpp
+++ b/engines/hollywood/metaengine.cpp
@@ -51,7 +51,7 @@ protected:
Common::Error HollywoodMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
if (!strcmp(desc->gameId, "runaway"))
- *engine = new RunawayEngine(syst);
+ *engine = new RunawayEngine(syst, desc->language);
else
*engine = new HollywoodEngine(syst, desc);
return Common::kNoError;
diff --git a/engines/hollywood/module.mk b/engines/hollywood/module.mk
index 3540398f986..97adf1f8a6b 100644
--- a/engines/hollywood/module.mk
+++ b/engines/hollywood/module.mk
@@ -143,6 +143,7 @@ MODULE_OBJS = \
runaway/intro.o \
runaway/inventory.o \
runaway/scene5030.o \
+ runaway/strings.o \
runaway/ui.o
# This module can be built as a plugin
diff --git a/engines/hollywood/runaway/detection_tables.h b/engines/hollywood/runaway/detection_tables.h
index f50e13118b1..77ae844c412 100644
--- a/engines/hollywood/runaway/detection_tables.h
+++ b/engines/hollywood/runaway/detection_tables.h
@@ -35,5 +35,17 @@
ADGF_DEMO | ADGF_UNSTABLE,
GUIO2(GUIO_NOMIDI, GUIO_NOLAUNCHLOAD)
},
+ // French Runaway demo (February 2003 build), also starting in scene 5030.
+ {
+ "runaway",
+ "Demo",
+ AD_ENTRY3s("RESOURCE.E03", "df350293b7dab8f39aead666dcedce72", 41872288,
+ "RESOURCE.003", "c6f4c7e73599d5f43978a377e1881144", 662916,
+ "RESOURCE.000", "16d32881d3f34fdf0da3c03c31f8f1ba", 35512149),
+ Common::FR_FRA,
+ Common::kPlatformWindows,
+ ADGF_DEMO | ADGF_UNSTABLE,
+ GUIO2(GUIO_NOMIDI, GUIO_NOLAUNCHLOAD)
+ },
#endif // HOLLYWOOD_RUNAWAY_DETECTION_TABLES_H
diff --git a/engines/hollywood/runaway/engine.cpp b/engines/hollywood/runaway/engine.cpp
index e7eb23c1caf..3f50d2efd84 100644
--- a/engines/hollywood/runaway/engine.cpp
+++ b/engines/hollywood/runaway/engine.cpp
@@ -35,6 +35,7 @@
#include "hollywood/runaway/engine.h"
#include "hollywood/runaway/intro.h"
#include "hollywood/runaway/scene5030.h"
+#include "hollywood/runaway/strings.h"
#include "hollywood/runaway/ui.h"
namespace Hollywood {
@@ -116,9 +117,10 @@ Common::Error RunawayEngine::run() {
if (introResult.getCode() != Common::kNoError || shouldQuit())
return introResult;
- RunawayInventory inventory;
- RunawayScene5030 scene(_mixer, inventory);
- RunawayUI ui(inventory);
+ const RunawayStrings strings(_language);
+ RunawayInventory inventory(strings);
+ RunawayScene5030 scene(_mixer, inventory, strings);
+ RunawayUI ui(inventory, strings);
if (!scene.load() || !ui.load())
return Common::Error(Common::kReadingFailed, "Cannot load the Runaway demo room, actor or interface data");
scene.start(getTotalPlayTime());
diff --git a/engines/hollywood/runaway/engine.h b/engines/hollywood/runaway/engine.h
index 2639e973fdf..618081996c0 100644
--- a/engines/hollywood/runaway/engine.h
+++ b/engines/hollywood/runaway/engine.h
@@ -23,6 +23,7 @@
#define HOLLYWOOD_RUNAWAY_ENGINE_H
#include "common/array.h"
+#include "common/language.h"
#include "engines/engine.h"
namespace Common {
@@ -35,7 +36,7 @@ namespace Hollywood {
// has its own RGB565 renderer, scene state and audio formats.
class RunawayEngine : public Engine {
public:
- explicit RunawayEngine(OSystem *syst) : Engine(syst) {}
+ RunawayEngine(OSystem *syst, Common::Language language) : Engine(syst), _language(language) {}
Common::Error run() override;
void initializePath(const Common::FSNode &gamePath) override;
@@ -46,6 +47,7 @@ public:
private:
Common::Error playIntro();
+ Common::Language _language;
};
} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/font.cpp b/engines/hollywood/runaway/font.cpp
index f25b48e4543..2bc66311999 100644
--- a/engines/hollywood/runaway/font.cpp
+++ b/engines/hollywood/runaway/font.cpp
@@ -29,7 +29,7 @@
namespace Hollywood {
namespace {
-// The demo's character table at 0x4641f0 uses DOS 850, with additional
+// The German demo's character table at 0x4641f0 uses DOS 850, with additional
// punctuation in otherwise unused positions. 254 denotes a space.
const byte kGlyphMap[256] = {
149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
@@ -54,9 +54,11 @@ const byte kGlyphMap[256] = {
bool RunawayFont::load() {
Common::Array<byte> metrics;
- if (!readRunawayGlobalChunk(125, _pixels) || !readRunawayGlobalChunk(126, metrics) || metrics.size() != 750)
+ if (!readRunawayGlobalChunk(125, _pixels) || !readRunawayGlobalChunk(126, metrics) ||
+ (metrics.size() != 150 * 5 && metrics.size() != 156 * 5))
return false;
- for (uint i = 0; i < 150; ++i) {
+ _glyphs.resize(metrics.size() / 5);
+ for (uint i = 0; i < _glyphs.size(); ++i) {
const byte *data = metrics.data() + i * 5;
Glyph &glyph = _glyphs[i];
glyph.offset = READ_LE_UINT16(data);
@@ -67,15 +69,30 @@ bool RunawayFont::load() {
glyph.offset + glyph.width * glyph.height > _pixels.size())
return false;
}
+ memcpy(_glyphMap, kGlyphMap, sizeof(_glyphMap));
+ // The French table at 0x46f1e0 adds circumflex vowels and moves the
+ // missing-character box to 155. Glyphs 153/154 are the CP1252 ligatures.
+ if (_glyphs.size() == 156) {
+ for (uint i = 0; i < ARRAYSIZE(_glyphMap); ++i) {
+ if (_glyphMap[i] == 149)
+ _glyphMap[i] = 155;
+ }
+ _glyphMap[0x83] = 148;
+ _glyphMap[0x88] = 149;
+ _glyphMap[0x8c] = 150;
+ _glyphMap[0x93] = 151;
+ _glyphMap[0x96] = 152;
+ }
char bytes[128];
for (uint i = 0; i < 128; ++i)
bytes[i] = i + 128;
_characters = Common::U32String(bytes, 128, Common::kDos850);
// Native 0x40ee40 packs adjacent contours, trying up to five pixels
// of overlap. Value 17 contributes only to the left glyph's spacing.
- for (uint left = 0; left < 150; ++left) {
+ _kerning.resize(_glyphs.size() * _glyphs.size());
+ for (uint left = 0; left < _glyphs.size(); ++left) {
const Glyph &a = _glyphs[left];
- for (uint right = 0; right < 150; ++right) {
+ for (uint right = 0; right < _glyphs.size(); ++right) {
const Glyph &b = _glyphs[right];
int shift = 1;
for (; shift < 5; ++shift) {
@@ -100,7 +117,7 @@ bool RunawayFont::load() {
break;
}
}
- _kerning[left][right] = -shift;
+ _kerning[left * _glyphs.size() + right] = -shift;
}
}
return true;
@@ -114,14 +131,16 @@ uint RunawayFont::glyphIndex(uint32 chr) const {
case 0x201e: return 92;
case '\'': return 90;
case '"': return 81;
+ case 0x0152: return _glyphs.size() == 156 ? 153 : 149;
+ case 0x0153: return _glyphs.size() == 156 ? 154 : 149;
}
if (chr < 128)
- return kGlyphMap[chr];
+ return _glyphMap[chr];
for (uint i = 0; i < _characters.size(); ++i) {
if (_characters[i] == chr)
- return kGlyphMap[i + 128];
+ return _glyphMap[i + 128];
}
- return 149;
+ return _glyphs.size() - 1;
}
int RunawayFont::getCharWidth(uint32 chr) const {
@@ -131,7 +150,7 @@ int RunawayFont::getCharWidth(uint32 chr) const {
int RunawayFont::getKerningOffset(uint32 left, uint32 right) const {
const uint a = glyphIndex(left), b = glyphIndex(right);
- return !left || !right || a == 254 || b == 254 ? 0 : _kerning[a][b];
+ return !left || !right || a == 254 || b == 254 ? 0 : _kerning[a * _glyphs.size() + b];
}
void RunawayFont::drawChar(Graphics::Surface *dst, uint32 chr, int x, int y, uint32 color) const {
diff --git a/engines/hollywood/runaway/font.h b/engines/hollywood/runaway/font.h
index 4fab084eb58..0a85ceba181 100644
--- a/engines/hollywood/runaway/font.h
+++ b/engines/hollywood/runaway/font.h
@@ -28,7 +28,7 @@
namespace Hollywood {
-// RESOURCE.000 stores 150 antialiased glyphs, including their contour masks.
+// RESOURCE.000 stores antialiased glyphs, including their contour masks.
class RunawayFont : public Graphics::Font {
public:
bool load();
@@ -44,8 +44,9 @@ private:
byte top, height, width;
};
uint glyphIndex(uint32 chr) const;
- Glyph _glyphs[150];
- int8 _kerning[150][150];
+ Common::Array<Glyph> _glyphs;
+ Common::Array<int8> _kerning;
+ byte _glyphMap[256];
Common::Array<byte> _pixels;
Common::U32String _characters;
};
diff --git a/engines/hollywood/runaway/inventory.cpp b/engines/hollywood/runaway/inventory.cpp
index 5c8ad0b0945..ba032222847 100644
--- a/engines/hollywood/runaway/inventory.cpp
+++ b/engines/hollywood/runaway/inventory.cpp
@@ -21,40 +21,11 @@
#include "common/util.h"
#include "hollywood/runaway/inventory.h"
+#include "hollywood/runaway/strings.h"
namespace Hollywood {
namespace {
-// German demo labels from 0x44bea0. Pictures and cursor cels stay in RESOURCE.000.
-const char *const kItemNames[] = {
- "",
- "LEDERLAPPEN",
- "BRECHSTANGE",
- "SPR\303\234HREINIGER",
- "PACKUNG BUTTER",
- "SPRENGAUSR\303\234STUNG",
- "HELM AUS DEM ZWEITEN WELTKRIEG",
- "SCHRAUBE",
- "GARDEROBENKNAUF",
- "TABLETTE",
- "LIPPENSTIFT",
- "HAUFEN LIPPENSTIFTE",
- "SONNEN\303\226L",
- "WALKIE-TALKIE",
- "MUNITIONSSTREIFEN",
- "BASKETBALL",
- "SATTLERNADEL UND FADEN",
- "BEHELFS-BOHRER",
- "SACK GESCH\303\204LTER ERDN\303\234SSE",
- "GLAS ERDNUSSBUTTER",
- "SONNENBRILLE",
- "FUSSRASTE",
- "HANDSTAUBSAUGER",
- "PLAN",
- "BLASEBALG",
- "EIMER",
- "SCHL\303\234SSEL",
-};
const byte kItemCursors[] = {
0, 41, 43, 45, 47, 49, 51, 55, 57, 59, 61, 63, 65, 67, 69,
75, 79, 81, 83, 85, 87, 91, 93, 95, 103, 105, 111
@@ -97,8 +68,8 @@ void RunawayInventory::remove(byte item) {
Common::U32String RunawayInventory::name(byte item) const {
if (item == 1 && _clothState)
- return Common::U32String(_clothState == 1 ? "PUTZLAPPEN" : "SCHMUTZLAPPEN");
- return Common::U32String(item <= kItemCount ? kItemNames[item] : "");
+ return _strings.text(_clothState == 1 ? RunawayStrings::kWetCloth : RunawayStrings::kDirtyCloth);
+ return _strings.itemName(item);
}
uint RunawayInventory::icon(byte item) const {
diff --git a/engines/hollywood/runaway/inventory.h b/engines/hollywood/runaway/inventory.h
index 1240bc2a430..00ecd257320 100644
--- a/engines/hollywood/runaway/inventory.h
+++ b/engines/hollywood/runaway/inventory.h
@@ -27,6 +27,8 @@
namespace Hollywood {
+class RunawayStrings;
+
enum RunawayVerb { kVerbWalk, kVerbLook, kVerbUse };
class RunawayInventory {
@@ -37,6 +39,7 @@ public:
byte variation;
Reply(uint16 c = 1, byte v = 0) : cue(c), variation(v) {}
};
+ explicit RunawayInventory(const RunawayStrings &strings) : _strings(strings) {}
bool contains(byte item) const;
bool add(byte item);
void remove(byte item);
@@ -54,6 +57,7 @@ public:
void soilCloth() { _clothState = 2; }
private:
+ const RunawayStrings &_strings;
Common::Array<byte> _items;
byte _selected = 0, _newItem = 0, _clothState = 0;
};
diff --git a/engines/hollywood/runaway/scene5030.cpp b/engines/hollywood/runaway/scene5030.cpp
index 073b89d4141..709469a47e6 100644
--- a/engines/hollywood/runaway/scene5030.cpp
+++ b/engines/hollywood/runaway/scene5030.cpp
@@ -26,12 +26,12 @@
#include "hollywood/debug.h"
#include "hollywood/runaway/scene5030.h"
+#include "hollywood/runaway/strings.h"
namespace Hollywood {
namespace {
struct SceneHotspot {
- const char *name;
int x, y;
uint16 description;
byte facing;
@@ -40,26 +40,26 @@ struct SceneHotspot {
// Approach points and facings from the scene initializer at 0x439e40. The
// hit regions themselves are decoded from E03; these are not bounding boxes.
const SceneHotspot kHotspots[] = {
- {"", 0, 0, 0, 0},
- {"T\xc3\xbcr", 101, 507, 511, 7},
- {"Spalt", 101, 507, 519, 7},
- {"Fenster", 406, 383, 520, 0},
- {"Fenster", 1062, 473, 523, 1},
- {"Holzst\xc3\xbc" "ck", 942, 407, 528, 0},
- {"Fallt\xc3\xbcr", 1215, 542, 530, 7},
- {"Stofffetzen", 406, 383, 572, 7},
- {"K\xc3\xbchltruhe", 1062, 473, 535, 7},
- {"Fetzen", 1019, 405, 552, 0},
- {"Stecker", 1215, 542, 554, 7},
- {"Abfluss", 1215, 542, 557, 7},
- {"Telefon", 495, 381, 565, 7},
- {"Regal", 873, 409, 567, 1},
- {"Brechstange", 974, 406, 570, 7},
- {"Brillenreste", 262, 426, 614, 0},
- {"Blasebalg", 262, 426, 576, 7},
- {"Dose", 609, 379, 577, 1},
- {"K\xc3\xbchltruhendeckel", 1062, 473, 580, 1},
- {"Abfluss", 1215, 542, 557, 7}
+ {0, 0, 0, 0},
+ {101, 507, 511, 7},
+ {101, 507, 519, 7},
+ {406, 383, 520, 0},
+ {1062, 473, 523, 1},
+ {942, 407, 528, 0},
+ {1215, 542, 530, 7},
+ {406, 383, 572, 7},
+ {1062, 473, 535, 7},
+ {1019, 405, 552, 0},
+ {1215, 542, 554, 7},
+ {1215, 542, 557, 7},
+ {495, 381, 565, 7},
+ {873, 409, 567, 1},
+ {974, 406, 570, 7},
+ {262, 426, 614, 0},
+ {262, 426, 576, 7},
+ {609, 379, 577, 1},
+ {1062, 473, 580, 1},
+ {1215, 542, 557, 7}
};
} // End of anonymous namespace
@@ -270,40 +270,39 @@ void RunawayScene5030::stopSpeech() {
}
Common::U32String RunawayScene5030::actionCaption(byte id, RunawayVerb verb, byte item) const {
- Common::U32String name(id < ARRAYSIZE(kHotspots) ? kHotspots[id].name : "");
+ Common::U32String name = _strings.shackHotspotName(id);
if (id < ARRAYSIZE(kHotspots) && _examined[id]) {
if (id == 5 || id == 9 || id == 17)
name = _inventory.name(id == 5 ? 8 : id == 9 ? 1 : 3);
else if (id == 7)
- name = Common::U32String("Hemd");
+ name = _strings.text(RunawayStrings::kShirt);
}
- name.toUppercase();
if (item) {
- Common::U32String caption = Common::U32String("BENUTZE ") + _inventory.name(item);
+ Common::U32String caption = _strings.text(RunawayStrings::kUse) + _inventory.name(item);
if (id)
- caption += Common::U32String(" MIT ") + name;
+ caption += _strings.text(RunawayStrings::kWith) + name;
return caption;
}
if (!id)
return Common::U32String();
if (verb == kVerbLook)
- return Common::U32String(id == 3 || id == 4 ? "SIEH AUS DEM " : "BETRACHTE ") + name;
- const char *action = "BENUTZE ";
+ return _strings.text(id == 3 || id == 4 ? RunawayStrings::kLookThrough : RunawayStrings::kLook) + name;
+ RunawayStrings::TextId action = RunawayStrings::kUse;
if (id == 5 || id == 9 || id == 14 || id == 16 || id == 17)
- action = "NIMM ";
+ action = RunawayStrings::kTake;
else if (id == 18)
- action = _lidOpen ? "SCHLIESSE " : "\xc3\x96" "FFNE ";
+ action = _lidOpen ? RunawayStrings::kClose : RunawayStrings::kOpen;
else if (id == 8)
- action = _lidOpen ? "VERSCHIEBE " : "\xc3\x96" "FFNE ";
+ action = _lidOpen ? RunawayStrings::kMove : RunawayStrings::kOpen;
else if (id == 10)
- return Common::U32String("ZIEHE DEN STECKER DER K\xc3\x9cHLTRUHE HERAUS");
+ return _strings.text(RunawayStrings::kUnplugCooler);
else if (id == 12)
- action = "BENUTZE DAS ";
+ action = RunawayStrings::kUsePhone;
else if (id == 13)
- action = "NIMM ETWAS AUS DEM ";
+ action = RunawayStrings::kTakeFromShelf;
else if (id == 1 || id == 3 || id == 4 || id == 6)
- action = "\xc3\x96" "FFNE ";
- return Common::U32String(action) + name;
+ action = RunawayStrings::kOpen;
+ return _strings.text(action) + name;
}
void RunawayScene5030::sayInventory(const RunawayInventory::Reply &reply) {
diff --git a/engines/hollywood/runaway/scene5030.h b/engines/hollywood/runaway/scene5030.h
index 6f22da18115..680e313b854 100644
--- a/engines/hollywood/runaway/scene5030.h
+++ b/engines/hollywood/runaway/scene5030.h
@@ -40,7 +40,8 @@ public:
kRoomWidth = 1376, kRoomHeight = kRunawayViewportHeight, kRoomTop = kRunawayViewportTop
};
- RunawayScene5030(Audio::Mixer *mixer, RunawayInventory &inventory) : _audio(mixer), _inventory(inventory) {}
+ RunawayScene5030(Audio::Mixer *mixer, RunawayInventory &inventory, const RunawayStrings &strings) :
+ _audio(mixer), _inventory(inventory), _strings(strings) {}
bool load();
void start(uint32 now);
void click(Common::Point mouse, RunawayVerb verb, byte item);
@@ -84,6 +85,7 @@ private:
Common::Array<uint16> _voiceSamples, _cueEnds;
RunawayAudio _audio;
RunawayInventory &_inventory;
+ const RunawayStrings &_strings;
RunawayActor _actor;
RunawayAnimation _intro, _lidActor, _lid, _unplug;
Common::Point _position = Common::Point(623, 447);
diff --git a/engines/hollywood/runaway/strings.cpp b/engines/hollywood/runaway/strings.cpp
new file mode 100644
index 00000000000..7f0526e0cc8
--- /dev/null
+++ b/engines/hollywood/runaway/strings.cpp
@@ -0,0 +1,117 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/util.h"
+#include "hollywood/runaway/strings.h"
+
+namespace Hollywood {
+namespace {
+
+// German and French executable interface labels, stored as UTF-8.
+const char *const kText[RunawayStrings::kTextCount][2] = {
+ {"BETRACHTE ", "REGARDER "},
+ {"NIMM ", "PRENDRE "},
+ {"BENUTZE ", "UTILISER "},
+ {"VERSTAUE ", "DEPOSER "},
+ {" MIT ", " AVEC "},
+ {"INVENTAR", "INVENTAIRE"},
+ {"WEITERSPIELEN", "CONTINUER LA PARTIE"},
+ {"\303\226FFNE ", "OUVRIR "},
+ {"SCHLIESSE ", "FERMER "},
+ {"VERSCHIEBE ", "DEPLACER "},
+ {"SIEH AUS DEM ", "REGARDER A TRAVERS "},
+ {"BENUTZE DAS ", "APPELER AVEC "},
+ {"NIMM ETWAS AUS DEM ", "PRENDRE QUELQUE CHOSE DANS "},
+ {"ZIEHE DEN STECKER DER K\303\234HLTRUHE HERAUS", "DEBRANCHER CONGELATEUR"},
+ {"HEMD", "CHEMISE"},
+ {"PUTZLAPPEN", "PEAU DE CHAMOIS HUMIDE"},
+ {"SCHMUTZLAPPEN", "PEAU DE CHAMOIS SALE"}
+};
+
+const char *const kItemNames[][2] = {
+ {"", ""},
+ {"LEDERLAPPEN", "PEAU DE CHAMOIS"},
+ {"BRECHSTANGE", "PIED DE BICHE"},
+ {"SPR\303\234HREINIGER", "PRODUIT NETTOYANT"},
+ {"PACKUNG BUTTER", "TABLETTE DE BEURRE"},
+ {"SPRENGAUSR\303\234STUNG", "DYNAMITE ET DETONATEUR"},
+ {"HELM AUS DEM ZWEITEN WELTKRIEG", "CASQUE DE LA SECONDE GUERRE MONDIALE"},
+ {"SCHRAUBE", "VIS"},
+ {"GARDEROBENKNAUF", "PORTE-MANTEAUX"},
+ {"TABLETTE", "PILLULE"},
+ {"LIPPENSTIFT", "ROUGE A LEVRES"},
+ {"HAUFEN LIPPENSTIFTE", "STOCK DE ROUGE A LEVRES"},
+ {"SONNEN\303\226L", "HUILE SOLAIRE"},
+ {"WALKIE-TALKIE", "TALKIE-WALKIE"},
+ {"MUNITIONSSTREIFEN", "BANDE DE MUNITIONS"},
+ {"BASKETBALL", "BALLON DE BASKET"},
+ {"SATTLERNADEL UND FADEN", "FIL A COUDRE ET AIGUILLE"},
+ {"BEHELFS-BOHRER", "TOURNEVIS ARTISANAL"},
+ {"SACK GESCH\303\204LTER ERDN\303\234SSE", "SAC DE CACAHOUETES ENTIERES"},
+ {"GLAS ERDNUSSBUTTER", "POT DE BEURRE DE CACAHOUETES"},
+ {"SONNENBRILLE", "LUNETTES DE SOLEIL"},
+ {"FUSSRASTE", "REPOSE-PIED DE MOTO"},
+ {"HANDSTAUBSAUGER", "ASPIRATEUR A MAIN"},
+ {"PLAN", "PLAN GENIAL"},
+ {"BLASEBALG", "SOUFFLET"},
+ {"EIMER", "SEAU"},
+ {"SCHL\303\234SSEL", "CLE DU REFRIGERATEUR"}
+};
+
+const char *const kShackHotspotNames[][2] = {
+ {"", ""},
+ {"T\303\234R", "PORTE"},
+ {"SPALT", "ORIFICE"},
+ {"FENSTER", "FENETRE"},
+ {"FENSTER", "PETITE FENETRE"},
+ {"HOLZST\303\234CK", "MORCEAU DE BOIS ROND"},
+ {"FALLT\303\234R", "TRAPPE"},
+ {"STOFFFETZEN", "TISSU DECHIRE"},
+ {"K\303\234HLTRUHE", "CONGELATEUR"},
+ {"FETZEN", "CHIFFON"},
+ {"STECKER", "PRISE ELECTRIQUE"},
+ {"ABFLUSS", "TUYAU DE VIDANGE DU CONGELATEUR"},
+ {"TELEFON", "TELEPHONE"},
+ {"REGAL", "ETAGERES"},
+ {"BRECHSTANGE", "PIED-DE-BICHE"},
+ {"BRILLENRESTE", "LUNETTES CASSEES"},
+ {"BLASEBALG", "SOUFFLET"},
+ {"DOSE", "BOUTEILLE"},
+ {"K\303\234HLTRUHENDECKEL", "COUVERCLE DU CONGELATEUR"},
+ {"ABFLUSS", "TUYAU DE VIDANGE DU CONGELATEUR"}
+};
+
+} // End of anonymous namespace
+
+Common::U32String RunawayStrings::text(TextId id) const {
+ assert(id < kTextCount);
+ return Common::U32String(kText[id][_languageIndex]);
+}
+
+Common::U32String RunawayStrings::itemName(byte item) const {
+ return Common::U32String(item < ARRAYSIZE(kItemNames) ? kItemNames[item][_languageIndex] : "");
+}
+
+Common::U32String RunawayStrings::shackHotspotName(byte hotspot) const {
+ return Common::U32String(hotspot < ARRAYSIZE(kShackHotspotNames) ? kShackHotspotNames[hotspot][_languageIndex] : "");
+}
+
+} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/strings.h b/engines/hollywood/runaway/strings.h
new file mode 100644
index 00000000000..aefd1a4df24
--- /dev/null
+++ b/engines/hollywood/runaway/strings.h
@@ -0,0 +1,50 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef HOLLYWOOD_RUNAWAY_STRINGS_H
+#define HOLLYWOOD_RUNAWAY_STRINGS_H
+
+#include "common/language.h"
+#include "common/ustr.h"
+
+namespace Hollywood {
+
+// Interface labels are embedded in the original executables. Dialogue and
+// subtitles remain in RESOURCE.003. Use the detected game's language here.
+class RunawayStrings {
+public:
+ enum TextId {
+ kLook, kTake, kUse, kPutAway, kWith, kInventory, kResume,
+ kOpen, kClose, kMove, kLookThrough, kUsePhone, kTakeFromShelf,
+ kUnplugCooler, kShirt, kWetCloth, kDirtyCloth, kTextCount
+ };
+ explicit RunawayStrings(Common::Language language) : _languageIndex(language == Common::FR_FRA ? 1 : 0) {}
+ Common::U32String text(TextId id) const;
+ Common::U32String itemName(byte item) const;
+ Common::U32String shackHotspotName(byte hotspot) const;
+
+private:
+ uint _languageIndex;
+};
+
+} // End of namespace Hollywood
+
+#endif
diff --git a/engines/hollywood/runaway/ui.cpp b/engines/hollywood/runaway/ui.cpp
index 33b943490ac..aed1dc1b183 100644
--- a/engines/hollywood/runaway/ui.cpp
+++ b/engines/hollywood/runaway/ui.cpp
@@ -22,6 +22,7 @@
#include "common/endian.h"
#include "common/util.h"
#include "graphics/cursorman.h"
+#include "hollywood/runaway/strings.h"
#include "hollywood/runaway/ui.h"
namespace Hollywood {
@@ -307,15 +308,15 @@ Common::U32String RunawayUI::inventoryCaption() const {
const byte selected = _inventory.selected();
if (selected) {
if (_hovered == selected)
- return Common::U32String("VERSTAUE ") + _inventory.name(selected);
- Common::U32String caption = Common::U32String("BENUTZE ") + _inventory.name(selected);
+ return _strings.text(RunawayStrings::kPutAway) + _inventory.name(selected);
+ Common::U32String caption = _strings.text(RunawayStrings::kUse) + _inventory.name(selected);
if (_hovered)
- caption += Common::U32String(" MIT ") + _inventory.name(_hovered);
+ caption += _strings.text(RunawayStrings::kWith) + _inventory.name(_hovered);
return caption;
}
if (!_hovered)
return Common::U32String();
- return Common::U32String(_verb == kVerbLook ? "BETRACHTE " : "NIMM ") + _inventory.name(_hovered);
+ return _strings.text(_verb == kVerbLook ? RunawayStrings::kLook : RunawayStrings::kTake) + _inventory.name(_hovered);
}
void RunawayUI::drawInventory(Graphics::ManagedSurface &screen) {
@@ -373,7 +374,7 @@ void RunawayUI::draw(Graphics::ManagedSurface &screen, const Common::U32String &
caption = committedCaption;
color = kUIFormat.RGBToColor(255, 223, 206);
} else if (!_blocked && !busy()) {
- caption = overButton() ? Common::U32String(_inventoryOpen ? "WEITERSPIELEN" : "INVENTAR") :
+ caption = overButton() ? _strings.text(_inventoryOpen ? RunawayStrings::kResume : RunawayStrings::kInventory) :
_inventoryOpen ? inventoryCaption() : roomCaption;
}
_font.drawString(screen.surfacePtr(), caption, 20, 684, 984, color, Graphics::kTextAlignCenter);
diff --git a/engines/hollywood/runaway/ui.h b/engines/hollywood/runaway/ui.h
index 8704d731567..bb006112bc9 100644
--- a/engines/hollywood/runaway/ui.h
+++ b/engines/hollywood/runaway/ui.h
@@ -38,7 +38,8 @@ public:
Common::Point mouse;
byte item = 0, target = 0;
};
- explicit RunawayUI(RunawayInventory &inventory) : _inventory(inventory), _random("runaway-ui") {}
+ RunawayUI(RunawayInventory &inventory, const RunawayStrings &strings) :
+ _inventory(inventory), _strings(strings), _random("runaway-ui") {}
~RunawayUI();
bool load();
void update(uint32 now, Common::Point mouse, byte roomHotspot, bool blocked, bool speaking);
@@ -65,6 +66,7 @@ private:
void drawInventory(Graphics::ManagedSurface &screen);
RunawayInventory &_inventory;
+ const RunawayStrings &_strings;
Common::RandomSource _random;
RunawayFont _font;
Graphics::ManagedSurface _cursors, _waitCursor, _cursor, _inventoryButton, _returnButton;
Commit: 611cae8157cb0da0bc009788c2bf854c30977d99
https://github.com/scummvm/scummvm/commit/611cae8157cb0da0bc009788c2bf854c30977d99
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-10-27T11:28:15+01:00
Commit Message:
HOLLYWOOD: add support for runaway spanish demo
Changed paths:
engines/hollywood/runaway/detection_tables.h
engines/hollywood/runaway/font.cpp
engines/hollywood/runaway/font.h
engines/hollywood/runaway/strings.cpp
engines/hollywood/runaway/strings.h
diff --git a/engines/hollywood/runaway/detection_tables.h b/engines/hollywood/runaway/detection_tables.h
index 77ae844c412..8859327b053 100644
--- a/engines/hollywood/runaway/detection_tables.h
+++ b/engines/hollywood/runaway/detection_tables.h
@@ -23,6 +23,18 @@
#define HOLLYWOOD_RUNAWAY_DETECTION_TABLES_H
// Included in the shared ADGameDescription array in hollywood/detection.cpp.
+ // Spanish chapter-three demo (July 2001 build, Micromania 80).
+ {
+ "runaway",
+ "Demo",
+ AD_ENTRY3s("RESOURCE.E03", "df350293b7dab8f39aead666dcedce72", 41872288,
+ "RESOURCE.003", "b9fb386d4af6ef7cc535ed4089e32aff", 7330982,
+ "RESOURCE.000", "231c7a354e1452246c89d816f8df4833", 34789119),
+ Common::ES_ESP,
+ Common::kPlatformWindows,
+ ADGF_DEMO | ADGF_UNSTABLE,
+ GUIO2(GUIO_NOMIDI, GUIO_NOLAUNCHLOAD)
+ },
// German Runaway demo, starting in the shack (scene 5030).
{
"runaway",
diff --git a/engines/hollywood/runaway/font.cpp b/engines/hollywood/runaway/font.cpp
index 2bc66311999..7b1f75cc645 100644
--- a/engines/hollywood/runaway/font.cpp
+++ b/engines/hollywood/runaway/font.cpp
@@ -55,7 +55,7 @@ const byte kGlyphMap[256] = {
bool RunawayFont::load() {
Common::Array<byte> metrics;
if (!readRunawayGlobalChunk(125, _pixels) || !readRunawayGlobalChunk(126, metrics) ||
- (metrics.size() != 150 * 5 && metrics.size() != 156 * 5))
+ (metrics.size() != 119 * 5 && metrics.size() != 150 * 5 && metrics.size() != 156 * 5))
return false;
_glyphs.resize(metrics.size() / 5);
for (uint i = 0; i < _glyphs.size(); ++i) {
@@ -70,6 +70,15 @@ bool RunawayFont::load() {
return false;
}
memcpy(_glyphMap, kGlyphMap, sizeof(_glyphMap));
+ _missingGlyph = _glyphs.size() == 119 ? 255 : _glyphs.size() - 1;
+ // The Spanish table at 0x4631f0 uses the shared first 119 glyphs and
+ // marks unsupported characters with 255, without a fallback picture.
+ if (_glyphs.size() == 119) {
+ for (uint i = 0; i < ARRAYSIZE(_glyphMap); ++i) {
+ if (_glyphMap[i] >= _glyphs.size() && _glyphMap[i] != 254)
+ _glyphMap[i] = _missingGlyph;
+ }
+ }
// The French table at 0x46f1e0 adds circumflex vowels and moves the
// missing-character box to 155. Glyphs 153/154 are the CP1252 ligatures.
if (_glyphs.size() == 156) {
@@ -131,8 +140,8 @@ uint RunawayFont::glyphIndex(uint32 chr) const {
case 0x201e: return 92;
case '\'': return 90;
case '"': return 81;
- case 0x0152: return _glyphs.size() == 156 ? 153 : 149;
- case 0x0153: return _glyphs.size() == 156 ? 154 : 149;
+ case 0x0152: return _glyphs.size() == 156 ? 153 : _missingGlyph;
+ case 0x0153: return _glyphs.size() == 156 ? 154 : _missingGlyph;
}
if (chr < 128)
return _glyphMap[chr];
@@ -140,22 +149,22 @@ uint RunawayFont::glyphIndex(uint32 chr) const {
if (_characters[i] == chr)
return _glyphMap[i + 128];
}
- return _glyphs.size() - 1;
+ return _missingGlyph;
}
int RunawayFont::getCharWidth(uint32 chr) const {
const uint glyph = glyphIndex(chr);
- return glyph == 254 ? 8 : _glyphs[glyph].width;
+ return glyph == 254 ? 8 : glyph < _glyphs.size() ? _glyphs[glyph].width : 0;
}
int RunawayFont::getKerningOffset(uint32 left, uint32 right) const {
const uint a = glyphIndex(left), b = glyphIndex(right);
- return !left || !right || a == 254 || b == 254 ? 0 : _kerning[a * _glyphs.size() + b];
+ return !left || !right || a >= _glyphs.size() || b >= _glyphs.size() ? 0 : _kerning[a * _glyphs.size() + b];
}
void RunawayFont::drawChar(Graphics::Surface *dst, uint32 chr, int x, int y, uint32 color) const {
const uint index = glyphIndex(chr);
- if (index == 254 || dst->format.bytesPerPixel != 2)
+ if (index >= _glyphs.size() || dst->format.bytesPerPixel != 2)
return;
const Glyph &glyph = _glyphs[index];
const uint r = (color >> 11) & 31, g = (color >> 5) & 63, b = color & 31;
diff --git a/engines/hollywood/runaway/font.h b/engines/hollywood/runaway/font.h
index 0a85ceba181..822ec773648 100644
--- a/engines/hollywood/runaway/font.h
+++ b/engines/hollywood/runaway/font.h
@@ -47,6 +47,7 @@ private:
Common::Array<Glyph> _glyphs;
Common::Array<int8> _kerning;
byte _glyphMap[256];
+ byte _missingGlyph = 255;
Common::Array<byte> _pixels;
Common::U32String _characters;
};
diff --git a/engines/hollywood/runaway/strings.cpp b/engines/hollywood/runaway/strings.cpp
index 7f0526e0cc8..98d2a7321af 100644
--- a/engines/hollywood/runaway/strings.cpp
+++ b/engines/hollywood/runaway/strings.cpp
@@ -25,78 +25,78 @@
namespace Hollywood {
namespace {
-// German and French executable interface labels, stored as UTF-8.
-const char *const kText[RunawayStrings::kTextCount][2] = {
- {"BETRACHTE ", "REGARDER "},
- {"NIMM ", "PRENDRE "},
- {"BENUTZE ", "UTILISER "},
- {"VERSTAUE ", "DEPOSER "},
- {" MIT ", " AVEC "},
- {"INVENTAR", "INVENTAIRE"},
- {"WEITERSPIELEN", "CONTINUER LA PARTIE"},
- {"\303\226FFNE ", "OUVRIR "},
- {"SCHLIESSE ", "FERMER "},
- {"VERSCHIEBE ", "DEPLACER "},
- {"SIEH AUS DEM ", "REGARDER A TRAVERS "},
- {"BENUTZE DAS ", "APPELER AVEC "},
- {"NIMM ETWAS AUS DEM ", "PRENDRE QUELQUE CHOSE DANS "},
- {"ZIEHE DEN STECKER DER K\303\234HLTRUHE HERAUS", "DEBRANCHER CONGELATEUR"},
- {"HEMD", "CHEMISE"},
- {"PUTZLAPPEN", "PEAU DE CHAMOIS HUMIDE"},
- {"SCHMUTZLAPPEN", "PEAU DE CHAMOIS SALE"}
+// German, French and Spanish executable interface labels, stored as UTF-8.
+const char *const kText[RunawayStrings::kTextCount][3] = {
+ {"BETRACHTE ", "REGARDER ", "MIRAR "},
+ {"NIMM ", "PRENDRE ", "COGER "},
+ {"BENUTZE ", "UTILISER ", "USAR "},
+ {"VERSTAUE ", "DEPOSER ", "DEJAR "},
+ {" MIT ", " AVEC ", " CON "},
+ {"INVENTAR", "INVENTAIRE", "INVENTARIO"},
+ {"WEITERSPIELEN", "CONTINUER LA PARTIE", "CONTINUAR JUEGO"},
+ {"\303\226FFNE ", "OUVRIR ", "ABRIR "},
+ {"SCHLIESSE ", "FERMER ", "CERRAR "},
+ {"VERSCHIEBE ", "DEPLACER ", "MOVER "},
+ {"SIEH AUS DEM ", "REGARDER A TRAVERS ", "MIRAR A TRAV\303\211S DE LA "},
+ {"BENUTZE DAS ", "APPELER AVEC ", "LLAMAR POR "},
+ {"NIMM ETWAS AUS DEM ", "PRENDRE QUELQUE CHOSE DANS ", "COGER ALGO DE LA "},
+ {"ZIEHE DEN STECKER DER K\303\234HLTRUHE HERAUS", "DEBRANCHER CONGELATEUR", "DESENCHUFAR CONGELADOR"},
+ {"HEMD", "CHEMISE", "CAMISA"},
+ {"PUTZLAPPEN", "PEAU DE CHAMOIS HUMIDE", "GAMUZA HUMEDECIDA"},
+ {"SCHMUTZLAPPEN", "PEAU DE CHAMOIS SALE", "GAMUZA MUGRIENTA"}
};
-const char *const kItemNames[][2] = {
- {"", ""},
- {"LEDERLAPPEN", "PEAU DE CHAMOIS"},
- {"BRECHSTANGE", "PIED DE BICHE"},
- {"SPR\303\234HREINIGER", "PRODUIT NETTOYANT"},
- {"PACKUNG BUTTER", "TABLETTE DE BEURRE"},
- {"SPRENGAUSR\303\234STUNG", "DYNAMITE ET DETONATEUR"},
- {"HELM AUS DEM ZWEITEN WELTKRIEG", "CASQUE DE LA SECONDE GUERRE MONDIALE"},
- {"SCHRAUBE", "VIS"},
- {"GARDEROBENKNAUF", "PORTE-MANTEAUX"},
- {"TABLETTE", "PILLULE"},
- {"LIPPENSTIFT", "ROUGE A LEVRES"},
- {"HAUFEN LIPPENSTIFTE", "STOCK DE ROUGE A LEVRES"},
- {"SONNEN\303\226L", "HUILE SOLAIRE"},
- {"WALKIE-TALKIE", "TALKIE-WALKIE"},
- {"MUNITIONSSTREIFEN", "BANDE DE MUNITIONS"},
- {"BASKETBALL", "BALLON DE BASKET"},
- {"SATTLERNADEL UND FADEN", "FIL A COUDRE ET AIGUILLE"},
- {"BEHELFS-BOHRER", "TOURNEVIS ARTISANAL"},
- {"SACK GESCH\303\204LTER ERDN\303\234SSE", "SAC DE CACAHOUETES ENTIERES"},
- {"GLAS ERDNUSSBUTTER", "POT DE BEURRE DE CACAHOUETES"},
- {"SONNENBRILLE", "LUNETTES DE SOLEIL"},
- {"FUSSRASTE", "REPOSE-PIED DE MOTO"},
- {"HANDSTAUBSAUGER", "ASPIRATEUR A MAIN"},
- {"PLAN", "PLAN GENIAL"},
- {"BLASEBALG", "SOUFFLET"},
- {"EIMER", "SEAU"},
- {"SCHL\303\234SSEL", "CLE DU REFRIGERATEUR"}
+const char *const kItemNames[][3] = {
+ {"", "", ""},
+ {"LEDERLAPPEN", "PEAU DE CHAMOIS", "GAMUZA"},
+ {"BRECHSTANGE", "PIED DE BICHE", "PALANCA"},
+ {"SPR\303\234HREINIGER", "PRODUIT NETTOYANT", "BOTE DE LIMPIEZA"},
+ {"PACKUNG BUTTER", "TABLETTE DE BEURRE", "PAQUETE DE MANTEQUILLA"},
+ {"SPRENGAUSR\303\234STUNG", "DYNAMITE ET DETONATEUR", "EQUIPO DE DINAMITERO"},
+ {"HELM AUS DEM ZWEITEN WELTKRIEG", "CASQUE DE LA SECONDE GUERRE MONDIALE", "CASCO DE LA SEGUNDA GUERRA MUNDIAL"},
+ {"SCHRAUBE", "VIS", "TORNILLO"},
+ {"GARDEROBENKNAUF", "PORTE-MANTEAUX", "POMO DEL PERCHERO"},
+ {"TABLETTE", "PILLULE", "PASTILLA"},
+ {"LIPPENSTIFT", "ROUGE A LEVRES", "PINTALABIOS"},
+ {"HAUFEN LIPPENSTIFTE", "STOCK DE ROUGE A LEVRES", "MONT\303\223N DE PINTALABIOS"},
+ {"SONNEN\303\226L", "HUILE SOLAIRE", "ACEITE BRONCEADOR"},
+ {"WALKIE-TALKIE", "TALKIE-WALKIE", "WALKIE TALKIE"},
+ {"MUNITIONSSTREIFEN", "BANDE DE MUNITIONS", "RISTRA DE BALAS"},
+ {"BASKETBALL", "BALLON DE BASKET", "BAL\303\223N DE BALONCESTO"},
+ {"SATTLERNADEL UND FADEN", "FIL A COUDRE ET AIGUILLE", "AGUJA Y ROLLO DE HILO DE ZAPATERO"},
+ {"BEHELFS-BOHRER", "TOURNEVIS ARTISANAL", "SACACORCHOS IMPROVISADO"},
+ {"SACK GESCH\303\204LTER ERDN\303\234SSE", "SAC DE CACAHOUETES ENTIERES", "SAQUITO DE CACAHUETES PELADOS"},
+ {"GLAS ERDNUSSBUTTER", "POT DE BEURRE DE CACAHOUETES", "TARRO DE MANTEQUILLA DE CACAHUETE"},
+ {"SONNENBRILLE", "LUNETTES DE SOLEIL", "GAFAS DE SOL"},
+ {"FUSSRASTE", "REPOSE-PIED DE MOTO", "ESTRIBO DE LA MOTO"},
+ {"HANDSTAUBSAUGER", "ASPIRATEUR A MAIN", "ASPIRADORA DE MANO"},
+ {"PLAN", "PLAN GENIAL", "PLAN"},
+ {"BLASEBALG", "SOUFFLET", "FUELLE"},
+ {"EIMER", "SEAU", "CUBO"},
+ {"SCHL\303\234SSEL", "CLE DU REFRIGERATEUR", "LLAVE"}
};
-const char *const kShackHotspotNames[][2] = {
- {"", ""},
- {"T\303\234R", "PORTE"},
- {"SPALT", "ORIFICE"},
- {"FENSTER", "FENETRE"},
- {"FENSTER", "PETITE FENETRE"},
- {"HOLZST\303\234CK", "MORCEAU DE BOIS ROND"},
- {"FALLT\303\234R", "TRAPPE"},
- {"STOFFFETZEN", "TISSU DECHIRE"},
- {"K\303\234HLTRUHE", "CONGELATEUR"},
- {"FETZEN", "CHIFFON"},
- {"STECKER", "PRISE ELECTRIQUE"},
- {"ABFLUSS", "TUYAU DE VIDANGE DU CONGELATEUR"},
- {"TELEFON", "TELEPHONE"},
- {"REGAL", "ETAGERES"},
- {"BRECHSTANGE", "PIED-DE-BICHE"},
- {"BRILLENRESTE", "LUNETTES CASSEES"},
- {"BLASEBALG", "SOUFFLET"},
- {"DOSE", "BOUTEILLE"},
- {"K\303\234HLTRUHENDECKEL", "COUVERCLE DU CONGELATEUR"},
- {"ABFLUSS", "TUYAU DE VIDANGE DU CONGELATEUR"}
+const char *const kShackHotspotNames[][3] = {
+ {"", "", ""},
+ {"T\303\234R", "PORTE", "PUERTA"},
+ {"SPALT", "ORIFICE", "RENDIJA"},
+ {"FENSTER", "FENETRE", "VENTANA"},
+ {"FENSTER", "PETITE FENETRE", "VENTANA PEQUE\303\221A"},
+ {"HOLZST\303\234CK", "MORCEAU DE BOIS ROND", "TROZO REDONDO DE MADERA"},
+ {"FALLT\303\234R", "TRAPPE", "TRAMPILLA"},
+ {"STOFFFETZEN", "TISSU DECHIRE", "TELA HECHA JIRONES"},
+ {"K\303\234HLTRUHE", "CONGELATEUR", "CONGELADOR"},
+ {"FETZEN", "CHIFFON", "TRAPO"},
+ {"STECKER", "PRISE ELECTRIQUE", "ENCHUFE"},
+ {"ABFLUSS", "TUYAU DE VIDANGE DU CONGELATEUR", "DESAG\303\234E DEL CONGELADOR"},
+ {"TELEFON", "TELEPHONE", "TEL\303\211FONO"},
+ {"REGAL", "ETAGERES", "ESTANTER\303\215A"},
+ {"BRECHSTANGE", "PIED-DE-BICHE", "PALANCA"},
+ {"BRILLENRESTE", "LUNETTES CASSEES", "GAFAS ROTAS"},
+ {"BLASEBALG", "SOUFFLET", "FUELLE"},
+ {"DOSE", "BOUTEILLE", "BOTE"},
+ {"K\303\234HLTRUHENDECKEL", "COUVERCLE DU CONGELATEUR", "TAPA DEL CONGELADOR"},
+ {"ABFLUSS", "TUYAU DE VIDANGE DU CONGELATEUR", "DESAG\303\234E DEL CONGELADOR"}
};
} // End of anonymous namespace
diff --git a/engines/hollywood/runaway/strings.h b/engines/hollywood/runaway/strings.h
index aefd1a4df24..c60f5e376d3 100644
--- a/engines/hollywood/runaway/strings.h
+++ b/engines/hollywood/runaway/strings.h
@@ -36,7 +36,8 @@ public:
kOpen, kClose, kMove, kLookThrough, kUsePhone, kTakeFromShelf,
kUnplugCooler, kShirt, kWetCloth, kDirtyCloth, kTextCount
};
- explicit RunawayStrings(Common::Language language) : _languageIndex(language == Common::FR_FRA ? 1 : 0) {}
+ explicit RunawayStrings(Common::Language language) :
+ _languageIndex(language == Common::FR_FRA ? 1 : language == Common::ES_ESP ? 2 : 0) {}
Common::U32String text(TextId id) const;
Common::U32String itemName(byte item) const;
Common::U32String shackHotspotName(byte hotspot) const;
Commit: e9c21547286da57c5d188b706c92588a34d46633
https://github.com/scummvm/scummvm/commit/e9c21547286da57c5d188b706c92588a34d46633
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-10-27T11:28:15+01:00
Commit Message:
HOLLYWOOD: add missing sounds for runaway demo
Changed paths:
engines/hollywood/runaway/engine.cpp
engines/hollywood/runaway/ui.cpp
engines/hollywood/runaway/ui.h
diff --git a/engines/hollywood/runaway/engine.cpp b/engines/hollywood/runaway/engine.cpp
index 3f50d2efd84..186b8fd887c 100644
--- a/engines/hollywood/runaway/engine.cpp
+++ b/engines/hollywood/runaway/engine.cpp
@@ -120,7 +120,7 @@ Common::Error RunawayEngine::run() {
const RunawayStrings strings(_language);
RunawayInventory inventory(strings);
RunawayScene5030 scene(_mixer, inventory, strings);
- RunawayUI ui(inventory, strings);
+ RunawayUI ui(_mixer, inventory, strings);
if (!scene.load() || !ui.load())
return Common::Error(Common::kReadingFailed, "Cannot load the Runaway demo room, actor or interface data");
scene.start(getTotalPlayTime());
diff --git a/engines/hollywood/runaway/ui.cpp b/engines/hollywood/runaway/ui.cpp
index aed1dc1b183..d0db338cbf1 100644
--- a/engines/hollywood/runaway/ui.cpp
+++ b/engines/hollywood/runaway/ui.cpp
@@ -71,7 +71,7 @@ bool RunawayUI::loadSurface(uint chunk, int width, int height, Graphics::Managed
bool RunawayUI::load() {
Common::Array<byte> animation;
if (!_font.load() || !loadSurface(114, 904, 540, _cursors) ||
- !loadSurface(118, 48, 48, _waitCursor) || !loadSurface(121, 80, 42 * 80, _icons) ||
+ !loadSurface(118, 48, 48, _demoLogo) || !loadSurface(121, 80, 42 * 80, _icons) ||
!loadSurface(127, 700, 74, _inventoryButton) || !loadSurface(129, 700, 74, _returnButton) ||
!loadSurface(131, 1024, 600, _inventoryBackground) || !loadSurface(133, 768, 576, _inventoryTexture) ||
!readRunawayGlobalChunk(137, animation) || !_portrait.load(animation, 104) ||
@@ -160,6 +160,13 @@ void RunawayUI::update(uint32 now, Common::Point mouse, byte roomHotspot, bool b
setInventoryOpen(true);
_pickupItem = added;
_pickupStarted = now;
+ _pickupSoundPlayed = false;
+ }
+ // Native 0x40d390 plays S03 cue 1 when the twelfth pickup frame
+ // reveals the item in its inventory slot.
+ if (_pickupItem && !_pickupSoundPlayed && now - _pickupStarted >= 12 * 60) {
+ _audio.playEffect(1);
+ _pickupSoundPlayed = true;
}
if (_pickupItem && now - _pickupStarted >= 18 * 60) {
_pickupItem = 0;
@@ -263,6 +270,11 @@ RunawayUI::Command RunawayUI::click(bool right) {
void RunawayUI::updateCursor() {
const bool waiting = _blocked || _speaking || busy();
+ // Native 0x411990 hides the cursor during actions and dialogue.
+ // RESOURCE.000 chunk 118 is the corner logo, not a busy cursor.
+ CursorMan.showMouse(!waiting);
+ if (waiting)
+ return;
const byte item = _inventory.selected();
uint tile = _verb;
uint shade = 0;
@@ -279,22 +291,19 @@ void RunawayUI::updateCursor() {
shade = pulse[(_now / 50) % ARRAYSIZE(pulse)];
}
}
- const int key = waiting ? -2 : tile * 10 + shade;
+ const int key = tile * 10 + shade;
if (key == _cursorKey)
return;
_cursorKey = key;
const uint16 transparent = *(const uint16 *)_cursors.getPixels();
_cursor.fillRect(Common::Rect(0, 0, 60, 60), transparent);
- const Graphics::ManagedSurface &source = waiting ? _waitCursor : _cursors;
- const uint16 sourceKey = *(const uint16 *)source.getPixels();
- const uint width = waiting ? 48 : 60;
- const uint sx = waiting ? 0 : (tile % 15) * 60;
- const uint sy = waiting ? 0 : (tile / 15) * 60;
- for (uint y = 0; y < width; ++y) {
- const uint16 *src = (const uint16 *)source.getBasePtr(sx, sy + y);
- uint16 *dst = (uint16 *)_cursor.getBasePtr(waiting ? 6 : 0, y + (waiting ? 6 : 0));
- for (uint x = 0; x < width; ++x) {
- if (src[x] == sourceKey)
+ const uint sx = (tile % 15) * 60;
+ const uint sy = (tile / 15) * 60;
+ for (uint y = 0; y < 60; ++y) {
+ const uint16 *src = (const uint16 *)_cursors.getBasePtr(sx, sy + y);
+ uint16 *dst = (uint16 *)_cursor.getBasePtr(0, y);
+ for (uint x = 0; x < 60; ++x) {
+ if (src[x] == transparent)
continue;
const uint r = (src[x] >> 11) & 31, g = (src[x] >> 5) & 63, b = src[x] & 31;
dst[x] = ((r * (31 - shade) / 31) << 11) |
@@ -366,18 +375,20 @@ void RunawayUI::draw(Graphics::ManagedSurface &screen, const Common::U32String &
_font.drawString(screen.surfacePtr(), lines[i], 20, 684 + i * 28, 984,
kUIFormat.RGBToColor(255, 223, 206), Graphics::kTextAlignCenter);
}
- return;
- }
- Common::U32String caption;
- uint16 color = kUIFormat.RGBToColor(189, 166, 148);
- if (!_inventoryOpen && !committedCaption.empty()) {
- caption = committedCaption;
- color = kUIFormat.RGBToColor(255, 223, 206);
- } else if (!_blocked && !busy()) {
- caption = overButton() ? _strings.text(_inventoryOpen ? RunawayStrings::kResume : RunawayStrings::kInventory) :
- _inventoryOpen ? inventoryCaption() : roomCaption;
+ } else {
+ Common::U32String caption;
+ uint16 color = kUIFormat.RGBToColor(189, 166, 148);
+ if (!_inventoryOpen && !committedCaption.empty()) {
+ caption = committedCaption;
+ color = kUIFormat.RGBToColor(255, 223, 206);
+ } else if (!_blocked && !busy()) {
+ caption = overButton() ? _strings.text(_inventoryOpen ? RunawayStrings::kResume : RunawayStrings::kInventory) :
+ _inventoryOpen ? inventoryCaption() : roomCaption;
+ }
+ _font.drawString(screen.surfacePtr(), caption, 20, 684, 984, color, Graphics::kTextAlignCenter);
}
- _font.drawString(screen.surfacePtr(), caption, 20, 684, 984, color, Graphics::kTextAlignCenter);
+ // Native 0x4020b0 copies the demo logo to the bottom-right corner.
+ screen.copyRectToSurface(_demoLogo, 976, 720, Common::Rect(0, 0, 48, 48));
}
} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/ui.h b/engines/hollywood/runaway/ui.h
index bb006112bc9..a42b5b1e52f 100644
--- a/engines/hollywood/runaway/ui.h
+++ b/engines/hollywood/runaway/ui.h
@@ -23,6 +23,7 @@
#define HOLLYWOOD_RUNAWAY_UI_H
#include "common/random.h"
+#include "hollywood/runaway/audio.h"
#include "hollywood/runaway/font.h"
#include "hollywood/runaway/graphics.h"
#include "hollywood/runaway/inventory.h"
@@ -38,8 +39,8 @@ public:
Common::Point mouse;
byte item = 0, target = 0;
};
- RunawayUI(RunawayInventory &inventory, const RunawayStrings &strings) :
- _inventory(inventory), _strings(strings), _random("runaway-ui") {}
+ RunawayUI(Audio::Mixer *mixer, RunawayInventory &inventory, const RunawayStrings &strings) :
+ _audio(mixer), _inventory(inventory), _strings(strings), _random("runaway-ui") {}
~RunawayUI();
bool load();
void update(uint32 now, Common::Point mouse, byte roomHotspot, bool blocked, bool speaking);
@@ -65,17 +66,19 @@ private:
Common::U32String inventoryCaption() const;
void drawInventory(Graphics::ManagedSurface &screen);
+ RunawayAudio _audio;
RunawayInventory &_inventory;
const RunawayStrings &_strings;
Common::RandomSource _random;
RunawayFont _font;
- Graphics::ManagedSurface _cursors, _waitCursor, _cursor, _inventoryButton, _returnButton;
+ Graphics::ManagedSurface _cursors, _demoLogo, _cursor, _inventoryButton, _returnButton;
Graphics::ManagedSurface _inventoryBackground, _inventoryTexture, _icons;
RunawayAnimation _portrait, _idlePortrait;
Common::Point _mouse;
RunawayVerb _verb = kVerbWalk, _previousVerb = kVerbWalk;
byte _hovered = 0, _buttonFrame = 0, _pickupItem = 0;
bool _inventoryOpen = false, _enteredInventory = false, _returnAfterPickup = false;
+ bool _pickupSoundPlayed = false;
bool _blocked = false, _speaking = false, _cursorPushed = false;
uint32 _now = 0, _buttonTick = 0, _verbStarted = 0, _portraitTick = 0;
uint32 _blinkUntil = 0, _idleStarted = 0, _lastInteraction = 0, _pickupStarted = 0;
Commit: c982217b147747b6ad2eaf1e906941c976b654ba
https://github.com/scummvm/scummvm/commit/c982217b147747b6ad2eaf1e906941c976b654ba
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-10-27T11:28:15+01:00
Commit Message:
HOLLYWOOD: initial menu implementation for the runaway demo
Changed paths:
A engines/hollywood/runaway/menu.cpp
A engines/hollywood/runaway/menu.h
engines/hollywood/module.mk
engines/hollywood/runaway/engine.cpp
engines/hollywood/runaway/engine.h
engines/hollywood/runaway/font.cpp
engines/hollywood/runaway/font.h
engines/hollywood/runaway/graphics.cpp
engines/hollywood/runaway/graphics.h
engines/hollywood/runaway/scene5030.cpp
engines/hollywood/runaway/strings.cpp
engines/hollywood/runaway/strings.h
engines/hollywood/runaway/ui.cpp
engines/hollywood/runaway/ui.h
diff --git a/engines/hollywood/module.mk b/engines/hollywood/module.mk
index 97adf1f8a6b..7870cd9a954 100644
--- a/engines/hollywood/module.mk
+++ b/engines/hollywood/module.mk
@@ -142,6 +142,7 @@ MODULE_OBJS = \
runaway/graphics.o \
runaway/intro.o \
runaway/inventory.o \
+ runaway/menu.o \
runaway/scene5030.o \
runaway/strings.o \
runaway/ui.o
diff --git a/engines/hollywood/runaway/engine.cpp b/engines/hollywood/runaway/engine.cpp
index 186b8fd887c..e48b963462b 100644
--- a/engines/hollywood/runaway/engine.cpp
+++ b/engines/hollywood/runaway/engine.cpp
@@ -34,6 +34,7 @@
#include "hollywood/runaway/engine.h"
#include "hollywood/runaway/intro.h"
+#include "hollywood/runaway/menu.h"
#include "hollywood/runaway/scene5030.h"
#include "hollywood/runaway/strings.h"
#include "hollywood/runaway/ui.h"
@@ -49,7 +50,8 @@ enum RunawayAction {
kCancelAction,
kSkip,
kToggleInventory,
- kCycleAction
+ kCycleAction,
+ kPauseMenu
};
} // End of anonymous namespace
@@ -121,7 +123,8 @@ Common::Error RunawayEngine::run() {
RunawayInventory inventory(strings);
RunawayScene5030 scene(_mixer, inventory, strings);
RunawayUI ui(_mixer, inventory, strings);
- if (!scene.load() || !ui.load())
+ RunawayMenu menu(strings);
+ if (!scene.load() || !ui.load() || !menu.load())
return Common::Error(Common::kReadingFailed, "Cannot load the Runaway demo room, actor or interface data");
scene.start(getTotalPlayTime());
CursorMan.showMouse(true);
@@ -132,12 +135,16 @@ Common::Error RunawayEngine::run() {
const uint32 now = getTotalPlayTime();
Common::Point mouse = _eventMan->getMousePos();
ui.update(now, mouse, scene.hotspotAt(mouse), scene.busy(), scene.speaking());
+ bool openMenu = false;
Common::Event event;
- while (_eventMan->pollEvent(event)) {
+ while (!openMenu && _eventMan->pollEvent(event)) {
if (event.type == Common::EVENT_LBUTTONDOWN || event.type == Common::EVENT_RBUTTONDOWN) {
ui.update(now, event.mouse, scene.hotspotAt(event.mouse), scene.busy(), scene.speaking());
const RunawayUI::Command command = ui.click(event.type == Common::EVENT_RBUTTONDOWN);
switch (command.type) {
+ case RunawayUI::Command::kOpenMenu:
+ openMenu = true;
+ break;
case RunawayUI::Command::kRoom:
scene.click(command.mouse, command.verb, command.item);
break;
@@ -158,6 +165,9 @@ Common::Error RunawayEngine::run() {
ui.update(now, mouse, scene.hotspotAt(mouse), scene.busy(), scene.speaking());
const bool pressed = event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_START;
switch (event.customType) {
+ case kPauseMenu:
+ openMenu = pressed;
+ break;
case kScrollLeft:
leftPressed = pressed;
break;
@@ -176,8 +186,8 @@ Common::Error RunawayEngine::run() {
if (pressed) {
if (scene.speaking())
scene.skipSpeech();
- else if (!ui.cancel() && !scene.busy())
- scene.cancelWalk();
+ else if (!ui.cancel())
+ openMenu = true;
}
break;
case kToggleInventory:
@@ -197,6 +207,13 @@ Common::Error RunawayEngine::run() {
}
if (shouldQuit())
break;
+ if (openMenu) {
+ pauseMenu(menu, scene.screen());
+ leftPressed = rightPressed = false;
+ // Refresh the engine clock and redraw the room after resuming.
+ // The input which closed the menu must not reach a room action.
+ continue;
+ }
int direction = (int)rightPressed - (int)leftPressed;
mouse = _eventMan->getMousePos();
if (!direction && mouse.y >= RunawayScene5030::kRoomTop && mouse.y < RunawayScene5030::kRoomTop + RunawayScene5030::kRoomHeight) {
@@ -221,6 +238,83 @@ Common::Error RunawayEngine::run() {
return Common::kNoError;
}
+void RunawayEngine::pauseMenu(RunawayMenu &menu, Graphics::ManagedSurface &screen) {
+ // PauseToken freezes the mixer and excludes menu time from the scene/UI
+ // clocks, including walking, speech deadlines and pickup sound cues.
+ PauseToken pauseToken = pauseEngine();
+ RunawayMenu::Settings settings;
+ settings.music = !ConfMan.getBool("music_mute");
+ settings.subtitles = !ConfMan.hasKey("subtitles") || ConfMan.getBool("subtitles");
+ settings.volume = MAX(ConfMan.getInt("music_volume"), MAX(ConfMan.getInt("sfx_volume"), ConfMan.getInt("speech_volume")));
+ menu.open(screen, settings);
+ menu.update(_eventMan->getMousePos());
+ bool finished = false, changed = false;
+ while (!shouldQuit() && !finished) {
+ Common::Event event;
+ while (!finished && _eventMan->pollEvent(event)) {
+ RunawayMenu::Command command = RunawayMenu::kNone;
+ if (event.type == Common::EVENT_MOUSEMOVE) {
+ command = menu.update(event.mouse);
+ } else if (event.type == Common::EVENT_LBUTTONDOWN || event.type == Common::EVENT_RBUTTONDOWN) {
+ menu.update(event.mouse);
+ command = menu.click(event.type == Common::EVENT_RBUTTONDOWN);
+ } else if (event.type == Common::EVENT_LBUTTONUP) {
+ command = menu.update(event.mouse);
+ menu.release();
+ } else if (event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_START) {
+ switch (event.customType) {
+ case kPauseMenu:
+ case kCancelAction:
+ case kSkip:
+ command = menu.cancel();
+ break;
+ case kScrollLeft:
+ command = menu.adjustVolume(-8);
+ break;
+ case kScrollRight:
+ command = menu.adjustVolume(8);
+ break;
+ default:
+ break;
+ }
+ } else if (event.type == Common::EVENT_KEYDOWN && !event.kbdRepeat) {
+ command = menu.key(event.kbd.ascii);
+ } else if (event.type == Common::EVENT_WHEELUP || event.type == Common::EVENT_WHEELDOWN) {
+ command = menu.adjustVolume(event.type == Common::EVENT_WHEELUP ? 8 : -8);
+ }
+ const RunawayMenu::Settings ¤t = menu.settings();
+ if (settings.music != current.music || settings.subtitles != current.subtitles || settings.volume != current.volume) {
+ ConfMan.setBool("music_mute", !current.music);
+ ConfMan.setBool("subtitles", current.subtitles);
+ // Preserve independently configured channel volumes unless the
+ // player actually moves the original master-volume control.
+ if (settings.volume != current.volume) {
+ ConfMan.setInt("music_volume", current.volume);
+ ConfMan.setInt("sfx_volume", current.volume);
+ ConfMan.setInt("speech_volume", current.volume);
+ }
+ settings = current;
+ syncSoundSettings();
+ changed = true;
+ }
+ if (command == RunawayMenu::kResume || command == RunawayMenu::kQuit) {
+ if (command == RunawayMenu::kQuit)
+ quitGame();
+ finished = true;
+ }
+ }
+ if (finished || shouldQuit())
+ break;
+ menu.draw(screen);
+ _system->copyRectToScreen(screen.getPixels(), screen.pitch, 0, 0, screen.w, screen.h);
+ _system->updateScreen();
+ _system->delayMillis(16);
+ }
+ menu.close();
+ if (changed)
+ ConfMan.flushToDisk();
+}
+
Common::Array<Common::Keymap *> RunawayEngine::initKeymaps() {
using namespace Common;
Keymap *keymap = new Keymap(Keymap::kKeymapTypeGame, "runaway", "Runaway: A Road Adventure");
@@ -259,12 +353,12 @@ Common::Array<Common::Keymap *> RunawayEngine::initKeymaps() {
keymap->addAction(action);
action = new Action(kStandardActionOpenMainMenu, _("Game menu"));
- action->setEvent(EVENT_MAINMENU);
+ action->setCustomEngineActionEvent(kPauseMenu);
action->addDefaultInputMapping("F5");
action->addDefaultInputMapping("JOY_START");
keymap->addAction(action);
- action = new Action("CANCEL_ACTION", _("Cancel action"));
+ action = new Action("CANCEL_ACTION", _("Cancel action / Menu"));
action->setCustomEngineActionEvent(kCancelAction);
action->addDefaultInputMapping("ESCAPE");
keymap->addAction(action);
diff --git a/engines/hollywood/runaway/engine.h b/engines/hollywood/runaway/engine.h
index 618081996c0..3c083338c92 100644
--- a/engines/hollywood/runaway/engine.h
+++ b/engines/hollywood/runaway/engine.h
@@ -30,8 +30,14 @@ namespace Common {
class Keymap;
}
+namespace Graphics {
+class ManagedSurface;
+}
+
namespace Hollywood {
+class RunawayMenu;
+
// Runaway shares the archive and text formats with Hollywood Monsters, but
// has its own RGB565 renderer, scene state and audio formats.
class RunawayEngine : public Engine {
@@ -47,6 +53,7 @@ public:
private:
Common::Error playIntro();
+ void pauseMenu(RunawayMenu &menu, Graphics::ManagedSurface &screen);
Common::Language _language;
};
diff --git a/engines/hollywood/runaway/font.cpp b/engines/hollywood/runaway/font.cpp
index 7b1f75cc645..16143538fc3 100644
--- a/engines/hollywood/runaway/font.cpp
+++ b/engines/hollywood/runaway/font.cpp
@@ -52,9 +52,10 @@ const byte kGlyphMap[256] = {
} // End of anonymous namespace
-bool RunawayFont::load() {
+bool RunawayFont::load(bool menuFont) {
Common::Array<byte> metrics;
- if (!readRunawayGlobalChunk(125, _pixels) || !readRunawayGlobalChunk(126, metrics) ||
+ if (!readRunawayGlobalChunk(menuFont ? 148 : 125, _pixels) ||
+ !readRunawayGlobalChunk(menuFont ? 149 : 126, metrics) ||
(metrics.size() != 119 * 5 && metrics.size() != 150 * 5 && metrics.size() != 156 * 5))
return false;
_glyphs.resize(metrics.size() / 5);
diff --git a/engines/hollywood/runaway/font.h b/engines/hollywood/runaway/font.h
index 822ec773648..c811ac27ced 100644
--- a/engines/hollywood/runaway/font.h
+++ b/engines/hollywood/runaway/font.h
@@ -31,7 +31,7 @@ namespace Hollywood {
// RESOURCE.000 stores antialiased glyphs, including their contour masks.
class RunawayFont : public Graphics::Font {
public:
- bool load();
+ bool load(bool menuFont = false);
int getFontHeight() const override { return 28; }
int getMaxCharWidth() const override { return 28; }
int getCharWidth(uint32 chr) const override;
diff --git a/engines/hollywood/runaway/graphics.cpp b/engines/hollywood/runaway/graphics.cpp
index 3776d0e2526..8a5b0d57bd6 100644
--- a/engines/hollywood/runaway/graphics.cpp
+++ b/engines/hollywood/runaway/graphics.cpp
@@ -28,6 +28,19 @@
namespace Hollywood {
+bool loadRunawaySurface(uint chunk, int width, int height, Graphics::ManagedSurface &surface) {
+ Common::Array<byte> pixels;
+ if (!readRunawayGlobalChunk(chunk, pixels) || pixels.size() != (uint)(width * height * 2))
+ return false;
+ surface.create(width, height, Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0));
+ for (int y = 0; y < height; ++y) {
+ uint16 *out = (uint16 *)surface.getBasePtr(0, y);
+ for (int x = 0; x < width; ++x)
+ out[x] = READ_LE_UINT16(pixels.data() + (y * width + x) * 2);
+ }
+ return true;
+}
+
bool RunawayAnimation::load(ChunkArchive &archive, uint chunk, uint frames) {
_frames = 0;
return archive.readVariableChunk(chunk, _data) && validate(frames);
diff --git a/engines/hollywood/runaway/graphics.h b/engines/hollywood/runaway/graphics.h
index 96da87e853c..c0415099ddb 100644
--- a/engines/hollywood/runaway/graphics.h
+++ b/engines/hollywood/runaway/graphics.h
@@ -32,6 +32,7 @@ class ChunkArchive;
// RESOURCE.000 has a ten-byte header followed by two 500-entry tables.
bool readRunawayGlobalChunk(uint chunk, Common::Array<byte> &data);
+bool loadRunawaySurface(uint chunk, int width, int height, Graphics::ManagedSurface &surface);
enum {
kRunawayScreenWidth = 1024,
diff --git a/engines/hollywood/runaway/menu.cpp b/engines/hollywood/runaway/menu.cpp
new file mode 100644
index 00000000000..cf23b732eec
--- /dev/null
+++ b/engines/hollywood/runaway/menu.cpp
@@ -0,0 +1,270 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/util.h"
+#include "graphics/cursorman.h"
+#include "hollywood/runaway/menu.h"
+
+namespace Hollywood {
+namespace {
+
+const Graphics::PixelFormat kMenuFormat(2, 5, 6, 5, 0, 11, 5, 0, 0);
+const uint16 kNormal = 0xbd32;
+const uint16 kHighlight = 0xff19;
+const uint16 kDisabled = 0x6b4d;
+Common::Rect returnRect() {
+ return Common::Rect(612, 0, 712, 74);
+}
+
+} // End of anonymous namespace
+
+RunawayMenu::~RunawayMenu() {
+ close();
+}
+
+bool RunawayMenu::load() {
+ Graphics::ManagedSurface cursors;
+ if (!_font.load(true) || !_captionFont.load() ||
+ !loadRunawaySurface(132, 1024, 600, _background) ||
+ !loadRunawaySurface(130, 700, 74, _returnButton) ||
+ !loadRunawaySurface(118, 48, 48, _logo) || !loadRunawaySurface(114, 904, 540, cursors))
+ return false;
+ _cursor.create(60, 60, kMenuFormat);
+ _cursor.copyRectToSurface(cursors, 0, 0, Common::Rect(60, 60));
+ _thumbnail.create(204, 120, kMenuFormat);
+ return true;
+}
+
+void RunawayMenu::open(const Graphics::ManagedSurface &screen, const Settings &settings) {
+ close();
+ _settings = settings;
+ _settings.volume = CLIP(_settings.volume, 0, 256);
+ _confirmQuit = _dragging = false;
+ // The original options screen samples every fifth room pixel.
+ for (int y = 0; y < _thumbnail.h; ++y) {
+ uint16 *dst = (uint16 *)_thumbnail.getBasePtr(0, y);
+ const uint16 *src = (const uint16 *)screen.getBasePtr(0, kRunawayViewportTop + y * 5);
+ for (int x = 0; x < _thumbnail.w; ++x)
+ dst[x] = src[x * 5];
+ }
+ const uint16 key = *(const uint16 *)_cursor.getPixels();
+ CursorMan.pushCursor(_cursor.getPixels(), 60, 60, 30, 30, key, false, &kMenuFormat);
+ _cursorPushed = true;
+ CursorMan.showMouse(true);
+}
+
+void RunawayMenu::close() {
+ if (_cursorPushed) {
+ CursorMan.popCursor();
+ _cursorPushed = false;
+ }
+ _dragging = false;
+}
+
+Common::Rect RunawayMenu::labelRect(RunawayStrings::TextId id, int center, int y) const {
+ const int width = _font.getStringWidth(_strings.text(id));
+ return Common::Rect(center - width / 2 - 10, y, center + (width + 1) / 2 + 10, y + 28);
+}
+
+Common::U32String RunawayMenu::confirmation() const {
+ Common::U32String text = _strings.text(RunawayStrings::kConfirmQuit);
+ text += U" [ ";
+ text += _strings.text(RunawayStrings::kYes);
+ text += U" / ";
+ text += _strings.text(RunawayStrings::kNo);
+ text += U" ]";
+ return text;
+}
+
+Common::Rect RunawayMenu::answerRect(bool yes) const {
+ Common::U32String prefix = _strings.text(RunawayStrings::kConfirmQuit);
+ prefix += U" [ ";
+ if (!yes) {
+ prefix += _strings.text(RunawayStrings::kYes);
+ prefix += U" / ";
+ }
+ const int x = (1024 - _captionFont.getStringWidth(confirmation())) / 2 + _captionFont.getStringWidth(prefix);
+ return Common::Rect(x, 684, x + _captionFont.getStringWidth(_strings.text(yes ? RunawayStrings::kYes : RunawayStrings::kNo)), 712);
+}
+
+RunawayMenu::Control RunawayMenu::controlAt(Common::Point mouse) const {
+ if (_confirmQuit) {
+ if (answerRect(true).contains(mouse))
+ return kYes;
+ return answerRect(false).contains(mouse) ? kNo : kNoControl;
+ }
+ if (returnRect().contains(mouse) || labelRect(RunawayStrings::kPlay, 183, 460).contains(mouse))
+ return kPlay;
+ if (labelRect(RunawayStrings::kQuit, 183, 502).contains(mouse))
+ return kExit;
+ const int ys[] = {161, 329};
+ for (uint i = 0; i < ARRAYSIZE(ys); ++i) {
+ if (Common::Rect(716, ys[i], 846, ys[i] + 28).contains(mouse))
+ return i ? kSubtitlesOn : kMusicOn;
+ if (Common::Rect(855, ys[i], 995, ys[i] + 28).contains(mouse))
+ return i ? kSubtitlesOff : kMusicOff;
+ }
+ const int dx = mouse.x - 525, dy = mouse.y - 516;
+ if (dx * dx + dy * dy <= 52 * 52)
+ return kVolume;
+ return kNoControl;
+}
+
+RunawayMenu::Command RunawayMenu::update(Common::Point mouse) {
+ _mouse = mouse;
+ if (_dragging)
+ return adjustVolume(_dragVolume + (mouse.x - _dragX) * 2 - _settings.volume);
+ return kNone;
+}
+
+RunawayMenu::Command RunawayMenu::adjustVolume(int delta) {
+ if (_confirmQuit)
+ return kNone;
+ const int volume = CLIP(_settings.volume + delta, 0, 256);
+ if (volume == _settings.volume)
+ return kNone;
+ _settings.volume = volume;
+ return kSettingsChanged;
+}
+
+RunawayMenu::Command RunawayMenu::click(bool right) {
+ if (right)
+ return cancel();
+ switch (controlAt(_mouse)) {
+ case kPlay:
+ return kResume;
+ case kExit:
+ _confirmQuit = true;
+ _dragging = false;
+ return kNone;
+ case kMusicOn:
+ case kMusicOff:
+ _settings.music = controlAt(_mouse) == kMusicOn;
+ return kSettingsChanged;
+ case kSubtitlesOn:
+ case kSubtitlesOff:
+ _settings.subtitles = controlAt(_mouse) == kSubtitlesOn;
+ return kSettingsChanged;
+ case kVolume:
+ _dragging = true;
+ _dragX = _mouse.x;
+ _dragVolume = _settings.volume;
+ return kNone;
+ case kYes:
+ return kQuit;
+ case kNo:
+ return cancel();
+ default:
+ return kNone;
+ }
+}
+
+RunawayMenu::Command RunawayMenu::cancel() {
+ _dragging = false;
+ if (_confirmQuit) {
+ _confirmQuit = false;
+ return kNone;
+ }
+ return kResume;
+}
+
+RunawayMenu::Command RunawayMenu::key(uint32 ascii) {
+ if (ascii >= 'a' && ascii <= 'z')
+ ascii -= 'a' - 'A';
+ if (_confirmQuit) {
+ if (ascii == _strings.text(RunawayStrings::kYes)[0])
+ return kQuit;
+ if (ascii == _strings.text(RunawayStrings::kNo)[0])
+ return cancel();
+ } else {
+ if (ascii == _strings.text(RunawayStrings::kPlay)[0])
+ return kResume;
+ if (ascii == _strings.text(RunawayStrings::kQuitKey)[0]) {
+ _confirmQuit = true;
+ _dragging = false;
+ }
+ }
+ return kNone;
+}
+
+void RunawayMenu::drawLabel(Graphics::ManagedSurface &screen, RunawayStrings::TextId id,
+ int center, int y, bool enabled, Control control) {
+ const Common::Rect rect = labelRect(id, center, y);
+ const bool highlighted = enabled && control != kNoControl && controlAt(_mouse) == control;
+ _font.drawString(screen.surfacePtr(), _strings.text(id), rect.left, y, rect.width(),
+ enabled ? (highlighted ? kHighlight : kNormal) : kDisabled, Graphics::kTextAlignCenter);
+}
+
+void RunawayMenu::drawToggle(Graphics::ManagedSurface &screen, RunawayStrings::TextId id, int y,
+ bool enabled, bool selected, Control on, Control off) {
+ _font.drawString(screen.surfacePtr(), _strings.text(id), 415, y, 300, enabled ? kNormal : kDisabled);
+ for (uint i = 0; i < 2; ++i) {
+ const Control control = i ? off : on;
+ const bool active = enabled && (selected == (i == 0));
+ const bool hovered = enabled && controlAt(_mouse) == control;
+ const RunawayStrings::TextId label = id == RunawayStrings::kScrolling ?
+ (i ? RunawayStrings::kSlow : RunawayStrings::kFast) : (i ? RunawayStrings::kOff : RunawayStrings::kOn);
+ _font.drawString(screen.surfacePtr(), _strings.text(label), 756 + i * 139, y, 126,
+ enabled ? ((active || hovered) ? kHighlight : kNormal) : kDisabled);
+ if (active)
+ _captionFont.drawChar(screen.surfacePtr(), 0xb7, 726 + i * 139, y, kHighlight);
+ }
+}
+
+void RunawayMenu::draw(Graphics::ManagedSurface &screen) {
+ screen.clear();
+ screen.copyRectToSurface(_background, 0, kRunawayViewportTop, Common::Rect(1024, 600));
+ screen.copyRectToSurface(_thumbnail, 85, 169, Common::Rect(204, 120));
+ // Layout from native 0x4230b0. Unimplemented options stay disabled.
+ drawLabel(screen, RunawayStrings::kLoad, 183, 334, false);
+ drawLabel(screen, RunawayStrings::kSave, 183, 376, false);
+ drawLabel(screen, RunawayStrings::kDelete, 183, 418, false);
+ drawLabel(screen, RunawayStrings::kPlay, 183, 460, true, kPlay);
+ drawLabel(screen, RunawayStrings::kQuit, 183, 502, true, kExit);
+ drawToggle(screen, RunawayStrings::kMusic, 161, true, _settings.music, kMusicOn, kMusicOff);
+ drawToggle(screen, RunawayStrings::kAntialias, 203, false, false);
+ drawToggle(screen, RunawayStrings::kScrolling, 245, false, false);
+ drawToggle(screen, RunawayStrings::kPointerSound, 287, false, false);
+ drawToggle(screen, RunawayStrings::kSubtitles, 329, true, _settings.subtitles, kSubtitlesOn, kSubtitlesOff);
+ drawLabel(screen, RunawayStrings::kCredits, 525, 392, false);
+ drawLabel(screen, RunawayStrings::kSaveSettings, 802, 404, false);
+ drawLabel(screen, RunawayStrings::kDefaultSettings, 802, 446, false);
+ drawLabel(screen, RunawayStrings::kVolume, 525, 582, true, kVolume);
+ drawLabel(screen, RunawayStrings::kBrightness, 802, 582, false);
+ _font.drawString(screen.surfacePtr(), Common::String::format("%d / 100", (_settings.volume * 100 + 128) / 256),
+ 465, 616, 120, kNormal, Graphics::kTextAlignCenter);
+ const uint frame = returnRect().contains(_mouse) ? 6 : 5;
+ screen.copyRectToSurface(_returnButton, 612, 0, Common::Rect(frame * 100, 0, (frame + 1) * 100, 74));
+ if (_confirmQuit) {
+ _captionFont.drawString(screen.surfacePtr(), confirmation(), 0, 684, 1024, kNormal, Graphics::kTextAlignCenter);
+ const Control hovered = controlAt(_mouse);
+ if (hovered == kYes || hovered == kNo) {
+ const Common::Rect rect = answerRect(hovered == kYes);
+ _captionFont.drawString(screen.surfacePtr(), _strings.text(hovered == kYes ? RunawayStrings::kYes : RunawayStrings::kNo),
+ rect.left, rect.top, rect.width(), kHighlight);
+ }
+ } else if (returnRect().contains(_mouse)) {
+ _captionFont.drawString(screen.surfacePtr(), _strings.text(RunawayStrings::kResume), 0, 684, 1024, kNormal, Graphics::kTextAlignCenter);
+ }
+ screen.copyRectToSurface(_logo, 976, 720, Common::Rect(48, 48));
+}
+
+} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/menu.h b/engines/hollywood/runaway/menu.h
new file mode 100644
index 00000000000..9b90667ab89
--- /dev/null
+++ b/engines/hollywood/runaway/menu.h
@@ -0,0 +1,77 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef HOLLYWOOD_RUNAWAY_MENU_H
+#define HOLLYWOOD_RUNAWAY_MENU_H
+
+#include "hollywood/runaway/font.h"
+#include "hollywood/runaway/graphics.h"
+#include "hollywood/runaway/strings.h"
+
+namespace Hollywood {
+
+class RunawayMenu {
+public:
+ struct Settings {
+ bool music = true;
+ bool subtitles = true;
+ int volume = 256;
+ };
+ enum Command { kNone, kResume, kSettingsChanged, kQuit };
+
+ explicit RunawayMenu(const RunawayStrings &strings) : _strings(strings) {}
+ ~RunawayMenu();
+ bool load();
+ void open(const Graphics::ManagedSurface &screen, const Settings &settings);
+ void close();
+ Command update(Common::Point mouse);
+ Command click(bool right);
+ void release() { _dragging = false; }
+ Command cancel();
+ Command key(uint32 ascii);
+ Command adjustVolume(int delta);
+ void draw(Graphics::ManagedSurface &screen);
+ const Settings &settings() const { return _settings; }
+
+private:
+ enum Control { kNoControl, kPlay, kExit, kMusicOn, kMusicOff, kSubtitlesOn, kSubtitlesOff, kVolume, kYes, kNo };
+ Control controlAt(Common::Point mouse) const;
+ Common::Rect labelRect(RunawayStrings::TextId id, int center, int y) const;
+ Common::U32String confirmation() const;
+ Common::Rect answerRect(bool yes) const;
+ void drawLabel(Graphics::ManagedSurface &screen, RunawayStrings::TextId id, int center, int y,
+ bool enabled, Control control = kNoControl);
+ void drawToggle(Graphics::ManagedSurface &screen, RunawayStrings::TextId id, int y,
+ bool enabled, bool selected, Control on = kNoControl, Control off = kNoControl);
+
+ const RunawayStrings &_strings;
+ RunawayFont _font, _captionFont;
+ Graphics::ManagedSurface _background, _returnButton, _logo, _cursor, _thumbnail;
+ Settings _settings;
+ Common::Point _mouse;
+ int _dragX = 0, _dragVolume = 0;
+ bool _confirmQuit = false, _dragging = false;
+ bool _cursorPushed = false;
+};
+
+} // End of namespace Hollywood
+
+#endif
diff --git a/engines/hollywood/runaway/scene5030.cpp b/engines/hollywood/runaway/scene5030.cpp
index 709469a47e6..5d11cb4853c 100644
--- a/engines/hollywood/runaway/scene5030.cpp
+++ b/engines/hollywood/runaway/scene5030.cpp
@@ -375,10 +375,12 @@ void RunawayScene5030::useItem(byte item, byte hotspot) {
_inventory.select(0);
// Dispatch the room's item actions separately from its ordinary verbs.
// Original rejected actions use the shared, voiced inventory responses.
- if (item == 1 && hotspot == 3)
- sayCue(33, 0);
- else
+ if (item == 1 && hotspot == 3) {
+ // The large window is never cleaned; cue 33 belongs to the small one.
+ sayCue(35, 0);
+ } else {
sayInventory(RunawayInventory::Reply(1, 0));
+ }
}
void RunawayScene5030::arrive() {
diff --git a/engines/hollywood/runaway/strings.cpp b/engines/hollywood/runaway/strings.cpp
index 98d2a7321af..8ae473538d8 100644
--- a/engines/hollywood/runaway/strings.cpp
+++ b/engines/hollywood/runaway/strings.cpp
@@ -43,7 +43,31 @@ const char *const kText[RunawayStrings::kTextCount][3] = {
{"ZIEHE DEN STECKER DER K\303\234HLTRUHE HERAUS", "DEBRANCHER CONGELATEUR", "DESENCHUFAR CONGELADOR"},
{"HEMD", "CHEMISE", "CAMISA"},
{"PUTZLAPPEN", "PEAU DE CHAMOIS HUMIDE", "GAMUZA HUMEDECIDA"},
- {"SCHMUTZLAPPEN", "PEAU DE CHAMOIS SALE", "GAMUZA MUGRIENTA"}
+ {"SCHMUTZLAPPEN", "PEAU DE CHAMOIS SALE", "GAMUZA MUGRIENTA"},
+ {"OPTIONEN", "OPTIONS", "OPCIONES"},
+ {"LADEN", "CHARGER", "CARGAR"},
+ {"SICHERN", "SAUVEGARDER", "SALVAR"},
+ {"L\303\226SCHEN", "EFFACER", "BORRAR"},
+ {"WEITERSPIELEN", "JOUER", "JUGAR"},
+ {"VERLASSEN", "QUITTER", "SALIR"},
+ {"MUSIK", "Musique", "M\303\272sica"},
+ {"ANTI-ALIASING", "Antialiasing des sprites", "Antidentado Sprite"},
+ {"SCROLLING", "Mode de d\303\251filement", "M\303\251todo Scroll"},
+ {"MAUSZEIGERKLICKEN", "Bruitage des ic\303\264nes", "Sonido puntero rat\303\263n"},
+ {"UNTERTITEL", "Sous-titres", "Subt\303\255tulos"},
+ {"EIN", "OUI", "ON"},
+ {"AUS", "NON", "OFF"},
+ {"SCHNELL", "RAPIDE", "R\303\201PIDO"},
+ {"LANGSAM", "FLUIDE", "LENTO"},
+ {"LAUTST\303\204RKE", "Volume", "Volumen"},
+ {"HELLIGKEIT", "Luminosit\303\251", "Brillo"},
+ {"MITWIRKENDE", "G\303\251n\303\251rique", "Cr\303\251ditos"},
+ {"EINSTELLUNGEN SICHERN", "Sauvegarder la configuration", "Salvar Configuraci\303\263n"},
+ {"VORGABEEINSTELLUNGEN", "Configuration par d\303\251faut", "Configuraci\303\263n Inicial"},
+ {"SIND SIE SICHER?", "CONFIRMER ?", "\302\277EST\303\201S SEGURO?"},
+ {"JA", "OUI", "S\303\215"},
+ {"NEIN", "NON", "NO"},
+ {"V", "Q", "L"}
};
const char *const kItemNames[][3] = {
diff --git a/engines/hollywood/runaway/strings.h b/engines/hollywood/runaway/strings.h
index c60f5e376d3..e0d157583eb 100644
--- a/engines/hollywood/runaway/strings.h
+++ b/engines/hollywood/runaway/strings.h
@@ -34,7 +34,11 @@ public:
enum TextId {
kLook, kTake, kUse, kPutAway, kWith, kInventory, kResume,
kOpen, kClose, kMove, kLookThrough, kUsePhone, kTakeFromShelf,
- kUnplugCooler, kShirt, kWetCloth, kDirtyCloth, kTextCount
+ kUnplugCooler, kShirt, kWetCloth, kDirtyCloth,
+ kOptions, kLoad, kSave, kDelete, kPlay, kQuit, kMusic, kAntialias,
+ kScrolling, kPointerSound, kSubtitles, kOn, kOff, kFast, kSlow,
+ kVolume, kBrightness, kCredits, kSaveSettings, kDefaultSettings,
+ kConfirmQuit, kYes, kNo, kQuitKey, kTextCount
};
explicit RunawayStrings(Common::Language language) :
_languageIndex(language == Common::FR_FRA ? 1 : language == Common::ES_ESP ? 2 : 0) {}
diff --git a/engines/hollywood/runaway/ui.cpp b/engines/hollywood/runaway/ui.cpp
index d0db338cbf1..4621692161b 100644
--- a/engines/hollywood/runaway/ui.cpp
+++ b/engines/hollywood/runaway/ui.cpp
@@ -19,7 +19,6 @@
*
*/
-#include "common/endian.h"
#include "common/util.h"
#include "graphics/cursorman.h"
#include "hollywood/runaway/strings.h"
@@ -55,25 +54,13 @@ RunawayUI::~RunawayUI() {
CursorMan.popCursor();
}
-bool RunawayUI::loadSurface(uint chunk, int width, int height, Graphics::ManagedSurface &surface) {
- Common::Array<byte> pixels;
- if (!readRunawayGlobalChunk(chunk, pixels) || pixels.size() != (uint)(width * height * 2))
- return false;
- surface.create(width, height, kUIFormat);
- for (int y = 0; y < height; ++y) {
- uint16 *out = (uint16 *)surface.getBasePtr(0, y);
- for (int x = 0; x < width; ++x)
- out[x] = READ_LE_UINT16(pixels.data() + (y * width + x) * 2);
- }
- return true;
-}
-
bool RunawayUI::load() {
Common::Array<byte> animation;
- if (!_font.load() || !loadSurface(114, 904, 540, _cursors) ||
- !loadSurface(118, 48, 48, _demoLogo) || !loadSurface(121, 80, 42 * 80, _icons) ||
- !loadSurface(127, 700, 74, _inventoryButton) || !loadSurface(129, 700, 74, _returnButton) ||
- !loadSurface(131, 1024, 600, _inventoryBackground) || !loadSurface(133, 768, 576, _inventoryTexture) ||
+ if (!_font.load() || !loadRunawaySurface(114, 904, 540, _cursors) ||
+ !loadRunawaySurface(118, 48, 48, _demoLogo) || !loadRunawaySurface(121, 80, 42 * 80, _icons) ||
+ !loadRunawaySurface(127, 700, 74, _inventoryButton) || !loadRunawaySurface(129, 700, 74, _returnButton) ||
+ !loadRunawaySurface(128, 700, 74, _optionsButton) ||
+ !loadRunawaySurface(131, 1024, 600, _inventoryBackground) || !loadRunawaySurface(133, 768, 576, _inventoryTexture) ||
!readRunawayGlobalChunk(137, animation) || !_portrait.load(animation, 104) ||
!readRunawayGlobalChunk(141, animation) || !_idlePortrait.load(animation, 32))
return false;
@@ -108,6 +95,10 @@ bool RunawayUI::overButton() const {
return Common::Rect(kButtonX, 0, kButtonX + 100, 74).contains(_mouse);
}
+bool RunawayUI::overOptions() const {
+ return Common::Rect(612, 0, 712, 74).contains(_mouse);
+}
+
bool RunawayUI::inViewport() const {
return _mouse.x >= 0 && _mouse.x < kRunawayScreenWidth &&
_mouse.y >= kRunawayViewportTop && _mouse.y < kRunawayViewportTop + kRunawayViewportHeight;
@@ -199,6 +190,12 @@ void RunawayUI::update(uint32 now, Common::Point mouse, byte roomHotspot, bool b
_buttonFrame = MIN<uint>(5, _buttonFrame + steps);
else
_buttonFrame = MAX<int>(0, MIN<int>(5, _buttonFrame) - steps);
+ if (overOptions())
+ _optionsFrame = 6;
+ else if (mouse.y < kRunawayViewportTop)
+ _optionsFrame = MIN<uint>(5, _optionsFrame + steps);
+ else
+ _optionsFrame = MAX<int>(0, MIN<int>(5, _optionsFrame) - steps);
}
if (_inventoryOpen && now - _portraitTick >= 60) {
_portraitTick = now;
@@ -223,6 +220,10 @@ RunawayUI::Command RunawayUI::click(bool right) {
Command command;
_lastInteraction = _now;
_idleStarted = 0;
+ if (!right && overOptions()) {
+ command.type = Command::kOpenMenu;
+ return command;
+ }
if (_speaking) {
command.type = Command::kSkipSpeech;
return command;
@@ -367,6 +368,7 @@ void RunawayUI::draw(Graphics::ManagedSurface &screen, const Common::U32String &
drawInventory(screen);
const Graphics::ManagedSurface &button = _inventoryOpen ? _returnButton : _inventoryButton;
screen.copyRectToSurface(button, kButtonX, 0, Common::Rect(_buttonFrame * 100, 0, (_buttonFrame + 1) * 100, 74));
+ screen.copyRectToSurface(_optionsButton, 612, 0, Common::Rect(_optionsFrame * 100, 0, (_optionsFrame + 1) * 100, 74));
if (_speaking) {
if (showSubtitles) {
Common::Array<Common::U32String> lines;
@@ -382,7 +384,8 @@ void RunawayUI::draw(Graphics::ManagedSurface &screen, const Common::U32String &
caption = committedCaption;
color = kUIFormat.RGBToColor(255, 223, 206);
} else if (!_blocked && !busy()) {
- caption = overButton() ? _strings.text(_inventoryOpen ? RunawayStrings::kResume : RunawayStrings::kInventory) :
+ caption = overOptions() ? _strings.text(RunawayStrings::kOptions) :
+ overButton() ? _strings.text(_inventoryOpen ? RunawayStrings::kResume : RunawayStrings::kInventory) :
_inventoryOpen ? inventoryCaption() : roomCaption;
}
_font.drawString(screen.surfacePtr(), caption, 20, 684, 984, color, Graphics::kTextAlignCenter);
diff --git a/engines/hollywood/runaway/ui.h b/engines/hollywood/runaway/ui.h
index a42b5b1e52f..2af0a35f897 100644
--- a/engines/hollywood/runaway/ui.h
+++ b/engines/hollywood/runaway/ui.h
@@ -33,7 +33,7 @@ namespace Hollywood {
class RunawayUI {
public:
struct Command {
- enum Type { kNone, kRoom, kExamineItem, kCombine, kSkipSpeech };
+ enum Type { kNone, kRoom, kExamineItem, kCombine, kSkipSpeech, kOpenMenu };
Type type = kNone;
RunawayVerb verb = kVerbWalk;
Common::Point mouse;
@@ -55,10 +55,10 @@ public:
const Common::U32String &committedCaption, const Common::U32String &subtitle, bool showSubtitles);
private:
- bool loadSurface(uint chunk, int width, int height, Graphics::ManagedSurface &surface);
Common::Rect itemRect(uint slot) const;
byte itemAt(Common::Point mouse) const;
bool overButton() const;
+ bool overOptions() const;
bool inViewport() const;
void setInventoryOpen(bool open);
void setVerb(RunawayVerb verb);
@@ -71,12 +71,12 @@ private:
const RunawayStrings &_strings;
Common::RandomSource _random;
RunawayFont _font;
- Graphics::ManagedSurface _cursors, _demoLogo, _cursor, _inventoryButton, _returnButton;
+ Graphics::ManagedSurface _cursors, _demoLogo, _cursor, _inventoryButton, _returnButton, _optionsButton;
Graphics::ManagedSurface _inventoryBackground, _inventoryTexture, _icons;
RunawayAnimation _portrait, _idlePortrait;
Common::Point _mouse;
RunawayVerb _verb = kVerbWalk, _previousVerb = kVerbWalk;
- byte _hovered = 0, _buttonFrame = 0, _pickupItem = 0;
+ byte _hovered = 0, _buttonFrame = 0, _optionsFrame = 0, _pickupItem = 0;
bool _inventoryOpen = false, _enteredInventory = false, _returnAfterPickup = false;
bool _pickupSoundPlayed = false;
bool _blocked = false, _speaking = false, _cursorPushed = false;
Commit: 5825ea194f321adbd64456fec8cd8a3304d95e41
https://github.com/scummvm/scummvm/commit/5825ea194f321adbd64456fec8cd8a3304d95e41
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-10-27T11:28:15+01:00
Commit Message:
HOLLYWOOD: allow to play cutscenes and implemented window interaction
Changed paths:
A engines/hollywood/runaway/video.cpp
A engines/hollywood/runaway/video.h
engines/hollywood/runaway/engine.cpp
engines/hollywood/runaway/graphics.cpp
engines/hollywood/runaway/graphics.h
engines/hollywood/runaway/scene5030.cpp
engines/hollywood/runaway/scene5030.h
diff --git a/engines/hollywood/runaway/engine.cpp b/engines/hollywood/runaway/engine.cpp
index e48b963462b..ff2445c96a4 100644
--- a/engines/hollywood/runaway/engine.cpp
+++ b/engines/hollywood/runaway/engine.cpp
@@ -60,8 +60,10 @@ void RunawayEngine::initializePath(const Common::FSNode &gamePath) {
Engine::initializePath(gamePath);
SearchMan.addSubDirectoryMatching(gamePath, "Resource");
SearchMan.addSubDirectoryMatching(gamePath, "Dataa");
+ SearchMan.addSubDirectoryMatching(gamePath, "Datav");
// Also support targets added directly from the Resource directory.
SearchMan.addSubDirectoryMatching(gamePath.getParent(), "Dataa");
+ SearchMan.addSubDirectoryMatching(gamePath.getParent(), "Datav");
}
bool RunawayEngine::hasFeature(EngineFeature feature) const {
@@ -158,6 +160,8 @@ Common::Error RunawayEngine::run() {
scene.skipSpeech();
break;
default:
+ if (scene.playingVideo())
+ scene.skipVideo();
break;
}
} else if (event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_START || event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_END) {
@@ -184,7 +188,9 @@ Common::Error RunawayEngine::run() {
break;
case kCancelAction:
if (pressed) {
- if (scene.speaking())
+ if (scene.playingVideo())
+ scene.skipVideo();
+ else if (scene.speaking())
scene.skipSpeech();
else if (!ui.cancel())
openMenu = true;
@@ -199,8 +205,12 @@ Common::Error RunawayEngine::run() {
scene.skipSpeech();
break;
case kSkip:
- if (pressed)
- scene.skipSpeech();
+ if (pressed) {
+ if (scene.playingVideo())
+ scene.skipVideo();
+ else
+ scene.skipSpeech();
+ }
break;
}
}
diff --git a/engines/hollywood/runaway/graphics.cpp b/engines/hollywood/runaway/graphics.cpp
index 8a5b0d57bd6..53a3bb7b2cc 100644
--- a/engines/hollywood/runaway/graphics.cpp
+++ b/engines/hollywood/runaway/graphics.cpp
@@ -206,7 +206,7 @@ static uint16 blend565(uint16 source, uint16 destination, uint alpha) {
}
void RunawayActor::draw(Graphics::ManagedSurface &surface, Common::Point position, int cameraX,
- int roomTop, const Common::Array<byte> &mask, const Common::Array<byte> &maps) const {
+ int roomTop, const Common::Array<byte> &mask, const Common::Array<byte> &maps, bool sunlit) const {
// Perspective planes from the demo's scene callback at 0x438970. Actor
// coordinates are anchored at (168,434) in a nominal 455-pixel-high image.
float height;
@@ -227,8 +227,12 @@ void RunawayActor::draw(Graphics::ManagedSurface &surface, Common::Point positio
return;
// Scene lighting and occlusion come from the same pixel lookup as hotspots.
const byte light = MIN<byte>(5, maps[768 + mask[position.y * 1376 + position.x]]);
- const byte lights[6][3] = { {100,100,100}, {55,50,45}, {55,50,45},
+ byte lights[6][3] = { {100,100,100}, {55,50,45}, {55,50,45},
{85,80,75}, {75,70,65}, {70,65,60} };
+ if (sunlit) {
+ const byte windowLight[2][3] = {{90, 85, 80}, {80, 75, 70}};
+ memcpy(lights[1], windowLight, sizeof(windowLight));
+ }
uint16 palette[256];
for (uint i = 0; i < 256; ++i) {
const uint16 c = _palette[i];
diff --git a/engines/hollywood/runaway/graphics.h b/engines/hollywood/runaway/graphics.h
index c0415099ddb..36c1d94122f 100644
--- a/engines/hollywood/runaway/graphics.h
+++ b/engines/hollywood/runaway/graphics.h
@@ -63,7 +63,7 @@ public:
bool load();
bool setFrame(uint facing, uint frame);
void draw(Graphics::ManagedSurface &surface, Common::Point position, int cameraX,
- int roomTop, const Common::Array<byte> &mask, const Common::Array<byte> &maps) const;
+ int roomTop, const Common::Array<byte> &mask, const Common::Array<byte> &maps, bool sunlit = false) const;
private:
enum { kWidth = 345, kHeight = 518, kFacings = 8, kFrames = 19 };
diff --git a/engines/hollywood/runaway/scene5030.cpp b/engines/hollywood/runaway/scene5030.cpp
index 5d11cb4853c..6f97eefa266 100644
--- a/engines/hollywood/runaway/scene5030.cpp
+++ b/engines/hollywood/runaway/scene5030.cpp
@@ -66,20 +66,14 @@ const SceneHotspot kHotspots[] = {
bool RunawayScene5030::load() {
const Graphics::PixelFormat format(2, 5, 6, 5, 0, 11, 5, 0, 0);
- Common::Array<byte> pixels, packedMask;
+ Common::Array<byte> packedMask;
if (!_archive.open(Common::Path("RESOURCE.E03"), 50) ||
- _archive.chunkSize(0) != kRoomWidth * kRoomHeight * 2 ||
- !_archive.readVariableChunk(0, pixels) || !_archive.readVariableChunk(1, packedMask) ||
+ !_archive.readVariableChunk(1, packedMask) ||
!_archive.readVariableChunk(2, _maps) || _maps.size() != 1536 ||
!_text.load("RESOURCE.003", "Runaway shack", 503, 0, 0x1135))
return false;
_background.create(kRoomWidth, kRoomHeight, format);
_screen.create(kScreenWidth, kScreenHeight, format);
- for (int y = 0; y < kRoomHeight; ++y) {
- uint16 *out = (uint16 *)_background.getBasePtr(0, y);
- for (int x = 0; x < kRoomWidth; ++x)
- out[x] = READ_LE_UINT16(pixels.data() + (y * kRoomWidth + x) * 2);
- }
// 0x42b380 expands (byte value, uint16 length) runs into one room pixel
// lookup. Tables 0..3 map those values to walking, hotspots, depth, lighting.
_mask.resize(kRoomWidth * kRoomHeight);
@@ -94,15 +88,8 @@ bool RunawayScene5030::load() {
offset += length;
}
if (offset != _mask.size() || !_actor.load() ||
- !_intro.load(_archive, 47, 20) || !_lidActor.load(_archive, 43, 33) ||
- !_lid.load(_archive, 44, 5) || !_unplug.load(_archive, 40, 59) ||
- !loadPatch(5, _unplugPatch) || !loadPatch(7, _openLidPatch) || !loadPatch(9, _closedLidPatch))
+ !_intro.load(_archive, 47, 20) || !_climb.load(_archive, 42, 18) || !loadRoomGraphics())
return false;
- const uint pickupChunks[] = {20, 18, 15, 19, 17};
- for (uint i = 0; i < ARRAYSIZE(pickupChunks); ++i) {
- if (!loadPatch(pickupChunks[i], _pickupPatches[i]))
- return false;
- }
const uint rows = _text._stageLargeRows.size() / 321;
_voiceSamples.resize(rows, 0);
_cueEnds.resize(rows, 0);
@@ -123,6 +110,42 @@ bool RunawayScene5030::load() {
return true;
}
+bool RunawayScene5030::loadRoomGraphics() {
+ Common::Array<byte> pixels, overlay;
+ if (!_archive.readVariableChunk(_windowClean ? 4 : 0, pixels) ||
+ pixels.size() != kRoomWidth * kRoomHeight * 2 ||
+ !_lidActor.load(_archive, _windowClean ? 45 : 43, 33) ||
+ !_lid.load(_archive, _windowClean ? 46 : 44, 5) ||
+ !_unplug.load(_archive, _windowClean ? 39 : 40, 59) ||
+ !loadPatch(_windowClean ? 6 : 5, _unplugPatch) ||
+ !loadPatch(_windowClean ? 8 : 7, _openLidPatch) ||
+ !loadPatch(_windowClean ? 10 : 9, _closedLidPatch) ||
+ !loadPatch(_windowClean ? 27 : 26, overlay))
+ return false;
+ for (int y = 0; y < kRoomHeight; ++y) {
+ uint16 *out = (uint16 *)_background.getBasePtr(0, y);
+ for (int x = 0; x < kRoomWidth; ++x)
+ out[x] = READ_LE_UINT16(pixels.data() + (y * kRoomWidth + x) * 2);
+ }
+ // 0x438ce0 rebuilds the room after cleaning. The sunny base already
+ // omits the cloth and cleaner; other collected objects still need patches.
+ const uint pickupChunks[2][5] = {{20, 18, 15, 19, 17}, {21, 0, 16, 19, 0}};
+ const byte hotspots[] = {5, 9, 14, 16, 17};
+ for (uint i = 0; i < ARRAYSIZE(hotspots); ++i) {
+ _pickupPatches[i].clear();
+ uint chunk = pickupChunks[_windowClean][i];
+ if (chunk && !loadPatch(chunk, _pickupPatches[i]))
+ return false;
+ if (_pickedUp[hotspots[i]])
+ drawPatch(_pickupPatches[i]);
+ }
+ drawPatch(_lidOpen ? _openLidPatch : _closedLidPatch);
+ if (_unplugged)
+ drawPatch(_unplugPatch);
+ drawPatch(overlay);
+ return true;
+}
+
void RunawayScene5030::start(uint32 now) {
_now = _lastUpdate = now;
_audio.playMusic(11);
@@ -151,6 +174,8 @@ bool RunawayScene5030::loadPatch(uint chunk, Common::Array<byte> &patch) {
}
void RunawayScene5030::drawPatch(const Common::Array<byte> &patch) {
+ if (patch.empty())
+ return;
const byte *run = patch.data() + 2;
for (uint i = 0; i < READ_LE_UINT16(patch.data()); ++i) {
const uint x = READ_LE_UINT16(run), y = READ_LE_UINT16(run + 2), length = READ_LE_UINT16(run + 4);
@@ -378,6 +403,21 @@ void RunawayScene5030::useItem(byte item, byte hotspot) {
if (item == 1 && hotspot == 3) {
// The large window is never cleaned; cue 33 belongs to the small one.
sayCue(35, 0);
+ } else if (item == 1 && hotspot == 4) {
+ if (_windowClean) {
+ sayCue(33, 3);
+ } else if (!_inventory.clothState()) {
+ sayCue(33, 0);
+ } else {
+ // Load before committing the interaction, so missing/corrupt movie
+ // data cannot leave Brian halfway through climbing onto the cooler.
+ if (!_cleanVideo.load("DATAVE01.001"))
+ error("Cannot load Runaway cleaning movie DATAVE01.001");
+ startAction(kCleanWindowSpeech);
+ sayCue(33, 1);
+ }
+ } else if (item == 3 && hotspot == 4) {
+ sayCue(39, 0);
} else {
sayInventory(RunawayInventory::Reply(1, 0));
}
@@ -396,6 +436,8 @@ void RunawayScene5030::arrive() {
_examined[id] = true;
if (id == 18)
say(_lidOpen ? 581 : 580);
+ else if (id == 4)
+ sayCue(7, _windowClean ? 1 : 0);
else if (id == 8)
say(!_lidOpen ? 535 : _unplugged ? 537 : 536);
else
@@ -444,11 +486,25 @@ void RunawayScene5030::finishAction() {
drawPatch(_unplugPatch);
_facing = 7;
say(555);
+ } else if (completed == kCleanWindowVideo) {
+ _cleanVideo.close();
+ _audio.stopEffect();
+ _windowClean = true;
+ _inventory.soilCloth();
+ if (!loadRoomGraphics())
+ error("Cannot load Runaway sunlit room resources");
+ _facing = 1;
+ sayCue(33, 2);
}
debugC(1, kDebugScene, "Runaway demo: animation %u finished, lid=%u unplugged=%u",
(uint)completed, (uint)_lidOpen, (uint)_unplugged);
}
+void RunawayScene5030::skipVideo() {
+ if (playingVideo())
+ finishAction();
+}
+
void RunawayScene5030::update(uint32 now, int scrollDirection, bool inventoryOpen) {
_now = now;
const uint elapsed = MIN<uint>(100, now - _lastUpdate);
@@ -461,7 +517,27 @@ void RunawayScene5030::update(uint32 now, int scrollDirection, bool inventoryOpe
_walkStarted += pausedTime;
return;
}
- if (_action != kNone) {
+ if (_action == kCleanWindowSpeech) {
+ if (!speaking())
+ startAction(kCleanWindowClimb);
+ } else if (_action == kCleanWindowClimb) {
+ // 0x4361e0 uses 60 ms ticks and repeats its first animation cel.
+ _step = (now - _actionStarted) / 60;
+ if (_step >= 18)
+ startAction(kCleanWindowVideo);
+ } else if (_action == kCleanWindowVideo) {
+ const uint previousStep = _step;
+ _step = (uint64)(now - _actionStarted) * 24 / 1000;
+ if (_step >= _cleanVideo.frameCount()) {
+ finishAction();
+ } else {
+ if (!_cleanVideo.decodeToFrame(_step))
+ error("Cannot decode Runaway cleaning movie frame %u", _step);
+ // Original 0x4329d0 starts RESOURCE.S03 effect 22 at frame 56.
+ if (previousStep < 56 && _step >= 56)
+ _audio.playEffect(22);
+ }
+ } else if (_action != kNone) {
const uint previousStep = _step;
_step = (now - _actionStarted) / 80;
// Frame triggers in 0x437110/0x4373e0 (lid) and 0x435a50 (plug).
@@ -519,6 +595,10 @@ void RunawayScene5030::update(uint32 now, int scrollDirection, bool inventoryOpe
void RunawayScene5030::draw() {
_screen.clear();
+ if (playingVideo()) {
+ _cleanVideo.draw(_screen, Common::Rect(0, kRoomTop, kScreenWidth, kRoomTop + kRoomHeight));
+ return;
+ }
_screen.copyRectToSurface(_background, 0, kRoomTop,
Common::Rect(_cameraX, 0, _cameraX + kScreenWidth, kRoomHeight));
uint lidFrame = _lidOpen ? 4 : 0;
@@ -535,8 +615,10 @@ void RunawayScene5030::draw() {
// Original 0x435a50 sequence: crouch, pull the plug, return to standing.
const uint frame = _step <= 36 ? MAX<int>(0, (int)_step - 1) : _step <= 47 ? _step + 10 : 83 - _step;
_unplug.draw(_screen, frame, _cameraX, kRoomTop);
+ } else if (_action == kCleanWindowClimb) {
+ _climb.draw(_screen, MAX<int>(0, (int)_step - 1), _cameraX, kRoomTop);
} else {
- _actor.draw(_screen, _position, _cameraX, kRoomTop, _mask, _maps);
+ _actor.draw(_screen, _position, _cameraX, kRoomTop, _mask, _maps, _windowClean);
}
}
diff --git a/engines/hollywood/runaway/scene5030.h b/engines/hollywood/runaway/scene5030.h
index 680e313b854..1adea384079 100644
--- a/engines/hollywood/runaway/scene5030.h
+++ b/engines/hollywood/runaway/scene5030.h
@@ -27,6 +27,7 @@
#include "hollywood/runaway/audio.h"
#include "hollywood/runaway/graphics.h"
#include "hollywood/runaway/inventory.h"
+#include "hollywood/runaway/video.h"
#include "hollywood/scene_text_store.h"
namespace Hollywood {
@@ -56,11 +57,14 @@ public:
bool busy() const { return _action != kNone; }
bool speaking() const { return _speechRow != 0; }
void skipSpeech();
+ bool playingVideo() const { return _action == kCleanWindowVideo; }
+ void skipVideo();
void cancelWalk();
void sayInventory(const RunawayInventory::Reply &reply);
private:
- enum Action { kNone, kIntro, kOpenLid, kCloseLid, kUnplug };
+ enum Action { kNone, kIntro, kOpenLid, kCloseLid, kUnplug, kCleanWindowSpeech, kCleanWindowClimb, kCleanWindowVideo };
+ bool loadRoomGraphics();
bool walkable(int x, int y) const;
bool clearPath(Common::Point start, Common::Point end) const;
void walkTo(Common::Point target);
@@ -87,7 +91,8 @@ private:
RunawayInventory &_inventory;
const RunawayStrings &_strings;
RunawayActor _actor;
- RunawayAnimation _intro, _lidActor, _lid, _unplug;
+ RunawayAnimation _intro, _lidActor, _lid, _unplug, _climb;
+ RunawayVideo _cleanVideo;
Common::Point _position = Common::Point(623, 447);
Common::Array<Common::Point> _path;
uint _pathIndex = 0;
@@ -97,6 +102,7 @@ private:
RunawayVerb _pendingVerb = kVerbWalk;
Action _action = kNone;
bool _lidOpen = false, _unplugged = false;
+ bool _windowClean = false;
bool _pickedUp[20] = {};
bool _examined[20] = {};
bool _globalSpeech = false;
diff --git a/engines/hollywood/runaway/video.cpp b/engines/hollywood/runaway/video.cpp
new file mode 100644
index 00000000000..e13d2119d55
--- /dev/null
+++ b/engines/hollywood/runaway/video.cpp
@@ -0,0 +1,100 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/endian.h"
+#include "common/file.h"
+#include "common/memstream.h"
+#include "common/textconsole.h"
+#include "hollywood/runaway/video.h"
+
+namespace Hollywood {
+
+bool RunawayVideo::load(const char *name) {
+ close();
+ Common::File file;
+ if (!file.open(Common::Path(name)) || file.size() < 1024 || file.size() > 256 * 1024 * 1024)
+ return false;
+ _data.resize(file.size());
+ if (file.read(_data.data(), _data.size()) != _data.size())
+ return false;
+ if (READ_BE_UINT32(_data.data()) != MKTAG('R', 'I', 'F', 'F')) {
+ // The native player (0x41ac70) temporarily rewrites the first 1024
+ // bytes using DATAVC00.001. Restore them only in our memory copy.
+ // Match the stored prefix: the Spanish codebook uses different indices.
+ Common::File codebook;
+ if (!codebook.open("DATAVC00.001"))
+ return false;
+ byte entry[2048];
+ bool found = false;
+ while (codebook.read(entry, sizeof(entry)) == sizeof(entry)) {
+ if (memcmp(entry + 1024, _data.data(), 1024))
+ continue;
+ for (uint i = 0; i < 1024; ++i)
+ _data[i] = entry[i] - entry[1024 + i];
+ found = true;
+ break;
+ }
+ if (!found)
+ return false;
+ }
+ if (READ_BE_UINT32(_data.data()) != MKTAG('R', 'I', 'F', 'F') ||
+ READ_BE_UINT32(_data.data() + 8) != MKTAG('A', 'V', 'I', ' '))
+ return false;
+ if (!_decoder.loadStream(new Common::MemoryReadStream(_data.data(), _data.size())) ||
+ _decoder.getAudioTrackCount() || !_decoder.getFrameCount()) {
+ close();
+ return false;
+ }
+ const Graphics::PixelFormat format(2, 5, 6, 5, 0, 11, 5, 0, 0);
+ if (!_decoder.setOutputPixelFormat(format) || !decodeToFrame(0)) {
+ close();
+ return false;
+ }
+ return true;
+}
+
+void RunawayVideo::close() {
+ _decoder.close();
+ _frame = nullptr;
+ _data.clear();
+}
+
+bool RunawayVideo::decodeToFrame(uint frame) {
+ if (frame >= _decoder.getFrameCount())
+ return false;
+ while (_decoder.getCurFrame() < (int)frame && !_decoder.endOfVideo()) {
+ const Graphics::Surface *decoded = _decoder.decodeNextFrame();
+ if (decoded)
+ _frame = decoded;
+ else {
+ warning("Runaway: unable to decode video frame %d", _decoder.getCurFrame());
+ return false;
+ }
+ }
+ return _frame != nullptr && _decoder.getCurFrame() == (int)frame;
+}
+
+void RunawayVideo::draw(Graphics::ManagedSurface &surface, const Common::Rect &destination) const {
+ if (_frame)
+ surface.blitFrom(*_frame, Common::Rect(_frame->w, _frame->h), destination);
+}
+
+} // namespace Hollywood
diff --git a/engines/hollywood/runaway/video.h b/engines/hollywood/runaway/video.h
new file mode 100644
index 00000000000..7fda962a1ef
--- /dev/null
+++ b/engines/hollywood/runaway/video.h
@@ -0,0 +1,49 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef HOLLYWOOD_RUNAWAY_VIDEO_H
+#define HOLLYWOOD_RUNAWAY_VIDEO_H
+
+#include "common/array.h"
+#include "graphics/managed_surface.h"
+#include "video/avi_decoder.h"
+
+namespace Hollywood {
+
+// Silent AVI clips are advanced by the engine clock so menu pauses also
+// freeze frame callbacks and the separately stored room sound effects.
+class RunawayVideo {
+public:
+ bool load(const char *name);
+ void close();
+ bool decodeToFrame(uint frame);
+ uint frameCount() const { return _decoder.getFrameCount(); }
+ void draw(Graphics::ManagedSurface &surface, const Common::Rect &destination) const;
+
+private:
+ Common::Array<byte> _data;
+ Video::AVIDecoder _decoder;
+ const Graphics::Surface *_frame = nullptr;
+};
+
+} // namespace Hollywood
+
+#endif
Commit: e3430ddd4d1a1b31d244268bac09616ca19c8f36
https://github.com/scummvm/scummvm/commit/e3430ddd4d1a1b31d244268bac09616ca19c8f36
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-10-27T11:28:15+01:00
Commit Message:
HOLLYWOOD: implement runaway demo intro and outro
Changed paths:
A engines/hollywood/runaway/presentation.cpp
A engines/hollywood/runaway/presentation.h
engines/hollywood/runaway/audio.cpp
engines/hollywood/runaway/audio.h
engines/hollywood/runaway/engine.cpp
engines/hollywood/runaway/engine.h
engines/hollywood/runaway/graphics.cpp
engines/hollywood/runaway/graphics.h
engines/hollywood/runaway/intro.h
engines/hollywood/runaway/scene5030.cpp
engines/hollywood/runaway/scene5030.h
engines/hollywood/runaway/strings.cpp
engines/hollywood/runaway/strings.h
engines/hollywood/runaway/ui.cpp
engines/hollywood/runaway/ui.h
diff --git a/engines/hollywood/runaway/audio.cpp b/engines/hollywood/runaway/audio.cpp
index a12a03a2fc6..3abb91ab702 100644
--- a/engines/hollywood/runaway/audio.cpp
+++ b/engines/hollywood/runaway/audio.cpp
@@ -88,9 +88,13 @@ void RunawayAudio::playIntroMusic() {
Audio::Mixer::kMusicSoundType, _music, Audio::Mixer::kMaxChannelVolume, false);
}
-void RunawayAudio::playMusic(uint16 cue) {
- play("RESOURCE.M03", cue, 100, false, Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN | Audio::FLAG_STEREO,
- Audio::Mixer::kMusicSoundType, _music, 96, true);
+uint32 RunawayAudio::playMusic(uint16 cue, bool loop) {
+ return play("RESOURCE.M03", cue, 100, false, Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN | Audio::FLAG_STEREO,
+ Audio::Mixer::kMusicSoundType, _music, 96, loop);
+}
+
+void RunawayAudio::setMusicVolume(byte volume) {
+ _mixer->setChannelVolume(_music, volume);
}
uint32 RunawayAudio::playSpeech(uint16 sample, bool global) {
@@ -101,9 +105,18 @@ uint32 RunawayAudio::playSpeech(uint16 sample, bool global) {
Audio::Mixer::kSpeechSoundType, _speech, Audio::Mixer::kMaxChannelVolume, false);
}
-void RunawayAudio::playEffect(uint16 cue, byte volume) {
+void RunawayAudio::playEffect(uint16 cue, byte volume, byte channel, bool loop) {
+ assert(channel < ARRAYSIZE(_effects));
play("RESOURCE.S03", cue, 1000, false, Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN,
- Audio::Mixer::kSFXSoundType, _effect, volume, false);
+ Audio::Mixer::kSFXSoundType, _effects[channel], volume, loop);
+}
+
+void RunawayAudio::playFootstep(byte surface, byte variant, byte volume) {
+ assert(surface >= 1 && surface <= 7 && variant < 2);
+ // Native 0x407410 selects one of two mono samples per surface. These
+ // fourteen effects start at cue 21 in the otherwise shared music archive.
+ play("RESOURCE.002", 21 + (surface - 1) * 2 + variant, 100, false,
+ Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN, Audio::Mixer::kSFXSoundType, _effects[0], volume, false);
}
void RunawayAudio::stopMusic() {
@@ -115,7 +128,8 @@ void RunawayAudio::stopSpeech() {
}
void RunawayAudio::stopEffect() {
- _mixer->stopHandle(_effect);
+ for (uint i = 0; i < ARRAYSIZE(_effects); ++i)
+ _mixer->stopHandle(_effects[i]);
}
bool RunawayAudio::musicPlaying() const {
diff --git a/engines/hollywood/runaway/audio.h b/engines/hollywood/runaway/audio.h
index 39ff88e4a90..300afe04559 100644
--- a/engines/hollywood/runaway/audio.h
+++ b/engines/hollywood/runaway/audio.h
@@ -31,9 +31,11 @@ public:
explicit RunawayAudio(Audio::Mixer *mixer) : _mixer(mixer) {}
~RunawayAudio();
void playIntroMusic();
- void playMusic(uint16 cue);
+ uint32 playMusic(uint16 cue, bool loop = true);
+ void setMusicVolume(byte volume);
uint32 playSpeech(uint16 sample, bool global = false);
- void playEffect(uint16 cue, byte volume = Audio::Mixer::kMaxChannelVolume);
+ void playEffect(uint16 cue, byte volume = Audio::Mixer::kMaxChannelVolume, byte channel = 0, bool loop = false);
+ void playFootstep(byte surface, byte variant, byte volume = Audio::Mixer::kMaxChannelVolume);
void stopMusic();
void stopSpeech();
void stopEffect();
@@ -44,7 +46,7 @@ private:
uint32 play(const char *archive, uint16 cue, uint tableCount, bool pairedTables,
byte flags, Audio::Mixer::SoundType type, Audio::SoundHandle &handle, byte volume, bool loop);
Audio::Mixer *_mixer;
- Audio::SoundHandle _music, _speech, _effect;
+ Audio::SoundHandle _music, _speech, _effects[2];
};
} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/engine.cpp b/engines/hollywood/runaway/engine.cpp
index ff2445c96a4..6776a3ef4e0 100644
--- a/engines/hollywood/runaway/engine.cpp
+++ b/engines/hollywood/runaway/engine.cpp
@@ -35,6 +35,7 @@
#include "hollywood/runaway/engine.h"
#include "hollywood/runaway/intro.h"
#include "hollywood/runaway/menu.h"
+#include "hollywood/runaway/presentation.h"
#include "hollywood/runaway/scene5030.h"
#include "hollywood/runaway/strings.h"
#include "hollywood/runaway/ui.h"
@@ -61,9 +62,11 @@ void RunawayEngine::initializePath(const Common::FSNode &gamePath) {
SearchMan.addSubDirectoryMatching(gamePath, "Resource");
SearchMan.addSubDirectoryMatching(gamePath, "Dataa");
SearchMan.addSubDirectoryMatching(gamePath, "Datav");
+ SearchMan.addSubDirectoryMatching(gamePath, "Screenshots");
// Also support targets added directly from the Resource directory.
SearchMan.addSubDirectoryMatching(gamePath.getParent(), "Dataa");
SearchMan.addSubDirectoryMatching(gamePath.getParent(), "Datav");
+ SearchMan.addSubDirectoryMatching(gamePath.getParent(), "Screenshots");
}
bool RunawayEngine::hasFeature(EngineFeature feature) const {
@@ -77,25 +80,32 @@ void RunawayEngine::syncSoundSettings() {
_mixer->muteSoundType(Audio::Mixer::kSFXSoundType, mute || ConfMan.getBool("sfx_mute"));
}
-Common::Error RunawayEngine::playIntro() {
+Common::Error RunawayEngine::playIntro(RunawayMenu &menu) {
RunawayIntro intro(_mixer);
if (!intro.load())
return Common::Error(Common::kReadingFailed, "Cannot load the Runaway demo logo or story card");
const bool cursorWasVisible = CursorMan.showMouse(false);
intro.start(getTotalPlayTime());
+ intro.draw();
while (!shouldQuit() && !intro.finished()) {
- bool skip = false;
+ bool skip = false, openMenu = false;
Common::Event event;
- while (_eventMan->pollEvent(event)) {
+ while (!openMenu && _eventMan->pollEvent(event)) {
if (event.type == Common::EVENT_LBUTTONDOWN || event.type == Common::EVENT_RBUTTONDOWN) {
skip = true;
- } else if (event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_START &&
- (event.customType == kSkip || event.customType == kCancelAction)) {
- skip = true;
+ } else if (event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_START) {
+ if (event.customType == kSkip || event.customType == kCancelAction)
+ skip = true;
+ else if (event.customType == kPauseMenu)
+ openMenu = true;
}
}
if (shouldQuit())
break;
+ if (openMenu) {
+ pauseMenu(menu, intro.screen());
+ continue;
+ }
const uint32 now = getTotalPlayTime();
intro.update(now);
if (skip)
@@ -117,18 +127,21 @@ Common::Error RunawayEngine::run() {
return Common::kUnsupportedColorMode;
setDebugger(new GUI::Debugger());
syncSoundSettings();
- const Common::Error introResult = playIntro();
+ const RunawayStrings strings(_language);
+ RunawayMenu menu(strings);
+ if (!menu.load())
+ return Common::Error(Common::kReadingFailed, "Cannot load the Runaway demo menu");
+ const Common::Error introResult = playIntro(menu);
if (introResult.getCode() != Common::kNoError || shouldQuit())
return introResult;
- const RunawayStrings strings(_language);
RunawayInventory inventory(strings);
RunawayScene5030 scene(_mixer, inventory, strings);
RunawayUI ui(_mixer, inventory, strings);
- RunawayMenu menu(strings);
- if (!scene.load() || !ui.load() || !menu.load())
- return Common::Error(Common::kReadingFailed, "Cannot load the Runaway demo room, actor or interface data");
+ if (!scene.load() || !ui.load())
+ return Common::Error(Common::kReadingFailed, "Cannot load the Runaway demo room, opening movie or interface data");
scene.start(getTotalPlayTime());
+ scene.draw();
CursorMan.showMouse(true);
_system->warpMouse(RunawayScene5030::kScreenWidth / 2, RunawayScene5030::kRoomTop + RunawayScene5030::kRoomHeight / 2);
@@ -136,12 +149,12 @@ Common::Error RunawayEngine::run() {
while (!shouldQuit()) {
const uint32 now = getTotalPlayTime();
Common::Point mouse = _eventMan->getMousePos();
- ui.update(now, mouse, scene.hotspotAt(mouse), scene.busy(), scene.speaking());
+ ui.update(now, mouse, scene.hotspotAt(mouse), scene.busy(), scene.speaking(), scene.inventoryPresentation());
bool openMenu = false;
Common::Event event;
while (!openMenu && _eventMan->pollEvent(event)) {
if (event.type == Common::EVENT_LBUTTONDOWN || event.type == Common::EVENT_RBUTTONDOWN) {
- ui.update(now, event.mouse, scene.hotspotAt(event.mouse), scene.busy(), scene.speaking());
+ ui.update(now, event.mouse, scene.hotspotAt(event.mouse), scene.busy(), scene.speaking(), scene.inventoryPresentation());
const RunawayUI::Command command = ui.click(event.type == Common::EVENT_RBUTTONDOWN);
switch (command.type) {
case RunawayUI::Command::kOpenMenu:
@@ -166,7 +179,7 @@ Common::Error RunawayEngine::run() {
}
} else if (event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_START || event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_END) {
mouse = _eventMan->getMousePos();
- ui.update(now, mouse, scene.hotspotAt(mouse), scene.busy(), scene.speaking());
+ ui.update(now, mouse, scene.hotspotAt(mouse), scene.busy(), scene.speaking(), scene.inventoryPresentation());
const bool pressed = event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_START;
switch (event.customType) {
case kPauseMenu:
@@ -235,7 +248,11 @@ Common::Error RunawayEngine::run() {
// The engine clock excludes time spent in ScummVM dialogs, keeping
// animation frames and subtitle deadlines in sync with paused audio.
scene.update(now, ui.inventoryOpen() || scene.busy() ? 0 : direction, ui.inventoryOpen());
- ui.update(now, mouse, scene.hotspotAt(mouse), scene.busy(), scene.speaking());
+ // The extended French demo's later rooms are not implemented yet;
+ // all three releases currently finish at the shared shack escape.
+ if (scene.escaped())
+ return playEnding(menu);
+ ui.update(now, mouse, scene.hotspotAt(mouse), scene.busy(), scene.speaking(), scene.inventoryPresentation());
scene.draw();
Graphics::ManagedSurface &screen = scene.screen();
const bool subtitles = !ConfMan.hasKey("subtitles") || ConfMan.getBool("subtitles") || ConfMan.getBool("speech_mute");
@@ -248,6 +265,46 @@ Common::Error RunawayEngine::run() {
return Common::kNoError;
}
+Common::Error RunawayEngine::playEnding(RunawayMenu &menu) {
+ RunawayEnding ending(_mixer, _language);
+ if (!ending.load())
+ return Common::Error(Common::kReadingFailed, "Cannot load the Runaway demo ending");
+ Graphics::ManagedSurface screen(kRunawayScreenWidth, kRunawayScreenHeight, _system->getScreenFormat());
+ const bool cursorWasVisible = CursorMan.showMouse(false);
+ ending.start(getTotalPlayTime());
+ ending.draw(screen);
+ while (!shouldQuit() && !ending.finished()) {
+ bool skip = false, openMenu = false;
+ Common::Event event;
+ while (!openMenu && _eventMan->pollEvent(event)) {
+ if (event.type == Common::EVENT_LBUTTONDOWN || event.type == Common::EVENT_RBUTTONDOWN)
+ skip = true;
+ else if (event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_START) {
+ if (event.customType == kSkip || event.customType == kCancelAction)
+ skip = true;
+ else if (event.customType == kPauseMenu)
+ openMenu = true;
+ }
+ }
+ if (shouldQuit())
+ break;
+ if (openMenu) {
+ pauseMenu(menu, screen);
+ continue;
+ }
+ const uint32 now = getTotalPlayTime();
+ ending.update(now);
+ if (skip)
+ ending.skip(now);
+ ending.draw(screen);
+ _system->copyRectToScreen(screen.getPixels(), screen.pitch, 0, 0, screen.w, screen.h);
+ _system->updateScreen();
+ _system->delayMillis(16);
+ }
+ CursorMan.showMouse(cursorWasVisible);
+ return Common::kNoError;
+}
+
void RunawayEngine::pauseMenu(RunawayMenu &menu, Graphics::ManagedSurface &screen) {
// PauseToken freezes the mixer and excludes menu time from the scene/UI
// clocks, including walking, speech deadlines and pickup sound cues.
diff --git a/engines/hollywood/runaway/engine.h b/engines/hollywood/runaway/engine.h
index 3c083338c92..0ff2097cbb4 100644
--- a/engines/hollywood/runaway/engine.h
+++ b/engines/hollywood/runaway/engine.h
@@ -52,7 +52,8 @@ public:
static Common::Array<Common::Keymap *> initKeymaps();
private:
- Common::Error playIntro();
+ Common::Error playIntro(RunawayMenu &menu);
+ Common::Error playEnding(RunawayMenu &menu);
void pauseMenu(RunawayMenu &menu, Graphics::ManagedSurface &screen);
Common::Language _language;
};
diff --git a/engines/hollywood/runaway/graphics.cpp b/engines/hollywood/runaway/graphics.cpp
index 53a3bb7b2cc..b97251ba0b2 100644
--- a/engines/hollywood/runaway/graphics.cpp
+++ b/engines/hollywood/runaway/graphics.cpp
@@ -28,9 +28,8 @@
namespace Hollywood {
-bool loadRunawaySurface(uint chunk, int width, int height, Graphics::ManagedSurface &surface) {
- Common::Array<byte> pixels;
- if (!readRunawayGlobalChunk(chunk, pixels) || pixels.size() != (uint)(width * height * 2))
+static bool decodeSurface(const Common::Array<byte> &pixels, int width, int height, Graphics::ManagedSurface &surface) {
+ if (width <= 0 || height <= 0 || pixels.size() != (uint64)width * height * 2)
return false;
surface.create(width, height, Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0));
for (int y = 0; y < height; ++y) {
@@ -41,6 +40,37 @@ bool loadRunawaySurface(uint chunk, int width, int height, Graphics::ManagedSurf
return true;
}
+bool loadRunawaySurface(uint chunk, int width, int height, Graphics::ManagedSurface &surface) {
+ Common::Array<byte> pixels;
+ return readRunawayGlobalChunk(chunk, pixels) && decodeSurface(pixels, width, height, surface);
+}
+
+bool loadRunawaySurface(ChunkArchive &archive, uint chunk, int width, int height, Graphics::ManagedSurface &surface) {
+ Common::Array<byte> pixels;
+ return archive.readVariableChunk(chunk, pixels) && decodeSurface(pixels, width, height, surface);
+}
+
+bool applyRunawayPatch(const Common::Array<byte> &patch, Graphics::ManagedSurface &surface, int yOffset) {
+ if (patch.size() < 2 || surface.format.bytesPerPixel != 2)
+ return false;
+ uint cursor = 2;
+ for (uint i = 0; i < READ_LE_UINT16(patch.data()); ++i) {
+ if (patch.size() - cursor < 6)
+ return false;
+ const uint x = READ_LE_UINT16(patch.data() + cursor);
+ const int y = READ_LE_UINT16(patch.data() + cursor + 2) + yOffset;
+ const uint length = READ_LE_UINT16(patch.data() + cursor + 4);
+ cursor += 6;
+ if (!length || x + length > (uint)surface.w || y < 0 || y >= surface.h || length * 2 > patch.size() - cursor)
+ return false;
+ uint16 *out = (uint16 *)surface.getBasePtr(x, y);
+ for (uint pixel = 0; pixel < length; ++pixel)
+ out[pixel] = READ_LE_UINT16(patch.data() + cursor + pixel * 2);
+ cursor += length * 2;
+ }
+ return cursor == patch.size();
+}
+
bool RunawayAnimation::load(ChunkArchive &archive, uint chunk, uint frames) {
_frames = 0;
return archive.readVariableChunk(chunk, _data) && validate(frames);
@@ -53,7 +83,7 @@ bool RunawayAnimation::load(const Common::Array<byte> &data, uint frames) {
bool RunawayAnimation::validate(uint frames) {
_frames = 0;
- if (!frames || frames > 1000 || _data.size() < frames * 14)
+ if (!frames || frames > 0xffff || _data.size() < frames * 14)
return false;
uint cursor = frames * 14;
for (uint frame = 0; frame < frames; ++frame) {
diff --git a/engines/hollywood/runaway/graphics.h b/engines/hollywood/runaway/graphics.h
index 36c1d94122f..78d0b562e40 100644
--- a/engines/hollywood/runaway/graphics.h
+++ b/engines/hollywood/runaway/graphics.h
@@ -33,6 +33,8 @@ class ChunkArchive;
// RESOURCE.000 has a ten-byte header followed by two 500-entry tables.
bool readRunawayGlobalChunk(uint chunk, Common::Array<byte> &data);
bool loadRunawaySurface(uint chunk, int width, int height, Graphics::ManagedSurface &surface);
+bool loadRunawaySurface(ChunkArchive &archive, uint chunk, int width, int height, Graphics::ManagedSurface &surface);
+bool applyRunawayPatch(const Common::Array<byte> &patch, Graphics::ManagedSurface &surface, int yOffset = 0);
enum {
kRunawayScreenWidth = 1024,
diff --git a/engines/hollywood/runaway/intro.h b/engines/hollywood/runaway/intro.h
index cc5d608a69c..047142ec463 100644
--- a/engines/hollywood/runaway/intro.h
+++ b/engines/hollywood/runaway/intro.h
@@ -38,7 +38,7 @@ public:
void update(uint32 now);
void draw();
bool finished() const { return _phase == kFinished; }
- const Graphics::ManagedSurface &screen() const { return _screen; }
+ Graphics::ManagedSurface &screen() { return _screen; }
private:
enum Phase { kLogo, kLogoAudio, kStoryFadeIn, kStory, kStoryFadeOut, kFinished };
diff --git a/engines/hollywood/runaway/presentation.cpp b/engines/hollywood/runaway/presentation.cpp
new file mode 100644
index 00000000000..8d066462241
--- /dev/null
+++ b/engines/hollywood/runaway/presentation.cpp
@@ -0,0 +1,326 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/file.h"
+#include "common/util.h"
+#include "common/str-enc.h"
+#include "image/bmp.h"
+#include "hollywood/resource.h"
+#include "hollywood/runaway/presentation.h"
+
+namespace Hollywood {
+
+static void dimViewport(Graphics::ManagedSurface &screen, uint brightness) {
+ for (int y = kRunawayViewportTop; y < kRunawayViewportTop + kRunawayViewportHeight; ++y) {
+ uint16 *pixels = (uint16 *)screen.getBasePtr(0, y);
+ for (int x = 0; x < screen.w; ++x) {
+ const uint16 p = pixels[x];
+ pixels[x] = (((p >> 11) * brightness / 1000) << 11) |
+ ((((p >> 5) & 63) * brightness / 1000) << 5) | ((p & 31) * brightness / 1000);
+ }
+ }
+}
+
+bool RunawayInterrogation::load() {
+ if (!_background.empty())
+ return true;
+ ChunkArchive archive;
+ if (!archive.open(Common::Path("RESOURCE.E04")) ||
+ !_text.loadStage("RESOURCE.003", "Runaway interrogation", 504) ||
+ !loadRunawaySurface(archive, 0, 1024, 600, _background))
+ return false;
+ const uint frames[] = {80, 53, 33};
+ for (uint i = 0; i < ARRAYSIZE(_actors); ++i) {
+ if (!_actors[i].load(archive, i + 1, frames[i]))
+ return false;
+ }
+ return true;
+}
+
+void RunawayInterrogation::start(uint32 now) {
+ _now = now;
+ _phrase = 0;
+ // The four native exchanges alternate a threat and Gina's reply.
+ const byte speakers[4][4] = {{0, 2, 0, 0}, {1, 2, 0, 0}, {1, 2, 0, 2}, {0, 2, 1, 2}};
+ const uint exchange = _random.getRandomNumber(3);
+ _phraseCount = exchange < 2 ? 2 : 4;
+ for (uint i = 0; i < _phraseCount; ++i)
+ _speakers[i] = speakers[exchange][i];
+ for (uint i = 0; i < ARRAYSIZE(_actors); ++i) {
+ _frames[i] = 0;
+ _idle[i] = false;
+ _lastTick[i] = now;
+ }
+ nextPhrase();
+}
+
+void RunawayInterrogation::nextPhrase() {
+ _row = 0;
+ _subtitle.clear();
+ if (finished()) {
+ _audio.stopSpeech();
+ _audio.stopEffect();
+ return;
+ }
+ const uint speaker = _speakers[_phrase];
+ const SceneSpeechCue cue = _text.stageCue(speaker, _random.getRandomNumber(speaker == 2 ? 3 : 2));
+ const uint count = MAX<uint>(1, cue.continuationCount);
+ if (cue.textRecordId < 500 || cue.textRecordId - 500 + count > _text._stageLargeRows.size() / 321 ||
+ !cue.voiceSampleId || cue.voiceSampleId + count > 6000)
+ error("Invalid Runaway interrogation speech cue");
+ _row = cue.textRecordId;
+ _lastRow = _row + count - 1;
+ _sample = cue.voiceSampleId;
+ showSpeechRow();
+}
+
+void RunawayInterrogation::showSpeechRow() {
+ _subtitle = Common::U32String(_text.largeTextRecord(_row), Common::kDos850);
+ const uint32 duration = _audio.playSpeech(_sample);
+ _deadline = _now + (duration ? MAX<uint>(1000, duration + 150) : MAX<uint>(3000, _subtitle.size() * 55));
+}
+
+void RunawayInterrogation::skipSpeech() {
+ if (!speaking())
+ return;
+ _audio.stopSpeech();
+ if (_row < _lastRow) {
+ ++_row;
+ ++_sample;
+ showSpeechRow();
+ } else {
+ ++_phrase;
+ nextPhrase();
+ }
+}
+
+void RunawayInterrogation::update(uint32 now) {
+ _now = now;
+ if (speaking() && !_audio.speechPlaying() && (int32)(now - _deadline) >= 0)
+ skipSpeech();
+ if (finished())
+ return;
+ const uint speakerActor[] = {1, 2, 0};
+ const uint idleEnd[] = {67, 39, 19};
+ const uint mouthBase[] = {67, 40, 20};
+ for (uint i = 0; i < ARRAYSIZE(_actors); ++i) {
+ const uint tick = i == 0 ? 60 : 80;
+ while (now - _lastTick[i] >= tick) {
+ _lastTick[i] += tick;
+ if (i == speakerActor[_speakers[_phrase]]) {
+ // Use the original speaking cels while the current line is active.
+ _frames[i] = mouthBase[i] + (_lastTick[i] / 90) % 6;
+ _idle[i] = true;
+ } else if (_idle[i]) {
+ _frames[i] = mouthBase[i] + (_random.getRandomNumber(14) == 0 ? 6 : 0);
+ if (_random.getRandomNumber(i == 0 ? 49 : 9) == 0) {
+ _idle[i] = false;
+ _frames[i] = 0;
+ }
+ } else if (_frames[i] < idleEnd[i]) {
+ ++_frames[i];
+ if (i == 2 && _frames[i] == 9)
+ _audio.playEffect(23, 255, 1);
+ if (i == 1 && (_frames[i] == 10 || _frames[i] == 33))
+ _audio.playEffect(_frames[i] == 10 ? 24 : 25, _frames[i] == 10 ? 102 : 255);
+ } else if (_random.getRandomNumber(i == 0 ? 1 : 4) == 0) {
+ _idle[i] = true;
+ }
+ }
+ }
+}
+
+void RunawayInterrogation::draw(Graphics::ManagedSurface &screen) const {
+ screen.clear();
+ screen.blitFrom(_background, Common::Point(0, kRunawayViewportTop));
+ const uint order[] = {1, 2, 0};
+ for (uint i : order)
+ _actors[i].draw(screen, _frames[i], 0, kRunawayViewportTop);
+}
+
+bool RunawayEnding::load() {
+ ChunkArchive archive, cards;
+ if (!archive.open(Common::Path("RESOURCE.E01")) || !cards.open(Common::Path("RESOURCE.X01")) ||
+ !loadRunawaySurface(archive, 0, 1024, 600, _outside) ||
+ !loadRunawaySurface(cards, 1, 1024, 600, _card) ||
+ !loadRunawaySurface(118, 48, 48, _demoLogo))
+ return false;
+ Common::Array<byte> patch;
+ for (uint chunk = 3; chunk <= 7; ++chunk) {
+ if (!archive.readVariableChunk(chunk, patch) || !applyRunawayPatch(patch, _outside))
+ return false;
+ }
+ const uint frames[] = {48, 700, 186, 31, 329, 307, 1052};
+ for (uint i = 0; i < ARRAYSIZE(_layers); ++i) {
+ // The native overview leaves chunk 13 inactive.
+ if (i != 4 && !_layers[i].load(archive, 9 + i, frames[i]))
+ return false;
+ }
+ Graphics::ManagedSurface scratch;
+ scratch.copyFrom(_outside);
+ for (uint i = 0; i < ARRAYSIZE(_occlusion); ++i) {
+ if (!archive.readVariableChunk(16 + i, _occlusion[i]) || !applyRunawayPatch(_occlusion[i], scratch))
+ return false;
+ }
+ return true;
+}
+
+void RunawayEnding::start(uint32 now) {
+ _stage = kOutside;
+ _started = _now = _lastTick = now;
+ _screenshot = 0;
+ _fadeDuration = 0;
+ _frames[0] = 0;
+ const uint ambient[] = {1, 2, 5};
+ for (uint i : ambient) {
+ _active[i] = _random.getRandomBit();
+ _frames[i] = _active[i] ? _random.getRandomNumber(_layers[i].frameCount() - 1) : _layers[i].frameCount() - 1;
+ }
+ // The two foreground bird tracks are alternatives, not simultaneous loops.
+ _active[6] = _random.getRandomBit();
+ _active[3] = !_active[6];
+ _frames[3] = _active[3] ? 0 : 30;
+ _frames[6] = _active[6] ? _random.getRandomNumber(79) : 1051;
+ // The overview's music continues through the screenshots and final card.
+ // Unlike room music it plays once; the native card waits for its tail.
+ _musicUntil = now + _audio.playMusic(21, false);
+ _audio.playEffect(12, 77, 0, true);
+}
+
+void RunawayEnding::nextSlide(uint32 now) {
+ _started = now;
+ _fadeDuration = 0;
+ _audio.stopEffect();
+ // 0x4446c0 visits Screenshots/01.bmp through 16.bmp. The native loader
+ // ignores absent or unsuitable images, allowing incomplete installations
+ // to reach the final card too. Keep just the current screenshot in memory.
+ while (++_screenshot <= 16) {
+ Common::File file;
+ if (!file.open(Common::Path(Common::String::format("%02u.bmp", _screenshot))))
+ continue;
+ Image::BitmapDecoder decoder;
+ if (!decoder.loadStream(file) || !decoder.getSurface() ||
+ decoder.getSurface()->w != kRunawayScreenWidth || decoder.getSurface()->h != kRunawayViewportHeight ||
+ decoder.getSurface()->format.bytesPerPixel < 3) {
+ warning("Runaway: invalid promotional screenshot %02u.bmp", _screenshot);
+ continue;
+ }
+ _slide.convertFrom(*decoder.getSurface(), _outside.format);
+ _stage = kSlideshow;
+ return;
+ }
+ _slide.free();
+ _stage = kCard;
+}
+
+void RunawayEnding::update(uint32 now) {
+ _now = now;
+ while (_stage == kOutside && now - _lastTick >= 80) {
+ _lastTick += 80;
+ _frames[0] = (_frames[0] + 1) % _layers[0].frameCount();
+ const uint ambient[] = {1, 2, 3, 5, 6};
+ for (uint i : ambient) {
+ if (_active[i]) {
+ if (_frames[i] + 1 < _layers[i].frameCount())
+ ++_frames[i];
+ else
+ _active[i] = false;
+ } else if (i != 3 && i != 6 && _random.getRandomNumber(i == 5 ? 49 : 9) == 0) {
+ _active[i] = true;
+ _frames[i] = 0;
+ }
+ }
+ }
+ if (_stage == kOutside && now - _started >= 12000) {
+ nextSlide(_started + 12000);
+ }
+ while (_stage == kSlideshow || _stage == kCard) {
+ if (!_fadeDuration) {
+ // The French release holds its larger final advertisement for
+ // twenty seconds; the German and Spanish cards hold for five.
+ uint32 holdEnd = _started + (_stage == kCard && _language == Common::FR_FRA ? 20500 : 5500);
+ if (_stage == kCard && (int32)(_musicUntil - holdEnd) > 0)
+ holdEnd = _musicUntil;
+ if ((int32)(now - holdEnd) < 0)
+ break;
+ _fadeStarted = holdEnd;
+ _fadeDuration = 500;
+ }
+ if (now - _fadeStarted < _fadeDuration)
+ break;
+ if (_stage == kSlideshow) {
+ nextSlide(_fadeStarted + _fadeDuration);
+ } else {
+ _stage = kFinished;
+ _audio.stopMusic();
+ }
+ }
+ if (_stage == kCard && _fadeDuration)
+ _audio.setMusicVolume(96 * (_fadeDuration - (now - _fadeStarted)) / _fadeDuration);
+}
+
+void RunawayEnding::skip(uint32 now) {
+ _now = now;
+ if (_stage == kOutside) {
+ nextSlide(now);
+ } else if ((_stage == kSlideshow || _stage == kCard) && !_fadeDuration && now - _started >= 500) {
+ _fadeStarted = now;
+ _fadeDuration = _stage == kCard ? 250 : 500;
+ }
+}
+
+void RunawayEnding::draw(Graphics::ManagedSurface &screen) const {
+ screen.clear();
+ const uint elapsed = _now - _started;
+ if (_stage == kOutside) {
+ screen.blitFrom(_outside, Common::Point(0, kRunawayViewportTop));
+ const uint order[] = {0, 2, 5, 1};
+ for (uint i : order)
+ _layers[i].draw(screen, _frames[i], 0, kRunawayViewportTop);
+ if (_active[1] && _frames[1] >= 257 && _frames[1] <= 336) {
+ applyRunawayPatch(_occlusion[0], screen, kRunawayViewportTop);
+ applyRunawayPatch(_occlusion[1], screen, kRunawayViewportTop);
+ } else if (_active[1] && _frames[1] >= 507 && _frames[1] <= 532) {
+ applyRunawayPatch(_occlusion[1], screen, kRunawayViewportTop);
+ }
+ _layers[3].draw(screen, _frames[3], 0, kRunawayViewportTop);
+ _layers[6].draw(screen, _frames[6], 0, kRunawayViewportTop);
+ dimViewport(screen, elapsed < 10000 ? 1000 : (12000 - MIN<uint>(12000, elapsed)) / 2);
+ } else if (_stage == kSlideshow || _stage == kCard) {
+ screen.blitFrom(_stage == kSlideshow ? _slide : _card, Common::Point(0, kRunawayViewportTop));
+ // The later demos blink different parts of their localized artwork
+ // (DE 0x4447d0, FR 0x44f190); the Spanish card has no blinking text.
+ const uint blinkTime = _fadeDuration ? _fadeStarted - _started : elapsed;
+ if (_stage == kCard && blinkTime >= 500 && ((blinkTime - 500) / 500) % 2) {
+ if (_language == Common::DE_DEU)
+ screen.fillRect(Common::Rect(372, 330 + kRunawayViewportTop, 652, 355 + kRunawayViewportTop), 0);
+ else if (_language == Common::FR_FRA)
+ screen.fillRect(Common::Rect(373, 183 + kRunawayViewportTop, 653, 208 + kRunawayViewportTop), 0);
+ }
+ const uint brightness = _fadeDuration ?
+ 1000 * (_fadeDuration - MIN<uint>(_fadeDuration, _now - _fadeStarted)) / _fadeDuration : MIN<uint>(1000, elapsed * 2);
+ dimViewport(screen, brightness);
+ }
+ if (_stage == kOutside || _stage == kSlideshow)
+ screen.blitFrom(_demoLogo, Common::Point(976, 720));
+}
+
+} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/presentation.h b/engines/hollywood/runaway/presentation.h
new file mode 100644
index 00000000000..5f8777dfda5
--- /dev/null
+++ b/engines/hollywood/runaway/presentation.h
@@ -0,0 +1,91 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef HOLLYWOOD_RUNAWAY_PRESENTATION_H
+#define HOLLYWOOD_RUNAWAY_PRESENTATION_H
+
+#include "common/random.h"
+#include "common/language.h"
+#include "common/ustr.h"
+#include "hollywood/runaway/audio.h"
+#include "hollywood/runaway/graphics.h"
+#include "hollywood/scene_text_store.h"
+
+namespace Hollywood {
+
+class RunawayInterrogation {
+public:
+ explicit RunawayInterrogation(Audio::Mixer *mixer) : _audio(mixer), _random("runawayInterrogation") {}
+ bool load();
+ void start(uint32 now);
+ void update(uint32 now);
+ void skipSpeech();
+ void draw(Graphics::ManagedSurface &screen) const;
+ bool finished() const { return _phrase >= _phraseCount; }
+ bool speaking() const { return _row != 0; }
+ const Common::U32String &subtitle() const { return _subtitle; }
+
+private:
+ void nextPhrase();
+ void showSpeechRow();
+ RunawayAudio _audio;
+ Common::RandomSource _random;
+ SceneTextStore _text;
+ Graphics::ManagedSurface _background;
+ RunawayAnimation _actors[3];
+ uint _frames[3] = {};
+ bool _idle[3] = {};
+ byte _speakers[4] = {}, _phrase = 0, _phraseCount = 0;
+ uint16 _row = 0, _lastRow = 0, _sample = 0;
+ uint32 _now = 0, _deadline = 0, _lastTick[3] = {};
+ Common::U32String _subtitle;
+};
+
+class RunawayEnding {
+public:
+ RunawayEnding(Audio::Mixer *mixer, Common::Language language) : _audio(mixer), _random("runawayEnding"), _language(language) {}
+ bool load();
+ void start(uint32 now);
+ void update(uint32 now);
+ void skip(uint32 now);
+ void draw(Graphics::ManagedSurface &screen) const;
+ bool finished() const { return _stage == kFinished; }
+
+private:
+ enum Stage { kOutside, kSlideshow, kCard, kFinished };
+ void nextSlide(uint32 now);
+ RunawayAudio _audio;
+ Common::RandomSource _random;
+ Common::Language _language;
+ Graphics::ManagedSurface _outside, _card, _slide, _demoLogo;
+ RunawayAnimation _layers[7];
+ Common::Array<byte> _occlusion[2];
+ uint _frames[7] = {};
+ bool _active[7] = {};
+ Stage _stage = kOutside;
+ uint _screenshot = 0;
+ uint32 _started = 0, _now = 0, _lastTick = 0;
+ uint32 _fadeStarted = 0, _fadeDuration = 0, _musicUntil = 0;
+};
+
+} // End of namespace Hollywood
+
+#endif
diff --git a/engines/hollywood/runaway/scene5030.cpp b/engines/hollywood/runaway/scene5030.cpp
index 6f97eefa266..b0249254333 100644
--- a/engines/hollywood/runaway/scene5030.cpp
+++ b/engines/hollywood/runaway/scene5030.cpp
@@ -33,33 +33,32 @@ namespace {
struct SceneHotspot {
int x, y;
- uint16 description;
byte facing;
};
// Approach points and facings from the scene initializer at 0x439e40. The
// hit regions themselves are decoded from E03; these are not bounding boxes.
const SceneHotspot kHotspots[] = {
- {0, 0, 0, 0},
- {101, 507, 511, 7},
- {101, 507, 519, 7},
- {406, 383, 520, 0},
- {1062, 473, 523, 1},
- {942, 407, 528, 0},
- {1215, 542, 530, 7},
- {406, 383, 572, 7},
- {1062, 473, 535, 7},
- {1019, 405, 552, 0},
- {1215, 542, 554, 7},
- {1215, 542, 557, 7},
- {495, 381, 565, 7},
- {873, 409, 567, 1},
- {974, 406, 570, 7},
- {262, 426, 614, 0},
- {262, 426, 576, 7},
- {609, 379, 577, 1},
- {1062, 473, 580, 1},
- {1215, 542, 557, 7}
+ {0, 0, 0},
+ {101, 507, 7},
+ {101, 507, 7},
+ {406, 383, 0},
+ {1062, 473, 1},
+ {942, 407, 0},
+ {1215, 542, 7},
+ {406, 383, 7},
+ {1062, 473, 7},
+ {1019, 405, 0},
+ {1215, 542, 7},
+ {1215, 542, 7},
+ {495, 381, 7},
+ {873, 409, 1},
+ {974, 406, 7},
+ {262, 426, 0},
+ {262, 426, 7},
+ {609, 379, 1},
+ {1062, 473, 1},
+ {1215, 542, 7}
};
} // End of anonymous namespace
@@ -88,7 +87,9 @@ bool RunawayScene5030::load() {
offset += length;
}
if (offset != _mask.size() || !_actor.load() ||
- !_intro.load(_archive, 47, 20) || !_climb.load(_archive, 42, 18) || !loadRoomGraphics())
+ !_intro.load(_archive, 47, 20) || !_climb.load(_archive, 42, 18) ||
+ !_hatch.load(_archive, 14, 2) || !loadRoomGraphics() ||
+ !_video.load("DATAVE03.001"))
return false;
const uint rows = _text._stageLargeRows.size() / 321;
_voiceSamples.resize(rows, 0);
@@ -139,9 +140,17 @@ bool RunawayScene5030::loadRoomGraphics() {
if (_pickedUp[hotspots[i]])
drawPatch(_pickupPatches[i]);
}
- drawPatch(_lidOpen ? _openLidPatch : _closedLidPatch);
- if (_unplugged)
- drawPatch(_unplugPatch);
+ if (_coolerMoved) {
+ applyPatch(_hatchState == kLocked ? 12 : 13);
+ if (_hatchState == kOpen)
+ applyPatch(24);
+ } else {
+ drawPatch(_lidOpen ? _openLidPatch : _closedLidPatch);
+ if (_unplugged)
+ drawPatch(_unplugPatch);
+ if (_ice == kDrained)
+ applyPatch(11);
+ }
drawPatch(overlay);
return true;
}
@@ -149,7 +158,7 @@ bool RunawayScene5030::loadRoomGraphics() {
void RunawayScene5030::start(uint32 now) {
_now = _lastUpdate = now;
_audio.playMusic(11);
- startAction(kIntro);
+ startAction(kIntroVideo);
}
void RunawayScene5030::setCameraX(int x) {
@@ -187,17 +196,37 @@ void RunawayScene5030::drawPatch(const Common::Array<byte> &patch) {
}
}
+void RunawayScene5030::applyPatch(uint chunk) {
+ Common::Array<byte> patch;
+ if (!loadPatch(chunk, patch))
+ error("Cannot load Runaway room patch %u", chunk);
+ drawPatch(patch);
+}
+
byte RunawayScene5030::hotspotAt(Common::Point mouse) const {
if (mouse.x < 0 || mouse.x >= kScreenWidth || mouse.y < kRoomTop || mouse.y >= kRoomTop + kRoomHeight)
return 0;
byte id = _maps[256 + _mask[(mouse.y - kRoomTop) * kRoomWidth + mouse.x + _cameraX]];
- // The initial cooler hides the hatch and its later position. These remaps
- // correspond to the native room-state updater at 0x438ce0.
- if (id == 2)
+ // Resolve the original mask through the current puzzle state. In particular,
+ // the drain and hatch overlap, and the moved cooler covers its old lid target.
+ if (id == 2 && !_examined[1])
id = 1;
- if (id == 6 || id == 20)
- id = 8;
- if (id == 21 || (id == 10 && _unplugged))
+ if (_coolerMoved) {
+ if (id == 20 || id == 21 || id == 18)
+ id = 8;
+ else if (id == 8 || id == 19)
+ id = 0;
+ else if (id == 11)
+ id = 6;
+ } else {
+ if (id == 6 || id == 20)
+ id = 8;
+ else if (id == 21)
+ id = 0;
+ else if (id == 19)
+ id = 11;
+ }
+ if (id == 10 && _unplugged)
id = 0;
return id < ARRAYSIZE(kHotspots) && !_pickedUp[id] ? id : 0;
}
@@ -311,14 +340,18 @@ Common::U32String RunawayScene5030::actionCaption(byte id, RunawayVerb verb, byt
if (!id)
return Common::U32String();
if (verb == kVerbLook)
- return _strings.text(id == 3 || id == 4 ? RunawayStrings::kLookThrough : RunawayStrings::kLook) + name;
+ return _strings.text(id == 2 || id == 3 || id == 4 ? RunawayStrings::kLookThrough : RunawayStrings::kLook) + name;
+ if (id == 6 && _hatchState == kOpen)
+ return _strings.text(RunawayStrings::kLeaveHatch);
RunawayStrings::TextId action = RunawayStrings::kUse;
if (id == 5 || id == 9 || id == 14 || id == 16 || id == 17)
action = RunawayStrings::kTake;
else if (id == 18)
action = _lidOpen ? RunawayStrings::kClose : RunawayStrings::kOpen;
else if (id == 8)
- action = _lidOpen ? RunawayStrings::kMove : RunawayStrings::kOpen;
+ action = RunawayStrings::kMove;
+ else if (id == 11)
+ action = _ice == kDrained ? RunawayStrings::kClose : RunawayStrings::kOpen;
else if (id == 10)
return _strings.text(RunawayStrings::kUnplugCooler);
else if (id == 12)
@@ -353,6 +386,10 @@ void RunawayScene5030::sayCue(uint16 cue, byte variation) {
}
void RunawayScene5030::skipSpeech() {
+ if (_action == kPeekConversation) {
+ _interrogation.skipSpeech();
+ return;
+ }
if (!_speechRow)
return;
_audio.stopSpeech();
@@ -383,7 +420,8 @@ void RunawayScene5030::click(Common::Point mouse, RunawayVerb verb, byte item) {
_pendingItem = item;
_pendingVerb = verb;
_committedCaption = actionCaption(id, verb, item);
- const Common::Point target = id ? Common::Point(kHotspots[id].x, kHotspots[id].y) :
+ const Common::Point target = id == 8 && _coolerMoved ? Common::Point(1054, 448) :
+ id ? Common::Point(kHotspots[id].x, kHotspots[id].y) :
Common::Point(mouse.x + _cameraX, mouse.y - kRoomTop);
walkTo(target);
}
@@ -393,11 +431,16 @@ void RunawayScene5030::pickUp(byte hotspot, byte item, uint patch) {
return;
_pickedUp[hotspot] = true;
drawPatch(_pickupPatches[patch]);
- sayInventory(RunawayInventory::Reply(18, 0));
+ if (hotspot == 14 || hotspot == 17)
+ sayCue(hotspot == 14 ? 26 : 31, 0);
+ else
+ sayInventory(RunawayInventory::Reply(18, _random.getRandomNumber(2)));
}
void RunawayScene5030::useItem(byte item, byte hotspot) {
_inventory.select(0);
+ if (!_inventory.contains(item))
+ return;
// Dispatch the room's item actions separately from its ordinary verbs.
// Original rejected actions use the shared, voiced inventory responses.
if (item == 1 && hotspot == 3) {
@@ -411,19 +454,93 @@ void RunawayScene5030::useItem(byte item, byte hotspot) {
} else {
// Load before committing the interaction, so missing/corrupt movie
// data cannot leave Brian halfway through climbing onto the cooler.
- if (!_cleanVideo.load("DATAVE01.001"))
+ if (!_video.load("DATAVE01.001"))
error("Cannot load Runaway cleaning movie DATAVE01.001");
startAction(kCleanWindowSpeech);
sayCue(33, 1);
}
} else if (item == 3 && hotspot == 4) {
sayCue(39, 0);
+ } else if (item == 2 && hotspot == 4) {
+ sayCue(38, 0);
+ } else if (item == 2 && hotspot == 6) {
+ if (_hatchState == kLocked)
+ waitForSpeech(34, 0, kPryHatch);
+ else
+ sayCue(34, _hatchState == kUnlocked ? 2 : 3);
} else {
sayInventory(RunawayInventory::Reply(1, 0));
}
}
+void RunawayScene5030::examine(byte id) {
+ const bool examined = _examined[id];
+ _examined[id] = true;
+ switch (id) {
+ case 1: sayCue(1, _peeked ? 1 : 0); break;
+ case 2: startAction(kPeekDoor); break;
+ case 3: sayCue(5, 0); break;
+ case 4: sayCue(7, _windowClean ? 1 : 0); break;
+ case 5: sayCue(9, examined ? 1 : 0); break;
+ case 6: sayCue(_hatchState == kOpen ? 12 : 10, _hatchState == kUnlocked ? 1 : 0); break;
+ case 7: sayCue(27, examined ? 1 : 0); break;
+ case 8:
+ _coolerInspected |= _lidOpen;
+ sayCue(13, _coolerMoved ? 0 : !_lidOpen ? 1 : _ice == kDrained ? 6 :
+ _ice == kMelted ? 5 : _windowClean ? (_unplugged ? 5 : 4) : (_unplugged ? 3 : 2));
+ break;
+ case 9: sayCue(15, examined ? 1 : 0); break;
+ case 10: sayCue(16, 0); break;
+ case 11: sayCue(18, 0); break;
+ case 12: sayCue(21, 0); break;
+ case 13: sayCue(23, 0); break;
+ case 14: sayCue(25, 0); break;
+ case 15: sayCue(40, 0); break;
+ case 16: sayCue(29, 0); break;
+ case 17: sayCue(30, examined ? 1 : 0); break;
+ case 18: sayCue(32, _lidOpen ? 1 : 0); break;
+ default: break;
+ }
+}
+
+void RunawayScene5030::collect(byte hotspot) {
+ _pickupHotspot = hotspot;
+ if (!_examined[hotspot] && (hotspot == 5 || hotspot == 9 || hotspot == 17)) {
+ _examined[hotspot] = true;
+ waitForSpeech(hotspot == 5 ? 9 : hotspot == 9 ? 15 : 30, 0, kPickup);
+ } else {
+ startAction(kPickup);
+ }
+}
+
+void RunawayScene5030::waitForSpeech(uint16 cue, byte variation, Action next) {
+ startAction(kWaitSpeech);
+ _afterSpeech = next;
+ sayCue(cue, variation);
+}
+
+void RunawayScene5030::walkForAction(Common::Point target, byte facing, Action next) {
+ startAction(kWalkingAction);
+ _afterWalk = next;
+ _actionFacing = facing;
+ walkTo(target);
+}
+
+void RunawayScene5030::setPosition(Common::Point position, byte facing) {
+ _position = position;
+ _x = position.x;
+ _y = position.y;
+ _facing = facing;
+ _path.clear();
+ _pathIndex = 0;
+}
+
void RunawayScene5030::arrive() {
+ if (_action == kWalkingAction) {
+ _facing = _actionFacing;
+ startAction(_afterWalk);
+ return;
+ }
const byte id = _pendingHotspot, item = _pendingItem;
_pendingHotspot = _pendingItem = 0;
_committedCaption.clear();
@@ -433,33 +550,47 @@ void RunawayScene5030::arrive() {
if (item) {
useItem(item, id);
} else if (_pendingVerb == kVerbLook) {
- _examined[id] = true;
- if (id == 18)
- say(_lidOpen ? 581 : 580);
- else if (id == 4)
- sayCue(7, _windowClean ? 1 : 0);
- else if (id == 8)
- say(!_lidOpen ? 535 : _unplugged ? 537 : 536);
+ examine(id);
+ } else if (id == 5 || id == 9 || id == 14 || id == 16 || id == 17) {
+ collect(id);
+ } else if (id == 18) {
+ if (_ice != kFrozen)
+ sayCue(32, 2);
+ else
+ startAction(_lidOpen ? kCloseLid : kOpenLid);
+ } else if (id == 8) {
+ if (_coolerMoved)
+ sayCue(14, 0);
else
- say(kHotspots[id].description);
- } else if (id == 5) {
- pickUp(id, 8, 0);
- } else if (id == 9) {
- pickUp(id, 1, 1);
- } else if (id == 14) {
- pickUp(id, 2, 2);
- } else if (id == 16) {
- pickUp(id, 24, 3);
- } else if (id == 17) {
- pickUp(id, 3, 4);
- } else if (id == 18 || (id == 8 && !_lidOpen)) {
- startAction(_lidOpen ? kCloseLid : kOpenLid);
+ walkForAction(Common::Point(1222, 538), 7, _ice == kDrained ? kRevealHatch : kTryMoveCooler);
} else if (id == 10 && !_unplugged) {
- startAction(kUnplug);
+ if (_coolerInspected)
+ startAction(kUnplug);
+ else
+ sayInventory(RunawayInventory::Reply(25, 0));
+ } else if (id == 11) {
+ if (_ice == kDrained)
+ sayCue(19, 3);
+ else if (_ice == kMelted)
+ waitForSpeech(19, 1, kDrainCooler);
+ else if (_coolerInspected)
+ sayCue(19, 0);
+ else
+ sayInventory(RunawayInventory::Reply(25, 0));
+ } else if (id == 6) {
+ if (_hatchState == kLocked)
+ sayCue(11, 0);
+ else if (_hatchState == kUnlocked)
+ startAction(kOpenHatch);
+ else if (_hatchState == kOpen)
+ waitForSpeech(42, 0, kEscape);
+ } else if (id == 7 && !_examined[7]) {
+ _examined[7] = true;
+ waitForSpeech(27, 0, kShirt);
} else {
- const uint16 responses[] = {0, 512, 519, 521, 526, 528, 532, 572, 546, 552,
- 555, 558, 566, 569, 570, 617, 576, 577, 580, 558};
- say(responses[id]);
+ const uint16 cues[] = {0, 2, 4, 6, 8, 0, 11, 28, 14, 0, 17, 19, 22, 24, 26, 41};
+ if (id < ARRAYSIZE(cues))
+ sayCue(cues[id], 0);
}
}
@@ -468,26 +599,83 @@ void RunawayScene5030::startAction(Action action) {
_actionStarted = _now;
_step = 0;
stopSpeech();
+ uint chunk = 0, frames = 0;
+ switch (action) {
+ case kIntroLookAround: waitForSpeech(0, 1, kIntroInventory); break;
+ case kIntroInventory:
+ setPosition(_position, 4);
+ sayCue(0, 2);
+ break;
+ case kIntroListen: waitForSpeech(0, 3, kIntroWalkToDoor); break;
+ case kIntroWalkToDoor: walkForAction(Common::Point(101, 507), 7, kIntroExamineDoor); break;
+ case kIntroExamineDoor:
+ _examined[1] = true;
+ waitForSpeech(1, 0, kPeekDoor);
+ break;
+ case kPickup:
+ _action = kNone;
+ switch (_pickupHotspot) {
+ case 5: pickUp(5, 8, 0); break;
+ case 9: pickUp(9, 1, 1); break;
+ case 14: pickUp(14, 2, 2); break;
+ case 16: pickUp(16, 24, 3); break;
+ case 17: pickUp(17, 3, 4); break;
+ default: break;
+ }
+ break;
+ case kShirt: _action = kNone; sayCue(28, 0); break;
+ case kMeltIce: waitForSpeech(20, 0, kMeltWait); break;
+ case kInspectIce: walkForAction(Common::Point(1062, 473), 1, kFinishMelting); break;
+ case kFinishMelting: _ice = kMelted; _action = kNone; sayCue(13, 5); break;
+ case kTryMoveCooler: chunk = _windowClean ? 37 : 38; frames = 26; break;
+ case kRevealHatch: waitForSpeech(14, 4, kMoveCooler); break;
+ case kMoveCooler: chunk = 41; frames = 83; applyPatch(23); break;
+ case kFinishMoving: walkForAction(Common::Point(1215, 542), 7, kHatchFound); break;
+ case kHatchFound: _action = kNone; sayCue(14, 6); break;
+ case kDrainCooler:
+ chunk = 39;
+ frames = 59;
+ if (!_water.load(_archive, 33, 97))
+ error("Cannot load Runaway draining animation");
+ break;
+ case kFinishDraining: _action = kNone; sayCue(19, 2); break;
+ case kPryHatch: chunk = 32; frames = 43; break;
+ case kOpenHatch: chunk = 36; frames = 47; applyPatch(24); break;
+ case kEscape: chunk = 35; frames = 37; break;
+ case kPeekDoor: chunk = 22; frames = 19; break;
+ case kReturnFromPeek: chunk = 22; frames = 19; break;
+ default: break;
+ }
+ if (frames && !_actionAnimation.load(_archive, chunk, frames))
+ error("Cannot load Runaway action animation %u", chunk);
debugC(1, kDebugScene, "Runaway demo: animation %u started", (uint)action);
}
void RunawayScene5030::finishAction() {
const Action completed = _action;
_action = kNone;
- if (completed == kIntro) {
- say(500);
+ if (completed == kIntroVideo) {
+ _video.close();
+ startAction(kIntro);
+ } else if (completed == kIntro) {
+ // 0x4377a0: wake up, lament the theft in the inventory close-up,
+ // then walk to the door and listen before giving control to the player.
+ waitForSpeech(0, 0, kIntroLookAround);
} else if (completed == kOpenLid || completed == kCloseLid) {
_lidOpen = completed == kOpenLid;
drawPatch(_lidOpen ? _openLidPatch : _closedLidPatch);
_facing = 1;
- say(_lidOpen ? (_unplugged ? 537 : 536) : 580);
+ if (_lidOpen && !_coolerInspected) {
+ _coolerInspected = true;
+ sayCue(13, 2);
+ }
} else if (completed == kUnplug) {
_unplugged = true;
drawPatch(_unplugPatch);
_facing = 7;
- say(555);
+ sayCue(17, 0);
} else if (completed == kCleanWindowVideo) {
- _cleanVideo.close();
+ _video.close();
_audio.stopEffect();
_windowClean = true;
_inventory.soilCloth();
@@ -495,6 +683,40 @@ void RunawayScene5030::finishAction() {
error("Cannot load Runaway sunlit room resources");
_facing = 1;
sayCue(33, 2);
+ } else if (completed == kMeltWait) {
+ waitForSpeech(20, 1, kInspectIce);
+ } else if (completed == kTryMoveCooler) {
+ sayCue(14, _ice == kMelted ? 3 : 2);
+ } else if (completed == kMoveCooler) {
+ _coolerMoved = true;
+ _hatchState = kLocked;
+ if (!loadRoomGraphics())
+ error("Cannot rebuild Runaway room after moving the cooler");
+ setPosition(Common::Point(1156, 468), 3);
+ waitForSpeech(14, 5, kFinishMoving);
+ } else if (completed == kDrainCooler) {
+ _ice = kDrained;
+ applyPatch(11);
+ walkForAction(Common::Point(1062, 473), 1, kFinishDraining);
+ } else if (completed == kPryHatch || completed == kOpenHatch) {
+ _hatchState = completed == kPryHatch ? kUnlocked : kOpen;
+ if (!loadRoomGraphics())
+ error("Cannot rebuild Runaway hatch graphics");
+ if (completed == kPryHatch)
+ sayCue(34, 1);
+ } else if (completed == kEscape) {
+ _escaped = true;
+ _audio.stopMusic();
+ _audio.stopEffect();
+ } else if (completed == kPeekDoor) {
+ if (!_interrogation.load())
+ error("Cannot load Runaway interrogation scene");
+ startAction(kPeekConversation);
+ _interrogation.start(_now);
+ } else if (completed == kReturnFromPeek) {
+ _facing = 4;
+ sayCue(_peeked ? 3 : 1, _peeked ? _random.getRandomNumber(3) : 1);
+ _peeked = true;
}
debugC(1, kDebugScene, "Runaway demo: animation %u finished, lid=%u unplugged=%u",
(uint)completed, (uint)_lidOpen, (uint)_unplugged);
@@ -505,55 +727,124 @@ void RunawayScene5030::skipVideo() {
finishAction();
}
-void RunawayScene5030::update(uint32 now, int scrollDirection, bool inventoryOpen) {
- _now = now;
- const uint elapsed = MIN<uint>(100, now - _lastUpdate);
- const uint32 pausedTime = now - _lastUpdate;
- _lastUpdate = now;
- if (speaking() && !_audio.speechPlaying() && (int32)(now - _subtitleUntil) >= 0)
- skipSpeech();
- if (inventoryOpen) {
- _actionStarted += pausedTime;
- _walkStarted += pausedTime;
- return;
- }
- if (_action == kCleanWindowSpeech) {
+void RunawayScene5030::updateAction() {
+ const uint previousStep = _step;
+ const uint32 elapsed = _now - _actionStarted;
+ if (_action == kWaitSpeech) {
+ if (!speaking())
+ startAction(_afterSpeech);
+ } else if (_action == kIntroInventory) {
+ if (!speaking())
+ startAction(kIntroListen);
+ } else if (_action == kPeekConversation) {
+ _interrogation.update(_now);
+ if (_interrogation.finished())
+ startAction(kReturnFromPeek);
+ } else if (_action == kCleanWindowSpeech) {
if (!speaking())
startAction(kCleanWindowClimb);
} else if (_action == kCleanWindowClimb) {
- // 0x4361e0 uses 60 ms ticks and repeats its first animation cel.
- _step = (now - _actionStarted) / 60;
+ _step = elapsed / 60;
if (_step >= 18)
startAction(kCleanWindowVideo);
- } else if (_action == kCleanWindowVideo) {
- const uint previousStep = _step;
- _step = (uint64)(now - _actionStarted) * 24 / 1000;
- if (_step >= _cleanVideo.frameCount()) {
+ } else if (playingVideo()) {
+ _step = (uint64)elapsed * 24 / 1000;
+ // Both demo movies run at 24 fps. Dispatch callbacks on crossing a
+ // frame, including delayed updates, so each effect plays exactly once.
+ if (_action == kIntroVideo && previousStep < 353 && _step >= 353)
+ _audio.playFootstep(3, _random.getRandomBit());
+ if (_action == kCleanWindowVideo && previousStep < 56 && _step >= 56)
+ _audio.playEffect(22);
+ if (_step >= _video.frameCount()) {
finishAction();
- } else {
- if (!_cleanVideo.decodeToFrame(_step))
- error("Cannot decode Runaway cleaning movie frame %u", _step);
- // Original 0x4329d0 starts RESOURCE.S03 effect 22 at frame 56.
- if (previousStep < 56 && _step >= 56)
- _audio.playEffect(22);
+ } else if (!_video.decodeToFrame(_step)) {
+ error("Cannot decode Runaway movie frame %u", _step);
}
- } else if (_action != kNone) {
- const uint previousStep = _step;
- _step = (now - _actionStarted) / 80;
- // Frame triggers in 0x437110/0x4373e0 (lid) and 0x435a50 (plug).
- if (_action == kOpenLid || _action == kCloseLid) {
+ } else if (_action == kMeltWait) {
+ if (elapsed >= 3000)
+ finishAction();
+ } else if (_action == kDrainCooler) {
+ // Crouch at 60 ms per cel, hold while the water runs at 80 ms,
+ // then stand up. The actor and water tracks have separate native clocks.
+ _step = elapsed < 2700 ? elapsed / 60 : elapsed < 10380 ? 45 : 45 + (elapsed - 10380) / 60;
+ if (previousStep < 41 && _step >= 41)
+ _audio.playEffect(28);
+ if (previousStep < 44 && _step >= 44) {
+ _audio.playEffect(16, 204, 1);
+ applyPatch(11);
+ }
+ if (_step >= 81)
+ finishAction();
+ } else if (_action != kNone && _action != kWalkingAction && _action != kPeekConversation) {
+ _step = elapsed / 60;
+ uint length = 0;
+ switch (_action) {
+ case kIntro:
+ length = 19;
+ if (previousStep < 5 && _step >= 5)
+ _audio.playFootstep(3, _random.getRandomBit(), 179);
+ break;
+ case kOpenLid:
+ case kCloseLid: {
+ length = 33;
const uint start = _action == kOpenLid ? 18 : 11;
if (previousStep < start && _step >= start)
_audio.playEffect(80, 153);
if (previousStep < start + 4 && _step >= start + 4)
_audio.stopEffect();
- } else if (_action == kUnplug && previousStep < 45 && _step >= 45) {
- _audio.playEffect(83);
+ break;
+ }
+ case kUnplug:
+ length = 83;
+ if (previousStep < 45 && _step >= 45)
+ _audio.playEffect(83);
+ break;
+ case kTryMoveCooler:
+ length = 74;
+ if (previousStep < 13 && _step >= 13)
+ sayCue(14, 1);
+ break;
+ case kMoveCooler:
+ length = 83;
+ if (previousStep < 27 && _step >= 27)
+ _audio.playEffect(29);
+ break;
+ case kPryHatch:
+ length = 57;
+ if (previousStep < 30 && _step >= 30)
+ _audio.playEffect(30);
+ if (previousStep < 31 && _step >= 31)
+ applyPatch(13);
+ break;
+ case kOpenHatch:
+ length = 47;
+ if (previousStep < 25 && _step >= 25)
+ _audio.playEffect(17);
+ break;
+ case kEscape: length = 37; break;
+ case kPeekDoor:
+ case kReturnFromPeek: length = 20; break;
+ default: break;
}
- const uint length = _action == kIntro ? 20 : _action == kUnplug ? 83 : 33;
- if (_step >= length)
+ if (length && _step >= length)
finishAction();
- } else if (_pathIndex < _path.size()) {
+ }
+}
+
+void RunawayScene5030::update(uint32 now, int scrollDirection, bool inventoryOpen) {
+ _now = now;
+ const uint elapsed = MIN<uint>(100, now - _lastUpdate);
+ const uint32 pausedTime = now - _lastUpdate;
+ _lastUpdate = now;
+ if (_speechRow && !_audio.speechPlaying() && (int32)(now - _subtitleUntil) >= 0)
+ skipSpeech();
+ if (inventoryOpen && !inventoryPresentation()) {
+ _actionStarted += pausedTime;
+ _walkStarted += pausedTime;
+ return;
+ }
+ updateAction();
+ if ((_action == kNone || _action == kWalkingAction) && _pathIndex < _path.size()) {
float travel = elapsed * 0.18f;
while (travel > 0 && _pathIndex < _path.size()) {
const Common::Point target = _path[_pathIndex];
@@ -584,19 +875,26 @@ void RunawayScene5030::update(uint32 now, int scrollDirection, bool inventoryOpe
arrive();
}
}
+ if (_action == kNone && !speaking() && _pathIndex == _path.size() &&
+ _windowClean && _unplugged && _lidOpen && _ice == kFrozen)
+ walkForAction(Common::Point(900, 473), 2, kMeltIce);
const bool walking = _pathIndex < _path.size();
_actor.setFrame(_facing, walking ? 1 + ((now - _walkStarted) / 70) % 18 : 0);
if (scrollDirection)
_cameraX += scrollDirection * MAX<int>(1, elapsed / 2);
else if (walking || (_action != kNone && _action != kIntro))
- _cameraX += CLIP<int>(_position.x - kScreenWidth / 2 - _cameraX, -8, 8);
+ _cameraX += CLIP<int>(_position.x - kScreenWidth / 2 - _cameraX, -MIN<int>(8, elapsed), MIN<int>(8, elapsed));
setCameraX(_cameraX);
}
void RunawayScene5030::draw() {
_screen.clear();
+ if (_action == kPeekConversation) {
+ _interrogation.draw(_screen);
+ return;
+ }
if (playingVideo()) {
- _cleanVideo.draw(_screen, Common::Rect(0, kRoomTop, kScreenWidth, kRoomTop + kRoomHeight));
+ _video.draw(_screen, Common::Rect(0, kRoomTop, kScreenWidth, kRoomTop + kRoomHeight));
return;
}
_screen.copyRectToSurface(_background, 0, kRoomTop,
@@ -606,9 +904,12 @@ void RunawayScene5030::draw() {
lidFrame = CLIP<int>((int)_step - 17, 0, 4);
else if (_action == kCloseLid)
lidFrame = CLIP<int>(15 - (int)_step, 0, 4);
- _lid.draw(_screen, lidFrame, _cameraX, kRoomTop);
+ if (!_coolerMoved && _action != kMoveCooler)
+ _lid.draw(_screen, lidFrame, _cameraX, kRoomTop);
+ if (_hatchState >= kUnlocked && _action != kOpenHatch)
+ _hatch.draw(_screen, _hatchState == kOpen ? 1 : 0, _cameraX, kRoomTop);
if (_action == kIntro) {
- _intro.draw(_screen, _step, _cameraX, kRoomTop);
+ _intro.draw(_screen, MAX<int>(0, (int)_step - 1), _cameraX, kRoomTop);
} else if (_action == kOpenLid || _action == kCloseLid) {
_lidActor.draw(_screen, _action == kOpenLid ? _step : 32 - _step, _cameraX, kRoomTop);
} else if (_action == kUnplug) {
@@ -617,9 +918,39 @@ void RunawayScene5030::draw() {
_unplug.draw(_screen, frame, _cameraX, kRoomTop);
} else if (_action == kCleanWindowClimb) {
_climb.draw(_screen, MAX<int>(0, (int)_step - 1), _cameraX, kRoomTop);
+ } else if (_action == kTryMoveCooler) {
+ _actionAnimation.draw(_screen, _step < 25 ? _step : _step < 50 ? 25 : 74 - _step, _cameraX, kRoomTop);
+ } else if (_action == kMoveCooler) {
+ _actionAnimation.draw(_screen, _step, _cameraX, kRoomTop);
+ } else if (_action == kDrainCooler) {
+ const uint frame = _step <= 47 ? (_step ? _step - 1 : 0) : 82 - _step;
+ _actionAnimation.draw(_screen, frame, _cameraX, kRoomTop);
+ const uint elapsed = _now - _actionStarted;
+ if (elapsed >= 2700)
+ _water.draw(_screen, MIN<uint>(96, (elapsed - 2700) / 80), _cameraX, kRoomTop);
+ } else if (_action == kPryHatch) {
+ const uint frame = _step <= 43 ? (_step ? _step - 1 : 0) : 56 - _step;
+ _actionAnimation.draw(_screen, frame, _cameraX, kRoomTop);
+ } else if (_action == kOpenHatch || _action == kEscape) {
+ _actionAnimation.draw(_screen, MAX<uint>(1, _step), _cameraX, kRoomTop);
+ } else if (_action == kPeekDoor || _action == kReturnFromPeek) {
+ const uint frame = _action == kPeekDoor ? MAX<int>(0, (int)_step - 1) : 18 - MAX<int>(0, (int)_step - 1);
+ _actionAnimation.draw(_screen, frame, _cameraX, kRoomTop);
} else {
_actor.draw(_screen, _position, _cameraX, kRoomTop, _mask, _maps, _windowClean);
}
+ if (_action == kMeltWait) {
+ const uint elapsed = _now - _actionStarted;
+ const uint brightness = elapsed < 500 ? 500 - elapsed : elapsed < 2500 ? 0 : MIN<uint>(500, elapsed - 2500);
+ for (int y = kRoomTop; y < kRoomTop + kRoomHeight; ++y) {
+ uint16 *pixels = (uint16 *)_screen.getBasePtr(0, y);
+ for (int x = 0; x < kScreenWidth; ++x) {
+ const uint16 p = pixels[x];
+ pixels[x] = (((p >> 11) * brightness / 500) << 11) |
+ ((((p >> 5) & 63) * brightness / 500) << 5) | ((p & 31) * brightness / 500);
+ }
+ }
+ }
}
} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/scene5030.h b/engines/hollywood/runaway/scene5030.h
index 1adea384079..753dbe3fd45 100644
--- a/engines/hollywood/runaway/scene5030.h
+++ b/engines/hollywood/runaway/scene5030.h
@@ -22,11 +22,13 @@
#ifndef HOLLYWOOD_RUNAWAY_SCENE5030_H
#define HOLLYWOOD_RUNAWAY_SCENE5030_H
+#include "common/random.h"
#include "common/ustr.h"
#include "hollywood/resource.h"
#include "hollywood/runaway/audio.h"
#include "hollywood/runaway/graphics.h"
#include "hollywood/runaway/inventory.h"
+#include "hollywood/runaway/presentation.h"
#include "hollywood/runaway/video.h"
#include "hollywood/scene_text_store.h"
@@ -42,7 +44,7 @@ public:
};
RunawayScene5030(Audio::Mixer *mixer, RunawayInventory &inventory, const RunawayStrings &strings) :
- _audio(mixer), _inventory(inventory), _strings(strings) {}
+ _audio(mixer), _inventory(inventory), _strings(strings), _interrogation(mixer), _random("runawayShack") {}
bool load();
void start(uint32 now);
void click(Common::Point mouse, RunawayVerb verb, byte item);
@@ -53,17 +55,31 @@ public:
byte hotspotAt(Common::Point mouse) const;
Common::U32String actionCaption(byte hotspot, RunawayVerb verb, byte item) const;
const Common::U32String &committedCaption() const { return _committedCaption; }
- const Common::U32String &subtitle() const { return _subtitle; }
+ const Common::U32String &subtitle() const { return _action == kPeekConversation ? _interrogation.subtitle() : _subtitle; }
bool busy() const { return _action != kNone; }
- bool speaking() const { return _speechRow != 0; }
+ bool speaking() const { return _action == kPeekConversation ? _interrogation.speaking() : _speechRow != 0; }
void skipSpeech();
- bool playingVideo() const { return _action == kCleanWindowVideo; }
+ bool playingVideo() const { return _action == kIntroVideo || _action == kCleanWindowVideo; }
+ bool inventoryPresentation() const { return _action == kIntroInventory; }
void skipVideo();
void cancelWalk();
void sayInventory(const RunawayInventory::Reply &reply);
+ bool escaped() const { return _escaped; }
private:
- enum Action { kNone, kIntro, kOpenLid, kCloseLid, kUnplug, kCleanWindowSpeech, kCleanWindowClimb, kCleanWindowVideo };
+ enum Action {
+ kNone, kIntroVideo, kIntro, kIntroLookAround, kIntroInventory,
+ kIntroListen, kIntroWalkToDoor, kIntroExamineDoor,
+ kOpenLid, kCloseLid, kUnplug,
+ kCleanWindowSpeech, kCleanWindowClimb, kCleanWindowVideo,
+ kWaitSpeech, kWalkingAction, kPickup, kShirt,
+ kMeltIce, kMeltWait, kInspectIce, kFinishMelting,
+ kTryMoveCooler, kMoveCooler, kRevealHatch, kFinishMoving, kHatchFound,
+ kDrainCooler, kFinishDraining, kPryHatch, kOpenHatch, kEscape,
+ kPeekDoor, kPeekConversation, kReturnFromPeek
+ };
+ enum IceState { kFrozen, kMelted, kDrained };
+ enum HatchState { kHidden, kLocked, kUnlocked, kOpen };
bool loadRoomGraphics();
bool walkable(int x, int y) const;
bool clearPath(Common::Point start, Common::Point end) const;
@@ -73,11 +89,18 @@ private:
void sayCue(uint16 cue, byte variation);
void pickUp(byte hotspot, byte item, uint patch);
void useItem(byte item, byte hotspot);
+ void examine(byte hotspot);
+ void collect(byte hotspot);
+ void waitForSpeech(uint16 cue, byte variation, Action next);
+ void walkForAction(Common::Point target, byte facing, Action next);
+ void setPosition(Common::Point position, byte facing);
+ void updateAction();
void showSpeechRow();
void stopSpeech();
void startAction(Action action);
void finishAction();
bool loadPatch(uint chunk, Common::Array<byte> &patch);
+ void applyPatch(uint chunk);
void drawPatch(const Common::Array<byte> &patch);
int _cameraX = 111;
@@ -90,9 +113,12 @@ private:
RunawayAudio _audio;
RunawayInventory &_inventory;
const RunawayStrings &_strings;
+ RunawayInterrogation _interrogation;
+ Common::RandomSource _random;
+ bool _peeked = false;
RunawayActor _actor;
- RunawayAnimation _intro, _lidActor, _lid, _unplug, _climb;
- RunawayVideo _cleanVideo;
+ RunawayAnimation _intro, _lidActor, _lid, _unplug, _climb, _actionAnimation, _water, _hatch;
+ RunawayVideo _video;
Common::Point _position = Common::Point(623, 447);
Common::Array<Common::Point> _path;
uint _pathIndex = 0;
@@ -101,8 +127,13 @@ private:
byte _pendingItem = 0;
RunawayVerb _pendingVerb = kVerbWalk;
Action _action = kNone;
+ Action _afterSpeech = kNone, _afterWalk = kNone;
+ byte _actionFacing = 0, _pickupHotspot = 0;
bool _lidOpen = false, _unplugged = false;
bool _windowClean = false;
+ bool _coolerMoved = false, _coolerInspected = false, _escaped = false;
+ IceState _ice = kFrozen;
+ HatchState _hatchState = kHidden;
bool _pickedUp[20] = {};
bool _examined[20] = {};
bool _globalSpeech = false;
diff --git a/engines/hollywood/runaway/strings.cpp b/engines/hollywood/runaway/strings.cpp
index 8ae473538d8..7d2fdc90065 100644
--- a/engines/hollywood/runaway/strings.cpp
+++ b/engines/hollywood/runaway/strings.cpp
@@ -67,7 +67,8 @@ const char *const kText[RunawayStrings::kTextCount][3] = {
{"SIND SIE SICHER?", "CONFIRMER ?", "\302\277EST\303\201S SEGURO?"},
{"JA", "OUI", "S\303\215"},
{"NEIN", "NON", "NO"},
- {"V", "Q", "L"}
+ {"V", "Q", "L"},
+ {"STEIGE DURCH DIE FALLT\303\234R HINAB", "SORTIR PAR LA TRAPPE", "SALIR POR LA TRAMPILLA"}
};
const char *const kItemNames[][3] = {
diff --git a/engines/hollywood/runaway/strings.h b/engines/hollywood/runaway/strings.h
index e0d157583eb..b2c6f3189c7 100644
--- a/engines/hollywood/runaway/strings.h
+++ b/engines/hollywood/runaway/strings.h
@@ -38,7 +38,7 @@ public:
kOptions, kLoad, kSave, kDelete, kPlay, kQuit, kMusic, kAntialias,
kScrolling, kPointerSound, kSubtitles, kOn, kOff, kFast, kSlow,
kVolume, kBrightness, kCredits, kSaveSettings, kDefaultSettings,
- kConfirmQuit, kYes, kNo, kQuitKey, kTextCount
+ kConfirmQuit, kYes, kNo, kQuitKey, kLeaveHatch, kTextCount
};
explicit RunawayStrings(Common::Language language) :
_languageIndex(language == Common::FR_FRA ? 1 : language == Common::ES_ESP ? 2 : 0) {}
diff --git a/engines/hollywood/runaway/ui.cpp b/engines/hollywood/runaway/ui.cpp
index 4621692161b..75016998530 100644
--- a/engines/hollywood/runaway/ui.cpp
+++ b/engines/hollywood/runaway/ui.cpp
@@ -127,7 +127,7 @@ void RunawayUI::toggleInventory() {
}
bool RunawayUI::cancel() {
- if (busy())
+ if (busy() || _inventoryPresentation)
return true;
if (_inventory.selected()) {
_inventory.select(0);
@@ -140,11 +140,15 @@ bool RunawayUI::cancel() {
return false;
}
-void RunawayUI::update(uint32 now, Common::Point mouse, byte roomHotspot, bool blocked, bool speaking) {
+void RunawayUI::update(uint32 now, Common::Point mouse, byte roomHotspot, bool blocked, bool speaking, bool inventoryPresentation) {
_now = now;
_mouse = mouse;
_blocked = blocked;
_speaking = speaking;
+ if (_inventoryPresentation != inventoryPresentation) {
+ _inventoryPresentation = inventoryPresentation;
+ setInventoryOpen(inventoryPresentation);
+ }
const byte added = _inventory.takeNewItem();
if (added) {
_returnAfterPickup = !_inventoryOpen;
diff --git a/engines/hollywood/runaway/ui.h b/engines/hollywood/runaway/ui.h
index 2af0a35f897..6e7da582363 100644
--- a/engines/hollywood/runaway/ui.h
+++ b/engines/hollywood/runaway/ui.h
@@ -43,7 +43,7 @@ public:
_audio(mixer), _inventory(inventory), _strings(strings), _random("runaway-ui") {}
~RunawayUI();
bool load();
- void update(uint32 now, Common::Point mouse, byte roomHotspot, bool blocked, bool speaking);
+ void update(uint32 now, Common::Point mouse, byte roomHotspot, bool blocked, bool speaking, bool inventoryPresentation = false);
Command click(bool right);
void toggleInventory();
bool cancel();
@@ -78,6 +78,7 @@ private:
RunawayVerb _verb = kVerbWalk, _previousVerb = kVerbWalk;
byte _hovered = 0, _buttonFrame = 0, _optionsFrame = 0, _pickupItem = 0;
bool _inventoryOpen = false, _enteredInventory = false, _returnAfterPickup = false;
+ bool _inventoryPresentation = false;
bool _pickupSoundPlayed = false;
bool _blocked = false, _speaking = false, _cursorPushed = false;
uint32 _now = 0, _buttonTick = 0, _verbStarted = 0, _portraitTick = 0;
Commit: 9b0c399e87d3a7e0fa19694410d38a44d4a4f3af
https://github.com/scummvm/scummvm/commit/9b0c399e87d3a7e0fa19694410d38a44d4a4f3af
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-10-27T11:28:15+01:00
Commit Message:
HOLLYWOOD: lip-sync during gameplay in runaway demo
Changed paths:
engines/hollywood/module.mk
engines/hollywood/runaway/graphics.cpp
engines/hollywood/runaway/graphics.h
engines/hollywood/runaway/scene5030.cpp
engines/hollywood/runaway/scene5030.h
image/module.mk
diff --git a/engines/hollywood/module.mk b/engines/hollywood/module.mk
index 7870cd9a954..b2dbc48b1c1 100644
--- a/engines/hollywood/module.mk
+++ b/engines/hollywood/module.mk
@@ -143,9 +143,11 @@ MODULE_OBJS = \
runaway/intro.o \
runaway/inventory.o \
runaway/menu.o \
+ runaway/presentation.o \
runaway/scene5030.o \
runaway/strings.o \
- runaway/ui.o
+ runaway/ui.o \
+ runaway/video.o
# This module can be built as a plugin
ifeq ($(ENABLE_HOLLYWOOD), DYNAMIC_PLUGIN)
diff --git a/engines/hollywood/runaway/graphics.cpp b/engines/hollywood/runaway/graphics.cpp
index b97251ba0b2..7933cfcbfd9 100644
--- a/engines/hollywood/runaway/graphics.cpp
+++ b/engines/hollywood/runaway/graphics.cpp
@@ -154,10 +154,14 @@ bool RunawayActor::load() {
Common::File file;
Common::Array<byte> palette;
// Native chapter-five actor loader at 0x40b590 selects entry 44. Entry 45
- // is the palette, and 46..53 are the eight banks of 19 walking cels.
+ // is the palette, 46..53 hold walking cels, 54..59 hold head cels, and
+ // entry 60 describes the six banks of 40 head cels.
+ _facing = _frame = _headFrame = -1;
if (!file.open("RESOURCE.000") || !readGlobalChunk(file, 44, _descriptors) ||
_descriptors.size() != kFacings * kFrames * 32 ||
- !readGlobalChunk(file, 45, palette) || palette.size() != 512)
+ !readGlobalChunk(file, 45, palette) || palette.size() != 512 ||
+ !readGlobalChunk(file, 60, _headDescriptors) ||
+ _headDescriptors.size() != kHeadFacings * kHeadFrames * 32)
return false;
for (uint i = 0; i < 256; ++i)
_palette[i] = READ_LE_UINT16(palette.data() + i * 2);
@@ -172,20 +176,30 @@ bool RunawayActor::load() {
return false;
}
}
+ const byte headFacings[kHeadFacings] = {0, 1, 2, 4, 5, 7};
+ for (uint bank = 0; bank < kHeadFacings; ++bank) {
+ if (!readGlobalChunk(file, 54 + bank, _headBanks[bank]))
+ return false;
+ for (uint frame = 0; frame < kHeadFrames; ++frame) {
+ if (!setFrame(headFacings[bank], 0, frame))
+ return false;
+ }
+ }
return setFrame(3, 0);
}
-bool RunawayActor::setFrame(uint facing, uint frame) {
- if (facing >= kFacings || frame >= kFrames)
+bool RunawayActor::setFrame(uint facing, uint frame, int headFrame) {
+ if (facing >= kFacings || frame >= kFrames || headFrame < -1 || headFrame >= kHeadFrames)
return false;
- if (_facing == (int)facing && _frame == (int)frame)
+ // Head cels replace the top of the standing body; walking cels already
+ // contain their own moving head and shoulders.
+ if (frame)
+ headFrame = -1;
+ if (_facing == (int)facing && _frame == (int)frame && _headFrame == headFrame)
return true;
const byte *descriptor = _descriptors.data() + (facing * kFrames + frame) * 32;
const Common::Array<byte> &bank = _banks[facing];
- uint cursor = READ_LE_UINT32(descriptor);
const uint end = frame + 1 < kFrames ? READ_LE_UINT32(descriptor + 32) : bank.size();
- if (cursor > end || end > bank.size())
- return false;
const int left = 168 - (int)READ_LE_UINT32(descriptor + 16);
const int top = 434 - (int)READ_LE_UINT32(descriptor + 20);
const uint width = READ_LE_UINT32(descriptor + 24), height = READ_LE_UINT32(descriptor + 28);
@@ -196,11 +210,39 @@ bool RunawayActor::setFrame(uint facing, uint frame) {
memset(_pixels.data(), 0, _pixels.size());
memset(_opacity.data(), 0, _opacity.size());
memset(_shadow.data(), 0, _shadow.size());
+ _facing = _frame = _headFrame = -1;
+ if (!decodeFrame(bank, descriptor, end, false))
+ return false;
+ if (headFrame >= 0) {
+ // Native 0x428560 maps eight body directions onto six head banks and
+ // clears the old head before compositing color and opacity. Keep the
+ // body's shadow, then scale/light/occlude the completed actor together.
+ const byte headFacings[kFacings] = {0, 1, 2, 2, 3, 4, 4, 5};
+ const uint headFacing = headFacings[facing];
+ const Common::Array<byte> &headBank = _headBanks[headFacing];
+ const byte *head = _headDescriptors.data() + (headFacing * kHeadFrames + headFrame) * 32;
+ const uint headEnd = headFrame + 1 < kHeadFrames ? READ_LE_UINT32(head + 32) : headBank.size();
+ memset(_pixels.data(), 0, kWidth * kHeadHeight);
+ memset(_opacity.data(), 0, kWidth * kHeadHeight);
+ if (!decodeFrame(headBank, head, headEnd, true))
+ return false;
+ }
+ _facing = facing;
+ _frame = frame;
+ _headFrame = headFrame;
+ return true;
+}
+
+bool RunawayActor::decodeFrame(const Common::Array<byte> &bank, const byte *descriptor, uint end, bool head) {
+ uint cursor = READ_LE_UINT32(descriptor);
+ if (cursor > end || end > bank.size())
+ return false;
// Packed streams: color spans (x,y,length), then opacity and shadow spans
// (x,y,literal,length). A nonliteral mask span expands to opaque bytes.
+ // Head descriptors retain a shadow count, but head banks omit that plane.
const uint counts[] = { READ_LE_UINT32(descriptor + 4), READ_LE_UINT32(descriptor + 12),
READ_LE_UINT32(descriptor + 8) };
- for (uint plane = 0; plane < 3; ++plane) {
+ for (uint plane = 0; plane < (head ? 2U : 3U); ++plane) {
byte *destination = plane == 0 ? _pixels.data() : plane == 1 ? _opacity.data() : _shadow.data();
const uint header = plane == 0 ? 6 : 7;
for (uint span = 0; span < counts[plane]; ++span) {
@@ -211,8 +253,11 @@ bool RunawayActor::setFrame(uint facing, uint frame) {
const bool literal = plane == 0 || run[4] != 0;
const uint length = READ_LE_UINT16(run + header - 2);
cursor += header;
- if (!length || x + length > kWidth || y >= kHeight || (literal && length > end - cursor))
+ if (!length || x + length > kWidth || y >= (head ? kHeadHeight : kHeight) ||
+ (literal && length > end - cursor))
return false;
+ if (head)
+ _bounds.extend(Common::Rect(x, y, x + length, y + 1));
if (literal) {
memcpy(destination + y * kWidth + x, bank.data() + cursor, length);
cursor += length;
@@ -221,11 +266,7 @@ bool RunawayActor::setFrame(uint facing, uint frame) {
}
}
}
- if (cursor != end)
- return false;
- _facing = facing;
- _frame = frame;
- return true;
+ return cursor == end;
}
static uint16 blend565(uint16 source, uint16 destination, uint alpha) {
diff --git a/engines/hollywood/runaway/graphics.h b/engines/hollywood/runaway/graphics.h
index 78d0b562e40..4c92b021780 100644
--- a/engines/hollywood/runaway/graphics.h
+++ b/engines/hollywood/runaway/graphics.h
@@ -58,24 +58,28 @@ private:
uint _frames = 0;
};
-// Brian's walking banks are indexed RGB565 with separate opacity and shadow
-// planes. This is a different representation from the room animation spans.
+// Brian's walking and head banks are indexed RGB565 with separate opacity and
+// shadow planes. This differs from the room animation spans.
class RunawayActor {
public:
bool load();
- bool setFrame(uint facing, uint frame);
+ bool setFrame(uint facing, uint frame, int headFrame = -1);
void draw(Graphics::ManagedSurface &surface, Common::Point position, int cameraX,
int roomTop, const Common::Array<byte> &mask, const Common::Array<byte> &maps, bool sunlit = false) const;
private:
- enum { kWidth = 345, kHeight = 518, kFacings = 8, kFrames = 19 };
- Common::Array<byte> _descriptors;
+ enum { kWidth = 345, kHeight = 518, kHeadHeight = 148, kFacings = 8, kFrames = 19,
+ kHeadFacings = 6, kHeadFrames = 40 };
+ bool decodeFrame(const Common::Array<byte> &bank, const byte *descriptor, uint end, bool head);
+ Common::Array<byte> _descriptors, _headDescriptors;
Common::Array<byte> _banks[kFacings];
+ Common::Array<byte> _headBanks[kHeadFacings];
Common::Array<byte> _pixels, _opacity, _shadow;
uint16 _palette[256];
Common::Rect _bounds;
int _facing = -1;
int _frame = -1;
+ int _headFrame = -1;
};
} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/scene5030.cpp b/engines/hollywood/runaway/scene5030.cpp
index b0249254333..6c628f93e56 100644
--- a/engines/hollywood/runaway/scene5030.cpp
+++ b/engines/hollywood/runaway/scene5030.cpp
@@ -61,6 +61,55 @@ const SceneHotspot kHotspots[] = {
{1215, 542, 7}
};
+// The original 0x40fef0 generates one mouth shape per text character. Work
+// on decoded letters so accented French, German and Spanish vowels also
+// select the appropriate shape, independently of the source code page.
+uint32 speechLetter(uint32 c) {
+ if ((c >= 'A' && c <= 'Z') || (c >= 0xc0 && c <= 0xde && c != 0xd7))
+ c += 0x20;
+ switch (c) {
+ case 0xe0: case 0xe1: case 0xe2: case 0xe3: case 0xe4: case 0xe5: return 'a';
+ case 0xe8: case 0xe9: case 0xea: case 0xeb: return 'e';
+ case 0xec: case 0xed: case 0xee: case 0xef: return 'i';
+ case 0xf2: case 0xf3: case 0xf4: case 0xf5: case 0xf6: return 'o';
+ case 0xf9: case 0xfa: case 0xfb: case 0xfc: return 'u';
+ case 0xe7: return 'c';
+ case 0xf1: return 'n';
+ default: return c;
+ }
+}
+
+byte speechVowel(uint32 c) {
+ switch (c) {
+ case 'a': return 1;
+ case 'e': return 2;
+ case 'i': return 3;
+ case 'o': return 4;
+ case 'u': return 5;
+ default: return 0;
+ }
+}
+
+byte speechMouth(uint32 c, uint32 next, byte previous) {
+ const byte vowel = speechVowel(c), nextVowel = speechVowel(next);
+ if (vowel)
+ return vowel;
+ // Native 0x40fd30 anticipates the next vowel for most consonants, closes
+ // for B/P/V, and retains the previous shape at spaces and some endings.
+ switch (c) {
+ case 'b': case 'p': case 'v': return 0;
+ case 'f': return 5;
+ case 'l': return next == 'l' ? 3 : nextVowel ? nextVowel : previous;
+ case 'm': return nextVowel ? 0 : previous;
+ case 's': return nextVowel ? nextVowel : previous;
+ case ' ': return previous;
+ default:
+ if ((c >= 'a' && c <= 'z') || c == 0xdf)
+ return next == ' ' ? previous : nextVowel;
+ return 0;
+ }
+}
+
} // End of anonymous namespace
bool RunawayScene5030::load() {
@@ -313,13 +362,41 @@ void RunawayScene5030::showSpeechRow() {
const uint16 sample = _globalSpeech ? _speechSample : _voiceSamples[_speechRow - 500];
const uint32 duration = sample ? _audio.playSpeech(sample, _globalSpeech) : 0;
_subtitleUntil = _now + (duration ? MAX<uint>(1000, duration + 150) : MAX<uint>(3000, _subtitle.size() * 55));
+ animateSpeech(duration);
debugC(1, kDebugScene, "Runaway demo: dialogue row %u, voice %u, ends at row %u",
_speechRow, sample, _speechEnd);
}
+void RunawayScene5030::animateSpeech(uint32 duration) {
+ _speechStarted = _now;
+ _speechDuration = duration ? duration : _subtitleUntil - _now;
+ _speechFrames.resize(_subtitle.size());
+ if (_speechFrames.empty())
+ return;
+ // The native timer advances in 10 ms ticks, rounding up at a fractional
+ // tick of 0.3. Without a voice sample it uses 80 ms per character.
+ _speechFrameDuration = duration ? MAX<uint>(1, (duration / _speechFrames.size() + 7) / 10) * 10 : 80;
+ for (uint i = 0; i < _speechFrames.size(); ++i) {
+ const uint32 c = speechLetter(_subtitle[i]);
+ const uint32 next = i + 1 < _subtitle.size() ? speechLetter(_subtitle[i + 1]) : 0;
+ _speechFrames[i] = speechMouth(c, next, i ? _speechFrames[i - 1] : 0);
+ }
+ // Native 0x412680 occasionally selects the closed-eye set (6..11) for
+ // four consecutive characters, then returns to the open-eye set (0..5).
+ bool blink = false;
+ for (uint i = 0; i < _speechFrames.size(); i += 4) {
+ blink = !blink && _random.getRandomNumber(4) == 0;
+ if (blink) {
+ for (uint j = i; j < MIN<uint>(i + 4, _speechFrames.size()); ++j)
+ _speechFrames[j] += 6;
+ }
+ }
+}
+
void RunawayScene5030::stopSpeech() {
_audio.stopSpeech();
_speechRow = _speechEnd = 0;
+ _speechFrames.clear();
_subtitle.clear();
}
@@ -879,7 +956,13 @@ void RunawayScene5030::update(uint32 now, int scrollDirection, bool inventoryOpe
_windowClean && _unplugged && _lidOpen && _ice == kFrozen)
walkForAction(Common::Point(900, 473), 2, kMeltIce);
const bool walking = _pathIndex < _path.size();
- _actor.setFrame(_facing, walking ? 1 + ((now - _walkStarted) / 70) % 18 : 0);
+ int headFrame = -1;
+ if (_speechRow && !walking) {
+ const uint32 speechElapsed = now - _speechStarted;
+ const uint mouth = speechElapsed / _speechFrameDuration;
+ headFrame = speechElapsed < _speechDuration && mouth < _speechFrames.size() ? _speechFrames[mouth] : 0;
+ }
+ _actor.setFrame(_facing, walking ? 1 + ((now - _walkStarted) / 70) % 18 : 0, headFrame);
if (scrollDirection)
_cameraX += scrollDirection * MAX<int>(1, elapsed / 2);
else if (walking || (_action != kNone && _action != kIntro))
diff --git a/engines/hollywood/runaway/scene5030.h b/engines/hollywood/runaway/scene5030.h
index 753dbe3fd45..b88f10ed2f6 100644
--- a/engines/hollywood/runaway/scene5030.h
+++ b/engines/hollywood/runaway/scene5030.h
@@ -96,6 +96,7 @@ private:
void setPosition(Common::Point position, byte facing);
void updateAction();
void showSpeechRow();
+ void animateSpeech(uint32 duration);
void stopSpeech();
void startAction(Action action);
void finishAction();
@@ -138,6 +139,8 @@ private:
bool _examined[20] = {};
bool _globalSpeech = false;
uint32 _now = 0, _lastUpdate = 0, _actionStarted = 0, _walkStarted = 0, _subtitleUntil = 0;
+ uint32 _speechStarted = 0, _speechDuration = 0, _speechFrameDuration = 80;
+ Common::Array<byte> _speechFrames;
uint _step = 0;
uint16 _speechRow = 0, _speechEnd = 0;
uint16 _speechSample = 0;
diff --git a/image/module.mk b/image/module.mk
index d250b63817e..d062aa66877 100644
--- a/image/module.mk
+++ b/image/module.mk
@@ -24,6 +24,7 @@ MODULE_OBJS := \
codecs/msrle.o \
codecs/msrle4.o \
codecs/msvideo1.o \
+ codecs/msmpeg4.o \
codecs/qtrle.o \
codecs/rpza.o \
codecs/smc.o
Commit: 8373101ca3a4bad33f06baa53237517666ae3f0b
https://github.com/scummvm/scummvm/commit/8373101ca3a4bad33f06baa53237517666ae3f0b
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-10-27T11:28:15+01:00
Commit Message:
HOLLYWOOD: better animations in runaway demo
Changed paths:
A engines/hollywood/runaway/animation.cpp
A engines/hollywood/runaway/animation.h
engines/hollywood/module.mk
engines/hollywood/runaway/audio.cpp
engines/hollywood/runaway/audio.h
engines/hollywood/runaway/engine.cpp
engines/hollywood/runaway/graphics.cpp
engines/hollywood/runaway/graphics.h
engines/hollywood/runaway/presentation.cpp
engines/hollywood/runaway/presentation.h
engines/hollywood/runaway/scene5030.cpp
engines/hollywood/runaway/scene5030.h
engines/hollywood/runaway/ui.cpp
engines/hollywood/runaway/ui.h
diff --git a/engines/hollywood/module.mk b/engines/hollywood/module.mk
index b2dbc48b1c1..b9029497c8d 100644
--- a/engines/hollywood/module.mk
+++ b/engines/hollywood/module.mk
@@ -136,6 +136,7 @@ MODULE_OBJS = \
monsters/scenes/playable/speech_controller.o \
monsters/scenes/playable/playable_scene.o \
monsters/scenes/playable/playable_scene_actions.o \
+ runaway/animation.o \
runaway/audio.o \
runaway/engine.o \
runaway/font.o \
diff --git a/engines/hollywood/runaway/animation.cpp b/engines/hollywood/runaway/animation.cpp
new file mode 100644
index 00000000000..d2225e9dc75
--- /dev/null
+++ b/engines/hollywood/runaway/animation.cpp
@@ -0,0 +1,162 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/util.h"
+#include "hollywood/runaway/animation.h"
+
+namespace Hollywood {
+namespace {
+
+// The original 0x40fef0 generates one mouth shape per text character. Work
+// on decoded letters so accented French, German and Spanish vowels also
+// select the appropriate shape, independently of the source code page.
+uint32 speechLetter(uint32 c) {
+ if ((c >= 'A' && c <= 'Z') || (c >= 0xc0 && c <= 0xde && c != 0xd7))
+ c += 0x20;
+ switch (c) {
+ case 0xe0: case 0xe1: case 0xe2: case 0xe3: case 0xe4: case 0xe5: return 'a';
+ case 0xe8: case 0xe9: case 0xea: case 0xeb: return 'e';
+ case 0xec: case 0xed: case 0xee: case 0xef: return 'i';
+ case 0xf2: case 0xf3: case 0xf4: case 0xf5: case 0xf6: return 'o';
+ case 0xf9: case 0xfa: case 0xfb: case 0xfc: return 'u';
+ case 0xe7: return 'c';
+ case 0xf1: return 'n';
+ default: return c;
+ }
+}
+
+byte speechVowel(uint32 c) {
+ switch (c) {
+ case 'a': return 1;
+ case 'e': return 2;
+ case 'i': return 3;
+ case 'o': return 4;
+ case 'u': return 5;
+ default: return 0;
+ }
+}
+
+byte speechMouth(uint32 c, uint32 next, byte previous) {
+ const byte vowel = speechVowel(c), nextVowel = speechVowel(next);
+ if (vowel)
+ return vowel;
+ // Native 0x40fd30 anticipates the next vowel for most consonants, closes
+ // for B/P/V, and retains the previous shape at spaces and some endings.
+ switch (c) {
+ case 'b': case 'p': case 'v': return 0;
+ case 'f': return 5;
+ case 'l': return next == 'l' ? 3 : nextVowel ? nextVowel : previous;
+ case 'm': return nextVowel ? 0 : previous;
+ case 's': return nextVowel ? nextVowel : previous;
+ case ' ': return previous;
+ default:
+ if ((c >= 'a' && c <= 'z') || c == 0xdf)
+ return next == ' ' ? previous : nextVowel;
+ return 0;
+ }
+}
+
+} // End of anonymous namespace
+
+void RunawayLipSync::start(const Common::U32String &text, uint32 now, uint32 duration, Common::RandomSource &random) {
+ _started = now;
+ _duration = duration ? duration : text.size() * 80;
+ _frames.resize(text.size());
+ if (_frames.empty())
+ return;
+ // The native timer advances in 10 ms ticks, rounding up at a fractional
+ // tick of 0.3. Without a voice sample it uses 80 ms per character.
+ _frameDuration = duration ? MAX<uint>(1, (duration / _frames.size() + 7) / 10) * 10 : 80;
+ for (uint i = 0; i < _frames.size(); ++i) {
+ const uint32 c = speechLetter(text[i]);
+ const uint32 next = i + 1 < text.size() ? speechLetter(text[i + 1]) : 0;
+ _frames[i] = speechMouth(c, next, i ? _frames[i - 1] : 0);
+ }
+ // Native 0x412680 occasionally selects the closed-eye set (6..11) for
+ // four consecutive characters, then returns to the open-eye set (0..5).
+ bool blink = false;
+ for (uint i = 0; i < _frames.size(); i += 4) {
+ blink = !blink && random.getRandomNumber(4) == 0;
+ if (blink) {
+ for (uint j = i; j < MIN<uint>(i + 4, _frames.size()); ++j)
+ _frames[j] += 6;
+ }
+ }
+}
+
+byte RunawayLipSync::frame(uint32 now) const {
+ const uint32 elapsed = now - _started;
+ const uint index = elapsed / _frameDuration;
+ return elapsed < _duration && index < _frames.size() ? _frames[index] : 0;
+}
+
+void RunawayIdleHead::reset(uint32 now) {
+ _turnTick = _blinkTick = now;
+ _step = _target = 6;
+ _frame = 0;
+ _blink = _active = false;
+}
+
+void RunawayIdleHead::pause(uint32 elapsed) {
+ _turnTick += elapsed;
+ _blinkTick += elapsed;
+}
+
+void RunawayIdleHead::update(uint32 now, bool enabled, uint blinkInterval, Common::RandomSource &random) {
+ if (!enabled || !_active) {
+ reset(now);
+ _active = enabled;
+ return;
+ }
+ // Native 0x42a610 moves between three poses on a 60 ms clock. The
+ // center is index 6 in the transition table at 0x464660. Blinks use
+ // 0x42ab50's separate timer, retaining the last speech character period.
+ static const byte frames[] = {24, 23, 22, 21, 20, 19, 0, 12, 13, 14, 15, 16, 17};
+ blinkInterval = MAX<uint>(10, blinkInterval);
+ while (now - _turnTick >= 60 || now - _blinkTick >= blinkInterval) {
+ if (now - _turnTick >= 60 && (int32)((_turnTick + 60) - (_blinkTick + blinkInterval)) <= 0) {
+ _turnTick += 60;
+ if (_step != _target) {
+ _step += _target > _step ? 1 : -1;
+ _frame = frames[_step];
+ } else if (!_blink) {
+ const uint choice = random.getRandomNumber(499);
+ if (_step == 6) {
+ if (choice < 4)
+ _target = choice < 2 ? 0 : 12;
+ } else if (choice < 20) {
+ _target = choice < 2 ? 12 - _step : 6;
+ }
+ }
+ } else {
+ _blinkTick += blinkInterval;
+ if (_blink) {
+ _blink = false;
+ _frame = frames[_step];
+ } else if (_step == _target && random.getRandomNumber(14) == 0) {
+ _blink = true;
+ _frame = frames[_step] + (_step == 6 ? 6 : 1);
+ }
+ }
+ }
+}
+
+} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/animation.h b/engines/hollywood/runaway/animation.h
new file mode 100644
index 00000000000..fe455676c09
--- /dev/null
+++ b/engines/hollywood/runaway/animation.h
@@ -0,0 +1,60 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef HOLLYWOOD_RUNAWAY_ANIMATION_H
+#define HOLLYWOOD_RUNAWAY_ANIMATION_H
+
+#include "common/array.h"
+#include "common/random.h"
+#include "common/ustr.h"
+
+namespace Hollywood {
+
+// The room actor, inventory portrait and other speakers share the original
+// text-derived mouth shapes (0..5), with a closed-eye set at 6..11.
+class RunawayLipSync {
+public:
+ void start(const Common::U32String &text, uint32 now, uint32 duration, Common::RandomSource &random);
+ void stop() { _frames.clear(); }
+ byte frame(uint32 now) const;
+ uint frameDuration() const { return _frameDuration; }
+
+private:
+ Common::Array<byte> _frames;
+ uint32 _started = 0, _duration = 0, _frameDuration = 80;
+};
+
+class RunawayIdleHead {
+public:
+ void reset(uint32 now);
+ void pause(uint32 elapsed);
+ void update(uint32 now, bool enabled, uint blinkInterval, Common::RandomSource &random);
+ byte frame() const { return _frame; }
+
+private:
+ uint32 _turnTick = 0, _blinkTick = 0;
+ byte _step = 6, _target = 6, _frame = 0;
+ bool _blink = false, _active = false;
+};
+
+} // End of namespace Hollywood
+
+#endif // HOLLYWOOD_RUNAWAY_ANIMATION_H
diff --git a/engines/hollywood/runaway/audio.cpp b/engines/hollywood/runaway/audio.cpp
index 3abb91ab702..b5074429594 100644
--- a/engines/hollywood/runaway/audio.cpp
+++ b/engines/hollywood/runaway/audio.cpp
@@ -116,7 +116,7 @@ void RunawayAudio::playFootstep(byte surface, byte variant, byte volume) {
// Native 0x407410 selects one of two mono samples per surface. These
// fourteen effects start at cue 21 in the otherwise shared music archive.
play("RESOURCE.002", 21 + (surface - 1) * 2 + variant, 100, false,
- Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN, Audio::Mixer::kSFXSoundType, _effects[0], volume, false);
+ Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN, Audio::Mixer::kSFXSoundType, _footstep, volume, false);
}
void RunawayAudio::stopMusic() {
@@ -128,6 +128,7 @@ void RunawayAudio::stopSpeech() {
}
void RunawayAudio::stopEffect() {
+ _mixer->stopHandle(_footstep);
for (uint i = 0; i < ARRAYSIZE(_effects); ++i)
_mixer->stopHandle(_effects[i]);
}
diff --git a/engines/hollywood/runaway/audio.h b/engines/hollywood/runaway/audio.h
index 300afe04559..f4322617268 100644
--- a/engines/hollywood/runaway/audio.h
+++ b/engines/hollywood/runaway/audio.h
@@ -46,7 +46,7 @@ private:
uint32 play(const char *archive, uint16 cue, uint tableCount, bool pairedTables,
byte flags, Audio::Mixer::SoundType type, Audio::SoundHandle &handle, byte volume, bool loop);
Audio::Mixer *_mixer;
- Audio::SoundHandle _music, _speech, _effects[2];
+ Audio::SoundHandle _music, _speech, _effects[2], _footstep;
};
} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/engine.cpp b/engines/hollywood/runaway/engine.cpp
index 6776a3ef4e0..e1415f3efa8 100644
--- a/engines/hollywood/runaway/engine.cpp
+++ b/engines/hollywood/runaway/engine.cpp
@@ -149,12 +149,12 @@ Common::Error RunawayEngine::run() {
while (!shouldQuit()) {
const uint32 now = getTotalPlayTime();
Common::Point mouse = _eventMan->getMousePos();
- ui.update(now, mouse, scene.hotspotAt(mouse), scene.busy(), scene.speaking(), scene.inventoryPresentation());
+ ui.update(now, mouse, scene.hotspotAt(mouse), scene.busy(), scene.speaking(), scene.inventoryPresentation(), scene.speechFrame());
bool openMenu = false;
Common::Event event;
while (!openMenu && _eventMan->pollEvent(event)) {
if (event.type == Common::EVENT_LBUTTONDOWN || event.type == Common::EVENT_RBUTTONDOWN) {
- ui.update(now, event.mouse, scene.hotspotAt(event.mouse), scene.busy(), scene.speaking(), scene.inventoryPresentation());
+ ui.update(now, event.mouse, scene.hotspotAt(event.mouse), scene.busy(), scene.speaking(), scene.inventoryPresentation(), scene.speechFrame());
const RunawayUI::Command command = ui.click(event.type == Common::EVENT_RBUTTONDOWN);
switch (command.type) {
case RunawayUI::Command::kOpenMenu:
@@ -179,7 +179,7 @@ Common::Error RunawayEngine::run() {
}
} else if (event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_START || event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_END) {
mouse = _eventMan->getMousePos();
- ui.update(now, mouse, scene.hotspotAt(mouse), scene.busy(), scene.speaking(), scene.inventoryPresentation());
+ ui.update(now, mouse, scene.hotspotAt(mouse), scene.busy(), scene.speaking(), scene.inventoryPresentation(), scene.speechFrame());
const bool pressed = event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_START;
switch (event.customType) {
case kPauseMenu:
@@ -252,7 +252,7 @@ Common::Error RunawayEngine::run() {
// all three releases currently finish at the shared shack escape.
if (scene.escaped())
return playEnding(menu);
- ui.update(now, mouse, scene.hotspotAt(mouse), scene.busy(), scene.speaking(), scene.inventoryPresentation());
+ ui.update(now, mouse, scene.hotspotAt(mouse), scene.busy(), scene.speaking(), scene.inventoryPresentation(), scene.speechFrame());
scene.draw();
Graphics::ManagedSurface &screen = scene.screen();
const bool subtitles = !ConfMan.hasKey("subtitles") || ConfMan.getBool("subtitles") || ConfMan.getBool("speech_mute");
diff --git a/engines/hollywood/runaway/graphics.cpp b/engines/hollywood/runaway/graphics.cpp
index 7933cfcbfd9..7348f37dc4d 100644
--- a/engines/hollywood/runaway/graphics.cpp
+++ b/engines/hollywood/runaway/graphics.cpp
@@ -276,18 +276,19 @@ static uint16 blend565(uint16 source, uint16 destination, uint alpha) {
return (red << 11) | (green << 5) | blue;
}
+float RunawayActor::perspectiveHeight(Common::Point position) {
+ // Native scene callback 0x438970, also used to set footstep volume.
+ if (position.x > 1079 && position.y < 542)
+ return position.y * 0.98648649f - 93.675674f;
+ if (position.x > 1215)
+ return position.x * 0.2857143f + 93.85714f;
+ return (position.y * 1.47f - 348.04f + position.x * 0.058927f + 362.462616f) * 0.5f;
+}
+
void RunawayActor::draw(Graphics::ManagedSurface &surface, Common::Point position, int cameraX,
int roomTop, const Common::Array<byte> &mask, const Common::Array<byte> &maps, bool sunlit) const {
- // Perspective planes from the demo's scene callback at 0x438970. Actor
- // coordinates are anchored at (168,434) in a nominal 455-pixel-high image.
- float height;
- if (position.x > 1079 && position.y < 542)
- height = position.y * 0.98648649f - 93.675674f;
- else if (position.x > 1215)
- height = position.x * 0.2857143f + 93.85714f;
- else
- height = (position.y * 1.47f - 348.04f + position.x * 0.058927f + 362.462616f) * 0.5f;
- const int scale = CLIP<int>((int)(height * 256 / 455), 64, 256);
+ // Actor coordinates are anchored at (168,434) in a nominal 455-pixel-high image.
+ const int scale = CLIP<int>((int)(perspectiveHeight(position) * 256 / 455), 64, 256);
const int originX = position.x - cameraX - 168 * scale / 256;
const int originY = position.y + roomTop - 434 * scale / 256;
const int x0 = MAX(0, originX + _bounds.left * scale / 256);
diff --git a/engines/hollywood/runaway/graphics.h b/engines/hollywood/runaway/graphics.h
index 4c92b021780..9521da0c24f 100644
--- a/engines/hollywood/runaway/graphics.h
+++ b/engines/hollywood/runaway/graphics.h
@@ -64,6 +64,7 @@ class RunawayActor {
public:
bool load();
bool setFrame(uint facing, uint frame, int headFrame = -1);
+ static float perspectiveHeight(Common::Point position);
void draw(Graphics::ManagedSurface &surface, Common::Point position, int cameraX,
int roomTop, const Common::Array<byte> &mask, const Common::Array<byte> &maps, bool sunlit = false) const;
diff --git a/engines/hollywood/runaway/presentation.cpp b/engines/hollywood/runaway/presentation.cpp
index 8d066462241..e40cc943aba 100644
--- a/engines/hollywood/runaway/presentation.cpp
+++ b/engines/hollywood/runaway/presentation.cpp
@@ -28,6 +28,9 @@
namespace Hollywood {
+static const uint kInterrogationSpeakerActor[] = {1, 2, 0};
+static const uint kInterrogationMouthBase[] = {67, 40, 20};
+
static void dimViewport(Graphics::ManagedSurface &screen, uint brightness) {
for (int y = kRunawayViewportTop; y < kRunawayViewportTop + kRunawayViewportHeight; ++y) {
uint16 *pixels = (uint16 *)screen.getBasePtr(0, y);
@@ -74,6 +77,7 @@ void RunawayInterrogation::start(uint32 now) {
void RunawayInterrogation::nextPhrase() {
_row = 0;
+ _lipSync.stop();
_subtitle.clear();
if (finished()) {
_audio.stopSpeech();
@@ -95,12 +99,19 @@ void RunawayInterrogation::nextPhrase() {
void RunawayInterrogation::showSpeechRow() {
_subtitle = Common::U32String(_text.largeTextRecord(_row), Common::kDos850);
const uint32 duration = _audio.playSpeech(_sample);
+ _lipSync.start(_subtitle, _now, duration, _random);
+ const uint actor = kInterrogationSpeakerActor[_speakers[_phrase]];
+ _frames[actor] = kInterrogationMouthBase[actor] + _lipSync.frame(_now);
+ _idle[actor] = true;
+ _lastTick[actor] = _now;
_deadline = _now + (duration ? MAX<uint>(1000, duration + 150) : MAX<uint>(3000, _subtitle.size() * 55));
}
void RunawayInterrogation::skipSpeech() {
if (!speaking())
return;
+ const uint actor = kInterrogationSpeakerActor[_speakers[_phrase]];
+ _frames[actor] = kInterrogationMouthBase[actor];
_audio.stopSpeech();
if (_row < _lastRow) {
++_row;
@@ -118,20 +129,26 @@ void RunawayInterrogation::update(uint32 now) {
skipSpeech();
if (finished())
return;
- const uint speakerActor[] = {1, 2, 0};
const uint idleEnd[] = {67, 39, 19};
- const uint mouthBase[] = {67, 40, 20};
+ const uint speaker = kInterrogationSpeakerActor[_speakers[_phrase]];
for (uint i = 0; i < ARRAYSIZE(_actors); ++i) {
+ if (i == speaker) {
+ // Native 0x43c5a0/0x43c700/0x43c860 share the text-driven
+ // mouth sequence. Gina's table maps virtual 70..81 to 67..78.
+ _frames[i] = kInterrogationMouthBase[i] + _lipSync.frame(now);
+ _idle[i] = true;
+ _lastTick[i] = now;
+ continue;
+ }
const uint tick = i == 0 ? 60 : 80;
while (now - _lastTick[i] >= tick) {
_lastTick[i] += tick;
- if (i == speakerActor[_speakers[_phrase]]) {
- // Use the original speaking cels while the current line is active.
- _frames[i] = mouthBase[i] + (_lastTick[i] / 90) % 6;
- _idle[i] = true;
- } else if (_idle[i]) {
- _frames[i] = mouthBase[i] + (_random.getRandomNumber(14) == 0 ? 6 : 0);
- if (_random.getRandomNumber(i == 0 ? 49 : 9) == 0) {
+ if (_idle[i]) {
+ if (_frames[i] != kInterrogationMouthBase[i]) {
+ _frames[i] = kInterrogationMouthBase[i];
+ } else if (_random.getRandomNumber(14) == 0) {
+ _frames[i] = kInterrogationMouthBase[i] + 6;
+ } else if (_random.getRandomNumber(i == 0 ? 49 : 9) == 0) {
_idle[i] = false;
_frames[i] = 0;
}
diff --git a/engines/hollywood/runaway/presentation.h b/engines/hollywood/runaway/presentation.h
index 5f8777dfda5..8f32d20e8d4 100644
--- a/engines/hollywood/runaway/presentation.h
+++ b/engines/hollywood/runaway/presentation.h
@@ -25,6 +25,7 @@
#include "common/random.h"
#include "common/language.h"
#include "common/ustr.h"
+#include "hollywood/runaway/animation.h"
#include "hollywood/runaway/audio.h"
#include "hollywood/runaway/graphics.h"
#include "hollywood/scene_text_store.h"
@@ -48,6 +49,7 @@ private:
void showSpeechRow();
RunawayAudio _audio;
Common::RandomSource _random;
+ RunawayLipSync _lipSync;
SceneTextStore _text;
Graphics::ManagedSurface _background;
RunawayAnimation _actors[3];
diff --git a/engines/hollywood/runaway/scene5030.cpp b/engines/hollywood/runaway/scene5030.cpp
index 6c628f93e56..47457f15e23 100644
--- a/engines/hollywood/runaway/scene5030.cpp
+++ b/engines/hollywood/runaway/scene5030.cpp
@@ -61,55 +61,6 @@ const SceneHotspot kHotspots[] = {
{1215, 542, 7}
};
-// The original 0x40fef0 generates one mouth shape per text character. Work
-// on decoded letters so accented French, German and Spanish vowels also
-// select the appropriate shape, independently of the source code page.
-uint32 speechLetter(uint32 c) {
- if ((c >= 'A' && c <= 'Z') || (c >= 0xc0 && c <= 0xde && c != 0xd7))
- c += 0x20;
- switch (c) {
- case 0xe0: case 0xe1: case 0xe2: case 0xe3: case 0xe4: case 0xe5: return 'a';
- case 0xe8: case 0xe9: case 0xea: case 0xeb: return 'e';
- case 0xec: case 0xed: case 0xee: case 0xef: return 'i';
- case 0xf2: case 0xf3: case 0xf4: case 0xf5: case 0xf6: return 'o';
- case 0xf9: case 0xfa: case 0xfb: case 0xfc: return 'u';
- case 0xe7: return 'c';
- case 0xf1: return 'n';
- default: return c;
- }
-}
-
-byte speechVowel(uint32 c) {
- switch (c) {
- case 'a': return 1;
- case 'e': return 2;
- case 'i': return 3;
- case 'o': return 4;
- case 'u': return 5;
- default: return 0;
- }
-}
-
-byte speechMouth(uint32 c, uint32 next, byte previous) {
- const byte vowel = speechVowel(c), nextVowel = speechVowel(next);
- if (vowel)
- return vowel;
- // Native 0x40fd30 anticipates the next vowel for most consonants, closes
- // for B/P/V, and retains the previous shape at spaces and some endings.
- switch (c) {
- case 'b': case 'p': case 'v': return 0;
- case 'f': return 5;
- case 'l': return next == 'l' ? 3 : nextVowel ? nextVowel : previous;
- case 'm': return nextVowel ? 0 : previous;
- case 's': return nextVowel ? nextVowel : previous;
- case ' ': return previous;
- default:
- if ((c >= 'a' && c <= 'z') || c == 0xdf)
- return next == ' ' ? previous : nextVowel;
- return 0;
- }
-}
-
} // End of anonymous namespace
bool RunawayScene5030::load() {
@@ -340,7 +291,7 @@ void RunawayScene5030::walkTo(Common::Point target) {
_path.push_back(previous);
i = next - 1;
}
- _walkStarted = _now;
+ _walkElapsed = _lastFootstep = 0;
debugC(1, kDebugScene, "Runaway demo: walk to %d,%d, reachable %d,%d, %u waypoints",
target.x, target.y, closest % kRoomWidth, closest / kRoomWidth, _path.size());
if (_path.empty())
@@ -362,41 +313,16 @@ void RunawayScene5030::showSpeechRow() {
const uint16 sample = _globalSpeech ? _speechSample : _voiceSamples[_speechRow - 500];
const uint32 duration = sample ? _audio.playSpeech(sample, _globalSpeech) : 0;
_subtitleUntil = _now + (duration ? MAX<uint>(1000, duration + 150) : MAX<uint>(3000, _subtitle.size() * 55));
- animateSpeech(duration);
+ _idleHead.reset(_now);
+ _lipSync.start(_subtitle, _now, duration, _random);
debugC(1, kDebugScene, "Runaway demo: dialogue row %u, voice %u, ends at row %u",
_speechRow, sample, _speechEnd);
}
-void RunawayScene5030::animateSpeech(uint32 duration) {
- _speechStarted = _now;
- _speechDuration = duration ? duration : _subtitleUntil - _now;
- _speechFrames.resize(_subtitle.size());
- if (_speechFrames.empty())
- return;
- // The native timer advances in 10 ms ticks, rounding up at a fractional
- // tick of 0.3. Without a voice sample it uses 80 ms per character.
- _speechFrameDuration = duration ? MAX<uint>(1, (duration / _speechFrames.size() + 7) / 10) * 10 : 80;
- for (uint i = 0; i < _speechFrames.size(); ++i) {
- const uint32 c = speechLetter(_subtitle[i]);
- const uint32 next = i + 1 < _subtitle.size() ? speechLetter(_subtitle[i + 1]) : 0;
- _speechFrames[i] = speechMouth(c, next, i ? _speechFrames[i - 1] : 0);
- }
- // Native 0x412680 occasionally selects the closed-eye set (6..11) for
- // four consecutive characters, then returns to the open-eye set (0..5).
- bool blink = false;
- for (uint i = 0; i < _speechFrames.size(); i += 4) {
- blink = !blink && _random.getRandomNumber(4) == 0;
- if (blink) {
- for (uint j = i; j < MIN<uint>(i + 4, _speechFrames.size()); ++j)
- _speechFrames[j] += 6;
- }
- }
-}
-
void RunawayScene5030::stopSpeech() {
_audio.stopSpeech();
_speechRow = _speechEnd = 0;
- _speechFrames.clear();
+ _lipSync.stop();
_subtitle.clear();
}
@@ -487,6 +413,17 @@ void RunawayScene5030::cancelWalk() {
_committedCaption.clear();
}
+void RunawayScene5030::playWalkFootstep() {
+ // The sixth E03 lookup table selects the walking surface (native
+ // 0x4282e2). Zero is silent; the shack uses surface 3. Volume follows
+ // the native actor-height / 455 ratio, so distant steps are quieter.
+ const byte surface = _maps[1280 + _mask[_position.y * kRoomWidth + _position.x]];
+ const uint volume = CLIP<int>((int)(RunawayActor::perspectiveHeight(_position) * 100 / 455), 0, 100);
+ if (surface >= 1 && surface <= 7)
+ _audio.playFootstep(surface, _random.getRandomBit(), volume * 255 / 100);
+ _lastFootstep = _walkElapsed;
+}
+
void RunawayScene5030::click(Common::Point mouse, RunawayVerb verb, byte item) {
if (_action != kNone || speaking() || mouse.y < kRoomTop || mouse.y >= kRoomTop + kRoomHeight)
return;
@@ -917,11 +854,13 @@ void RunawayScene5030::update(uint32 now, int scrollDirection, bool inventoryOpe
skipSpeech();
if (inventoryOpen && !inventoryPresentation()) {
_actionStarted += pausedTime;
- _walkStarted += pausedTime;
+ _idleHead.pause(pausedTime);
return;
}
updateAction();
if ((_action == kNone || _action == kWalkingAction) && _pathIndex < _path.size()) {
+ const uint previousWalkFrame = _walkElapsed / 60;
+ const float previousX = _x, previousY = _y;
float travel = elapsed * 0.18f;
while (travel > 0 && _pathIndex < _path.size()) {
const Common::Point target = _path[_pathIndex];
@@ -947,6 +886,19 @@ void RunawayScene5030::update(uint32 now, int scrollDirection, bool inventoryOpe
}
}
_position = Common::Point((int)(_x + 0.5f), (int)(_y + 0.5f));
+ if (_x != previousX || _y != previousY) {
+ _walkElapsed += elapsed;
+ // Native walking repeats cels 1..12 at 60 ms, with contacts at
+ // 6 and 12. Cels 13..18 belong to stopping/turning, not the gait.
+ for (uint frame = previousWalkFrame + 1; frame <= _walkElapsed / 60; ++frame) {
+ if ((1 + frame % 12) % 6 == 0)
+ playWalkFootstep();
+ }
+ // The final standing cel (0) is also a contact. Suppress a
+ // duplicate when it immediately follows another footfall.
+ if (_pathIndex == _path.size() && (!_lastFootstep || _walkElapsed - _lastFootstep > 60))
+ playWalkFootstep();
+ }
if (_pathIndex == _path.size()) {
debugC(1, kDebugScene, "Runaway demo: arrived at %d,%d", _position.x, _position.y);
arrive();
@@ -956,13 +908,10 @@ void RunawayScene5030::update(uint32 now, int scrollDirection, bool inventoryOpe
_windowClean && _unplugged && _lidOpen && _ice == kFrozen)
walkForAction(Common::Point(900, 473), 2, kMeltIce);
const bool walking = _pathIndex < _path.size();
- int headFrame = -1;
- if (_speechRow && !walking) {
- const uint32 speechElapsed = now - _speechStarted;
- const uint mouth = speechElapsed / _speechFrameDuration;
- headFrame = speechElapsed < _speechDuration && mouth < _speechFrames.size() ? _speechFrames[mouth] : 0;
- }
- _actor.setFrame(_facing, walking ? 1 + ((now - _walkStarted) / 70) % 18 : 0, headFrame);
+ const bool idle = !walking && !_speechRow && _action == kNone;
+ _idleHead.update(now, idle, _lipSync.frameDuration(), _random);
+ const int headFrame = walking ? -1 : _speechRow ? speechFrame() : idle ? _idleHead.frame() : -1;
+ _actor.setFrame(_facing, walking ? 1 + (_walkElapsed / 60) % 12 : 0, headFrame);
if (scrollDirection)
_cameraX += scrollDirection * MAX<int>(1, elapsed / 2);
else if (walking || (_action != kNone && _action != kIntro))
diff --git a/engines/hollywood/runaway/scene5030.h b/engines/hollywood/runaway/scene5030.h
index b88f10ed2f6..4a8ea966b37 100644
--- a/engines/hollywood/runaway/scene5030.h
+++ b/engines/hollywood/runaway/scene5030.h
@@ -25,6 +25,7 @@
#include "common/random.h"
#include "common/ustr.h"
#include "hollywood/resource.h"
+#include "hollywood/runaway/animation.h"
#include "hollywood/runaway/audio.h"
#include "hollywood/runaway/graphics.h"
#include "hollywood/runaway/inventory.h"
@@ -58,6 +59,7 @@ public:
const Common::U32String &subtitle() const { return _action == kPeekConversation ? _interrogation.subtitle() : _subtitle; }
bool busy() const { return _action != kNone; }
bool speaking() const { return _action == kPeekConversation ? _interrogation.speaking() : _speechRow != 0; }
+ byte speechFrame() const { return _lipSync.frame(_now); }
void skipSpeech();
bool playingVideo() const { return _action == kIntroVideo || _action == kCleanWindowVideo; }
bool inventoryPresentation() const { return _action == kIntroInventory; }
@@ -96,8 +98,8 @@ private:
void setPosition(Common::Point position, byte facing);
void updateAction();
void showSpeechRow();
- void animateSpeech(uint32 duration);
void stopSpeech();
+ void playWalkFootstep();
void startAction(Action action);
void finishAction();
bool loadPatch(uint chunk, Common::Array<byte> &patch);
@@ -118,6 +120,8 @@ private:
Common::RandomSource _random;
bool _peeked = false;
RunawayActor _actor;
+ RunawayLipSync _lipSync;
+ RunawayIdleHead _idleHead;
RunawayAnimation _intro, _lidActor, _lid, _unplug, _climb, _actionAnimation, _water, _hatch;
RunawayVideo _video;
Common::Point _position = Common::Point(623, 447);
@@ -138,9 +142,8 @@ private:
bool _pickedUp[20] = {};
bool _examined[20] = {};
bool _globalSpeech = false;
- uint32 _now = 0, _lastUpdate = 0, _actionStarted = 0, _walkStarted = 0, _subtitleUntil = 0;
- uint32 _speechStarted = 0, _speechDuration = 0, _speechFrameDuration = 80;
- Common::Array<byte> _speechFrames;
+ uint32 _now = 0, _lastUpdate = 0, _actionStarted = 0, _subtitleUntil = 0;
+ uint32 _walkElapsed = 0, _lastFootstep = 0;
uint _step = 0;
uint16 _speechRow = 0, _speechEnd = 0;
uint16 _speechSample = 0;
diff --git a/engines/hollywood/runaway/ui.cpp b/engines/hollywood/runaway/ui.cpp
index 75016998530..339cca47105 100644
--- a/engines/hollywood/runaway/ui.cpp
+++ b/engines/hollywood/runaway/ui.cpp
@@ -140,11 +140,15 @@ bool RunawayUI::cancel() {
return false;
}
-void RunawayUI::update(uint32 now, Common::Point mouse, byte roomHotspot, bool blocked, bool speaking, bool inventoryPresentation) {
+void RunawayUI::update(uint32 now, Common::Point mouse, byte roomHotspot, bool blocked, bool speaking,
+ bool inventoryPresentation, byte speechFrame) {
_now = now;
_mouse = mouse;
_blocked = blocked;
_speaking = speaking;
+ // Native 0x40e8e0 uses the same twelve mouth/eye frames as Brian in
+ // the room, on the same speech clock, including continuation lines.
+ _mouth = MIN<byte>(11, speechFrame);
if (_inventoryPresentation != inventoryPresentation) {
_inventoryPresentation = inventoryPresentation;
setInventoryOpen(inventoryPresentation);
@@ -204,7 +208,7 @@ void RunawayUI::update(uint32 now, Common::Point mouse, byte roomHotspot, bool b
if (_inventoryOpen && now - _portraitTick >= 60) {
_portraitTick = now;
if (_speaking) {
- _mouth = _random.getRandomNumber(5);
+ _blinkUntil = 0;
_lastInteraction = now;
_idleStarted = 0;
} else if (!busy() && _random.getRandomNumber(49) == 0) {
diff --git a/engines/hollywood/runaway/ui.h b/engines/hollywood/runaway/ui.h
index 6e7da582363..378db359975 100644
--- a/engines/hollywood/runaway/ui.h
+++ b/engines/hollywood/runaway/ui.h
@@ -43,7 +43,8 @@ public:
_audio(mixer), _inventory(inventory), _strings(strings), _random("runaway-ui") {}
~RunawayUI();
bool load();
- void update(uint32 now, Common::Point mouse, byte roomHotspot, bool blocked, bool speaking, bool inventoryPresentation = false);
+ void update(uint32 now, Common::Point mouse, byte roomHotspot, bool blocked, bool speaking,
+ bool inventoryPresentation = false, byte speechFrame = 0);
Command click(bool right);
void toggleInventory();
bool cancel();
Commit: 17f3e11ad1bda7b74bda6bc35e3624f813a0bfee
https://github.com/scummvm/scummvm/commit/17f3e11ad1bda7b74bda6bc35e3624f813a0bfee
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-10-27T11:28:15+01:00
Commit Message:
HOLLYWOOD: added save/load to runaway demo
Changed paths:
A engines/hollywood/runaway/saveload.cpp
A engines/hollywood/runaway/saveload.h
engines/hollywood/metaengine.cpp
engines/hollywood/module.mk
engines/hollywood/runaway/audio.cpp
engines/hollywood/runaway/audio.h
engines/hollywood/runaway/engine.cpp
engines/hollywood/runaway/engine.h
engines/hollywood/runaway/graphics.cpp
engines/hollywood/runaway/graphics.h
engines/hollywood/runaway/inventory.cpp
engines/hollywood/runaway/inventory.h
engines/hollywood/runaway/menu.cpp
engines/hollywood/runaway/menu.h
engines/hollywood/runaway/presentation.cpp
engines/hollywood/runaway/presentation.h
engines/hollywood/runaway/scene5030.cpp
engines/hollywood/runaway/scene5030.h
engines/hollywood/runaway/strings.cpp
engines/hollywood/runaway/strings.h
engines/hollywood/runaway/ui.cpp
engines/hollywood/runaway/ui.h
diff --git a/engines/hollywood/metaengine.cpp b/engines/hollywood/metaengine.cpp
index 49604f4a97c..d656dc932e6 100644
--- a/engines/hollywood/metaengine.cpp
+++ b/engines/hollywood/metaengine.cpp
@@ -65,6 +65,7 @@ bool HollywoodMetaEngine::hasFeature(MetaEngineFeature f) const {
void HollywoodMetaEngine::registerDefaultSettings(const Common::String &) const {
ConfMan.registerDefault("subtitles", true);
registerMonstersDefaultSettings();
+ RunawayEngine::registerDefaultSettings();
}
void HollywoodMetaEngine::getSavegameThumbnail(Graphics::Surface &thumb) {
@@ -72,6 +73,9 @@ void HollywoodMetaEngine::getSavegameThumbnail(Graphics::Surface &thumb) {
getMonstersSavegameThumbnail(thumb);
return;
}
+ if (g_engine && ConfMan.get("gameid") == "runaway" &&
+ static_cast<RunawayEngine *>(g_engine)->copySaveThumbnail(thumb))
+ return;
Graphics::createThumbnail(thumb);
}
diff --git a/engines/hollywood/module.mk b/engines/hollywood/module.mk
index b9029497c8d..0c1282c9847 100644
--- a/engines/hollywood/module.mk
+++ b/engines/hollywood/module.mk
@@ -145,6 +145,7 @@ MODULE_OBJS = \
runaway/inventory.o \
runaway/menu.o \
runaway/presentation.o \
+ runaway/saveload.o \
runaway/scene5030.o \
runaway/strings.o \
runaway/ui.o \
diff --git a/engines/hollywood/runaway/audio.cpp b/engines/hollywood/runaway/audio.cpp
index b5074429594..946296c3412 100644
--- a/engines/hollywood/runaway/audio.cpp
+++ b/engines/hollywood/runaway/audio.cpp
@@ -27,6 +27,7 @@
#include "hollywood/debug.h"
#include "hollywood/runaway/audio.h"
+#include "hollywood/runaway/graphics.h"
namespace Hollywood {
@@ -123,11 +124,32 @@ void RunawayAudio::stopMusic() {
_mixer->stopHandle(_music);
}
+void RunawayAudio::playPointer() {
+ // Native 0x405d14 / 0x407530: RESOURCE.000 chunk 150, 16 kHz,
+ // signed 16-bit mono. This short effect accompanies a cursor change.
+ Common::Array<byte> data;
+ if (!readRunawayGlobalChunk(150, data) || data.size() % 2)
+ return;
+ byte *samples = (byte *)malloc(data.size());
+ memcpy(samples, data.data(), data.size());
+ _mixer->stopHandle(_pointer);
+ _mixer->playStream(Audio::Mixer::kSFXSoundType, &_pointer,
+ Audio::makeRawStream(samples, data.size(), 16000, Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN),
+ -1, 3);
+}
+
+void RunawayAudio::playMenuMusic() {
+ // Options volume preview and credits use shared music cue 1, channel 7.
+ play("RESOURCE.002", 1, 100, false, Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN | Audio::FLAG_STEREO,
+ Audio::Mixer::kMusicSoundType, _music, 255, true);
+}
+
void RunawayAudio::stopSpeech() {
_mixer->stopHandle(_speech);
}
void RunawayAudio::stopEffect() {
+ _mixer->stopHandle(_pointer);
_mixer->stopHandle(_footstep);
for (uint i = 0; i < ARRAYSIZE(_effects); ++i)
_mixer->stopHandle(_effects[i]);
diff --git a/engines/hollywood/runaway/audio.h b/engines/hollywood/runaway/audio.h
index f4322617268..4f7c62cf7d8 100644
--- a/engines/hollywood/runaway/audio.h
+++ b/engines/hollywood/runaway/audio.h
@@ -36,6 +36,8 @@ public:
uint32 playSpeech(uint16 sample, bool global = false);
void playEffect(uint16 cue, byte volume = Audio::Mixer::kMaxChannelVolume, byte channel = 0, bool loop = false);
void playFootstep(byte surface, byte variant, byte volume = Audio::Mixer::kMaxChannelVolume);
+ void playPointer();
+ void playMenuMusic();
void stopMusic();
void stopSpeech();
void stopEffect();
@@ -46,7 +48,7 @@ private:
uint32 play(const char *archive, uint16 cue, uint tableCount, bool pairedTables,
byte flags, Audio::Mixer::SoundType type, Audio::SoundHandle &handle, byte volume, bool loop);
Audio::Mixer *_mixer;
- Audio::SoundHandle _music, _speech, _effects[2], _footstep;
+ Audio::SoundHandle _music, _speech, _effects[2], _footstep, _pointer;
};
} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/engine.cpp b/engines/hollywood/runaway/engine.cpp
index e1415f3efa8..5a6359d9f7c 100644
--- a/engines/hollywood/runaway/engine.cpp
+++ b/engines/hollywood/runaway/engine.cpp
@@ -21,14 +21,17 @@
#include "backends/keymapper/action.h"
#include "backends/keymapper/keymap.h"
+#include "backends/keymapper/keymapper.h"
#include "backends/keymapper/standard-actions.h"
#include "common/archive.h"
#include "common/config-manager.h"
#include "common/events.h"
#include "common/fs.h"
+#include "common/savefile.h"
#include "common/system.h"
#include "common/translation.h"
#include "engines/util.h"
+#include "engines/metaengine.h"
#include "graphics/cursorman.h"
#include "gui/debugger.h"
@@ -37,6 +40,7 @@
#include "hollywood/runaway/menu.h"
#include "hollywood/runaway/presentation.h"
#include "hollywood/runaway/scene5030.h"
+#include "hollywood/runaway/saveload.h"
#include "hollywood/runaway/strings.h"
#include "hollywood/runaway/ui.h"
@@ -57,6 +61,101 @@ enum RunawayAction {
} // End of anonymous namespace
+RunawayEngine::RunawayEngine(OSystem *syst, Common::Language language) :
+ Engine(syst), _language(language), _strings(language) {}
+
+RunawayEngine::~RunawayEngine() {}
+
+void RunawayEngine::registerDefaultSettings() {
+ ConfMan.registerDefault("runaway_antialias", true);
+ ConfMan.registerDefault("runaway_fast_scrolling", true);
+ ConfMan.registerDefault("runaway_pointer_sound", true);
+}
+
+RunawayMenu::Settings RunawayEngine::readSettings() const {
+ RunawayMenu::Settings settings;
+ settings.music = !ConfMan.getBool("music_mute");
+ settings.subtitles = !ConfMan.hasKey("subtitles") || ConfMan.getBool("subtitles");
+ settings.antialias = ConfMan.getBool("runaway_antialias");
+ settings.fastScrolling = ConfMan.getBool("runaway_fast_scrolling");
+ settings.pointerSound = ConfMan.getBool("runaway_pointer_sound");
+ settings.volume = MAX(ConfMan.getInt("music_volume"), MAX(ConfMan.getInt("sfx_volume"), ConfMan.getInt("speech_volume")));
+ return settings;
+}
+
+void RunawayEngine::applySettings(const RunawayMenu::Settings &settings, bool restoreDefaults) {
+ const RunawayMenu::Settings previous = readSettings();
+ ConfMan.setBool("music_mute", !settings.music);
+ ConfMan.setBool("subtitles", settings.subtitles);
+ ConfMan.setBool("runaway_antialias", settings.antialias);
+ ConfMan.setBool("runaway_fast_scrolling", settings.fastScrolling);
+ ConfMan.setBool("runaway_pointer_sound", settings.pointerSound);
+ // Preserve independent channel levels until the master dial is adjusted
+ // or the player explicitly restores defaults.
+ if (restoreDefaults || previous.volume != settings.volume) {
+ ConfMan.setInt("music_volume", settings.volume);
+ ConfMan.setInt("sfx_volume", settings.volume);
+ ConfMan.setInt("speech_volume", settings.volume);
+ }
+ syncSoundSettings();
+}
+
+void RunawayEngine::present(const Graphics::ManagedSurface &screen) {
+ _system->copyRectToScreen(screen.getPixels(), screen.pitch, 0, 0, screen.w, screen.h);
+ _system->updateScreen();
+}
+
+bool RunawayEngine::canSaveGameStateCurrently(Common::U32String *) {
+ return _gameStarted && !_inPresentation && _scene && _ui && _scene->canSave() && !_ui->busy();
+}
+
+bool RunawayEngine::canLoadGameStateCurrently(Common::U32String *) {
+ return _scene && _ui;
+}
+
+Common::Error RunawayEngine::saveGameStream(Common::WriteStream *stream, bool) {
+ if (!canSaveGameStateCurrently())
+ return Common::kWritingFailed;
+ RunawaySaveState state;
+ _scene->captureState(state);
+ _ui->captureState(state);
+ state.playTime = getTotalPlayTime();
+ return state.write(*stream) ? Common::kNoError : Common::kWritingFailed;
+}
+
+Common::Error RunawayEngine::loadGameStream(Common::SeekableReadStream *stream) {
+ if (!canLoadGameStateCurrently())
+ return Common::kReadingFailed;
+ RunawaySaveState state;
+ if (!state.read(*stream))
+ return Common::Error(Common::kReadingFailed, "Invalid or unsupported Runaway save");
+ // Build and validate replacement resources before touching the live scene.
+ // Failed reads leave the current puzzle, inventory, audio and UI intact.
+ Common::ScopedPtr<RunawayScene5030> scene(new RunawayScene5030(_mixer, *_inventory, _strings));
+ if (!scene->load() || !scene->restoreState(state, state.playTime))
+ return Common::kReadingFailed;
+ _scene.reset(scene.release());
+ _ui->restoreState(state, state.playTime);
+ setTotalPlayTime(state.playTime);
+ _loadedGame = _gameStarted = true;
+ syncSoundSettings();
+ _scene->draw();
+ return Common::kNoError;
+}
+
+bool RunawayEngine::copySaveThumbnail(Graphics::Surface &thumbnail) const {
+ if (!_scene)
+ return false;
+ const Graphics::ManagedSurface &screen = _scene->screen();
+ thumbnail.create(160, 100, screen.format);
+ for (int y = 0; y < thumbnail.h; ++y) {
+ uint16 *out = (uint16 *)thumbnail.getBasePtr(0, y);
+ for (int x = 0; x < thumbnail.w; ++x)
+ out[x] = *(const uint16 *)screen.getBasePtr(x * screen.w / thumbnail.w, kRunawayViewportTop + y * 600 / thumbnail.h);
+ }
+ return true;
+}
+
void RunawayEngine::initializePath(const Common::FSNode &gamePath) {
Engine::initializePath(gamePath);
SearchMan.addSubDirectoryMatching(gamePath, "Resource");
@@ -70,7 +169,8 @@ void RunawayEngine::initializePath(const Common::FSNode &gamePath) {
}
bool RunawayEngine::hasFeature(EngineFeature feature) const {
- return feature == kSupportsReturnToLauncher || feature == kSupportsSubtitleOptions;
+ return feature == kSupportsReturnToLauncher || feature == kSupportsSubtitleOptions ||
+ feature == kSupportsSavingDuringRuntime || feature == kSupportsLoadingDuringRuntime;
}
void RunawayEngine::syncSoundSettings() {
@@ -78,16 +178,23 @@ void RunawayEngine::syncSoundSettings() {
const bool mute = ConfMan.hasKey("mute") && ConfMan.getBool("mute");
_mixer->muteSoundType(Audio::Mixer::kMusicSoundType, mute || ConfMan.getBool("music_mute"));
_mixer->muteSoundType(Audio::Mixer::kSFXSoundType, mute || ConfMan.getBool("sfx_mute"));
+ const RunawayMenu::Settings settings = readSettings();
+ if (_scene)
+ _scene->setOptions(settings.antialias, settings.fastScrolling);
+ if (_ui)
+ _ui->setPointerSound(settings.pointerSound);
}
Common::Error RunawayEngine::playIntro(RunawayMenu &menu) {
+ _inPresentation = true;
+ _loadedGame = false;
RunawayIntro intro(_mixer);
if (!intro.load())
return Common::Error(Common::kReadingFailed, "Cannot load the Runaway demo logo or story card");
const bool cursorWasVisible = CursorMan.showMouse(false);
intro.start(getTotalPlayTime());
intro.draw();
- while (!shouldQuit() && !intro.finished()) {
+ while (!shouldQuit() && !intro.finished() && !_loadedGame) {
bool skip = false, openMenu = false;
Common::Event event;
while (!openMenu && _eventMan->pollEvent(event)) {
@@ -100,7 +207,7 @@ Common::Error RunawayEngine::playIntro(RunawayMenu &menu) {
openMenu = true;
}
}
- if (shouldQuit())
+ if (shouldQuit() || _loadedGame)
break;
if (openMenu) {
pauseMenu(menu, intro.screen());
@@ -112,11 +219,11 @@ Common::Error RunawayEngine::playIntro(RunawayMenu &menu) {
intro.skip(now);
intro.draw();
const Graphics::ManagedSurface &screen = intro.screen();
- _system->copyRectToScreen(screen.getPixels(), screen.pitch, 0, 0, screen.w, screen.h);
- _system->updateScreen();
+ present(screen);
_system->delayMillis(10);
}
CursorMan.showMouse(cursorWasVisible);
+ _inPresentation = false;
return Common::kNoError;
}
@@ -127,21 +234,29 @@ Common::Error RunawayEngine::run() {
return Common::kUnsupportedColorMode;
setDebugger(new GUI::Debugger());
syncSoundSettings();
- const RunawayStrings strings(_language);
- RunawayMenu menu(strings);
+ RunawayMenu menu(_mixer, _strings);
if (!menu.load())
return Common::Error(Common::kReadingFailed, "Cannot load the Runaway demo menu");
- const Common::Error introResult = playIntro(menu);
- if (introResult.getCode() != Common::kNoError || shouldQuit())
- return introResult;
-
- RunawayInventory inventory(strings);
- RunawayScene5030 scene(_mixer, inventory, strings);
- RunawayUI ui(_mixer, inventory, strings);
- if (!scene.load() || !ui.load())
+ _inventory.reset(new RunawayInventory(_strings));
+ _scene.reset(new RunawayScene5030(_mixer, *_inventory, _strings));
+ _ui.reset(new RunawayUI(_mixer, *_inventory, _strings));
+ if (!_scene->load() || !_ui->load())
return Common::Error(Common::kReadingFailed, "Cannot load the Runaway demo room, opening movie or interface data");
- scene.start(getTotalPlayTime());
- scene.draw();
+ syncSoundSettings();
+ if (ConfMan.hasKey("save_slot") && ConfMan.getInt("save_slot") >= 0) {
+ const Common::Error result = loadGameState(ConfMan.getInt("save_slot"));
+ if (result.getCode() != Common::kNoError)
+ return result;
+ } else {
+ const Common::Error result = playIntro(menu);
+ if (result.getCode() != Common::kNoError || shouldQuit())
+ return result;
+ }
+ if (!_loadedGame)
+ _scene->start(getTotalPlayTime());
+ _gameStarted = true;
+ _loadedGame = false;
+ _scene->draw();
CursorMan.showMouse(true);
_system->warpMouse(RunawayScene5030::kScreenWidth / 2, RunawayScene5030::kRoomTop + RunawayScene5030::kRoomHeight / 2);
@@ -149,37 +264,39 @@ Common::Error RunawayEngine::run() {
while (!shouldQuit()) {
const uint32 now = getTotalPlayTime();
Common::Point mouse = _eventMan->getMousePos();
- ui.update(now, mouse, scene.hotspotAt(mouse), scene.busy(), scene.speaking(), scene.inventoryPresentation(), scene.speechFrame());
+ _ui->update(now, mouse, _scene->hotspotAt(mouse), _scene->busy(), _scene->speaking(), _scene->inventoryPresentation(), _scene->speechFrame());
bool openMenu = false;
Common::Event event;
while (!openMenu && _eventMan->pollEvent(event)) {
+ if (_loadedGame)
+ break;
if (event.type == Common::EVENT_LBUTTONDOWN || event.type == Common::EVENT_RBUTTONDOWN) {
- ui.update(now, event.mouse, scene.hotspotAt(event.mouse), scene.busy(), scene.speaking(), scene.inventoryPresentation(), scene.speechFrame());
- const RunawayUI::Command command = ui.click(event.type == Common::EVENT_RBUTTONDOWN);
+ _ui->update(now, event.mouse, _scene->hotspotAt(event.mouse), _scene->busy(), _scene->speaking(), _scene->inventoryPresentation(), _scene->speechFrame());
+ const RunawayUI::Command command = _ui->click(event.type == Common::EVENT_RBUTTONDOWN);
switch (command.type) {
case RunawayUI::Command::kOpenMenu:
openMenu = true;
break;
case RunawayUI::Command::kRoom:
- scene.click(command.mouse, command.verb, command.item);
+ _scene->click(command.mouse, command.verb, command.item);
break;
case RunawayUI::Command::kExamineItem:
- scene.sayInventory(inventory.examine(command.target));
+ _scene->sayInventory(_inventory->examine(command.target));
break;
case RunawayUI::Command::kCombine:
- scene.sayInventory(inventory.combine(command.item, command.target));
+ _scene->sayInventory(_inventory->combine(command.item, command.target));
break;
case RunawayUI::Command::kSkipSpeech:
- scene.skipSpeech();
+ _scene->skipSpeech();
break;
default:
- if (scene.playingVideo())
- scene.skipVideo();
+ if (_scene->playingVideo())
+ _scene->skipVideo();
break;
}
} else if (event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_START || event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_END) {
mouse = _eventMan->getMousePos();
- ui.update(now, mouse, scene.hotspotAt(mouse), scene.busy(), scene.speaking(), scene.inventoryPresentation(), scene.speechFrame());
+ _ui->update(now, mouse, _scene->hotspotAt(mouse), _scene->busy(), _scene->speaking(), _scene->inventoryPresentation(), _scene->speechFrame());
const bool pressed = event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_START;
switch (event.customType) {
case kPauseMenu:
@@ -192,37 +309,37 @@ Common::Error RunawayEngine::run() {
rightPressed = pressed;
break;
case kScrollStart:
- if (pressed && !ui.inventoryOpen() && !scene.busy())
- scene.setCameraX(0);
+ if (pressed && !_ui->inventoryOpen() && !_scene->busy())
+ _scene->setCameraX(0);
break;
case kScrollEnd:
- if (pressed && !ui.inventoryOpen() && !scene.busy())
- scene.setCameraX(RunawayScene5030::kRoomWidth - RunawayScene5030::kScreenWidth);
+ if (pressed && !_ui->inventoryOpen() && !_scene->busy())
+ _scene->setCameraX(RunawayScene5030::kRoomWidth - RunawayScene5030::kScreenWidth);
break;
case kCancelAction:
if (pressed) {
- if (scene.playingVideo())
- scene.skipVideo();
- else if (scene.speaking())
- scene.skipSpeech();
- else if (!ui.cancel())
+ if (_scene->playingVideo())
+ _scene->skipVideo();
+ else if (_scene->speaking())
+ _scene->skipSpeech();
+ else if (!_ui->cancel())
openMenu = true;
}
break;
case kToggleInventory:
if (pressed)
- ui.toggleInventory();
+ _ui->toggleInventory();
break;
case kCycleAction:
- if (pressed && ui.click(true).type == RunawayUI::Command::kSkipSpeech)
- scene.skipSpeech();
+ if (pressed && _ui->click(true).type == RunawayUI::Command::kSkipSpeech)
+ _scene->skipSpeech();
break;
case kSkip:
if (pressed) {
- if (scene.playingVideo())
- scene.skipVideo();
+ if (_scene->playingVideo())
+ _scene->skipVideo();
else
- scene.skipSpeech();
+ _scene->skipSpeech();
}
break;
}
@@ -230,8 +347,14 @@ Common::Error RunawayEngine::run() {
}
if (shouldQuit())
break;
+ if (_loadedGame) {
+ _loadedGame = false;
+ leftPressed = rightPressed = false;
+ continue;
+ }
if (openMenu) {
- pauseMenu(menu, scene.screen());
+ pauseMenu(menu, _scene->screen());
+ _loadedGame = false;
leftPressed = rightPressed = false;
// Refresh the engine clock and redraw the room after resuming.
// The input which closed the menu must not reach a room action.
@@ -247,25 +370,32 @@ Common::Error RunawayEngine::run() {
}
// The engine clock excludes time spent in ScummVM dialogs, keeping
// animation frames and subtitle deadlines in sync with paused audio.
- scene.update(now, ui.inventoryOpen() || scene.busy() ? 0 : direction, ui.inventoryOpen());
+ _scene->update(now, _ui->inventoryOpen() || _scene->busy() ? 0 : direction, _ui->inventoryOpen());
// The extended French demo's later rooms are not implemented yet;
// all three releases currently finish at the shared shack escape.
- if (scene.escaped())
- return playEnding(menu);
- ui.update(now, mouse, scene.hotspotAt(mouse), scene.busy(), scene.speaking(), scene.inventoryPresentation(), scene.speechFrame());
- scene.draw();
- Graphics::ManagedSurface &screen = scene.screen();
+ if (_scene->escaped()) {
+ const Common::Error result = playEnding(menu);
+ if (!_loadedGame || result.getCode() != Common::kNoError || shouldQuit())
+ return result;
+ _loadedGame = false;
+ leftPressed = rightPressed = false;
+ continue;
+ }
+ _ui->update(now, mouse, _scene->hotspotAt(mouse), _scene->busy(), _scene->speaking(), _scene->inventoryPresentation(), _scene->speechFrame());
+ _scene->draw();
+ Graphics::ManagedSurface &screen = _scene->screen();
const bool subtitles = !ConfMan.hasKey("subtitles") || ConfMan.getBool("subtitles") || ConfMan.getBool("speech_mute");
- ui.draw(screen, scene.actionCaption(scene.hotspotAt(mouse), ui.verb(), inventory.selected()),
- scene.committedCaption(), scene.subtitle(), subtitles);
- _system->copyRectToScreen(screen.getPixels(), screen.pitch, 0, 0, screen.w, screen.h);
- _system->updateScreen();
+ _ui->draw(screen, _scene->actionCaption(_scene->hotspotAt(mouse), _ui->verb(), _inventory->selected()),
+ _scene->committedCaption(), _scene->subtitle(), subtitles);
+ present(screen);
_system->delayMillis(16);
}
return Common::kNoError;
}
Common::Error RunawayEngine::playEnding(RunawayMenu &menu) {
+ _inPresentation = true;
+ _loadedGame = false;
RunawayEnding ending(_mixer, _language);
if (!ending.load())
return Common::Error(Common::kReadingFailed, "Cannot load the Runaway demo ending");
@@ -273,7 +403,7 @@ Common::Error RunawayEngine::playEnding(RunawayMenu &menu) {
const bool cursorWasVisible = CursorMan.showMouse(false);
ending.start(getTotalPlayTime());
ending.draw(screen);
- while (!shouldQuit() && !ending.finished()) {
+ while (!shouldQuit() && !ending.finished() && !_loadedGame) {
bool skip = false, openMenu = false;
Common::Event event;
while (!openMenu && _eventMan->pollEvent(event)) {
@@ -286,7 +416,7 @@ Common::Error RunawayEngine::playEnding(RunawayMenu &menu) {
openMenu = true;
}
}
- if (shouldQuit())
+ if (shouldQuit() || _loadedGame)
break;
if (openMenu) {
pauseMenu(menu, screen);
@@ -297,28 +427,37 @@ Common::Error RunawayEngine::playEnding(RunawayMenu &menu) {
if (skip)
ending.skip(now);
ending.draw(screen);
- _system->copyRectToScreen(screen.getPixels(), screen.pitch, 0, 0, screen.w, screen.h);
- _system->updateScreen();
+ present(screen);
_system->delayMillis(16);
}
CursorMan.showMouse(cursorWasVisible);
+ _inPresentation = false;
return Common::kNoError;
}
void RunawayEngine::pauseMenu(RunawayMenu &menu, Graphics::ManagedSurface &screen) {
- // PauseToken freezes the mixer and excludes menu time from the scene/UI
- // clocks, including walking, speech deadlines and pickup sound cues.
+ // Existing gameplay channels and clocks stay paused; new menu preview
+ // music is owned separately and stopped before gameplay resumes.
PauseToken pauseToken = pauseEngine();
- RunawayMenu::Settings settings;
- settings.music = !ConfMan.getBool("music_mute");
- settings.subtitles = !ConfMan.hasKey("subtitles") || ConfMan.getBool("subtitles");
- settings.volume = MAX(ConfMan.getInt("music_volume"), MAX(ConfMan.getInt("sfx_volume"), ConfMan.getInt("speech_volume")));
- menu.open(screen, settings);
+ RunawayMenu::Settings settings = readSettings();
+ menu.open(screen, settings, canSaveGameStateCurrently(), canLoadGameStateCurrently());
menu.update(_eventMan->getMousePos());
+ // Never draw options into the scene: its image is also the save thumbnail.
+ Graphics::ManagedSurface menuScreen(screen.w, screen.h, screen.format);
+ Common::Keymap *keymap = _eventMan->getKeymapper()->getKeymap("runaway");
+ const bool keymapEnabled = keymap && keymap->isEnabled();
+ const bool virtualKeyboard = _system->hasFeature(OSystem::kFeatureVirtualKeyboard) &&
+ _system->getFeatureState(OSystem::kFeatureVirtualKeyboard);
+ bool enteringName = false;
bool finished = false, changed = false;
while (!shouldQuit() && !finished) {
+ menu.tick(_system->getMillis());
Common::Event event;
while (!finished && _eventMan->pollEvent(event)) {
+ if (_loadedGame) {
+ finished = true;
+ break;
+ }
RunawayMenu::Command command = RunawayMenu::kNone;
if (event.type == Common::EVENT_MOUSEMOVE) {
command = menu.update(event.mouse);
@@ -330,54 +469,85 @@ void RunawayEngine::pauseMenu(RunawayMenu &menu, Graphics::ManagedSurface &scree
menu.release();
} else if (event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_START) {
switch (event.customType) {
- case kPauseMenu:
- case kCancelAction:
- case kSkip:
+ case kPauseMenu: case kCancelAction:
command = menu.cancel();
break;
- case kScrollLeft:
- command = menu.adjustVolume(-8);
- break;
- case kScrollRight:
- command = menu.adjustVolume(8);
- break;
- default:
- break;
+ case kSkip: command = menu.key(Common::KeyState(Common::KEYCODE_RETURN)); break;
+ case kScrollLeft: command = menu.key(Common::KeyState(Common::KEYCODE_LEFT)); break;
+ case kScrollRight: command = menu.key(Common::KeyState(Common::KEYCODE_RIGHT)); break;
+ case kScrollStart: command = menu.key(Common::KeyState(Common::KEYCODE_HOME)); break;
+ case kScrollEnd: command = menu.key(Common::KeyState(Common::KEYCODE_END)); break;
+ default: break;
}
- } else if (event.type == Common::EVENT_KEYDOWN && !event.kbdRepeat) {
- command = menu.key(event.kbd.ascii);
+ } else if (event.type == Common::EVENT_KEYDOWN) {
+ if (!event.kbdRepeat || menu.enteringName())
+ command = menu.key(event.kbd);
} else if (event.type == Common::EVENT_WHEELUP || event.type == Common::EVENT_WHEELDOWN) {
- command = menu.adjustVolume(event.type == Common::EVENT_WHEELUP ? 8 : -8);
+ command = menu.adjust(event.type == Common::EVENT_WHEELUP ? 4 : -4);
}
- const RunawayMenu::Settings ¤t = menu.settings();
- if (settings.music != current.music || settings.subtitles != current.subtitles || settings.volume != current.volume) {
- ConfMan.setBool("music_mute", !current.music);
- ConfMan.setBool("subtitles", current.subtitles);
- // Preserve independently configured channel volumes unless the
- // player actually moves the original master-volume control.
- if (settings.volume != current.volume) {
- ConfMan.setInt("music_volume", current.volume);
- ConfMan.setInt("sfx_volume", current.volume);
- ConfMan.setInt("speech_volume", current.volume);
- }
- settings = current;
- syncSoundSettings();
+ if (settings != menu.settings() || command == RunawayMenu::kRestoreDefaults) {
+ settings = menu.settings();
+ applySettings(settings, command == RunawayMenu::kRestoreDefaults);
changed = true;
}
- if (command == RunawayMenu::kResume || command == RunawayMenu::kQuit) {
+ if (command == RunawayMenu::kBrowseLoad || command == RunawayMenu::kBrowseSave || command == RunawayMenu::kBrowseDelete) {
+ const SaveStateList saves = getMetaEngine()->listSaves(_targetName.c_str());
+ int freeSlot = -1;
+ if (command == RunawayMenu::kBrowseSave) {
+ for (int slot = 0; slot <= getMetaEngine()->getMaximumSaveSlot(); ++slot) {
+ if (slot != getMetaEngine()->getAutosaveSlot() && !_saveFileMan->exists(getSaveStateName(slot))) {
+ freeSlot = slot;
+ break;
+ }
+ }
+ }
+ menu.browse(command, saves, freeSlot);
+ if (command == RunawayMenu::kBrowseSave && freeSlot < 0)
+ menu.showMessage(_strings.text(RunawayStrings::kNoFreeSlots));
+ } else if (command == RunawayMenu::kSaveGame) {
+ const Common::Error result = saveGameState(menu.selectedSlot(), menu.saveDescription());
+ menu.operationDone(result.getCode() == Common::kNoError);
+ if (result.getCode() != Common::kNoError)
+ menu.showMessage(_strings.text(RunawayStrings::kSaveFailed));
+ } else if (command == RunawayMenu::kLoadGame) {
+ const Common::Error result = loadGameState(menu.selectedSlot());
+ finished = result.getCode() == Common::kNoError;
+ if (!finished)
+ menu.showMessage(_strings.text(RunawayStrings::kLoadFailed));
+ } else if (command == RunawayMenu::kDeleteGame) {
+ const bool success = getMetaEngine()->removeSaveState(_targetName.c_str(), menu.selectedSlot());
+ menu.operationDone(success);
+ if (!success)
+ menu.showMessage(_strings.text(RunawayStrings::kDeleteFailed));
+ } else if (command == RunawayMenu::kSaveSettings) {
+ ConfMan.flushToDisk();
+ menu.showMessage(_strings.text(RunawayStrings::kSettingsSaved));
+ } else if (command == RunawayMenu::kResume || command == RunawayMenu::kQuit) {
if (command == RunawayMenu::kQuit)
quitGame();
finished = true;
}
+ if (enteringName != menu.enteringName()) {
+ enteringName = menu.enteringName();
+ // Space, I, Tab and remapped game shortcuts must remain text
+ // while entering a name, rather than triggering game actions.
+ if (keymap)
+ keymap->setEnabled(keymapEnabled && !enteringName);
+ if (_system->hasFeature(OSystem::kFeatureVirtualKeyboard))
+ _system->setFeatureState(OSystem::kFeatureVirtualKeyboard, enteringName || virtualKeyboard);
+ }
}
if (finished || shouldQuit())
break;
- menu.draw(screen);
- _system->copyRectToScreen(screen.getPixels(), screen.pitch, 0, 0, screen.w, screen.h);
- _system->updateScreen();
+ menu.draw(menuScreen);
+ present(menuScreen);
_system->delayMillis(16);
}
menu.close();
+ if (keymap)
+ keymap->setEnabled(keymapEnabled);
+ if (_system->hasFeature(OSystem::kFeatureVirtualKeyboard))
+ _system->setFeatureState(OSystem::kFeatureVirtualKeyboard, virtualKeyboard);
if (changed)
ConfMan.flushToDisk();
}
diff --git a/engines/hollywood/runaway/engine.h b/engines/hollywood/runaway/engine.h
index 0ff2097cbb4..2d9384c81da 100644
--- a/engines/hollywood/runaway/engine.h
+++ b/engines/hollywood/runaway/engine.h
@@ -24,7 +24,9 @@
#include "common/array.h"
#include "common/language.h"
+#include "common/ptr.h"
#include "engines/engine.h"
+#include "hollywood/runaway/menu.h"
namespace Common {
class Keymap;
@@ -37,25 +39,43 @@ class ManagedSurface;
namespace Hollywood {
class RunawayMenu;
+class RunawayInventory;
+class RunawayScene5030;
+class RunawayUI;
// Runaway shares the archive and text formats with Hollywood Monsters, but
// has its own RGB565 renderer, scene state and audio formats.
class RunawayEngine : public Engine {
public:
- RunawayEngine(OSystem *syst, Common::Language language) : Engine(syst), _language(language) {}
+ RunawayEngine(OSystem *syst, Common::Language language);
+ ~RunawayEngine() override;
Common::Error run() override;
void initializePath(const Common::FSNode &gamePath) override;
bool hasFeature(EngineFeature feature) const override;
void syncSoundSettings() override;
+ bool canLoadGameStateCurrently(Common::U32String *msg = nullptr) override;
+ bool canSaveGameStateCurrently(Common::U32String *msg = nullptr) override;
+ Common::Error loadGameStream(Common::SeekableReadStream *stream) override;
+ Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave = false) override;
+ bool copySaveThumbnail(Graphics::Surface &thumbnail) const;
static Common::Array<Common::Keymap *> initKeymaps();
+ static void registerDefaultSettings();
private:
Common::Error playIntro(RunawayMenu &menu);
Common::Error playEnding(RunawayMenu &menu);
void pauseMenu(RunawayMenu &menu, Graphics::ManagedSurface &screen);
+ RunawayMenu::Settings readSettings() const;
+ void applySettings(const RunawayMenu::Settings &settings, bool restoreDefaults = false);
+ void present(const Graphics::ManagedSurface &screen);
Common::Language _language;
+ RunawayStrings _strings;
+ Common::ScopedPtr<RunawayInventory> _inventory;
+ Common::ScopedPtr<RunawayScene5030> _scene;
+ Common::ScopedPtr<RunawayUI> _ui;
+ bool _inPresentation = false, _gameStarted = false, _loadedGame = false;
};
} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/graphics.cpp b/engines/hollywood/runaway/graphics.cpp
index 7348f37dc4d..9ec98623efe 100644
--- a/engines/hollywood/runaway/graphics.cpp
+++ b/engines/hollywood/runaway/graphics.cpp
@@ -286,7 +286,7 @@ float RunawayActor::perspectiveHeight(Common::Point position) {
}
void RunawayActor::draw(Graphics::ManagedSurface &surface, Common::Point position, int cameraX,
- int roomTop, const Common::Array<byte> &mask, const Common::Array<byte> &maps, bool sunlit) const {
+ int roomTop, const Common::Array<byte> &mask, const Common::Array<byte> &maps, bool sunlit, bool antialias) const {
// Actor coordinates are anchored at (168,434) in a nominal 455-pixel-high image.
const int scale = CLIP<int>((int)(perspectiveHeight(position) * 256 / 455), 64, 256);
const int originX = position.x - cameraX - 168 * scale / 256;
@@ -317,11 +317,36 @@ void RunawayActor::draw(Graphics::ManagedSurface &surface, Common::Point positio
for (int x = x0; x < x1; ++x, ++out) {
if (maps[512 + mask[(y - roomTop) * 1376 + x + cameraX]])
continue;
- const int source = sourceY * kWidth + (x - originX) * 256 / scale;
- if (_shadow[source])
- *out = blend565(0, *out, _shadow[source] / 2);
- if (_opacity[source])
- *out = blend565(palette[_pixels[source]], *out, _opacity[source]);
+ const int sourceX = (x - originX) * 256 / scale;
+ const int source = sourceY * kWidth + sourceX;
+ uint color = palette[_pixels[source]], opacity = _opacity[source], shadow = _shadow[source];
+ if (antialias && scale < 256) {
+ // Native 0x426040 averages color, opacity and shadow over
+ // each source footprint; 0x426de0 takes a single sample.
+ const int endX = MIN<int>(kWidth, (x - originX + 1) * 256 / scale);
+ const int endY = MIN<int>(kHeight, (y - originY + 1) * 256 / scale);
+ uint r = 0, g = 0, b = 0;
+ opacity = shadow = 0;
+ for (int sy = sourceY; sy < endY; ++sy) {
+ for (int sx = sourceX; sx < endX; ++sx) {
+ const uint sample = sy * kWidth + sx;
+ const uint16 c = _opacity[sample] ? palette[_pixels[sample]] : 0;
+ r += c >> 11;
+ g += (c >> 5) & 63;
+ b += c & 31;
+ opacity += _opacity[sample];
+ shadow += _shadow[sample];
+ }
+ }
+ const uint count = (endX - sourceX) * (endY - sourceY);
+ color = ((r / count) << 11) | ((g / count) << 5) | (b / count);
+ opacity /= count;
+ shadow /= count;
+ }
+ if (shadow)
+ *out = blend565(0, *out, shadow / 2);
+ if (opacity)
+ *out = blend565(color, *out, opacity);
}
}
}
diff --git a/engines/hollywood/runaway/graphics.h b/engines/hollywood/runaway/graphics.h
index 9521da0c24f..d5b9811bd1f 100644
--- a/engines/hollywood/runaway/graphics.h
+++ b/engines/hollywood/runaway/graphics.h
@@ -66,7 +66,8 @@ public:
bool setFrame(uint facing, uint frame, int headFrame = -1);
static float perspectiveHeight(Common::Point position);
void draw(Graphics::ManagedSurface &surface, Common::Point position, int cameraX,
- int roomTop, const Common::Array<byte> &mask, const Common::Array<byte> &maps, bool sunlit = false) const;
+ int roomTop, const Common::Array<byte> &mask, const Common::Array<byte> &maps,
+ bool sunlit = false, bool antialias = true) const;
private:
enum { kWidth = 345, kHeight = 518, kHeadHeight = 148, kFacings = 8, kFrames = 19,
diff --git a/engines/hollywood/runaway/inventory.cpp b/engines/hollywood/runaway/inventory.cpp
index ba032222847..6675523b969 100644
--- a/engines/hollywood/runaway/inventory.cpp
+++ b/engines/hollywood/runaway/inventory.cpp
@@ -21,6 +21,7 @@
#include "common/util.h"
#include "hollywood/runaway/inventory.h"
+#include "hollywood/runaway/saveload.h"
#include "hollywood/runaway/strings.h"
namespace Hollywood {
@@ -37,6 +38,24 @@ const uint16 kExamineCues[] = {
} // End of anonymous namespace
+void RunawayInventory::captureState(RunawaySaveState &state) const {
+ state.itemCount = _items.size();
+ for (uint i = 0; i < sizeof(state.items); ++i)
+ state.items[i] = itemAt(i);
+ state.selected = _selected;
+ state.cloth = _clothState;
+}
+
+void RunawayInventory::restoreState(const RunawaySaveState &state) {
+ assert(state.valid());
+ _items.clear();
+ for (uint i = 0; i < state.itemCount; ++i)
+ _items.push_back(state.items[i]);
+ _selected = state.selected;
+ _clothState = state.cloth;
+ _newItem = 0;
+}
+
bool RunawayInventory::contains(byte item) const {
for (uint i = 0; i < size(); ++i) {
if (_items[i] == item)
diff --git a/engines/hollywood/runaway/inventory.h b/engines/hollywood/runaway/inventory.h
index 00ecd257320..7fa5df5d4fd 100644
--- a/engines/hollywood/runaway/inventory.h
+++ b/engines/hollywood/runaway/inventory.h
@@ -28,6 +28,7 @@
namespace Hollywood {
class RunawayStrings;
+struct RunawaySaveState;
enum RunawayVerb { kVerbWalk, kVerbLook, kVerbUse };
@@ -55,6 +56,8 @@ public:
Reply combine(byte first, byte second);
byte clothState() const { return _clothState; }
void soilCloth() { _clothState = 2; }
+ void captureState(RunawaySaveState &state) const;
+ void restoreState(const RunawaySaveState &state);
private:
const RunawayStrings &_strings;
diff --git a/engines/hollywood/runaway/menu.cpp b/engines/hollywood/runaway/menu.cpp
index cf23b732eec..8da0d737aa7 100644
--- a/engines/hollywood/runaway/menu.cpp
+++ b/engines/hollywood/runaway/menu.cpp
@@ -27,25 +27,41 @@ namespace Hollywood {
namespace {
const Graphics::PixelFormat kMenuFormat(2, 5, 6, 5, 0, 11, 5, 0, 0);
-const uint16 kNormal = 0xbd32;
-const uint16 kHighlight = 0xff19;
-const uint16 kDisabled = 0x6b4d;
-Common::Rect returnRect() {
- return Common::Rect(612, 0, 712, 74);
+const uint16 kNormal = 0xbd32, kHighlight = 0xff19, kDisabled = 0x6b4d;
+
+Common::Rect returnRect() { return Common::Rect(612, 0, 712, 74); }
+
+void drawThumbnail(Graphics::ManagedSurface &screen, const Graphics::Surface &source, const Common::Rect &rect) {
+ if (!source.w || !source.h)
+ return;
+ for (int y = 0; y < rect.height(); ++y) {
+ uint16 *out = (uint16 *)screen.getBasePtr(rect.left, rect.top + y);
+ for (int x = 0; x < rect.width(); ++x) {
+ byte r, g, b;
+ source.format.colorToRGB(source.getPixel(x * source.w / rect.width(), y * source.h / rect.height()), r, g, b);
+ out[x] = screen.format.RGBToColor(r, g, b);
+ }
+ }
}
} // End of anonymous namespace
-RunawayMenu::~RunawayMenu() {
- close();
+bool RunawayMenu::Settings::operator==(const Settings &other) const {
+ return music == other.music && subtitles == other.subtitles && antialias == other.antialias &&
+ fastScrolling == other.fastScrolling && pointerSound == other.pointerSound &&
+ volume == other.volume;
}
+RunawayMenu::~RunawayMenu() { close(); }
+
bool RunawayMenu::load() {
Graphics::ManagedSurface cursors;
+ Common::Array<byte> animation;
if (!_font.load(true) || !_captionFont.load() ||
!loadRunawaySurface(132, 1024, 600, _background) ||
!loadRunawaySurface(130, 700, 74, _returnButton) ||
- !loadRunawaySurface(118, 48, 48, _logo) || !loadRunawaySurface(114, 904, 540, cursors))
+ !loadRunawaySurface(118, 48, 48, _logo) || !loadRunawaySurface(114, 904, 540, cursors) ||
+ !readRunawayGlobalChunk(155, animation) || !_volumeDial.load(animation, 103))
return false;
_cursor.create(60, 60, kMenuFormat);
_cursor.copyRectToSurface(cursors, 0, 0, Common::Rect(60, 60));
@@ -53,11 +69,16 @@ bool RunawayMenu::load() {
return true;
}
-void RunawayMenu::open(const Graphics::ManagedSurface &screen, const Settings &settings) {
+void RunawayMenu::open(const Graphics::ManagedSurface &screen, const Settings &settings, bool canSave, bool canLoad) {
close();
_settings = settings;
_settings.volume = CLIP(_settings.volume, 0, 256);
- _confirmQuit = _dragging = false;
+ _canSave = canSave;
+ _canLoad = canLoad;
+ _page = kOptions;
+ _confirmation = kNoConfirmation;
+ _notice.clear();
+ _saves.clear();
// The original options screen samples every fifth room pixel.
for (int y = 0; y < _thumbnail.h; ++y) {
uint16 *dst = (uint16 *)_thumbnail.getBasePtr(0, y);
@@ -72,11 +93,13 @@ void RunawayMenu::open(const Graphics::ManagedSurface &screen, const Settings &s
}
void RunawayMenu::close() {
+ _audio.stopMusic();
+ _audio.stopEffect();
if (_cursorPushed) {
CursorMan.popCursor();
_cursorPushed = false;
}
- _dragging = false;
+ _dragging = kNoControl;
}
Common::Rect RunawayMenu::labelRect(RunawayStrings::TextId id, int center, int y) const {
@@ -105,38 +128,91 @@ Common::Rect RunawayMenu::answerRect(bool yes) const {
return Common::Rect(x, 684, x + _captionFont.getStringWidth(_strings.text(yes ? RunawayStrings::kYes : RunawayStrings::kNo)), 712);
}
+Common::Rect RunawayMenu::saveRect(uint index) const {
+ // Native 0x41b3b0: twelve 204x120 thumbnails on a 210x139 pitch.
+ const int x = 377 + index % 3 * 210, y = 107 + index / 3 * 139;
+ return Common::Rect(x, y, x + 204, y + 120);
+}
+
+int RunawayMenu::saveAt(Common::Point mouse) const {
+ for (uint i = 0; i < 12 && _firstSave + i < _saves.size(); ++i) {
+ if (saveRect(i).contains(mouse))
+ return _firstSave + i;
+ }
+ return -1;
+}
+
RunawayMenu::Control RunawayMenu::controlAt(Common::Point mouse) const {
- if (_confirmQuit) {
+ if (_page == kCredits)
+ return kNoControl;
+ if (_confirmation != kNoConfirmation) {
if (answerRect(true).contains(mouse))
return kYes;
return answerRect(false).contains(mouse) ? kNo : kNoControl;
}
- if (returnRect().contains(mouse) || labelRect(RunawayStrings::kPlay, 183, 460).contains(mouse))
+ if (returnRect().contains(mouse))
return kPlay;
- if (labelRect(RunawayStrings::kQuit, 183, 502).contains(mouse))
- return kExit;
- const int ys[] = {161, 329};
- for (uint i = 0; i < ARRAYSIZE(ys); ++i) {
- if (Common::Rect(716, ys[i], 846, ys[i] + 28).contains(mouse))
- return i ? kSubtitlesOn : kMusicOn;
- if (Common::Rect(855, ys[i], 995, ys[i] + 28).contains(mouse))
- return i ? kSubtitlesOff : kMusicOff;
+ if (_page == kName)
+ return labelRect(RunawayStrings::kSave, 690, 518).contains(mouse) ? kAcceptName : kNoControl;
+ if (_page == kSaves) {
+ if (Common::Rect(332, 345, 370, 379).contains(mouse) && _firstSave > 0)
+ return kPrevious;
+ if (Common::Rect(332, 384, 370, 418).contains(mouse) && _firstSave + 12 < (int)_saves.size())
+ return kNext;
+ return kNoControl;
+ }
+ const RunawayStrings::TextId labels[] = {RunawayStrings::kLoad, RunawayStrings::kSave, RunawayStrings::kDelete,
+ RunawayStrings::kPlay, RunawayStrings::kQuit};
+ const Control controls[] = {kLoad, kSave, kDelete, kPlay, kExit};
+ for (uint i = 0; i < ARRAYSIZE(labels); ++i) {
+ if (labelRect(labels[i], 183, 334 + i * 42).contains(mouse))
+ return (i == 0 && !_canLoad) || (i == 1 && !_canSave) ? kNoControl : controls[i];
+ }
+ for (uint i = 0; i < 5; ++i) {
+ const int y = 161 + i * 42;
+ if (Common::Rect(716, y, 846, y + 28).contains(mouse))
+ return (Control)(kMusicOn + i * 2);
+ if (Common::Rect(855, y, 995, y + 28).contains(mouse))
+ return (Control)(kMusicOff + i * 2);
}
const int dx = mouse.x - 525, dy = mouse.y - 516;
- if (dx * dx + dy * dy <= 52 * 52)
+ if (dx * dx + dy * dy <= 52 * 52 || labelRect(RunawayStrings::kVolume, 525, 582).contains(mouse))
return kVolume;
+ if (labelRect(RunawayStrings::kCredits, 525, 392).contains(mouse))
+ return kShowCredits;
+ if (labelRect(RunawayStrings::kSaveSettings, 802, 404).contains(mouse))
+ return kStoreSettings;
+ if (labelRect(RunawayStrings::kDefaultSettings, 802, 446).contains(mouse))
+ return kDefaults;
return kNoControl;
}
RunawayMenu::Command RunawayMenu::update(Common::Point mouse) {
+ if (mouse != _mouse && _page == kSaves && _confirmation == kNoConfirmation)
+ _focusedSave = saveAt(mouse);
_mouse = mouse;
- if (_dragging)
- return adjustVolume(_dragVolume + (mouse.x - _dragX) * 2 - _settings.volume);
+ if (_dragging == kVolume)
+ return adjustVolume(_dragValue + (mouse.x - _dragX) * 256 / 100 - _settings.volume);
return kNone;
}
+void RunawayMenu::tick(uint32 now) {
+ _now = now;
+ if (_page == kCredits) {
+ _credits.update(now);
+ if (_credits.finished())
+ cancel();
+ }
+}
+
+void RunawayMenu::release() {
+ if (_dragging == kVolume)
+ _audio.stopMusic();
+ _dragging = kNoControl;
+}
+
RunawayMenu::Command RunawayMenu::adjustVolume(int delta) {
- if (_confirmQuit)
+ if (_confirmation != kNoConfirmation || _page != kOptions)
return kNone;
const int volume = CLIP(_settings.volume + delta, 0, 256);
if (volume == _settings.volume)
@@ -145,66 +221,253 @@ RunawayMenu::Command RunawayMenu::adjustVolume(int delta) {
return kSettingsChanged;
}
+RunawayMenu::Command RunawayMenu::adjust(int delta) {
+ if (_confirmation != kNoConfirmation)
+ return kNone;
+ if (_page == kSaves) {
+ _firstSave = CLIP(_firstSave + (delta > 0 ? -3 : 3), 0, MAX(0, (((int)_saves.size() + 2) / 3 - 4) * 3));
+ _focusedSave = saveAt(_mouse);
+ return kNone;
+ }
+ if (_page != kOptions)
+ return kNone;
+ return adjustVolume(delta * 2);
+}
+
+void RunawayMenu::browse(Command mode, const SaveStateList &saves, int newSlot) {
+ release();
+ _page = kSaves;
+ _browseMode = mode;
+ _saves = saves;
+ _newSlot = newSlot;
+ _selectedSlot = -1;
+ _firstSave = 0;
+ _confirmation = kNoConfirmation;
+ _notice.clear();
+ if (mode == kBrowseSave && newSlot >= 0) {
+ SaveStateDescriptor entry;
+ entry.setSaveSlot(newSlot);
+ entry.setDescription(_strings.text(RunawayStrings::kNewSave));
+ _saves.push_back(entry);
+ _firstSave = MAX<int>(0, ((int)_saves.size() - 1) / 3 * 3 - 9);
+ }
+ if (_saves.empty())
+ _notice = _strings.text(RunawayStrings::kNoSaves);
+ _focusedSave = _saves.empty() ? -1 : mode == kBrowseSave && newSlot >= 0 ? (int)_saves.size() - 1 : 0;
+}
+
+RunawayMenu::Command RunawayMenu::accept() {
+ const Confirmation confirmation = _confirmation;
+ _confirmation = kNoConfirmation;
+ switch (confirmation) {
+ case kConfirmExit: return kQuit;
+ case kConfirmDelete: return kDeleteGame;
+ case kConfirmOverwrite: _page = kName; return kNone;
+ case kConfirmSettings: return kSaveSettings;
+ case kConfirmDefaults:
+ _settings = Settings();
+ _notice = _strings.text(RunawayStrings::kDefaultsRestored);
+ return kRestoreDefaults;
+ default: return kNone;
+ }
+}
+
+RunawayMenu::Command RunawayMenu::selectSave(int index) {
+ if (index < 0 || index >= (int)_saves.size() || _saves[index].getLocked())
+ return kNone;
+ const SaveStateDescriptor &entry = _saves[index];
+ _selectedSlot = entry.getSaveSlot();
+ _focusedSave = index;
+ _name = Common::U32String(entry.getDescription(), Common::kUtf8);
+ if (_browseMode == kBrowseLoad)
+ return kLoadGame;
+ if (_browseMode == kBrowseDelete) {
+ if (entry.getDeletableFlag())
+ _confirmation = kConfirmDelete;
+ } else if (_selectedSlot == _newSlot) {
+ _name.clear();
+ _page = kName;
+ } else if (!entry.getWriteProtectedFlag()) {
+ _confirmation = kConfirmOverwrite;
+ }
+ return kNone;
+}
+
RunawayMenu::Command RunawayMenu::click(bool right) {
- if (right)
+ if (right || _page == kCredits)
return cancel();
- switch (controlAt(_mouse)) {
- case kPlay:
- return kResume;
- case kExit:
- _confirmQuit = true;
- _dragging = false;
- return kNone;
- case kMusicOn:
- case kMusicOff:
- _settings.music = controlAt(_mouse) == kMusicOn;
- return kSettingsChanged;
- case kSubtitlesOn:
- case kSubtitlesOff:
- _settings.subtitles = controlAt(_mouse) == kSubtitlesOn;
- return kSettingsChanged;
+ _notice.clear();
+ if (_page == kSaves && _confirmation == kNoConfirmation && saveAt(_mouse) >= 0)
+ return selectSave(saveAt(_mouse));
+ const Control control = controlAt(_mouse);
+ switch (control) {
+ case kPlay: return _page == kOptions ? kResume : cancel();
+ case kLoad: return kBrowseLoad;
+ case kSave: return kBrowseSave;
+ case kDelete: return kBrowseDelete;
+ case kExit: _confirmation = kConfirmExit; break;
+ case kStoreSettings: _confirmation = kConfirmSettings; break;
+ case kDefaults: _confirmation = kConfirmDefaults; break;
+ case kMusicOn: case kMusicOff: _settings.music = control == kMusicOn; return kSettingsChanged;
+ case kAntialiasOn: case kAntialiasOff: _settings.antialias = control == kAntialiasOn; return kSettingsChanged;
+ case kScrollFast: case kScrollSlow: _settings.fastScrolling = control == kScrollFast; return kSettingsChanged;
+ case kPointerOn: case kPointerOff: _settings.pointerSound = control == kPointerOn; return kSettingsChanged;
+ case kSubtitlesOn: case kSubtitlesOff: _settings.subtitles = control == kSubtitlesOn; return kSettingsChanged;
case kVolume:
- _dragging = true;
+ _dragging = control;
_dragX = _mouse.x;
- _dragVolume = _settings.volume;
- return kNone;
- case kYes:
- return kQuit;
- case kNo:
- return cancel();
- default:
- return kNone;
+ _dragValue = _settings.volume;
+ _audio.playMenuMusic();
+ break;
+ case kShowCredits:
+ if (_credits.load()) {
+ _page = kCredits;
+ _credits.start(_now);
+ _audio.playMenuMusic();
+ CursorMan.showMouse(false);
+ } else
+ _notice = _strings.text(RunawayStrings::kCreditsFailed);
+ break;
+ case kPrevious: return adjust(1);
+ case kNext: return adjust(-1);
+ case kAcceptName:
+ if (_name.empty())
+ _name = _strings.text(RunawayStrings::kNewSave);
+ return kSaveGame;
+ case kYes: return accept();
+ case kNo: return cancel();
+ default: break;
}
+ return kNone;
}
RunawayMenu::Command RunawayMenu::cancel() {
- _dragging = false;
- if (_confirmQuit) {
- _confirmQuit = false;
+ release();
+ _notice.clear();
+ if (_confirmation != kNoConfirmation) {
+ _confirmation = kNoConfirmation;
+ return kNone;
+ }
+ if (_page == kName) {
+ _page = kSaves;
+ return kNone;
+ }
+ if (_page != kOptions) {
+ _page = kOptions;
+ _audio.stopMusic();
+ CursorMan.showMouse(true);
return kNone;
}
return kResume;
}
RunawayMenu::Command RunawayMenu::key(uint32 ascii) {
+ if (_page == kName && _confirmation == kNoConfirmation) {
+ if (ascii >= 32 && ascii != 127 && _name.size() < 60)
+ _name += ascii;
+ return kNone;
+ }
if (ascii >= 'a' && ascii <= 'z')
ascii -= 'a' - 'A';
- if (_confirmQuit) {
+ if (_confirmation != kNoConfirmation) {
if (ascii == _strings.text(RunawayStrings::kYes)[0])
- return kQuit;
+ return accept();
if (ascii == _strings.text(RunawayStrings::kNo)[0])
return cancel();
- } else {
+ } else if (_page == kOptions) {
if (ascii == _strings.text(RunawayStrings::kPlay)[0])
return kResume;
- if (ascii == _strings.text(RunawayStrings::kQuitKey)[0]) {
- _confirmQuit = true;
- _dragging = false;
- }
+ if (ascii == _strings.text(RunawayStrings::kQuitKey)[0])
+ _confirmation = kConfirmExit;
+ else if (ascii == _strings.text(RunawayStrings::kLoad)[0] && _canLoad)
+ return kBrowseLoad;
+ else if (ascii == _strings.text(RunawayStrings::kSave)[0] && _canSave)
+ return kBrowseSave;
+ else if (ascii == _strings.text(RunawayStrings::kDeleteKey)[0])
+ return kBrowseDelete;
}
return kNone;
}
+RunawayMenu::Command RunawayMenu::key(const Common::KeyState &keyState) {
+ if (keyState.keycode == Common::KEYCODE_ESCAPE || keyState.keycode == Common::KEYCODE_F5)
+ return cancel();
+ if (_page == kCredits)
+ return (keyState.keycode == Common::KEYCODE_SPACE || keyState.keycode == Common::KEYCODE_RETURN) ? cancel() : kNone;
+ if (_page == kName && _confirmation == kNoConfirmation) {
+ if (keyState.keycode == Common::KEYCODE_a && (keyState.flags & (Common::KBD_CTRL | Common::KBD_META))) {
+ _name.clear();
+ return kNone;
+ }
+ if (keyState.keycode == Common::KEYCODE_BACKSPACE) {
+ if (!_name.empty())
+ _name.deleteLastChar();
+ return kNone;
+ }
+ if (keyState.keycode == Common::KEYCODE_RETURN || keyState.keycode == Common::KEYCODE_KP_ENTER) {
+ if (_name.empty())
+ _name = _strings.text(RunawayStrings::kNewSave);
+ return kSaveGame;
+ }
+ if (keyState.flags & (Common::KBD_CTRL | Common::KBD_ALT | Common::KBD_META))
+ return kNone;
+ return key(keyState.ascii);
+ }
+ if (_confirmation == kNoConfirmation) {
+ if (_page == kSaves && !_saves.empty()) {
+ int next = _focusedSave < 0 ? _firstSave : _focusedSave;
+ switch (keyState.keycode) {
+ case Common::KEYCODE_LEFT: --next; break;
+ case Common::KEYCODE_RIGHT: ++next; break;
+ case Common::KEYCODE_UP: next -= 3; break;
+ case Common::KEYCODE_DOWN: next += 3; break;
+ case Common::KEYCODE_PAGEUP: next -= 12; break;
+ case Common::KEYCODE_PAGEDOWN: next += 12; break;
+ case Common::KEYCODE_HOME: next = 0; break;
+ case Common::KEYCODE_END: next = _saves.size() - 1; break;
+ case Common::KEYCODE_RETURN: case Common::KEYCODE_KP_ENTER: case Common::KEYCODE_SPACE:
+ return selectSave(next);
+ default: return key(keyState.ascii);
+ }
+ _focusedSave = CLIP(next, 0, (int)_saves.size() - 1);
+ if (_focusedSave < _firstSave)
+ _firstSave = _focusedSave / 3 * 3;
+ else if (_focusedSave >= _firstSave + 12)
+ _firstSave = _focusedSave / 3 * 3 - 9;
+ _notice.clear();
+ return kNone;
+ }
+ if (_page == kOptions) {
+ if (keyState.keycode == Common::KEYCODE_LEFT || keyState.keycode == Common::KEYCODE_RIGHT)
+ return adjust(keyState.keycode == Common::KEYCODE_LEFT ? -4 : 4);
+ if (keyState.keycode == Common::KEYCODE_RETURN || keyState.keycode == Common::KEYCODE_SPACE)
+ return kResume;
+ }
+ }
+ return key(keyState.ascii);
+}
+
+void RunawayMenu::operationDone(bool success) {
+ if (!success)
+ return;
+ if (_browseMode == kBrowseDelete) {
+ for (uint i = 0; i < _saves.size(); ++i) {
+ if (_saves[i].getSaveSlot() == _selectedSlot) {
+ _saves.remove_at(i);
+ break;
+ }
+ }
+ _firstSave = MIN(_firstSave, MAX<int>(0, ((int)_saves.size() - 1) / 3 * 3 - 9));
+ _focusedSave = MIN(_focusedSave, (int)_saves.size() - 1);
+ _selectedSlot = -1;
+ if (_saves.empty())
+ _notice = _strings.text(RunawayStrings::kNoSaves);
+ } else {
+ _page = kOptions;
+ _notice = _strings.text(RunawayStrings::kGameSaved);
+ }
+}
+
void RunawayMenu::drawLabel(Graphics::ManagedSurface &screen, RunawayStrings::TextId id,
int center, int y, bool enabled, Control control) {
const Common::Rect rect = labelRect(id, center, y);
@@ -214,46 +477,90 @@ void RunawayMenu::drawLabel(Graphics::ManagedSurface &screen, RunawayStrings::Te
}
void RunawayMenu::drawToggle(Graphics::ManagedSurface &screen, RunawayStrings::TextId id, int y,
- bool enabled, bool selected, Control on, Control off) {
- _font.drawString(screen.surfacePtr(), _strings.text(id), 415, y, 300, enabled ? kNormal : kDisabled);
+ bool selected, Control on, Control off) {
+ _font.drawString(screen.surfacePtr(), _strings.text(id), 415, y, 300, kNormal);
for (uint i = 0; i < 2; ++i) {
const Control control = i ? off : on;
- const bool active = enabled && (selected == (i == 0));
- const bool hovered = enabled && controlAt(_mouse) == control;
+ const bool active = selected == (i == 0);
const RunawayStrings::TextId label = id == RunawayStrings::kScrolling ?
(i ? RunawayStrings::kSlow : RunawayStrings::kFast) : (i ? RunawayStrings::kOff : RunawayStrings::kOn);
_font.drawString(screen.surfacePtr(), _strings.text(label), 756 + i * 139, y, 126,
- enabled ? ((active || hovered) ? kHighlight : kNormal) : kDisabled);
+ active || controlAt(_mouse) == control ? kHighlight : kNormal);
if (active)
_captionFont.drawChar(screen.surfacePtr(), 0xb7, 726 + i * 139, y, kHighlight);
}
}
+void RunawayMenu::drawSaves(Graphics::ManagedSurface &screen) {
+ screen.fillRect(Common::Rect(373, 100, 1010, 675), 0);
+ if (_page == kName) {
+ const Common::Rect preview(588, 252, 792, 372);
+ if (_selectedSlot == _newSlot)
+ screen.blitFrom(_thumbnail, Common::Point(preview.left, preview.top));
+ else if (_focusedSave >= 0 && _saves[_focusedSave].getThumbnail())
+ drawThumbnail(screen, *_saves[_focusedSave].getThumbnail(), preview);
+ screen.frameRect(preview, kHighlight);
+ _captionFont.drawString(screen.surfacePtr(), _strings.text(RunawayStrings::kEnterSaveName), 386, 414, 610, kNormal);
+ Common::U32String display = _name;
+ while (!display.empty() && _captionFont.getStringWidth(display) > 590)
+ display.erase(0, 1);
+ display += U"_";
+ _captionFont.drawString(screen.surfacePtr(), display, 386, 460, 610, kHighlight);
+ drawLabel(screen, RunawayStrings::kSave, 690, 518, true, kAcceptName);
+ return;
+ }
+ for (uint i = 0; i < 12 && _firstSave + i < _saves.size(); ++i) {
+ const SaveStateDescriptor &entry = _saves[_firstSave + i];
+ const Common::Rect rect = saveRect(i);
+ if (entry.getSaveSlot() == _newSlot)
+ screen.blitFrom(_thumbnail, Common::Point(rect.left, rect.top));
+ else if (entry.getThumbnail())
+ drawThumbnail(screen, *entry.getThumbnail(), rect);
+ const bool selected = (_confirmation != kNoConfirmation || _page == kName) ?
+ entry.getSaveSlot() == _selectedSlot : _focusedSave == (int)(_firstSave + i);
+ if (selected)
+ screen.frameRect(rect, kHighlight);
+ _font.drawString(screen.surfacePtr(), Common::String::format("%d", entry.getSaveSlot()),
+ rect.left, rect.top + 116, rect.width(), selected ? kHighlight : kNormal, Graphics::kTextAlignCenter);
+ }
+ if (_firstSave > 0)
+ _captionFont.drawChar(screen.surfacePtr(), 0xa4, 340, 355, controlAt(_mouse) == kPrevious ? kHighlight : kNormal);
+ if (_firstSave + 12 < (int)_saves.size())
+ _captionFont.drawChar(screen.surfacePtr(), 0xf0, 340, 385, controlAt(_mouse) == kNext ? kHighlight : kNormal);
+}
+
void RunawayMenu::draw(Graphics::ManagedSurface &screen) {
+ if (_page == kCredits) {
+ _credits.draw(screen);
+ return;
+ }
screen.clear();
screen.copyRectToSurface(_background, 0, kRunawayViewportTop, Common::Rect(1024, 600));
screen.copyRectToSurface(_thumbnail, 85, 169, Common::Rect(204, 120));
- // Layout from native 0x4230b0. Unimplemented options stay disabled.
- drawLabel(screen, RunawayStrings::kLoad, 183, 334, false);
- drawLabel(screen, RunawayStrings::kSave, 183, 376, false);
- drawLabel(screen, RunawayStrings::kDelete, 183, 418, false);
- drawLabel(screen, RunawayStrings::kPlay, 183, 460, true, kPlay);
- drawLabel(screen, RunawayStrings::kQuit, 183, 502, true, kExit);
- drawToggle(screen, RunawayStrings::kMusic, 161, true, _settings.music, kMusicOn, kMusicOff);
- drawToggle(screen, RunawayStrings::kAntialias, 203, false, false);
- drawToggle(screen, RunawayStrings::kScrolling, 245, false, false);
- drawToggle(screen, RunawayStrings::kPointerSound, 287, false, false);
- drawToggle(screen, RunawayStrings::kSubtitles, 329, true, _settings.subtitles, kSubtitlesOn, kSubtitlesOff);
- drawLabel(screen, RunawayStrings::kCredits, 525, 392, false);
- drawLabel(screen, RunawayStrings::kSaveSettings, 802, 404, false);
- drawLabel(screen, RunawayStrings::kDefaultSettings, 802, 446, false);
- drawLabel(screen, RunawayStrings::kVolume, 525, 582, true, kVolume);
- drawLabel(screen, RunawayStrings::kBrightness, 802, 582, false);
- _font.drawString(screen.surfacePtr(), Common::String::format("%d / 100", (_settings.volume * 100 + 128) / 256),
- 465, 616, 120, kNormal, Graphics::kTextAlignCenter);
+ drawLabel(screen, RunawayStrings::kLoad, 183, 334, _page == kOptions && _canLoad, kLoad);
+ drawLabel(screen, RunawayStrings::kSave, 183, 376, _page == kOptions && _canSave, kSave);
+ drawLabel(screen, RunawayStrings::kDelete, 183, 418, _page == kOptions, kDelete);
+ drawLabel(screen, RunawayStrings::kPlay, 183, 460, _page == kOptions, kPlay);
+ drawLabel(screen, RunawayStrings::kQuit, 183, 502, _page == kOptions, kExit);
+ if (_page == kSaves || _page == kName) {
+ drawSaves(screen);
+ } else {
+ drawToggle(screen, RunawayStrings::kMusic, 161, _settings.music, kMusicOn, kMusicOff);
+ drawToggle(screen, RunawayStrings::kAntialias, 203, _settings.antialias, kAntialiasOn, kAntialiasOff);
+ drawToggle(screen, RunawayStrings::kScrolling, 245, _settings.fastScrolling, kScrollFast, kScrollSlow);
+ drawToggle(screen, RunawayStrings::kPointerSound, 287, _settings.pointerSound, kPointerOn, kPointerOff);
+ drawToggle(screen, RunawayStrings::kSubtitles, 329, _settings.subtitles, kSubtitlesOn, kSubtitlesOff);
+ drawLabel(screen, RunawayStrings::kCredits, 525, 392, true, kShowCredits);
+ drawLabel(screen, RunawayStrings::kSaveSettings, 802, 404, true, kStoreSettings);
+ drawLabel(screen, RunawayStrings::kDefaultSettings, 802, 446, true, kDefaults);
+ _volumeDial.draw(screen, _dragging == kVolume ? 102 : 101, 0, kRunawayViewportTop);
+ _volumeDial.draw(screen, (_settings.volume * 100 + 128) / 256, 0, kRunawayViewportTop);
+ drawLabel(screen, RunawayStrings::kVolume, 525, 582, true, kVolume);
+ drawLabel(screen, RunawayStrings::kBrightness, 802, 582, false);
+ }
const uint frame = returnRect().contains(_mouse) ? 6 : 5;
screen.copyRectToSurface(_returnButton, 612, 0, Common::Rect(frame * 100, 0, (frame + 1) * 100, 74));
- if (_confirmQuit) {
+ if (_confirmation != kNoConfirmation) {
_captionFont.drawString(screen.surfacePtr(), confirmation(), 0, 684, 1024, kNormal, Graphics::kTextAlignCenter);
const Control hovered = controlAt(_mouse);
if (hovered == kYes || hovered == kNo) {
@@ -261,8 +568,16 @@ void RunawayMenu::draw(Graphics::ManagedSurface &screen) {
_captionFont.drawString(screen.surfacePtr(), _strings.text(hovered == kYes ? RunawayStrings::kYes : RunawayStrings::kNo),
rect.left, rect.top, rect.width(), kHighlight);
}
- } else if (returnRect().contains(_mouse)) {
- _captionFont.drawString(screen.surfacePtr(), _strings.text(RunawayStrings::kResume), 0, 684, 1024, kNormal, Graphics::kTextAlignCenter);
+ } else {
+ Common::U32String caption = _notice;
+ if (caption.empty() && _page == kSaves) {
+ const int index = _focusedSave;
+ if (index >= 0)
+ caption = Common::U32String(_saves[index].getDescription(), Common::kUtf8);
+ } else if (caption.empty() && returnRect().contains(_mouse)) {
+ caption = _strings.text(RunawayStrings::kResume);
+ }
+ _captionFont.drawString(screen.surfacePtr(), caption, 0, 684, 1024, kNormal, Graphics::kTextAlignCenter);
}
screen.copyRectToSurface(_logo, 976, 720, Common::Rect(48, 48));
}
diff --git a/engines/hollywood/runaway/menu.h b/engines/hollywood/runaway/menu.h
index 9b90667ab89..64f31df0f56 100644
--- a/engines/hollywood/runaway/menu.h
+++ b/engines/hollywood/runaway/menu.h
@@ -22,8 +22,11 @@
#ifndef HOLLYWOOD_RUNAWAY_MENU_H
#define HOLLYWOOD_RUNAWAY_MENU_H
+#include "common/keyboard.h"
+#include "engines/savestate.h"
#include "hollywood/runaway/font.h"
#include "hollywood/runaway/graphics.h"
+#include "hollywood/runaway/presentation.h"
#include "hollywood/runaway/strings.h"
namespace Hollywood {
@@ -31,45 +34,77 @@ namespace Hollywood {
class RunawayMenu {
public:
struct Settings {
- bool music = true;
- bool subtitles = true;
- int volume = 256;
+ bool music = true, subtitles = true, antialias = true;
+ bool fastScrolling = true, pointerSound = true;
+ int volume = 192;
+ bool operator==(const Settings &other) const;
+ bool operator!=(const Settings &other) const { return !(*this == other); }
};
- enum Command { kNone, kResume, kSettingsChanged, kQuit };
+ enum Command { kNone, kResume, kSettingsChanged, kSaveSettings, kRestoreDefaults, kQuit,
+ kBrowseLoad, kBrowseSave, kBrowseDelete, kLoadGame, kSaveGame, kDeleteGame };
- explicit RunawayMenu(const RunawayStrings &strings) : _strings(strings) {}
+ RunawayMenu(Audio::Mixer *mixer, const RunawayStrings &strings) : _strings(strings), _audio(mixer) {}
~RunawayMenu();
bool load();
- void open(const Graphics::ManagedSurface &screen, const Settings &settings);
+ void open(const Graphics::ManagedSurface &screen, const Settings &settings, bool canSave = false, bool canLoad = true);
void close();
Command update(Common::Point mouse);
+ void tick(uint32 now);
Command click(bool right);
- void release() { _dragging = false; }
+ void release();
Command cancel();
Command key(uint32 ascii);
+ Command key(const Common::KeyState &key);
Command adjustVolume(int delta);
+ Command adjust(int delta);
+ void browse(Command mode, const SaveStateList &saves, int newSlot = -1);
+ void showMessage(const Common::U32String &message) { _notice = message; }
+ void operationDone(bool success);
+ int selectedSlot() const { return _selectedSlot; }
+ Common::String saveDescription() const { return _name.encode(); }
+ bool enteringName() const { return _page == kName; }
void draw(Graphics::ManagedSurface &screen);
const Settings &settings() const { return _settings; }
private:
- enum Control { kNoControl, kPlay, kExit, kMusicOn, kMusicOff, kSubtitlesOn, kSubtitlesOff, kVolume, kYes, kNo };
+ enum Page { kOptions, kSaves, kName, kCredits };
+ enum Confirmation { kNoConfirmation, kConfirmExit, kConfirmDelete, kConfirmOverwrite, kConfirmSettings, kConfirmDefaults };
+ enum Control { kNoControl, kPlay, kExit, kLoad, kSave, kDelete,
+ kMusicOn, kMusicOff, kAntialiasOn, kAntialiasOff, kScrollFast, kScrollSlow,
+ kPointerOn, kPointerOff, kSubtitlesOn, kSubtitlesOff, kVolume,
+ kShowCredits, kStoreSettings, kDefaults, kPrevious, kNext, kAcceptName, kYes, kNo };
Control controlAt(Common::Point mouse) const;
Common::Rect labelRect(RunawayStrings::TextId id, int center, int y) const;
Common::U32String confirmation() const;
Common::Rect answerRect(bool yes) const;
+ Common::Rect saveRect(uint index) const;
+ int saveAt(Common::Point mouse) const;
+ Command selectSave(int index);
+ Command accept();
+ void drawSaves(Graphics::ManagedSurface &screen);
void drawLabel(Graphics::ManagedSurface &screen, RunawayStrings::TextId id, int center, int y,
bool enabled, Control control = kNoControl);
void drawToggle(Graphics::ManagedSurface &screen, RunawayStrings::TextId id, int y,
- bool enabled, bool selected, Control on = kNoControl, Control off = kNoControl);
+ bool selected, Control on, Control off);
const RunawayStrings &_strings;
+ RunawayAudio _audio;
RunawayFont _font, _captionFont;
Graphics::ManagedSurface _background, _returnButton, _logo, _cursor, _thumbnail;
+ RunawayAnimation _volumeDial;
+ RunawayCredits _credits;
+ SaveStateList _saves;
+ Common::U32String _name, _notice;
Settings _settings;
Common::Point _mouse;
- int _dragX = 0, _dragVolume = 0;
- bool _confirmQuit = false, _dragging = false;
- bool _cursorPushed = false;
+ Page _page = kOptions;
+ Confirmation _confirmation = kNoConfirmation;
+ Command _browseMode = kBrowseLoad;
+ Control _dragging = kNoControl;
+ int _dragX = 0, _dragValue = 0, _selectedSlot = -1, _firstSave = 0, _newSlot = -1;
+ int _focusedSave = -1;
+ uint32 _now = 0;
+ bool _canSave = false, _canLoad = true, _cursorPushed = false;
};
} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/presentation.cpp b/engines/hollywood/runaway/presentation.cpp
index e40cc943aba..28edf5a9df0 100644
--- a/engines/hollywood/runaway/presentation.cpp
+++ b/engines/hollywood/runaway/presentation.cpp
@@ -42,6 +42,55 @@ static void dimViewport(Graphics::ManagedSurface &screen, uint brightness) {
}
}
+bool RunawayCredits::load() {
+ if (!_roll.empty())
+ return true;
+ Common::Array<byte> data;
+ if (!readRunawayGlobalChunk(152, data) || data.size() % 800 ||
+ data.size() < 800 * 600 || data.size() > 800 * 20000 ||
+ !loadRunawaySurface(152, 400, data.size() / 800, _roll))
+ return false;
+ // The German release includes a final card. The Spanish and French
+ // archives end before this optional chunk.
+ loadRunawaySurface(160, 1024, 600, _card);
+ return true;
+}
+
+bool RunawayCredits::finished() const {
+ return _now - _started >= (uint)(_roll.h - 600) * 10 + 4000 + (_card.empty() ? 500 : 61500);
+}
+
+void RunawayCredits::draw(Graphics::ManagedSurface &screen) const {
+ screen.clear();
+ const uint elapsed = _now - _started;
+ const uint scrollTime = (_roll.h - 600) * 10;
+ if (elapsed < scrollTime + 4500 || _card.empty()) {
+ const uint first = MIN<uint>(_roll.h - 600, elapsed / 10);
+ screen.copyRectToSurface(_roll, 312, kRunawayViewportTop, Common::Rect(0, first, 400, first + 600));
+ // Native 0x42c8d0 fades thirty rows at each end of the scrolling strip.
+ for (uint y = 0; y < 600; ++y) {
+ const uint level = MIN<uint>(30, MIN(y, 599 - y));
+ if (level == 30)
+ continue;
+ uint16 *pixels = (uint16 *)screen.getBasePtr(312, kRunawayViewportTop + y);
+ for (uint x = 0; x < 400; ++x) {
+ const uint16 p = pixels[x];
+ pixels[x] = (((p >> 11) * level / 30) << 11) |
+ ((((p >> 5) & 63) * level / 30) << 5) | ((p & 31) * level / 30);
+ }
+ }
+ if (elapsed > scrollTime + 4000)
+ dimViewport(screen, 1000 - MIN<uint>(1000, (elapsed - scrollTime - 4000) * 2));
+ } else {
+ screen.blitFrom(_card, Common::Point(0, kRunawayViewportTop));
+ const uint cardElapsed = elapsed - scrollTime - 4500;
+ if (cardElapsed < 500)
+ dimViewport(screen, cardElapsed * 2);
+ else if (cardElapsed > 60500)
+ dimViewport(screen, 1000 - MIN<uint>(1000, (cardElapsed - 60500) * 2));
+ }
+}
+
bool RunawayInterrogation::load() {
if (!_background.empty())
return true;
@@ -75,6 +124,15 @@ void RunawayInterrogation::start(uint32 now) {
nextPhrase();
}
+void RunawayInterrogation::stop() {
+ _audio.stopSpeech();
+ _audio.stopEffect();
+ _lipSync.stop();
+ _subtitle.clear();
+ _row = 0;
+ _phrase = _phraseCount;
+}
+
void RunawayInterrogation::nextPhrase() {
_row = 0;
_lipSync.stop();
diff --git a/engines/hollywood/runaway/presentation.h b/engines/hollywood/runaway/presentation.h
index 8f32d20e8d4..2f81eb6e952 100644
--- a/engines/hollywood/runaway/presentation.h
+++ b/engines/hollywood/runaway/presentation.h
@@ -32,6 +32,19 @@
namespace Hollywood {
+class RunawayCredits {
+public:
+ bool load();
+ void start(uint32 now) { _started = _now = now; }
+ void update(uint32 now) { _now = now; }
+ bool finished() const;
+ void draw(Graphics::ManagedSurface &screen) const;
+
+private:
+ Graphics::ManagedSurface _roll, _card;
+ uint32 _started = 0, _now = 0;
+};
+
class RunawayInterrogation {
public:
explicit RunawayInterrogation(Audio::Mixer *mixer) : _audio(mixer), _random("runawayInterrogation") {}
@@ -39,6 +52,7 @@ public:
void start(uint32 now);
void update(uint32 now);
void skipSpeech();
+ void stop();
void draw(Graphics::ManagedSurface &screen) const;
bool finished() const { return _phrase >= _phraseCount; }
bool speaking() const { return _row != 0; }
diff --git a/engines/hollywood/runaway/saveload.cpp b/engines/hollywood/runaway/saveload.cpp
new file mode 100644
index 00000000000..1d1167fc483
--- /dev/null
+++ b/engines/hollywood/runaway/saveload.cpp
@@ -0,0 +1,91 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "hollywood/runaway/saveload.h"
+
+namespace Hollywood {
+
+void RunawaySaveState::sync(Common::Serializer &s) {
+ s.syncAsUint16LE(scene);
+ s.syncAsUint16LE(x);
+ s.syncAsUint16LE(y);
+ s.syncAsUint16LE(camera);
+ s.syncAsByte(facing);
+ s.syncAsByte(lidOpen);
+ s.syncAsByte(unplugged);
+ s.syncAsByte(windowClean);
+ s.syncAsByte(coolerMoved);
+ s.syncAsByte(coolerInspected);
+ s.syncAsByte(peeked);
+ s.syncAsByte(ice);
+ s.syncAsByte(hatch);
+ s.syncBytes(pickedUp, sizeof(pickedUp));
+ s.syncBytes(examined, sizeof(examined));
+ s.syncAsByte(itemCount);
+ s.syncBytes(items, sizeof(items));
+ s.syncAsByte(selected);
+ s.syncAsByte(cloth);
+ s.syncAsByte(inventoryOpen);
+ s.syncAsByte(verb);
+ s.syncAsUint32LE(randomSeed);
+ s.syncAsUint32LE(playTime);
+}
+
+bool RunawaySaveState::valid() const {
+ if (scene != 5030 || x >= 1376 || y >= 600 || camera > 352 || facing >= 8 ||
+ lidOpen > 1 || unplugged > 1 || windowClean > 1 || coolerMoved > 1 ||
+ coolerInspected > 1 || peeked > 1 || ice > 2 || hatch > 3 ||
+ itemCount > sizeof(items) || selected > sizeof(items) || cloth > 2 || inventoryOpen > 1 || verb > 2)
+ return false;
+ if ((coolerMoved && ice != 2) || ((hatch != 0) != (coolerMoved != 0)))
+ return false;
+ for (uint i = 0; i < sizeof(pickedUp); ++i) {
+ if (pickedUp[i] > 1 || examined[i] > 1)
+ return false;
+ }
+ bool owned[27] = {};
+ for (uint i = 0; i < itemCount; ++i) {
+ if (!items[i] || items[i] >= sizeof(owned) || owned[items[i]])
+ return false;
+ owned[items[i]] = true;
+ }
+ return !selected || owned[selected];
+}
+
+bool RunawaySaveState::read(Common::SeekableReadStream &stream) {
+ if (stream.readUint32BE() != MKTAG('R', 'U', 'N', 'A') || stream.readUint16LE() != 1)
+ return false;
+ Common::Serializer s(&stream, nullptr);
+ sync(s);
+ return !s.err() && !stream.eos() && valid();
+}
+
+bool RunawaySaveState::write(Common::WriteStream &stream) {
+ if (!valid())
+ return false;
+ stream.writeUint32BE(MKTAG('R', 'U', 'N', 'A'));
+ stream.writeUint16LE(1);
+ Common::Serializer s(nullptr, &stream);
+ sync(s);
+ return !s.err();
+}
+
+} // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/saveload.h b/engines/hollywood/runaway/saveload.h
new file mode 100644
index 00000000000..7762f06dbee
--- /dev/null
+++ b/engines/hollywood/runaway/saveload.h
@@ -0,0 +1,50 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef HOLLYWOOD_RUNAWAY_SAVELOAD_H
+#define HOLLYWOOD_RUNAWAY_SAVELOAD_H
+
+#include "common/serializer.h"
+
+namespace Hollywood {
+
+// Saves are made between actions. Resource data, pointers and transient
+// speech/animation clocks are rebuilt when the persistent state is restored.
+struct RunawaySaveState {
+ uint16 scene = 5030, x = 623, y = 447, camera = 111;
+ byte facing = 3, lidOpen = 0, unplugged = 0, windowClean = 0;
+ byte coolerMoved = 0, coolerInspected = 0, peeked = 0, ice = 0, hatch = 0;
+ byte pickedUp[20] = {}, examined[20] = {};
+ byte itemCount = 0, items[26] = {}, selected = 0, cloth = 0;
+ byte inventoryOpen = 0, verb = 0;
+ uint32 randomSeed = 0, playTime = 0;
+
+ bool valid() const;
+ bool read(Common::SeekableReadStream &stream);
+ bool write(Common::WriteStream &stream);
+
+private:
+ void sync(Common::Serializer &s);
+};
+
+} // End of namespace Hollywood
+
+#endif
diff --git a/engines/hollywood/runaway/scene5030.cpp b/engines/hollywood/runaway/scene5030.cpp
index 47457f15e23..5fa2c6ead36 100644
--- a/engines/hollywood/runaway/scene5030.cpp
+++ b/engines/hollywood/runaway/scene5030.cpp
@@ -26,6 +26,7 @@
#include "hollywood/debug.h"
#include "hollywood/runaway/scene5030.h"
+#include "hollywood/runaway/saveload.h"
#include "hollywood/runaway/strings.h"
namespace Hollywood {
@@ -112,7 +113,7 @@ bool RunawayScene5030::load() {
}
bool RunawayScene5030::loadRoomGraphics() {
- Common::Array<byte> pixels, overlay;
+ Common::Array<byte> pixels, overlay, patch;
if (!_archive.readVariableChunk(_windowClean ? 4 : 0, pixels) ||
pixels.size() != kRoomWidth * kRoomHeight * 2 ||
!_lidActor.load(_archive, _windowClean ? 45 : 43, 33) ||
@@ -141,15 +142,23 @@ bool RunawayScene5030::loadRoomGraphics() {
drawPatch(_pickupPatches[i]);
}
if (_coolerMoved) {
- applyPatch(_hatchState == kLocked ? 12 : 13);
- if (_hatchState == kOpen)
- applyPatch(24);
+ if (!loadPatch(_hatchState == kLocked ? 12 : 13, patch))
+ return false;
+ drawPatch(patch);
+ if (_hatchState == kOpen) {
+ if (!loadPatch(24, patch))
+ return false;
+ drawPatch(patch);
+ }
} else {
drawPatch(_lidOpen ? _openLidPatch : _closedLidPatch);
if (_unplugged)
drawPatch(_unplugPatch);
- if (_ice == kDrained)
- applyPatch(11);
+ if (_ice == kDrained) {
+ if (!loadPatch(11, patch))
+ return false;
+ drawPatch(patch);
+ }
}
drawPatch(overlay);
return true;
@@ -161,6 +170,67 @@ void RunawayScene5030::start(uint32 now) {
startAction(kIntroVideo);
}
+void RunawayScene5030::captureState(RunawaySaveState &state) const {
+ state.x = _position.x;
+ state.y = _position.y;
+ state.camera = _cameraX;
+ state.facing = _facing;
+ state.lidOpen = _lidOpen;
+ state.unplugged = _unplugged;
+ state.windowClean = _windowClean;
+ state.coolerMoved = _coolerMoved;
+ state.coolerInspected = _coolerInspected;
+ state.peeked = _peeked;
+ state.ice = _ice;
+ state.hatch = _hatchState;
+ for (uint i = 0; i < ARRAYSIZE(_pickedUp); ++i) {
+ state.pickedUp[i] = _pickedUp[i];
+ state.examined[i] = _examined[i];
+ }
+ state.randomSeed = _random.getSeed();
+ _inventory.captureState(state);
+}
+
+bool RunawayScene5030::restoreState(const RunawaySaveState &state, uint32 now) {
+ if (!state.valid())
+ return false;
+ _lidOpen = state.lidOpen;
+ _unplugged = state.unplugged;
+ _windowClean = state.windowClean;
+ _coolerMoved = state.coolerMoved;
+ _coolerInspected = state.coolerInspected;
+ _peeked = state.peeked;
+ _ice = (IceState)state.ice;
+ _hatchState = (HatchState)state.hatch;
+ for (uint i = 0; i < ARRAYSIZE(_pickedUp); ++i) {
+ _pickedUp[i] = state.pickedUp[i];
+ _examined[i] = state.examined[i];
+ }
+ if (!loadRoomGraphics())
+ return false;
+ stopSpeech();
+ _audio.stopEffect();
+ _interrogation.stop();
+ _video.close();
+ _inventory.restoreState(state);
+ _random.setSeed(state.randomSeed);
+ _now = _lastUpdate = _actionStarted = now;
+ _walkElapsed = _lastFootstep = _step = 0;
+ _action = _afterSpeech = _afterWalk = kNone;
+ _pendingHotspot = _pendingItem = _pickupHotspot = 0;
+ _pendingVerb = kVerbWalk;
+ _path.clear();
+ _pathIndex = 0;
+ _committedCaption.clear();
+ _escaped = false;
+ setPosition(Common::Point(state.x, state.y), state.facing);
+ setCameraX(state.camera);
+ _idleHead.reset(now);
+ _actor.setFrame(_facing, 0, 0);
+ _audio.playMusic(11);
+ return true;
+}
+
void RunawayScene5030::setCameraX(int x) {
_cameraX = CLIP<int>(x, 0, kRoomWidth - kScreenWidth);
}
@@ -913,9 +983,10 @@ void RunawayScene5030::update(uint32 now, int scrollDirection, bool inventoryOpe
const int headFrame = walking ? -1 : _speechRow ? speechFrame() : idle ? _idleHead.frame() : -1;
_actor.setFrame(_facing, walking ? 1 + (_walkElapsed / 60) % 12 : 0, headFrame);
if (scrollDirection)
- _cameraX += scrollDirection * MAX<int>(1, elapsed / 2);
+ _cameraX += scrollDirection * MAX<int>(1, elapsed / (_fastScrolling ? 2 : 4));
else if (walking || (_action != kNone && _action != kIntro))
- _cameraX += CLIP<int>(_position.x - kScreenWidth / 2 - _cameraX, -MIN<int>(8, elapsed), MIN<int>(8, elapsed));
+ _cameraX += CLIP<int>(_position.x - kScreenWidth / 2 - _cameraX,
+ -MIN<int>(_fastScrolling ? 8 : 4, elapsed), MIN<int>(_fastScrolling ? 8 : 4, elapsed));
setCameraX(_cameraX);
}
@@ -969,7 +1040,7 @@ void RunawayScene5030::draw() {
const uint frame = _action == kPeekDoor ? MAX<int>(0, (int)_step - 1) : 18 - MAX<int>(0, (int)_step - 1);
_actionAnimation.draw(_screen, frame, _cameraX, kRoomTop);
} else {
- _actor.draw(_screen, _position, _cameraX, kRoomTop, _mask, _maps, _windowClean);
+ _actor.draw(_screen, _position, _cameraX, kRoomTop, _mask, _maps, _windowClean, _antialias);
}
if (_action == kMeltWait) {
const uint elapsed = _now - _actionStarted;
diff --git a/engines/hollywood/runaway/scene5030.h b/engines/hollywood/runaway/scene5030.h
index 4a8ea966b37..aae14b758bc 100644
--- a/engines/hollywood/runaway/scene5030.h
+++ b/engines/hollywood/runaway/scene5030.h
@@ -67,6 +67,10 @@ public:
void cancelWalk();
void sayInventory(const RunawayInventory::Reply &reply);
bool escaped() const { return _escaped; }
+ bool canSave() const { return !busy() && !speaking() && !_escaped && _pathIndex == _path.size(); }
+ void captureState(RunawaySaveState &state) const;
+ bool restoreState(const RunawaySaveState &state, uint32 now);
+ void setOptions(bool antialias, bool fastScrolling) { _antialias = antialias; _fastScrolling = fastScrolling; }
private:
enum Action {
@@ -119,6 +123,7 @@ private:
RunawayInterrogation _interrogation;
Common::RandomSource _random;
bool _peeked = false;
+ bool _antialias = true, _fastScrolling = true;
RunawayActor _actor;
RunawayLipSync _lipSync;
RunawayIdleHead _idleHead;
diff --git a/engines/hollywood/runaway/strings.cpp b/engines/hollywood/runaway/strings.cpp
index 7d2fdc90065..5aa8d784750 100644
--- a/engines/hollywood/runaway/strings.cpp
+++ b/engines/hollywood/runaway/strings.cpp
@@ -25,7 +25,8 @@
namespace Hollywood {
namespace {
-// German, French and Spanish executable interface labels, stored as UTF-8.
+// Original German, French and Spanish interface labels, plus localized
+// messages for ScummVM saves and settings. All strings are UTF-8.
const char *const kText[RunawayStrings::kTextCount][3] = {
{"BETRACHTE ", "REGARDER ", "MIRAR "},
{"NIMM ", "PRENDRE ", "COGER "},
@@ -68,7 +69,19 @@ const char *const kText[RunawayStrings::kTextCount][3] = {
{"JA", "OUI", "S\303\215"},
{"NEIN", "NON", "NO"},
{"V", "Q", "L"},
- {"STEIGE DURCH DIE FALLT\303\234R HINAB", "SORTIR PAR LA TRAPPE", "SALIR POR LA TRAMPILLA"}
+ {"STEIGE DURCH DIE FALLT\303\234R HINAB", "SORTIR PAR LA TRAPPE", "SALIR POR LA TRAMPILLA"},
+ {"NAME DES SPIELSTANDES EINGEBEN:", "NOM DE LA SAUVEGARDE :", "INTRODUCE EL NOMBRE DE LA PARTIDA:"},
+ {"KEINE SPIELST\303\204NDE VORHANDEN", "AUCUNE SAUVEGARDE", "NO HAY PARTIDAS SALVADAS"},
+ {"NEUER SPIELSTAND", "NOUVELLE SAUVEGARDE", "NUEVA PARTIDA SALVADA"},
+ {"SPIELSTAND GESICHERT", "PARTIE SAUVEGARDEE", "PARTIDA SALVADA"},
+ {"AKTUELLE EINSTELLUNGEN GESICHERT", "CONFIGURATION SAUVEGARDEE", "CONFIGURACI\303\223N SALVADA"},
+ {"VORGEGEBENE EINSTELLUNGEN WIEDERHERGESTELLT", "CONFIGURATION PAR DEFAUT RESTAUREE", "CONFIGURACI\303\223N INICIAL RESTAURADA"},
+ {"SPIELSTAND KONNTE NICHT GESICHERT WERDEN", "IMPOSSIBLE DE SAUVEGARDER LA PARTIE", "NO SE HA PODIDO SALVAR LA PARTIDA"},
+ {"SPIELSTAND KONNTE NICHT GELADEN WERDEN", "IMPOSSIBLE DE CHARGER LA PARTIE", "NO SE HA PODIDO CARGAR LA PARTIDA"},
+ {"SPIELSTAND KONNTE NICHT GEL\303\226SCHT WERDEN", "IMPOSSIBLE D'EFFACER LA SAUVEGARDE", "NO SE HA PODIDO BORRAR LA PARTIDA"},
+ {"KEIN FREIER SPEICHERPLATZ", "AUCUN EMPLACEMENT LIBRE", "NO QUEDAN ESPACIOS LIBRES"},
+ {"H", "E", "B"},
+ {"MITWIRKENDE KONNTEN NICHT GELADEN WERDEN", "IMPOSSIBLE DE CHARGER LE GENERIQUE", "NO SE HAN PODIDO CARGAR LOS CR\303\211DITOS"}
};
const char *const kItemNames[][3] = {
diff --git a/engines/hollywood/runaway/strings.h b/engines/hollywood/runaway/strings.h
index b2c6f3189c7..ada03f57aba 100644
--- a/engines/hollywood/runaway/strings.h
+++ b/engines/hollywood/runaway/strings.h
@@ -38,7 +38,9 @@ public:
kOptions, kLoad, kSave, kDelete, kPlay, kQuit, kMusic, kAntialias,
kScrolling, kPointerSound, kSubtitles, kOn, kOff, kFast, kSlow,
kVolume, kBrightness, kCredits, kSaveSettings, kDefaultSettings,
- kConfirmQuit, kYes, kNo, kQuitKey, kLeaveHatch, kTextCount
+ kConfirmQuit, kYes, kNo, kQuitKey, kLeaveHatch,
+ kEnterSaveName, kNoSaves, kNewSave, kGameSaved, kSettingsSaved, kDefaultsRestored,
+ kSaveFailed, kLoadFailed, kDeleteFailed, kNoFreeSlots, kDeleteKey, kCreditsFailed, kTextCount
};
explicit RunawayStrings(Common::Language language) :
_languageIndex(language == Common::FR_FRA ? 1 : language == Common::ES_ESP ? 2 : 0) {}
diff --git a/engines/hollywood/runaway/ui.cpp b/engines/hollywood/runaway/ui.cpp
index 339cca47105..9e7c48e2bf4 100644
--- a/engines/hollywood/runaway/ui.cpp
+++ b/engines/hollywood/runaway/ui.cpp
@@ -23,6 +23,7 @@
#include "graphics/cursorman.h"
#include "hollywood/runaway/strings.h"
#include "hollywood/runaway/ui.h"
+#include "hollywood/runaway/saveload.h"
namespace Hollywood {
namespace {
@@ -106,12 +107,33 @@ bool RunawayUI::inViewport() const {
void RunawayUI::setVerb(RunawayVerb verb) {
if (_verb != verb) {
+ if (_pointerSound && !_blocked && !_speaking && !busy())
+ _audio.playPointer();
_previousVerb = _verb;
_verb = verb;
_verbStarted = _now;
}
}
+void RunawayUI::captureState(RunawaySaveState &state) const {
+ state.inventoryOpen = _inventoryOpen;
+ state.verb = _verb;
+}
+
+void RunawayUI::restoreState(const RunawaySaveState &state, uint32 now) {
+ _audio.stopEffect();
+ _now = _buttonTick = _verbStarted = _portraitTick = _lastInteraction = now;
+ _blinkUntil = _idleStarted = _pickupStarted = 0;
+ _pickupItem = _hovered = _buttonFrame = _optionsFrame = _mouth = 0;
+ _blocked = _speaking = _inventoryPresentation = _returnAfterPickup = _pickupSoundPlayed = false;
+ _inventoryOpen = state.inventoryOpen;
+ _enteredInventory = false;
+ _verb = _previousVerb = (RunawayVerb)state.verb;
+ _cursorKey = -1;
+ // The options cursor may still be on top of the stack. Rebuild ours
+ // on the next gameplay update, after the menu has popped its cursor.
+}
+
void RunawayUI::setInventoryOpen(bool open) {
_inventoryOpen = open;
_enteredInventory = inViewport();
diff --git a/engines/hollywood/runaway/ui.h b/engines/hollywood/runaway/ui.h
index 378db359975..4c9dea32109 100644
--- a/engines/hollywood/runaway/ui.h
+++ b/engines/hollywood/runaway/ui.h
@@ -52,6 +52,9 @@ public:
bool busy() const { return _pickupItem != 0; }
RunawayVerb verb() const { return _verb; }
byte hovered() const { return _hovered; }
+ void captureState(RunawaySaveState &state) const;
+ void restoreState(const RunawaySaveState &state, uint32 now);
+ void setPointerSound(bool enabled) { _pointerSound = enabled; }
void draw(Graphics::ManagedSurface &screen, const Common::U32String &roomCaption,
const Common::U32String &committedCaption, const Common::U32String &subtitle, bool showSubtitles);
@@ -80,6 +83,7 @@ private:
byte _hovered = 0, _buttonFrame = 0, _optionsFrame = 0, _pickupItem = 0;
bool _inventoryOpen = false, _enteredInventory = false, _returnAfterPickup = false;
bool _inventoryPresentation = false;
+ bool _pointerSound = true;
bool _pickupSoundPlayed = false;
bool _blocked = false, _speaking = false, _cursorPushed = false;
uint32 _now = 0, _buttonTick = 0, _verbStarted = 0, _portraitTick = 0;
Commit: 8fd42faaeed6abf00ea0753084ddf733b33576f8
https://github.com/scummvm/scummvm/commit/8fd42faaeed6abf00ea0753084ddf733b33576f8
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-10-27T11:28:15+01:00
Commit Message:
HOLLYWOOD: adjusted the code to use the new APIs
Changed paths:
engines/hollywood/configure.engine
engines/hollywood/runaway/menu.cpp
engines/hollywood/runaway/ui.cpp
image/module.mk
diff --git a/engines/hollywood/configure.engine b/engines/hollywood/configure.engine
index 8c290a96663..19999697a9b 100644
--- a/engines/hollywood/configure.engine
+++ b/engines/hollywood/configure.engine
@@ -1,3 +1,3 @@
# This file is included from the main "configure" script
# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] [components]
-add_engine hollywood "Hollywood Monsters & Runaway" no "" "" "16bit highres"
+add_engine hollywood "Hollywood Monsters & Runaway" no "" "" "16bit highres" "msmpeg4"
diff --git a/engines/hollywood/runaway/menu.cpp b/engines/hollywood/runaway/menu.cpp
index 8da0d737aa7..57e6e85d341 100644
--- a/engines/hollywood/runaway/menu.cpp
+++ b/engines/hollywood/runaway/menu.cpp
@@ -87,7 +87,7 @@ void RunawayMenu::open(const Graphics::ManagedSurface &screen, const Settings &s
dst[x] = src[x * 5];
}
const uint16 key = *(const uint16 *)_cursor.getPixels();
- CursorMan.pushCursor(_cursor.getPixels(), 60, 60, 30, 30, key, false, &kMenuFormat);
+ CursorMan.pushCursor(_cursor.getPixels(), 60, 60, 30, 30, key, &kMenuFormat);
_cursorPushed = true;
CursorMan.showMouse(true);
}
diff --git a/engines/hollywood/runaway/ui.cpp b/engines/hollywood/runaway/ui.cpp
index 9e7c48e2bf4..b1f399daf05 100644
--- a/engines/hollywood/runaway/ui.cpp
+++ b/engines/hollywood/runaway/ui.cpp
@@ -68,7 +68,7 @@ bool RunawayUI::load() {
_cursor.create(kCursorWidth, kCursorWidth, kUIFormat);
const uint16 key = *(const uint16 *)_cursors.getPixels();
_cursor.fillRect(Common::Rect(0, 0, kCursorWidth, kCursorWidth), key);
- CursorMan.pushCursor(_cursor.getPixels(), kCursorWidth, kCursorWidth, 30, 30, key, false, &kUIFormat);
+ CursorMan.pushCursor(_cursor.getPixels(), kCursorWidth, kCursorWidth, 30, 30, key, &kUIFormat);
_cursorPushed = true;
return true;
}
@@ -341,7 +341,7 @@ void RunawayUI::updateCursor() {
((g * (31 - shade) / 31) << 5) | (b * (31 - shade) / 31);
}
}
- CursorMan.replaceCursor(_cursor.getPixels(), 60, 60, 30, 30, transparent, false, &kUIFormat);
+ CursorMan.replaceCursor(_cursor.getPixels(), 60, 60, 30, 30, transparent, &kUIFormat);
}
Common::U32String RunawayUI::inventoryCaption() const {
diff --git a/image/module.mk b/image/module.mk
index d062aa66877..d250b63817e 100644
--- a/image/module.mk
+++ b/image/module.mk
@@ -24,7 +24,6 @@ MODULE_OBJS := \
codecs/msrle.o \
codecs/msrle4.o \
codecs/msvideo1.o \
- codecs/msmpeg4.o \
codecs/qtrle.o \
codecs/rpza.o \
codecs/smc.o
More information about the Scummvm-git-logs
mailing list