L L4D2node

CBitWrite::StartWriting

0x002557e0 · 74 bytes · __thiscall

_ZN9CBitWrite12StartWritingEPviii

Decompiled

undefined (5 params)

/* CBitWrite::StartWriting(void*, int, int, int) */

void __thiscall
CBitWrite::StartWriting(CBitWrite *this,void *param_1,int param_2,int param_3,int param_4)

{
  *(void **)(this + 0x20) = param_1;
  *(void **)(this + 0x18) = param_1;
  *(int *)(this + 0xc) = param_2;
  if (param_4 == -1) {
    *(int *)(this + 8) = param_2 * 8;
  }
  else {
    *(int *)(this + 8) = param_4;
  }
  this[4] = (CBitWrite)0x0;
  *(undefined4 *)(this + 0x10) = 0;
  *(undefined4 *)(this + 0x14) = 0x20;
  *(uint *)(this + 0x1c) = (int)param_1 + (param_2 & 0xfffffffcU);
  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)