mirror of
https://github.com/izzy2lost/Torch.git
synced 2026-07-06 00:18:35 -07:00
limbcount reminders
This commit is contained in:
@@ -25,13 +25,14 @@ SF64::AnimData::AnimData(int16_t frameCount, int16_t limbCount, uint32_t dataOff
|
||||
|
||||
ExportResult SF64::AnimHeaderExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement) {
|
||||
const auto symbol = GetSafeNode(node, "symbol", entryName);
|
||||
auto anim = std::static_pointer_cast<SF64::AnimData>(raw);
|
||||
|
||||
if(Companion::Instance->IsOTRMode()){
|
||||
write << "static const ALIGN_ASSET(2) char " << symbol << "[] = \"__OTR__" << (*replacement) << "\";\n\n";
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
write << "extern Animation " << symbol << ";\n";
|
||||
write << "extern Animation " << symbol << "; // frames: " << std::dec << anim->mFrameCount << ", limbs: " << anim->mLimbCount + 1 << "\n";
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,11 +48,11 @@ ExportResult SF64::HitboxCodeExporter::Export(std::ostream &write, std::shared_p
|
||||
auto hitbox = std::static_pointer_cast<SF64::HitboxData>(raw);
|
||||
auto index = 0;
|
||||
auto count = hitbox->mData[index++];
|
||||
auto hasType2 = false;
|
||||
auto hasRot = false;
|
||||
|
||||
for(int type : hitbox->mTypes) {
|
||||
if(type == 2) {
|
||||
hasType2 = true;
|
||||
hasRot = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -61,7 +61,7 @@ ExportResult SF64::HitboxCodeExporter::Export(std::ostream &write, std::shared_p
|
||||
write << fourSpaceTab << count << ",\n";
|
||||
|
||||
for(int i = 0; i < (int)count; i++) {
|
||||
if(hitbox->mTypes[i] == 4) {
|
||||
if(hitbox->mTypes[i] == 4) {
|
||||
write << fourSpaceTab << "HITBOX_WHOOSH, ";
|
||||
index++;
|
||||
} else if (hitbox->mTypes[i] == 3) {
|
||||
@@ -78,7 +78,7 @@ ExportResult SF64::HitboxCodeExporter::Export(std::ostream &write, std::shared_p
|
||||
} else {
|
||||
write << " /* HITBOX_STANDARD */ ";
|
||||
}
|
||||
if(hasType2 && hitbox->mTypes[i] != 2) {
|
||||
if(hasRot && hitbox->mTypes[i] != 2) {
|
||||
for(int j = 0; j < 7; j++) {
|
||||
write << fourSpaceTab;
|
||||
}
|
||||
|
||||
@@ -17,13 +17,15 @@ SF64::LimbData::LimbData(uint32_t addr, uint32_t dList, Vec3f trans, Vec3s rot,
|
||||
|
||||
ExportResult SF64::SkeletonHeaderExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement) {
|
||||
const auto symbol = GetSafeNode(node, "symbol", entryName);
|
||||
auto skeleton = std::static_pointer_cast<SF64::SkeletonData>(raw);
|
||||
auto limbCount = skeleton->mSkeleton.size();
|
||||
|
||||
if(Companion::Instance->IsOTRMode()){
|
||||
write << "static const ALIGN_ASSET(2) char " << symbol << "[] = \"__OTR__" << (*replacement) << "\";\n\n";
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
write << "extern Limb* " << symbol << "[];\n";
|
||||
write << "extern Limb* " << symbol << "[" << std::dec << limbCount + 1 << "];\n";
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user