version information in the CMakeLists.txt are now available in the code
This commit is contained in:
+8
-3
@@ -491,10 +491,15 @@ void View::DrawUiMainMenu() {
|
||||
DrawPageTitle ("Asteroids");
|
||||
|
||||
SelectFont("console.ttf size=23 color=#444444");
|
||||
DrawGLString( screen_right - 272, screen_bottom - 16, "http://www.fysx.org");
|
||||
DrawGLString( screen_right - 272, screen_bottom - 6, "http://www.fysx.org");
|
||||
SelectFont("console.ttf size=23 color=#cccccc");
|
||||
DrawGLString( screen_right - 270, screen_bottom - 18, "http://www.fysx.org");
|
||||
|
||||
DrawGLString( screen_right - 270, screen_bottom - 8, "http://www.fysx.org");
|
||||
|
||||
SelectFont("console.ttf size=23 color=#444444");
|
||||
DrawGLString( 8, screen_bottom - 6, FYSXASTEROIDS_VERSION);
|
||||
SelectFont("console.ttf size=23 color=#cccccc");
|
||||
DrawGLString( 6, screen_bottom - 8, FYSXASTEROIDS_VERSION);
|
||||
|
||||
SelectFont("console.ttf size=23");
|
||||
if (Engine::GUI::Button (1, "New Game", screen_right * 0.5 - 100, 200, button_width, button_height)) {
|
||||
PushViewState(ViewStateEnterPlayername);
|
||||
|
||||
+11
-7
@@ -116,24 +116,26 @@ int main (int argc, char* argv[]) {
|
||||
|
||||
SetLogPrintLevel (Engine::LogLevelWarning);
|
||||
|
||||
// find the path for game data and user data
|
||||
std::string user_path = "";
|
||||
std::string game_data_path = "";
|
||||
|
||||
// use the current path as default
|
||||
boost::filesystem::path cpath = boost::filesystem::initial_path<boost::filesystem::path>();
|
||||
user_path = boost::filesystem::path(cpath.string() + user_path).file_string();
|
||||
game_data_path = boost::filesystem::path(cpath.string() + game_data_path).file_string();
|
||||
|
||||
#ifndef WIN32
|
||||
// on linux et al we check more thoroughly at the possible directories
|
||||
user_path = create_user_path();
|
||||
game_data_path = find_game_data_dir();
|
||||
#endif
|
||||
|
||||
boost::filesystem::path cpath = boost::filesystem::initial_path<boost::filesystem::path>();
|
||||
std::cerr << "cwd: " << cpath.string() << std::endl;
|
||||
|
||||
// we assume the user path to be local folder
|
||||
std::string log_file_path = user_path;
|
||||
log_file_path += "/game.log";
|
||||
|
||||
user_path = boost::filesystem::path(cpath.string() + user_path).file_string();
|
||||
game_data_path = boost::filesystem::path(cpath.string() + game_data_path).file_string();
|
||||
log_file_path = boost::filesystem::path (cpath.string() + log_file_path).file_string();
|
||||
log_file_path = boost::filesystem::path (log_file_path).file_string();
|
||||
|
||||
cout << "User Data Dir = " << user_path << endl;
|
||||
engine.SetUserDataPath (user_path);
|
||||
@@ -157,7 +159,9 @@ int main (int argc, char* argv[]) {
|
||||
else
|
||||
SDL_WM_SetIcon(image,NULL);
|
||||
|
||||
SDL_WM_SetCaption("fysxasteroids -RC2-","fysxasteroids -RC2-");
|
||||
std::string version_string = "fysxasteroids ";
|
||||
version_string += FYSXASTEROIDS_VERSION;
|
||||
SDL_WM_SetCaption(version_string.c_str(), version_string.c_str());
|
||||
|
||||
engine.GetView()->SetGridSize (8,8);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user