--- a/aircraft_cmd.c Sat Dec 04 07:41:37 2004 +0000
+++ b/aircraft_cmd.c Sat Dec 04 09:26:39 2004 +0000
@@ -734,7 +734,7 @@
if (u->cur_speed > 32) {
v->cur_speed = 0;
if (--u->cur_speed == 32) {
- SndPlayVehicleFx(0x16, v);
+ SndPlayVehicleFx(SND_18_HELICOPTER, v);
}
} else {
u->cur_speed = 32;
@@ -1098,7 +1098,7 @@
0);
ModifyStationRatingAround(TILE_FROM_XY(v->x_pos, v->y_pos), v->owner, -160, 30);
- SndPlayVehicleFx(16, v);
+ SndPlayVehicleFx(SND_12_EXPLOSION, v);
}
// we've landed and just arrived at a terminal
@@ -1182,7 +1182,7 @@
static void AircraftLandAirplane(Vehicle *v)
{
AircraftLand(v);
- SndPlayVehicleFx(0x15, v);
+ SndPlayVehicleFx(SND_17_SKID_PLANE, v);
MaybeCrashAirplane(v);
}
--- a/airport_gui.c Sat Dec 04 07:41:37 2004 +0000
+++ b/airport_gui.c Sat Dec 04 09:26:39 2004 +0000
@@ -19,7 +19,7 @@
static void CcBuildAirport(bool success, uint tile, uint32 p1, uint32 p2)
{
if (success) {
- SndPlayTileFx(0x1D, tile);
+ SndPlayTileFx(SND_1F_SPLAT, tile);
ResetObjectToPlace();
}
}
@@ -172,12 +172,12 @@
break;
case 3: case 4: case 5: case 6: case 7:
_selected_airport_type = e->click.widget - 3;
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
SetWindowDirty(w);
break;
case 8: case 9:
_station_show_coverage = e->click.widget - 8;
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
SetWindowDirty(w);
break;
}
--- a/bridge_gui.c Sat Dec 04 07:41:37 2004 +0000
+++ b/bridge_gui.c Sat Dec 04 09:26:39 2004 +0000
@@ -25,7 +25,7 @@
static void CcBuildBridge(bool success, uint tile, uint32 p1, uint32 p2)
{
- if (success) { SndPlayTileFx(0x25, tile); }
+ if (success) SndPlayTileFx(SND_27_BLACKSMITH_ANVIL, tile);
}
static void BuildBridge(Window *w, int i)
--- a/disaster_cmd.c Sat Dec 04 07:41:37 2004 +0000
+++ b/disaster_cmd.c Sat Dec 04 09:26:39 2004 +0000
@@ -208,7 +208,7 @@
if (++v->age == 1) {
CreateEffectVehicleRel(v, 0, 7, 8, EV_CRASHED_SMOKE);
- SndPlayVehicleFx(0x10, v);
+ SndPlayVehicleFx(SND_12_EXPLOSION, v);
v->u.disaster.image_override = 0xF42;
} else if (v->age == 70) {
v->u.disaster.image_override = 0xF43;
@@ -311,7 +311,7 @@
// destroy?
if (v->age > 50) {
CreateEffectVehicleRel(v, 0, 7, 8, EV_CRASHED_SMOKE);
- SndPlayVehicleFx(0x10, v);
+ SndPlayVehicleFx(SND_12_EXPLOSION, v);
DeleteDisasterVeh(v);
}
}
@@ -374,7 +374,7 @@
SetDParam(0, i->town->index);
AddNewsItem(STR_B002_OIL_REFINERY_EXPLOSION, NEWS_FLAGS(NM_THIN,NF_VIEWPORT|NF_TILE,NT_ACCIDENT,0), i->xy, 0);
- SndPlayTileFx(0x10, i->xy);
+ SndPlayTileFx(SND_12_EXPLOSION, i->xy);
}
} else if (v->next_order == 0) {
int x,y;
@@ -444,7 +444,7 @@
SetDParam(0, i->town->index);
AddNewsItem(STR_B003_FACTORY_DESTROYED_IN_SUSPICIOUS, NEWS_FLAGS(NM_THIN,NF_VIEWPORT|NF_TILE,NT_ACCIDENT,0), i->xy, 0);
- SndPlayTileFx(0x10, i->xy);
+ SndPlayTileFx(SND_12_EXPLOSION, i->xy);
}
} else if (v->next_order == 0) {
int x,y;
@@ -601,7 +601,7 @@
v->next_order = 1;
CreateEffectVehicleRel(u, 0, 7, 8, EV_CRASHED_SMOKE);
- SndPlayVehicleFx(0x10, u);
+ SndPlayVehicleFx(SND_12_EXPLOSION, u);
DeleteDisasterVeh(u);
--- a/dock_gui.c Sat Dec 04 07:41:37 2004 +0000
+++ b/dock_gui.c Sat Dec 04 09:26:39 2004 +0000
@@ -16,14 +16,14 @@
static void CcBuildDocks(bool success, uint tile, uint32 p1, uint32 p2)
{
if (success) {
- SndPlayTileFx(0, tile);
+ SndPlayTileFx(SND_02_SPLAT, tile);
ResetObjectToPlace();
}
}
static void CcBuildCanal(bool success, uint tile, uint32 p1, uint32 p2)
{
- if (success) { SndPlayTileFx(0, tile); }
+ if (success) SndPlayTileFx(SND_02_SPLAT, tile);
}
@@ -279,7 +279,7 @@
case 3:
case 4:
_ship_depot_direction = e->click.widget - 3;
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
UpdateDocksDirection();
SetWindowDirty(w);
break;
--- a/economy.c Sat Dec 04 07:41:37 2004 +0000
+++ b/economy.c Sat Dec 04 09:26:39 2004 +0000
@@ -1388,7 +1388,7 @@
SubtractMoneyFromPlayer(-profit);
if (_current_player == _local_player)
- SndPlayVehicleFx(0x12, v);
+ SndPlayVehicleFx(SND_14_CASHTILL, v);
ShowCostOrIncomeAnimation(v->x_pos, v->y_pos, v->z_pos, -profit);
}
--- a/industry_cmd.c Sat Dec 04 07:41:37 2004 +0000
+++ b/industry_cmd.c Sat Dec 04 09:26:39 2004 +0000
@@ -473,8 +473,8 @@
m = _map3_lo[tile] + 1;
switch(m & 7) {
- case 2: SndPlayTileFx(45, tile); break;
- case 6: SndPlayTileFx(41, tile); break;
+ case 2: SndPlayTileFx(SND_2D_RIP_2, tile); break;
+ case 6: SndPlayTileFx(SND_29_RIP, tile); break;
}
if (m >= 96) {
@@ -492,7 +492,7 @@
m = _map3_lo[tile];
if (_industry_anim_offs[m] == 0xFF) {
- SndPlayTileFx(48, tile);
+ SndPlayTileFx(SND_30_CARTOON_SOUND, tile);
}
if (++m >= 70) {
@@ -538,11 +538,11 @@
m = _map3_lo[tile] + 1;
if (m == 1) {
- SndPlayTileFx(44, tile);
+ SndPlayTileFx(SND_2C_MACHINERY, tile);
} else if (m == 23) {
- SndPlayTileFx(43, tile);
+ SndPlayTileFx(SND_2B_COMEDY_HIT, tile);
} else if (m == 28) {
- SndPlayTileFx(42, tile);
+ SndPlayTileFx(SND_2A_EXTRACT_AND_POP, tile);
}
if (m >= 50 && (m=0,++_map3_hi[tile] >= 8)) {
@@ -595,7 +595,7 @@
if (state < 0x20 || state >= 0x180) {
if (! (_map_owner[tile] & 0x40)) {
_map_owner[tile] |= 0x40;
- SndPlayTileFx(9, tile);
+ SndPlayTileFx(SND_0B_MINING_MACHINERY, tile);
}
if (state & 7)
return;
@@ -684,7 +684,7 @@
49, 59, 60, 65,
};
- SndPlayTileFx(46, tile);
+ SndPlayTileFx(SND_2E_EXTRACT_AND_POP, tile);
dir = Random() & 3;
@@ -770,7 +770,7 @@
case 10:
if (CHANCE16(1,3)) {
- SndPlayTileFx(10, tile);
+ SndPlayTileFx(SND_0C_ELECTRIC_SPARK, tile);
AddAnimatedTile(tile);
}
break;
@@ -998,7 +998,7 @@
_current_player = OWNER_NONE;
_industry_sound_ctr = 1;
_industry_sound_tile = tile;
- SndPlayTileFx(56, tile);
+ SndPlayTileFx(SND_38_CHAINSAW, tile);
DoCommandByTile(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
SetMapExtraBits(tile, 0);
@@ -1018,19 +1018,19 @@
static const byte _industry_sounds[37][2] = {
{0},
{0},
- {1,38},
+ {1, SND_28_SAWMILL},
{0},
{0},
{0},
- {1,1},
- {1,1},
+ {1, SND_03_FACTORY_WHISTLE},
+ {1, SND_03_FACTORY_WHISTLE},
{0},
- {3,34},
+ {3, SND_24_SHEEP},
{0},
{0},
{0},
{0},
- {1,38},
+ {1, SND_28_SAWMILL},
{0},
{0},
{0},
@@ -1039,7 +1039,7 @@
{0},
{0},
{0},
- {1,1},
+ {1, SND_03_FACTORY_WHISTLE},
{0},
{0},
{0},
@@ -1048,7 +1048,7 @@
{0},
{0},
{0},
- {1,51},
+ {1, SND_33_PLASTIC_MINE},
{0},
{0},
{0},
@@ -1092,10 +1092,10 @@
_industry_sound_ctr++;
if (_industry_sound_ctr == 75) {
- SndPlayTileFx(55, _industry_sound_tile);
+ SndPlayTileFx(SND_37_BALLOON_SQUEAK, _industry_sound_tile);
} else if (_industry_sound_ctr == 160) {
_industry_sound_ctr = 0;
- SndPlayTileFx(54, _industry_sound_tile);
+ SndPlayTileFx(SND_36_CARTOON_CRASH, _industry_sound_tile);
}
}
--- a/main_gui.c Sat Dec 04 07:41:37 2004 +0000
+++ b/main_gui.c Sat Dec 04 09:26:39 2004 +0000
@@ -63,7 +63,7 @@
if (w->disabled_state & mask)
return false;
- if (!_no_button_sound) SndPlayFx(0x13);
+ if (!_no_button_sound) SndPlayFx(SND_15_BEEP);
SetWindowDirty(w);
if (w->click_state & mask) {
@@ -80,7 +80,7 @@
void CcPlaySound10(bool success, uint tile, uint32 p1, uint32 p2)
{
- if (success) { SndPlayTileFx(0x10, tile); }
+ if (success) SndPlayTileFx(SND_12_EXPLOSION, tile);
}
@@ -91,13 +91,13 @@
if (_networking && !_networking_server) { return;} // only server can pause the game
if (DoCommandP(0, _pause?0:1, 0, NULL, CMD_PAUSE | CMD_NET_INSTANT))
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
}
static void ToolbarFastForwardClick(Window *w)
{
_fast_forward ^= true;
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
}
@@ -596,7 +596,7 @@
_popup_menu_active = true;
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
return w;
}
@@ -617,7 +617,7 @@
WP(w,menu_d).main_button = main_button;
WP(w,menu_d).checked_items = gray;
_popup_menu_active = true;
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
return w;
}
@@ -781,7 +781,7 @@
{
if (DoZoomInOutWindow(ZOOM_IN, FindWindowById(WC_MAIN_WINDOW, 0))) {
HandleButtonClick(w, 17);
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
}
}
@@ -789,7 +789,7 @@
{
if (DoZoomInOutWindow(ZOOM_OUT,FindWindowById(WC_MAIN_WINDOW, 0))) {
HandleButtonClick(w, 18);
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
}
}
@@ -894,7 +894,7 @@
{
if (DoZoomInOutWindow(ZOOM_IN, FindWindowById(WC_MAIN_WINDOW, 0))) {
HandleButtonClick(w, 9);
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
}
}
@@ -902,7 +902,7 @@
{
if (DoZoomInOutWindow(ZOOM_OUT, FindWindowById(WC_MAIN_WINDOW, 0))) {
HandleButtonClick(w, 10);
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
}
}
@@ -966,7 +966,7 @@
ResetLandscape();
}
else { // make random landscape
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
_switch_mode = SM_GENRANDLAND;
}
@@ -991,7 +991,7 @@
static void CcTerraform(bool success, uint tile, uint32 p1, uint32 p2)
{
if (success) {
- SndPlayTileFx(0x1D, tile);
+ SndPlayTileFx(SND_1F_SPLAT, tile);
} else {
SetRedErrorSquare(_terraform_err_tile);
}
@@ -1011,7 +1011,7 @@
if (_terraform_size == 1) {
DoCommandP(tile, 8, (uint32)mode, CcTerraform, CMD_TERRAFORM_LAND | CMD_AUTO);
} else {
- SndPlayTileFx(0x1D, tile);
+ SndPlayTileFx(SND_1F_SPLAT, tile);
size = _terraform_size;
assert(size != 0);
@@ -1070,7 +1070,7 @@
_map5[tile] = (_map5[tile] & ~0x1C) | 8;
MarkTileDirtyByTile(tile);
- SndPlayTileFx(0x1D, tile);
+ SndPlayTileFx(SND_1F_SPLAT, tile);
}
static void PlaceProc_LightHouse(uint tile)
@@ -1082,7 +1082,7 @@
return;
ModifyTile(tile, MP_SETTYPE(MP_UNMOVABLE) | MP_MAP5, 1);
- SndPlayTileFx(0x1D, tile);
+ SndPlayTileFx(SND_1F_SPLAT, tile);
}
static void PlaceProc_Transmitter(uint tile)
@@ -1094,7 +1094,7 @@
return;
ModifyTile(tile, MP_SETTYPE(MP_UNMOVABLE) | MP_MAP5, 0);
- SndPlayTileFx(0x1D, tile);
+ SndPlayTileFx(SND_1F_SPLAT, tile);
}
static void PlaceProc_Desert(uint tile)
@@ -1180,7 +1180,7 @@
if (!IS_INT_INSIDE(size, 1, 8+1))
return;
_terraform_size = size;
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
SetWindowDirty(w);
break;
}
@@ -1252,7 +1252,7 @@
static void ToolbarScenGenLand(Window *w)
{
HandleButtonClick(w, 11);
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
AllocateWindowDescFront(&_scen_edit_land_gen_desc, 0);
}
@@ -1260,7 +1260,7 @@
static void CcBuildTown(bool success, uint tile, uint32 p1, uint32 p2)
{
if (success) {
- SndPlayTileFx(0x1D, tile);
+ SndPlayTileFx(SND_1F_SPLAT, tile);
ResetObjectToPlace();
}
}
@@ -1350,7 +1350,7 @@
static void ToolbarScenGenTown(Window *w)
{
HandleButtonClick(w, 12);
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
AllocateWindowDescFront(&_scen_edit_town_gen_desc, 0);
}
@@ -1594,28 +1594,28 @@
static void ToolbarScenGenIndustry(Window *w)
{
HandleButtonClick(w, 13);
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
AllocateWindowDescFront(_scenedit_industry_descs[_opt.landscape],0);
}
static void ToolbarScenBuildRoad(Window *w)
{
HandleButtonClick(w, 14);
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
ShowBuildRoadScenToolbar();
}
static void ToolbarScenPlantTrees(Window *w)
{
HandleButtonClick(w, 15);
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
ShowBuildTreesScenToolbar();
}
static void ToolbarScenPlaceSign(Window *w)
{
HandleButtonClick(w, 16);
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
SelectSignTool();
}
--- a/misc_gui.c Sat Dec 04 07:41:37 2004 +0000
+++ b/misc_gui.c Sat Dec 04 09:26:39 2004 +0000
@@ -267,7 +267,7 @@
case 16: /* place trees randomly over the landscape*/
w->click_state |= 1 << 16;
w->flags4 |= 5 << WF_TIMEOUT_SHL;
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
PlaceTreesRandomly();
MarkWholeScreenDirty();
break;
--- a/news_gui.c Sat Dec 04 07:41:37 2004 +0000
+++ b/news_gui.c Sat Dec 04 09:26:39 2004 +0000
@@ -369,7 +369,7 @@
{
Window *w;
- SndPlayFx(20);
+ SndPlayFx(SND_16_MORSE);
_statusbar_news_item = *ni;
w = FindWindowById(WC_STATUS_BAR, 0);
if (w != NULL)
--- a/players.c Sat Dec 04 07:41:37 2004 +0000
+++ b/players.c Sat Dec 04 09:26:39 2004 +0000
@@ -592,9 +592,9 @@
ShowPlayerFinances(_local_player);
p = DEREF_PLAYER(_local_player);
if (p->num_valid_stat_ent > 5 && p->old_economy[0].performance_history < p->old_economy[4].performance_history) {
- SndPlayFx(0x28);
+ SndPlayFx(SND_01_BAD_YEAR);
} else {
- SndPlayFx(0x27);
+ SndPlayFx(SND_00_GOOD_YEAR);
}
}
}
--- a/rail_cmd.c Sat Dec 04 07:41:37 2004 +0000
+++ b/rail_cmd.c Sat Dec 04 09:26:39 2004 +0000
@@ -542,7 +542,7 @@
int railbit;
if (flags & DC_EXEC)
- SndPlayTileFx(0x1E, TILE_FROM_XY(x,y));
+ SndPlayTileFx(SND_20_SPLAT_2, TILE_FROM_XY(x,y));
/* unpack end point */
sx = (p1 & 0xFFFF) & ~0xF;
@@ -592,7 +592,7 @@
int railbit;
if (flags & DC_EXEC)
- SndPlayTileFx(0x1E, TILE_FROM_XY(x,y));
+ SndPlayTileFx(SND_20_SPLAT_2, TILE_FROM_XY(x,y));
/* unpack start point */
sx = (p1 & 0xFFFF) & ~0xF;
--- a/rail_gui.c Sat Dec 04 07:41:37 2004 +0000
+++ b/rail_gui.c Sat Dec 04 09:26:39 2004 +0000
@@ -33,7 +33,7 @@
static void CcPlaySound1E(bool success, uint tile, uint32 p1, uint32 p2)
{
- if (success) SndPlayTileFx(0x1E, tile);
+ if (success) SndPlayTileFx(SND_20_SPLAT_2, tile);
}
static void GenericPlaceRail(uint tile, int cmd)
@@ -96,7 +96,7 @@
if (success) {
int dir = p2;
- SndPlayTileFx(0x1E, tile);
+ SndPlayTileFx(SND_20_SPLAT_2, tile);
ResetObjectToPlace();
tile += _place_depot_offs_xy[dir];
@@ -127,7 +127,7 @@
static void CcStation(bool success, uint tile, uint32 p1, uint32 p2)
{
if (success) {
- SndPlayTileFx(0x1E, tile);
+ SndPlayTileFx(SND_20_SPLAT_2, tile);
ResetObjectToPlace();
}
}
@@ -183,7 +183,7 @@
static void CcBuildTunnel(bool success, uint tile, uint32 p1, uint32 p2)
{
if (success) {
- SndPlayTileFx(0x1E, tile);
+ SndPlayTileFx(SND_20_SPLAT_2, tile);
ResetObjectToPlace();
} else {
SetRedErrorSquare(_build_tunnel_endtile);
@@ -287,7 +287,7 @@
if (w->disabled_state & (1<<16))
return;
SetWindowDirty(w);
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
_thd.make_square_red = !!((w->click_state ^= (1 << 16)) & (1<<16));
MarkTileDirty(_thd.pos.x, _thd.pos.y);
@@ -900,7 +900,7 @@
case 3:
case 4:
_railstation.orientation = e->click.widget - 3;
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
SetWindowDirty(w);
break;
@@ -913,7 +913,7 @@
case 11:
_railstation.numtracks = (e->click.widget - 5) + 1;
_railstation.dragdrop = false;
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
SetWindowDirty(w);
break;
@@ -926,20 +926,20 @@
case 18:
_railstation.platlength = (e->click.widget - 12) + 1;
_railstation.dragdrop = false;
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
SetWindowDirty(w);
break;
case 19:
_railstation.dragdrop ^= true;
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
SetWindowDirty(w);
break;
case 20:
case 21:
_station_show_coverage = e->click.widget - 20;
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
SetWindowDirty(w);
break;
}
@@ -1025,7 +1025,7 @@
case 5:
case 6:
_build_depot_direction = e->click.widget - 3;
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
SetWindowDirty(w);
break;
}
@@ -1091,7 +1091,7 @@
case 6:
case 7:
_cur_waypoint_type = e->click.widget - 3;
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
SetWindowDirty(w);
break;
}
--- a/road_cmd.c Sat Dec 04 07:41:37 2004 +0000
+++ b/road_cmd.c Sat Dec 04 09:26:39 2004 +0000
@@ -973,7 +973,7 @@
if (GetTileSlope(tile, NULL) == 0 && EnsureNoVehicle(tile) && CHANCE16(1,20)) {
_map2[tile] = ((_map2[tile]&7) <= 1) ? 6 : 7;
- SndPlayTileFx(0x1F,tile);
+ SndPlayTileFx(SND_21_JACKHAMMER, tile);
CreateEffectVehicleAbove(
GET_TILE_X(tile) * 16 + 7,
GET_TILE_Y(tile) * 16 + 7,
@@ -1086,7 +1086,7 @@
if ((_map5[tile] & 0xF0) == 0x10) {
if (v->type == VEH_Train && (_map5[tile] & 4) == 0) {
/* train crossing a road */
- SndPlayVehicleFx(12, v);
+ SndPlayVehicleFx(SND_0E_LEVEL_CROSSING, v);
_map5[tile] |= 4;
MarkTileDirtyByTile(tile);
}
--- a/road_gui.c Sat Dec 04 07:41:37 2004 +0000
+++ b/road_gui.c Sat Dec 04 09:26:39 2004 +0000
@@ -22,7 +22,7 @@
static void CcPlaySound1D(bool success, uint tile, uint32 p1, uint32 p2)
{
- if (success) { SndPlayTileFx(0x1D, tile); }
+ if (success) SndPlayTileFx(SND_1F_SPLAT, tile);
}
static void PlaceRoad_NE(uint tile)
@@ -46,7 +46,7 @@
static void CcBuildTunnel(bool success, uint tile, uint32 p1, uint32 p2)
{
if (success) {
- SndPlayTileFx(0x1E, tile);
+ SndPlayTileFx(SND_20_SPLAT_2, tile);
ResetObjectToPlace();
} else {
SetRedErrorSquare(_build_tunnel_endtile);
@@ -71,7 +71,7 @@
static void CcDepot(bool success, uint tile, uint32 p1, uint32 p2)
{
if (success) {
- SndPlayTileFx(0x1D, tile);
+ SndPlayTileFx(SND_1F_SPLAT, tile);
ResetObjectToPlace();
BuildRoadOutsideStation(tile, (int)p1);
}
@@ -159,7 +159,7 @@
if (w->disabled_state & (1<<12))
return;
SetWindowDirty(w);
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
_thd.make_square_red = !!((w->click_state ^= (1 << 12)) & (1<<12));
MarkTileDirty(_thd.pos.x, _thd.pos.y);
}
@@ -362,7 +362,7 @@
case 5:
case 6:
_road_depot_orientation = e->click.widget - 3;
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
SetWindowDirty(w);
break;
}
@@ -436,13 +436,13 @@
case 5:
case 6:
_road_station_picker_orientation = e->click.widget - 3;
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
SetWindowDirty(w);
break;
case 7:
case 8:
_station_show_coverage = e->click.widget - 7;
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
SetWindowDirty(w);
break;
}
--- a/roadveh_cmd.c Sat Dec 04 07:41:37 2004 +0000
+++ b/roadveh_cmd.c Sat Dec 04 09:26:39 2004 +0000
@@ -503,7 +503,7 @@
0);
ModifyStationRatingAround(v->tile, v->owner, -160, 22);
- SndPlayVehicleFx(16, v);
+ SndPlayVehicleFx(SND_12_EXPLOSION, v);
}
static void RoadVehCheckTrainCrash(Vehicle *v)
@@ -536,7 +536,8 @@
InvalidateWindow(WC_VEHICLE_VIEW, v->index);
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
- SndPlayVehicleFx((_opt.landscape != LT_CANDY) ? 0xD : 0x34, v);
+ SndPlayVehicleFx((_opt.landscape != LT_CANDY) ?
+ SND_0F_VEHICLE_BREAKDOWN : SND_35_COMEDY_BREAKDOWN, v);
if (!(v->vehstatus & VS_HIDDEN)) {
Vehicle *u = CreateEffectVehicleRel(v, 4, 4, 5, EV_BREAKDOWN_SMOKE);
@@ -635,8 +636,9 @@
static void StartRoadVehSound(Vehicle *v)
{
- int s = RoadVehInfo(v->engine_type)->sfx;
- if (s == 23 && (v->tick_counter&3) == 0) s++;
+ SoundFx s = RoadVehInfo(v->engine_type)->sfx;
+ if (s == SND_19_BUS_START_PULL_AWAY && (v->tick_counter & 3) == 0)
+ s = SND_1A_BUS_START_PULL_AWAY_WITH_HORN;
SndPlayVehicleFx(s, v);
}
--- a/ship_cmd.c Sat Dec 04 07:41:37 2004 +0000
+++ b/ship_cmd.c Sat Dec 04 09:26:39 2004 +0000
@@ -157,7 +157,8 @@
InvalidateWindow(WC_VEHICLE_VIEW, v->index);
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
- SndPlayVehicleFx((_opt.landscape != LT_CANDY) ? 0xE : 0x3A, v);
+ SndPlayVehicleFx((_opt.landscape != LT_CANDY) ?
+ SND_10_TRAIN_BREAKDOWN : SND_3A_COMEDY_BREAKDOWN_2, v);
if (!(v->vehstatus & VS_HIDDEN)) {
Vehicle *u = CreateEffectVehicleRel(v, 4, 4, 5, EV_BREAKDOWN_SMOKE);
--- a/smallmap_gui.c Sat Dec 04 07:41:37 2004 +0000
+++ b/smallmap_gui.c Sat Dec 04 09:26:39 2004 +0000
@@ -881,7 +881,7 @@
case 2: {/* big/small size */
// const Widget *wi = w->widget;
DeleteWindow(w);
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
{
int i = _smallmap_size + 1;
if (i == 3) i = 0;
@@ -913,14 +913,14 @@
_smallmap_type = e->click.widget - 5;
SetWindowDirty(w);
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
break;
case 11: /* toggle town names */
w->click_state ^= (1 << 11);
_smallmap_show_towns = (w->click_state >> 11) & 1;
SetWindowDirty(w);
- SndPlayFx(0x13);
+ SndPlayFx(SND_15_BEEP);
break;
}
break;
--- a/terraform_gui.c Sat Dec 04 07:41:37 2004 +0000
+++ b/terraform_gui.c Sat Dec 04 09:26:39 2004 +0000
@@ -13,7 +13,7 @@
static void CcTerraform(bool success, uint tile, uint32 p1, uint32 p2)
{
if (success) {
- SndPlayTileFx(0x1D, tile);
+ SndPlayTileFx(SND_1F_SPLAT, tile);
} else {
SetRedErrorSquare(_terraform_err_tile);
}
--- a/train_cmd.c Sat Dec 04 07:41:37 2004 +0000
+++ b/train_cmd.c Sat Dec 04 09:26:39 2004 +0000
@@ -1243,7 +1243,12 @@
static void TrainPlayLeaveStationSound(Vehicle *v)
{
- static const byte sfx[3] = { 0x2, 0x8, 0x8 };
+ static const SoundFx sfx[] = {
+ SND_04_TRAIN,
+ SND_0A_TRAIN_HORN,
+ SND_0A_TRAIN_HORN
+ };
+
int engtype = v->engine_type;
switch (_engines[engtype].railtype) {
@@ -2007,7 +2012,7 @@
0);
ModifyStationRatingAround(v->tile, v->owner, -160, 30);
- SndPlayVehicleFx(17, v);
+ SndPlayVehicleFx(SND_13_BIG_CRASH, v);
}
static void *CheckVehicleAtSignal(Vehicle *v, void *data)
@@ -2320,7 +2325,8 @@
InvalidateWindow(WC_VEHICLE_VIEW, v->index);
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
- SndPlayVehicleFx((_opt.landscape != LT_CANDY) ? 0xE : 0x3A, v);
+ SndPlayVehicleFx((_opt.landscape != LT_CANDY) ?
+ SND_10_TRAIN_BREAKDOWN : SND_3A_COMEDY_BREAKDOWN_2, v);
if (!(v->vehstatus & VS_HIDDEN)) {
Vehicle *u = CreateEffectVehicleRel(v, 4, 4, 5, EV_BREAKDOWN_SMOKE);
@@ -2417,7 +2423,7 @@
if (IS_TILETYPE(tile, MP_STREET) && (_map5[tile] & 0xF0)==0x10) {
if (!(_map5[tile] & 4)) {
_map5[tile] |= 4;
- SndPlayVehicleFx(12, v);
+ SndPlayVehicleFx(SND_0E_LEVEL_CROSSING, v);
MarkTileDirtyByTile(tile);
}
}
--- a/tree_cmd.c Sat Dec 04 07:41:37 2004 +0000
+++ b/tree_cmd.c Sat Dec 04 09:26:39 2004 +0000
@@ -382,8 +382,11 @@
/* not used */
}
-static byte _desert_sounds[] = {
- 66,67,68,72
+static SoundFx _desert_sounds[] = {
+ SND_42_LOON_BIRD,
+ SND_43_LION,
+ SND_44_MONKEYS,
+ SND_48_DISTANT_BIRD
};
static void TileLoopTreesDesert(uint tile)
@@ -440,7 +443,7 @@
if (tmp == 0xC0) {
uint32 r;
if (CHANCE16I(1,200,r=Random())) {
- SndPlayTileFx( (r&0x80000000) ? 57 : 52, tile);
+ SndPlayTileFx((r & 0x80000000) ? SND_39_HEAVY_WIND : SND_34_WIND, tile);
}
return;
} else {
--- a/tunnelbridge_cmd.c Sat Dec 04 07:41:37 2004 +0000
+++ b/tunnelbridge_cmd.c Sat Dec 04 09:26:39 2004 +0000
@@ -1407,7 +1407,7 @@
if (v->u.rail.track != 0x40 && dir == vdir) {
if (v->subtype == 0 && fc == _tunnel_fractcoord_1[dir]) {
if (v->spritenum < 4)
- SndPlayVehicleFx(3, v);
+ SndPlayVehicleFx(SND_05_TRAIN_THROUGH_TUNNEL, v);
return 0;
}
if (fc == _tunnel_fractcoord_2[dir]) {
--- a/vehicle.c Sat Dec 04 07:41:37 2004 +0000
+++ b/vehicle.c Sat Dec 04 09:26:39 2004 +0000
@@ -1106,7 +1106,7 @@
if (*b == 0x81) {
if (v->z_pos > 180 || CHANCE16(1,96)) {
v->spritenum = 5;
- SndPlayVehicleFx(0x2F, v);
+ SndPlayVehicleFx(SND_2F_POP, v);
}
et = 0;
goto again;
@@ -1116,7 +1116,7 @@
uint tile;
et++;
- SndPlayVehicleFx(0x31, v);
+ SndPlayVehicleFx(SND_31_EXTRACT, v);
tile = TILE_FROM_XY(v->x_pos, v->y_pos);
if (IS_TILETYPE(tile, MP_INDUSTRY) &&
--- a/water_cmd.c Sat Dec 04 07:41:37 2004 +0000
+++ b/water_cmd.c Sat Dec 04 09:26:39 2004 +0000
@@ -565,7 +565,7 @@
0);
}
CreateEffectVehicleRel(v,4,4,8,EV_CRASHED_SMOKE); // show cool destruction effects
- SndPlayVehicleFx(16, v); // create sound
+ SndPlayVehicleFx(SND_12_EXPLOSION, v); // create sound
}
// called from tunnelbridge_cmd