[Scummvm-git-logs] scummvm master -> 0decd700f46edd4a667ee6bddce6390fd5323ac1

OMGPizzaGuy 48367439+OMGPizzaGuy at users.noreply.github.com
Sat Feb 20 16:25:21 UTC 2021


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:
0decd700f4 ULTIMA8: Remove virtual path from FileSystem manager as it was no longer used.


Commit: 0decd700f46edd4a667ee6bddce6390fd5323ac1
    https://github.com/scummvm/scummvm/commit/0decd700f46edd4a667ee6bddce6390fd5323ac1
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2021-02-20T10:25:07-06:00

Commit Message:
ULTIMA8: Remove virtual path from FileSystem manager as it was no longer used.

SearchManager is responsible for handling search paths and the FileSystem manager needs to be trimmed back in favor of Common code.

Changed paths:
    engines/ultima/ultima8/audio/remorse_music_process.cpp
    engines/ultima/ultima8/filesys/file_system.cpp
    engines/ultima/ultima8/filesys/file_system.h
    engines/ultima/ultima8/games/game_data.cpp
    engines/ultima/ultima8/games/remorse_game.cpp
    engines/ultima/ultima8/games/u8_game.cpp
    engines/ultima/ultima8/graphics/fonts/font_manager.cpp
    engines/ultima/ultima8/gumps/movie_gump.cpp
    engines/ultima/ultima8/gumps/shape_viewer_gump.cpp
    engines/ultima/ultima8/gumps/weasel_gump.cpp
    engines/ultima/ultima8/misc/debugger.cpp
    engines/ultima/ultima8/ultima8.cpp


diff --git a/engines/ultima/ultima8/audio/remorse_music_process.cpp b/engines/ultima/ultima8/audio/remorse_music_process.cpp
index 6fa3a29998..3d9741e2ab 100644
--- a/engines/ultima/ultima8/audio/remorse_music_process.cpp
+++ b/engines/ultima/ultima8/audio/remorse_music_process.cpp
@@ -180,7 +180,7 @@ void RemorseMusicProcess::playMusic_internal(int track) {
 
 	if (track > 0) {
 		// TODO: It's a bit ugly having this here.  Should be in GameData.
-		const Std::string fname = Std::string::format("@game/sound/%s.amf", _trackNames[track]);
+		const Std::string fname = Std::string::format("sound/%s.amf", _trackNames[track]);
 		FileSystem *filesystem = FileSystem::get_instance();
 		assert(filesystem);
 		Common::SeekableReadStream *rs = filesystem->ReadFile(fname);
diff --git a/engines/ultima/ultima8/filesys/file_system.cpp b/engines/ultima/ultima8/filesys/file_system.cpp
index cee2677fd2..e69c6a1ae7 100644
--- a/engines/ultima/ultima8/filesys/file_system.cpp
+++ b/engines/ultima/ultima8/filesys/file_system.cpp
@@ -31,12 +31,10 @@ using Std::string;
 
 FileSystem *FileSystem::_fileSystem = nullptr;
 
-FileSystem::FileSystem(bool noforced)
-	: _noForcedVPaths(noforced) {
+FileSystem::FileSystem() {
 	debugN(MM_INFO, "Creating FileSystem...\n");
 
 	_fileSystem = this;
-	AddVirtualPath("@home", "");
 }
 
 FileSystem::~FileSystem() {
@@ -70,24 +68,6 @@ bool FileSystem::rawOpen(Common::SeekableReadStream *&in, const string &fname) {
 	string name = fname;
 	Common::File *f;
 
-	// Handle reading files from the ultima.dat data
-	if (name.hasPrefix("@data/")) {
-		// It's a file specifically from the ultima.dat file
-		f = new Common::File();
-		if (f->open(Common::String::format("data/%s", name.substr(6).c_str()))) {
-			in = f;
-			return true;
-		}
-
-		f->close();
-		delete f;
-	}
-
-	if (!rewrite_virtual_path(name))
-		return false;
-
-	switch_slashes(name);
-
 	int uppercasecount = 0;
 	f = new Common::File();
 	do {
@@ -105,33 +85,8 @@ bool FileSystem::rawOpen(Common::SeekableReadStream *&in, const string &fname) {
 
 bool FileSystem::rawOpen(Common::WriteStream *&out,  const string &fname) {
 	string name = fname;
-	switch_slashes(name);
-
-	return false;
-
-#if 0
-	if (!rewrite_virtual_path(name)) {
-		warning("Illegal file access");
-		return false;
-	}
 
-	int uppercasecount = 0;
-	do {
-		if (out.open(name))
-			return true;
-
-	} while (base_to_uppercase(name, ++uppercasecount));
-
-	// file not found
 	return false;
-#endif
-}
-
-void FileSystem::switch_slashes(string &name) {
-	for (string::iterator X = name.begin(); X != name.end(); ++X) {
-		if (*X == '\\')
-			*X =  '/';
-	}
 }
 
 /*
@@ -161,97 +116,6 @@ bool FileSystem::base_to_uppercase(string &str, int count) {
 	return (todo <= 0);
 }
 
-bool FileSystem::AddVirtualPath(const string &vpath, const string &realpath, const bool create) {
-	string vp = vpath, rp = realpath;
-
-	// remove trailing slash
-	if (vp.size() && vp.rfind('/') == vp.size() - 1)
-		vp.erase(vp.rfind('/'));
-
-	if (rp.size() && rp.rfind('/') == rp.size() - 1)
-		rp.erase(rp.rfind('/'));
-
-	if (rp.find("..") != string::npos) {
-		warning("Error mounting virtual path \"%s\": \"..\" not allowed", vp.c_str());
-		return false;
-	}
-
-	// Finding Reserved Virtual Path Names
-	// memory path is reserved
-	if (vp == "@memory" || vp.substr(0, 8) == "@memory/") {
-		warning("Error mounting virtual path \"%s\": \"@memory\" is a reserved virtual path name",
-			vp.c_str());
-		return false;
-	}
-
-	string fullpath = rp;
-	rewrite_virtual_path(fullpath);
-	// When mounting a memory file, it wont exist, so don't attempt to create the dir
-#ifdef DEBUG
-	debugN(MM_INFO, "virtual path \"%s\": %s\n", vp.c_str(), fullpath.c_str());
-#endif
-	if (!(fullpath.substr(0, 8) == "@memory/") && rp.length()) {
-		if (!IsDir(fullpath)) {
-			if (!create) {
-#ifdef DEBUG
-				warning("Problem mounting virtual path \"%s\": directory not found: %s",
-					vp.c_str(), fullpath.c_str());
-#endif
-				return false;
-			} else {
-				MkDir(fullpath);
-			}
-		}
-	}
-
-	_virtualPaths[vp] = rp;
-	return true;
-}
-
-bool FileSystem::RemoveVirtualPath(const string &vpath) {
-	string vp = vpath;
-
-	// remove trailing slash
-	if (vp.size() && vp.rfind('/') == vp.size() - 1)
-		vp.erase(vp.rfind('/'));
-
-	Std::map<Common::String, string>::iterator i = _virtualPaths.find(vp);
-
-	if (i == _virtualPaths.end()) {
-		return false;
-	} else {
-		_virtualPaths.erase(vp);
-		return true;
-	}
-}
-
-bool FileSystem::rewrite_virtual_path(string &vfn) const {
-	bool ret = false;
-	string::size_type pos = vfn.size();
-
-	while ((pos = vfn.rfind('/', pos)) != Std::string::npos) {
-//		perr << vfn << ", '" << vfn.substr(0, pos) << "', " << pos << Std::endl;
-		Std::map<Common::String, string>::const_iterator p = _virtualPaths.find(
-		            vfn.substr(0, pos));
-
-		if (p != _virtualPaths.end()) {
-			ret = true;
-			// rewrite first part of path
-			vfn = p->_value + vfn.substr(pos + 1);
-			pos = string::npos;
-		} else {
-			if (pos == 0)
-				break;
-			--pos;
-		}
-	}
-
-	// We will allow all paths to work
-	if (_noForcedVPaths) ret = true;
-
-	return ret;
-}
-
 
 bool FileSystem::IsDir(const string &path) {
 	Common::FSNode node(path);
diff --git a/engines/ultima/ultima8/filesys/file_system.h b/engines/ultima/ultima8/filesys/file_system.h
index 76891fc85f..481e43de4d 100644
--- a/engines/ultima/ultima8/filesys/file_system.h
+++ b/engines/ultima/ultima8/filesys/file_system.h
@@ -33,8 +33,7 @@ namespace Ultima8 {
 
 class FileSystem {
 public:
-	//! \param noforcedvpaths if false, all file operations must use vpaths
-	FileSystem(bool noforcedvpaths = false);
+	FileSystem();
 	~FileSystem();
 
 	static FileSystem *get_instance() {
@@ -53,25 +52,12 @@ public:
 	//! \return a new writestream, or nullptr on failure
 	Common::WriteStream *WriteFile(const Std::string &vfn, bool is_text = false);
 
-	//! Mount a virtual path
-	//! \param vpath the name of the vpath (should start with '@')
-	//! \param realpath the name of the path to mount (note that this can
-	//!                 be a virtual path itself)
-	//! \param create create realpath directory if it doesn't exist?
-	//! \return true if succesful
-	bool AddVirtualPath(const Std::string &vpath, const Std::string &realpath,
-	                    bool create = false);
-
-	//! Unmount a virtual path
-	bool RemoveVirtualPath(const Std::string &vpath);
-
 	//! Create a directory
 	//! \param path the directory to create. (Can be virtual)
 	//! \return true if successful; otherwise, false.
 	bool MkDir(const Std::string &path); // can handle both paths and vpaths
 
 private:
-	static void switch_slashes(Std::string &name);
 	static bool base_to_uppercase(Std::string &str, int count);
 
 	static bool IsDir(const Std::string &path);
@@ -89,16 +75,6 @@ private:
 	 *	Output: false if couldn't open.
 	 */
 	bool rawOpen(Common::WriteStream *&out, const Std::string &fname);
-
-	// This will disable the usage of forced virtual paths.
-	// It's useful for 'tools'
-	bool    _noForcedVPaths;
-
-	// rewrite virtual path in-place (i.e., fvn is replaced)
-	// returns false if no rewriting was done
-	bool rewrite_virtual_path(Std::string &vfn) const;
-
-	Std::map<Common::String, Std::string> _virtualPaths;
 };
 
 } // End of namespace Ultima8
diff --git a/engines/ultima/ultima8/games/game_data.cpp b/engines/ultima/ultima8/games/game_data.cpp
index 3bccae4a4a..cb58bb309c 100644
--- a/engines/ultima/ultima8/games/game_data.cpp
+++ b/engines/ultima/ultima8/games/game_data.cpp
@@ -171,7 +171,7 @@ void GameData::loadTranslation() {
 	}
 
 	if (!translationfile.empty()) {
-		translationfile = "@data/" + translationfile;
+		translationfile = "data/" + translationfile;
 
 		pout << "Loading translation: " << translationfile << Std::endl;
 
@@ -229,7 +229,7 @@ FrameID GameData::translate(FrameID f) {
 void GameData::loadU8Data() {
 	FileSystem *filesystem = FileSystem::get_instance();
 
-	Common::SeekableReadStream *fd = filesystem->ReadFile("@game/static/fixed.dat");
+	Common::SeekableReadStream *fd = filesystem->ReadFile("static/fixed.dat");
 	if (!fd)
 		error("Unable to load static/fixed.dat");
 
@@ -239,7 +239,7 @@ void GameData::loadU8Data() {
 	if (!langletter)
 		error("Unknown language. Unable to open usecode");
 
-	Std::string filename = "@game/usecode/";
+	Std::string filename = "usecode/";
 	filename += langletter;
 	filename += "usecode.flx";
 
@@ -252,8 +252,8 @@ void GameData::loadU8Data() {
 
 	// Load main shapes
 	pout << "Load Shapes" << Std::endl;
-	Common::SeekableReadStream *sf = filesystem->ReadFile("@game/static/u8shapes.flx");
-	if (!sf) sf = filesystem->ReadFile("@game/static/u8shapes.cmp");
+	Common::SeekableReadStream *sf = filesystem->ReadFile("static/u8shapes.flx");
+	if (!sf) sf = filesystem->ReadFile("static/u8shapes.cmp");
 
 	if (!sf)
 		error("Unable to load static/u8shapes.flx or static/u8shapes.cmp");
@@ -263,13 +263,13 @@ void GameData::loadU8Data() {
 
 	// Load weapon, armour info
 	ConfigFileManager *config = ConfigFileManager::get_instance();
-	config->readConfigFile("@data/u8weapons.ini", "weapons");
-	config->readConfigFile("@data/u8armour.ini", "armour");
-	config->readConfigFile("@data/u8monsters.ini", "monsters");
-	config->readConfigFile("@data/u8.ini", "game");
+	config->readConfigFile("data/u8weapons.ini", "weapons");
+	config->readConfigFile("data/u8armour.ini", "armour");
+	config->readConfigFile("data/u8monsters.ini", "monsters");
+	config->readConfigFile("data/u8.ini", "game");
 
 	// Load typeflags
-	Common::SeekableReadStream *tfs = filesystem->ReadFile("@game/static/typeflag.dat");
+	Common::SeekableReadStream *tfs = filesystem->ReadFile("static/typeflag.dat");
 	if (!tfs)
 		error("Unable to load static/typeflag.dat");
 
@@ -277,7 +277,7 @@ void GameData::loadU8Data() {
 	delete tfs;
 
 	// Load animdat
-	Common::SeekableReadStream *af = filesystem->ReadFile("@game/static/anim.dat");
+	Common::SeekableReadStream *af = filesystem->ReadFile("static/anim.dat");
 	if (!af)
 		error("Unable to load static/anim.dat");
 
@@ -285,7 +285,7 @@ void GameData::loadU8Data() {
 	delete af;
 
 	// Load weapon overlay data
-	Common::SeekableReadStream *wod = filesystem->ReadFile("@game/static/wpnovlay.dat");
+	Common::SeekableReadStream *wod = filesystem->ReadFile("static/wpnovlay.dat");
 	if (!wod)
 		error("Unable to load static/wpnovlay.dat");
 
@@ -295,7 +295,7 @@ void GameData::loadU8Data() {
 	delete overlayflex;
 
 	// Load _globs
-	Common::SeekableReadStream *gds = filesystem->ReadFile("@game/static/glob.flx");
+	Common::SeekableReadStream *gds = filesystem->ReadFile("static/glob.flx");
 	if (!gds)
 		error("Unable to load static/glob.flx");
 
@@ -317,7 +317,7 @@ void GameData::loadU8Data() {
 	delete globflex;
 
 	// Load fonts
-	Common::SeekableReadStream *fds = filesystem->ReadFile("@game/static/u8fonts.flx");
+	Common::SeekableReadStream *fds = filesystem->ReadFile("static/u8fonts.flx");
 	if (!fds)
 		error("Unable to load static/u8fonts.flx");
 
@@ -326,7 +326,7 @@ void GameData::loadU8Data() {
 	_fonts->setHVLeads();
 
 	// Load \mouse
-	IDataSource *msds = filesystem->ReadFile("@game/static/u8mouse.shp");
+	IDataSource *msds = filesystem->ReadFile("static/u8mouse.shp");
 	if (!msds)
 		error("Unable to load static/u8mouse.shp");
 
@@ -334,14 +334,14 @@ void GameData::loadU8Data() {
 	_mouse->setPalette(PaletteManager::get_instance()->getPalette(PaletteManager::Pal_Game));
 	delete msds;
 
-	Common::SeekableReadStream *gumpds = filesystem->ReadFile("@game/static/u8gumps.flx");
+	Common::SeekableReadStream *gumpds = filesystem->ReadFile("static/u8gumps.flx");
 	if (!gumpds)
 		error("Unable to load static/u8gumps.flx");
 
 	_gumps = new GumpShapeArchive(gumpds, GUMPS,
 	                             PaletteManager::get_instance()->getPalette(PaletteManager::Pal_Game));
 
-	Common::SeekableReadStream *gumpageds = filesystem->ReadFile("@game/static/gumpage.dat");
+	Common::SeekableReadStream *gumpageds = filesystem->ReadFile("static/gumpage.dat");
 	if (!gumpageds)
 		error("Unable to load static/gumpage.dat");
 
@@ -349,13 +349,13 @@ void GameData::loadU8Data() {
 	delete gumpageds;
 
 
-	Common::SeekableReadStream *mf = filesystem->ReadFile("@game/sound/music.flx");
+	Common::SeekableReadStream *mf = filesystem->ReadFile("sound/music.flx");
 	if (!mf)
 		error("Unable to load sound/music.flx");
 
 	_music = new MusicFlex(mf);
 
-	Common::SeekableReadStream *sndflx = filesystem->ReadFile("@game/sound/sound.flx");
+	Common::SeekableReadStream *sndflx = filesystem->ReadFile("sound/sound.flx");
 	if (!sndflx)
 		error("Unable to load sound/sound.flx");
 
@@ -447,7 +447,7 @@ SpeechFlex *GameData::getSpeechFlex(uint32 shapeNum) {
 
 	FileSystem *filesystem = FileSystem::get_instance();
 
-	static const Std::string u8_sound_ = "@game/sound/";
+	static const Std::string u8_sound_ = "sound/";
 	char num_flx [32];
 	snprintf(num_flx , 32, "%i.flx", shapeNum);
 
@@ -507,7 +507,7 @@ const FireType *GameData::getFireType(uint16 type) const {
 void GameData::loadRemorseData() {
 	FileSystem *filesystem = FileSystem::get_instance();
 
-	Common::SeekableReadStream *fd = filesystem->ReadFile("@game/static/fixed.dat");
+	Common::SeekableReadStream *fd = filesystem->ReadFile("static/fixed.dat");
 	if (!fd)
 		error("Unable to load static/fixed.dat");
 
@@ -517,7 +517,7 @@ void GameData::loadRemorseData() {
 	if (!langletter)
 		error("Unknown language. Unable to open usecode");
 
-	Std::string filename = "@game/usecode/";
+	Std::string filename = "usecode/";
 	filename += langletter;
 	filename += "usecode.flx";
 
@@ -530,7 +530,7 @@ void GameData::loadRemorseData() {
 
 	// Load main shapes
 	pout << "Load Shapes" << Std::endl;
-	Common::SeekableReadStream *sf = filesystem->ReadFile("@game/static/shapes.flx");
+	Common::SeekableReadStream *sf = filesystem->ReadFile("static/shapes.flx");
 
 	if (!sf)
 		error("Unable to load static/shapes.flx");
@@ -541,15 +541,15 @@ void GameData::loadRemorseData() {
 
 	ConfigFileManager *config = ConfigFileManager::get_instance();
 	// Load weapon, armour info
-	config->readConfigFile("@data/remorseweapons.ini", "weapons");
+	config->readConfigFile("data/remorseweapons.ini", "weapons");
 #if 0
-	config->readConfigFile("@data/u8armour.ini", "armour");
-	config->readConfigFile("@data/u8monsters.ini", "monsters");
+	config->readConfigFile("data/u8armour.ini", "armour");
+	config->readConfigFile("data/u8monsters.ini", "monsters");
 #endif
-	config->readConfigFile("@data/remorse.ini", "game");
+	config->readConfigFile("data/remorse.ini", "game");
 
 	// Load typeflags
-	Common::SeekableReadStream *tfs = filesystem->ReadFile("@game/static/typeflag.dat");
+	Common::SeekableReadStream *tfs = filesystem->ReadFile("static/typeflag.dat");
 	if (!tfs)
 		error("Unable to load static/typeflag.dat");
 
@@ -557,7 +557,7 @@ void GameData::loadRemorseData() {
 	delete tfs;
 
 	// Load animdat
-	Common::SeekableReadStream *af = filesystem->ReadFile("@game/static/anim.dat");
+	Common::SeekableReadStream *af = filesystem->ReadFile("static/anim.dat");
 	if (!af)
 		error("Unable to load static/anim.dat");
 
@@ -565,7 +565,7 @@ void GameData::loadRemorseData() {
 	delete af;
 
 	// Load weapon overlay data
-	Common::SeekableReadStream *wod = filesystem->ReadFile("@game/static/wpnovlay.dat");
+	Common::SeekableReadStream *wod = filesystem->ReadFile("static/wpnovlay.dat");
 	if (!wod)
 		error("Unable to load static/wpnovlay.dat");
 
@@ -575,7 +575,7 @@ void GameData::loadRemorseData() {
 	delete overlayflex;
 
 	// Load globs
-	Common::SeekableReadStream *gds = filesystem->ReadFile("@game/static/glob.flx");
+	Common::SeekableReadStream *gds = filesystem->ReadFile("static/glob.flx");
 	if (!gds)
 		error("Unable to load static/glob.flx");
 
@@ -597,7 +597,7 @@ void GameData::loadRemorseData() {
 	delete globflex;
 
 	// Load fonts
-	Common::SeekableReadStream *fds = filesystem->ReadFile("@game/static/fonts.flx");
+	Common::SeekableReadStream *fds = filesystem->ReadFile("static/fonts.flx");
 	if (!fds)
 		error("Unable to load static/fonts.flx");
 
@@ -606,7 +606,7 @@ void GameData::loadRemorseData() {
 	_fonts->setHVLeads();
 
 	// Load mouse
-	IDataSource *msds = filesystem->ReadFile("@game/static/mouse.shp");
+	IDataSource *msds = filesystem->ReadFile("static/mouse.shp");
 	if (!msds)
 		error("Unable to load static/mouse.shp");
 
@@ -614,14 +614,14 @@ void GameData::loadRemorseData() {
 	_mouse->setPalette(PaletteManager::get_instance()->getPalette(PaletteManager::Pal_Game));
 	delete msds;
 
-	Common::SeekableReadStream *gumpds = filesystem->ReadFile("@game/static/gumps.flx");
+	Common::SeekableReadStream *gumpds = filesystem->ReadFile("static/gumps.flx");
 	if (!gumpds)
 		error("Unable to load static/gumps.flx");
 
 	_gumps = new GumpShapeArchive(gumpds, GUMPS,
 		PaletteManager::get_instance()->getPalette(PaletteManager::Pal_Game));
 
-	Common::SeekableReadStream *dtableds = filesystem->ReadFile("@game/static/dtable.flx");
+	Common::SeekableReadStream *dtableds = filesystem->ReadFile("static/dtable.flx");
 	if (!dtableds)
 		error("Unable to load static/dtable.flx");
 
@@ -629,7 +629,7 @@ void GameData::loadRemorseData() {
 	_npcTable = NPCDat::load(dtableflex);
 	delete dtableflex;
 
-	Common::SeekableReadStream *damageds = filesystem->ReadFile("@game/static/damage.flx");
+	Common::SeekableReadStream *damageds = filesystem->ReadFile("static/damage.flx");
 	if (!damageds)
 		error("Unable to load static/damage.flx");
 
@@ -641,7 +641,7 @@ void GameData::loadRemorseData() {
 
 	delete damageflex;
 
-	Common::SeekableReadStream *combatds = filesystem->ReadFile("@game/static/combat.dat");
+	Common::SeekableReadStream *combatds = filesystem->ReadFile("static/combat.dat");
 	if (!combatds)
 		error("Unable to load static/combat.dat");
 
@@ -659,7 +659,7 @@ void GameData::loadRemorseData() {
 
 	delete combatflex;
 
-	Common::SeekableReadStream *stuffds = filesystem->ReadFile("@game/static/stuff.dat");
+	Common::SeekableReadStream *stuffds = filesystem->ReadFile("static/stuff.dat");
 	if (!stuffds)
 		error("Unable to load static/stuff.dat");
 
@@ -674,7 +674,7 @@ void GameData::loadRemorseData() {
 
 	delete stuffds;
 
-	Common::SeekableReadStream *xformpalds = filesystem->ReadFile("@game/static/xformpal.dat");
+	Common::SeekableReadStream *xformpalds = filesystem->ReadFile("static/xformpal.dat");
 	if (!xformpalds)
 		error("Unable to load static/xformpal.dat");
 	RawArchive *xformpalflex = new RawArchive(xformpalds);
@@ -689,7 +689,7 @@ void GameData::loadRemorseData() {
 	// Note: No MusicFlex for Remorse, as the music is all in different AMF files.
 	// The remorse_music_process will load them.
 
-	Common::SeekableReadStream *sndflx = filesystem->ReadFile("@game/sound/sound.flx");
+	Common::SeekableReadStream *sndflx = filesystem->ReadFile("sound/sound.flx");
 	if (!sndflx)
 		error("Unable to load sound/sound.flx");
 
diff --git a/engines/ultima/ultima8/games/remorse_game.cpp b/engines/ultima/ultima8/games/remorse_game.cpp
index 086a2dd6e5..ec95035d35 100644
--- a/engines/ultima/ultima8/games/remorse_game.cpp
+++ b/engines/ultima/ultima8/games/remorse_game.cpp
@@ -72,19 +72,19 @@ bool RemorseGame::loadFiles() {
 	// Load palette
 	pout << "Load Palettes" << Std::endl;
 
-	if (!loadPalette("@game/static/gamepal.pal", PaletteManager::Pal_Game))
+	if (!loadPalette("static/gamepal.pal", PaletteManager::Pal_Game))
 		return false;
 	if (GAME_IS_REGRET) {
-		if (!loadPalette("@game/static/cred.pal", PaletteManager::Pal_Cred))
+		if (!loadPalette("static/cred.pal", PaletteManager::Pal_Cred))
 			return false;
 	}
-	if (!loadPalette("@game/static/diff.pal", PaletteManager::Pal_Diff))
+	if (!loadPalette("static/diff.pal", PaletteManager::Pal_Diff))
 		return false;
-	if (!loadPalette("@game/static/misc.pal", PaletteManager::Pal_Misc))
+	if (!loadPalette("static/misc.pal", PaletteManager::Pal_Misc))
 		return false;
-	if (!loadPalette("@game/static/misc2.pal", PaletteManager::Pal_Misc2))
+	if (!loadPalette("static/misc2.pal", PaletteManager::Pal_Misc2))
 		return false;
-	if (!loadPalette("@game/static/star.pal", PaletteManager::Pal_Star))
+	if (!loadPalette("static/star.pal", PaletteManager::Pal_Star))
 		return false;
 
 	pout << "Load GameData" << Std::endl;
@@ -149,7 +149,7 @@ bool RemorseGame::startInitialUsecode(int saveSlot) {
 
 
 static ProcId playMovie(const char *movieID, bool fade) {
-	const Std::string filename = Std::string::format("@game/flics/%s.avi", movieID);
+	const Std::string filename = Std::string::format("flics/%s.avi", movieID);
 	FileSystem *filesys = FileSystem::get_instance();
 	Common::SeekableReadStream *rs = filesys->ReadFile(filename);
 	if (!rs) {
diff --git a/engines/ultima/ultima8/games/u8_game.cpp b/engines/ultima/ultima8/games/u8_game.cpp
index 85491967f8..467b604298 100644
--- a/engines/ultima/ultima8/games/u8_game.cpp
+++ b/engines/ultima/ultima8/games/u8_game.cpp
@@ -71,7 +71,7 @@ U8Game::~U8Game() {
 bool U8Game::loadFiles() {
 	// Load palette
 	pout << "Load Palette" << Std::endl;
-	Common::SeekableReadStream *pf = FileSystem::get_instance()->ReadFile("@game/static/u8pal.pal");
+	Common::SeekableReadStream *pf = FileSystem::get_instance()->ReadFile("static/u8pal.pal");
 	if (!pf) {
 		perr << "Unable to load static/u8pal.pal." << Std::endl;
 		return false;
@@ -102,7 +102,7 @@ bool U8Game::startGame() {
 	// reserve ObjId 666 for the Guardian Bark hack
 	objman->reserveObjId(666);
 
-	Common::SeekableReadStream *savers = FileSystem::get_instance()->ReadFile("@game/savegame/u8save.000");
+	Common::SeekableReadStream *savers = FileSystem::get_instance()->ReadFile("savegame/u8save.000");
 	if (!savers) {
 		perr << "Unable to load savegame/u8save.000." << Std::endl;
 		return false;
@@ -163,7 +163,7 @@ ProcId U8Game::playIntroMovie(bool fade) {
 		return 0;
 	}
 
-	Std::string filename = "@game/static/";
+	Std::string filename = "static/";
 	filename += langletter;
 	filename += "intro.skf";
 
@@ -178,7 +178,7 @@ ProcId U8Game::playIntroMovie(bool fade) {
 }
 
 ProcId U8Game::playEndgameMovie(bool fade) {
-	static const Std::string filename = "@game/static/endgame.skf";
+	static const Std::string filename = "static/endgame.skf";
 	FileSystem *filesys = FileSystem::get_instance();
 	Common::SeekableReadStream *skf = filesys->ReadFile(filename);
 	if (!skf) {
@@ -196,7 +196,7 @@ void U8Game::playCredits() {
 		perr << "U8Game::playCredits: Unknown language." << Std::endl;
 		return;
 	}
-	Std::string filename = "@game/static/";
+	Std::string filename = "static/";
 	filename += langletter;
 	filename += "credits.dat";
 
@@ -219,7 +219,7 @@ void U8Game::playCredits() {
 }
 
 void U8Game::playQuotes() {
-	static const Std::string filename = "@game/static/quotes.dat";
+	static const Std::string filename = "static/quotes.dat";
 
 	Common::SeekableReadStream *rs = FileSystem::get_instance()->ReadFile(filename);
 	if (!rs) {
diff --git a/engines/ultima/ultima8/graphics/fonts/font_manager.cpp b/engines/ultima/ultima8/graphics/fonts/font_manager.cpp
index 4639ef8a8b..64e1fa379a 100644
--- a/engines/ultima/ultima8/graphics/fonts/font_manager.cpp
+++ b/engines/ultima/ultima8/graphics/fonts/font_manager.cpp
@@ -99,9 +99,9 @@ Graphics::Font *FontManager::getTTF_Font(const Std::string &filename, int points
 		return iter->_value;
 
 	Common::SeekableReadStream *fontids;
-	fontids = FileSystem::get_instance()->ReadFile("@data/" + filename);
+	fontids = FileSystem::get_instance()->ReadFile("data/" + filename);
 	if (!fontids) {
-		perr << "Failed to open TTF: @data/" << filename << Std::endl;
+		perr << "Failed to open TTF: data/" << filename << Std::endl;
 		return nullptr;
 	}
 
diff --git a/engines/ultima/ultima8/gumps/movie_gump.cpp b/engines/ultima/ultima8/gumps/movie_gump.cpp
index 2c874f8e7f..f7b95c40bc 100644
--- a/engines/ultima/ultima8/gumps/movie_gump.cpp
+++ b/engines/ultima/ultima8/gumps/movie_gump.cpp
@@ -169,12 +169,12 @@ static Std::string _fixCrusaderMovieName(const Std::string &s) {
 }
 
 static Common::SeekableReadStream *_tryLoadCruMovie(const Std::string &filename) {
-	const Std::string path = Std::string::format("@game/flics/%s.avi", filename.c_str());
+	const Std::string path = Std::string::format("flics/%s.avi", filename.c_str());
 	FileSystem *filesys = FileSystem::get_instance();
 	Common::SeekableReadStream *rs = filesys->ReadFile(path);
 	if (!rs) {
 		// Try with a "0" in the name
-		const Std::string adjustedfn = Std::string::format("@game/flics/0%s.avi", filename.c_str());
+		const Std::string adjustedfn = Std::string::format("flics/0%s.avi", filename.c_str());
 		rs = filesys->ReadFile(adjustedfn);
 		if (!rs) {
 			warning("movie %s not found", filename.c_str());
diff --git a/engines/ultima/ultima8/gumps/shape_viewer_gump.cpp b/engines/ultima/ultima8/gumps/shape_viewer_gump.cpp
index cfa2716cc5..7fcab0a5cb 100644
--- a/engines/ultima/ultima8/gumps/shape_viewer_gump.cpp
+++ b/engines/ultima/ultima8/gumps/shape_viewer_gump.cpp
@@ -308,7 +308,7 @@ void ShapeViewerGump::U8ShapeViewer() {
 	_flex.second = gamedata->getFonts();
 	_flexes.push_back(_flex);
 	FileSystem *filesys = FileSystem::get_instance();
-	Common::SeekableReadStream *eintro = filesys->ReadFile("@game/static/eintro.skf");
+	Common::SeekableReadStream *eintro = filesys->ReadFile("static/eintro.skf");
 	if (eintro) {
 		ShapeArchive *eintroshapes = new ShapeArchive(eintro, GameData::OTHER,
 		        PaletteManager::get_instance()->getPalette(PaletteManager::Pal_Game),
@@ -319,7 +319,7 @@ void ShapeViewerGump::U8ShapeViewer() {
 		// !! memory leak
 	}
 
-	Common::SeekableReadStream *endgame = filesys->ReadFile("@game/static/endgame.skf");
+	Common::SeekableReadStream *endgame = filesys->ReadFile("static/endgame.skf");
 	if (endgame) {
 		ShapeArchive *endgameshapes = new ShapeArchive(endgame, GameData::OTHER,
 		        PaletteManager::get_instance()->getPalette(PaletteManager::Pal_Game),
diff --git a/engines/ultima/ultima8/gumps/weasel_gump.cpp b/engines/ultima/ultima8/gumps/weasel_gump.cpp
index e63af7c319..57d661c335 100644
--- a/engines/ultima/ultima8/gumps/weasel_gump.cpp
+++ b/engines/ultima/ultima8/gumps/weasel_gump.cpp
@@ -199,7 +199,7 @@ void WeaselGump::InitGump(Gump *newparent, bool take_focus) {
 }
 
 Gump *WeaselGump::playMovie(const Std::string &filename) {
-	const Std::string path = Std::string::format("@game/flics/%s.avi", filename.c_str());
+	const Std::string path = Std::string::format("flics/%s.avi", filename.c_str());
 	FileSystem *filesys = FileSystem::get_instance();
 	Common::SeekableReadStream *rs = filesys->ReadFile(path);
 	Gump *gump = new MovieGump(600, 450, rs, false);
diff --git a/engines/ultima/ultima8/misc/debugger.cpp b/engines/ultima/ultima8/misc/debugger.cpp
index 8f82349127..a66656859e 100644
--- a/engines/ultima/ultima8/misc/debugger.cpp
+++ b/engines/ultima/ultima8/misc/debugger.cpp
@@ -1751,7 +1751,7 @@ bool Debugger::cmdPlayMovie(int argc, const char **argv) {
 		return true;
 	}
 
-	Std::string filename = Common::String::format("@game/static/%s.skf", argv[1]);
+	Std::string filename = Common::String::format("static/%s.skf", argv[1]);
 	FileSystem *filesys = FileSystem::get_instance();
 	Common::SeekableReadStream *skf = filesys->ReadFile(filename);
 	if (!skf) {
diff --git a/engines/ultima/ultima8/ultima8.cpp b/engines/ultima/ultima8/ultima8.cpp
index a427519d8f..21ffac010e 100644
--- a/engines/ultima/ultima8/ultima8.cpp
+++ b/engines/ultima/ultima8/ultima8.cpp
@@ -338,10 +338,6 @@ bool Ultima8Engine::setupGame() {
 	pout << "Selected game: " << info->_name << Std::endl;
 	pout << info->getPrintDetails() << Std::endl;
 
-	// load main game data path - it needs to be empty
-	//Std::string gpath = ConfMan.get("path");
-	_fileSystem->AddVirtualPath("@game", "");
-
 	return true;
 }
 
@@ -437,8 +433,6 @@ void Ultima8Engine::shutdownGame(bool reloading) {
 	_saveCount = 0;
 	_hasCheated = false;
 
-	_fileSystem->RemoveVirtualPath("@game");
-
 	_configFileMan->clearRoot("bindings");
 	_configFileMan->clearRoot("language");
 	_configFileMan->clearRoot("weapons");




More information about the Scummvm-git-logs mailing list