L L4D2node

Shader_Connect

0x001680c0 · 228 bytes · __cdecl

_Z14Shader_Connectb

Decompiled

undefined (1 param)

/* Shader_Connect(bool) */

bool Shader_Connect(bool param_1)

{
  int *piVar1;
  undefined4 uVar2;
  int iVar3;
  bool bVar4;
  
  bVar4 = false;
  if (materials != (int *)0x0) {
    piVar1 = (int *)CommandLine_Tier0();
    uVar2 = (**(code **)(*piVar1 + 0x1c))(piVar1,"-adapter",0);
    piVar1 = (int *)CommandLine_Tier0();
    iVar3 = (**(code **)(*piVar1 + 0x28))(piVar1,&DAT_002b06d5);
    (**(code **)(*materials + 0x1c))(materials,uVar2,(-(uint)(iVar3 == 0) & 0xfffffffc) + 6);
    if (param_1) {
      (**(code **)(*materials + 0xdc))(materials,&s_MaterialProxyFactory);
    }
    if (g_pMaterialSystemHardwareConfig == 0) {
      Sys_Error("Could not get the material system hardware config interface! (2)");
    }
    if (g_pMaterialSystemDebugTextureInfo == 0) {
      Sys_Error("Could not get the debug texture info interface!");
    }
    if (g_pMaterialSystemHardwareConfig == 0) {
      return false;
    }
    bVar4 = g_pMaterialSystemDebugTextureInfo != 0;
  }
  return bVar4;
}

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)