CDispInfo::SpecifyDynamicMesh
0x00132aa0 · 1629 bytes · __thiscall
_ZN9CDispInfo18SpecifyDynamicMeshEv
Decompiled
undefined (1 param)
/* CDispInfo::SpecifyDynamicMesh() */
void __thiscall CDispInfo::SpecifyDynamicMesh(CDispInfo *this)
{
ushort *puVar1;
int iVar2;
undefined4 uVar3;
char cVar4;
int *piVar5;
int *piVar6;
int *piVar7;
undefined4 *puVar8;
int iVar9;
int iVar10;
undefined4 *puVar11;
int *piVar12;
byte bVar13;
int local_204 [39];
int local_168;
int local_164;
int local_160;
int local_154;
int *local_150;
undefined4 local_14c;
char local_148;
int local_144;
int local_138;
int *local_134;
int local_130;
int local_12c;
int local_128;
int local_124;
undefined4 local_120;
undefined4 local_11c;
undefined4 local_118;
undefined1 local_114;
int local_110 [3];
int local_104;
int local_100;
int local_f8;
int local_f4;
int local_f0;
int local_ec;
int local_e8;
int local_e4;
int local_e0;
int local_dc;
int local_d8;
int local_d4;
undefined4 local_c4;
uint local_c0;
undefined4 *local_bc;
undefined4 *local_b0;
int local_ac;
int local_a4 [8];
int local_84;
int local_80;
int *local_6c;
undefined1 local_68;
undefined4 local_64;
int local_60;
int local_5c;
undefined4 *local_58;
undefined4 *local_54;
int local_50;
undefined4 *local_4c [3];
int local_40;
int local_3c;
int local_38;
int local_34;
int local_30;
undefined4 local_2c;
int local_28;
int local_24;
bVar13 = 0;
piVar5 = (int *)(**(code **)(*materials + 0x180))(materials);
if (piVar5 != (int *)0x0) {
/* try { // try from 00132ace to 00132ad0 has its CatchHandler @ 00133140 */
(**(code **)(*piVar5 + 8))(piVar5);
}
/* try { // try from 00132afc to 00132b01 has its CatchHandler @ 0013313c */
piVar6 = (int *)(**(code **)(*piVar5 + 0xe8))(piVar5,1,0,0,0);
local_148 = '\0';
iVar2 = *(int *)(this + 0x20);
local_134 = (int *)0x0;
local_130 = 0;
local_12c = 0;
local_124 = 0;
local_120 = 0;
local_11c = 0xffffffff;
local_118 = 0;
local_6c = (int *)0x0;
local_28 = -1;
local_24 = 0;
local_60 = 0;
local_5c = 0;
local_64 = 0;
local_2c = 0;
local_c4 = 0xffffffff;
uVar3 = *(undefined4 *)(*(int *)(this + 0x1dc) + 0x30);
local_14c = 2;
/* try { // try from 00132bd1 to 00132f35 has its CatchHandler @ 00133108 */
local_150 = piVar6;
(**(code **)(*piVar6 + 0x30))(piVar6,2);
(**(code **)(*local_150 + 0x4c))(local_150,uVar3,iVar2,local_204);
local_130 = iVar2;
local_6c = piVar6;
piVar7 = local_204;
piVar12 = local_110;
for (iVar9 = 0x29; iVar9 != 0; iVar9 = iVar9 + -1) {
*piVar12 = *piVar7;
piVar7 = piVar7 + (uint)bVar13 * -2 + 1;
piVar12 = piVar12 + (uint)bVar13 * -2 + 1;
}
local_134 = piVar6 + 1;
local_114 = 0;
local_12c = 0;
local_128 = local_168;
local_144 = local_160;
local_124 = 0;
local_64 = uVar3;
local_60 = 0;
local_138 = local_154;
local_68 = 0;
local_c0 = ~-(uint)(local_c0 == 0) & 2;
if (local_28 == -1) {
local_2c = 0;
local_24 = local_168;
local_28 = local_164;
}
local_5c = 0;
local_54 = local_b0;
local_58 = local_bc;
piVar7 = local_a4;
do {
piVar12 = piVar7 + 1;
piVar7[0x16] = *piVar7;
piVar7 = piVar12;
} while (piVar12 != &local_84);
iVar10 = 0;
local_50 = local_ac;
iVar9 = *(int *)(*(int *)(this + 0x1dc) + 0x30);
if (0 < iVar9) {
do {
puVar8 = (undefined4 *)(iVar10 * 0x40 + *(int *)(this + 0x108));
*local_58 = *puVar8;
local_58[1] = puVar8[1];
local_58[2] = puVar8[2];
*local_4c[0] = puVar8[0xc];
local_4c[0][1] = puVar8[0xd];
*local_4c[1] = puVar8[0xe];
local_4c[1][1] = puVar8[0xf];
uVar3 = *(undefined4 *)(this + 0x30);
local_4c[2][1] = 0;
*local_4c[2] = uVar3;
*local_54 = puVar8[3];
local_54[1] = puVar8[4];
local_54[2] = puVar8[5];
puVar11 = (undefined4 *)(local_d8 * local_5c + local_84);
*puVar11 = puVar8[6];
puVar11[1] = puVar8[7];
puVar11[2] = puVar8[8];
puVar11 = (undefined4 *)(local_d4 * local_5c + local_80);
*puVar11 = puVar8[9];
puVar11[1] = puVar8[10];
puVar11[2] = puVar8[0xb];
local_5c = local_5c + 1;
if (local_60 < local_5c) {
local_60 = local_5c;
}
iVar10 = iVar10 + 1;
local_54 = (undefined4 *)((int)local_54 + local_104);
local_58 = (undefined4 *)((int)local_58 + local_110[0]);
local_50 = local_50 + local_100;
local_4c[0] = (undefined4 *)((int)local_4c[0] + local_f8);
local_4c[1] = (undefined4 *)((int)local_4c[1] + local_f4);
local_4c[2] = (undefined4 *)((int)local_4c[2] + local_f0);
local_40 = local_40 + local_ec;
local_3c = local_3c + local_e8;
local_38 = local_38 + local_e4;
local_34 = local_34 + local_e0;
local_30 = local_30 + local_dc;
} while (iVar10 != iVar9);
}
iVar9 = 0;
if (0 < *(int *)(this + 0x20)) {
do {
*(short *)(local_160 + local_124 * 2) =
((short)local_168 - *(short *)(this + 0x2c)) +
*(short *)(*(int *)(this + 0xf4) + iVar9 * 2);
local_124 = local_124 + local_154;
if (local_12c < local_124) {
local_12c = local_124;
}
iVar9 = iVar9 + 1;
} while (iVar9 < *(int *)(this + 0x20));
}
if (local_148 != '\0') {
switch(local_14c) {
case 4:
iVar9 = local_60 * 2 + -2;
break;
case 5:
iVar9 = local_60 * 2;
break;
case 6:
iVar9 = local_60 * 3 + -6;
break;
case 7:
iVar10 = local_60 * 6;
iVar9 = iVar10 + 3;
if (-1 < iVar10) {
iVar9 = iVar10;
}
iVar9 = iVar9 >> 2;
break;
default:
iVar9 = local_60;
break;
case 9:
iVar9 = 0;
}
if (local_154 != 0) {
if (iVar2 - local_124 < iVar9) {
iVar9 = iVar2 - local_124;
}
if (iVar9 != 0) {
puVar1 = (ushort *)(local_160 + local_124 * 2);
switch(local_14c) {
case 0:
case 9:
break;
default:
GenerateSequentialIndexBuffer(puVar1,iVar9,local_168);
break;
case 4:
GenerateLineStripIndexBuffer(puVar1,iVar9,local_168);
break;
case 5:
GenerateLineLoopIndexBuffer(puVar1,iVar9,local_168);
break;
case 6:
GeneratePolygonIndexBuffer(puVar1,(int)puVar1,iVar9);
break;
case 7:
/* try { // try from 00133056 to 00133102 has its CatchHandler @ 00133108 */
GenerateQuadIndexBuffer(puVar1,iVar9,local_168);
}
local_124 = local_124 + local_138 * iVar9;
if (local_12c < local_124) {
local_12c = local_124;
}
}
}
}
(**(code **)(*local_150 + 0x58))(local_150,local_60,local_12c,local_204);
local_134 = (int *)0x0;
local_130 = 0;
local_64 = 0;
local_6c = (int *)0x0;
local_c4 = 0xffffffff;
(**(code **)(*local_150 + 0x34))(local_150,0xffffffff,0);
local_150 = (int *)0x0;
if ((local_6c != (int *)0x0) && (cVar4 = (**(code **)(*local_6c + 0x10))(local_6c), cVar4 != '\0')
) {
(**(code **)(*local_6c + 0x18))(local_6c);
}
if ((local_134 != (int *)0x0) &&
(cVar4 = (**(code **)(*local_134 + 0x10))(local_134), cVar4 != '\0')) {
(**(code **)(*local_134 + 0x18))(local_134);
}
if ((piVar5 != (int *)0x0) && ((**(code **)(*piVar5 + 0xc))(piVar5), piVar5 != (int *)0x0)) {
(**(code **)(*piVar5 + 4))(piVar5);
}
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.