Fix MSVC warning. Refs #1838.
Remove special support for removed internal mod. This was SVN commit r13180.
This commit is contained in:
parent
5e9c408c01
commit
1e3bdc439b
Binary file not shown.
@ -25,7 +25,6 @@ Configuration:
|
||||
-conf=KEY:VALUE set a config value
|
||||
-g=F set the gamma correction to 'F' (default 1.0)
|
||||
-nosound disable audio
|
||||
-onlyPublicFiles force game to use only the public (default) mod
|
||||
-noUserMod disable loading of the user mod
|
||||
-shadows enable shadows
|
||||
-vsync enable VSync, i.e. lock FPS to monitor refresh rate
|
||||
|
@ -122,12 +122,10 @@ echo "\nRunning tests\n"
|
||||
./test || die "Test(s) failed!"
|
||||
|
||||
# Build archive(s) - don't archive the _test.* mods
|
||||
# (and we should exclude internal)
|
||||
pushd ../data/mods
|
||||
archives=""
|
||||
for modname in [a-zA-Z0-9]*
|
||||
do
|
||||
if [ "${modname}" = "internal" ]; then continue; fi
|
||||
archives="${archives} ${modname}"
|
||||
done
|
||||
popd
|
||||
|
@ -449,23 +449,19 @@ static void InitVfs(const CmdLineArgs& args)
|
||||
g_VFS = CreateVfs(cacheSize);
|
||||
|
||||
std::vector<CStr> mods = args.GetMultiple("mod");
|
||||
if (!args.Has("onlyPublicFiles"))
|
||||
mods.insert(mods.begin(), "internal");
|
||||
mods.insert(mods.begin(), "public");
|
||||
|
||||
if (!args.Has("noUserMod"))
|
||||
mods.push_back("user");
|
||||
|
||||
OsPath modArchivePath = paths.Cache()/"mods";
|
||||
OsPath modLoosePath = paths.RData()/"mods";
|
||||
OsPath modPath = paths.RData()/"mods";
|
||||
OsPath modUserPath = paths.UserData()/"mods";
|
||||
for (size_t i = 0; i < mods.size(); ++i)
|
||||
{
|
||||
size_t priority = i+1; // mods are higher priority than regular mountings, which default to priority 0
|
||||
size_t flags = VFS_MOUNT_WATCH|VFS_MOUNT_ARCHIVABLE|VFS_MOUNT_MUST_EXIST;
|
||||
OsPath modName(mods[i]);
|
||||
g_VFS->Mount(L"", modLoosePath / modName/"", flags, priority);
|
||||
g_VFS->Mount(L"", modArchivePath / modName/"", flags, priority);
|
||||
g_VFS->Mount(L"", modPath / modName/"", flags, priority);
|
||||
g_VFS->Mount(L"", modUserPath / modName/"", flags, priority);
|
||||
}
|
||||
|
||||
@ -474,9 +470,9 @@ static void InitVfs(const CmdLineArgs& args)
|
||||
g_VFS->Mount(L"saves/", paths.UserData()/"saves"/"", VFS_MOUNT_WATCH);
|
||||
const OsPath readonlyConfig = paths.RData()/"config"/"";
|
||||
// Mounting with highest priority, so that a mod supplied user.cfg is harmless
|
||||
g_VFS->Mount(L"config/", readonlyConfig, 0, -1);
|
||||
g_VFS->Mount(L"config/", readonlyConfig, 0, (size_t)-1);
|
||||
if(readonlyConfig != paths.Config())
|
||||
g_VFS->Mount(L"config/", paths.Config(), 0, -1);
|
||||
g_VFS->Mount(L"config/", paths.Config(), 0, (size_t)-1);
|
||||
|
||||
g_VFS->Mount(L"cache/", paths.Cache(), VFS_MOUNT_ARCHIVABLE); // (adding XMBs to archive speeds up subsequent reads)
|
||||
|
||||
|
@ -126,7 +126,7 @@ Paths::Paths(const CmdLineArgs& args)
|
||||
}
|
||||
|
||||
// We don't make the game vs. user data distinction on OS X
|
||||
m_gameData = appSupportPath / "data"/"";
|
||||
m_gameData = appSupportPath /"";
|
||||
m_userData = m_gameData;
|
||||
m_cache = cachePath/"";
|
||||
m_config = appSupportPath / "config"/"";
|
||||
|
@ -13,9 +13,6 @@ sub get_filename
|
||||
{
|
||||
my ($vfspath) = @_;
|
||||
my $fn = "$vfsroot/public/simulation/templates/$vfspath.xml";
|
||||
if (not -e $fn) {
|
||||
$fn = "$vfsroot/internal/simulation/templates/$vfspath.xml";
|
||||
}
|
||||
return $fn;
|
||||
}
|
||||
|
||||
@ -125,12 +122,11 @@ sub find_entities
|
||||
my $n = $File::Find::name;
|
||||
return if /~$/;
|
||||
return unless -f $_;
|
||||
$n =~ s~\Q$vfsroot\E/(public|internal)/simulation/templates/~~;
|
||||
$n =~ s~\Q$vfsroot\E/public/simulation/templates/~~;
|
||||
$n =~ s/\.xml$//;
|
||||
push @files, $n;
|
||||
};
|
||||
find({ wanted => $find_process }, "$vfsroot/public/simulation/templates");
|
||||
find({ wanted => $find_process }, "$vfsroot/internal/simulation/templates") if -e "$vfsroot/internal";
|
||||
|
||||
return @files;
|
||||
}
|
||||
|
@ -9,7 +9,6 @@ use Entity;
|
||||
|
||||
use constant CHECK_SCENARIOS_XML => 0;
|
||||
use constant ROOT_ACTORS => 1;
|
||||
use constant INCLUDE_INTERNAL => 1;
|
||||
|
||||
my @files;
|
||||
my @roots;
|
||||
@ -21,9 +20,6 @@ sub vfs_to_physical
|
||||
{
|
||||
my ($vfspath) = @_;
|
||||
my $fn = "$vfsroot/public/$vfspath";
|
||||
if (INCLUDE_INTERNAL and not -e $fn) {
|
||||
$fn = "$vfsroot/internal/$vfspath";
|
||||
}
|
||||
return $fn;
|
||||
}
|
||||
|
||||
@ -31,9 +27,6 @@ sub vfs_to_relative_to_mods
|
||||
{
|
||||
my ($vfspath) = @_;
|
||||
my $fn = "public/$vfspath";
|
||||
if (INCLUDE_INTERNAL and not -e "$vfsroot/$fn") {
|
||||
$fn = "internal/$vfspath";
|
||||
}
|
||||
return $fn;
|
||||
}
|
||||
|
||||
@ -47,11 +40,10 @@ sub find_files
|
||||
return if /~$/;
|
||||
return unless -f $_;
|
||||
return unless /\.($extn)$/;
|
||||
$n =~ s~\Q$vfsroot\E/(public|internal)/~~;
|
||||
$n =~ s~\Q$vfsroot\E/public/~~;
|
||||
push @files, $n;
|
||||
};
|
||||
find({ wanted => $find_process }, "$vfsroot/public/$vfspath");
|
||||
find({ wanted => $find_process }, "$vfsroot/internal/$vfspath") if INCLUDE_INTERNAL and -e "$vfsroot/internal/$vfspath";
|
||||
|
||||
return @files;
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ sub find_entities
|
||||
push @files, $n;
|
||||
};
|
||||
find({ wanted => $find_process }, "$vfsroot/public/simulation/templates");
|
||||
find({ wanted => $find_process }, "$vfsroot/internal/simulation/templates") if -e "$vfsroot/internal";
|
||||
|
||||
return @files;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user