L L4D2node

ComputeBytesToRead

0x00194f00 · 67 bytes · __cdecl

_Z18ComputeBytesToReadijPKc

Decompiled

undefined (3 params)

/* ComputeBytesToRead(int, unsigned int, char const*) */

int ComputeBytesToRead(int param_1,uint param_2,char *param_3)

{
  int iVar1;
  
  iVar1 = (int)((ulonglong)param_2 * (ulonglong)(uint)param_1);
  if (iVar1 >> 0x1f !=
      (int)((ulonglong)param_2 * (ulonglong)(uint)param_1 >> 0x20) + (param_1 >> 0x1f) * param_2) {
    Sys_Error("Couldn\'t load corrupted map %s",param_3);
  }
  return iVar1;
}

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)