L L4D2node

UTIL_ScreenFadeBuild

0x00b2bc10 · 124 bytes · __cdecl

_Z20UTIL_ScreenFadeBuildR12ScreenFade_tRK9color32_sffi

Decompiled

undefined (5 params)

/* UTIL_ScreenFadeBuild(ScreenFade_t&, color32_s const&, float, float, int) */

void UTIL_ScreenFadeBuild
               (ScreenFade_t *param_1,color32_s *param_2,float param_3,float param_4,int param_5)

{
  undefined2 uVar1;
  int iVar2;
  int iVar3;
  
  iVar2 = (int)(param_3 * 512.0);
  iVar3 = 0;
  if ((-1 < iVar2) && (iVar3 = -1, iVar2 < 0x10000)) {
    iVar3 = iVar2;
  }
  *(short *)param_1 = (short)iVar3;
  uVar1 = 0;
  iVar3 = (int)(param_4 * 512.0);
  if ((-1 < iVar3) && (uVar1 = 0xffff, iVar3 < 0x10000)) {
    uVar1 = (undefined2)iVar3;
  }
  *(undefined2 *)(param_1 + 2) = uVar1;
  param_1[6] = *(ScreenFade_t *)param_2;
  param_1[7] = *(ScreenFade_t *)(param_2 + 1);
  param_1[8] = *(ScreenFade_t *)(param_2 + 2);
  param_1[9] = *(ScreenFade_t *)(param_2 + 3);
  *(short *)(param_1 + 4) = (short)param_5;
  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)