CSpeechScriptBridge::UnpackScriptTableToAIResponse
0x0080d320 · 292 bytes · __cdecl
_ZN19CSpeechScriptBridge29UnpackScriptTableToAIResponseEP11AI_ResponseP14AI_CriteriaSetP11CAI_ConceptP9HSCRIPT__
Decompiled
undefined (4 params)
/* CSpeechScriptBridge::UnpackScriptTableToAIResponse(AI_Response*, AI_CriteriaSet*, CAI_Concept*,
HSCRIPT__*) */
undefined4
CSpeechScriptBridge::UnpackScriptTableToAIResponse
(AI_Response *param_1,AI_CriteriaSet *param_2,CAI_Concept *param_3,HSCRIPT__ *param_4)
{
code *pcVar1;
char cVar2;
AI_Response *pAVar3;
undefined4 uVar4;
AI_ResponseScriptWrapper *in_stack_ffffffd4;
int local_1c;
HSCRIPT__ *local_18;
undefined2 local_14 [2];
undefined4 local_10;
local_1c = 0;
local_18 = (HSCRIPT__ *)0x0;
/* try { // try from 0080d343 to 0080d357 has its CatchHandler @ 0080d451 */
cVar2 = GetValueToAutoRef((CScriptAutoRef *)&local_1c,param_4,"response");
if (cVar2 == '\0') {
Warning("Didn\'t find a \'response\' field in parameter to UnpackScriptTableToAIResponse\n");
}
else {
/* try { // try from 0080d3aa to 0080d44b has its CatchHandler @ 0080d451 */
uVar4 = GetValueToAutoRef((CScriptAutoRef *)&local_18,param_4,"orig_query");
if ((char)uVar4 != '\0') {
pcVar1 = *(code **)(*g_pScriptVM + 0x68);
if (GetScriptDesc<AI_ResponseScriptWrapper>(AI_ResponseScriptWrapper*)::bInitialized == '\0')
{
GetScriptDesc<AI_ResponseScriptWrapper>(in_stack_ffffffd4);
}
pAVar3 = (AI_Response *)(*pcVar1)(g_pScriptVM,local_1c,g_AI_ResponseScriptWrapper_ScriptDesc);
AI_Response::operator=(param_1,pAVar3);
ScriptToAICriteriaSet(param_2,local_18);
AIConceptFromCriteriaSet((CSpeechScriptBridge *)local_14,param_2);
*(undefined2 *)param_3 = local_14[0];
*(undefined4 *)(param_3 + 4) = local_10;
goto LAB_0080d35a;
}
Warning("Didn\'t find a \'orig_query\' field in parameter to UnpackScriptTableToAIResponse\n");
}
uVar4 = 0;
LAB_0080d35a:
if (local_18 != (HSCRIPT__ *)0x0) {
(**(code **)(*g_pScriptVM + 0x30))(g_pScriptVM,local_18);
local_18 = (HSCRIPT__ *)0x0;
}
if (local_1c != 0) {
(**(code **)(*g_pScriptVM + 0x30))(g_pScriptVM,local_1c);
}
return uVar4;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.