Skip to content

Commit

Permalink
Second inlining of values of FILENAMES.
Browse files Browse the repository at this point in the history
  • Loading branch information
BevapDin committed Nov 17, 2019
1 parent 80ef175 commit 408ceb6
Showing 1 changed file with 12 additions and 24 deletions.
36 changes: 12 additions & 24 deletions src/path_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,10 @@ void update_datadir()
{
// Shared dirs
gfxdir_value = datadir_value + "gfx/";
update_pathname( "fontdir", datadir_value + "font/" );
update_pathname( "rawdir", datadir_value + "raw/" );
update_pathname( "jsondir", datadir_value + "core/" );
update_pathname( "moddir", datadir_value + "mods/" );
update_pathname( "namesdir", datadir_value + "names/" );
update_pathname( "titledir", datadir_value + "title/" );
update_pathname( "motddir", datadir_value + "motd/" );
update_pathname( "creditsdir", datadir_value + "credits/" );
update_pathname( "data_sound", datadir_value + "sound" );
update_pathname( "helpdir", datadir_value + "help/" );

// Shared files
update_pathname( "title", FILENAMES["titledir"] + "en.title" );
Expand Down Expand Up @@ -141,16 +135,10 @@ void PATH_INFO::set_standard_filenames()
}

// Shared dirs
update_pathname( "fontdir", datadir_value + "font/" );
update_pathname( "rawdir", datadir_value + "raw/" );
update_pathname( "jsondir", datadir_value + "core/" );
update_pathname( "moddir", datadir_value + "mods/" );
update_pathname( "namesdir", datadir_value + "names/" );
update_pathname( "titledir", datadir_value + "title/" );
update_pathname( "motddir", datadir_value + "motd/" );
update_pathname( "creditsdir", datadir_value + "credits/" );
update_pathname( "data_sound", datadir_value + "sound" );
update_pathname( "helpdir", datadir_value + "help/" );

// Shared files
update_pathname( "title", FILENAMES["titledir"] + "en.title" );
Expand Down Expand Up @@ -245,11 +233,11 @@ std::string PATH_INFO::base_path()
}
std::string PATH_INFO::colors()
{
return FILENAMES["rawdir"] + "colors.json";
return datadir_value + "raw/" + "colors.json";
}
std::string PATH_INFO::color_templates()
{
return FILENAMES["rawdir"] + "color_templates/";
return datadir_value + "raw/" + "color_templates/";
}
std::string PATH_INFO::config_dir()
{
Expand Down Expand Up @@ -285,7 +273,7 @@ std::string PATH_INFO::fontdata()
}
std::string PATH_INFO::fontdir()
{
return FILENAMES["fontdir"];
return datadir_value + "font/";
}
std::string PATH_INFO::fontlist()
{
Expand All @@ -297,15 +285,15 @@ std::string PATH_INFO::graveyarddir()
}
std::string PATH_INFO::help()
{
return FILENAMES["helpdir"] + "texts.json";
return datadir_value + "help/" + "texts.json";
}
std::string PATH_INFO::keybindings()
{
return FILENAMES["rawdir"] + "keybindings.json";
return datadir_value + "raw/" + "keybindings.json";
}
std::string PATH_INFO::keybindings_vehicle()
{
return FILENAMES["rawdir"] + "keybindings/vehicle.json";
return datadir_value + "raw/" + "keybindings/vehicle.json";
}
std::string PATH_INFO::keymap()
{
Expand Down Expand Up @@ -349,11 +337,11 @@ std::string PATH_INFO::memorialdir()
}
std::string PATH_INFO::jsondir()
{
return FILENAMES["jsondir"];
return datadir_value + "core/";
}
std::string PATH_INFO::moddir()
{
return FILENAMES["moddir"];
return datadir_value + "mods/";
}
std::string PATH_INFO::options()
{
Expand All @@ -373,7 +361,7 @@ std::string PATH_INFO::savedir()
}
std::string PATH_INFO::sokoban()
{
return FILENAMES["rawdir"] + "sokoban.txt";
return datadir_value + "raw/" + "sokoban.txt";
}
std::string PATH_INFO::templatedir()
{
Expand Down Expand Up @@ -413,11 +401,11 @@ std::string PATH_INFO::tileset_conf()
}
std::string PATH_INFO::mods_replacements()
{
return FILENAMES["moddir"] + "replacements.json";
return datadir_value + "mods/" + "replacements.json";
}
std::string PATH_INFO::mods_dev_default()
{
return FILENAMES["moddir"] + "default.json";
return datadir_value + "mods/" + "default.json";
}
std::string PATH_INFO::mods_user_default()
{
Expand All @@ -433,7 +421,7 @@ std::string PATH_INFO::gfxdir()
}
std::string PATH_INFO::data_sound()
{
return FILENAMES["data_sound"];
return datadir_value + "sound";
}

std::string PATH_INFO::credits()
Expand Down

0 comments on commit 408ceb6

Please sign in to comment.