# dummy_land.cpp

Go to the documentation of this file.

    00001 /* $Id: dummy_land.cpp 18702 2010-01-03 20:55:00Z frosch $ */
    00002
    00003 /*
    00004  * This file is part of OpenTTD.
    00005  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
    00006  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    00007  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
    00008  */
    00009
    00012 #include "stdafx.h"
    00013 #include "tile_cmd.h"
    00014 #include "command_func.h"
    00015 #include "viewport_func.h"
    00016
    00017 #include "table/strings.h"
    00018 #include "table/sprites.h"
    00019
    00020 static void DrawTile_Dummy(TileInfo *ti)
    00021 {
    00022   DrawGroundSprite(SPR_SHADOW_CELL, PAL_NONE);
    00023 }
    00024
    00025
    00026 static uint GetSlopeZ_Dummy(TileIndex tile, uint x, uint y)
    00027 {
    00028   return TilePixelHeight(tile);
    00029 }
    00030
    00031 static Foundation GetFoundation_Dummy(TileIndex tile, Slope tileh)
    00032 {
    00033   return FOUNDATION_NONE;
    00034 }
    00035
    00036 static CommandCost ClearTile_Dummy(TileIndex tile, DoCommandFlag flags)
    00037 {
    00038   return_cmd_error(STR_ERROR_OFF_EDGE_OF_MAP);
    00039 }
    00040
    00041
    00042 static void GetTileDesc_Dummy(TileIndex tile, TileDesc *td)
    00043 {
    00044   td->str = STR_EMPTY;
    00045   td->owner[0] = OWNER_NONE;
    00046 }
    00047
    00048 static void TileLoop_Dummy(TileIndex tile)
    00049 {
    00050   /* not used */
    00051 }
    00052
    00053 static void ChangeTileOwner_Dummy(TileIndex tile, Owner old_owner, Owner new_owner)
    00054 {
    00055   /* not used */
    00056 }
    00057
    00058 static TrackStatus GetTileTrackStatus_Dummy(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side)
    00059 {
    00060   return 0;
    00061 }
    00062
    00063 static CommandCost TerraformTile_Dummy(TileIndex tile, DoCommandFlag flags, uint z_new, Slope tileh_new)
    00064 {
    00065   return_cmd_error(STR_ERROR_OFF_EDGE_OF_MAP);
    00066 }
    00067
    00068 extern const TileTypeProcs _tile_type_dummy_procs = {
    00069   DrawTile_Dummy,           // draw_tile_proc
    00070   GetSlopeZ_Dummy,          // get_slope_z_proc
    00071   ClearTile_Dummy,          // clear_tile_proc
    00072   NULL,                     // add_accepted_cargo_proc
    00073   GetTileDesc_Dummy,        // get_tile_desc_proc
    00074   GetTileTrackStatus_Dummy, // get_tile_track_status_proc
    00075   NULL,                     // click_tile_proc
    00076   NULL,                     // animate_tile_proc
    00077   TileLoop_Dummy,           // tile_loop_clear
    00078   ChangeTileOwner_Dummy,    // change_tile_owner_clear
    00079   NULL,                     // add_produced_cargo_proc
    00080   NULL,                     // vehicle_enter_tile_proc
    00081   GetFoundation_Dummy,      // get_foundation_proc
    00082   TerraformTile_Dummy,      // terraform_tile_proc
    00083 };