Ticket #2118: patch_versiondata.2.diff

File patch_versiondata.2.diff, 4.2 KB (added by Itms, 11 years ago)
  • binaries/data/config/default.cfg

     
    1717; *                                                            *
    1818; **************************************************************
    1919
     20; Game version data
     21versionNumber = 14
     22versionNumberString = "XIV"
     23versionName = "Naukratis"
     24
    2025; Enable/disable windowed mode by default. (Use Alt+Enter to toggle in the game.)
    2126windowed = false
    2227
  • binaries/data/mods/public/gui/pregame/mainmenu.xml

     
    440440
    441441                <!-- PRE-RELEASE WARNING -->
    442442                <object
     443                    name="preReleaseWarning"
    443444                    font="serif-14"
    444445                    type="text"
    445446                    textcolor="white"
    446447                    size="8 8 100%-8 100%-36"
    447448                                        ghost="true"
    448449                >
    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>
    454455                </object>
    455456
    456457                <!-- FUNDRAISER -->
  • binaries/data/mods/public/gui/session/session.xml

     
    615615
    616616        <!-- Displays Alpha name and number -->
    617617        <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>
    619619
    620620        <!-- Displays build date and revision number-->
    621621        <object size="50%-128 0 50%+128 100%-2" name="buildTimeLabel" type="text" style="BuildNameText" ghost="true">
  • source/gui/scripting/ScriptFunctions.cpp

     
    537537    g_ConfigDB.WriteFile(CFG_USER);
    538538}
    539539
     540unsigned int GetVersionNumber(void* UNUSED(cbdata))
     541{
     542    unsigned int versionNumber = 0;
     543    CFG_GET_VAL("versionNumber", UnsignedInt, versionNumber);
     544    return versionNumber;
     545}
    540546
     547std::string GetVersionNumberString(void* UNUSED(cbdata))
     548{
     549    std::string versionNumberString = "";
     550    CFG_GET_VAL("versionNumberString", String, versionNumberString);
     551    return versionNumberString;
     552}
     553
     554std::string GetVersionName(void* UNUSED(cbdata))
     555{
     556    std::string versionName = "";
     557    CFG_GET_VAL("versionName", String, versionName);
     558    return versionName;
     559}
     560
     561
    541562void SetUserReportEnabled(void* UNUSED(cbdata), bool enabled)
    542563{
    543564    g_UserReporter.SetReportingEnabled(enabled);
     
    721742    scriptInterface.RegisterFunction<bool, &IsSplashScreenEnabled>("IsSplashScreenEnabled");
    722743    scriptInterface.RegisterFunction<void, bool, &SetSplashScreenEnabled>("SetSplashScreenEnabled");
    723744
     745    // Version data functions
     746    scriptInterface.RegisterFunction<unsigned int, &GetVersionNumber>("GetVersionNumber");
     747    scriptInterface.RegisterFunction<std::string, &GetVersionNumberString>("GetVersionNumberString");
     748    scriptInterface.RegisterFunction<std::string, &GetVersionName>("GetVersionName");
     749
    724750    // Development/debugging functions
    725751    scriptInterface.RegisterFunction<void, float, &SetSimRate>("SetSimRate");
    726752    scriptInterface.RegisterFunction<float, &GetSimRate>("GetSimRate");