Files
@ r9769:36b8a3257c9b
Branch filter:
Location: cpp/openttd-patchpack/source/src/autoslope.h - annotation
r9769:36b8a3257c9b
1.4 KiB
text/x-c
(svn r13905) -Update: WebTranslator2 update to 2008-08-01 02:27:37
brazilian_portuguese - 22 fixed by tucalipe (22)
dutch - 9 fixed by habell (9)
estonian - 4 fixed by kristjans (4)
french - 5 fixed, 1 changed by glx (6)
galician - 105 fixed, 206 changed by Condex (311)
italian - 5 fixed, 2 changed by lorenzodv (7)
korean - 15 fixed by leejaeuk5 (15)
portuguese - 48 fixed by supra90 (48)
slovak - 30 fixed by lengyel (30)
spanish - 9 fixed by eusebio (9)
ukrainian - 22 fixed by mad (22)
brazilian_portuguese - 22 fixed by tucalipe (22)
dutch - 9 fixed by habell (9)
estonian - 4 fixed by kristjans (4)
french - 5 fixed, 1 changed by glx (6)
galician - 105 fixed, 206 changed by Condex (311)
italian - 5 fixed, 2 changed by lorenzodv (7)
korean - 15 fixed by leejaeuk5 (15)
portuguese - 48 fixed by supra90 (48)
slovak - 30 fixed by lengyel (30)
spanish - 9 fixed by eusebio (9)
ukrainian - 22 fixed by mad (22)
r7583:7687d94a6f1c r7583:7687d94a6f1c r9111:983de9c5a848 r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r8211:7dc9fca2785c r8254:b96be9ebfc6e r8962:cfbdc736c8db r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c r9413:fcf267325763 r9659:f5984e9c0ecd r7640:7448cde64dcb r7583:7687d94a6f1c r7583:7687d94a6f1c r7583:7687d94a6f1c | /* $Id$ */
/** @file autoslope.h Functions related to autoslope. */
#ifndef AUTOSLOPE_H
#define AUTOSLOPE_H
#include "settings_type.h"
#include "player_func.h"
#include "depot_func.h"
/**
* Autoslope check for tiles with an entrance on an edge.
* E.g. depots and non-drive-through-road-stops.
*
* The test succeeds if the slope is not steep and at least one corner of the entrance edge is on the TileMaxZ() level.
*
* @note The test does not check if autoslope is enabled at all.
*
* @param tile The tile.
* @param z_new New TileZ.
* @param tileh_new New TileSlope.
* @param entrance Entrance edge.
* @return true iff terraforming is allowed.
*/
static inline bool AutoslopeCheckForEntranceEdge(TileIndex tile, uint z_new, Slope tileh_new, DiagDirection entrance)
{
if (IsSteepSlope(tileh_new) || (GetTileMaxZ(tile) != z_new + GetSlopeMaxZ(tileh_new))) return false;
return ((tileh_new == SLOPE_FLAT) || CanBuildDepotByTileh(entrance, tileh_new));
}
/**
* Tests if autoslope is enabled for _current_player.
*
* Autoslope is disabled for town/industry construction and old ai players.
*
* @return true iff autoslope is enabled.
*/
static inline bool AutoslopeEnabled()
{
return (_settings_game.construction.autoslope &&
((_current_player < MAX_PLAYERS && !_is_old_ai_player) ||
(_current_player == OWNER_NONE && _game_mode == GM_EDITOR)));
}
#endif /* AUTOSLOPE_H */
|