From 373343cef606e940bfc99aa813cd05d36b15cb45 Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 15 May 2008 13:39:36 +0000 Subject: (svn r13100) -Codechange: reduce the amount of parameters passed via AddNewsMessage as there is (for each news message type) a tuple of 4 parameters that is the same for all calls. --- src/disaster_cmd.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/disaster_cmd.cpp') diff --git a/src/disaster_cmd.cpp b/src/disaster_cmd.cpp index 5dde38145..848f97144 100644 --- a/src/disaster_cmd.cpp +++ b/src/disaster_cmd.cpp @@ -234,7 +234,7 @@ static void DisasterTick_Zeppeliner(Vehicle *v) SetDParam(0, GetStationIndex(tile)); AddNewsItem(STR_B000_ZEPPELIN_DISASTER_AT, - NM_THIN, NF_VIEWPORT | NF_VEHICLE, NT_ACCIDENT, DNC_NONE, + NS_ACCIDENT_VEHICLE, v->index, 0); } @@ -367,7 +367,7 @@ static void DisasterTick_Ufo(Vehicle *v) u->vehstatus |= VS_CRASHED; AddNewsItem(STR_B001_ROAD_VEHICLE_DESTROYED, - NM_THIN, NF_VIEWPORT | NF_VEHICLE, NT_ACCIDENT, DNC_NONE, + NS_ACCIDENT_VEHICLE, u->index, 0); } @@ -442,7 +442,7 @@ static void DisasterTick_Airplane(Vehicle *v) DestructIndustry(i); SetDParam(0, i->town->index); - AddNewsItem(STR_B002_OIL_REFINERY_EXPLOSION, NM_THIN, NF_VIEWPORT | NF_TILE, NT_ACCIDENT, DNC_NONE, i->xy, 0); + AddNewsItem(STR_B002_OIL_REFINERY_EXPLOSION, NS_ACCIDENT_TILE, i->xy, 0); SndPlayTileFx(SND_12_EXPLOSION, i->xy); } } else if (v->current_order.GetDestination() == 0) { @@ -515,7 +515,7 @@ static void DisasterTick_Helicopter(Vehicle *v) DestructIndustry(i); SetDParam(0, i->town->index); - AddNewsItem(STR_B003_FACTORY_DESTROYED_IN_SUSPICIOUS, NM_THIN, NF_VIEWPORT | NF_TILE, NT_ACCIDENT, DNC_NONE, i->xy, 0); + AddNewsItem(STR_B003_FACTORY_DESTROYED_IN_SUSPICIOUS, NS_ACCIDENT_TILE, i->xy, 0); SndPlayTileFx(SND_12_EXPLOSION, i->xy); } } else if (v->current_order.GetDestination() == 0) { @@ -600,7 +600,7 @@ static void DisasterTick_Big_Ufo(Vehicle *v) t = ClosestTownFromTile(v->dest_tile, (uint)-1); SetDParam(0, t->index); AddNewsItem(STR_B004_UFO_LANDS_NEAR, - NM_THIN, NF_VIEWPORT | NF_TILE, NT_ACCIDENT, DNC_NONE, + NS_ACCIDENT_TILE, v->tile, 0); @@ -978,7 +978,7 @@ static void Disaster_CoalMine_Init() if ((GetIndustrySpec(i->type)->behaviour & INDUSTRYBEH_CAN_SUBSIDENCE) && --index < 0) { SetDParam(0, i->town->index); AddNewsItem(STR_B005_COAL_MINE_SUBSIDENCE_LEAVES, - NM_THIN, NF_VIEWPORT | NF_TILE, NT_ACCIDENT, DNC_NONE, i->xy + TileDiffXY(1, 1), 0); + NS_ACCIDENT_TILE, i->xy + TileDiffXY(1, 1), 0); { TileIndex tile = i->xy; -- cgit v1.2.3-54-g00ecf