mirror of
https://github.com/zeldaret/botw
synced 2026-08-09 10:52:41 -04:00
Generate stubs for queries
This commit is contained in:
@@ -40,29 +40,29 @@ const char* Query::getName() const {
|
||||
return getAIProg()->getQueries()[mDefIdx].mClassName;
|
||||
}
|
||||
|
||||
bool Query::getSInstParam(const f32** value, const sead::SafeString& param) const {
|
||||
bool Query::getStaticParam(const f32** value, const sead::SafeString& param) const {
|
||||
const auto& def = getAIProg()->getQueries()[mDefIdx];
|
||||
return getAIProg()->getSInstParam(value, def, param);
|
||||
}
|
||||
|
||||
bool Query::getDInstParam(sead::SafeString* value, const sead::SafeString& param) const {
|
||||
bool Query::getDynamicParam(sead::SafeString* value, const sead::SafeString& param) const {
|
||||
if (mParamPack.getString(value, param))
|
||||
return true;
|
||||
*value = "";
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Query::getDInstParam(const s32** value, const sead::SafeString& param) const {
|
||||
bool Query::getDynamicParam(s32** value, const sead::SafeString& param) const {
|
||||
static s32 sDefault{};
|
||||
return getDInstParam_<s32>(value, param, AIDefParamType::Int, &sDefault);
|
||||
return getDynamicParamImpl<s32>(value, param, AIDefParamType::Int, &sDefault);
|
||||
}
|
||||
|
||||
bool Query::getDInstParam(const f32** value, const sead::SafeString& param) const {
|
||||
bool Query::getDynamicParam(f32** value, const sead::SafeString& param) const {
|
||||
static f32 sDefault{};
|
||||
return getDInstParam_<f32>(value, param, AIDefParamType::Float, &sDefault);
|
||||
return getDynamicParamImpl<f32>(value, param, AIDefParamType::Float, &sDefault);
|
||||
}
|
||||
|
||||
bool Query::getDInstParam(const bool** value, const sead::SafeString& param) const {
|
||||
bool Query::getDynamicParam(bool** value, const sead::SafeString& param) const {
|
||||
static bool sDefault{};
|
||||
auto ret = static_cast<bool*>(mParamPack.getAITreeVariablePointer(param, AIDefParamType::Bool));
|
||||
*value = ret ? ret : &sDefault;
|
||||
|
||||
@@ -37,17 +37,17 @@ public:
|
||||
bool init(sead::Heap* heap);
|
||||
const char* getName() const;
|
||||
|
||||
bool getSInstParam(const f32** value, const sead::SafeString& param) const;
|
||||
bool getStaticParam(const f32** value, const sead::SafeString& param) const;
|
||||
|
||||
bool getDInstParam(sead::SafeString* value, const sead::SafeString& param) const;
|
||||
bool getDInstParam(const s32** value, const sead::SafeString& param) const;
|
||||
bool getDInstParam(const f32** value, const sead::SafeString& param) const;
|
||||
bool getDInstParam(const bool** value, const sead::SafeString& param) const;
|
||||
bool getDynamicParam(sead::SafeString* value, const sead::SafeString& param) const;
|
||||
bool getDynamicParam(s32** value, const sead::SafeString& param) const;
|
||||
bool getDynamicParam(f32** value, const sead::SafeString& param) const;
|
||||
bool getDynamicParam(bool** value, const sead::SafeString& param) const;
|
||||
|
||||
bool loadString(evfl::ParamAccessor* accessor, const sead::SafeString& param);
|
||||
bool loadInt(evfl::ParamAccessor* accessor, const sead::SafeString& param);
|
||||
bool loadFloat(evfl::ParamAccessor* accessor, const sead::SafeString& param);
|
||||
bool loadBool(evfl::ParamAccessor* accessor, const sead::SafeString& param);
|
||||
bool loadString(const evfl::ParamAccessor& accessor, const sead::SafeString& param);
|
||||
bool loadInt(const evfl::ParamAccessor& accessor, const sead::SafeString& param);
|
||||
bool loadFloat(const evfl::ParamAccessor& accessor, const sead::SafeString& param);
|
||||
bool loadBool(const evfl::ParamAccessor& accessor, const sead::SafeString& param);
|
||||
|
||||
bool getAITreeVariable(sead::SafeString** value, const sead::SafeString& param) const;
|
||||
bool getAITreeVariable(void** value, const sead::SafeString& param) const;
|
||||
@@ -66,8 +66,8 @@ protected:
|
||||
res::AIProgram* getAIProg() const;
|
||||
|
||||
template <typename T>
|
||||
bool getDInstParam_(const T** value, const sead::SafeString& param, AIDefParamType type,
|
||||
const T* default_value) const {
|
||||
bool getDynamicParamImpl(T** value, const sead::SafeString& param, AIDefParamType type,
|
||||
T* default_value) const {
|
||||
*value = static_cast<T*>(mParamPack.getAITreeVariablePointer(param, type));
|
||||
if (*value)
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user