DispInfo_CreateArray
0x00137ca0 · 211 bytes · __cdecl
_Z20DispInfo_CreateArrayi
Decompiled
undefined (1 param)
/* DispInfo_CreateArray(int) */
undefined2 * DispInfo_CreateArray(int param_1)
{
undefined2 *puVar1;
uint uVar2;
int *piVar3;
int iVar4;
int iVar5;
CDispInfo *this;
CDispInfo *local_20;
puVar1 = operator_new(0xc);
*puVar1 = 1;
*(int *)(puVar1 + 4) = param_1;
if (param_1 != 0) {
uVar2 = 0xffffffff;
if ((uint)param_1 < 0x348001) {
uVar2 = param_1 * 0x26c + 4;
}
piVar3 = operator_new__(uVar2);
local_20 = (CDispInfo *)(piVar3 + 1);
*piVar3 = param_1;
iVar5 = param_1 + -1;
this = local_20;
do {
/* try { // try from 00137d03 to 00137d07 has its CatchHandler @ 00137d89 */
CDispInfo::CDispInfo(this);
iVar5 = iVar5 + -1;
this = this + 0x26c;
} while (iVar5 != -1);
*(CDispInfo **)(puVar1 + 2) = local_20;
if (0 < param_1) {
iVar4 = 0;
iVar5 = 0;
while( true ) {
iVar5 = iVar5 + 1;
*(undefined2 **)(local_20 + iVar4 + 0x268) = puVar1;
iVar4 = iVar4 + 0x26c;
if (iVar5 == param_1) break;
local_20 = *(CDispInfo **)(puVar1 + 2);
}
}
return puVar1;
}
*(undefined4 *)(puVar1 + 2) = 0;
return puVar1;
}
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.