DataMapInit<CWindowPane>
0x006b6b90 · 870 bytes · __cdecl
_Z11DataMapInitI11CWindowPaneEP9datamap_tPT_
Decompiled
datamap_t * (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* datamap_t* DataMapInit<CWindowPane>(CWindowPane*) */
datamap_t * DataMapInit<CWindowPane>(CWindowPane *param_1)
{
int iVar1;
char *pcVar2;
char *pcVar3;
int iVar4;
int iVar5;
if ((DataMapInit<CWindowPane>(CWindowPane*)::nameHolder == '\0') &&
(iVar1 = __cxa_guard_acquire(&DataMapInit<CWindowPane>(CWindowPane*)::nameHolder), iVar1 != 0))
{
DataMapInit<CWindowPane>(CWindowPane*)::nameHolder = "CWindowPane";
DAT_00fe0b74 = (void *)0x0;
DAT_00fe0b78 = 0;
DAT_00fe0b7c = 0;
DAT_00fe0b80 = 0;
_DAT_00fe0b84 = (void *)0x0;
DAT_00fe0b70 = 0xb;
__cxa_guard_release(&DataMapInit<CWindowPane>(CWindowPane*)::nameHolder);
__cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
&DataMapInit<CWindowPane>(CWindowPane*)::nameHolder,&__dso_handle);
}
CWindowPane::m_DataMap._12_4_ = CBaseAnimating::m_DataMap;
if ((DataMapInit<CWindowPane>(CWindowPane*)::dataDesc != '\0') ||
(iVar1 = __cxa_guard_acquire(&DataMapInit<CWindowPane>(CWindowPane*)::dataDesc), iVar1 == 0))
goto LAB_006b6bb9;
/* try { // try from 006b6bfb to 006b6ea1 has its CatchHandler @ 006b6f2e */
pcVar2 = operator_new__(DAT_00fe0b70 + 4);
pcVar3 = stpcpy(pcVar2,DataMapInit<CWindowPane>(CWindowPane*)::nameHolder);
builtin_strncpy(pcVar3,"Die",4);
iVar4 = DAT_00fe0b80;
iVar1 = DAT_00fe0b80 + 1;
if ((DAT_00fe0b78 < iVar1) && (-1 < DAT_00fe0b7c)) {
if (DAT_00fe0b7c == 0) {
if (DAT_00fe0b78 == 0) {
if (iVar1 < 9) {
DAT_00fe0b78 = 8;
goto LAB_006b6ddf;
}
DAT_00fe0b78 = 8;
}
do {
DAT_00fe0b78 = DAT_00fe0b78 * 2;
} while (DAT_00fe0b78 < iVar1);
}
else {
for (DAT_00fe0b78 = (DAT_00fe0b80 / DAT_00fe0b7c + 1) * DAT_00fe0b7c; DAT_00fe0b78 < iVar1;
DAT_00fe0b78 = (DAT_00fe0b78 + iVar1) / 2) {
}
}
LAB_006b6ddf:
if (DAT_00fe0b74 == (void *)0x0) {
DAT_00fe0b74 = malloc(DAT_00fe0b78 << 2);
}
else {
DAT_00fe0b74 = realloc(DAT_00fe0b74,DAT_00fe0b78 << 2);
iVar1 = DAT_00fe0b80 + 1;
}
}
iVar5 = iVar4 * 4;
iVar4 = (iVar1 - iVar4) + -1;
DAT_00fe0b80 = iVar1;
_DAT_00fe0b84 = DAT_00fe0b74;
if (0 < iVar4) {
_V_memmove((void *)((int)DAT_00fe0b74 + iVar5 + 4),(void *)((int)DAT_00fe0b74 + iVar5),iVar4 * 4
);
}
if ((undefined4 *)(iVar5 + (int)DAT_00fe0b74) != (undefined4 *)0x0) {
*(undefined4 *)(iVar5 + (int)DAT_00fe0b74) = pcVar2;
}
DataMapInit<CWindowPane>(CWindowPane*)::dataDesc._68_4_ = pcVar2;
pcVar2 = operator_new__(DAT_00fe0b70 + 10);
pcVar3 = stpcpy(pcVar2,DataMapInit<CWindowPane>(CWindowPane*)::nameHolder);
builtin_strncpy(pcVar3,"PaneTouch",10);
iVar4 = DAT_00fe0b80;
iVar1 = DAT_00fe0b80 + 1;
if ((DAT_00fe0b78 < iVar1) && (-1 < DAT_00fe0b7c)) {
if (DAT_00fe0b7c == 0) {
if (DAT_00fe0b78 == 0) {
if (iVar1 < 9) {
DAT_00fe0b78 = 8;
goto LAB_006b6e4f;
}
DAT_00fe0b78 = 8;
}
do {
DAT_00fe0b78 = DAT_00fe0b78 * 2;
} while (DAT_00fe0b78 < iVar1);
}
else {
for (DAT_00fe0b78 = (DAT_00fe0b80 / DAT_00fe0b7c + 1) * DAT_00fe0b7c; DAT_00fe0b78 < iVar1;
DAT_00fe0b78 = (DAT_00fe0b78 + iVar1) / 2) {
}
}
LAB_006b6e4f:
if (DAT_00fe0b74 == (void *)0x0) {
DAT_00fe0b74 = malloc(DAT_00fe0b78 << 2);
}
else {
DAT_00fe0b74 = realloc(DAT_00fe0b74,DAT_00fe0b78 << 2);
iVar1 = DAT_00fe0b80 + 1;
}
}
iVar5 = iVar4 * 4;
iVar4 = (iVar1 - iVar4) + -1;
DAT_00fe0b80 = iVar1;
_DAT_00fe0b84 = DAT_00fe0b74;
if (0 < iVar4) {
_V_memmove((void *)((int)DAT_00fe0b74 + iVar5 + 4),(void *)((int)DAT_00fe0b74 + iVar5),iVar4 * 4
);
}
if ((undefined4 *)(iVar5 + (int)DAT_00fe0b74) != (undefined4 *)0x0) {
*(undefined4 *)(iVar5 + (int)DAT_00fe0b74) = pcVar2;
}
DataMapInit<CWindowPane>(CWindowPane*)::dataDesc._132_4_ = pcVar2;
__cxa_guard_release(&DataMapInit<CWindowPane>(CWindowPane*)::dataDesc);
LAB_006b6bb9:
CWindowPane::m_DataMap._4_4_ = 2;
CWindowPane::m_DataMap._0_4_ = 0xf3a0a0;
return (datamap_t *)CWindowPane::m_DataMap;
}
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.