summaryrefslogtreecommitdiff
path: root/ZAPD/ZRoom/Commands/SetEntranceList.cpp
diff options
context:
space:
mode:
authorYanis42 <35189056+Yanis42@users.noreply.github.com>2023-10-17 05:56:49 +0200
committerGitHub <noreply@github.com>2023-10-16 23:56:49 -0400
commit094e797349c86d0baef4a624962f4287aefdfef2 (patch)
treeee08bc4d0cba7fe53732d056627532bb2ffd605d /ZAPD/ZRoom/Commands/SetEntranceList.cpp
parent338e35f89afc905399ad90c952d154ae7b20bf75 (diff)
Update old names to newer ones (#305)JackMaster
* JointKey -> LegacyJointKey * CamData -> BgCamInfo * TransformData -> CurveInterpKnot * TransformUpdateIndex -> CurveAnimationHeader * SkelCurveLimbList -> CurveSkeletonHeader * LightSettings -> EnvLightSettings * EntranceEntry -> Spawn * PolygonDlist -> RoomShapeDListsEntry * PolygonType0 -> RoomShapeNormal, MeshHeader1Single -> RoomShapeImageSingle * BgImage -> RoomShapeImageMultiBgEntry * MeshHeader1Multi -> RoomShapeImageMulti PolygonDlist2 -> RoomShapeCullableEntry * PolygonType2 -> RoomShapeCullable * SCENE_CMD_MESH -> SCENE_CMD_ROOM_SHAPE * implement enum parsing + use NaviQuestHintFileId * Struct_800A57C0 -> SkinVertex * Struct_800A598C_2 -> SkinTransformation * Struct_800A5E28 -> SkinAnimatedLimbData * Struct_800A598C -> SkinLimbModif * fix MM issues * LinkAnimationHeader -> PlayerAnimationHeader (MM) * CsCameraEntry -> ActorCsCamInfo (MM) * remaining scene commands (MM) * format * removed useless comment * name skinlimb members * format * fixed indentation
Diffstat (limited to 'ZAPD/ZRoom/Commands/SetEntranceList.cpp')
-rw-r--r--ZAPD/ZRoom/Commands/SetEntranceList.cpp23
1 files changed, 16 insertions, 7 deletions
diff --git a/ZAPD/ZRoom/Commands/SetEntranceList.cpp b/ZAPD/ZRoom/Commands/SetEntranceList.cpp
index 79c87ba..3ffba0f 100644
--- a/ZAPD/ZRoom/Commands/SetEntranceList.cpp
+++ b/ZAPD/ZRoom/Commands/SetEntranceList.cpp
@@ -30,7 +30,7 @@ void SetEntranceList::ParseRawDataLate()
entrances.reserve(numEntrances);
for (uint32_t i = 0; i < numEntrances; i++)
{
- EntranceEntry entry(parent->GetRawData(), currentPtr);
+ Spawn entry(parent->GetRawData(), currentPtr);
entrances.push_back(entry);
currentPtr += 2;
@@ -55,16 +55,25 @@ void SetEntranceList::DeclareReferencesLate([[maybe_unused]] const std::string&
std::string varName =
StringHelper::Sprintf("%sEntranceList0x%06X", prefix.c_str(), segmentOffset);
- parent->AddDeclarationArray(segmentOffset, DeclarationAlignment::Align4,
- entrances.size() * 2, "EntranceEntry", varName,
- entrances.size(), declaration);
+
+ if (Globals::Instance->game != ZGame::MM_RETAIL)
+ parent->AddDeclarationArray(segmentOffset, DeclarationAlignment::Align4,
+ entrances.size() * 2, "Spawn", varName, entrances.size(),
+ declaration);
+ else
+ parent->AddDeclarationArray(segmentOffset, DeclarationAlignment::Align4,
+ entrances.size() * 2, "EntranceEntry", varName,
+ entrances.size(), declaration);
}
}
std::string SetEntranceList::GetBodySourceCode() const
{
std::string listName;
- Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "EntranceEntry", listName);
+ if (Globals::Instance->game != ZGame::MM_RETAIL)
+ Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "Spawn", listName);
+ else
+ Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "EntranceEntry", listName);
return StringHelper::Sprintf("SCENE_CMD_ENTRANCE_LIST(%s)", listName.c_str());
}
@@ -78,13 +87,13 @@ RoomCommand SetEntranceList::GetRoomCommand() const
return RoomCommand::SetEntranceList;
}
-EntranceEntry::EntranceEntry(const std::vector<uint8_t>& rawData, uint32_t rawDataIndex)
+Spawn::Spawn(const std::vector<uint8_t>& rawData, uint32_t rawDataIndex)
{
startPositionIndex = rawData.at(rawDataIndex + 0);
roomToLoad = rawData.at(rawDataIndex + 1);
}
-std::string EntranceEntry::GetBodySourceCode() const
+std::string Spawn::GetBodySourceCode() const
{
return StringHelper::Sprintf("0x%02X, 0x%02X", startPositionIndex, roomToLoad);
}