mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 09:47:43 +00:00
Fix std::make_pair fail (why is it even a problem?)
Add CScriptPickup loader
This commit is contained in:
@@ -6,4 +6,20 @@ namespace urde
|
||||
CStateMachine::CStateMachine(CInputStream& in)
|
||||
{
|
||||
}
|
||||
|
||||
s32 CStateMachine::GetStateIndex(const std::string& state)
|
||||
{
|
||||
auto it = std::find_if(x0_states.begin(), x0_states.end(), [&state](const CAiState& st) -> bool {
|
||||
return (strncmp(st.GetName(), state.c_str(), 31) == 0);
|
||||
});
|
||||
if (it == x0_states.end())
|
||||
return 0;
|
||||
|
||||
return it - x0_states.begin();
|
||||
}
|
||||
|
||||
const std::vector<CAiState>& CStateMachine::GetStateVector() const
|
||||
{
|
||||
return x0_states;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user