diff --git a/src/config/user_config.hpp b/src/config/user_config.hpp index f2d3b20f2..1fa16fd25 100644 --- a/src/config/user_config.hpp +++ b/src/config/user_config.hpp @@ -455,6 +455,9 @@ namespace UserConfigParams /** True if hardware skinning should be enabled */ PARAM_PREFIX bool m_hw_skinning_enabled PARAM_DEFAULT( false ); + + /** True if Christmas Mode should be enabled */ + PARAM_PREFIX bool m_xmas_enabled PARAM_DEFAULT( false ); // not saved to file diff --git a/src/input/wiimote_manager.cpp b/src/input/wiimote_manager.cpp index b13275fec..5225e46e7 100644 --- a/src/input/wiimote_manager.cpp +++ b/src/input/wiimote_manager.cpp @@ -384,7 +384,15 @@ void WiimoteManager::threadFunc() // TODO: this should only be done once, but there have been reports that it didn't // work for some people -> need to find a better fix wiiuse_motion_sensing(m_wiimotes[i].getWiimoteHandle(), 1); - + /* + if(WIIUSE_USING_EXP(m_wiimotes[i].getWiimoteHandle())) + { + if(WIIUSE_USING_EXP(wm)) + wiiuse_set_motion_plus(m_wiimotes[i].getWiimoteHandle(), 2); // nunchuck pass-through + else + wiiuse_set_motion_plus(m_wiimotes[i].getWiimoteHandle(), 1); // standalone + } + */ switch (m_all_wiimote_handles[i]->event) { case WIIUSE_EVENT: diff --git a/src/karts/kart_model.cpp b/src/karts/kart_model.cpp index de2920748..de2ce7a33 100644 --- a/src/karts/kart_model.cpp +++ b/src/karts/kart_model.cpp @@ -133,8 +133,9 @@ void KartModel::loadInfo(const XMLNode &node) { if(hat_node->get("offset", &m_hat_offset)) { - // For now simply hardcode a mesh name if an offset is defined. - setHatMeshName("christmas_hat.b3d"); + // Xmas mode handling :) + if(UserConfigParams::m_xmas_enabled) + setHatMeshName("christmas_hat.b3d"); } } else diff --git a/src/main.cpp b/src/main.cpp index 27cf79142..276f76bf8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -125,11 +125,11 @@ # ifdef _MSC_VER # include # include -# include # endif #else # include #endif +#include #include #include #include @@ -469,6 +469,17 @@ int handleCmdLinePreliminary(int argc, char **argv) { UserConfigParams::m_verbosity |= UserConfigParams::LOG_MISC; } + else if ( sscanf(argv[i], "--xmas=%d", &n) ) + { + if (n) + { + UserConfigParams::m_xmas_enabled = true; + } + else + { + UserConfigParams::m_xmas_enabled = false; + } + } else if( !strcmp(argv[i], "--log=terminal")) { UserConfigParams::m_log_errors=false; @@ -1028,6 +1039,7 @@ int handleCmdLine(int argc, char **argv) else if( !strcmp(argv[i], "--debug=flyable") ) {} else if( !strcmp(argv[i], "--debug=misc" ) ) {} else if( !strcmp(argv[i], "--debug=all" ) ) {} + else if ( sscanf(argv[i], "--xmas=%d", &n) ) {} else if( !strcmp(argv[i], "--log=terminal" ) ) {} else if( !strcmp(argv[i], "--log=nocolor" ) ) {} else if( !strcmp(argv[i], "--log=file" ) ) {} @@ -1226,6 +1238,14 @@ bool ShowDumpResults(const wchar_t* dump_path, } #endif +static bool checkXmasTime() +{ + time_t rawtime; + struct tm* timeinfo; + time(&rawtime); + timeinfo = localtime(&rawtime); + return (timeinfo->tm_mon == 12-1); // Xmas mode happens in December +} int main(int argc, char *argv[] ) { @@ -1241,6 +1261,9 @@ int main(int argc, char *argv[] ) // not have) other managers initialised: initUserConfig(argv); // argv passed so config file can be // found more reliably + + UserConfigParams::m_xmas_enabled = checkXmasTime(); + handleCmdLinePreliminary(argc, argv); initRest();