mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Almost support loading sounds from server
This commit is contained in:
parent
524c78a8d6
commit
1cac1de3b2
9 changed files with 183 additions and 186 deletions
|
@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "mapnode.h" // For texture atlas making
|
||||
#include "nodedef.h" // For texture atlas making
|
||||
#include "gamedef.h"
|
||||
#include "utility_string.h"
|
||||
|
||||
/*
|
||||
A cache from texture name to texture path
|
||||
|
@ -82,7 +83,10 @@ static std::string getImagePath(std::string path)
|
|||
"pcx", "ppm", "psd", "wal", "rgb",
|
||||
NULL
|
||||
};
|
||||
|
||||
// If there is no extension, add one
|
||||
if(removeStringEnd(path, extensions) == "")
|
||||
path = path + ".png";
|
||||
// Check paths until something is found to exist
|
||||
const char **ext = extensions;
|
||||
do{
|
||||
bool r = replace_ext(path, *ext);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue