mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r11719) -Codechange: split sound.h in a header with types and one with functions.
This commit is contained in:
parent
6ae9302708
commit
e5e75bd8f8
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#ifndef NEWGRF_SOUND_H
|
||||
#define NEWGRF_SOUND_H
|
||||
|
||||
#include "sound_type.h"
|
||||
|
||||
enum VehicleSoundEvent {
|
||||
VSE_START = 1,
|
||||
VSE_TUNNEL = 2,
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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] = {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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] = {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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};
|
||||
|
||||
|
|
|
@ -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[] = {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
/* $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 */
|
|
@ -1,13 +1,11 @@
|
|||
/* $Id$ */
|
||||
|
||||
/** @file sound.h */
|
||||
/** @file sound_type.h Types related to sounds. */
|
||||
|
||||
#ifndef SOUND_H
|
||||
#define SOUND_H
|
||||
#ifndef SOUND_TYPE_H
|
||||
#define SOUND_TYPE_H
|
||||
|
||||
#include "core/enum_type.hpp"
|
||||
#include "vehicle_type.h"
|
||||
#include "tile_type.h"
|
||||
|
||||
struct MusicFileSettings {
|
||||
byte playlist;
|
||||
|
@ -20,8 +18,6 @@ struct MusicFileSettings {
|
|||
char extmidi[80];
|
||||
};
|
||||
|
||||
VARDEF MusicFileSettings msf;
|
||||
|
||||
struct FileEntry {
|
||||
uint8 file_slot;
|
||||
uint32 file_offset;
|
||||
|
@ -33,9 +29,6 @@ struct FileEntry {
|
|||
uint8 priority;
|
||||
};
|
||||
|
||||
bool SoundInitialize(const char *filename);
|
||||
uint GetNumOriginalSounds();
|
||||
|
||||
enum SoundFx {
|
||||
SND_BEGIN = 0,
|
||||
SND_02_SPLAT = 0, // 0 == 0x00 !
|
||||
|
@ -118,9 +111,4 @@ enum SoundFx {
|
|||
template <> struct EnumPropsT<SoundFx> : MakeEnumPropsT<SoundFx, byte, SND_BEGIN, SND_END, SND_END> {};
|
||||
typedef TinyEnumT<SoundFx> SoundFxByte;
|
||||
|
||||
void SndPlayTileFx(SoundFx sound, TileIndex tile);
|
||||
void SndPlayVehicleFx(SoundFx sound, const Vehicle *v);
|
||||
void SndPlayFx(SoundFx sound);
|
||||
void SndCopyToPool();
|
||||
|
||||
#endif /* SOUND_H */
|
||||
#endif /* SOUND_TYPE_H */
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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[] = {
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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[] = {
|
||||
|
|
Loading…
Reference in New Issue