diff options
author | Marcus Huderle <huderlem@gmail.com> | 2018-09-11 17:39:20 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-11 17:39:20 -0500 |
commit | 53adea30ccb31e355297a44bba612d88b7620b55 (patch) | |
tree | e4631b4dd877db529c439b809ae146cd04db78e9 /tools/scaninc/c_file.cpp | |
parent | 2b881cce384dfee18d0e671b6a8df3ebfc74a378 (diff) |
Update scaninc and preproc with multi-file incbins (ported from pokeemerald) (#685)
Diffstat (limited to 'tools/scaninc/c_file.cpp')
-rw-r--r-- | tools/scaninc/c_file.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/tools/scaninc/c_file.cpp b/tools/scaninc/c_file.cpp index f7acc833f..d470f959d 100644 --- a/tools/scaninc/c_file.cpp +++ b/tools/scaninc/c_file.cpp @@ -244,18 +244,27 @@ void CFile::CheckIncbin() m_pos++; - SkipWhitespace(); + while (true) + { + SkipWhitespace(); - std::string path = ReadPath(); + std::string path = ReadPath(); - SkipWhitespace(); + SkipWhitespace(); + + m_incbins.emplace(path); + + if (m_buffer[m_pos] != ',') + break; + + m_pos++; + } if (m_buffer[m_pos] != ')') FATAL_INPUT_ERROR("expected ')'"); m_pos++; - m_incbins.emplace(path); } std::string CFile::ReadPath() |