L L4D2node

DispInfo_BuildPrimLists

0x001377d0 · 520 bytes · __cdecl

_Z23DispInfo_BuildPrimListsiPP11msurface2_tibPP9CDispInfoRi

Decompiled

undefined (6 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* DispInfo_BuildPrimLists(int, msurface2_t**, int, bool, CDispInfo**, int&) */

void DispInfo_BuildPrimLists
               (int param_1,msurface2_t **param_2,int param_3,bool param_4,CDispInfo **param_5,
               int *param_6)

{
  CGroupMesh *pCVar1;
  char cVar2;
  int iVar3;
  int iVar4;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_28;
  undefined4 local_24;
  int local_20;
  
  local_34 = 0;
  local_30 = 0;
  if (_exit == 0) {
    local_20 = 0;
  }
  else {
    (**(code **)(_exit + 0x50))
              (_exit,&local_34,0,0,0,0,"/data/src/engine/./disp_interface.cpp",0x269,
               &DispInfo_BuildPrimLists(int,msurface2_t**,int,bool,CDispInfo**,int&)::tm_fmt,
               "(%s)%s","Unaccounted","DispInfo_BuildPrimLists");
    local_20 = _exit;
  }
  iVar4 = _DAT_0040b9d4;
  local_28 = local_34;
  local_24 = local_30;
                    /* try { // try from 0013797e to 001379cc has its CatchHandler @ 00137a55 */
  if (((_DAT_0040b028 != 0) || (DAT_0040b02c == '\0')) &&
     (iVar3 = ThreadGetCurrentId(), iVar4 == iVar3)) {
    if ((char *)*_DAT_0040b030 != "DispInfo_BuildPrimLists") {
      _DAT_0040b030 =
           (int *)CVProfNode::GetSubNode((char *)_DAT_0040b030,0x2acb90,&DAT_00000001,0x2a054b);
    }
    CVProfNode::EnterScope();
    DAT_0040b02c = '\0';
  }
  iVar4 = 0;
  *param_6 = 0;
  if (0 < param_3) {
    do {
      pCVar1 = *(CGroupMesh **)(param_2[iVar4] + 0x18);
                    /* try { // try from 001378b8 to 001378bc has its CatchHandler @ 001379eb */
      cVar2 = CDispInfo::Render(pCVar1,SUB41(*(undefined4 *)(pCVar1 + 0x28),0));
      if ((cVar2 != '\0') && (iVar3 = *param_6, iVar3 < 0x800)) {
        *param_6 = iVar3 + 1;
        param_5[iVar3] = (CDispInfo *)pCVar1;
      }
      iVar4 = iVar4 + 1;
    } while (iVar4 != param_3);
  }
  iVar4 = _DAT_0040b9d4;
  if (((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) &&
     (iVar3 = ThreadGetCurrentId(), iVar4 == iVar3)) {
    cVar2 = CVProfNode::ExitScope();
    if (cVar2 != '\0') {
      _DAT_0040b030 = (int *)_DAT_0040b030[0x19];
    }
    DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
  }
  if (local_20 != 0) {
    (**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
  }
  return;
}

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)