Show correct version number in main menu

This commit is contained in:
2015-07-03 18:42:53 -04:00
parent a6d4d54723
commit d594916fbf
4 changed files with 15 additions and 4 deletions

View File

@@ -434,7 +434,7 @@ void draw_startup_stats() {
pc_rect.left = pc_rect.right - 300;
// TODO: Should replace this with a more appropriate copyright string
// Windows replaced it with "That is not dead which can eternally lie..." - I don't think that's quite appropriate though.
win_draw_string(mainPtr,pc_rect,"Copyright 1997, All Rights Reserved, v1.0.2",eTextMode::WRAP,style,ul);
win_draw_string(mainPtr,pc_rect,"Copyright 1997, All Rights Reserved, v" + oboeVersionString(),eTextMode::WRAP,style,ul);
}

View File

@@ -15,6 +15,16 @@
#include <boost/ptr_container/ptr_set.hpp>
#include "simpletypes.hpp"
std::string oboeVersionString() {
unsigned short M, m, f;
M = OBOE_CURRENT_VERSION >> 16;
m = (OBOE_CURRENT_VERSION & 0xff00) >> 8;
f = OBOE_CURRENT_VERSION & 0xff;
std::ostringstream sout;
sout << M << '.' << m << '.' << f;
return sout.str();
}
// A simple lookup map based on the concept of a trie
class cEnumLookup {
struct node {

View File

@@ -122,7 +122,4 @@ public:
~cScenario();
};
// OBoE Current Version
const unsigned long long OBOE_CURRENT_VERSION = 0x020000; // MMmmff; M - major, m - minor, f - bugfix
#endif

View File

@@ -16,6 +16,10 @@ typedef signed short spec_num_t;
typedef signed short item_num_t;
typedef unsigned short str_num_t;
// OBoE Current Version
const unsigned long long OBOE_CURRENT_VERSION = 0x020000; // MMmmff; M - major, m - minor, f - bugfix
std::string oboeVersionString();
// MARK: Directions!
enum eDirection {
DIR_N = 0,