diff options
| author | Nicholas Estelami <NEstelami@users.noreply.github.com> | 2021-01-05 19:00:52 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-05 19:00:52 -0500 |
| commit | d205c406add5d6e2275006130ff0f182f3f5257f (patch) | |
| tree | 57c3116e5c61c64eabb2407018f32ed09415f3ae /ZAPD/ZRoom/Commands/SetTransitionActorList.cpp | |
| parent | 05be09c56e4fa3460e93ec767690c988781302d2 (diff) | |
Made a bunch of declarations static. Removed external writes to declarations dictionary. (#55)
* Fixed bug with extraction of ci4 textures
* Made a bunch of declarations static
* Avoid unnecessary copies (#46)
Pass some parameters by reference to avoid unnecessary copies.
When the parameter is intended to be copied into a member variable,
pass it by value and move it into the member instead.
This doesn't fix every occurrence of the issue but this diff is already
getting big so let's stop here for the moment.
* Removed manual writes to declarations dictionary from external classes.
Co-authored-by: Léo Lam <leo@leolam.fr>
Diffstat (limited to 'ZAPD/ZRoom/Commands/SetTransitionActorList.cpp')
| -rw-r--r-- | ZAPD/ZRoom/Commands/SetTransitionActorList.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ZAPD/ZRoom/Commands/SetTransitionActorList.cpp b/ZAPD/ZRoom/Commands/SetTransitionActorList.cpp index 9173769..b163f6e 100644 --- a/ZAPD/ZRoom/Commands/SetTransitionActorList.cpp +++ b/ZAPD/ZRoom/Commands/SetTransitionActorList.cpp @@ -38,8 +38,8 @@ string SetTransitionActorList::GenerateSourceCodePass1(string roomName, int base for (TransitionActorEntry* entry : transitionActors) declaration += StringHelper::Sprintf("\t{ %i, %i, %i, %i, %s, %i, %i, %i, %i, 0x%04X }, \n", entry->frontObjectRoom, entry->frontTransitionReaction, entry->backObjectRoom, entry->backTransitionReaction, ActorList[entry->actorNum].c_str(), entry->posX, entry->posY, entry->posZ, entry->rotY, (uint16_t)entry->initVar); - zRoom->parent->declarations[segmentOffset] = new Declaration(DeclarationAlignment::None, transitionActors.size() * 16, "TransitionActorEntry", - StringHelper::Sprintf("%sTransitionActorList0x%06X", roomName.c_str(), segmentOffset), true, declaration); + zRoom->parent->AddDeclarationArray(segmentOffset, DeclarationAlignment::None, transitionActors.size() * 16, "TransitionActorEntry", + StringHelper::Sprintf("%sTransitionActorList0x%06X", roomName.c_str(), segmentOffset), 0, declaration); return sourceOutput; } |
