Advertisement
Guest User

Untitled

a guest
May 22nd, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.50 KB | None | 0 0
  1. Index: src/XMSession.h
  2. ===================================================================
  3. --- src/XMSession.h (revision 3150)
  4. +++ src/XMSession.h (working copy)
  5. @@ -155,6 +155,7 @@
  6. void setAutosaveHighscoreReplays(bool i_value);
  7. void setEnableGhosts(bool i_value);
  8. bool enableGhosts() const;
  9. + bool disableAnimations() const;
  10. void setEnableEngineSound(bool i_value);
  11. bool enableEngineSound() const;
  12. void setShowEngineCounter(bool i_value);
  13. @@ -273,6 +274,7 @@
  14. void setDbsynchronizeOnQuit(bool i_value);
  15. bool dbsynchronizeOnQuit() const;
  16. void setBeatingMode(bool i_value);
  17. + void setDisableAnimations(bool i_value);
  18. bool beatingMode() const;
  19. void setWebForms(bool i_value);
  20. bool webForms() const;
  21. @@ -337,6 +339,7 @@
  22. bool m_uglyOver;
  23. bool m_testTheme;
  24. bool m_autosaveHighscoreReplays;
  25. + bool m_disableAnimations;
  26. bool m_ghostStrategy_MYBEST;
  27. bool m_ghostStrategy_THEBEST;
  28. bool m_ghostStrategy_BESTOFREFROOM;
  29. Index: src/XMSession_default.h
  30. ===================================================================
  31. --- src/XMSession_default.h (revision 3150)
  32. +++ src/XMSession_default.h (working copy)
  33. @@ -36,7 +36,7 @@
  34.  
  35. #define DEFAULT_CONTROLLERMODE "Keyboard"
  36. #define DEFAULT_LANGUAGE ""
  37. -#define DEFAULT_THEME CONFIGURE_DEFAULT_THEME
  38. +#define DEFAULT_THEME CONFIGURE_DEFAULT_THEME
  39. #define DEFAULT_WEBROOM_ID "1"
  40. #define DEFAULT_WEBCONFATINIT true
  41. #define DEFAULT_PROFILE ""
  42. @@ -65,6 +65,7 @@
  43. #define DEFAULT_GHOSTBESTREFROOM true
  44. #define DEFAULT_GHOSTBESTOTHERROOMS false
  45. #define DEFAULT_AUTOSAVEHIGHSCORESREPLAYS true
  46. +#define DEFAULT_DISABLEANIMATIONS false
  47. #define DEFAULT_ENABLEGHOSTS true
  48. #define DEFAULT_ENABLEENGINESOUND true
  49. #define DEFAULT_SHOWENGINECOUNTER false
  50. Index: src/Theme.cpp
  51. ===================================================================
  52. --- src/Theme.cpp (revision 3150)
  53. +++ src/Theme.cpp (working copy)
  54. @@ -179,9 +179,12 @@
  55. void Theme::loadSpritesFromXML(TiXmlElement *p_ThemeXmlDataElement) {
  56. std::string v_spriteType;
  57. bool v_isAnimation;
  58. + bool v_enableAnimation;
  59. const char *pc;
  60. std::string v_sum;
  61.  
  62. + v_enableAnimation = XMSession::instance()->disableAnimations();
  63. +
  64. for(TiXmlElement *pVarElem = p_ThemeXmlDataElement->FirstChildElement("sprite");
  65. pVarElem!=NULL;
  66. pVarElem = pVarElem->NextSiblingElement("sprite")
  67. @@ -223,7 +226,12 @@
  68. THEME_TEXTURE_SPRITE_FILE_DIR,
  69. "Texture");
  70. }
  71. - else if(v_spriteType == "Texture" && v_isAnimation == true) {
  72. + else if(v_spriteType == "Texture" && v_isAnimation == true && v_enableAnimation == true) {
  73. + newSpriteFromXML<TextureSprite>(pVarElem,
  74. + THEME_TEXTURE_SPRITE_FILE_DIR,
  75. + "Texture");
  76. + }
  77. + else if(v_spriteType == "Texture" && v_isAnimation == true && v_enableAnimation == false) {
  78. newAnimationSpriteFromXML(pVarElem, true, THEME_TEXTURE_SPRITE_FILE_DIR);
  79. }
  80. else if(v_spriteType == "UI") {
  81. Index: src/states/StateOptions.cpp
  82. ===================================================================
  83. --- src/states/StateOptions.cpp (revision 3150)
  84. +++ src/states/StateOptions.cpp (working copy)
  85. @@ -142,6 +142,7 @@
  86. if(v_button->isClicked()) {
  87. v_button->setClicked(false);
  88. XMSession::instance()->setEnableDeadAnimation(v_button->getChecked());
  89. + SysMessage::instance()->displayInformation(GAMETEXT_OPTION_NEED_TO_RESTART);
  90. }
  91.  
  92. v_button = reinterpret_cast<UIButton *>(m_GUI->getChild("MAIN:TABS:GENERAL_TAB:TABS:MAIN_TAB:CAMERAACTIVEZOOM"));
  93. @@ -173,6 +174,13 @@
  94. v_button->setClicked(false);
  95. XMSession::instance()->setAutosaveHighscoreReplays(v_button->getChecked());
  96. }
  97. +
  98. + v_button = reinterpret_cast<UIButton *>(m_GUI->getChild("MAIN:TABS:GENERAL_TAB:TABS:MAIN_TAB:SHOWANIMATIONS"));
  99. + if(v_button->isClicked()) {
  100. + v_button->setClicked(true);
  101. + XMSession::instance()->setDisableAnimations(v_button->getChecked());
  102. + SysMessage::instance()->displayInformation(GAMETEXT_OPTION_NEED_TO_RESTART);
  103. + }
  104.  
  105. v_list = reinterpret_cast<UIList *>(m_GUI->getChild("MAIN:TABS:GENERAL_TAB:TABS:THEME_TAB:LIST"));
  106. if(v_list->isClicked()) {
  107. @@ -797,6 +805,13 @@
  108. v_button->setGroup(50023);
  109. v_button->setContextHelp(CONTEXTHELP_AUTOSAVEREPLAYS);
  110.  
  111. + v_button = new UIButton(v_window, 5, 153-10, GAMETEXT_SHOWANIMATIONS, (v_window->getPosition().nWidth-40)/2, 28);
  112. + v_button->setType(UI_BUTTON_TYPE_CHECK);
  113. + v_button->setID("SHOWANIMATIONS");
  114. + v_button->setFont(drawlib->getFontSmall());
  115. + v_button->setGroup(50023);
  116. + v_button->setContextHelp(CONTEXTHELP_SHOWANIMATIONS);
  117. +
  118. v_button = new UIButton(v_window, 5+(v_window->getPosition().nWidth+40)/2, 33-10, GAMETEXT_INITZOOM,
  119. (v_window->getPosition().nWidth-40)/2, 28);
  120. v_button->setType(UI_BUTTON_TYPE_CHECK);
  121. @@ -1582,6 +1597,8 @@
  122. v_button->setChecked(XMSession::instance()->autosaveHighscoreReplays());
  123. v_button = reinterpret_cast<UIButton *>(m_GUI->getChild("MAIN:TABS:GENERAL_TAB:TABS:MAIN_TAB:BEATINGMODE"));
  124. v_button->setChecked(XMSession::instance()->beatingMode());
  125. + v_button = reinterpret_cast<UIButton *>(m_GUI->getChild("MAIN:TABS:GENERAL_TAB:TABS:MAIN_TAB:SHOWANIMATIONS"));
  126. + v_button->setChecked(XMSession::instance()->disableAnimations());
  127.  
  128. // video
  129. v_button = reinterpret_cast<UIButton *>(m_GUI->getChild("MAIN:TABS:GENERAL_TAB:TABS:VIDEO_TAB:16BPP"));
  130. Index: src/GameText.h
  131. ===================================================================
  132. --- src/GameText.h (revision 3150)
  133. +++ src/GameText.h (working copy)
  134. @@ -54,6 +54,7 @@
  135. #define GAMETEXT_AUTHOR _("Author")
  136. #define GAMETEXT_AUTOMATIC _("Automatic")
  137. #define GAMETEXT_AUTOSAVEREPLAYS _("Automatic saving of replays")
  138. +#define GAMETEXT_SHOWANIMATIONS _("Disable Animations")
  139. #define GAMETEXT_AUTOZOOM _("Auto zoom")
  140. #define GAMETEXT_DB _("Database")
  141. #define GAMETEXT_CAMERAACTIVEZOOM _("Camera Active Zoom")
  142. @@ -651,6 +652,7 @@
  143. #define CONTEXTHELP_DISPLAY_BIKER_ARROW _("Display an arrow to display where are located the bikes on the map")
  144. #define CONTEXTHELP_DISPLAY_GHOST_TIMEDIFF _("Display the time difference between the ghost and you")
  145. #define CONTEXTHELP_AUTOSAVEREPLAYS _("If you make a highscore it will automatically be saved as a replay")
  146. +#define CONTEXTHELP_SHOWANIMATIONS _("Disable block animations (if X-Moto runs slowly)")
  147. #define CONTEXTHELP_VIEWTHEHIGHSCORE _("View the replay of the room's highscore")
  148.  
  149. #define CONTEXTHELP_ENABLE_CHECK_NEW_LEVELS_AT_STARTUP _("Check for new levels at startup")
  150. Index: src/XMSession.cpp
  151. ===================================================================
  152. --- src/XMSession.cpp (revision 3150)
  153. +++ src/XMSession.cpp (working copy)
  154. @@ -69,6 +69,7 @@
  155. m_ghostStrategy_BESTOFREFROOM = DEFAULT_GHOSTBESTREFROOM;
  156. m_ghostStrategy_BESTOFOTHERROOMS = DEFAULT_GHOSTBESTOTHERROOMS;
  157. m_autosaveHighscoreReplays = DEFAULT_AUTOSAVEHIGHSCORESREPLAYS;
  158. + m_disableAnimations = DEFAULT_DISABLEANIMATIONS;
  159. m_enableGhosts = DEFAULT_ENABLEGHOSTS;
  160. m_enableEngineSound = DEFAULT_ENABLEENGINESOUND;
  161. m_showEngineCounter = DEFAULT_SHOWENGINECOUNTER;
  162. @@ -325,6 +326,7 @@
  163. m_useCrappyPack = pDb->config_getBool (i_id_profile, "UseCrappyPack" , m_useCrappyPack);
  164. m_useChildrenCompliant = pDb->config_getBool (i_id_profile, "UseChildrenCompliant" , m_useChildrenCompliant);
  165. m_enableGhosts = pDb->config_getBool (i_id_profile, "EnableGhost" , m_enableGhosts);
  166. + m_disableAnimations = pDb->config_getBool (i_id_profile, "disableAnimations" , m_disableAnimations);
  167. m_ghostStrategy_MYBEST = pDb->config_getBool (i_id_profile, "GhostStrategy_MYBEST" , m_ghostStrategy_MYBEST);
  168. m_ghostStrategy_THEBEST = pDb->config_getBool (i_id_profile, "GhostStrategy_THEBEST" , m_ghostStrategy_THEBEST);
  169. m_ghostStrategy_BESTOFREFROOM = pDb->config_getBool (i_id_profile, "GhostStrategy_BESTOFREFROOM" , m_ghostStrategy_BESTOFREFROOM);
  170. @@ -460,6 +462,7 @@
  171. pDb->config_setBool (m_profile, "UseCrappyPack" , m_useCrappyPack);
  172. pDb->config_setBool (m_profile, "UseChildrenCompliant" , m_useChildrenCompliant);
  173. pDb->config_setBool (m_profile, "EnableGhost" , m_enableGhosts);
  174. + pDb->config_setBool (m_profile, "disableAnimations" , m_disableAnimations);
  175. pDb->config_setBool (m_profile, "GhostStrategy_MYBEST" , m_ghostStrategy_MYBEST);
  176. pDb->config_setBool (m_profile, "GhostStrategy_THEBEST" , m_ghostStrategy_THEBEST);
  177. pDb->config_setBool (m_profile, "GhostStrategy_BESTOFREFROOM" , m_ghostStrategy_BESTOFREFROOM);
  178. @@ -708,6 +711,10 @@
  179. return m_enableGhosts;
  180. }
  181.  
  182. +bool XMSession::disableAnimations() const {
  183. + return m_disableAnimations;
  184. +}
  185. +
  186. void XMSession::setEnableEngineSound(bool i_value) {
  187. PROPAGATE(XMSession,setEnableEngineSound,i_value,bool);
  188. m_enableEngineSound = i_value;
  189. @@ -1221,6 +1228,11 @@
  190. m_beatingMode = i_value;
  191. }
  192.  
  193. +void XMSession::setDisableAnimations(bool i_value) {
  194. + PROPAGATE(XMSession,setDisableAnimations,i_value,bool);
  195. + m_disableAnimations = i_value;
  196. +}
  197. +
  198. bool XMSession::beatingMode() const {
  199. return m_beatingMode;
  200. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement