CFuncElevator::CFuncElevator
0x0044e090 · 387 bytes · __thiscall
_ZN13CFuncElevatorC2Ev
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CFuncElevator::CFuncElevator() */
void __thiscall CFuncElevator::CFuncElevator(CFuncElevator *this)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
CBaseToggle::CBaseToggle((CBaseToggle *)this);
*(undefined ***)this = &PTR__CFuncElevator_00c8d8a8;
*(undefined4 *)(this + 0x504) = 0xffffffff;
iVar1 = DAT_00f7a148;
*(undefined4 *)(this + 0x510) = 0;
iVar3 = _DAT_00f7a140;
*(undefined4 *)(this + 0x51c) = 0xffffffff;
*(undefined4 *)(this + 0x520) = 0;
*(undefined4 *)(this + 0x528) = 0;
iVar2 = iVar1 + 1;
*(undefined4 *)(this + 0x534) = 0xffffffff;
*(undefined4 *)(this + 0x538) = 0;
*(undefined4 *)(this + 0x540) = 0;
*(undefined4 *)(this + 0x544) = 0;
*(undefined4 *)(this + 0x548) = 0;
*(undefined4 *)(this + 0x54c) = 0;
*(undefined4 *)(this + 0x550) = 0;
if ((iVar2 <= iVar3) || (DAT_00f7a144 < 0)) goto LAB_0044e139;
if (DAT_00f7a144 == 0) {
if (iVar3 == 0) {
if (iVar2 < 9) {
iVar3 = 8;
goto LAB_0044e186;
}
iVar3 = 8;
}
do {
iVar3 = iVar3 * 2;
} while (iVar3 < iVar2);
}
else {
for (iVar3 = (iVar1 / DAT_00f7a144 + 1) * DAT_00f7a144; iVar3 < iVar2;
iVar3 = (iVar3 + iVar2) / 2) {
}
}
LAB_0044e186:
_DAT_00f7a140 = iVar3;
if (s_Elevators == (void *)0x0) {
s_Elevators = malloc(iVar3 << 2);
}
else {
s_Elevators = realloc(s_Elevators,iVar3 << 2);
iVar2 = DAT_00f7a148 + 1;
}
LAB_0044e139:
iVar4 = iVar1 * 4;
iVar3 = (iVar2 - iVar1) + -1;
DAT_00f7a148 = iVar2;
_DAT_00f7a14c = s_Elevators;
if (0 < iVar3) {
/* try { // try from 0044e1cd to 0044e1d1 has its CatchHandler @ 0044e224 */
_V_memmove((void *)((int)s_Elevators + iVar4 + 4),(void *)((int)s_Elevators + iVar4),iVar3 * 4);
}
if ((undefined4 *)(iVar4 + (int)s_Elevators) != (undefined4 *)0x0) {
*(undefined4 *)(iVar4 + (int)s_Elevators) = this;
}
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.