L L4D2node

SetupEdgeIncrements

0x000d0c80 · 520 bytes · __cdecl

_Z19SetupEdgeIncrementsP16CDispUtilsHelperiiR10CVertIndexS2_S2_S2_RiS3_

Decompiled

undefined (9 params)

/* SetupEdgeIncrements(CDispUtilsHelper*, int, int, CVertIndex&, CVertIndex&, CVertIndex&,
   CVertIndex&, int&, int&) */

undefined4 *
SetupEdgeIncrements(CDispUtilsHelper *param_1,int param_2,int param_3,CVertIndex *param_4,
                   CVertIndex *param_5,CVertIndex *param_6,CVertIndex *param_7,int *param_8,
                   int *param_9)

{
  short *psVar1;
  byte bVar2;
  byte bVar3;
  char cVar4;
  undefined4 *puVar5;
  char cVar6;
  int iVar7;
  undefined4 *puVar8;
  int iVar9;
  int iVar10;
  undefined4 local_20;
  
  iVar9 = (&g_EdgeDims)[param_2];
  *param_9 = (uint)(iVar9 == 0);
  iVar7 = (**(code **)(*(int *)param_1 + 4))(param_1,param_2);
  psVar1 = (short *)(iVar7 + param_3 * 6);
  if (*psVar1 == -1) {
    return (undefined4 *)0x0;
  }
  iVar10 = (int)(short)iVar9;
  puVar8 = (undefined4 *)(**(code **)(*(int *)param_1 + 0xc))(param_1,*psVar1);
  bVar2 = *(byte *)(psVar1 + 2);
  bVar3 = *(byte *)((int)psVar1 + 3);
  iVar9 = (*(code *)**(undefined4 **)param_1)(param_1);
  *(short *)(param_4 + iVar10 * 2) =
       (short)*(undefined4 *)(iVar9 + 0x28) * (&g_EdgeSideLenMul)[param_2 * 2];
  *(short *)(param_4 + (short)*param_9 * 2) = *(short *)(iVar9 + 0x2c) * (short)param_3;
  TransformIntoSubNeighbor(param_1,param_2,param_3,param_4,param_6);
  iVar9 = (*(code *)**(undefined4 **)param_1)(param_1);
  iVar9 = *(int *)(iVar9 + 0x1c);
  iVar7 = (**(code **)*puVar8)(puVar8);
  iVar7 = *(int *)(iVar7 + 0x1c) +
          *(int *)(g_ShiftInfos + (uint)bVar3 * 0x24 + (uint)bVar2 * 0xc + 4);
  *(undefined2 *)((int)&local_20 + iVar10 * 2) = 0;
  *(undefined2 *)(param_5 + iVar10 * 2) = 0;
  cVar6 = (char)iVar9;
  cVar4 = (char)iVar7;
  if (iVar9 < iVar7) {
    *(undefined2 *)(param_5 + (short)*param_9 * 2) = 1;
    *(short *)((int)&local_20 + (short)*param_9 * 2) = (short)(1 << (cVar4 - cVar6 & 0x1fU));
    cVar4 = (char)psVar1[1];
  }
  else {
    *(short *)(param_5 + (short)*param_9 * 2) = (short)(1 << (cVar6 - cVar4 & 0x1fU));
    *(undefined2 *)((int)&local_20 + (short)*param_9 * 2) = 1;
    cVar4 = (char)psVar1[1];
  }
  if (cVar4 == '\0') {
    *(undefined4 *)param_7 = local_20;
    cVar4 = *(char *)((int)psVar1 + 3);
    puVar5 = *(undefined4 **)param_1;
  }
  else {
    local_20._2_2_ = (short)((uint)local_20 >> 0x10);
    if (cVar4 == '\x01') {
      *(short *)param_7 = local_20._2_2_;
      *(short *)(param_7 + 2) = -(short)local_20;
    }
    else if (cVar4 == '\x02') {
      *(short *)param_7 = -(short)local_20;
      *(short *)(param_7 + 2) = -local_20._2_2_;
    }
    else {
      *(short *)param_7 = -local_20._2_2_;
      *(short *)(param_7 + 2) = (short)local_20;
    }
    cVar4 = *(char *)((int)psVar1 + 3);
    puVar5 = *(undefined4 **)param_1;
  }
  if (cVar4 == '\x01') {
    iVar9 = (*(code *)*puVar5)(param_1);
    *param_8 = *(int *)(iVar9 + 0x24) >> 1;
    return puVar8;
  }
  iVar9 = (*(code *)*puVar5)();
  *param_8 = *(int *)(iVar9 + 0x24) + -1;
  return puVar8;
}

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)