CDmxElement::UnpackBitfield<unsigned_char>
0x00be6c70 · 136 bytes · __regparm3
_ZNK11CDmxElement14UnpackBitfieldIhEEvPT_PK27DmxElementUnpackStructure_tPK13CDmxAttribute.isra.13
Decompiled
void (3 params)
/* void CDmxElement::UnpackBitfield<unsigned char>(unsigned char*, DmxElementUnpackStructure_t
const*, CDmxAttribute const*) const [clone .isra.13] */
void __regparm3
CDmxElement::UnpackBitfield<unsigned_char>
(uchar *param_1,DmxElementUnpackStructure_t *param_2,CDmxAttribute *param_3)
{
byte bVar1;
uint uVar2;
uint uVar3;
byte local_1d;
if (*(int *)(param_2 + 0x10) == 8) {
uVar3 = 0;
local_1d = 0;
uVar2 = 0xffffffff;
}
else {
uVar2 = (1 << ((byte)*(int *)(param_2 + 0x10) & 0x1f)) - 1;
uVar3 = ~(uVar2 & 0xff);
local_1d = ~(byte)((uVar2 & 0xff) << ((byte)*(undefined4 *)(param_2 + 0x14) & 0x1f));
}
if ((uVar3 & (byte)*param_3) == 0) {
uVar2 = uVar2 & (byte)*param_3;
}
else {
Warning("Value %s exeeds size of datatype. \n",*(undefined4 *)param_2);
uVar2 = 0;
}
bVar1 = *param_1;
*param_1 = local_1d & bVar1;
*param_1 = local_1d & bVar1 | (byte)(uVar2 << ((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.