CDmxElement::UnpackBitfield<char>
0x00be8280 · 163 bytes · __thiscall
_ZNK11CDmxElement14UnpackBitfieldIcEEvPT_PK27DmxElementUnpackStructure_tPK13CDmxAttribute
Decompiled
void (4 params)
/* void CDmxElement::UnpackBitfield<char>(char*, DmxElementUnpackStructure_t const*, CDmxAttribute
const*) const */
void __thiscall
CDmxElement::UnpackBitfield<char>
(CDmxElement *this,char *param_1,DmxElementUnpackStructure_t *param_2,
CDmxAttribute *param_3)
{
byte bVar1;
byte bVar2;
byte bVar3;
int iVar4;
byte local_1d;
bVar2 = (byte)*(int *)(param_2 + 0x10);
if (*(int *)(param_2 + 0x10) == 8) {
local_1d = 0;
bVar3 = 0xff;
}
else {
bVar3 = (char)(1 << (bVar2 & 0x1f)) - 1;
local_1d = ~(byte)((int)(char)bVar3 << ((byte)*(undefined4 *)(param_2 + 0x14) & 0x1f));
}
bVar1 = ~((char)(1 << (bVar2 - 1 & 0x1f)) - 1U);
bVar2 = **(byte **)(param_3 + 8);
if ((char)bVar2 < '\0') {
if (bVar1 != (bVar2 & bVar1)) goto LAB_00be8306;
}
else if ((bVar1 & bVar2) != 0) {
LAB_00be8306:
Warning("Value %s exeeds size of datatype. \n",*(undefined4 *)param_2);
iVar4 = 0;
goto LAB_00be82e3;
}
iVar4 = (int)(char)(bVar2 & bVar3);
LAB_00be82e3:
bVar2 = *param_1;
*param_1 = local_1d & bVar2;
*param_1 = local_1d & bVar2 | (byte)(iVar4 << ((byte)*(undefined4 *)(param_2 + 0x14) & 0x1f));
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.