public static Int32 hook_Sound(String message) { try { int address = Convert.ToInt32(message); Process process = Process.ThisProcess(); zCSoundFX sound = new zCSoundFX(process, process.ReadInt(address + 4)); zCVob vob = new zCVob(process, process.ReadInt(address + 8)); int x = process.ReadInt(address + 12); zTSound3DParams param = new zTSound3DParams(process, process.ReadInt(address + 16)); //X => 0,1,2,8 2 => Gespräch, 0 => Ambient? z.B. TorchBourn if (x == 2 && vob.VobType == zCVob.VobTypes.Npc) { zERROR.GetZErr(Process.ThisProcess()).Report(2, 'G', "Vob: " + vob.VobType + " | " + vob.ObjectName.Value + " | " + x + " | ", 0, "Program.cs", 0); sound.testValues(1024); for (int i = 0; i < 8; i++) { int add = process.ReadInt(param.Address + (i * 4)); zERROR.GetZErr(Process.ThisProcess()).Report(2, 'G', "Param i)" + i + ": 0x" + add.ToString("X4"), 0, "Program.cs", 0); if (add != 0) { zERROR.GetZErr(Process.ThisProcess()).Report(2, 'G', "Param i)" + i + ": " + new zCVob(process, add).VobType, 0, "Program.cs", 0); } } } } catch (Exception ex) { zERROR.GetZErr(Process.ThisProcess()).Report(2, 'G', "Error: " + ex.ToString(), 0, "Program.cs", 0); } return(0); }
public ActiveSound(int id, zTSound3DParams sndParams, SoundDefinition sfx, zCVob sndVob = null) { this.startTime = GameTime.Ticks; this.idPtr = id; this.sndParams = sndParams; this.sfx = sfx; this.sndVob = sndVob; }