Music::Init
0x008ec400 · 3344 bytes · __thiscall
_ZN5Music4InitEv
Decompiled
undefined (1 param)
/* Music::Init() */
void __thiscall Music::Init(Music *this)
{
undefined4 uVar1;
int iVar2;
longdouble lVar3;
float fVar4;
float local_10;
*(undefined4 *)(this + 0xc) = 0;
*(undefined4 *)(this + 0x10) = 0;
if (*(float *)(this + 0x1c) != -1.0) {
(**(code **)(*(int *)(this + 0x14) + 4))(this + 0x14,this + 0x1c);
*(undefined4 *)(this + 0x1c) = 0xbf800000;
}
*(undefined4 *)(this + 0x20) = 0;
*(undefined4 *)(this + 0x24) = 0;
if (*(float *)(this + 0x30) != -1.0) {
(**(code **)(*(int *)(this + 0x28) + 4))(this + 0x28,this + 0x30);
*(undefined4 *)(this + 0x30) = 0xbf800000;
}
*(undefined4 *)(this + 0x34) = 0;
*(undefined4 *)(this + 0x38) = 0;
if (*(float *)(this + 0x44) != -1.0) {
(**(code **)(*(int *)(this + 0x3c) + 4))(this + 0x3c,this + 0x44);
*(undefined4 *)(this + 0x44) = 0xbf800000;
}
*(undefined4 *)(this + 0x48) = 0;
*(undefined4 *)(this + 0x4c) = 0;
if (*(float *)(this + 0x58) != -1.0) {
(**(code **)(*(int *)(this + 0x50) + 4))(this + 0x50,this + 0x58);
*(undefined4 *)(this + 0x58) = 0xbf800000;
}
*(undefined4 *)(this + 0x5c) = 0;
*(undefined4 *)(this + 0x60) = 0;
if (*(float *)(this + 0x6c) != -1.0) {
(**(code **)(*(int *)(this + 100) + 4))(this + 100,this + 0x6c);
*(undefined4 *)(this + 0x6c) = 0xbf800000;
}
*(undefined4 *)(this + 0x70) = 0;
*(undefined4 *)(this + 0x74) = 0;
if (*(float *)(this + 0x80) != -1.0) {
(**(code **)(*(int *)(this + 0x78) + 4))(this + 0x78,this + 0x80);
*(undefined4 *)(this + 0x80) = 0xbf800000;
}
*(undefined4 *)(this + 0x84) = 0;
*(undefined4 *)(this + 0x88) = 0;
if (*(float *)(this + 0x94) != -1.0) {
(**(code **)(*(int *)(this + 0x8c) + 4))(this + 0x8c,this + 0x94);
*(undefined4 *)(this + 0x94) = 0xbf800000;
}
*(undefined4 *)(this + 0x98) = 0;
*(undefined4 *)(this + 0x9c) = 0;
if (*(float *)(this + 0xa8) != -1.0) {
(**(code **)(*(int *)(this + 0xa0) + 4))(this + 0xa0,this + 0xa8);
*(undefined4 *)(this + 0xa8) = 0xbf800000;
}
*(undefined4 *)(this + 0xac) = 0;
*(undefined4 *)(this + 0xb0) = 0;
if (*(float *)(this + 0xbc) != -1.0) {
(**(code **)(*(int *)(this + 0xb4) + 4))(this + 0xb4,this + 0xbc);
*(undefined4 *)(this + 0xbc) = 0xbf800000;
}
*(undefined4 *)(this + 0xc0) = 0;
*(undefined4 *)(this + 0xc4) = 0;
if (*(float *)(this + 0xd0) != -1.0) {
(**(code **)(*(int *)(this + 200) + 4))(this + 200,this + 0xd0);
*(undefined4 *)(this + 0xd0) = 0xbf800000;
}
*(undefined4 *)(this + 0xd4) = 0;
*(undefined4 *)(this + 0xd8) = 0;
if (*(float *)(this + 0xe4) != -1.0) {
(**(code **)(*(int *)(this + 0xdc) + 4))(this + 0xdc,this + 0xe4);
*(undefined4 *)(this + 0xe4) = 0xbf800000;
}
*(undefined4 *)(this + 0xe8) = 0;
*(undefined4 *)(this + 0xec) = 0;
if (*(float *)(this + 0xf8) != -1.0) {
(**(code **)(*(int *)(this + 0xf0) + 4))(this + 0xf0,this + 0xf8);
*(undefined4 *)(this + 0xf8) = 0xbf800000;
}
*(undefined4 *)(this + 0xfc) = 0;
*(undefined4 *)(this + 0x100) = 0;
*(undefined4 *)(this + 0x108) = 0;
lVar3 = (longdouble)CountdownTimer::Now();
fVar4 = *(float *)(this + 0x110);
if ((float)lVar3 + fVar4 != *(float *)(this + 0x114)) {
(**(code **)(*(int *)(this + 0x10c) + 4))(this + 0x10c,this + 0x114);
*(float *)(this + 0x114) = (float)lVar3 + fVar4;
}
lVar3 = (longdouble)CountdownTimer::Now();
fVar4 = *(float *)(this + 0x11c);
if ((float)lVar3 + fVar4 != *(float *)(this + 0x120)) {
(**(code **)(*(int *)(this + 0x118) + 4))(this + 0x118,this + 0x120);
*(float *)(this + 0x120) = (float)lVar3 + fVar4;
}
lVar3 = (longdouble)CountdownTimer::Now();
fVar4 = *(float *)(this + 0x128);
if ((float)lVar3 + fVar4 != *(float *)(this + 300)) {
(**(code **)(*(int *)(this + 0x124) + 4))(this + 0x124,this + 300);
*(float *)(this + 300) = (float)lVar3 + fVar4;
}
lVar3 = (longdouble)CountdownTimer::Now();
fVar4 = *(float *)(this + 0x140);
if ((float)lVar3 + fVar4 != *(float *)(this + 0x144)) {
(**(code **)(*(int *)(this + 0x13c) + 4))(this + 0x13c,this + 0x144);
*(float *)(this + 0x144) = (float)lVar3 + fVar4;
}
lVar3 = (longdouble)CountdownTimer::Now();
fVar4 = *(float *)(this + 0x14c);
if ((float)lVar3 + fVar4 != *(float *)(this + 0x150)) {
(**(code **)(*(int *)(this + 0x148) + 4))(this + 0x148,this + 0x150);
*(float *)(this + 0x150) = (float)lVar3 + fVar4;
}
lVar3 = (longdouble)CountdownTimer::Now();
fVar4 = *(float *)(this + 0x134);
if ((float)lVar3 + fVar4 != *(float *)(this + 0x138)) {
(**(code **)(*(int *)(this + 0x130) + 4))(this + 0x130,this + 0x138);
*(float *)(this + 0x138) = (float)lVar3 + fVar4;
}
this[0x180] = (Music)0x0;
this[0x182] = (Music)0x0;
this[0x181] = (Music)0x0;
this[0x183] = (Music)0x0;
this[0x184] = (Music)0x0;
if (*(float *)(this + 0x188) != 0.0) {
(**(code **)(*(int *)this + 0xc))(this,this + 0x188);
*(undefined4 *)(this + 0x188) = 0;
}
if (*(float *)(this + 0x1b4) != 0.0) {
(**(code **)(*(int *)this + 0xc))(this,this + 0x1b4);
*(undefined4 *)(this + 0x1b4) = 0;
}
uVar1 = MusicDynamicUpdateInterval._28_4_;
this[0x1b8] = (Music)0x0;
if (*(int *)(*(int *)(this + 0x378) + 0x30) == 0) {
local_10 = 0.0;
}
else {
local_10 = *(float *)(uVar1 + 0x2c) * 0.125 *
(float)(*(int *)(*(int *)(this + 0x378) + 0x30) - *(int *)(gpGlobals + 0x58) >> 4);
}
lVar3 = (longdouble)CountdownTimer::Now();
if ((float)lVar3 + local_10 != *(float *)(this + 0x1c4)) {
(**(code **)(*(int *)(this + 0x1bc) + 4))(this + 0x1bc,this + 0x1c4);
*(float *)(this + 0x1c4) = (float)lVar3 + local_10;
}
if (local_10 != *(float *)(this + 0x1c0)) {
(**(code **)(*(int *)(this + 0x1bc) + 4))(this + 0x1bc,this + 0x1c0);
*(float *)(this + 0x1c0) = local_10;
}
lVar3 = (longdouble)CountdownTimer::Now();
if ((float)lVar3 + 0.1 != *(float *)(this + 0x1d4)) {
(**(code **)(*(int *)(this + 0x1cc) + 4))(this + 0x1cc,this + 0x1d4);
*(float *)(this + 0x1d4) = (float)lVar3 + 0.1;
}
if (*(float *)(this + 0x1d0) != 0.1) {
(**(code **)(*(int *)(this + 0x1cc) + 4))(this + 0x1cc,this + 0x1d0);
*(undefined4 *)(this + 0x1d0) = 0x3dcccccd;
}
lVar3 = (longdouble)CountdownTimer::Now();
if ((float)lVar3 + 3.0 != *(float *)(this + 0x1ec)) {
(**(code **)(*(int *)(this + 0x1e4) + 4))(this + 0x1e4,this + 0x1ec);
*(float *)(this + 0x1ec) = (float)lVar3 + 3.0;
}
if (*(float *)(this + 0x1e8) != 3.0) {
(**(code **)(*(int *)(this + 0x1e4) + 4))(this + 0x1e4,this + 0x1e8);
*(undefined4 *)(this + 0x1e8) = 0x40400000;
}
fVar4 = *(float *)(MusicCalmMinInterval._28_4_ + 0x2c);
lVar3 = (longdouble)CountdownTimer::Now();
if ((float)lVar3 + fVar4 != *(float *)(this + 0x1f8)) {
(**(code **)(*(int *)(this + 0x1f0) + 4))(this + 0x1f0,this + 0x1f8);
*(float *)(this + 0x1f8) = (float)lVar3 + fVar4;
}
if (fVar4 != *(float *)(this + 500)) {
(**(code **)(*(int *)(this + 0x1f0) + 4))(this + 0x1f0,this + 500);
*(float *)(this + 500) = fVar4;
}
fVar4 = *(float *)(MusicCalmMinInterval._28_4_ + 0x2c) + 10.0;
lVar3 = (longdouble)CountdownTimer::Now();
if ((float)lVar3 + fVar4 != *(float *)(this + 0x208)) {
(**(code **)(*(int *)(this + 0x200) + 4))(this + 0x200,this + 0x208);
*(float *)(this + 0x208) = (float)lVar3 + fVar4;
}
if (fVar4 != *(float *)(this + 0x204)) {
(**(code **)(*(int *)(this + 0x200) + 4))(this + 0x200,this + 0x204);
*(float *)(this + 0x204) = fVar4;
}
fVar4 = *(float *)(MusicDynamicMobChoirIntervalBeats._28_4_ + 0x2c);
iVar2 = RandomInt(1,*(undefined4 *)(MusicDynamicMobChoirIntervalRandMultMax._28_4_ + 0x30));
fVar4 = (float)iVar2 * fVar4 * (60.0 / *(float *)(MusicDynamicMobChoirBPM._28_4_ + 0x2c));
lVar3 = (longdouble)CountdownTimer::Now();
if ((float)lVar3 + fVar4 != *(float *)(this + 0x218)) {
(**(code **)(*(int *)(this + 0x210) + 4))(this + 0x210,this + 0x218);
*(float *)(this + 0x218) = (float)lVar3 + fVar4;
}
if (fVar4 != *(float *)(this + 0x214)) {
(**(code **)(*(int *)(this + 0x210) + 4))(this + 0x210,this + 0x214);
*(float *)(this + 0x214) = fVar4;
}
fVar4 = *(float *)(MusicLargeAreaRevealRepeatInterval._28_4_ + 0x2c);
lVar3 = (longdouble)CountdownTimer::Now();
if ((float)lVar3 + fVar4 != *(float *)(this + 0x224)) {
(**(code **)(*(int *)(this + 0x21c) + 4))(this + 0x21c,this + 0x224);
*(float *)(this + 0x224) = (float)lVar3 + fVar4;
}
if (fVar4 != *(float *)(this + 0x220)) {
(**(code **)(*(int *)(this + 0x21c) + 4))(this + 0x21c,this + 0x220);
*(float *)(this + 0x220) = fVar4;
}
this[0x1fc] = (Music)0x0;
this[0x20c] = (Music)0x0;
*(undefined4 *)(this + 0x1dc) = 0;
if (*(int *)(this + 0x17c) != 0) {
(**(code **)(*(int *)this + 0xc))(this,this + 0x17c);
*(undefined4 *)(this + 0x17c) = 0;
}
*(undefined4 *)(this + 8) = 0;
this[5] = (Music)0x0;
if (*(float *)(this + 0x160) != 1.0) {
(**(code **)(*(int *)this + 0xc))(this,this + 0x160);
*(undefined4 *)(this + 0x160) = 0x3f800000;
}
if (*(float *)(this + 0x164) != 0.0) {
(**(code **)(*(int *)this + 0xc))(this,this + 0x164);
*(undefined4 *)(this + 0x164) = 0;
}
if (*(float *)(this + 0x168) != 0.0) {
(**(code **)(*(int *)this + 0xc))(this,this + 0x168);
*(undefined4 *)(this + 0x168) = 0;
}
if (*(float *)(this + 0x16c) != 0.0) {
(**(code **)(*(int *)this + 0xc))(this,this + 0x16c);
*(undefined4 *)(this + 0x16c) = 0;
}
if (*(float *)(this + 0x170) != 0.0) {
(**(code **)(*(int *)this + 0xc))(this,this + 0x170);
*(undefined4 *)(this + 0x170) = 0;
}
*(undefined4 *)(this + 0x178) = 0;
this[0x104] = (Music)0x1;
this[0x1b0] = (Music)0x0;
this[0x186] = (Music)0x0;
this[0x187] = (Music)0x0;
this[0x185] = (Music)0x0;
*(undefined4 *)(this + 0x1c8) = 0;
if (*(float *)(this + 0x174) != 0.0) {
(**(code **)(*(int *)this + 0xc))(this,this + 0x174);
*(undefined4 *)(this + 0x174) = 0;
}
this[0x1e0] = (Music)0x0;
this[0x2f4] = (Music)0x0;
V_strncpy((char *)(this + 0x2f5),"",0x80);
lVar3 = (longdouble)CountdownTimer::Now();
fVar4 = *(float *)(this + 400);
if ((float)lVar3 + fVar4 != *(float *)(this + 0x194)) {
(**(code **)(*(int *)(this + 0x18c) + 4))(this + 0x18c,this + 0x194);
*(float *)(this + 0x194) = (float)lVar3 + fVar4;
}
this[0x198] = (Music)0x0;
*(undefined4 *)(this + 0x1a8) = 0;
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.