2021-12-05 17:54:36 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// Custom Classes
|
|
|
|
#include "CDTable.h"
|
2022-07-09 06:07:52 +00:00
|
|
|
#include <unordered_map>
|
|
|
|
#include <unordered_set>
|
2021-12-05 17:54:36 +00:00
|
|
|
|
|
|
|
struct CDBehaviorParameter {
|
2022-12-29 09:43:52 +00:00
|
|
|
unsigned int behaviorID; //!< The Behavior ID
|
|
|
|
std::unordered_map<std::string, uint32_t>::iterator parameterID; //!< The Parameter ID
|
|
|
|
float value; //!< The value of the behavior template
|
2021-12-05 17:54:36 +00:00
|
|
|
};
|
|
|
|
|
2023-03-17 14:36:21 +00:00
|
|
|
class CDBehaviorParameterTable : public CDTable<CDBehaviorParameterTable> {
|
2021-12-05 17:54:36 +00:00
|
|
|
private:
|
2022-12-29 09:43:52 +00:00
|
|
|
std::unordered_map<uint64_t, CDBehaviorParameter> m_Entries;
|
|
|
|
std::unordered_map<std::string, uint32_t> m_ParametersList;
|
2021-12-05 17:54:36 +00:00
|
|
|
public:
|
2023-03-17 14:36:21 +00:00
|
|
|
CDBehaviorParameterTable();
|
2022-12-29 09:43:52 +00:00
|
|
|
float GetValue(const uint32_t behaviorID, const std::string& name, const float defaultValue = 0);
|
2022-07-09 06:07:52 +00:00
|
|
|
|
|
|
|
std::map<std::string, float> GetParametersByBehaviorID(uint32_t behaviorID);
|
2021-12-05 17:54:36 +00:00
|
|
|
};
|