CModelRender::LoadStaticPropColorData
0x00188ee0 · 566 bytes · __thiscall
_ZN12CModelRender23LoadStaticPropColorDataEP13IHandleEntityP13memhandle_t__P14studiohwdata_t
Decompiled
undefined (4 params)
/* CModelRender::LoadStaticPropColorData(IHandleEntity*, memhandle_t__*, studiohwdata_t*) */
undefined4 __thiscall
CModelRender::LoadStaticPropColorData
(CModelRender *this,IHandleEntity *param_1,memhandle_t__ *param_2,studiohwdata_t *param_3)
{
undefined4 uVar1;
undefined4 *puVar2;
int iVar3;
int *piVar4;
undefined4 *puVar5;
char **ppcVar6;
int in_GS_OFFSET;
byte bVar7;
char *pcVar8;
char *local_154 [4];
code *local_144;
undefined4 *local_140;
undefined4 local_13c;
undefined *local_134;
undefined4 local_12c;
char local_124 [260];
int local_20;
bVar7 = 0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if ((g_bLoadedMapHasBakedPropLighting != '\0') &&
(*(int *)(r_proplightingfromdisk._28_4_ + 0x30) != 0)) {
puVar2 = (undefined4 *)(**(code **)(**(int **)(this + 8) + 0x28))(*(int **)(this + 8),param_2);
if (puVar2 != (undefined4 *)0x0) {
if (puVar2[4] == 0) {
iVar3 = (**(code **)(*g_pMaterialSystemHardwareConfig + 0x8c))
(g_pMaterialSystemHardwareConfig);
if ((iVar3 == 0) || (g_bBakedPropLightingNoSeparateHDR != '\0')) {
piVar4 = (int *)StaticPropMgr();
uVar1 = (**(code **)(*piVar4 + 0x30))(piVar4,param_1);
pcVar8 = "sp_%d%s.vhv";
}
else {
piVar4 = (int *)StaticPropMgr();
uVar1 = (**(code **)(*piVar4 + 0x30))(piVar4,param_1);
pcVar8 = "sp_hdr_%d%s.vhv";
}
V_snprintf(local_124,0x104,pcVar8,uVar1,&DAT_002c79d4);
*(byte *)(puVar2 + 5) = *(byte *)(puVar2 + 5) & 0xfd;
puVar5 = operator_new(0x114);
puVar5[3] = *(undefined4 *)param_3;
uVar1 = *puVar2;
*puVar5 = param_2;
puVar5[1] = puVar2;
puVar5[2] = uVar1;
V_strncpy((char *)(puVar5 + 4),local_124,0x104);
ppcVar6 = local_154;
for (iVar3 = 0xc; iVar3 != 0; iVar3 = iVar3 + -1) {
*ppcVar6 = (char *)0x0;
ppcVar6 = ppcVar6 + (uint)bVar7 * -2 + 1;
}
local_12c = 0xffff;
local_144 = ::StaticPropColorMeshCallback;
local_13c = 0xffffffff;
local_134 = &DAT_002a076d;
local_154[0] = local_124;
local_140 = puVar5;
(**(code **)(*g_pFileSystem + 0x9c))(g_pFileSystem,local_154,1,puVar2 + 4);
uVar1 = 1;
}
else {
(**(code **)(**(int **)(this + 8) + 0x2c))(*(int **)(this + 8),param_2);
uVar1 = 1;
}
goto LAB_00188f1a;
}
}
uVar1 = 0;
LAB_00188f1a:
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return uVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.