CDispInfo::AddShadowDecal
0x00138950 · 283 bytes · __thiscall
_ZN9CDispInfo14AddShadowDecalEt
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CDispInfo::AddShadowDecal(unsigned short) */
uint __thiscall CDispInfo::AddShadowDecal(CDispInfo *this,ushort param_1)
{
ushort uVar1;
ushort uVar2;
int iVar3;
ushort uVar4;
uint uVar5;
uint uVar6;
undefined4 *puVar7;
int iVar8;
int iVar9;
uVar5 = CUtlLinkedList<CDispShadowDecal,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CDispShadowDecal,unsigned_short>,unsigned_short>>
::AllocInternal((CUtlLinkedList<CDispShadowDecal,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CDispShadowDecal,unsigned_short>,unsigned_short>>
*)&s_DispShadowDecals,true);
uVar4 = (ushort)uVar5;
if (uVar4 == 0xffff) {
iVar8 = 0x1bffe4;
uVar6 = 0xffff;
}
else {
uVar6 = uVar5 & 0xffff;
iVar8 = uVar6 * 0x1c;
puVar7 = (undefined4 *)(iVar8 + s_DispShadowDecals);
if (puVar7 != (undefined4 *)0x0) {
*puVar7 = 0;
puVar7[1] = 0;
puVar7[2] = 0;
*(undefined1 *)(puVar7 + 3) = 2;
}
}
uVar1 = *(ushort *)(this + 0x260);
CUtlLinkedList<CDispShadowDecal,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CDispShadowDecal,unsigned_short>,unsigned_short>>
::Unlink((CUtlLinkedList<CDispShadowDecal,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CDispShadowDecal,unsigned_short>,unsigned_short>>
*)&s_DispShadowDecals,(ushort)uVar6);
iVar3 = s_DispShadowDecals;
iVar8 = iVar8 + s_DispShadowDecals;
*(ushort *)(iVar8 + 0x1a) = uVar1;
uVar2 = DAT_0039ecba;
if (uVar1 == 0xffff) {
uVar1 = uVar4;
*(ushort *)(iVar8 + 0x18) = DAT_0039ecba;
DAT_0039ecba = uVar1;
}
else {
iVar9 = (uint)uVar1 * 0x1c + iVar3;
uVar2 = *(ushort *)(iVar9 + 0x18);
*(ushort *)(iVar8 + 0x18) = uVar2;
*(ushort *)(iVar9 + 0x18) = uVar4;
}
uVar1 = uVar4;
if (uVar2 != 0xffff) {
*(ushort *)(iVar3 + 0x1a + (uint)uVar2 * 0x1c) = uVar4;
uVar1 = _DAT_0039ecb8;
}
_DAT_0039ecb8 = uVar1;
_DAT_0039ecbe = _DAT_0039ecbe + 1;
*(ushort *)(this + 0x260) = uVar4;
*(ushort *)(iVar8 + 0x12) = param_1;
*(undefined2 *)(iVar8 + 0x10) = 0;
*(undefined2 *)(iVar8 + 0xe) = 0;
*(undefined2 *)(iVar8 + 0x14) = 0xffff;
return uVar5;
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.