diff options
Diffstat (limited to 'tools/src/preproc/asm_file.cpp')
| -rw-r--r-- | tools/src/preproc/asm_file.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/src/preproc/asm_file.cpp b/tools/src/preproc/asm_file.cpp index 30d6758f..283fed68 100644 --- a/tools/src/preproc/asm_file.cpp +++ b/tools/src/preproc/asm_file.cpp @@ -30,14 +30,13 @@ AsmFile::AsmFile(std::string filename) : m_filename(filename) { FILE* fp = std::fopen(filename.c_str(), "rb"); - if (fp == NULL) { - // The include might be an asset. - fp = std::fopen(("build/" + g_buildName + "/assets/" + filename).c_str(), "rb"); - - if (fp == NULL) - FATAL_ERROR("Failed to open \"%s\" for reading.\n", filename.c_str()); + for (int i = 0; fp == NULL && i < g_incPaths.size(); i++) { + fp = std::fopen((g_incPaths[i] + "/" + filename).c_str(), "rb"); } + if (fp == NULL) + FATAL_ERROR("Failed to open \"%s\" for reading.\n", filename.c_str()); + std::fseek(fp, 0, SEEK_END); m_size = std::ftell(fp); |
