[Scummvm-git-logs] scummvm master -> 361a525dc17cc7a70eabcb8bc0757f04a22a6291
lephilousophe
noreply at scummvm.org
Fri Feb 10 07:50:25 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
361a525dc1 LASTEXPRESS: Fix build
Commit: 361a525dc17cc7a70eabcb8bc0757f04a22a6291
https://github.com/scummvm/scummvm/commit/361a525dc17cc7a70eabcb8bc0757f04a22a6291
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2023-02-10T08:50:11+01:00
Commit Message:
LASTEXPRESS: Fix build
Rename macro as there is now a name clash with SearchSet::getArchive
Changed paths:
engines/lastexpress/debug.cpp
engines/lastexpress/game/action.cpp
engines/lastexpress/game/scenes.cpp
engines/lastexpress/helpers.h
engines/lastexpress/menu/menu.cpp
engines/lastexpress/sound/entry.cpp
diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp
index 9e94d03ff37..399562dbdec 100644
--- a/engines/lastexpress/debug.cpp
+++ b/engines/lastexpress/debug.cpp
@@ -283,7 +283,7 @@ bool Debugger::cmdDumpFiles(int argc, const char **) {
debugC(1, kLastExpressDebugResource, "--------------------------------------------------------------------\n\n"); \
debugC(1, kLastExpressDebugResource, "Filename,Size,MD5\n"); \
for (Common::ArchiveMemberList::iterator it = list.begin(); it != list.end(); ++it) { \
- Common::SeekableReadStream *stream = getArchive((*it)->getName()); \
+ Common::SeekableReadStream *stream = getArchiveMember((*it)->getName()); \
if (!stream) { \
debugPrintf("ERROR: Cannot create stream for file: %s\n", (*it)->getName().c_str()); \
restoreArchive(); \
@@ -346,7 +346,7 @@ bool Debugger::cmdShowFrame(int argc, const char **argv) {
return cmdExit(0, nullptr);
} else {
Sequence sequence(filename);
- if (sequence.load(getArchive(filename))) {
+ if (sequence.load(getArchiveMember(filename))) {
_engine->getCursor()->show(false);
clearBg(GraphicsManager::kBackgroundOverlay);
@@ -463,7 +463,7 @@ bool Debugger::cmdPlaySeq(int argc, const char **argv) {
return cmdExit(0, nullptr);
} else {
Sequence *sequence = new Sequence(filename);
- if (sequence->load(getArchive(filename))) {
+ if (sequence->load(getArchiveMember(filename))) {
// Check that we have at least a frame to show
if (sequence->count() == 0) {
@@ -538,7 +538,7 @@ bool Debugger::cmdPlaySnd(int argc, const char **argv) {
_engine->_system->getMixer()->stopAll();
- _soundStream->load(getArchive(name), kVolumeFull, false);
+ _soundStream->load(getArchiveMember(name), kVolumeFull, false);
if (argc == 3)
restoreArchive();
@@ -580,7 +580,7 @@ bool Debugger::cmdPlaySbe(int argc, const char **argv) {
return cmdExit(0, nullptr);
} else {
SubtitleManager subtitle(_engine->getFont());
- if (subtitle.load(getArchive(filename))) {
+ if (subtitle.load(getArchiveMember(filename))) {
_engine->getCursor()->show(false);
for (uint16 i = 0; i < subtitle.getMaxTime(); i += 25) {
clearBg(GraphicsManager::kBackgroundAll);
@@ -651,7 +651,7 @@ bool Debugger::cmdPlayNis(int argc, const char **argv) {
// Check if we got a nis filename or an animation index
if (name.contains('.')) {
Animation animation;
- if (animation.load(getArchive(name))) {
+ if (animation.load(getArchiveMember(name))) {
_engine->getCursor()->show(false);
animation.play();
_engine->getCursor()->show(true);
diff --git a/engines/lastexpress/game/action.cpp b/engines/lastexpress/game/action.cpp
index eb8fd2e7d15..24906a0bd09 100644
--- a/engines/lastexpress/game/action.cpp
+++ b/engines/lastexpress/game/action.cpp
@@ -1925,7 +1925,7 @@ void Action::playAnimation(EventIndex index, bool debugMode) const {
// In debug mode, just show the animation
if (debugMode) {
Animation animation;
- if (animation.load(getArchive(Common::String(_animationList[index].filename) + ".nis")))
+ if (animation.load(getArchiveMember(Common::String(_animationList[index].filename) + ".nis")))
animation.play();
return;
}
@@ -1957,7 +1957,7 @@ void Action::playAnimation(EventIndex index, bool debugMode) const {
processSound = true;
Animation animation;
- if (animation.load(getArchive(Common::String(_animationList[index].filename) + ".nis") , processSound ? Animation::kFlagDefault : Animation::kFlagProcess))
+ if (animation.load(getArchiveMember(Common::String(_animationList[index].filename) + ".nis") , processSound ? Animation::kFlagDefault : Animation::kFlagProcess))
animation.play();
if (getSoundQueue()->isBuffered("TIMER"))
diff --git a/engines/lastexpress/game/scenes.cpp b/engines/lastexpress/game/scenes.cpp
index 1cd57a85b21..782c6ec16e8 100644
--- a/engines/lastexpress/game/scenes.cpp
+++ b/engines/lastexpress/game/scenes.cpp
@@ -75,7 +75,7 @@ void SceneManager::loadSceneDataFile(ArchiveIndex archive) {
case kArchiveCd1:
case kArchiveCd2:
case kArchiveCd3:
- if (!_sceneLoader->load(getArchive(Common::String::format("CD%iTRAIN.DAT", archive))))
+ if (!_sceneLoader->load(getArchiveMember(Common::String::format("CD%iTRAIN.DAT", archive))))
error("[SceneManager::loadSceneDataFile] Cannot load data file CD%iTRAIN.DAT", archive);
break;
diff --git a/engines/lastexpress/helpers.h b/engines/lastexpress/helpers.h
index 695a6126a57..b073d8b48f8 100644
--- a/engines/lastexpress/helpers.h
+++ b/engines/lastexpress/helpers.h
@@ -29,7 +29,7 @@
#define LOW_BYTE(w) ((unsigned char)(((unsigned long)(w)) & 0xff))
// Misc
-#define getArchive(name) _engine->getResourceManager()->getFileStream(name)
+#define getArchiveMember(name) _engine->getResourceManager()->getFileStream(name)
#define rnd(value) _engine->getRandom().getRandomNumber(value - 1)
// Engine subclasses
@@ -73,8 +73,8 @@
//////////////////////////////////////////////////////////////////////////
// Sequences
-#define loadSequence(name) Sequence::load(name, getArchive(name))
-#define loadSequence1(name, field30) Sequence::load(name, getArchive(name), field30)
+#define loadSequence(name) Sequence::load(name, getArchiveMember(name))
+#define loadSequence1(name, field30) Sequence::load(name, getArchiveMember(name), field30)
#define clearBg(type) _engine->getGraphicsManager()->clear(type)
#define showScene(index, type) _engine->getGraphicsManager()->draw(getScenes()->get(index), type);
diff --git a/engines/lastexpress/menu/menu.cpp b/engines/lastexpress/menu/menu.cpp
index 6fb2f515d26..ffd2b4aeb77 100644
--- a/engines/lastexpress/menu/menu.cpp
+++ b/engines/lastexpress/menu/menu.cpp
@@ -308,7 +308,7 @@ void Menu::show(bool doSavegame, SavegameType type, uint32 value) {
if (!_hasShownIntro) {
// Show Broderbrund logo
Animation animation;
- if (animation.load(getArchive("1930.nis")))
+ if (animation.load(getArchiveMember("1930.nis")))
animation.play();
getFlags()->mouseRightClick = false;
@@ -317,7 +317,7 @@ void Menu::show(bool doSavegame, SavegameType type, uint32 value) {
getSound()->playSoundWithSubtitles("MUS001.SND", kSoundTypeIntro | kVolumeFull, kEntityPlayer);
// Show The Smoking Car logo
- if (animation.load(getArchive("1931.nis")))
+ if (animation.load(getArchiveMember("1931.nis")))
animation.play();
_hasShownIntro = true;
@@ -500,7 +500,7 @@ bool Menu::handleEvent(StartMenuAction action, Common::EventType type) {
// Show intro
Animation animation;
- if (animation.load(getArchive("1601.nis")))
+ if (animation.load(getArchiveMember("1601.nis")))
animation.play();
getEvent(kEventIntro) = 1;
diff --git a/engines/lastexpress/sound/entry.cpp b/engines/lastexpress/sound/entry.cpp
index 78dfec52517..a7970829f88 100644
--- a/engines/lastexpress/sound/entry.cpp
+++ b/engines/lastexpress/sound/entry.cpp
@@ -227,10 +227,10 @@ void SoundEntry::loadStream(Common::String name) {
_name = name;
// Load sound data
- _stream = getArchive(name);
+ _stream = getArchiveMember(name);
if (!_stream)
- _stream = getArchive("DEFAULT.SND");
+ _stream = getArchiveMember("DEFAULT.SND");
if (!_stream)
_status = kSoundFlagClosed;
@@ -465,7 +465,7 @@ void SubtitleEntry::load(Common::String filename, SoundEntry *soundEntry) {
void SubtitleEntry::loadData() {
_data = new SubtitleManager(_engine->getFont());
- _data->load(getArchive(_filename));
+ _data->load(getArchiveMember(_filename));
getSoundQueue()->setSubtitleFlag(getSoundQueue()->getSubtitleFlag() | 2);
getSoundQueue()->setCurrentSubtitle(this);
@@ -477,7 +477,7 @@ void SubtitleEntry::setupAndDraw() {
if (!_data) {
_data = new SubtitleManager(_engine->getFont());
- _data->load(getArchive(_filename));
+ _data->load(getArchiveMember(_filename));
}
if (_data->getMaxTime() > _sound->getTime()) {
More information about the Scummvm-git-logs
mailing list