mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 10:30:28 +00:00
(svn r20109) -Codechange: Make GetFloodingBehaviour() globally usable.
This commit is contained in:
parent
9060a7ac00
commit
7e0e7fb0e5
12
src/water.h
12
src/water.h
@ -16,6 +16,18 @@
|
||||
#include "company_type.h"
|
||||
#include "slope_type.h"
|
||||
|
||||
/**
|
||||
* Describes the behaviour of a tile during flooding.
|
||||
*/
|
||||
enum FloodingBehaviour {
|
||||
FLOOD_NONE, ///< The tile does not flood neighboured tiles.
|
||||
FLOOD_ACTIVE, ///< The tile floods neighboured tiles.
|
||||
FLOOD_PASSIVE, ///< The tile does not actively flood neighboured tiles, but it prevents them from drying up.
|
||||
FLOOD_DRYUP, ///< The tile drys up if it is not constantly flooded from neighboured tiles.
|
||||
};
|
||||
|
||||
FloodingBehaviour GetFloodingBehaviour(TileIndex tile);
|
||||
|
||||
void TileLoop_Water(TileIndex tile);
|
||||
bool FloodHalftile(TileIndex t);
|
||||
void DoFloodTile(TileIndex target);
|
||||
|
@ -40,16 +40,6 @@
|
||||
#include "table/sprites.h"
|
||||
#include "table/strings.h"
|
||||
|
||||
/**
|
||||
* Describes the behaviour of a tile during flooding.
|
||||
*/
|
||||
enum FloodingBehaviour {
|
||||
FLOOD_NONE, ///< The tile does not flood neighboured tiles.
|
||||
FLOOD_ACTIVE, ///< The tile floods neighboured tiles.
|
||||
FLOOD_PASSIVE, ///< The tile does not actively flood neighboured tiles, but it prevents them from drying up.
|
||||
FLOOD_DRYUP, ///< The tile drys up if it is not constantly flooded from neighboured tiles.
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes from which directions a specific slope can be flooded (if the tile is floodable at all).
|
||||
*/
|
||||
@ -839,7 +829,7 @@ static void FloodVehicle(Vehicle *v)
|
||||
*
|
||||
* @return Behaviour of the tile
|
||||
*/
|
||||
static FloodingBehaviour GetFloodingBehaviour(TileIndex tile)
|
||||
FloodingBehaviour GetFloodingBehaviour(TileIndex tile)
|
||||
{
|
||||
/* FLOOD_ACTIVE: 'single-corner-raised'-coast, sea, sea-shipdepots, sea-buoys, sea-docks (water part), rail with flooded halftile, sea-water-industries, sea-oilrigs
|
||||
* FLOOD_DRYUP: coast with more than one corner raised, coast with rail-track, coast with trees
|
||||
|
Loading…
Reference in New Issue
Block a user