Advertisement
Guest User

Untitled

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