(svn r1549) Clean up some functions:

uint tile -> TileIndex tile
if () cascade -> switch ()
This commit is contained in:
tron
2005-01-17 09:41:46 +00:00
parent 1644863e32
commit 7ff921855a
4 changed files with 87 additions and 66 deletions

View File

@@ -13,25 +13,31 @@
#include "airport_movement.h"
#include "sound.h"
static void DisasterClearSquare(uint tile)
static void DisasterClearSquare(TileIndex tile)
{
int type;
if (!EnsureNoVehicle(tile))
return;
type = TileType(tile);
switch (TileType(tile)) {
case MP_RAILWAY:
if (IS_HUMAN_PLAYER(_map_owner[tile])) DoClearSquare(tile);
break;
if (type == MP_RAILWAY) {
if (IS_HUMAN_PLAYER(_map_owner[tile]))
case MP_HOUSE: {
byte p = _current_player;
_current_player = OWNER_NONE;
DoCommandByTile(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
_current_player = p;
break;
}
case MP_TREES:
case MP_CLEAR:
DoClearSquare(tile);
} else if (type == MP_HOUSE) {
byte p = _current_player;
_current_player = OWNER_NONE;
DoCommandByTile(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
_current_player = p;
} else if (type == MP_TREES || type == MP_CLEAR) {
DoClearSquare(tile);
break;
default:
break;
}
}