diff options
| author | Nicholas Estelami <NEstelami@users.noreply.github.com> | 2021-05-05 13:56:39 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-05 13:56:39 -0400 |
| commit | cc52fe66109f0ae9dfec8280e439a567796db787 (patch) | |
| tree | 1f900f53a8fc39ad33d99dc9f1f67288f4ec2c03 /ZAPD/ZRoom | |
| parent | 8fc46959753b946accf56c9e410a2e9d136815d6 (diff) | |
Background array declarations now use string literal (#128)
* Initial implementation
* Fixed typo
* Minor tweaks
* Fixed merge issues
Co-authored-by: Jack Walker <7463599+Jack-Walker@users.noreply.github.com>
Diffstat (limited to 'ZAPD/ZRoom')
| -rw-r--r-- | ZAPD/ZRoom/ZRoom.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ZAPD/ZRoom/ZRoom.cpp b/ZAPD/ZRoom/ZRoom.cpp index e280f38..dcc021d 100644 --- a/ZAPD/ZRoom/ZRoom.cpp +++ b/ZAPD/ZRoom/ZRoom.cpp @@ -529,7 +529,7 @@ string ZRoom::GetSourceOutputCode(const std::string& prefix) declaration += item.second->GetSourceOutputCode(prefix); - std::string outPath = item.second->GetPoolOutPath(Globals::Instance->outputPath); + std::string outPath = item.second->GetPoolOutPath(Globals::Instance->outputPath.string()); if (Globals::Instance->verbosity >= VERBOSITY_DEBUG) printf("SAVING IMAGE TO %s\n", outPath.c_str()); @@ -590,6 +590,7 @@ Declaration::Declaration(DeclarationAlignment nAlignment, DeclarationPadding nPa varName = ""; isArray = false; arrayItemCnt = 0; + arrayItemCntStr = ""; includePath = ""; isExternal = false; references = vector<uint32_t>(); @@ -624,6 +625,16 @@ Declaration::Declaration(DeclarationAlignment nAlignment, size_t nSize, string n arrayItemCnt = nArrayItemCnt; } +Declaration::Declaration(DeclarationAlignment nAlignment, size_t nSize, string nVarType, + string nVarName, bool nIsArray, std::string nArrayItemCntStr, string nText) + : Declaration(nAlignment, DeclarationPadding::None, nSize, nText) +{ + varType = nVarType; + varName = nVarName; + isArray = nIsArray; + arrayItemCntStr = nArrayItemCntStr; +} + Declaration::Declaration(DeclarationAlignment nAlignment, size_t nSize, std::string nVarType, std::string nVarName, bool nIsArray, size_t nArrayItemCnt, std::string nText, bool nIsExternal) |
