Debian Codegraph @

common/main/vers_id.h

raw
1 /*
2 * This file is part of the DXX-Rebirth project <https://www.dxx-rebirth.com/>.
3 * It is copyright by its individual contributors, as recorded in the
4 * project's Git history. See COPYING.txt at the top level for license
5 * terms and a link to the Git history.
6 */
7 /* Version defines */
8
9 #pragma once
10
11 #define DXX_STRINGIZE2(X) #X
12 #define DXX_STRINGIZE(X) DXX_STRINGIZE2(X)
13
14 #define VERSID_EXTRACT_0(A,...) A
15 #define VERSID_EXTRACT_1(A,B,...) B
16 #define VERSID_EXTRACT_2(A,B,C,...) C
17 #define VERSID_EXTRACT_SEQ(F,S) F(S)
18
19 #define DXX_VERSION_MAJORiu VERSID_EXTRACT_SEQ(VERSID_EXTRACT_0, DXX_VERSION_SEQ)
20 #define DXX_VERSION_MINORiu VERSID_EXTRACT_SEQ(VERSID_EXTRACT_1, DXX_VERSION_SEQ)
21 #define DXX_VERSION_MICROiu VERSID_EXTRACT_SEQ(VERSID_EXTRACT_2, DXX_VERSION_SEQ)
22
23 #define DXX_VERSION_MAJORi static_cast<uint16_t>(DXX_VERSION_MAJORiu)
24 #define DXX_VERSION_MINORi static_cast<uint16_t>(DXX_VERSION_MINORiu)
25 #define DXX_VERSION_MICROi static_cast<uint16_t>(DXX_VERSION_MICROiu)
26
27 #define DXX_VERSION_STR \
28 DXX_STRINGIZE(DXX_VERSION_MAJORiu) "." \
29 DXX_STRINGIZE(DXX_VERSION_MINORiu) "." \
30 DXX_STRINGIZE(DXX_VERSION_MICROiu)
31
32 #ifdef DXX_BUILD_DESCENT
33 #if DXX_BUILD_DESCENT == 1
34 #define BASED_VERSION "Registered v1.5 Jan 5, 1996"
35 #elif DXX_BUILD_DESCENT == 2
36 #define BASED_VERSION "Full Version v1.2"
37 #endif
38 #endif
39
40 #define DESCENT_VERSION g_descent_version
41
42 #ifndef RC_INVOKED
43 extern const char g_descent_version[];
44 extern const char g_descent_build_datetime[];
45 #endif