mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
TITANIC: Fix PET not showing on savegame load in front of nav helmet
This commit is contained in:
parent
fc0f3662a0
commit
27c80f012a
@ -58,7 +58,7 @@ void CResourceKey::setValue(const CString &name) {
|
||||
_value = _value.mid(idx + 1);
|
||||
}
|
||||
|
||||
CString CResourceKey::exists() const {
|
||||
CString CResourceKey::getFilename() const {
|
||||
CString name = _key;
|
||||
|
||||
// Check for a resource being specified within an ST container
|
||||
@ -68,10 +68,9 @@ CString CResourceKey::exists() const {
|
||||
name += ".st";
|
||||
}
|
||||
|
||||
// The original did tests for the file in the different
|
||||
// asset paths, which aren't needed in ScummVM
|
||||
Common::File f;
|
||||
return f.exists(name) ? name : CString();
|
||||
// The original did tests for the file in the different asset paths,
|
||||
// which aren't needed in ScummVM, so just return full name
|
||||
return name;
|
||||
}
|
||||
|
||||
bool CResourceKey::scanForFile() const {
|
||||
|
@ -55,10 +55,9 @@ public:
|
||||
const CString &getString() const { return _key; }
|
||||
|
||||
/**
|
||||
* Checks whether a file for the given key exists,
|
||||
* and returns it's filename if it does
|
||||
* Extracts a filename from the resource key
|
||||
*/
|
||||
CString exists() const;
|
||||
CString getFilename() const;
|
||||
|
||||
/**
|
||||
* Scans for a file with a matching name
|
||||
|
@ -103,10 +103,10 @@ void CRoomItem::load(SimpleFile *file) {
|
||||
}
|
||||
|
||||
void CRoomItem::postLoad() {
|
||||
if (!_exitMovieKey.exists().empty())
|
||||
if (!_exitMovieKey.getFilename().empty())
|
||||
return;
|
||||
|
||||
CString name = _transitionMovieKey.exists();
|
||||
CString name = _transitionMovieKey.getFilename();
|
||||
if (name.right(7) == "nav.avi") {
|
||||
_exitMovieKey = CResourceKey(name.left(name.size() - 7) + "exit.avi");
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ void CViewItem::load(SimpleFile *file) {
|
||||
|
||||
bool CViewItem::getResourceKey(CResourceKey *key) {
|
||||
*key = _resourceKey;
|
||||
CString filename = key->exists();
|
||||
CString filename = key->getFilename();
|
||||
return !filename.empty();
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ void CGameManager::roomTransition(CRoomItem *oldRoom, CRoomItem *newRoom) {
|
||||
|
||||
CResourceKey movieKey = (oldRoom == newRoom) ? oldRoom->getTransitionMovieKey() :
|
||||
oldRoom->getExitMovieKey();
|
||||
CString filename = movieKey.exists();
|
||||
CString filename = movieKey.getFilename();
|
||||
if (g_vm->_filesManager->fileExists(filename)) {
|
||||
_movieSurface->freeSurface();
|
||||
_movie = g_vm->_movieManager.createMovie(filename, _movieSurface);
|
||||
|
Loading…
Reference in New Issue
Block a user