COverlayMgr::UnloadOverlays
0x001d2210 · 630 bytes · __thiscall
_ZN11COverlayMgr14UnloadOverlaysEv
Decompiled
undefined (1 param)
/* COverlayMgr::UnloadOverlays() */
void __thiscall COverlayMgr::UnloadOverlays(COverlayMgr *this)
{
ushort uVar1;
ushort uVar2;
int *piVar3;
uint uVar4;
uint uVar5;
int iVar6;
int iVar7;
int local_2c;
int local_28;
uVar4 = (uint)*(ushort *)(this + 0x18);
if (uVar4 != 0xffff) {
iVar6 = *(int *)(this + 0xc);
do {
piVar3 = *(int **)(iVar6 + uVar4 * 0x30);
(**(code **)(*piVar3 + 0x34))(piVar3);
iVar6 = *(int *)(this + 0xc);
uVar4 = (uint)*(ushort *)(iVar6 + 0x2e + uVar4 * 0x30);
} while (uVar4 != 0xffff);
}
iVar6 = *(int *)(this + 0x34);
local_2c = 0;
local_28 = 0;
if (0 < iVar6) {
do {
uVar4 = (uint)*(ushort *)(*(int *)(this + 0x28) + 8 + local_2c);
if (uVar4 != 0xffff) {
iVar7 = *(int *)(this + 0x58);
do {
uVar2 = *(ushort *)(iVar7 + uVar4 * 6);
uVar5 = (uint)uVar2;
if (((int)uVar5 < *(int *)(this + 0x40)) && (uVar2 <= *(ushort *)(this + 0x52))) {
iVar7 = uVar5 * 0x2c + *(int *)(this + 0x3c);
uVar1 = *(ushort *)(iVar7 + 0x28);
if (uVar2 != uVar1) {
if (uVar1 == 0xffff) {
*(undefined2 *)(this + 0x48) = *(undefined2 *)(iVar7 + 0x2a);
}
else {
*(undefined2 *)(*(int *)(this + 0x3c) + 0x2a + (uint)uVar1 * 0x2c) =
*(undefined2 *)(iVar7 + 0x2a);
}
if (*(ushort *)(iVar7 + 0x2a) == 0xffff) {
*(undefined2 *)(this + 0x4a) = *(undefined2 *)(iVar7 + 0x28);
}
else {
*(undefined2 *)
((uint)*(ushort *)(iVar7 + 0x2a) * 0x2c + *(int *)(this + 0x3c) + 0x28) =
*(undefined2 *)(iVar7 + 0x28);
}
*(ushort *)(iVar7 + 0x2a) = uVar2;
*(ushort *)(iVar7 + 0x28) = uVar2;
*(short *)(this + 0x4e) = *(short *)(this + 0x4e) + -1;
iVar7 = uVar5 * 0x2c + *(int *)(this + 0x3c);
}
}
else {
iVar7 = uVar5 * 0x2c + *(int *)(this + 0x3c);
}
*(undefined4 *)(iVar7 + 0x1c) = 0;
CUtlMemory<overlayvert_t,int>::Purge((CUtlMemory<overlayvert_t,int> *)(iVar7 + 0x10));
*(undefined4 *)(iVar7 + 0x20) = *(undefined4 *)(iVar7 + 0x10);
CUtlMemory<overlayvert_t,int>::Purge((CUtlMemory<overlayvert_t,int> *)(iVar7 + 0x10));
*(undefined2 *)(iVar7 + 0x2a) = *(undefined2 *)(this + 0x4c);
iVar7 = *(int *)(this + 0x58);
*(ushort *)(this + 0x4c) = uVar2;
uVar4 = (uint)*(ushort *)(iVar7 + 4 + uVar4 * 6);
} while (uVar4 != 0xffff);
}
local_28 = local_28 + 1;
local_2c = local_2c + 0xa8;
} while (local_28 != iVar6);
}
CUtlVector<moverlay_t,CUtlMemory<moverlay_t,int>>::RemoveAll
((CUtlVector<moverlay_t,CUtlMemory<moverlay_t,int>> *)(this + 0x28));
CUtlMemory<moverlay_t,int>::Purge((CUtlMemory<moverlay_t,int> *)(this + 0x28));
*(undefined4 *)(this + 0x38) = *(undefined4 *)(this + 0x28);
CUtlLinkedList<moverlayfragment_t,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<moverlayfragment_t,unsigned_short>,unsigned_short>>
::RemoveAll((CUtlLinkedList<moverlayfragment_t,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<moverlayfragment_t,unsigned_short>,unsigned_short>>
*)(this + 0x3c));
CUtlMemory<UtlLinkedListElem_t<moverlayfragment_t,unsigned_short>,unsigned_short>::Purge
((CUtlMemory<UtlLinkedListElem_t<moverlayfragment_t,unsigned_short>,unsigned_short> *)
(this + 0x3c));
*(undefined2 *)(this + 0x4c) = 0xffff;
*(undefined2 *)(this + 0x52) = 0xffff;
*(undefined2 *)(this + 0x50) = 0;
*(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x3c);
CUtlLinkedList<unsigned_short,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<unsigned_short,unsigned_short>,unsigned_short>>
::RemoveAll((CUtlLinkedList<unsigned_short,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<unsigned_short,unsigned_short>,unsigned_short>>
*)(this + 0x58));
CUtlMemory<UtlLinkedListElem_t<unsigned_short,unsigned_short>,unsigned_short>::Purge
((CUtlMemory<UtlLinkedListElem_t<unsigned_short,unsigned_short>,unsigned_short> *)
(this + 0x58));
*(undefined2 *)(this + 0x68) = 0xffff;
*(undefined2 *)(this + 0x6c) = 0;
*(undefined2 *)(this + 0x6e) = 0xffff;
*(undefined4 *)(this + 0x70) = *(undefined4 *)(this + 0x58);
CUtlLinkedList<COverlayMgr::RenderQueueHead_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<COverlayMgr::RenderQueueHead_t,unsigned_short>,unsigned_short>>
::RemoveAll((CUtlLinkedList<COverlayMgr::RenderQueueHead_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<COverlayMgr::RenderQueueHead_t,unsigned_short>,unsigned_short>>
*)(this + 0xc));
CUtlMemory<UtlLinkedListElem_t<COverlayMgr::RenderQueueHead_t,unsigned_short>,unsigned_short>::
Purge((CUtlMemory<UtlLinkedListElem_t<COverlayMgr::RenderQueueHead_t,unsigned_short>,unsigned_short>
*)(this + 0xc));
*(undefined2 *)(this + 0x1c) = 0xffff;
*(undefined2 *)(this + 0x20) = 0;
*(undefined2 *)(this + 0x22) = 0xffff;
*(undefined2 *)(this + 4) = 0xffff;
*(undefined2 *)(this + 6) = 0xffff;
*(undefined4 *)(this + 0x24) = *(undefined4 *)(this + 0xc);
*(undefined2 *)(this + 8) = 0xffff;
*(undefined2 *)(this + 10) = 0xffff;
return;
}
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.