GenerateQuadIndexBuffer
0x00bd7700 · 165 bytes · __cdecl
_Z23GenerateQuadIndexBufferPtii
Decompiled
undefined (3 params)
/* GenerateQuadIndexBuffer(unsigned short*, int, int) */
void GenerateQuadIndexBuffer(ushort *param_1,int param_2,int param_3)
{
ushort uVar1;
int iVar2;
int iVar3;
int iVar4;
ushort *puVar5;
ushort *puVar6;
if (param_1 != (ushort *)0x0) {
iVar3 = param_2 / 6;
if (((uint)param_1 & 3) == 0) {
if (0 < iVar3) {
iVar4 = CONCAT22((ushort)param_3,(ushort)param_3) + 0x10000;
puVar5 = param_1;
do {
*(int *)puVar5 = iVar4;
puVar6 = puVar5 + 6;
*(int *)(puVar5 + 2) = iVar4 + -0xfffe;
iVar2 = iVar4 + 0x20002;
iVar4 = iVar4 + 0x40004;
*(int *)(puVar5 + 4) = iVar2;
puVar5 = puVar6;
} while (puVar6 != param_1 + iVar3 * 6);
}
}
else {
iVar4 = 0;
if (0 < iVar3) {
do {
iVar4 = iVar4 + 1;
*param_1 = (ushort)param_3;
param_1[1] = (ushort)param_3 + 1;
param_1[2] = (ushort)param_3 + 2;
param_1[4] = (ushort)param_3 + 2;
uVar1 = (ushort)param_3 + 3;
param_1[3] = (ushort)param_3;
param_3._0_2_ = (ushort)param_3 + 4;
param_1[5] = uVar1;
param_1 = param_1 + 6;
} while (iVar4 != iVar3);
return;
}
}
}
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.