mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-05-02 02:23:56 +00:00
Add new idle animations and emotes, fix root ROI duplication
Add 3 idle styles (Wobbly, Peppy, Brickster) and 3 emotes (Look Around, Headless, Toss). Fix AssignROIIndices to only let the first root-mapped node claim the root ROI, preventing prop nodes (e.g. *POPMUG01) from hiding the player via morph keys. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a588e3bb67
commit
0de220644b
@ -21,6 +21,9 @@ const char* const g_idleAnimNames[] = {
|
||||
"CNs008xx", // 0: Sway (default)
|
||||
"CNs009xx", // 1: Groove
|
||||
"CNs010xx", // 2: Excited
|
||||
"CNs008Pa", // 3: Wobbly
|
||||
"CNs009Pa", // 4: Peppy
|
||||
"CNs012Br", // 5: Brickster
|
||||
};
|
||||
const int g_idleAnimCount = sizeof(g_idleAnimNames) / sizeof(g_idleAnimNames[0]);
|
||||
|
||||
@ -30,6 +33,9 @@ const EmoteEntry g_emoteEntries[] = {
|
||||
{{{"CNs011xx", nullptr}, {nullptr, nullptr}}}, // 0: Wave (one-shot)
|
||||
{{{"CNs012xx", nullptr}, {nullptr, nullptr}}}, // 1: Hat Tip (one-shot)
|
||||
{{{"BNsDis01", "crash5"}, {"BNsAss01", nullptr}}}, // 2: Disassemble / Reassemble (multi-part)
|
||||
{{{"CNs008Br", nullptr}, {nullptr, nullptr}}}, // 3: Look Around (one-shot)
|
||||
{{{"CNs014Br", nullptr}, {nullptr, nullptr}}}, // 4: Headless (one-shot)
|
||||
{{{"CNs013Pa", nullptr}, {nullptr, nullptr}}}, // 5: Toss (one-shot)
|
||||
};
|
||||
const int g_emoteAnimCount = sizeof(g_emoteEntries) / sizeof(g_emoteEntries[0]);
|
||||
|
||||
|
||||
@ -19,7 +19,8 @@ static void AssignROIIndices(
|
||||
LegoROI* p_rootROI,
|
||||
LegoROI* p_extraROI,
|
||||
MxU32& p_nextIndex,
|
||||
std::vector<LegoROI*>& p_entries
|
||||
std::vector<LegoROI*>& p_entries,
|
||||
bool& p_rootClaimed
|
||||
)
|
||||
{
|
||||
LegoROI* roi = p_parentROI;
|
||||
@ -31,7 +32,10 @@ static void AssignROIIndices(
|
||||
|
||||
if (*name == '*' || p_parentROI == nullptr) {
|
||||
roi = p_rootROI;
|
||||
matchedROI = p_rootROI;
|
||||
if (!p_rootClaimed) {
|
||||
matchedROI = p_rootROI;
|
||||
p_rootClaimed = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
matchedROI = p_parentROI->FindChildROI(name, p_parentROI);
|
||||
@ -51,7 +55,7 @@ static void AssignROIIndices(
|
||||
}
|
||||
|
||||
for (MxS32 i = 0; i < p_node->GetNumChildren(); i++) {
|
||||
AssignROIIndices(p_node->GetChild(i), roi, p_rootROI, p_extraROI, p_nextIndex, p_entries);
|
||||
AssignROIIndices(p_node->GetChild(i), roi, p_rootROI, p_extraROI, p_nextIndex, p_entries, p_rootClaimed);
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,7 +78,8 @@ void AnimUtils::BuildROIMap(
|
||||
|
||||
MxU32 nextIndex = 1;
|
||||
std::vector<LegoROI*> entries;
|
||||
AssignROIIndices(root, nullptr, p_rootROI, p_extraROI, nextIndex, entries);
|
||||
bool rootClaimed = false;
|
||||
AssignROIIndices(root, nullptr, p_rootROI, p_extraROI, nextIndex, entries, rootClaimed);
|
||||
|
||||
if (entries.empty()) {
|
||||
return;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user