Codechange: Use SQInteger for generic numbers in script_tile
This commit is contained in:
@@ -155,9 +155,11 @@ public:
|
||||
* @param width The width of the rectangle.
|
||||
* @param height The height of the rectangle.
|
||||
* @pre ScriptMap::IsValidTile(tile).
|
||||
* @pre width >= 0.
|
||||
* @pre height >= 0.
|
||||
* @return True if it is buildable, false if not.
|
||||
*/
|
||||
static bool IsBuildableRectangle(TileIndex tile, uint width, uint height);
|
||||
static bool IsBuildableRectangle(TileIndex tile, SQInteger width, SQInteger height);
|
||||
|
||||
/**
|
||||
* Checks whether the given tile is actually a sea tile.
|
||||
@@ -308,7 +310,7 @@ public:
|
||||
* @pre ScriptMap::IsValidTile(tile).
|
||||
* @return The height of the lowest corner of the tile, ranging from 0 to 15.
|
||||
*/
|
||||
static int32 GetMinHeight(TileIndex tile);
|
||||
static SQInteger GetMinHeight(TileIndex tile);
|
||||
|
||||
/**
|
||||
* Get the maximal height on a tile.
|
||||
@@ -317,7 +319,7 @@ public:
|
||||
* @pre ScriptMap::IsValidTile(tile).
|
||||
* @return The height of the highest corner of the tile, ranging from 0 to 15.
|
||||
*/
|
||||
static int32 GetMaxHeight(TileIndex tile);
|
||||
static SQInteger GetMaxHeight(TileIndex tile);
|
||||
|
||||
/**
|
||||
* Get the height of a certain corner of a tile.
|
||||
@@ -327,7 +329,7 @@ public:
|
||||
* @pre ScriptMap::IsValidTile(tile).
|
||||
* @return The height of the lowest corner of the tile, ranging from 0 to 15.
|
||||
*/
|
||||
static int32 GetCornerHeight(TileIndex tile, Corner corner);
|
||||
static SQInteger GetCornerHeight(TileIndex tile, Corner corner);
|
||||
|
||||
/**
|
||||
* Get the owner of the tile.
|
||||
@@ -372,7 +374,7 @@ public:
|
||||
* @pre radius >= 0.
|
||||
* @return Values below 8 mean no acceptance; the more the better.
|
||||
*/
|
||||
static int32 GetCargoAcceptance(TileIndex tile, CargoID cargo_type, int width, int height, int radius);
|
||||
static SQInteger GetCargoAcceptance(TileIndex tile, CargoID cargo_type, SQInteger width, SQInteger height, SQInteger radius);
|
||||
|
||||
/**
|
||||
* Checks how many producers in the radius produces this cargo.
|
||||
@@ -389,7 +391,7 @@ public:
|
||||
* @pre radius >= 0.
|
||||
* @return The number of producers that produce this cargo within radius of the tile.
|
||||
*/
|
||||
static int32 GetCargoProduction(TileIndex tile, CargoID cargo_type, int width, int height, int radius);
|
||||
static SQInteger GetCargoProduction(TileIndex tile, CargoID cargo_type, SQInteger width, SQInteger height, SQInteger radius);
|
||||
|
||||
/**
|
||||
* Get the manhattan distance from the tile to the tile.
|
||||
@@ -397,7 +399,7 @@ public:
|
||||
* @param tile_to The tile to get the distance to.
|
||||
* @return The distance between the two tiles.
|
||||
*/
|
||||
static int32 GetDistanceManhattanToTile(TileIndex tile_from, TileIndex tile_to);
|
||||
static SQInteger GetDistanceManhattanToTile(TileIndex tile_from, TileIndex tile_to);
|
||||
|
||||
/**
|
||||
* Get the square distance from the tile to the tile.
|
||||
@@ -405,7 +407,7 @@ public:
|
||||
* @param tile_to The tile to get the distance to.
|
||||
* @return The distance between the two tiles.
|
||||
*/
|
||||
static int32 GetDistanceSquareToTile(TileIndex tile_from, TileIndex tile_to);
|
||||
static SQInteger GetDistanceSquareToTile(TileIndex tile_from, TileIndex tile_to);
|
||||
|
||||
/**
|
||||
* Raise the given corners of the tile. The corners can be combined,
|
||||
@@ -422,7 +424,7 @@ public:
|
||||
* @exception ScriptTile::ERR_TILE_TOO_HIGH
|
||||
* @return 0 means failed, 1 means success.
|
||||
*/
|
||||
static bool RaiseTile(TileIndex tile, int32 slope);
|
||||
static bool RaiseTile(TileIndex tile, Slope slope);
|
||||
|
||||
/**
|
||||
* Lower the given corners of the tile. The corners can be combined,
|
||||
@@ -439,7 +441,7 @@ public:
|
||||
* @exception ScriptTile::ERR_TILE_TOO_LOW
|
||||
* @return 0 means failed, 1 means success.
|
||||
*/
|
||||
static bool LowerTile(TileIndex tile, int32 slope);
|
||||
static bool LowerTile(TileIndex tile, Slope slope);
|
||||
|
||||
/**
|
||||
* Level all tiles in the rectangle between start_tile and end_tile so they
|
||||
@@ -489,7 +491,7 @@ public:
|
||||
* @game @pre Valid ScriptCompanyMode active in scope.
|
||||
* @return True if and only if a tree was added on any of the tiles in the rectangle.
|
||||
*/
|
||||
static bool PlantTreeRectangle(TileIndex tile, uint width, uint height);
|
||||
static bool PlantTreeRectangle(TileIndex tile, SQInteger width, SQInteger height);
|
||||
|
||||
/**
|
||||
* Find out if this tile is within the rating influence of a town.
|
||||
|
Reference in New Issue
Block a user