Ticket #2118: patch_versiondata.diff
File patch_versiondata.diff, 6.0 KB (added by , 11 years ago) |
---|
-
binaries/data/mods/public/gui/pregame/mainmenu.xml
440 440 441 441 <!-- PRE-RELEASE WARNING --> 442 442 <object 443 name="preReleaseWarning" 443 444 font="serif-14" 444 445 type="text" 445 446 textcolor="white" 446 447 size="8 8 100%-8 100%-36" 447 448 ghost="true" 448 449 > 449 [font="serif-bold-16"]Alpha XIV: Naukratis<!-- IMPORTANT: remember to update session/session.xml in sync with this -->[/font] 450 451 WARNING: This is an early development version of the game. Many features have not been added yet. 452 453 Get involved at: play0ad.com 450 <action on="Load"> 451 this.caption = "[font=\"serif-bold-16\"]Alpha " + Engine.GetVersionNumberString() + " : " + Engine.GetVersionName() + "[/font]\n\n" + 452 "WARNING: This is an early development version of the game. Many features have not been added yet.\n\n" + 453 "Get involved at: play0ad.com" 454 </action> 454 455 </object> 455 456 456 457 <!-- FUNDRAISER --> -
binaries/data/mods/public/gui/session/session.xml
615 615 616 616 <!-- Displays Alpha name and number --> 617 617 <object size="50%+48 0 100%-226 100%" name="alphaLabel" type="text" style="CenteredLabelText" text_valign="top" ghost="true"> 618 ALPHA XIV : Naukratis<!-- IMPORTANT: remember to update pregame/mainmenu.xml in sync with this -->618 <action on="Load">this.caption= "Alpha " + Engine.GetVersionNumberString() + " : " + Engine.GetVersionName()</action> 619 619 620 620 <!-- Displays build date and revision number--> 621 621 <object size="50%-128 0 50%+128 100%-2" name="buildTimeLabel" type="text" style="BuildNameText" ghost="true"> -
source/gui/scripting/ScriptFunctions.cpp
43 43 #include "ps/UserReport.h" 44 44 #include "ps/GameSetup/Atlas.h" 45 45 #include "ps/GameSetup/Config.h" 46 #include "ps/GameSetup/VersionData.h" 46 47 #include "ps/ConfigDB.h" 47 48 #include "tools/atlas/GameInterface/GameLoop.h" 48 49 … … 537 538 g_ConfigDB.WriteFile(CFG_USER); 538 539 } 539 540 541 unsigned int GetVersionNumber(void* UNUSED(cbdata)) 542 { 543 return g_VersionNumber; 544 } 540 545 546 std::string GetVersionNumberString(void* UNUSED(cbdata)) 547 { 548 return g_VersionNumberString; 549 } 550 551 std::string GetVersionName(void* UNUSED(cbdata)) 552 { 553 return g_VersionName; 554 } 555 556 541 557 void SetUserReportEnabled(void* UNUSED(cbdata), bool enabled) 542 558 { 543 559 g_UserReporter.SetReportingEnabled(enabled); … … 721 737 scriptInterface.RegisterFunction<bool, &IsSplashScreenEnabled>("IsSplashScreenEnabled"); 722 738 scriptInterface.RegisterFunction<void, bool, &SetSplashScreenEnabled>("SetSplashScreenEnabled"); 723 739 740 // Version data functions 741 scriptInterface.RegisterFunction<unsigned int, &GetVersionNumber>("GetVersionNumber"); 742 scriptInterface.RegisterFunction<std::string, &GetVersionNumberString>("GetVersionNumberString"); 743 scriptInterface.RegisterFunction<std::string, &GetVersionName>("GetVersionName"); 744 724 745 // Development/debugging functions 725 746 scriptInterface.RegisterFunction<void, float, &SetSimRate>("SetSimRate"); 726 747 scriptInterface.RegisterFunction<float, &GetSimRate>("GetSimRate"); -
source/ps/GameSetup/VersionData.cpp
1 /* Copyright (C) 2013 Wildfire Games. 2 * This file is part of 0 A.D. 3 * 4 * 0 A.D. is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation, either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * 0 A.D. is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #include "precompiled.h" 19 20 #include "VersionData.h" 21 22 /* Release version and all version information (such as name and number) shall be gathered in this file*/ 23 24 unsigned int g_VersionNumber = 14; 25 std::string g_VersionNumberString = "XIV"; 26 std::string g_VersionName = "Naukratis"; 27 -
source/ps/GameSetup/VersionData.h
1 /* Copyright (C) 2013 Wildfire Games. 2 * This file is part of 0 A.D. 3 * 4 * 0 A.D. is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation, either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * 0 A.D. is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #ifndef INCLUDED_PS_GAMESETUP_VERSIONDATA 19 #define INCLUDED_PS_GAMESETUP_VERSIONDATA 20 21 extern unsigned int g_VersionNumber; 22 extern std::string g_VersionNumberString; 23 extern std::string g_VersionName; 24 25 #endif // INCLUDED_PS_GAMESETUP_VERSIONDATA 26 No newline at end of file