diff options
| author | notyourav <65437533+notyourav@users.noreply.github.com> | 2022-05-17 14:35:16 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-17 14:35:16 -0700 |
| commit | 3afbd0e9012be95e687ccb36eb62f6df08cded19 (patch) | |
| tree | 00b83f84cdefeaa6d4e334d3154278589bdb76b5 /tools/src/preproc/asm_file.cpp | |
| parent | 393db92f245c93927fd402738db8a04f61e0d56d (diff) | |
| parent | aceb014a82c89fd1783dc13e7eb3cffc26ac4ca4 (diff) | |
Merge pull request #516 from hatal175/enumasm
Initial version of enum extractor script
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); |
