L L4D2node

Mod_LoadVertNormalIndices

0x00196ba0 · 288 bytes · unknown

_Z25Mod_LoadVertNormalIndicesv

Decompiled

undefined (0 params)

/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* Mod_LoadVertNormalIndices() */

void Mod_LoadVertNormalIndices(void)

{
  int iVar1;
  int iVar2;
  undefined1 *puVar3;
  char *pcVar4;
  void *__dest;
  int iVar5;
  int iVar6;
  uint uVar7;
  int iVar8;
  int in_GS_OFFSET;
  uint local_140 [3];
  int local_134;
  void *local_130;
  int local_128;
  undefined1 local_124 [260];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  CMapLoadHelper::CMapLoadHelper((CMapLoadHelper *)local_140,0x1f);
  uVar7 = local_140[0] >> 1;
  puVar3 = s_szMapPathName;
  if ((&s_MapLumpFiles)[local_128 * 7] != 0) {
    puVar3 = local_124;
  }
                    /* try { // try from 00196c12 to 00196c30 has its CatchHandler @ 00196cbb */
  pcVar4 = (char *)va("%s [%s]",puVar3,"vertnormalindices");
  __dest = (void *)Hunk_AllocName(local_140[0],pcVar4,true);
  memcpy(__dest,local_130,local_140[0]);
  iVar2 = s_pMap;
  iVar1 = *(int *)(s_pMap + 0x70);
  *(uint *)(s_pMap + 0x3c) = uVar7;
  iVar8 = 0;
  *(void **)(iVar2 + 0x40) = __dest;
  iVar5 = 0;
  if (0 < iVar1) {
    do {
      iVar1 = *(int *)(iVar2 + 0x78);
      iVar6 = iVar5 + 1;
      *(int *)(*(int *)(iVar2 + 0x80) + (iVar5 * 0x20 >> 5) * 4) = iVar8;
      iVar8 = iVar8 + (*(uint *)(iVar1 + iVar5 * 0x20) >> 0x18);
      iVar5 = iVar6;
    } while (iVar6 < *(int *)(iVar2 + 0x70));
  }
  if (local_134 != 0) {
    (**(code **)(*g_pFileSystem + 0x150))(g_pFileSystem,local_134);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)