metaforce/Runtime/World/CAiFuncMap.hpp

25 lines
653 B
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2016-04-25 05:46:28 +00:00
#include "RetroTypes.hpp"
#include <unordered_map>
2016-04-25 05:46:28 +00:00
2018-12-08 05:30:43 +00:00
namespace urde {
enum class EStateMsg { Activate = 0, Update = 1, Deactivate = 2 };
2016-04-25 05:46:28 +00:00
class CStateManager;
class CAi;
typedef void (CAi::*CAiStateFunc)(CStateManager&, EStateMsg, float);
typedef bool (CAi::*CAiTriggerFunc)(CStateManager&, float);
2016-08-15 20:43:04 +00:00
2018-12-08 05:30:43 +00:00
class CAiFuncMap {
static const std::vector<std::string> gkStateNames;
std::unordered_map<std::string, CAiStateFunc> x0_stateFuncs;
std::unordered_map<std::string, CAiTriggerFunc> x10_triggerFuncs;
2016-04-25 05:46:28 +00:00
public:
2018-12-08 05:30:43 +00:00
CAiFuncMap();
CAiStateFunc GetStateFunc(const char*);
CAiTriggerFunc GetTriggerFunc(const char*);
2016-04-25 05:46:28 +00:00
};
2018-12-08 05:30:43 +00:00
} // namespace urde