2005-07-24 14:12:37 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2008-05-06 15:11:33 +00:00
|
|
|
/** @file dummy_land.cpp Handling of void (or dummy) tiles. */
|
2007-02-23 18:55:07 +00:00
|
|
|
|
2004-08-09 17:04:08 +00:00
|
|
|
#include "stdafx.h"
|
2007-12-21 22:50:51 +00:00
|
|
|
#include "tile_cmd.h"
|
2007-12-21 21:50:46 +00:00
|
|
|
#include "command_func.h"
|
2008-01-09 09:57:48 +00:00
|
|
|
#include "viewport_func.h"
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2008-01-13 01:21:35 +00:00
|
|
|
#include "table/strings.h"
|
|
|
|
#include "table/sprites.h"
|
|
|
|
|
2004-08-09 17:04:08 +00:00
|
|
|
static void DrawTile_Dummy(TileInfo *ti)
|
|
|
|
{
|
2007-01-14 19:57:49 +00:00
|
|
|
DrawGroundSpriteAt(SPR_SHADOW_CELL, PAL_NONE, ti->x, ti->y, ti->z);
|
2004-08-09 17:04:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-08-06 16:32:49 +00:00
|
|
|
static uint GetSlopeZ_Dummy(TileIndex tile, uint x, uint y)
|
2005-10-19 14:49:46 +00:00
|
|
|
{
|
2006-03-21 20:02:05 +00:00
|
|
|
return 0;
|
2004-08-09 17:04:08 +00:00
|
|
|
}
|
|
|
|
|
2007-07-26 16:51:10 +00:00
|
|
|
static Foundation GetFoundation_Dummy(TileIndex tile, Slope tileh)
|
2005-10-22 06:39:32 +00:00
|
|
|
{
|
2007-07-26 16:51:10 +00:00
|
|
|
return FOUNDATION_NONE;
|
2004-08-13 18:27:33 +00:00
|
|
|
}
|
|
|
|
|
2009-02-09 21:20:05 +00:00
|
|
|
static CommandCost ClearTile_Dummy(TileIndex tile, DoCommandFlag flags)
|
2005-06-24 12:38:35 +00:00
|
|
|
{
|
2009-04-21 23:40:56 +00:00
|
|
|
return_cmd_error(STR_ERROR_OFF_EDGE_OF_MAP);
|
2004-08-09 17:04:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-06-24 12:38:35 +00:00
|
|
|
static void GetAcceptedCargo_Dummy(TileIndex tile, AcceptedCargo ac)
|
2004-08-09 17:04:08 +00:00
|
|
|
{
|
|
|
|
/* not used */
|
|
|
|
}
|
|
|
|
|
2005-06-24 12:38:35 +00:00
|
|
|
static void GetTileDesc_Dummy(TileIndex tile, TileDesc *td)
|
2004-08-09 17:04:08 +00:00
|
|
|
{
|
|
|
|
td->str = STR_EMPTY;
|
2008-05-21 22:15:39 +00:00
|
|
|
td->owner[0] = OWNER_NONE;
|
2004-08-09 17:04:08 +00:00
|
|
|
}
|
|
|
|
|
2005-06-24 12:38:35 +00:00
|
|
|
static void AnimateTile_Dummy(TileIndex tile)
|
2004-08-09 17:04:08 +00:00
|
|
|
{
|
|
|
|
/* not used */
|
|
|
|
}
|
|
|
|
|
2005-06-24 12:38:35 +00:00
|
|
|
static void TileLoop_Dummy(TileIndex tile)
|
2004-08-09 17:04:08 +00:00
|
|
|
{
|
|
|
|
/* not used */
|
|
|
|
}
|
|
|
|
|
2009-01-02 22:42:05 +00:00
|
|
|
static bool ClickTile_Dummy(TileIndex tile)
|
2004-08-09 17:04:08 +00:00
|
|
|
{
|
|
|
|
/* not used */
|
2009-01-02 22:42:05 +00:00
|
|
|
return false;
|
2004-08-09 17:04:08 +00:00
|
|
|
}
|
|
|
|
|
2008-09-30 20:39:50 +00:00
|
|
|
static void ChangeTileOwner_Dummy(TileIndex tile, Owner old_owner, Owner new_owner)
|
2004-08-09 17:04:08 +00:00
|
|
|
{
|
|
|
|
/* not used */
|
|
|
|
}
|
|
|
|
|
2008-02-20 17:49:50 +00:00
|
|
|
static TrackStatus GetTileTrackStatus_Dummy(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side)
|
2004-08-09 17:04:08 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2009-02-09 21:20:05 +00:00
|
|
|
static CommandCost TerraformTile_Dummy(TileIndex tile, DoCommandFlag flags, uint z_new, Slope tileh_new)
|
2007-08-30 17:17:04 +00:00
|
|
|
{
|
2009-04-21 23:40:56 +00:00
|
|
|
return_cmd_error(STR_ERROR_OFF_EDGE_OF_MAP);
|
2007-08-30 17:17:04 +00:00
|
|
|
}
|
|
|
|
|
2007-01-10 18:56:51 +00:00
|
|
|
extern const TileTypeProcs _tile_type_dummy_procs = {
|
2009-03-15 00:32:18 +00:00
|
|
|
DrawTile_Dummy, // draw_tile_proc
|
|
|
|
GetSlopeZ_Dummy, // get_slope_z_proc
|
|
|
|
ClearTile_Dummy, // clear_tile_proc
|
|
|
|
GetAcceptedCargo_Dummy, // get_accepted_cargo_proc
|
|
|
|
GetTileDesc_Dummy, // get_tile_desc_proc
|
|
|
|
GetTileTrackStatus_Dummy, // get_tile_track_status_proc
|
|
|
|
ClickTile_Dummy, // click_tile_proc
|
|
|
|
AnimateTile_Dummy, // animate_tile_proc
|
|
|
|
TileLoop_Dummy, // tile_loop_clear
|
|
|
|
ChangeTileOwner_Dummy, // change_tile_owner_clear
|
|
|
|
NULL, // get_produced_cargo_proc
|
|
|
|
NULL, // vehicle_enter_tile_proc
|
|
|
|
GetFoundation_Dummy, // get_foundation_proc
|
|
|
|
TerraformTile_Dummy, // terraform_tile_proc
|
2004-08-09 17:04:08 +00:00
|
|
|
};
|