# dummy_land.cpp

Go to the documentation of this file.

    00001 /* $Id: dummy_land.cpp 16744 2009-07-04 21:06:17Z rubidium $ */
    00002
    00005 #include "stdafx.h"
    00006 #include "tile_cmd.h"
    00007 #include "command_func.h"
    00008 #include "viewport_func.h"
    00009
    00010 #include "table/strings.h"
    00011 #include "table/sprites.h"
    00012
    00013 static void DrawTile_Dummy(TileInfo *ti)
    00014 {
    00015   DrawGroundSpriteAt(SPR_SHADOW_CELL, PAL_NONE, ti->x, ti->y, ti->z);
    00016 }
    00017
    00018
    00019 static uint GetSlopeZ_Dummy(TileIndex tile, uint x, uint y)
    00020 {
    00021   return 0;
    00022 }
    00023
    00024 static Foundation GetFoundation_Dummy(TileIndex tile, Slope tileh)
    00025 {
    00026   return FOUNDATION_NONE;
    00027 }
    00028
    00029 static CommandCost ClearTile_Dummy(TileIndex tile, DoCommandFlag flags)
    00030 {
    00031   return_cmd_error(STR_0001_OFF_EDGE_OF_MAP);
    00032 }
    00033
    00034
    00035 static void GetAcceptedCargo_Dummy(TileIndex tile, AcceptedCargo ac)
    00036 {
    00037   /* not used */
    00038 }
    00039
    00040 static void GetTileDesc_Dummy(TileIndex tile, TileDesc *td)
    00041 {
    00042   td->str = STR_EMPTY;
    00043   td->owner[0] = OWNER_NONE;
    00044 }
    00045
    00046 static void TileLoop_Dummy(TileIndex tile)
    00047 {
    00048   /* not used */
    00049 }
    00050
    00051 static void ChangeTileOwner_Dummy(TileIndex tile, Owner old_owner, Owner new_owner)
    00052 {
    00053   /* not used */
    00054 }
    00055
    00056 static TrackStatus GetTileTrackStatus_Dummy(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side)
    00057 {
    00058   return 0;
    00059 }
    00060
    00061 static CommandCost TerraformTile_Dummy(TileIndex tile, DoCommandFlag flags, uint z_new, Slope tileh_new)
    00062 {
    00063   return_cmd_error(STR_0001_OFF_EDGE_OF_MAP);
    00064 }
    00065
    00066 extern const TileTypeProcs _tile_type_dummy_procs = {
    00067   DrawTile_Dummy,           // draw_tile_proc
    00068   GetSlopeZ_Dummy,          // get_slope_z_proc
    00069   ClearTile_Dummy,          // clear_tile_proc
    00070   GetAcceptedCargo_Dummy,   // get_accepted_cargo_proc
    00071   GetTileDesc_Dummy,        // get_tile_desc_proc
    00072   GetTileTrackStatus_Dummy, // get_tile_track_status_proc
    00073   NULL,                     // click_tile_proc
    00074   NULL,                     // animate_tile_proc
    00075   TileLoop_Dummy,           // tile_loop_clear
    00076   ChangeTileOwner_Dummy,    // change_tile_owner_clear
    00077   NULL,                     // get_produced_cargo_proc
    00078   NULL,                     // vehicle_enter_tile_proc
    00079   GetFoundation_Dummy,      // get_foundation_proc
    00080   TerraformTile_Dummy,      // terraform_tile_proc
    00081 };