2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-04-25 05:46:28 +00:00
|
|
|
|
|
|
|
#include "RetroTypes.hpp"
|
2017-10-25 07:47:49 +00:00
|
|
|
#include <unordered_map>
|
2016-04-25 05:46:28 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
enum class EStateMsg
|
|
|
|
{
|
2017-03-31 19:51:40 +00:00
|
|
|
One = 1,
|
2018-09-14 00:49:34 +00:00
|
|
|
Two = 2,
|
2017-03-31 19:51:40 +00:00
|
|
|
Twenty = 20
|
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
|
|
|
|
2016-04-25 05:46:28 +00:00
|
|
|
class CAiFuncMap
|
|
|
|
{
|
2016-08-15 20:43:04 +00:00
|
|
|
static const std::vector<std::string> gkStateNames;
|
2016-05-18 03:57:43 +00:00
|
|
|
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:
|
|
|
|
CAiFuncMap();
|
|
|
|
CAiStateFunc GetStateFunc(const char*);
|
|
|
|
CAiTriggerFunc GetTriggerFunc(const char*);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|