CSheetSimulator::Init
0x004af450 · 368 bytes · __thiscall
_ZN15CSheetSimulator4InitEiii
Decompiled
undefined (4 params)
/* CSheetSimulator::Init(int, int, int) */
void __thiscall CSheetSimulator::Init(CSheetSimulator *this,int param_1,int param_2,int param_3)
{
void *pvVar1;
uint uVar2;
int iVar3;
int iVar4;
int iVar5;
*(undefined4 *)(this + 0x98) = 0;
*(int *)(this + 4) = param_2;
*(int *)this = param_1;
*(undefined4 *)(this + 0x9c) = 0;
*(undefined4 *)(this + 0xa0) = 0;
uVar2 = 0xffffffff;
if ((uint)(param_1 * param_2) < 0x2700001) {
uVar2 = param_1 * param_2 * 0x34;
}
pvVar1 = operator_new__(uVar2);
*(int *)(this + 0x10) = param_3;
*(void **)(this + 8) = pvVar1;
if (param_3 != 0) {
if ((uint)param_3 < 0xaa00001) {
pvVar1 = operator_new__(param_3 * 0xc);
*(void **)(this + 0x14) = pvVar1;
pvVar1 = operator_new__(param_3 * 0xc);
*(void **)(this + 0x18) = pvVar1;
if ((uint)param_3 < 0x6600001) {
uVar2 = param_3 * 0x14;
}
else {
uVar2 = 0xffffffff;
}
}
else {
pvVar1 = operator_new__(0xffffffff);
*(void **)(this + 0x14) = pvVar1;
pvVar1 = operator_new__(0xffffffff);
*(void **)(this + 0x18) = pvVar1;
uVar2 = 0xffffffff;
}
pvVar1 = operator_new__(uVar2);
*(void **)(this + 0x90) = pvVar1;
pvVar1 = operator_new__(param_3);
*(void **)(this + 0x94) = pvVar1;
}
iVar3 = 0;
iVar4 = 0;
*(undefined4 *)(this + 0x60) = 0;
*(undefined4 *)(this + 100) = 0;
*(undefined4 *)(this + 0x68) = 0;
if (0 < *(int *)this * *(int *)(this + 4)) {
do {
iVar4 = iVar4 + 1;
*(undefined4 *)(*(int *)(this + 8) + iVar3) = 0x3f800000;
*(undefined4 *)(*(int *)(this + 8) + 0x28 + iVar3) = 0;
iVar5 = *(int *)(this + 8) + iVar3;
*(undefined4 *)(iVar5 + 4) = 0;
*(undefined4 *)(iVar5 + 8) = 0;
*(undefined4 *)(iVar5 + 0xc) = 0;
iVar5 = *(int *)(this + 8) + iVar3;
iVar3 = iVar3 + 0x34;
*(undefined4 *)(iVar5 + 0x10) = 0;
*(undefined4 *)(iVar5 + 0x14) = 0;
*(undefined4 *)(iVar5 + 0x18) = 0;
} while (iVar4 < *(int *)this * *(int *)(this + 4));
}
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.