From a480cf2e661c93b53f4785b82627f1e9c8243ea4 Mon Sep 17 00:00:00 2001 From: Xawotihs Date: Sat, 14 Jan 2012 12:18:16 +0000 Subject: [PATCH] Extracted Wagic versioning information so that they can be used outside of GameStateMenu.cpp --- projects/mtg/include/GameApp.h | 15 +++++++++++++-- projects/mtg/src/GameStateMenu.cpp | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/projects/mtg/include/GameApp.h b/projects/mtg/include/GameApp.h index 60a020410..910d9244b 100644 --- a/projects/mtg/include/GameApp.h +++ b/projects/mtg/include/GameApp.h @@ -26,9 +26,20 @@ #endif //NETWORK_SUPPORT #include "GameObserver.h" +/* Wagic versions */ +#define WAGIC_VERSION_MAJOR 0 +#define WAGIC_VERSION_MEDIUM 17 +#define WAGIC_VERSION_MINOR 1 + +#define VERSION_DOT(a, b, c) a ##.## b ##.## c +#define VERSION(a, b, c) VERSION_DOT(a, b, c) +#define VERSION_TOSTRING(a) #a +#define VERSION_STRINGIFY(a) VERSION_TOSTRING(a) + +#define WAGIC_VERSION VERSION(WAGIC_VERSION_MAJOR, WAGIC_VERSION_MEDIUM, WAGIC_VERSION_MINOR) +#define WAGIC_VERSION_STRING VERSION_STRINGIFY(WAGIC_VERSION) + class Rules; - - class MTGAllCards; class TransitionBase; diff --git a/projects/mtg/src/GameStateMenu.cpp b/projects/mtg/src/GameStateMenu.cpp index 264c8a975..fa30f2964 100644 --- a/projects/mtg/src/GameStateMenu.cpp +++ b/projects/mtg/src/GameStateMenu.cpp @@ -27,7 +27,7 @@ #include #endif//NETWORK_SUPPORT -static const char* GAME_VERSION = "WTH?! 0.17.1 - wololo.net"; +static const char* GAME_VERSION = "WTH?! " WAGIC_VERSION_STRING " - wololo.net"; enum ENUM_MENU_STATE_MAJOR {