diff --git a/src/script/api/script_sign.cpp b/src/script/api/script_sign.cpp index 275d4300b0..8d9d364069 100644 --- a/src/script/api/script_sign.cpp +++ b/src/script/api/script_sign.cpp @@ -84,5 +84,5 @@ if (!ScriptObject::Command::Do(&ScriptInstance::DoCommandReturnSignID, location, text)) return INVALID_SIGN; /* In case of test-mode, we return SignID 0 */ - return 0; + return ::SIGN_BEGIN; } diff --git a/src/signs_base.h b/src/signs_base.h index 718ffac320..5775d7a90a 100644 --- a/src/signs_base.h +++ b/src/signs_base.h @@ -15,7 +15,7 @@ #include "core/pool_type.hpp" #include "company_type.h" -typedef Pool SignPool; +typedef Pool SignPool; extern SignPool _sign_pool; struct Sign : SignPool::PoolItem<&_sign_pool> { diff --git a/src/signs_type.h b/src/signs_type.h index 5dec4a560e..f7243b8c1f 100644 --- a/src/signs_type.h +++ b/src/signs_type.h @@ -11,10 +11,13 @@ #define SIGNS_TYPE_H /** The type of the IDs of signs. */ -typedef uint16_t SignID; -struct Sign; +enum SignID : uint16_t { + SIGN_BEGIN = 0, + SIGN_END = 64000, + INVALID_SIGN = 0xFFFF ///< Sentinel for an invalid sign. +}; -static const SignID INVALID_SIGN = 0xFFFF; ///< Sentinel for an invalid sign. +struct Sign; static const uint MAX_LENGTH_SIGN_NAME_CHARS = 32; ///< The maximum length of a sign name in characters including '\0'