sound.cpp File Reference

#include "stdafx.h"
#include "openttd.h"
#include "landscape.h"
#include "mixer.h"
#include "sound_func.h"
#include "fileio.h"
#include "newgrf_sound.h"
#include "fios.h"
#include "window_gui.h"
#include "core/alloc_func.hpp"
#include "map_func.h"
#include "vehicle_base.h"
#include "debug.h"

Go to the source code of this file.

Defines

#define PANNING_LEVELS   16

Functions

static void OpenBankFile (const char *filename)
uint GetNumOriginalSounds ()
static bool SetBankSource (MixerChannel *mc, const FileEntry *fe)
bool SoundInitialize (const char *filename)
static void StartSound (uint sound, int panning, uint volume)
 assert_compile (lengthof(_vol_factor_by_zoom)==ZOOM_LVL_END-ZOOM_LVL_BEGIN)
void SndCopyToPool ()
static void SndPlayScreenCoordFx (SoundFx sound, int left, int right, int top, int bottom)
void SndPlayTileFx (SoundFx sound, TileIndex tile)
void SndPlayVehicleFx (SoundFx sound, const Vehicle *v)
void SndPlayFx (SoundFx sound)

Variables

static uint _file_count
static FileEntry * _files
MusicFileSettings msf
static const byte _vol_factor_by_zoom [] = {255, 190, 134, 87}
static const byte _sound_base_vol []
static const byte _sound_idx []


Detailed Description

Definition in file sound.cpp.


Variable Documentation

const byte _sound_base_vol[] [static]

Initial value:

 {
  128,  90, 128, 128, 128, 128, 128, 128,
  128,  90,  90, 128, 128, 128, 128, 128,
  128, 128, 128,  80, 128, 128, 128, 128,
  128, 128, 128, 128, 128, 128, 128, 128,
  128, 128,  90,  90,  90, 128,  90, 128,
  128,  90, 128, 128, 128,  90, 128, 128,
  128, 128, 128, 128,  90, 128, 128, 128,
  128,  90, 128, 128, 128, 128, 128, 128,
  128, 128,  90,  90,  90, 128, 128, 128,
   90,
}

Definition at line 172 of file sound.cpp.

const byte _sound_idx[] [static]

Initial value:

 {
   2,  3,  4,  5,  6,  7,  8,  9,
  10, 11, 12, 13, 14, 15, 16, 17,
  18, 19, 20, 21, 22, 23, 24, 25,
  26, 27, 28, 29, 30, 31, 32, 33,
  34, 35, 36, 37, 38, 39, 40,  0,
   1, 41, 42, 43, 44, 45, 46, 47,
  48, 49, 50, 51, 52, 53, 54, 55,
  56, 57, 58, 59, 60, 61, 62, 63,
  64, 65, 66, 67, 68, 69, 70, 71,
  72,
}

Definition at line 185 of file sound.cpp.


Generated on Mon Sep 22 20:34:26 2008 for openttd by  doxygen 1.5.6