CCurveData::Parse
0x00bb4740 · 812 bytes · __thiscall
_ZN10CCurveData5ParseEP20ISceneTokenProcessorP18ICurveDataAccessor
Decompiled
undefined (3 params)
/* CCurveData::Parse(ISceneTokenProcessor*, ICurveDataAccessor*) */
void __thiscall
CCurveData::Parse(CCurveData *this,ISceneTokenProcessor *param_1,ICurveDataAccessor *param_2)
{
byte bVar1;
undefined1 uVar2;
char cVar3;
char *pcVar4;
int iVar5;
float *pfVar6;
int iVar7;
uint uVar8;
int iVar9;
double dVar10;
double dVar11;
int local_30 [8];
Clear(this);
(**(code **)(*(int *)param_1 + 4))(param_1,1);
pcVar4 = (char *)(*(code *)**(undefined4 **)param_1)(param_1);
iVar5 = _V_stricmp(pcVar4,"leftedge");
if (iVar5 == 0) {
CChoreoScene::ParseEdgeInfo(param_1,(EdgeInfo_t *)(this + 0x14));
}
pcVar4 = (char *)(*(code *)**(undefined4 **)param_1)(param_1);
iVar5 = _V_stricmp(pcVar4,"rightedge");
if (iVar5 == 0) {
CChoreoScene::ParseEdgeInfo(param_1,(EdgeInfo_t *)(this + 0x1b));
}
pcVar4 = (char *)(*(code *)**(undefined4 **)param_1)(param_1);
iVar5 = _V_stricmp(pcVar4,"{");
if (iVar5 != 0) {
(**(code **)(*(int *)param_1 + 0xc))(param_1,"expecting {\n");
}
while( true ) {
(**(code **)(*(int *)param_1 + 4))(param_1,1);
pcVar4 = (char *)(*(code *)**(undefined4 **)param_1)(param_1);
if (*pcVar4 == '\0') break;
pcVar4 = (char *)(*(code *)**(undefined4 **)param_1)(param_1);
iVar5 = _V_stricmp(pcVar4,"}");
if (iVar5 == 0) goto LAB_00bb4a07;
local_30[0] = 0;
local_30[1] = 0;
local_30[2] = 0;
local_30[3] = 0;
local_30[4] = 0;
/* try { // try from 00bb4865 to 00bb49da has its CatchHandler @ 00bb4a70 */
pcVar4 = (char *)(*(code *)**(undefined4 **)param_1)(param_1);
dVar10 = strtod(pcVar4,(char **)0x0);
(**(code **)(*(int *)param_1 + 4))(param_1,0);
pcVar4 = (char *)(*(code *)**(undefined4 **)param_1)(param_1);
dVar11 = strtod(pcVar4,(char **)0x0);
iVar5 = CUtlVector<CExpressionSample,CUtlMemory<CExpressionSample,int>>::InsertBefore
((CUtlVector<CExpressionSample,CUtlMemory<CExpressionSample,int>> *)local_30,
local_30[3]);
pfVar6 = (float *)(local_30[0] + iVar5 * 10);
pfVar6[1] = (float)dVar10;
*pfVar6 = (float)dVar11;
cVar3 = (**(code **)(*(int *)param_1 + 8))(param_1);
if (cVar3 != '\0') {
(**(code **)(*(int *)param_1 + 4))(param_1,0);
pcVar4 = (char *)(*(code *)**(undefined4 **)param_1)(param_1);
uVar8 = Interpolator_CurveTypeForName(pcVar4);
*(char *)((int)pfVar6 + 9) = (char)(uVar8 >> 7);
*(byte *)(pfVar6 + 2) = *(byte *)(pfVar6 + 2) & 1 | (char)uVar8 * '\x02';
}
iVar5 = 0;
if (0 < local_30[3]) {
iVar9 = 0;
do {
pfVar6 = (float *)(local_30[0] + iVar5);
bVar1 = *(byte *)(pfVar6 + 2);
uVar2 = *(undefined1 *)((int)pfVar6 + 9);
iVar7 = Add(this,pfVar6[1],*pfVar6,false);
*(undefined1 *)(iVar7 + 9) = uVar2;
iVar9 = iVar9 + 1;
iVar5 = iVar5 + 10;
*(byte *)(iVar7 + 8) = *(byte *)(iVar7 + 8) & 1 | bVar1 & 0xfe;
} while (iVar9 < local_30[3]);
}
local_30[3] = 0;
CUtlMemory<CExpressionSample,int>::Purge((CUtlMemory<CExpressionSample,int> *)local_30);
local_30[4] = local_30[0];
CUtlMemory<CExpressionSample,int>::Purge((CUtlMemory<CExpressionSample,int> *)local_30);
}
(*(code *)(*(undefined4 **)param_1)[3])(param_1,"expecting ramp data\n");
LAB_00bb4a07:
Resort(this,param_2);
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.