newgrf_sound.h
author rubidium
Thu, 08 Feb 2007 10:41:45 +0000
branch0.5
changeset 5430 526e40487347
parent 4656 acffecd6f484
permissions -rw-r--r--
(svn r8626) [0.5] -Backport from trunk (8294, 8296, 8536, 8540, 8609):
-Fix: deleting a vehicle with shared orders, but no orders would fail to reset prev_shared and next_shared
-Fix: GenerateVehicleSortList()/CmdMassStartStopVehicle() tried to put a TileIndex into an uint16
-Fix (FS#577): Road Vehicles now can obtain a slot even if the station is very spread out
-Fix[YAPF]: Assert when buoy is placed on NE or NW map edge (Dan)
-Fix: a road vehicle that is very close after another (slower) road vehicle gets its speed reset to 0 when entering a tunnel, which causes a traffic jam outside of the tunnel.
/* $Id$ */

#ifndef NEWGRF_SOUND_H
#define NEWGRF_SOUND_H

typedef enum VehicleSoundEvents {
	VSE_START        = 1,
	VSE_TUNNEL       = 2,
	VSE_BREAKDOWN    = 3,
	VSE_RUNNING      = 4,
	VSE_TOUCHDOWN    = 5,
	VSE_TRAIN_EFFECT = 6,
	VSE_RUNNING_16   = 7,
	VSE_STOPPED_16   = 8,
	VSE_LOAD_UNLOAD  = 9,
} VehicleSoundEvent;


FileEntry *AllocateFileEntry(void);
void InitializeSoundPool(void);
FileEntry *GetSound(uint index);
uint GetNumSounds(void);
bool PlayVehicleSound(const Vehicle *v, VehicleSoundEvent event);

#endif /* NEWGRF_SOUND_H */