lm_init
0x000ec8b0 · 338 bytes · __cdecl
_Z7lm_initR6TStateiPt
Decompiled
undefined (3 params)
/* lm_init(TState&, int, unsigned short*) */
void lm_init(TState *param_1,int param_2,ushort *param_3)
{
uint uVar1;
if (7 < param_2 - 1U) {
*(char **)(param_1 + 0x6afa4) = "bad pack level";
}
*(undefined4 *)(param_1 + 0x6af78) = 0;
if (*(int *)(param_1 + 0x6af70) == 0) {
*(undefined4 *)(param_1 + 0x6af78) = 1;
*(undefined4 *)(param_1 + 0x6af70) = 0x10000;
}
*(undefined4 *)(param_1 + 0x6af6c) = 0;
memset(param_1 + 0x4af70,0,0x1fffc);
*(uint *)(param_1 + 0x6af98) = (uint)*(ushort *)(configuration_table + param_2 * 8 + 2);
*(uint *)(param_1 + 0x6af9c) = (uint)*(ushort *)(configuration_table + param_2 * 8);
*(uint *)(param_1 + 0x6afa0) = (uint)*(ushort *)(configuration_table + param_2 * 8 + 4);
*(uint *)(param_1 + 0x6af94) = (uint)*(ushort *)(configuration_table + param_2 * 8 + 6);
if (param_2 < 3) {
*param_3 = *param_3 | 4;
}
else if (7 < param_2) {
*param_3 = *param_3 | 2;
}
*(undefined4 *)(param_1 + 0x6af84) = 0;
*(undefined4 *)(param_1 + 0x6af74) = 0;
uVar1 = (**(code **)(param_1 + 0xc))(param_1,param_1 + 0x1af70,0x10000);
*(uint *)(param_1 + 0x6af90) = uVar1;
if (uVar1 - 1 < 0xfffffffe) {
*(undefined4 *)(param_1 + 0x6af8c) = 0;
if (uVar1 < 0x106) {
fill_window(param_1);
}
*(uint *)(param_1 + 0x6af7c) = (uint)(byte)param_1[0x1af70] << 5 ^ (uint)(byte)param_1[0x1af71];
return;
}
*(undefined4 *)(param_1 + 0x6af8c) = 1;
*(undefined4 *)(param_1 + 0x6af90) = 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.