diff options
| author | louist103 <35883445+louist103@users.noreply.github.com> | 2021-03-20 03:45:24 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-20 03:45:24 -0400 |
| commit | 963a282dc10036f367a2cb09bb5651aefc73d2a4 (patch) | |
| tree | 1c53ce8e6ac29c138921a6876511313e5b97e74f /ZAPD/ZRoom/Commands/SetActorList.cpp | |
| parent | c8e1f444d4ce0f73a2cbed4b3abe9f1c1a496743 (diff) | |
Final Warning pass (#99)
* started on basic type errors
* Done. For now
* remove libgfxd binary
* Fix Clang Warnings
* Fix2
* Fix rollback of #92 and missed warning in ZCutscene.cpp
* ?
* add stdexcept to ZResource
* Fix make clean
* PR fixes
* Fix make file stuff
* Remove many more errors and remove -Wall
* Turns out Globals was used
* Final pass
Co-authored-by: Fig02 <fig02srl@gmail.com>
Diffstat (limited to 'ZAPD/ZRoom/Commands/SetActorList.cpp')
| -rw-r--r-- | ZAPD/ZRoom/Commands/SetActorList.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ZAPD/ZRoom/Commands/SetActorList.cpp b/ZAPD/ZRoom/Commands/SetActorList.cpp index 30ed52e..5e291eb 100644 --- a/ZAPD/ZRoom/Commands/SetActorList.cpp +++ b/ZAPD/ZRoom/Commands/SetActorList.cpp @@ -42,11 +42,11 @@ string SetActorList::GenerateSourceCodePass1(string roomName, int baseAddress) string SetActorList::GenerateSourceCodePass2(string roomName, int baseAddress) { string sourceOutput = ""; - int numActorsReal = zRoom->GetDeclarationSizeFromNeighbor(segmentOffset) / 16; + size_t numActorsReal = zRoom->GetDeclarationSizeFromNeighbor(segmentOffset) / 16; actors = vector<ActorSpawnEntry*>(); uint32_t currentPtr = segmentOffset; - for (int i = 0; i < numActorsReal; i++) + for (size_t i = 0; i < numActorsReal; i++) { ActorSpawnEntry* entry = new ActorSpawnEntry(_rawData, currentPtr); actors.push_back(entry); @@ -61,7 +61,7 @@ string SetActorList::GenerateSourceCodePass2(string roomName, int baseAddress) string declaration = ""; - int index = 0; + size_t index = 0; for (ActorSpawnEntry* entry : actors) { uint16_t actorNum = entry->actorNum; @@ -99,9 +99,9 @@ int32_t SetActorList::GetRawDataSize() return ZRoomCommand::GetRawDataSize() + ((int)actors.size() * 16); } -int SetActorList::GetActorListArraySize() +size_t SetActorList::GetActorListArraySize() { - int actorCount = 0; + size_t actorCount = 0; // Doing an else-if here so we only do the loop when the game is SW97. // Actor 0x22 is removed from SW97, so we need to ensure that we don't increment the actor count for it. @@ -115,7 +115,7 @@ int SetActorList::GetActorListArraySize() } else { - actorCount = (int)actors.size(); + actorCount = actors.size(); } return actorCount; |
