1
0
Fork 0

Cleanup: remove some unused #defines

pull/12988/head
Rubidium 2024-10-08 20:41:24 +02:00 committed by rubidium42
parent c2d58bb88f
commit 4a6ac52d8c
4 changed files with 0 additions and 29 deletions

View File

@ -39,18 +39,6 @@ static const uint MAX_MAP_SIZE_BITS = 12; ///< Maximal size
static const uint MIN_MAP_SIZE = 1U << MIN_MAP_SIZE_BITS; ///< Minimal map size = 64
static const uint MAX_MAP_SIZE = 1U << MAX_MAP_SIZE_BITS; ///< Maximal map size = 4096
/**
* Approximation of the length of a straight track, relative to a diagonal
* track (ie the size of a tile side).
*
* \#defined instead of const so it can
* stay integer. (no runtime float operations) Is this needed?
* Watch out! There are _no_ brackets around here, to prevent intermediate
* rounding! Be careful when using this!
* This value should be sqrt(2)/2 ~ 0.7071
*/
#define STRAIGHT_TRACK_LENGTH 7071/10000
/** Argument for CmdLevelLand describing what to do. */
enum LevelMode : uint8_t {
LM_LEVEL, ///< Level the land.

View File

@ -1214,17 +1214,6 @@ inline constexpr bool SlCheckVarSize(SaveLoadType cmd, VarType type, size_t leng
*/
#define SLC_NULL(length, from, to) {{}, SLE_FILE_U8, length, from, to}
/**
* Empty space in every savegame version that was filled with a string.
* @param length Number of strings in the empty space.
* @param from First savegame version that has the empty space.
* @param to Last savegame version that has the empty space.
*/
#define SLC_NULL_STR(length, from, to) {{}, SLE_FILE_STRING, length, from, to}
/** End marker of compat variables save or load. */
#define SLC_END() {{}, 0, 0, SL_MIN_VERSION, SL_MIN_VERSION}
/**
* Checks whether the savegame is below \a major.\a minor.
* @param major Major number of the version to check against.

View File

@ -259,16 +259,12 @@ static const LegendAndColour * const _legend_table[] = {
#define MKCOLOUR(x) TO_LE32X(x)
#define MKCOLOUR_XXXX(x) (MKCOLOUR(0x01010101) * (uint)(x))
#define MKCOLOUR_X0X0(x) (MKCOLOUR(0x01000100) * (uint)(x))
#define MKCOLOUR_0X0X(x) (MKCOLOUR(0x00010001) * (uint)(x))
#define MKCOLOUR_0XX0(x) (MKCOLOUR(0x00010100) * (uint)(x))
#define MKCOLOUR_X00X(x) (MKCOLOUR(0x01000001) * (uint)(x))
#define MKCOLOUR_XYXY(x, y) (MKCOLOUR_X0X0(x) | MKCOLOUR_0X0X(y))
#define MKCOLOUR_XYYX(x, y) (MKCOLOUR_X00X(x) | MKCOLOUR_0XX0(y))
#define MKCOLOUR_0000 MKCOLOUR_XXXX(0x00)
#define MKCOLOUR_0FF0 MKCOLOUR_0XX0(0xFF)
#define MKCOLOUR_F00F MKCOLOUR_X00X(0xFF)
#define MKCOLOUR_FFFF MKCOLOUR_XXXX(0xFF)

View File

@ -187,8 +187,6 @@ static HeightMap _height_map = { {}, 0, 0, 0 };
/** Conversion: Height to int */
#define H2I(i) ((i) >> height_decimal_bits)
/** Conversion: int to Amplitude */
#define I2A(i) ((i) << amplitude_decimal_bits)
/** Conversion: Amplitude to int */
#define A2I(i) ((i) >> amplitude_decimal_bits)