|
OpenTTD
|
Handling of playing sounds. More...
#include "stdafx.h"#include "landscape.h"#include "mixer.h"#include "newgrf_sound.h"#include "fios.h"#include "window_gui.h"#include "vehicle_base.h"#include "base_media_func.h"#include "safeguards.h"Go to the source code of this file.
Macros | |
| #define | SET_TYPE "sounds" |
Functions | |
| static void | OpenBankFile (const char *filename) |
| static bool | SetBankSource (MixerChannel *mc, const SoundEntry *sound) |
| void | InitializeSound () |
| static void | StartSound (SoundID sound_id, float pan, uint volume) |
| assert_compile (lengthof(_vol_factor_by_zoom)==ZOOM_LVL_COUNT) | |
| void | SndCopyToPool () |
| static void | SndPlayScreenCoordFx (SoundID sound, int left, int right, int top, int bottom) |
| Decide 'where' (between left and right speaker) to play the sound effect. | |
| void | SndPlayTileFx (SoundID sound, TileIndex tile) |
| void | SndPlayVehicleFx (SoundID sound, const Vehicle *v) |
| void | SndPlayFx (SoundID sound) |
Variables | |
| static SoundEntry | _original_sounds [ORIGINAL_SAMPLE_COUNT] |
| static const byte | _vol_factor_by_zoom [] = {255, 255, 255, 190, 134, 87} |
| static const byte | _sound_base_vol [] |
| static const byte | _sound_idx [] |
| static const char *const | _sound_file_names [] = { "samples" } |
| Names corresponding to the sound set's files. | |
Handling of playing sounds.
Definition in file sound.cpp.
|
static |
Decide 'where' (between left and right speaker) to play the sound effect.
| sound | Sound effect to play |
| left | Left edge of virtual coordinates where the sound is produced |
| right | Right edge of virtual coordinates where the sound is produced |
| top | Top edge of virtual coordinates where the sound is produced |
| bottom | Bottom edge of virtual coordinates where the sound is produced |
Definition at line 239 of file sound.cpp.
References _settings_client, MusicSettings::effect_vol, ClientSettings::music, Window::viewport, ViewPort::virtual_height, ViewPort::virtual_left, ViewPort::virtual_top, ViewPort::virtual_width, ViewPort::zoom, and ZOOM_LVL_BEGIN.
|
static |
|
static |
1.8.1.2