CSheetExtended::LoadFromMaterial
0x00bdf880 · 191 bytes · __thiscall
_ZN14CSheetExtended16LoadFromMaterialEP9IMaterial
Decompiled
undefined (2 params)
/* CSheetExtended::LoadFromMaterial(IMaterial*) */
void __thiscall CSheetExtended::LoadFromMaterial(CSheetExtended *this,IMaterial *param_1)
{
char cVar1;
int *piVar2;
void *pvVar3;
char local_49;
int local_48;
CUtlBuffer local_44 [56];
if (param_1 != (IMaterial *)0x0) {
local_49 = '\0';
piVar2 = (int *)(**(code **)(*(int *)param_1 + 0x2c))(param_1,"$basetexture",&local_49,1);
if ((piVar2 != (int *)0x0) && (local_49 != '\0')) {
cVar1 = (**(code **)(*piVar2 + 0x44))(piVar2);
if (cVar1 != '\0') {
piVar2 = (int *)(**(code **)*piVar2)(piVar2);
if (piVar2 != (int *)0x0) {
cVar1 = (**(code **)(*piVar2 + 0x3c))(piVar2);
if (cVar1 == '\0') {
pvVar3 = (void *)(**(code **)(*piVar2 + 0x24))(piVar2,0x10,&local_48);
if (pvVar3 != (void *)0x0) {
CUtlBuffer::CUtlBuffer(local_44,pvVar3,local_48,8);
/* try { // try from 00bdf930 to 00bdf934 has its CatchHandler @ 00bdf942 */
LoadFromBuffer(this,local_44);
CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_44);
}
}
}
}
}
}
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.