1
0
Fork 0

(svn r16744) [0.7] -Backport from trunk:

- Fix: r16660 and r16669 are needed to make r16709 work as it should.
- Fix: some small 'errors' in the English language file
release/0.7
rubidium 2009-07-04 21:06:17 +00:00
parent a97240dede
commit 893bccf4c8
12 changed files with 75 additions and 148 deletions

View File

@ -123,11 +123,6 @@ static void GetAcceptedCargo_Clear(TileIndex tile, AcceptedCargo ac)
/* unused */
}
static void AnimateTile_Clear(TileIndex tile)
{
/* unused */
}
void TileLoopClearHelper(TileIndex tile)
{
byte self;
@ -317,12 +312,6 @@ get_out:;
} while (--i);
}
static bool ClickTile_Clear(TileIndex tile)
{
/* not used */
return false;
}
static TrackStatus GetTileTrackStatus_Clear(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side)
{
return 0;
@ -369,8 +358,8 @@ extern const TileTypeProcs _tile_type_clear_procs = {
GetAcceptedCargo_Clear, ///< get_accepted_cargo_proc
GetTileDesc_Clear, ///< get_tile_desc_proc
GetTileTrackStatus_Clear, ///< get_tile_track_status_proc
ClickTile_Clear, ///< click_tile_proc
AnimateTile_Clear, ///< animate_tile_proc
NULL, ///< click_tile_proc
NULL, ///< animate_tile_proc
TileLoop_Clear, ///< tile_loop_clear
ChangeTileOwner_Clear, ///< change_tile_owner_clear
NULL, ///< get_produced_cargo_proc

View File

@ -43,22 +43,11 @@ static void GetTileDesc_Dummy(TileIndex tile, TileDesc *td)
td->owner[0] = OWNER_NONE;
}
static void AnimateTile_Dummy(TileIndex tile)
{
/* not used */
}
static void TileLoop_Dummy(TileIndex tile)
{
/* not used */
}
static bool ClickTile_Dummy(TileIndex tile)
{
/* not used */
return false;
}
static void ChangeTileOwner_Dummy(TileIndex tile, Owner old_owner, Owner new_owner)
{
/* not used */
@ -81,8 +70,8 @@ extern const TileTypeProcs _tile_type_dummy_procs = {
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
NULL, // click_tile_proc
NULL, // animate_tile_proc
TileLoop_Dummy, // tile_loop_clear
ChangeTileOwner_Dummy, // change_tile_owner_clear
NULL, // get_produced_cargo_proc

View File

@ -510,16 +510,6 @@ void GetAcceptedCargo(TileIndex tile, AcceptedCargo ac)
_tile_type_procs[GetTileType(tile)]->get_accepted_cargo_proc(tile, ac);
}
void AnimateTile(TileIndex tile)
{
_tile_type_procs[GetTileType(tile)]->animate_tile_proc(tile);
}
bool ClickTile(TileIndex tile)
{
return _tile_type_procs[GetTileType(tile)]->click_tile_proc(tile);
}
void GetTileDesc(TileIndex tile, TileDesc *td)
{
_tile_type_procs[GetTileType(tile)]->get_tile_desc_proc(tile, td);

View File

@ -2078,11 +2078,6 @@ static void GetAcceptedCargo_Track(TileIndex tile, AcceptedCargo ac)
/* not used */
}
static void AnimateTile_Track(TileIndex tile)
{
/* not used */
}
static void TileLoop_Track(TileIndex tile)
{
RailGroundType old_ground = GetRailGroundType(tile);
@ -2621,7 +2616,7 @@ extern const TileTypeProcs _tile_type_rail_procs = {
GetTileDesc_Track, // get_tile_desc_proc
GetTileTrackStatus_Track, // get_tile_track_status_proc
ClickTile_Track, // click_tile_proc
AnimateTile_Track, // animate_tile_proc
NULL, // animate_tile_proc
TileLoop_Track, // tile_loop_clear
ChangeTileOwner_Track, // change_tile_owner_clear
NULL, // get_produced_cargo_proc

View File

@ -1292,12 +1292,6 @@ static void GetAcceptedCargo_Road(TileIndex tile, AcceptedCargo ac)
/* not used */
}
static void AnimateTile_Road(TileIndex tile)
{
if (IsLevelCrossing(tile)) MarkTileDirtyByTile(tile);
}
static const Roadside _town_road_types[][2] = {
{ ROADSIDE_GRASS, ROADSIDE_GRASS },
{ ROADSIDE_PAVED, ROADSIDE_PAVED },
@ -1646,7 +1640,7 @@ extern const TileTypeProcs _tile_type_road_procs = {
GetTileDesc_Road, // get_tile_desc_proc
GetTileTrackStatus_Road, // get_tile_track_status_proc
ClickTile_Road, // click_tile_proc
AnimateTile_Road, // animate_tile_proc
NULL, // animate_tile_proc
TileLoop_Road, // tile_loop_clear
ChangeTileOwner_Road, // change_tile_owner_clear
NULL, // get_produced_cargo_proc

View File

@ -16,6 +16,7 @@
#include "direction_type.h"
#include "track_type.h"
#include "transport_type.h"
#include "tile_map.h"
/** The returned bits of VehicleEnterTile. */
enum VehicleEnterTileStatus {
@ -155,8 +156,20 @@ TrackStatus GetTileTrackStatus(TileIndex tile, TransportType mode, uint sub_mode
VehicleEnterTileStatus VehicleEnterTile(Vehicle *v, TileIndex tile, int x, int y);
void GetAcceptedCargo(TileIndex tile, AcceptedCargo ac);
void ChangeTileOwner(TileIndex tile, Owner old_owner, Owner new_owner);
void AnimateTile(TileIndex tile);
bool ClickTile(TileIndex tile);
void GetTileDesc(TileIndex tile, TileDesc *td);
static inline void AnimateTile(TileIndex tile)
{
AnimateTileProc *proc = _tile_type_procs[GetTileType(tile)]->animate_tile_proc;
assert(proc != NULL);
proc(tile);
}
static inline bool ClickTile(TileIndex tile)
{
ClickTileProc *proc = _tile_type_procs[GetTileType(tile)]->click_tile_proc;
if (proc == NULL) return false;
return proc(tile);
}
#endif /* TILE_CMD_H */

View File

@ -511,16 +511,6 @@ static void TileLoop_Town(TileIndex tile)
_current_company = OWNER_NONE;
}
/**
* Dummy tile callback function for handling tile clicks in towns
* @param tile unused
*/
static bool ClickTile_Town(TileIndex tile)
{
/* not used */
return false;
}
static CommandCost ClearTile_Town(TileIndex tile, DoCommandFlag flags)
{
if (flags & DC_AUTO) return_cmd_error(STR_2004_BUILDING_MUST_BE_DEMOLISHED);
@ -2772,7 +2762,7 @@ extern const TileTypeProcs _tile_type_town_procs = {
GetAcceptedCargo_Town, // get_accepted_cargo_proc
GetTileDesc_Town, // get_tile_desc_proc
GetTileTrackStatus_Town, // get_tile_track_status_proc
ClickTile_Town, // click_tile_proc
NULL, // click_tile_proc
AnimateTile_Town, // animate_tile_proc
TileLoop_Town, // tile_loop_clear
ChangeTileOwner_Town, // change_tile_owner_clear

View File

@ -562,11 +562,6 @@ static void GetTileDesc_Trees(TileIndex tile, TileDesc *td)
td->owner[0] = GetTileOwner(tile);
}
static void AnimateTile_Trees(TileIndex tile)
{
/* not used */
}
static void TileLoopTreesDesert(TileIndex tile)
{
switch (GetTropicZone(tile)) {
@ -742,12 +737,6 @@ void OnTick_Trees()
}
}
static bool ClickTile_Trees(TileIndex tile)
{
/* not used */
return false;
}
static TrackStatus GetTileTrackStatus_Trees(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side)
{
return 0;
@ -776,8 +765,8 @@ extern const TileTypeProcs _tile_type_trees_procs = {
GetAcceptedCargo_Trees, // get_accepted_cargo_proc
GetTileDesc_Trees, // get_tile_desc_proc
GetTileTrackStatus_Trees, // get_tile_track_status_proc
ClickTile_Trees, // click_tile_proc
AnimateTile_Trees, // animate_tile_proc
NULL, // click_tile_proc
NULL, // animate_tile_proc
TileLoop_Trees, // tile_loop_clear
ChangeTileOwner_Trees, // change_tile_owner_clear
NULL, // get_produced_cargo_proc

View File

@ -1285,11 +1285,6 @@ static void GetTileDesc_TunnelBridge(TileIndex tile, TileDesc *td)
}
static void AnimateTile_TunnelBridge(TileIndex tile)
{
/* not used */
}
static void TileLoop_TunnelBridge(TileIndex tile)
{
bool snow_or_desert = HasTunnelBridgeSnowOrDesert(tile);
@ -1313,13 +1308,6 @@ static void TileLoop_TunnelBridge(TileIndex tile)
}
}
static bool ClickTile_TunnelBridge(TileIndex tile)
{
/* not used */
return false;
}
static TrackStatus GetTileTrackStatus_TunnelBridge(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side)
{
TransportType transport_type = GetTunnelBridgeTransportType(tile);
@ -1541,8 +1529,8 @@ extern const TileTypeProcs _tile_type_tunnelbridge_procs = {
GetAcceptedCargo_TunnelBridge, // get_accepted_cargo_proc
GetTileDesc_TunnelBridge, // get_tile_desc_proc
GetTileTrackStatus_TunnelBridge, // get_tile_track_status_proc
ClickTile_TunnelBridge, // click_tile_proc
AnimateTile_TunnelBridge, // animate_tile_proc
NULL, // click_tile_proc
NULL, // animate_tile_proc
TileLoop_TunnelBridge, // tile_loop_clear
ChangeTileOwner_TunnelBridge, // change_tile_owner_clear
NULL, // get_produced_cargo_proc

View File

@ -319,11 +319,6 @@ static void GetTileDesc_Unmovable(TileIndex tile, TileDesc *td)
td->owner[0] = GetTileOwner(tile);
}
static void AnimateTile_Unmovable(TileIndex tile)
{
/* not used */
}
static void TileLoop_Unmovable(TileIndex tile)
{
if (!IsCompanyHQ(tile)) return;
@ -505,7 +500,7 @@ extern const TileTypeProcs _tile_type_unmovable_procs = {
GetTileDesc_Unmovable, // get_tile_desc_proc
GetTileTrackStatus_Unmovable, // get_tile_track_status_proc
ClickTile_Unmovable, // click_tile_proc
AnimateTile_Unmovable, // animate_tile_proc
NULL, // animate_tile_proc
TileLoop_Unmovable, // tile_loop_clear
ChangeTileOwner_Unmovable, // change_tile_owner_clear
NULL, // get_produced_cargo_proc

View File

@ -706,11 +706,6 @@ static void GetTileDesc_Water(TileIndex tile, TileDesc *td)
td->owner[0] = GetTileOwner(tile);
}
static void AnimateTile_Water(TileIndex tile)
{
/* not used */
}
static void FloodVehicle(Vehicle *v);
/**
@ -1164,7 +1159,7 @@ extern const TileTypeProcs _tile_type_water_procs = {
GetTileDesc_Water, // get_tile_desc_proc
GetTileTrackStatus_Water, // get_tile_track_status_proc
ClickTile_Water, // click_tile_proc
AnimateTile_Water, // animate_tile_proc
NULL, // animate_tile_proc
TileLoop_Water, // tile_loop_clear
ChangeTileOwner_Water, // change_tile_owner_clear
NULL, // get_produced_cargo_proc