Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: src/XMSession.h
- ===================================================================
- --- src/XMSession.h (revision 3150)
- +++ src/XMSession.h (working copy)
- @@ -155,6 +155,7 @@
- void setAutosaveHighscoreReplays(bool i_value);
- void setEnableGhosts(bool i_value);
- bool enableGhosts() const;
- + bool disableAnimations() const;
- void setEnableEngineSound(bool i_value);
- bool enableEngineSound() const;
- void setShowEngineCounter(bool i_value);
- @@ -273,6 +274,7 @@
- void setDbsynchronizeOnQuit(bool i_value);
- bool dbsynchronizeOnQuit() const;
- void setBeatingMode(bool i_value);
- + void setDisableAnimations(bool i_value);
- bool beatingMode() const;
- void setWebForms(bool i_value);
- bool webForms() const;
- @@ -337,6 +339,7 @@
- bool m_uglyOver;
- bool m_testTheme;
- bool m_autosaveHighscoreReplays;
- + bool m_disableAnimations;
- bool m_ghostStrategy_MYBEST;
- bool m_ghostStrategy_THEBEST;
- bool m_ghostStrategy_BESTOFREFROOM;
- Index: src/XMSession_default.h
- ===================================================================
- --- src/XMSession_default.h (revision 3150)
- +++ src/XMSession_default.h (working copy)
- @@ -36,7 +36,7 @@
- #define DEFAULT_CONTROLLERMODE "Keyboard"
- #define DEFAULT_LANGUAGE ""
- -#define DEFAULT_THEME CONFIGURE_DEFAULT_THEME
- +#define DEFAULT_THEME CONFIGURE_DEFAULT_THEME
- #define DEFAULT_WEBROOM_ID "1"
- #define DEFAULT_WEBCONFATINIT true
- #define DEFAULT_PROFILE ""
- @@ -65,6 +65,7 @@
- #define DEFAULT_GHOSTBESTREFROOM true
- #define DEFAULT_GHOSTBESTOTHERROOMS false
- #define DEFAULT_AUTOSAVEHIGHSCORESREPLAYS true
- +#define DEFAULT_DISABLEANIMATIONS false
- #define DEFAULT_ENABLEGHOSTS true
- #define DEFAULT_ENABLEENGINESOUND true
- #define DEFAULT_SHOWENGINECOUNTER false
- Index: src/Theme.cpp
- ===================================================================
- --- src/Theme.cpp (revision 3150)
- +++ src/Theme.cpp (working copy)
- @@ -179,9 +179,12 @@
- void Theme::loadSpritesFromXML(TiXmlElement *p_ThemeXmlDataElement) {
- std::string v_spriteType;
- bool v_isAnimation;
- + bool v_enableAnimation;
- const char *pc;
- std::string v_sum;
- + v_enableAnimation = XMSession::instance()->disableAnimations();
- +
- for(TiXmlElement *pVarElem = p_ThemeXmlDataElement->FirstChildElement("sprite");
- pVarElem!=NULL;
- pVarElem = pVarElem->NextSiblingElement("sprite")
- @@ -223,7 +226,12 @@
- THEME_TEXTURE_SPRITE_FILE_DIR,
- "Texture");
- }
- - else if(v_spriteType == "Texture" && v_isAnimation == true) {
- + else if(v_spriteType == "Texture" && v_isAnimation == true && v_enableAnimation == true) {
- + newSpriteFromXML<TextureSprite>(pVarElem,
- + THEME_TEXTURE_SPRITE_FILE_DIR,
- + "Texture");
- + }
- + else if(v_spriteType == "Texture" && v_isAnimation == true && v_enableAnimation == false) {
- newAnimationSpriteFromXML(pVarElem, true, THEME_TEXTURE_SPRITE_FILE_DIR);
- }
- else if(v_spriteType == "UI") {
- Index: src/states/StateOptions.cpp
- ===================================================================
- --- src/states/StateOptions.cpp (revision 3150)
- +++ src/states/StateOptions.cpp (working copy)
- @@ -142,6 +142,7 @@
- if(v_button->isClicked()) {
- v_button->setClicked(false);
- XMSession::instance()->setEnableDeadAnimation(v_button->getChecked());
- + SysMessage::instance()->displayInformation(GAMETEXT_OPTION_NEED_TO_RESTART);
- }
- v_button = reinterpret_cast<UIButton *>(m_GUI->getChild("MAIN:TABS:GENERAL_TAB:TABS:MAIN_TAB:CAMERAACTIVEZOOM"));
- @@ -173,6 +174,13 @@
- v_button->setClicked(false);
- XMSession::instance()->setAutosaveHighscoreReplays(v_button->getChecked());
- }
- +
- + v_button = reinterpret_cast<UIButton *>(m_GUI->getChild("MAIN:TABS:GENERAL_TAB:TABS:MAIN_TAB:SHOWANIMATIONS"));
- + if(v_button->isClicked()) {
- + v_button->setClicked(true);
- + XMSession::instance()->setDisableAnimations(v_button->getChecked());
- + SysMessage::instance()->displayInformation(GAMETEXT_OPTION_NEED_TO_RESTART);
- + }
- v_list = reinterpret_cast<UIList *>(m_GUI->getChild("MAIN:TABS:GENERAL_TAB:TABS:THEME_TAB:LIST"));
- if(v_list->isClicked()) {
- @@ -797,6 +805,13 @@
- v_button->setGroup(50023);
- v_button->setContextHelp(CONTEXTHELP_AUTOSAVEREPLAYS);
- + v_button = new UIButton(v_window, 5, 153-10, GAMETEXT_SHOWANIMATIONS, (v_window->getPosition().nWidth-40)/2, 28);
- + v_button->setType(UI_BUTTON_TYPE_CHECK);
- + v_button->setID("SHOWANIMATIONS");
- + v_button->setFont(drawlib->getFontSmall());
- + v_button->setGroup(50023);
- + v_button->setContextHelp(CONTEXTHELP_SHOWANIMATIONS);
- +
- v_button = new UIButton(v_window, 5+(v_window->getPosition().nWidth+40)/2, 33-10, GAMETEXT_INITZOOM,
- (v_window->getPosition().nWidth-40)/2, 28);
- v_button->setType(UI_BUTTON_TYPE_CHECK);
- @@ -1582,6 +1597,8 @@
- v_button->setChecked(XMSession::instance()->autosaveHighscoreReplays());
- v_button = reinterpret_cast<UIButton *>(m_GUI->getChild("MAIN:TABS:GENERAL_TAB:TABS:MAIN_TAB:BEATINGMODE"));
- v_button->setChecked(XMSession::instance()->beatingMode());
- + v_button = reinterpret_cast<UIButton *>(m_GUI->getChild("MAIN:TABS:GENERAL_TAB:TABS:MAIN_TAB:SHOWANIMATIONS"));
- + v_button->setChecked(XMSession::instance()->disableAnimations());
- // video
- v_button = reinterpret_cast<UIButton *>(m_GUI->getChild("MAIN:TABS:GENERAL_TAB:TABS:VIDEO_TAB:16BPP"));
- Index: src/GameText.h
- ===================================================================
- --- src/GameText.h (revision 3150)
- +++ src/GameText.h (working copy)
- @@ -54,6 +54,7 @@
- #define GAMETEXT_AUTHOR _("Author")
- #define GAMETEXT_AUTOMATIC _("Automatic")
- #define GAMETEXT_AUTOSAVEREPLAYS _("Automatic saving of replays")
- +#define GAMETEXT_SHOWANIMATIONS _("Disable Animations")
- #define GAMETEXT_AUTOZOOM _("Auto zoom")
- #define GAMETEXT_DB _("Database")
- #define GAMETEXT_CAMERAACTIVEZOOM _("Camera Active Zoom")
- @@ -651,6 +652,7 @@
- #define CONTEXTHELP_DISPLAY_BIKER_ARROW _("Display an arrow to display where are located the bikes on the map")
- #define CONTEXTHELP_DISPLAY_GHOST_TIMEDIFF _("Display the time difference between the ghost and you")
- #define CONTEXTHELP_AUTOSAVEREPLAYS _("If you make a highscore it will automatically be saved as a replay")
- +#define CONTEXTHELP_SHOWANIMATIONS _("Disable block animations (if X-Moto runs slowly)")
- #define CONTEXTHELP_VIEWTHEHIGHSCORE _("View the replay of the room's highscore")
- #define CONTEXTHELP_ENABLE_CHECK_NEW_LEVELS_AT_STARTUP _("Check for new levels at startup")
- Index: src/XMSession.cpp
- ===================================================================
- --- src/XMSession.cpp (revision 3150)
- +++ src/XMSession.cpp (working copy)
- @@ -69,6 +69,7 @@
- m_ghostStrategy_BESTOFREFROOM = DEFAULT_GHOSTBESTREFROOM;
- m_ghostStrategy_BESTOFOTHERROOMS = DEFAULT_GHOSTBESTOTHERROOMS;
- m_autosaveHighscoreReplays = DEFAULT_AUTOSAVEHIGHSCORESREPLAYS;
- + m_disableAnimations = DEFAULT_DISABLEANIMATIONS;
- m_enableGhosts = DEFAULT_ENABLEGHOSTS;
- m_enableEngineSound = DEFAULT_ENABLEENGINESOUND;
- m_showEngineCounter = DEFAULT_SHOWENGINECOUNTER;
- @@ -325,6 +326,7 @@
- m_useCrappyPack = pDb->config_getBool (i_id_profile, "UseCrappyPack" , m_useCrappyPack);
- m_useChildrenCompliant = pDb->config_getBool (i_id_profile, "UseChildrenCompliant" , m_useChildrenCompliant);
- m_enableGhosts = pDb->config_getBool (i_id_profile, "EnableGhost" , m_enableGhosts);
- + m_disableAnimations = pDb->config_getBool (i_id_profile, "disableAnimations" , m_disableAnimations);
- m_ghostStrategy_MYBEST = pDb->config_getBool (i_id_profile, "GhostStrategy_MYBEST" , m_ghostStrategy_MYBEST);
- m_ghostStrategy_THEBEST = pDb->config_getBool (i_id_profile, "GhostStrategy_THEBEST" , m_ghostStrategy_THEBEST);
- m_ghostStrategy_BESTOFREFROOM = pDb->config_getBool (i_id_profile, "GhostStrategy_BESTOFREFROOM" , m_ghostStrategy_BESTOFREFROOM);
- @@ -460,6 +462,7 @@
- pDb->config_setBool (m_profile, "UseCrappyPack" , m_useCrappyPack);
- pDb->config_setBool (m_profile, "UseChildrenCompliant" , m_useChildrenCompliant);
- pDb->config_setBool (m_profile, "EnableGhost" , m_enableGhosts);
- + pDb->config_setBool (m_profile, "disableAnimations" , m_disableAnimations);
- pDb->config_setBool (m_profile, "GhostStrategy_MYBEST" , m_ghostStrategy_MYBEST);
- pDb->config_setBool (m_profile, "GhostStrategy_THEBEST" , m_ghostStrategy_THEBEST);
- pDb->config_setBool (m_profile, "GhostStrategy_BESTOFREFROOM" , m_ghostStrategy_BESTOFREFROOM);
- @@ -708,6 +711,10 @@
- return m_enableGhosts;
- }
- +bool XMSession::disableAnimations() const {
- + return m_disableAnimations;
- +}
- +
- void XMSession::setEnableEngineSound(bool i_value) {
- PROPAGATE(XMSession,setEnableEngineSound,i_value,bool);
- m_enableEngineSound = i_value;
- @@ -1221,6 +1228,11 @@
- m_beatingMode = i_value;
- }
- +void XMSession::setDisableAnimations(bool i_value) {
- + PROPAGATE(XMSession,setDisableAnimations,i_value,bool);
- + m_disableAnimations = i_value;
- +}
- +
- bool XMSession::beatingMode() const {
- return m_beatingMode;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement