Changeset - r8157:cf41aa22cd09
[Not reviewed]
src/aircraft_cmd.cpp
Show inline comments
 
@@ -15,7 +15,6 @@
 
#include "engine.h"
 
#include "station.h"
 
#include "news.h"
 
#include "sound.h"
 
#include "player.h"
 
#include "aircraft.h"
 
#include "airport.h"
 
@@ -32,6 +31,7 @@
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "functions.h"
 

	
 
void Aircraft::UpdateDeltaXY(Direction direction)
src/airport_gui.cpp
Show inline comments
 
@@ -10,11 +10,11 @@
 
#include "gui.h"
 
#include "station_gui.h"
 
#include "viewport.h"
 
#include "sound.h"
 
#include "command_func.h"
 
#include "station.h"
 
#include "airport.h"
 
#include "depot.h"
 
#include "sound_func.h"
 
#include "window_func.h"
 

	
 
static byte _selected_airport_type;
src/bridge_gui.cpp
Show inline comments
 
@@ -10,11 +10,11 @@
 
#include "viewport.h"
 
#include "command_func.h"
 
#include "economy_func.h"
 
#include "sound.h"
 
#include "variables.h"
 
#include "bridge.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "sound_func.h"
 
#include "map_func.h"
 

	
 
static struct BridgeData {
src/disaster_cmd.cpp
Show inline comments
 
@@ -32,7 +32,6 @@
 
#include "industry.h"
 
#include "player.h"
 
#include "airport.h"
 
#include "sound.h"
 
#include "variables.h"
 
#include "table/sprites.h"
 
#include "strings_func.h"
 
@@ -40,6 +39,7 @@
 
#include "functions.h"
 
#include "vehicle_func.h"
 
#include "vehicle_base.h"
 
#include "sound_func.h"
 

	
 
enum DisasterSubType {
 
	ST_Zeppeliner,
src/dock_gui.cpp
Show inline comments
 
@@ -12,12 +12,12 @@
 
#include "window_gui.h"
 
#include "station_gui.h"
 
#include "viewport.h"
 
#include "sound.h"
 
#include "command_func.h"
 
#include "variables.h"
 
#include "water.h"
 
#include "window_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 

	
 
static void ShowBuildDockStationPicker();
 
static void ShowBuildDocksDepotPicker();
src/economy.cpp
Show inline comments
 
@@ -16,7 +16,6 @@
 
#include "industry.h"
 
#include "town.h"
 
#include "network/network.h"
 
#include "sound.h"
 
#include "engine.h"
 
#include "network/network_data.h"
 
#include "variables.h"
 
@@ -40,6 +39,7 @@
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 

	
 
/**
 
 * Multiply two integer values and shift the results to right.
src/engine.h
Show inline comments
 
@@ -12,7 +12,7 @@
 
#include "command_type.h"
 
#include "gfx_type.h"
 
#include "date_type.h"
 
#include "sound.h"
 
#include "sound_type.h"
 

	
 
enum RailVehicleTypes {
 
	RAILVEH_SINGLEHEAD,  ///< indicates a "standalone" locomotive
src/genworld_gui.cpp
Show inline comments
 
@@ -13,7 +13,6 @@
 
#include "gfxinit.h"
 
#include "player.h"
 
#include "command_func.h"
 
#include "sound.h"
 
#include "variables.h"
 
#include "string.h"
 
#include "settings.h"
 
@@ -25,6 +24,7 @@
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "sound_func.h"
 
#include "fios.h"
 

	
 
/**
src/industry_cmd.cpp
Show inline comments
 
@@ -17,7 +17,6 @@
 
#include "town.h"
 
#include "news.h"
 
#include "saveload.h"
 
#include "sound.h"
 
#include "variables.h"
 
#include "table/industry_land.h"
 
#include "table/build_industry.h"
 
@@ -40,6 +39,7 @@
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 

	
 
void ShowIndustryViewWindow(int industry);
 
void BuildOilRig(TileIndex tile);
src/main_gui.cpp
Show inline comments
 
@@ -20,7 +20,6 @@
 
#include "news.h"
 
#include "town.h"
 
#include "console.h"
 
#include "sound.h"
 
#include "network/network.h"
 
#include "signs.h"
 
#include "waypoint.h"
 
@@ -41,6 +40,7 @@
 
#include "date_func.h"
 
#include "functions.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "fios.h"
 

	
 
#include "network/network_data.h"
src/misc_gui.cpp
Show inline comments
 
@@ -23,7 +23,6 @@
 
#include "command_func.h"
 
#include "player.h"
 
#include "town.h"
 
#include "sound.h"
 
#include "network/network.h"
 
#include "string.h"
 
#include "variables.h"
 
@@ -40,6 +39,7 @@
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "sound_func.h"
 

	
 
/* Variables to display file lists */
 
FiosItem *_fios_list;
src/music/extmidi.cpp
Show inline comments
 
@@ -3,7 +3,7 @@
 
#ifndef __MORPHOS__
 
#include "../stdafx.h"
 
#include "../openttd.h"
 
#include "../sound.h"
 
#include "../sound_func.h"
 
#include "../string.h"
 
#include "../variables.h"
 
#include "../debug.h"
src/music_gui.cpp
Show inline comments
 
@@ -7,13 +7,13 @@
 
#include "table/strings.h"
 
#include "table/sprites.h"
 
#include "fileio.h"
 
#include "sound.h"
 
#include "variables.h"
 
#include "music.h"
 
#include "music/music_driver.hpp"
 
#include "window_gui.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "sound_func.h"
 

	
 
static byte _music_wnd_cursong;
 
static bool _song_is_active;
src/newgrf.cpp
Show inline comments
 
@@ -25,7 +25,6 @@
 
#include "fontcache.h"
 
#include "currency.h"
 
#include "landscape.h"
 
#include "sound.h"
 
#include "newgrf_config.h"
 
#include "newgrf_house.h"
 
#include "newgrf_sound.h"
 
@@ -46,6 +45,7 @@
 
#include "gfx_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 

	
 
/* TTDPatch extended GRF format codec
 
 * (c) Petr Baudis 2004 (GPL'd)
src/newgrf_house.cpp
Show inline comments
 
@@ -10,7 +10,6 @@
 
#include "landscape.h"
 
#include "town.h"
 
#include "town_map.h"
 
#include "sound.h"
 
#include "sprite.h"
 
#include "table/strings.h"
 
#include "table/sprites.h"
src/newgrf_sound.cpp
Show inline comments
 
@@ -5,12 +5,12 @@
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "oldpool.h"
 
#include "sound.h"
 
#include "engine.h"
 
#include "newgrf_callbacks.h"
 
#include "newgrf_engine.h"
 
#include "newgrf_sound.h"
 
#include "vehicle_base.h"
 
#include "sound_func.h"
 

	
 
static uint _sound_count = 0;
 
STATIC_OLD_POOL(SoundInternal, FileEntry, 3, 1000, NULL, NULL)
src/newgrf_sound.h
Show inline comments
 
@@ -5,6 +5,8 @@
 
#ifndef NEWGRF_SOUND_H
 
#define NEWGRF_SOUND_H
 

	
 
#include "sound_type.h"
 

	
 
enum VehicleSoundEvent {
 
	VSE_START        = 1,
 
	VSE_TUNNEL       = 2,
src/news_gui.cpp
Show inline comments
 
@@ -9,7 +9,6 @@
 
#include "window_gui.h"
 
#include "viewport.h"
 
#include "news.h"
 
#include "sound.h"
 
#include "variables.h"
 
#include "string.h"
 
#include "transparency.h"
 
@@ -17,6 +16,7 @@
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_base.h"
 
#include "sound_func.h"
 

	
 
/** @file news_gui.cpp
 
 *
src/openttd.cpp
Show inline comments
 
@@ -30,7 +30,6 @@
 
#include "industry.h"
 
#include "news.h"
 
#include "engine.h"
 
#include "sound.h"
 
#include "fileio.h"
 
#include "fios.h"
 
#include "airport.h"
 
@@ -63,6 +62,7 @@
 
#include "zoom_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 

	
 
#include "bridge_map.h"
 
#include "clear_map.h"
src/players.cpp
Show inline comments
 
@@ -14,7 +14,6 @@
 
#include "news.h"
 
#include "saveload.h"
 
#include "command_func.h"
 
#include "sound.h"
 
#include "network/network.h"
 
#include "variables.h"
 
#include "engine.h"
 
@@ -29,6 +28,7 @@
 
#include "functions.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 

	
 
/**
 
 * Sets the local player and updates the patch settings that are set on a
src/rail_cmd.cpp
Show inline comments
 
@@ -21,7 +21,6 @@
 
#include "pathfind.h"
 
#include "engine.h"
 
#include "town.h"
 
#include "sound.h"
 
#include "station.h"
 
#include "sprite.h"
 
#include "depot.h"
 
@@ -41,6 +40,7 @@
 
#include "tunnelbridge_map.h"
 
#include "window_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 

	
 

	
 
const byte _track_sloped_sprites[14] = {
src/rail_gui.cpp
Show inline comments
 
@@ -12,7 +12,6 @@
 
#include "window_gui.h"
 
#include "station_gui.h"
 
#include "viewport.h"
 
#include "sound.h"
 
#include "command_func.h"
 
#include "station.h"
 
#include "waypoint.h"
 
@@ -25,6 +24,7 @@
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "sound_func.h"
 

	
 
#include "bridge_map.h"
 
#include "rail_map.h"
src/road_cmd.cpp
Show inline comments
 
@@ -20,7 +20,6 @@
 
#include "command_func.h"
 
#include "player.h"
 
#include "town.h"
 
#include "sound.h"
 
#include "yapf/yapf.h"
 
#include "depot.h"
 
#include "newgrf.h"
 
@@ -34,6 +33,7 @@
 
#include "strings_func.h"
 
#include "vehicle_func.h"
 
#include "vehicle_base.h"
 
#include "sound_func.h"
 

	
 

	
 
#define M(x) (1 << (x))
src/road_gui.cpp
Show inline comments
 
@@ -10,17 +10,16 @@
 
#include "window_gui.h"
 
#include "station_gui.h"
 
#include "viewport.h"
 
#include "sound.h"
 
#include "command_func.h"
 
#include "variables.h"
 
#include "road_cmd.h"
 
#include "road_map.h"
 
#include "station_map.h"
 
//needed for catchments
 
#include "station.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 

	
 

	
 
static void ShowRVStationPicker(RoadStop::Type rs);
src/roadveh_cmd.cpp
Show inline comments
 
@@ -19,7 +19,6 @@
 
#include "pathfind.h"
 
#include "npf.h"
 
#include "player.h"
 
#include "sound.h"
 
#include "depot.h"
 
#include "bridge.h"
 
#include "tunnel_map.h"
 
@@ -38,6 +37,7 @@
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 

	
 

	
 
static const uint16 _roadveh_images[63] = {
src/settings.cpp
Show inline comments
 
@@ -23,7 +23,6 @@
 
#include "openttd.h"
 
#include "currency.h"
 
#include "screenshot.h"
 
#include "sound.h"
 
#include "string.h"
 
#include "variables.h"
 
#include "network/network.h"
 
@@ -42,6 +41,7 @@
 
#include "window_func.h"
 
#include "strings_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#ifdef WITH_FREETYPE
 
#include "fontcache.h"
 
#endif
src/ship_cmd.cpp
Show inline comments
 
@@ -16,7 +16,6 @@
 
#include "news.h"
 
#include "engine.h"
 
#include "player.h"
 
#include "sound.h"
 
#include "npf.h"
 
#include "depot.h"
 
#include "vehicle_gui.h"
 
@@ -34,6 +33,7 @@
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 

	
 
static const uint16 _ship_sprites[] = {0x0E5D, 0x0E55, 0x0E65, 0x0E6D};
 

	
src/smallmap_gui.cpp
Show inline comments
 
@@ -19,7 +19,6 @@
 
#include "viewport.h"
 
#include "player.h"
 
#include "town.h"
 
#include "sound.h"
 
#include "variables.h"
 
#include "blitter/factory.hpp"
 
#include "tunnelbridge_map.h"
 
@@ -27,6 +26,7 @@
 
#include "zoom_func.h"
 
#include "core/endian_func.hpp"
 
#include "vehicle_base.h"
 
#include "sound_func.h"
 

	
 

	
 
static const Widget _smallmap_widgets[] = {
src/sound.cpp
Show inline comments
 
@@ -6,7 +6,7 @@
 
#include "openttd.h"
 
#include "landscape.h"
 
#include "mixer.h"
 
#include "sound.h"
 
#include "sound_func.h"
 
#include "viewport.h"
 
#include "fileio.h"
 
#include "newgrf_sound.h"
 
@@ -18,6 +18,7 @@
 

	
 
static uint _file_count;
 
static FileEntry *_files;
 
MusicFileSettings msf;
 

	
 
// Number of levels of panning per side
 
#define PANNING_LEVELS 16
src/sound.h
Show inline comments
 
deleted file
src/sound_func.h
Show inline comments
 
new file 100644
 
/* $Id$ */
 

	
 
/** @file sound_func.h Functions related to sound. */
 

	
 
#ifndef SOUND_FUNC_H
 
#define SOUND_FUNC_H
 

	
 
#include "sound_type.h"
 
#include "vehicle_type.h"
 
#include "tile_type.h"
 

	
 
extern MusicFileSettings msf;
 

	
 
bool SoundInitialize(const char *filename);
 
uint GetNumOriginalSounds();
 

	
 
void SndPlayTileFx(SoundFx sound, TileIndex tile);
 
void SndPlayVehicleFx(SoundFx sound, const Vehicle *v);
 
void SndPlayFx(SoundFx sound);
 
void SndCopyToPool();
 

	
 
#endif /* SOUND_FUNC_H */
src/sound_type.h
Show inline comments
 
new file 100644
 
/* $Id$ */
 

	
 
/** @file sound_type.h Types related to sounds. */
 

	
 
#ifndef SOUND_TYPE_H
 
#define SOUND_TYPE_H
 

	
 
#include "core/enum_type.hpp"
 

	
 
struct MusicFileSettings {
 
	byte playlist;
 
	byte music_vol;
 
	byte effect_vol;
 
	byte custom_1[33];
 
	byte custom_2[33];
 
	bool playing;
 
	bool shuffle;
 
	char extmidi[80];
 
};
 

	
 
struct FileEntry {
 
	uint8 file_slot;
 
	uint32 file_offset;
 
	uint32 file_size;
 
	uint16 rate;
 
	uint8 bits_per_sample;
 
	uint8 channels;
 
	uint8 volume;
 
	uint8 priority;
 
};
 

	
 
enum SoundFx {
 
	SND_BEGIN = 0,
 
	SND_02_SPLAT = 0,                          //  0 == 0x00 !
 
	SND_03_FACTORY_WHISTLE,
 
	SND_04_TRAIN,
 
	SND_05_TRAIN_THROUGH_TUNNEL,
 
	SND_06_SHIP_HORN,
 
	SND_07_FERRY_HORN,
 
	SND_08_PLANE_TAKE_OFF,
 
	SND_09_JET,
 
	SND_0A_TRAIN_HORN,
 
	SND_0B_MINING_MACHINERY,
 
	SND_0C_ELECTRIC_SPARK,
 
	SND_0D_STEAM,
 
	SND_0E_LEVEL_CROSSING,
 
	SND_0F_VEHICLE_BREAKDOWN,
 
	SND_10_TRAIN_BREAKDOWN,
 
	SND_11_CRASH,
 
	SND_12_EXPLOSION,                      // 16 == 0x10
 
	SND_13_BIG_CRASH,
 
	SND_14_CASHTILL,
 
	SND_15_BEEP,                           // 19 == 0x13
 
	SND_16_MORSE,                          // 20 == 0x14
 
	SND_17_SKID_PLANE,
 
	SND_18_HELICOPTER,
 
	SND_19_BUS_START_PULL_AWAY,
 
	SND_1A_BUS_START_PULL_AWAY_WITH_HORN,
 
	SND_1B_TRUCK_START,
 
	SND_1C_TRUCK_START_2,
 
	SND_1D_APPLAUSE,
 
	SND_1E_OOOOH,
 
	SND_1F_SPLAT,                          // 29 == 0x1D
 
	SND_20_SPLAT_2,                        // 30 == 0x1E
 
	SND_21_JACKHAMMER,
 
	SND_22_CAR_HORN,
 
	SND_23_CAR_HORN_2,
 
	SND_24_SHEEP,
 
	SND_25_COW,
 
	SND_26_HORSE,
 
	SND_27_BLACKSMITH_ANVIL,
 
	SND_28_SAWMILL,                        // 38 == 0x26 !
 
	SND_00_GOOD_YEAR,                      // 39 == 0x27 !
 
	SND_01_BAD_YEAR,                       // 40 == 0x28 !
 
	SND_29_RIP,                            // 41 == 0x29 !
 
	SND_2A_EXTRACT_AND_POP,
 
	SND_2B_COMEDY_HIT,
 
	SND_2C_MACHINERY,
 
	SND_2D_RIP_2,
 
	SND_2E_EXTRACT_AND_POP,
 
	SND_2F_POP,
 
	SND_30_CARTOON_SOUND,
 
	SND_31_EXTRACT,
 
	SND_32_POP_2,
 
	SND_33_PLASTIC_MINE,
 
	SND_34_WIND,
 
	SND_35_COMEDY_BREAKDOWN,
 
	SND_36_CARTOON_CRASH,
 
	SND_37_BALLOON_SQUEAK,
 
	SND_38_CHAINSAW,
 
	SND_39_HEAVY_WIND,
 
	SND_3A_COMEDY_BREAKDOWN_2,
 
	SND_3B_JET_OVERHEAD,
 
	SND_3C_COMEDY_CAR,
 
	SND_3D_ANOTHER_JET_OVERHEAD,
 
	SND_3E_COMEDY_CAR_2,
 
	SND_3F_COMEDY_CAR_3,
 
	SND_40_COMEDY_CAR_START_AND_PULL_AWAY,
 
	SND_41_MAGLEV,
 
	SND_42_LOON_BIRD,
 
	SND_43_LION,
 
	SND_44_MONKEYS,
 
	SND_45_PLANE_CRASHING,
 
	SND_46_PLANE_ENGINE_SPUTTERING,
 
	SND_47_MAGLEV_2,
 
	SND_48_DISTANT_BIRD,                    // 72 == 0x48
 
	SND_END
 
};
 

	
 
/** Define basic enum properties */
 
template <> struct EnumPropsT<SoundFx> : MakeEnumPropsT<SoundFx, byte, SND_BEGIN, SND_END, SND_END> {};
 
typedef TinyEnumT<SoundFx> SoundFxByte;
 

	
 
#endif /* SOUND_TYPE_H */
src/table/engines.h
Show inline comments
 
@@ -7,8 +7,6 @@
 
 *  This file contains all the data for vehicles
 
 */
 

	
 
#include "../sound.h"
 

	
 
/** Writes the properties of a train or road vehicle into the EngineInfo struct.
 
 * @see EngineInfo
 
 * @param a Introduction date
src/terraform_gui.cpp
Show inline comments
 
@@ -12,11 +12,11 @@
 
#include "gui.h"
 
#include "window_gui.h"
 
#include "viewport.h"
 
#include "sound.h"
 
#include "command_func.h"
 
#include "signs.h"
 
#include "variables.h"
 
#include "functions.h"
 
#include "sound_func.h"
 

	
 
void CcTerraform(bool success, TileIndex tile, uint32 p1, uint32 p2)
 
{
src/train_cmd.cpp
Show inline comments
 
@@ -22,7 +22,6 @@
 
#include "news.h"
 
#include "engine.h"
 
#include "player.h"
 
#include "sound.h"
 
#include "depot.h"
 
#include "waypoint.h"
 
#include "vehicle_gui.h"
 
@@ -43,6 +42,7 @@
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 

	
 

	
 
static bool TrainCheckIfLineEnds(Vehicle *v);
src/transparency_gui.cpp
Show inline comments
 
@@ -7,9 +7,9 @@
 
#include "gui.h"
 
#include "window_gui.h"
 
#include "viewport.h"
 
#include "sound.h"
 
#include "variables.h"
 
#include "transparency.h"
 
#include "sound_func.h"
 

	
 
TransparencyOptionBits _transparency_opt;
 

	
src/tree_cmd.cpp
Show inline comments
 
@@ -16,12 +16,12 @@
 
#include "command_func.h"
 
#include "economy_func.h"
 
#include "town.h"
 
#include "sound.h"
 
#include "variables.h"
 
#include "genworld.h"
 
#include "transparency.h"
 
#include "functions.h"
 
#include "player.h"
 
#include "sound_func.h"
 

	
 
/**
 
 * List of tree placer algorithm.
src/tunnelbridge_cmd.cpp
Show inline comments
 
@@ -20,7 +20,6 @@
 
#include "command_func.h"
 
#include "player.h"
 
#include "town.h"
 
#include "sound.h"
 
#include "variables.h"
 
#include "bridge.h"
 
#include "train.h"
 
@@ -35,6 +34,7 @@
 
#include "date_func.h"
 
#include "functions.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 

	
 

	
 
const Bridge orig_bridge[] = {
src/vehicle.cpp
Show inline comments
 
@@ -19,7 +19,6 @@
 
#include "saveload.h"
 
#include "player.h"
 
#include "engine.h"
 
#include "sound.h"
 
#include "debug.h"
 
#include "vehicle_gui.h"
 
#include "depot.h"
 
@@ -43,6 +42,7 @@
 
#include "date_func.h"
 
#include "window_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 

	
 
#define INVALID_COORD (0x7fffffff)
 
#define GEN_HASH(x, y) ((GB((y), 6, 6) << 6) + GB((x), 7, 6))
src/water_cmd.cpp
Show inline comments
 
@@ -16,7 +16,6 @@
 
#include "command_func.h"
 
#include "town.h"
 
#include "news.h"
 
#include "sound.h"
 
#include "depot.h"
 
#include "vehicle_gui.h"
 
#include "train.h"
 
@@ -32,6 +31,7 @@
 
#include "functions.h"
 
#include "window_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 

	
 
/** Array for the shore sprites */
 
static const SpriteID _water_shore_sprites[] = {
0 comments (0 inline, 0 general)