diff options
Diffstat (limited to 'ZAPD/ZFile.cpp')
| -rw-r--r-- | ZAPD/ZFile.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ZAPD/ZFile.cpp b/ZAPD/ZFile.cpp index 22a6a45..d9733f3 100644 --- a/ZAPD/ZFile.cpp +++ b/ZAPD/ZFile.cpp @@ -406,7 +406,7 @@ void ZFile::AddResource(ZResource* res) resources.push_back(res); } -ZResource* ZFile::FindResource(uint32_t rawDataIndex) +ZResource* ZFile::FindResource(offset_t rawDataIndex) { for (ZResource* res : resources) { @@ -776,6 +776,11 @@ void ZFile::GenerateSourceHeaderFiles() { OutputFormatter formatter; + std::string objectNameUpper = StringHelper::ToUpper(GetName()); + + formatter.Write(StringHelper::Sprintf("#ifndef %s_H\n#define %s_H 1\n\n", + objectNameUpper.c_str(), objectNameUpper.c_str())); + for (ZResource* res : resources) { std::string resSrc = res->GetSourceOutputHeader(""); @@ -792,6 +797,8 @@ void ZFile::GenerateSourceHeaderFiles() formatter.Write(ProcessExterns()); + formatter.Write("#endif\n"); + fs::path headerFilename = GetSourceOutputFolderPath() / outName.stem().concat(".h"); if (Globals::Instance->verbosity >= VerbosityLevel::VERBOSITY_INFO) |
