CSoundControllerImp::SoundPlayEnvelope
0x004bdce0 · 357 bytes · __thiscall
_ZN19CSoundControllerImp17SoundPlayEnvelopeEP11CSoundPatch15soundcommands_tP15envelopePoint_ti
Decompiled
undefined (5 params)
/* CSoundControllerImp::SoundPlayEnvelope(CSoundPatch*, soundcommands_t, envelopePoint_t*, int) */
longdouble __thiscall
CSoundControllerImp::SoundPlayEnvelope
(CSoundControllerImp *this,undefined4 param_1,undefined4 param_3,float *param_4,
int param_5)
{
int iVar1;
longdouble lVar2;
float local_28;
float local_24;
float local_20;
(**(code **)(*(int *)this + 0x10))(this,param_1);
if (param_5 < 1) {
local_20 = 0.0;
}
else {
iVar1 = 0;
local_20 = 0.0;
local_24 = 0.0;
local_28 = 0.0;
do {
if ((*param_4 == -1.0) && (param_4[1] == -1.0)) {
if (iVar1 == 0) {
Msg("Invalid starting amplitude value in envelope! (Cannot be -1)\n");
}
}
else {
lVar2 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,*param_4,param_4[1]);
local_28 = (float)lVar2;
}
if ((param_4[2] == -1.0) && (param_4[3] == -1.0)) {
if (iVar1 == 0) {
Msg("Invalid starting duration value in envelope! (Cannot be -1)\n");
}
}
else {
lVar2 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,param_4[2],param_4[3]);
local_24 = (float)lVar2;
}
iVar1 = iVar1 + 1;
param_4 = param_4 + 4;
(**(code **)(*(int *)this + 0xc))(this,param_1,local_20,param_3,local_24,local_28);
local_20 = local_20 + local_24;
} while (iVar1 != param_5);
}
return (longdouble)local_20;
}
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.