[Opentnl-cvs] tnl/zap gameType.cpp,1.19,1.20 main.cpp,1.23,1.24 winJoystick.cpp,1.6,1.7
Brought to you by:
mark_frohnmayer,
s_alanet
From: Mark F. <mar...@us...> - 2004-05-07 22:59:20
|
Update of /cvsroot/opentnl/tnl/zap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22758/zap Modified Files: gameType.cpp main.cpp winJoystick.cpp Log Message: Fixed crash on exit with VOIP Added param to -joystick command line argument Updated readme with -joystick command line argument Index: main.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/main.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** main.cpp 7 May 2004 04:58:00 -0000 1.23 --- main.cpp 7 May 2004 22:59:11 -0000 1.24 *************** *** 52,55 **** --- 52,56 ---- const char *gWindowTitle = "ZAP II - The Return"; U32 gMaxPlayers = 128; + U32 gJoystickType = 0; const char *gMasterAddressString = "IP:master.opentnl.org:29005"; *************** *** 320,326 **** else if(!stricmp(argv[i], "-joystick")) { if(hasAdditionalArg) ! OptionsMenuUserInterface::joystickEnabled = true; ! } else if(!stricmp(argv[i], "-gain")) --- 321,327 ---- else if(!stricmp(argv[i], "-joystick")) { + OptionsMenuUserInterface::joystickEnabled = true; if(hasAdditionalArg) ! gJoystickType = atoi(argv[i+1]); } else if(!stricmp(argv[i], "-gain")) Index: gameType.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/gameType.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** gameType.cpp 7 May 2004 22:21:13 -0000 1.19 --- gameType.cpp 7 May 2004 22:59:11 -0000 1.20 *************** *** 426,430 **** { S32 clientIndex = findClientIndexByConnection(theClient); - destroy_lpc10_decoder_state(mClientList[clientIndex].decoderState); mClientList.erase(clientIndex); --- 426,429 ---- *************** *** 442,445 **** --- 441,446 ---- { S32 clientIndex = findClientIndexByName(name); + destroy_lpc10_decoder_state(mClientList[clientIndex].decoderState); + gGameUserInterface.displayMessage(Color(0.6f, 0.6f, 0.8f), "%s left the game.", name.getString()); mClientList.erase(clientIndex); Index: winJoystick.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/winJoystick.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** winJoystick.cpp 3 May 2004 02:41:01 -0000 1.6 --- winJoystick.cpp 7 May 2004 22:59:11 -0000 1.7 *************** *** 38,41 **** --- 38,42 ---- extern const char *gWindowTitle; + extern U32 gJoystickType; void checkMousePos(S32 maxdx, S32 maxdy) *************** *** 135,140 **** controls[0] = F32( js.lX ) - 32768.0f; controls[1] = F32( js.lY ) - 32768.0f; ! controls[2] = F32( js.lRz ) - 32768.0f; ! controls[3] = F32( js.rglSlider[0] ) - 32768.0f; for(U32 i = 0; i < 4; i++) --- 136,150 ---- controls[0] = F32( js.lX ) - 32768.0f; controls[1] = F32( js.lY ) - 32768.0f; ! ! if(gJoystickType == 0) ! { ! controls[2] = F32( js.lRz ) - 32768.0f; ! controls[3] = F32( js.rglSlider[0] ) - 32768.0f; ! } ! else if(gJoystickType == 1) ! { ! controls[3] = F32( js.lZ ) - 32768.0f; ! controls[2] = F32( js.lRz ) - 32768.0f; ! } for(U32 i = 0; i < 4; i++) |