GenerateLineLoopIndexBuffer
0x00bd7850 · 93 bytes · __cdecl
_Z27GenerateLineLoopIndexBufferPtii
Decompiled
undefined (3 params)
/* GenerateLineLoopIndexBuffer(unsigned short*, int, int) */
void GenerateLineLoopIndexBuffer(ushort *param_1,int param_2,int param_3)
{
short sVar1;
ushort uVar2;
int iVar3;
int iVar4;
if (param_1 != (ushort *)0x0) {
uVar2 = (ushort)param_3;
param_1[1] = uVar2;
iVar4 = param_2 / 2;
*param_1 = (uVar2 - 1) + (short)iVar4;
if (1 < iVar4) {
iVar3 = 1;
do {
sVar1 = (short)iVar3;
param_1[2] = (uVar2 - 1) + sVar1;
iVar3 = iVar3 + 1;
param_1[3] = uVar2 + sVar1;
param_1 = param_1 + 2;
} while (iVar3 != iVar4);
}
}
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.