Skip to content

Commit

Permalink
Locate resources automatically if the map file is in a maps folder in…
Browse files Browse the repository at this point in the history
…side the resources folder
  • Loading branch information
dpjudas committed Mar 25, 2024
1 parent a6e4290 commit ea222f8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@

#include "framework/zdray.h"
#include "framework/filesystem.h"
#include "framework/file.h"
#include "wad/wad.h"
#include "level/level.h"
#include "commandline/getopt.h"
Expand Down Expand Up @@ -234,7 +235,10 @@ int main(int argc, char **argv)
fixSame = true;
}

// fileSystem.AddFolderSource("C:\\Development\\VkDoom\\build\\RelWithDebInfo\\ElderJamReignited");
// Search for texture resources with the assumption that the map is in a maps folder and the textures folder is next to it.
// To do: allow specifying the path via commandline
FString inResourceFolder = FilePath::combine(FilePath::remove_last_component(InName), "..").c_str();
fileSystem.AddFolderSource(inResourceFolder);

{
FWadReader inwad(InName);
Expand Down

0 comments on commit ea222f8

Please sign in to comment.