From: <mbj...@us...> - 2010-02-25 21:20:23
|
Revision: 4847 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4847&view=rev Author: mbjornstk Date: 2010-02-25 21:20:11 +0000 (Thu, 25 Feb 2010) Log Message: ----------- Make cheats give bowling again, with F5 (F1 and F5 were giving both gum). Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-02-25 21:10:28 UTC (rev 4846) +++ main/trunk/src/input/input_manager.cpp 2010-02-25 21:20:11 UTC (rev 4847) @@ -143,7 +143,7 @@ if (race_manager->getNumPlayers() ==1 ) { Kart* kart = world->getLocalPlayerKart(0); - kart->setPowerup(POWERUP_BUBBLEGUM, 10000); + kart->setPowerup(POWERUP_BOWLING, 10000); } break; #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mbj...@us...> - 2010-02-28 22:39:38
|
Revision: 4885 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4885&view=rev Author: mbjornstk Date: 2010-02-28 22:39:28 +0000 (Sun, 28 Feb 2010) Log Message: ----------- Add parachute to testing cheats (press F6). And trailing whitespace. Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-02-28 22:37:32 UTC (rev 4884) +++ main/trunk/src/input/input_manager.cpp 2010-02-28 22:39:28 UTC (rev 4885) @@ -141,11 +141,18 @@ break; case KEY_F5: if (race_manager->getNumPlayers() ==1 ) - { + { Kart* kart = world->getLocalPlayerKart(0); kart->setPowerup(POWERUP_BOWLING, 10000); - } + } break; + case KEY_F6: + if (race_manager->getNumPlayers() == 1) + { + Kart* kart = world->getLocalPlayerKart(0); + kart->setPowerup(POWERUP_PARACHUTE, 10000); + } + break; #endif case KEY_F12: UserConfigParams::m_display_fps = !UserConfigParams::m_display_fps; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-03-04 16:15:22
|
Revision: 4927 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4927&view=rev Author: auria Date: 2010-03-04 16:15:15 +0000 (Thu, 04 Mar 2010) Log Message: ----------- Improved gamepad sensing logic Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-03-04 12:35:58 UTC (rev 4926) +++ main/trunk/src/input/input_manager.cpp 2010-03-04 16:15:15 UTC (rev 4927) @@ -238,7 +238,8 @@ m_max_sensed_type = type; // don't notify on first axis value (unless the axis is pushed to the maximum) - if(m_mode == INPUT_SENSE_GAMEPAD && type == Input::IT_STICKMOTION && first_value && abs(value) != Input::MAX_VALUE) + if (m_mode == INPUT_SENSE_GAMEPAD && type == Input::IT_STICKMOTION && + first_value && abs(value) < Input::MAX_VALUE*3.0f/4.0f) { std::cout << "not notifying on first value\n"; return; @@ -246,8 +247,8 @@ } // Notify the completion of the input sensing when key is released - if( abs(value) < Input::MAX_VALUE/2 && m_sensed_input->deviceID == deviceID && - m_sensed_input->btnID == btnID) + if (abs(value) < Input::MAX_VALUE/2 && m_sensed_input->deviceID == deviceID && + m_sensed_input->btnID == btnID) { OptionsScreenInput::getInstance()->gotSensedInput(m_sensed_input); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-03-05 19:43:41
|
Revision: 4936 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4936&view=rev Author: auria Date: 2010-03-05 19:43:35 +0000 (Fri, 05 Mar 2010) Log Message: ----------- Applied other patch by Hilton Medeiros Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-03-05 16:20:30 UTC (rev 4935) +++ main/trunk/src/input/input_manager.cpp 2010-03-05 19:43:35 UTC (rev 4936) @@ -205,8 +205,11 @@ std::cout << "%% storing new gamepad button binding value=" << value << " deviceID=" << deviceID << " btnID=" << btnID << "\n"; - OptionsScreenInput::getInstance()->gotSensedInput(m_sensed_input); - return; + if (abs(value) > Input::MAX_VALUE/2.0f) + { + OptionsScreenInput::getInstance()->gotSensedInput(m_sensed_input); + return; + } } if( type == Input::IT_STICKMOTION ) @@ -461,11 +464,6 @@ { int value = event.JoystickEvent.Axis[axis_id]; -#ifdef __APPLE__ - // work around irrLicht bug. FIXME - get it fixed and remove this - if(value == -32768) continue; // ignore bogus values given by irrlicht -#endif - if (UserConfigParams::m_gamepad_debug) { printf("axis motion: gamepad_id=%d axis=%d value=%d\n", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2014-01-12 18:04:04
|
Revision: 15013 http://sourceforge.net/p/supertuxkart/code/15013 Author: auria Date: 2014-01-12 18:04:00 +0000 (Sun, 12 Jan 2014) Log Message: ----------- Apply slighly modified version of patch from ticket #1121 Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2014-01-12 17:40:39 UTC (rev 15012) +++ main/trunk/src/input/input_manager.cpp 2014-01-12 18:04:00 UTC (rev 15013) @@ -479,6 +479,15 @@ if (m_mode == INPUT_SENSE_KEYBOARD || m_mode == INPUT_SENSE_GAMEPAD) { + // Do not pick disabled gamepads for input sensing + if (type == Input::IT_STICKBUTTON || type == Input::IT_STICKMOTION) + { + GamePadDevice *gPad = m_device_manager->getGamePadFromIrrID(deviceID); + DeviceConfig *conf = gPad->getConfiguration(); + if (!conf->isEnabled()) + return; + } + inputSensing(type, deviceID, button, axisDirection, value); return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mbj...@us...> - 2010-03-08 03:18:19
|
Revision: 4956 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4956&view=rev Author: mbjornstk Date: 2010-03-08 03:18:11 +0000 (Mon, 08 Mar 2010) Log Message: ----------- Add zipper cheat, F7 key. Useful to test high speed behaviour. Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-03-07 22:54:53 UTC (rev 4955) +++ main/trunk/src/input/input_manager.cpp 2010-03-08 03:18:11 UTC (rev 4956) @@ -153,6 +153,12 @@ kart->setPowerup(POWERUP_PARACHUTE, 10000); } break; + case KEY_F7: + if (race_manager->getNumPlayers() == 1) + { + Kart* kart = world->getLocalPlayerKart(0); + kart->setPowerup(POWERUP_ZIPPER, 10000); + } #endif case KEY_F12: UserConfigParams::m_display_fps = !UserConfigParams::m_display_fps; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mbj...@us...> - 2010-03-13 23:29:02
|
Revision: 4990 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4990&view=rev Author: mbjornstk Date: 2010-03-13 23:28:52 +0000 (Sat, 13 Mar 2010) Log Message: ----------- Add break, otherwise zipper cheat fell to next case. Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-03-12 12:21:00 UTC (rev 4989) +++ main/trunk/src/input/input_manager.cpp 2010-03-13 23:28:52 UTC (rev 4990) @@ -148,6 +148,7 @@ Kart* kart = world->getLocalPlayerKart(0); kart->setPowerup(POWERUP_ZIPPER, 10000); } + break; case KEY_F11: if(value && control_is_pressed) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-04-15 23:59:42
|
Revision: 5203 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5203&view=rev Author: hikerstk Date: 2010-04-15 23:59:36 +0000 (Thu, 15 Apr 2010) Log Message: ----------- A warning about "Unsupported texture" is caused by irrlicht internally. To get a warning-free release, this particular message is now only printed in debug mode (and a line is added that this message will not be printed in release mode). Just a dirty work around, we can't change this and have to wait for irrlicht to get fixed. Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-04-15 23:56:32 UTC (rev 5202) +++ main/trunk/src/input/input_manager.cpp 2010-04-15 23:59:36 UTC (rev 5203) @@ -535,6 +535,18 @@ // Ignore 'normal' messages if (event.LogEvent.Level>0) { + // Unfortunatly irrlicht produces some internal error/warnings + // messages that can't be avoided (see COpenGLTexture where + // the constructor of COpenGLFBOTexture is used without + // specifying a color format, so the detault format (ECF_UNKOWNO) + // is used, which produces this error message). In non-debug + // mode ignore this error message, but leave it in for debugging. + if(std::string(event.LogEvent.Text)=="Unsupported texture format") +#ifdef DEBUG + printf("The following message will not be printed in release mode:\n"); +#else + return EVENT_BLOCK; +#endif printf("Level %d: %s\n", event.LogEvent.Level,event.LogEvent.Text); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-05-01 19:35:57
|
Revision: 5335 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5335&view=rev Author: auria Date: 2010-05-01 19:35:51 +0000 (Sat, 01 May 2010) Log Message: ----------- Minor improvements to invalid input detection Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-05-01 19:20:16 UTC (rev 5334) +++ main/trunk/src/input/input_manager.cpp 2010-05-01 19:35:51 UTC (rev 5335) @@ -45,6 +45,7 @@ #include "states_screens/kart_selection.hpp" #include "states_screens/options_screen_input.hpp" #include "states_screens/state_manager.hpp" +#include "utils/string_utils.hpp" InputManager *input_manager; using GUIEngine::EventPropagation; @@ -422,9 +423,18 @@ // early menus where we accept every input because players are not set-up yet if (m_master_player_only && player == NULL) { - //I18N: message shown when a player that isn't game master tries to modify options that - //I18N: only the game master is allowed to - GUIEngine::showMessage(_("Only the Game Master may act at this point!")); + if (type == Input::IT_STICKMOTION || type == Input::IT_STICKBUTTON || + type == Input::IT_STICKHAT) + { + GamePadDevice* gp = getDeviceList()->getGamePadFromIrrID(deviceID); + + if (gp != NULL) + { + //I18N: message shown when an input device is used but is not associated to any player + GUIEngine::showMessage(StringUtils::insertValues(_("Ignoring '%s', you needed to join earlier to play!"), + irr::core::stringw(gp->m_name.c_str()).c_str() ).c_str()); + } + } return; } @@ -436,11 +446,13 @@ m_timer_in_use = true; m_timer = 0.25; } - + + // player may be NULL in early menus, before player setup has been performed int playerID = (player == NULL ? 0 : player->getID()); // If only the master player can act, and this player is not the master, ignore his input - if (m_device_manager->getAssignMode() == ASSIGN && m_master_player_only && playerID != 0) + if (m_device_manager->getAssignMode() == ASSIGN && m_master_player_only && + playerID != PLAYER_ID_GAME_MASTER) { //I18N: message shown when a player that isn't game master tries to modify options that //I18N: only the game master is allowed to @@ -448,6 +460,7 @@ return; } + // all is good, pass the translated input event on to the event handler GUIEngine::EventHandler::get()->processAction(action, abs(value), type, playerID); } } @@ -507,7 +520,7 @@ // FIXME - AD_NEGATIVE/AD_POSITIVE are probably useless since value contains that info too if (value < 0) - dispatchInput(Input::IT_STICKMOTION, event.JoystickEvent.Joystick , axis_id, Input::AD_NEGATIVE, value); + dispatchInput(Input::IT_STICKMOTION, event.JoystickEvent.Joystick, axis_id, Input::AD_NEGATIVE, value); else dispatchInput(Input::IT_STICKMOTION, event.JoystickEvent.Joystick, axis_id, Input::AD_POSITIVE, value); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-05-03 17:19:29
|
Revision: 5363 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5363&view=rev Author: auria Date: 2010-05-03 17:19:23 +0000 (Mon, 03 May 2010) Log Message: ----------- Fixed glitch that appeared in the new input configuration screen (I actually fail to see why it worked before) Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-05-03 17:18:47 UTC (rev 5362) +++ main/trunk/src/input/input_manager.cpp 2010-05-03 17:19:23 UTC (rev 5363) @@ -212,7 +212,7 @@ m_sensed_input->btnID = btnID; m_sensed_input->axisDirection = axisDirection; - if (type == Input::IT_KEYBOARD) + if (type == Input::IT_KEYBOARD && value > Input::MAX_VALUE/2) { OptionsScreenInput2::getInstance()->gotSensedInput(m_sensed_input); return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-05-07 17:17:13
|
Revision: 5404 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5404&view=rev Author: auria Date: 2010-05-07 17:17:07 +0000 (Fri, 07 May 2010) Log Message: ----------- Removed pointer visibility handling code from the input manager, it has nothing to do there and caused bugs (e.g. hiding cursor during input sensing) Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-05-07 17:11:19 UTC (rev 5403) +++ main/trunk/src/input/input_manager.cpp 2010-05-07 17:17:07 UTC (rev 5404) @@ -28,7 +28,6 @@ #include "main_loop.hpp" #include "config/player.hpp" #include "config/user_config.hpp" -#include "graphics/irr_driver.hpp" #include "guiengine/modaldialog.hpp" #include "guiengine/engine.hpp" #include "guiengine/event_handler.hpp" @@ -736,7 +735,7 @@ // supresses to the notification of them as an input. m_mouse_val_x = m_mouse_val_y = 0; - irr_driver->showPointer(); + //irr_driver->showPointer(); m_mode = MENU; break; @@ -754,7 +753,7 @@ case INPUT_SENSE_GAMEPAD: // Leaving input sense mode. - irr_driver->showPointer(); + //irr_driver->showPointer(); m_sensed_input_high.clear(); // The order is deliberate just in case someone starts to make @@ -768,7 +767,7 @@ break; case LOWLEVEL: // Leaving lowlevel mode. - irr_driver->showPointer(); + //irr_driver->showPointer(); m_mode = MENU; @@ -793,7 +792,7 @@ // Installs the action map for the ingame mode. // m_action_map = UserConfigParams::newIngameActionMap(); - irr_driver->hidePointer(); + //irr_driver->hidePointer(); m_mode = INGAME; @@ -811,7 +810,7 @@ m_mouse_val_x = m_mouse_val_y = 0; m_sensed_input = new Input(); - irr_driver->hidePointer(); + //irr_driver->hidePointer(); m_mode = new_mode; @@ -823,7 +822,7 @@ // We must be in menu mode now in order to switch. assert (m_mode == MENU); - irr_driver->hidePointer(); + //irr_driver->hidePointer(); m_mode = LOWLEVEL; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-05-07 17:20:42
|
Revision: 5405 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5405&view=rev Author: auria Date: 2010-05-07 17:20:36 +0000 (Fri, 07 May 2010) Log Message: ----------- includes cleanup in input manager Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-05-07 17:17:07 UTC (rev 5404) +++ main/trunk/src/input/input_manager.cpp 2010-05-07 17:20:36 UTC (rev 5405) @@ -26,25 +26,20 @@ #include <algorithm> #include "main_loop.hpp" -#include "config/player.hpp" -#include "config/user_config.hpp" -#include "guiengine/modaldialog.hpp" #include "guiengine/engine.hpp" #include "guiengine/event_handler.hpp" +#include "guiengine/modaldialog.hpp" #include "guiengine/screen.hpp" #include "input/device_manager.hpp" #include "input/input.hpp" -#include "items/item_manager.hpp" -#include "items/projectile_manager.hpp" -#include "karts/controller/player_controller.hpp" #include "karts/kart.hpp" #include "modes/world.hpp" #include "race/history.hpp" -#include "race/race_manager.hpp" #include "states_screens/kart_selection.hpp" #include "states_screens/options_screen_input2.hpp" #include "states_screens/state_manager.hpp" #include "utils/string_utils.hpp" + InputManager *input_manager; using GUIEngine::EventPropagation; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-06-24 18:18:36
|
Revision: 5550 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5550&view=rev Author: auria Date: 2010-06-24 18:18:30 +0000 (Thu, 24 Jun 2010) Log Message: ----------- Fixed leaving game in multiplayer kart selection screen Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-06-24 17:26:57 UTC (rev 5549) +++ main/trunk/src/input/input_manager.cpp 2010-06-24 18:18:30 UTC (rev 5550) @@ -353,9 +353,9 @@ // If we're in the kart menu awaiting new players, do special things // when a device presses fire or rescue if (m_device_manager->getAssignMode() == DETECT_NEW) - { + { // Player is unjoining - if ((player != NULL) && (action == PA_RESCUE)) + if ((player != NULL) && (action == PA_RESCUE || action == PA_MENU_CANCEL)) { // returns true if the event was handled if (KartSelectionScreen::getInstance()->playerQuit( player )) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-08-04 22:47:43
|
Revision: 5724 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5724&view=rev Author: hikerstk Date: 2010-08-04 22:47:36 +0000 (Wed, 04 Aug 2010) Log Message: ----------- Bugfix: avoid crash if any of the special debug keys (F1, F2, ...) is pressed when no race is on. Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-08-04 13:10:20 UTC (rev 5723) +++ main/trunk/src/input/input_manager.cpp 2010-08-04 22:47:36 UTC (rev 5724) @@ -96,49 +96,49 @@ control_is_pressed = value!=0; break; case KEY_F1: - if (race_manager->getNumPlayers() ==1 ) + if (world && race_manager->getNumPlayers() ==1 ) { Kart* kart = world->getLocalPlayerKart(0); kart->setPowerup(PowerupManager::POWERUP_BUBBLEGUM, 10000); } break; case KEY_F2: - if (race_manager->getNumPlayers() ==1 ) + if (world && race_manager->getNumPlayers() ==1 ) { Kart* kart = world->getLocalPlayerKart(0); kart->setPowerup(PowerupManager::POWERUP_PLUNGER, 10000); } break; case KEY_F3: - if (race_manager->getNumPlayers() ==1 ) + if (world && race_manager->getNumPlayers() ==1 ) { Kart* kart = world->getLocalPlayerKart(0); kart->setPowerup(PowerupManager::POWERUP_CAKE, 10000); } break; case KEY_F4: - if (race_manager->getNumPlayers() ==1 ) + if (world && race_manager->getNumPlayers() ==1 ) { Kart* kart = world->getLocalPlayerKart(0); kart->setPowerup(PowerupManager::POWERUP_SWITCH, 10000); } break; case KEY_F5: - if (race_manager->getNumPlayers() ==1 ) + if (world && race_manager->getNumPlayers() ==1 ) { Kart* kart = world->getLocalPlayerKart(0); kart->setPowerup(PowerupManager::POWERUP_BOWLING, 10000); } break; case KEY_F6: - if (race_manager->getNumPlayers() == 1) + if (world && race_manager->getNumPlayers() == 1) { Kart* kart = world->getLocalPlayerKart(0); kart->setPowerup(PowerupManager::POWERUP_PARACHUTE, 10000); } break; case KEY_F7: - if (race_manager->getNumPlayers() == 1) + if (world && race_manager->getNumPlayers() == 1) { Kart* kart = world->getLocalPlayerKart(0); kart->setPowerup(PowerupManager::POWERUP_ZIPPER, 10000); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-09-16 23:29:23
|
Revision: 6030 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=6030&view=rev Author: hikerstk Date: 2010-09-16 23:29:17 +0000 (Thu, 16 Sep 2010) Log Message: ----------- Fixed F12 (display FPS) handling so that it would only trigger on pressing the button, not (again) on releasing it. Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-09-16 17:11:18 UTC (rev 6029) +++ main/trunk/src/input/input_manager.cpp 2010-09-16 23:29:17 UTC (rev 6030) @@ -152,7 +152,8 @@ break; #endif case KEY_F12: - UserConfigParams::m_display_fps = !UserConfigParams::m_display_fps; + if(value) + UserConfigParams::m_display_fps = !UserConfigParams::m_display_fps; break; #ifndef WIN32 // For now disable F9 toggling fullscreen, since windows requires This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-11-09 06:17:13
|
Revision: 6476 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=6476&view=rev Author: hikerstk Date: 2010-11-09 06:17:07 +0000 (Tue, 09 Nov 2010) Log Message: ----------- Added (currently commented out) debug feature that F1 will force the first kart to be rescued (which can be useful to find places where the AI gets into a: rescue, drive, crash, rescue-to-same-place,... loop). Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-11-09 06:14:15 UTC (rev 6475) +++ main/trunk/src/input/input_manager.cpp 2010-11-09 06:17:07 UTC (rev 6476) @@ -112,6 +112,11 @@ { Kart* kart = world->getLocalPlayerKart(0); kart->setPowerup(PowerupManager::POWERUP_BUBBLEGUM, 10000); +#ifdef FORCE_RESCUE_ON_FIRST_KART + // Can be useful for debugging places where the AI gets into + // a rescue loop: rescue, drive, crash, rescue to same place + world->getKart(0)->forceRescue(); +#endif } break; case KEY_F2: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-11-10 16:54:14
|
Revision: 6493 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=6493&view=rev Author: auria Date: 2010-11-10 16:54:08 +0000 (Wed, 10 Nov 2010) Log Message: ----------- Fixed crash when using flying keys (I/K) outside of a game Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-11-10 16:53:45 UTC (rev 6492) +++ main/trunk/src/input/input_manager.cpp 2010-11-10 16:54:08 UTC (rev 6493) @@ -97,13 +97,21 @@ break; case KEY_KEY_I: { + if (world == NULL) break; + Kart* kart = world->getLocalPlayerKart(0); + if (kart == NULL) break; + kart->flyUp(); break; } case KEY_KEY_K: { + if (world == NULL) break; + Kart* kart = world->getLocalPlayerKart(0); + if (kart == NULL) break; + kart->flyDown(); break; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-11-28 11:39:15
|
Revision: 6740 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=6740&view=rev Author: hikerstk Date: 2010-11-28 11:39:09 +0000 (Sun, 28 Nov 2010) Log Message: ----------- Fixed continuous warnings message "Ignoring '...', you needed to join earlier to play!" This is caused by polling the joystick device, and the joystick events triggering the message. For now the message is not printed if the joystick value is inside the deadzone value for the joystick (this means that the deadzone is tested at two locations - once in input manager to avoid the message, once in input_device - but the latter is not triggered in this case since player is NULL). Not ideal, so a better solution would be welcome. Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-11-28 11:28:07 UTC (rev 6739) +++ main/trunk/src/input/input_manager.cpp 2010-11-28 11:39:09 UTC (rev 6740) @@ -485,7 +485,8 @@ { GamePadDevice* gp = getDeviceList()->getGamePadFromIrrID(deviceID); - if (gp != NULL) + if (gp != NULL && + abs(value)>gp->m_deadzone) { //I18N: message shown when an input device is used but is not associated to any player GUIEngine::showMessage(StringUtils::insertValues(_("Ignoring '%s', you needed to join earlier to play!"), @@ -575,11 +576,7 @@ event.JoystickEvent.Joystick, axis_id, value); } - // FIXME - AD_NEGATIVE/AD_POSITIVE are probably useless since value contains that info too -// if (value < 0) dispatchInput(Input::IT_STICKMOTION, event.JoystickEvent.Joystick, axis_id, Input::AD_NEUTRAL, value); -// else -// dispatchInput(Input::IT_STICKMOTION, event.JoystickEvent.Joystick, axis_id, Input::AD_POSITIVE, value); } GamePadDevice* gp = getDeviceList()->getGamePadFromIrrID(event.JoystickEvent.Joystick); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-12-17 12:17:19
|
Revision: 7048 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=7048&view=rev Author: hikerstk Date: 2010-12-17 12:17:13 +0000 (Fri, 17 Dec 2010) Log Message: ----------- Bugfix (pressing F10 when no game is running could crash). Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-12-16 23:09:12 UTC (rev 7047) +++ main/trunk/src/input/input_manager.cpp 2010-12-17 12:17:13 UTC (rev 7048) @@ -199,7 +199,7 @@ // Fall through to put the game into pause mode. #endif case KEY_F10: - history->Save(); + if(world) history->Save(); break; default: break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-12-17 18:55:40
|
Revision: 7055 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=7055&view=rev Author: auria Date: 2010-12-17 18:55:34 +0000 (Fri, 17 Dec 2010) Log Message: ----------- Fixed debug mode build Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-12-17 18:23:55 UTC (rev 7054) +++ main/trunk/src/input/input_manager.cpp 2010-12-17 18:55:34 UTC (rev 7055) @@ -83,10 +83,10 @@ //----------------------------------------------------------------------------- void InputManager::handleStaticAction(int key, int value) { -#ifdef DEBUG + static bool control_is_pressed=false; World *world=World::getWorld(); -#endif + switch (key) { #ifdef DEBUG This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-12-21 23:39:26
|
Revision: 7135 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=7135&view=rev Author: auria Date: 2010-12-21 23:39:20 +0000 (Tue, 21 Dec 2010) Log Message: ----------- Fix compile warning Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-12-21 22:06:38 UTC (rev 7134) +++ main/trunk/src/input/input_manager.cpp 2010-12-21 23:39:20 UTC (rev 7135) @@ -312,6 +312,14 @@ OptionsScreenInput2::getInstance()->gotSensedInput(sensed_input); } break; + + case Input::IT_NONE: + case Input::IT_STICKHAT: + case Input::IT_MOUSEMOTION: + case Input::IT_MOUSEBUTTON: + // uninteresting (but we keep them here to explicitely state we do + // nothing with them, and thus to fix warnings) + break; } // switch } // inputSensing This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mbj...@us...> - 2010-12-22 01:01:03
|
Revision: 7137 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=7137&view=rev Author: mbjornstk Date: 2010-12-22 01:00:56 +0000 (Wed, 22 Dec 2010) Log Message: ----------- Wrap code with {}. g++ dislikes new variables in switch/case if labels follow. Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-12-21 23:39:59 UTC (rev 7136) +++ main/trunk/src/input/input_manager.cpp 2010-12-22 01:00:56 UTC (rev 7137) @@ -264,6 +264,7 @@ } break; case Input::IT_STICKMOTION: + { std::cout << "%% storing new axis binding, value=" << value << " deviceID=" << deviceID << " button=" << button << " axisDirection=" << (axisDirection == Input::AD_NEGATIVE ? "-" : "+") << "\n"; @@ -312,7 +313,8 @@ OptionsScreenInput2::getInstance()->gotSensedInput(sensed_input); } break; - + } + case Input::IT_NONE: case Input::IT_STICKHAT: case Input::IT_MOUSEMOTION: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-12-28 00:34:33
|
Revision: 7173 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=7173&view=rev Author: auria Date: 2010-12-28 00:34:26 +0000 (Tue, 28 Dec 2010) Log Message: ----------- Add gamepad button info to --gamepad-debug, from our current bug reports this looks like info we need Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-12-27 00:08:33 UTC (rev 7172) +++ main/trunk/src/input/input_manager.cpp 2010-12-28 00:34:26 UTC (rev 7173) @@ -609,10 +609,15 @@ for(int i=0; i<gp->m_button_count; i++) { const bool isButtonPressed = event.JoystickEvent.IsButtonPressed(i); - + // Only report button events when the state of the button changes if ((!gp->isButtonPressed(i) && isButtonPressed) || (gp->isButtonPressed(i) && !isButtonPressed)) { + if (UserConfigParams::m_gamepad_debug) + { + printf("button %i, status=%i\n", i, isButtonPressed); + } + dispatchInput(Input::IT_STICKBUTTON, event.JoystickEvent.Joystick, i, Input::AD_POSITIVE, isButtonPressed ? Input::MAX_VALUE : 0); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2011-03-17 21:16:40
|
Revision: 7979 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=7979&view=rev Author: auria Date: 2011-03-17 21:16:33 +0000 (Thu, 17 Mar 2011) Log Message: ----------- Fixed crash when using debug mode from menu Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2011-03-17 21:09:33 UTC (rev 7978) +++ main/trunk/src/input/input_manager.cpp 2011-03-17 21:16:33 UTC (rev 7979) @@ -194,7 +194,10 @@ case KEY_F11: if (UserConfigParams::m_artist_debug_mode && value && control_is_pressed) { - world->getPhysics()->nextDebugMode(); + if (world != NULL) + { + world->getPhysics()->nextDebugMode(); + } } break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2011-04-13 04:36:24
|
Revision: 8327 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=8327&view=rev Author: hikerstk Date: 2011-04-13 04:36:18 +0000 (Wed, 13 Apr 2011) Log Message: ----------- Fixed compiler warnings. Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2011-04-13 03:55:02 UTC (rev 8326) +++ main/trunk/src/input/input_manager.cpp 2011-04-13 04:36:18 UTC (rev 8327) @@ -624,9 +624,9 @@ { // *0.017453925f is to convert degrees to radians dispatchInput(Input::IT_STICKMOTION, event.JoystickEvent.Joystick, Input::HAT_H_ID, Input::AD_NEUTRAL, - cos(event.JoystickEvent.POV*0.017453925f/100.0f)*Input::MAX_VALUE); + (int)(cos(event.JoystickEvent.POV*0.017453925f/100.0f)*Input::MAX_VALUE)); dispatchInput(Input::IT_STICKMOTION, event.JoystickEvent.Joystick, Input::HAT_V_ID, Input::AD_NEUTRAL, - sin(event.JoystickEvent.POV*0.017453925f/100.0f)*Input::MAX_VALUE); + (int)(sin(event.JoystickEvent.POV*0.017453925f/100.0f)*Input::MAX_VALUE)); } GamePadDevice* gp = getDeviceList()->getGamePadFromIrrID(event.JoystickEvent.Joystick); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |