L L4D2node

GeneratePolygonIndexBuffer

0x002816e0 · 74 bytes · __regparm1

_Z26GeneratePolygonIndexBufferPtii

Decompiled

undefined (3 params)

/* GeneratePolygonIndexBuffer(unsigned short*, int, int) */

ushort * __regparm1 GeneratePolygonIndexBuffer(ushort *param_1,int param_2,int param_3)

{
  undefined2 *puVar1;
  undefined2 *puVar2;
  int in_stack_0000000c;
  
  if (param_2 != 0) {
    param_1 = (ushort *)(param_3 * 0x55555556);
    if (0 < param_3 / 3) {
      param_1 = (ushort *)(in_stack_0000000c + 1);
      puVar1 = (undefined2 *)param_2;
      do {
        puVar1[1] = (short)param_1;
        param_1 = (ushort *)((int)param_1 + 1);
        puVar2 = puVar1 + 3;
        *puVar1 = (short)in_stack_0000000c;
        puVar1[2] = (short)param_1;
        puVar1 = puVar2;
      } while (puVar2 != (undefined2 *)(param_2 + (param_3 / 3) * 6));
    }
  }
  return param_1;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)