2
0
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:
2016-05-12 20:13:34 -07:00
parent 62b404152f
commit 236da3ac6e
9 changed files with 102 additions and 11 deletions

View File

@@ -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;
}
}