CSentence::ParseWords
0x000de0e0 · 872 bytes · __thiscall
_ZN9CSentence10ParseWordsER10CUtlBuffer
Decompiled
undefined (2 params)
/* CSentence::ParseWords(CUtlBuffer&) */
void __thiscall CSentence::ParseWords(CSentence *this,CUtlBuffer *param_1)
{
int iVar1;
CWordTag *this_00;
long lVar2;
CPhonemeTag *this_01;
int in_GS_OFFSET;
double dVar3;
double dVar4;
CWordTag *local_1228;
CPhonemeTag *local_1224;
char local_1220 [256];
char local_1120 [256];
char local_1020 [4096];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
while( true ) {
CUtlBuffer::GetString(param_1,local_1020,0x1000);
iVar1 = _V_stricmp(local_1020,"}");
if ((iVar1 == 0) || (iVar1 = _V_stricmp(local_1020,"WORD"), iVar1 != 0)) break;
CUtlBuffer::GetString(param_1,local_1020,0x1000);
V_strncpy(local_1220,local_1020,0x100);
CUtlBuffer::GetString(param_1,local_1020,0x1000);
dVar3 = strtod(local_1020,(char **)0x0);
CUtlBuffer::GetString(param_1,local_1020,0x1000);
dVar4 = strtod(local_1020,(char **)0x0);
this_00 = operator_new(0x2c);
/* try { // try from 000de221 to 000de225 has its CatchHandler @ 000de443 */
CWordTag::CWordTag(this_00,local_1220);
*(float *)this_00 = (float)dVar3;
*(float *)(this_00 + 4) = (float)dVar4;
local_1228 = this_00;
CUtlVector<CWordTag*,CUtlMemory<CWordTag*,int>>::InsertBefore
((CUtlVector<CWordTag*,CUtlMemory<CWordTag*,int>> *)(this + 4),*(int *)(this + 0x10),
&local_1228);
CUtlBuffer::GetString(param_1,local_1020,0x1000);
iVar1 = _V_stricmp(local_1020,"{");
if (iVar1 != 0) break;
while( true ) {
CUtlBuffer::GetString(param_1,local_1020,0x1000);
iVar1 = _V_stricmp(local_1020,"}");
if (iVar1 == 0) break;
lVar2 = strtol(local_1020,(char **)0x0,10);
CUtlBuffer::GetString(param_1,local_1020,0x1000);
V_strncpy(local_1120,local_1020,0x100);
CUtlBuffer::GetString(param_1,local_1020,0x1000);
dVar3 = strtod(local_1020,(char **)0x0);
CUtlBuffer::GetString(param_1,local_1020,0x1000);
dVar4 = strtod(local_1020,(char **)0x0);
CUtlBuffer::GetString(param_1,local_1020,0x1000);
strtod(local_1020,(char **)0x0);
this_01 = operator_new(0x18);
*(undefined4 *)this_01 = 0;
*(undefined4 *)(this_01 + 4) = 0;
*(undefined4 *)(this_01 + 0x14) = 0;
*(short *)(this_01 + 8) = (short)lVar2;
*(undefined4 *)(this_01 + 0xc) = 0;
*(undefined4 *)(this_01 + 0x10) = 0;
this_01[10] = (CPhonemeTag)0x0;
CPhonemeTag::SetTag(this_01,local_1120);
*(float *)this_01 = (float)dVar3;
*(float *)(this_01 + 4) = (float)dVar4;
local_1224 = this_01;
CUtlVector<CPhonemeTag*,CUtlMemory<CPhonemeTag*,int>>::InsertBefore
((CUtlVector<CPhonemeTag*,CUtlMemory<CPhonemeTag*,int>> *)(this_00 + 8),
*(int *)(this_00 + 0x14),&local_1224);
}
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
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.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.