CM_DecompressVis
0x0011b0c0 · 320 bytes · __cdecl
_Z16CM_DecompressVisP17CCollisionBSPDataiiPh
Decompiled
undefined (4 params)
/* CM_DecompressVis(CCollisionBSPData*, int, int, unsigned char*) */
void CM_DecompressVis(CCollisionBSPData *param_1,int param_2,int param_3,uchar *param_4)
{
uchar *puVar1;
int iVar2;
uchar *puVar3;
uchar *puVar5;
int iVar6;
uchar *puVar4;
iVar2 = *(int *)(param_1 + 0x23c);
if ((iVar2 < param_2) || (param_2 < 0)) {
iVar2 = iVar2 + 7 >> 3;
puVar3 = param_4 + iVar2;
if (iVar2 != 0) {
do {
puVar5 = param_4 + 1;
*param_4 = 0xff;
param_4 = puVar5;
} while (puVar5 != puVar3);
return;
}
}
else if ((*(int *)(param_1 + 0xd8) == 0) || (iVar6 = *(int *)(param_1 + 0xdc), iVar6 == 0)) {
iVar2 = iVar2 + 7 >> 3;
if (iVar2 != 0) {
puVar3 = param_4;
do {
puVar5 = puVar3 + 1;
*puVar3 = 0xff;
puVar3 = puVar5;
} while (puVar5 != param_4 + iVar2);
return;
}
}
else {
iVar2 = iVar2 + 7 >> 3;
puVar5 = (uchar *)(iVar6 + *(int *)(iVar6 + 4 + (param_3 + param_2 * 2) * 4));
puVar3 = param_4;
if (puVar5 != (uchar *)0x0) {
do {
while (*puVar5 == '\0') {
puVar1 = (uchar *)(uint)puVar5[1];
puVar5 = puVar5 + 2;
iVar6 = (int)puVar3 - (int)param_4;
if (iVar2 < (int)(puVar1 + iVar6)) {
puVar1 = param_4 + (iVar2 - (int)puVar3);
ConMsg("warning: Vis decompression overrun\n");
}
if (puVar1 == (uchar *)0x0) goto LAB_0011b12f;
puVar1 = puVar3 + (int)puVar1;
puVar4 = puVar3;
do {
puVar3 = puVar4 + 1;
*puVar4 = '\0';
puVar4 = puVar3;
} while (puVar3 != puVar1);
if (iVar2 <= (int)puVar3 - (int)param_4) {
return;
}
}
*puVar3 = *puVar5;
puVar5 = puVar5 + 1;
iVar6 = (int)(puVar3 + 1) - (int)param_4;
puVar3 = puVar3 + 1;
LAB_0011b12f:
if (iVar2 <= iVar6) {
return;
}
} while( true );
}
if (iVar2 != 0) {
do {
puVar5 = puVar3 + 1;
*puVar3 = 0xff;
puVar3 = puVar5;
} while (puVar5 != param_4 + iVar2);
}
}
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.