CDispCollTree::Cache
0x000ce9c0 · 706 bytes · __thiscall
_ZN13CDispCollTree5CacheEv
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CDispCollTree::Cache() */
void __thiscall CDispCollTree::Cache(CDispCollTree *this)
{
int iVar1;
char cVar2;
int iVar3;
CUtlMemory<DispCollPlaneIndex_t,int> *this_00;
int iVar4;
undefined4 local_34;
undefined4 local_30;
undefined4 local_28;
undefined4 local_24;
int local_20;
if (*(int *)(this + 0xbc) ==
((1 << ((byte)*(undefined4 *)(this + 0x28) & 0x1f)) <<
((byte)*(undefined4 *)(this + 0x28) & 0x1f)) * 2) {
return;
}
local_34 = 0;
local_30 = 0;
if (_exit == 0) {
local_20 = 0;
}
else {
(**(code **)(_exit + 0x50))
(_exit,&local_34,0,0,0,0,"/data/src/engine/../public/dispcoll_common.cpp",0x216,
&Cache()::tm_fmt,"(%s)%s","Unaccounted","CDispCollTree::Cache");
local_20 = _exit;
}
iVar1 = _DAT_0040b9d4;
local_28 = local_34;
local_24 = local_30;
/* try { // try from 000cea8c to 000cea90 has its CatchHandler @ 000cecb5 */
if (((_DAT_0040b028 != 0) || (DAT_0040b02c == '\0')) &&
(iVar3 = ThreadGetCurrentId(), iVar1 == iVar3)) {
if ((char *)*_DAT_0040b030 != "CDispCollTree::Cache") {
/* try { // try from 000cec43 to 000cec54 has its CatchHandler @ 000cecb5 */
_DAT_0040b030 =
(int *)CVProfNode::GetSubNode((char *)_DAT_0040b030,0x2a28d9,&DAT_00000001,0x2a054b);
}
CVProfNode::EnterScope();
DAT_0040b02c = '\0';
}
*(undefined4 *)(this + 0xbc) = 0;
iVar3 = (1 << ((byte)*(undefined4 *)(this + 0x28) & 0x1f)) <<
((byte)*(undefined4 *)(this + 0x28) & 0x1f);
iVar1 = iVar3 * 2;
if (iVar1 != 0) {
CUtlVector<CDispCollTriCache,CUtlMemory<CDispCollTriCache,int>>::GrowVector
((CUtlVector<CDispCollTriCache,CUtlMemory<CDispCollTriCache,int>> *)(this + 0xb0),
iVar1);
iVar4 = *(int *)(this + 0xbc) + iVar3 * -2;
if (iVar4 < 1) {
if (iVar1 < 1) goto LAB_000ceabc;
}
else {
if (iVar1 < 1) goto LAB_000ceabc;
/* try { // try from 000cec8a to 000cec8e has its CatchHandler @ 000cec94 */
_V_memmove((void *)((int)*(void **)(this + 0xb0) + iVar3 * 0x24),*(void **)(this + 0xb0),
iVar4 * 0x12);
}
iVar3 = 0;
iVar4 = 0;
do {
/* try { // try from 000ceba3 to 000ceba7 has its CatchHandler @ 000cec94 */
Cache_Create(this,(CDispCollTri *)(*(int *)(this + 0x80) + iVar4),iVar3);
iVar3 = iVar3 + 1;
iVar4 = iVar4 + 0x18;
} while (iVar3 != iVar1);
}
LAB_000ceabc:
iVar1 = DAT_00343acc;
iVar3 = 0;
if (0 < DAT_00343acc) {
iVar4 = 0;
do {
iVar4 = iVar4 + 1;
this_00 = (CUtlMemory<DispCollPlaneIndex_t,int> *)(g_DispCollPlaneIndexHash + iVar3);
iVar3 = iVar3 + 0x14;
*(undefined4 *)(this_00 + 0xc) = 0;
CUtlMemory<DispCollPlaneIndex_t,int>::Purge(this_00);
*(undefined4 *)(this_00 + 0x10) = *(undefined4 *)this_00;
} while (iVar4 != iVar1);
}
iVar1 = _DAT_0040b9d4;
if (((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) &&
(iVar3 = ThreadGetCurrentId(), iVar1 == iVar3)) {
cVar2 = CVProfNode::ExitScope();
if (cVar2 != '\0') {
_DAT_0040b030 = (int *)_DAT_0040b030[0x19];
}
DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
}
if (local_20 != 0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
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.