//-------------------------------------------------------------------
//
//  This code is copyright 2001 by G5 Software.
//  Any unauthorized usage, either in part or in whole of this code
//  is strictly prohibited. Violators WILL be prosecuted to the
//  maximum extent allowed by law.
//
//-------------------------------------------------------------------

//
//  Interface sounds
//

class CHiliteSound
{
  bool   AutoPlay    = false;
  string SoundFile = "Sounds/hilite.wav";
}

class CSelectSound
{
  bool   AutoPlay    = false;
  string SoundFile = "Sounds/select.wav";
}

class CWeaponChangeSound
{
  bool   AutoPlay    = false;
  string SoundFile = "Sounds/select.wav";
}

class CTargetLockingSound
{
  bool   AutoPlay    = false;
  string SoundFile = "Sounds/locking.wav";
}

class CTargetLockedSound
{
  bool   AutoPlay    = false;
  string SoundFile = "Sounds/locked.wav";
}

class CTargetSwitchSound
{
  bool   AutoPlay    = false;
  string SoundFile = "Sounds/hilite.wav";
}

//
//  Bullet hits
//

class CBulletHitSound
{
  bool   AutoPlay    = false;
  float  MinDistance = 100.0;
}

class CTankGunBulletHitSound extends CBulletHitSound
{
  string SoundFile = "Sounds/TankBulletHit.wav";
  float  MaxDistance = 500.0;
}

class CFlakGunBulletHitSound extends CBulletHitSound
{
  string SoundFile = "Sounds/FlakBulletHit.wav";
  float  MaxDistance = 500.0;
}

class CKatushaRocketExplosionSound extends CBulletHitSound
{
  string SoundFile = "Sounds/KatushaRocketExplosion.wav";
  float  MaxDistance = 1000.0;
}

class CAirBombExplosionSound extends CBulletHitSound
{
  string SoundFile = "Sounds/AirBombExplosion.wav";
  float  MinDistance = 750.0;
  float  MaxDistance = 4000.0;
}

class CHelicopterRocketExplosionSound extends CBulletHitSound
{
  string SoundFile = "Sounds/HelicopterRocketExplosion.wav";
  float  MaxDistance = 1000.0;
}

class CFireBallExplosionSound extends CBulletHitSound
{
  string SoundFile = "Sounds/FireBallExplosion.wav";
  float  MaxDistance = 750.0;
}

class CPanzerFaustExplosionSound extends CBulletHitSound
{
  string SoundFile = "Sounds/PanzerFaustExplosion.wav";
  float  MaxDistance = 500.0;
}

class CBulletHitGroundSound extends CBulletHitSound
{
  string SoundFile = "Sounds/GroundBulletHit.wav";
  float  MaxDistance = 200.0;
}

class CBulletHitObjectSound extends CBulletHitSound
{
  string SoundFile = "Sounds/MachineGunBulletHit.wav";
  float  MaxDistance = 200.0;
}


//
// Units
//

class CExplosionSound
{
  bool   AutoPlay    = false;
  float  MinDistance = 200.0;
  float  MaxDistance = 1500.0;
}

class CBarrelExplosionSound extends CExplosionSound
{
  string SoundFile = "Sounds/BarrelExplosion.wav";
}

class CCisternExplosionSound extends CExplosionSound
{
  string SoundFile = "Sounds/CisternExplosion.wav";
}

class CAmmoBoxExplosionSound extends CExplosionSound
{
  string SoundFile = "Sounds/AmmoBoxExplosion.wav";
}

class CHangarExplosionSound extends CExplosionSound
{
  string SoundFile = "Sounds/HangarExplosion.wav";
}

class CBuildingExplosionSound extends CExplosionSound
{
  string SoundFile = "Sounds/BuildingExplosion.wav";
}

class CItemExplosionSound extends CExplosionSound
{
  string SoundFile = "Sounds/ItemExplosion.wav";
}

class CHelicopterExplosionSound extends CExplosionSound
{
  string SoundFile = "Sounds/HelicopterExplosion.wav";
}

class CMobileUnitExplosionSound extends CExplosionSound
{
  string SoundFile = "Sounds/MobileUnitExplosion.wav";
}

class CArmoredUnitExplosionSound extends CExplosionSound
{
  string SoundFile = "Sounds/ArmoredUnitExplosion.wav";
}

class CRefuellerExplosionSound extends CExplosionSound
{
  string SoundFile = "Sounds/RefuellerExplosion.wav";
}

class CStaticUnitExplosionSound extends CExplosionSound
{
  string SoundFile = "Sounds/StaticUnitExplosion.wav";
}

class CTreeExplosionSound extends CExplosionSound
{
  float  MinDistance = 50.0;
  float  MaxDistance = 250.0;
  string SoundFile = "Sounds/TreeExplosion.wav";
}


//
// Fire
//

class CFireSound
{
  bool   AutoPlay    = false;
  float  MinDistance = 50.0;
  float  MaxDistance = 500.0;
}

class CMachineGunFireSound extends CFireSound
{
  string SoundFile = "Sounds/MachineGunFire.wav";
}

class CTankFireSound extends CFireSound
{
  string SoundFile = "Sounds/TankFire.wav";
}

class CFlakFireSound extends CFireSound
{
  string SoundFile = "Sounds/FlakFire.wav";
}

class CHelicopterGunFireSound extends CFireSound
{
  float  MinDistance = 200.0;
  float  MaxDistance = 300.0;
  string SoundFile   = "Sounds/HelicopterGunFire.wav";
}

class CKatushaRocketFireSound extends CFireSound
{
  string SoundFile = "Sounds/KatushaRocketFire.wav";
}

class CHelicopterMissileFireSound extends CFireSound
{
  string SoundFile   = "Sounds/HelicopterMissileFire.wav";
}

class CPanzerFaustFireSound extends CFireSound
{
  string SoundFile = "Sounds/PanzerFaustFire.wav";
}

class CAirBombPitchSound extends CFireSound
{
  string SoundFile   = "Sounds/AirBombPitch.wav";
  bool   AutoPlay    = false;
  float  MinDistance = 500.0;
  float  MaxDistance = 2000.0;
}




//
// Collisions
//

class CHelicopterCollisionSound
{
  bool   AutoPlay    = false;
  string SoundFile = "Sounds/HelicopterCollision.wav";
  float  MinDistance = 10.0;
  float  MaxDistance = 500.0;
}


//
// engine sounds
//

class CEngineSound
{
  bool AutoPlay = false;

  void PlayEngineSound()
  {
    PlaySoundBuffer(true);
  }

  void StopEngineSound()
  {
    StopSoundPlaying();
  }

  float MinDistance = 50.0;
  float MaxDistance = 1500.0;
}

class CGermanTankEngineSound extends CEngineSound
{
  string SoundFile = "Sounds/CaterpillarUnitMove.wav";
}

class CGermanMobileFlakEngineSound extends CEngineSound
{
  string SoundFile = "Sounds/CaterpillarUnitMove.wav";
}

class CGermanTruckEngineSound extends CEngineSound
{
  string SoundFile = "Sounds/WheelUnitMove.wav";
}

class CGermanJeepEngineSound extends CEngineSound
{
  string SoundFile = "Sounds/WheelUnitMove.wav";
}

class CGermanAntiairEngineSound extends CEngineSound
{
  string SoundFile = "Sounds/CaterpillarUnitMove.wav";
}

class CGermanRefuellerEngineSound extends CEngineSound
{
  string SoundFile = "Sounds/WheelUnitMove.wav";
}

class CSovietKatushaEngineSound extends CEngineSound
{
  string SoundFile = "Sounds/WheelUnitMove.wav";
}

class CSovietTruckEngineSound extends CEngineSound
{
  string SoundFile = "Sounds/WheelUnitMove.wav";
}

class CSovietTankEngineSound extends CEngineSound
{
  string SoundFile = "Sounds/CaterpillarUnitMove.wav";
}

class CHelicopterEngineSound extends CEngineSound
{
  bool   AutoPlay    = true;
  float  MinDistance = 50.0;
  float  MaxDistance = 200.0;
  string SoundFile   = "Sounds/HelicopterEngine.wav";
}



class CSoundsArray
{
  void CSoundsArray()
  {
    // Bullet hits
    CreatePattern("CTankGunBulletHitSound", "SOUNDID_TankGunBulletHitSound");

    CreatePattern("CFlakGunBulletHitSound", "SOUNDID_FlakGunBulletHitSound");

    CreatePattern("CKatushaRocketExplosionSound", "SOUNDID_KatushaRocketExplosionSound");
    CreatePattern("CAirBombExplosionSound", "SOUNDID_AirBombExplosionSound");

    CreatePattern("CHelicopterRocketExplosionSound", "SOUNDID_HelicopterRocketExplosionSound");
    CreatePattern("CFireBallExplosionSound", "SOUNDID_FireBallExplosionSound");
    CreatePattern("CPanzerFaustExplosionSound", "SOUNDID_PanzerFaustExplosionSound");

    CreatePattern("CBulletHitGroundSound", "SOUNDID_BulletHitGroundSound");
    CreatePattern("CBulletHitObjectSound", "SOUNDID_BulletHitObjectSound");

    // Units
    CreatePattern("CBarrelExplosionSound", "SOUNDID_BarrelExplosionSound");
    CreatePattern("CCisternExplosionSound", "SOUNDID_CisternExplosionSound");
    CreatePattern("CAmmoBoxExplosionSound", "SOUNDID_AmmoBoxExplosionSound");
    CreatePattern("CHangarExplosionSound", "SOUNDID_HangarExplosionSound");
    CreatePattern("CBuildingExplosionSound", "SOUNDID_BuildingExplosionSound");
    CreatePattern("CItemExplosionSound", "SOUNDID_ItemExplosionSound");
    CreatePattern("CHelicopterExplosionSound", "SOUNDID_HelicopterExplosionSound");
    CreatePattern("CRefuellerExplosionSound", "SOUNDID_RefuellerExplosionSound");

    CreatePattern("CMobileUnitExplosionSound", "SOUNDID_JeepExplosionSound");
    CreatePattern("CMobileUnitExplosionSound", "SOUNDID_TruckExplosionSound");
    CreatePattern("CMobileUnitExplosionSound", "SOUNDID_KatushaExplosionSound");

    CreatePattern("CArmoredUnitExplosionSound", "SOUNDID_AntiairExplosionSound");
    CreatePattern("CArmoredUnitExplosionSound", "SOUNDID_AJeepExplosionSound");
    CreatePattern("CArmoredUnitExplosionSound", "SOUNDID_TankExplosionSound");
    CreatePattern("CArmoredUnitExplosionSound", "SOUNDID_MobileFlakExplosionSound");

    CreatePattern("CStaticUnitExplosionSound", "SOUNDID_FlakExplosionSound");
    CreatePattern("CStaticUnitExplosionSound", "SOUNDID_SandBagsExplosionSound");
    CreatePattern("CStaticUnitExplosionSound", "SOUNDID_GunTowerExplosionSound");

    CreatePattern("CTreeExplosionSound", "SOUNDID_TreeExplosionSound");

    // Fire
    CreatePattern("CMachineGunFireSound", "SOUNDID_GunTowerGunFireSound");
    CreatePattern("CMachineGunFireSound", "SOUNDID_AntiairGunFireSound");
    CreatePattern("CMachineGunFireSound", "SOUNDID_AJeepGunFireSound");
    CreatePattern("CMachineGunFireSound", "SOUNDID_ArmedHouseGunFireSound");
    CreatePattern("CMachineGunFireSound", "SOUNDID_ArmedSandBagsGunFireSound");

    CreatePattern("CFlakFireSound", "SOUNDID_FlakGunFireSound");
    CreatePattern("CFlakFireSound", "SOUNDID_MobileFlakGunFireSound");

    CreatePattern("CTankFireSound", "SOUNDID_TankGunFireSound");
    CreatePattern("CHelicopterGunFireSound", "SOUNDID_HelicopterGunFireSound");

    CreatePattern("CKatushaRocketFireSound", "SOUNDID_KatushaRocketFireSound");

    CreatePattern("CHelicopterMissileFireSound", "SOUNDID_HelicopterMissileFireSound");
    CreatePattern("CPanzerFaustFireSound", "SOUNDID_PanzerFaustFireSound");
    CreatePattern("CAirBombPitchSound", "SOUNDID_AirBombPitchSound");

    // Collisions
    CreatePattern("CHelicopterCollisionSound", "SOUNDID_HelicopterCollisionSound");
  }
}


