DispInfo_CreateEmptyStaticBuffers
0x0013b2e0 · 354 bytes · __cdecl
_Z33DispInfo_CreateEmptyStaticBuffersP7model_tPK11ddispinfo_t
Decompiled
undefined (2 params)
/* DispInfo_CreateEmptyStaticBuffers(model_t*, ddispinfo_t const*) */
void DispInfo_CreateEmptyStaticBuffers(model_t *param_1,ddispinfo_t *param_2)
{
CDispGroup *pCVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int local_38;
int local_34;
int local_30;
int local_24;
int local_20 [4];
local_38 = 0;
if (0 < DAT_0039eb58) {
LAB_0013b300:
do {
pCVar1 = *(CDispGroup **)(g_DispGroups + local_38 * 4);
if (0 < *(int *)(pCVar1 + 0x28)) {
iVar4 = 0;
local_34 = 0;
local_30 = 0;
iVar5 = 0;
do {
while( true ) {
CalcMaxNumVertsAndIndices
(*(int *)(param_2 +
*(int *)(*(int *)(pCVar1 + 0x1c) + iVar4 * 4) * 0xb0 + 0x14),
&local_24,local_20);
iVar2 = local_24 + iVar5;
if ((iVar2 < 0x2001) && (iVar3 = local_30 + local_20[0], iVar3 < 0x2001)) break;
AddEmptyMesh(param_1,pCVar1,param_2,(int *)(*(int *)(pCVar1 + 0x1c) + local_34 * 4),
iVar4 - local_34,iVar5,local_30);
local_30 = 0;
iVar5 = 0;
local_34 = iVar4;
if (*(int *)(pCVar1 + 0x28) <= iVar4) goto LAB_0013b3e4;
}
if (iVar4 == *(int *)(pCVar1 + 0x28) + -1) {
AddEmptyMesh(param_1,pCVar1,param_2,(int *)(*(int *)(pCVar1 + 0x1c) + local_34 * 4),
(iVar4 - local_34) + 1,iVar2,iVar3);
local_38 = local_38 + 1;
if (DAT_0039eb58 <= local_38) {
return;
}
goto LAB_0013b300;
}
iVar4 = iVar4 + 1;
iVar5 = iVar2;
local_30 = iVar3;
} while (iVar4 < *(int *)(pCVar1 + 0x28));
}
LAB_0013b3e4:
local_38 = local_38 + 1;
} while (local_38 < DAT_0039eb58);
}
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.