mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Replaced a ton of ConsoleMethods with the DefineConsoleMethod Macro.
This commit is contained in:
parent
378a933894
commit
acb192e2a5
133 changed files with 1716 additions and 2087 deletions
|
|
@ -25,6 +25,7 @@
|
|||
#include "platform/platformInput.h"
|
||||
#include "platformWin32/winDirectInput.h"
|
||||
#include "console/console.h"
|
||||
#include "console/engineAPI.h"
|
||||
#include "core/util/journal/process.h"
|
||||
#include "windowManager/platformWindowMgr.h"
|
||||
|
||||
|
|
@ -155,19 +156,17 @@ void Input::init()
|
|||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
ConsoleFunction( isJoystickDetected, bool, 1, 1, "isJoystickDetected()" )
|
||||
DefineConsoleFunction( isJoystickDetected, bool, (), , "isJoystickDetected()")
|
||||
{
|
||||
argc; argv;
|
||||
return( DInputDevice::joystickDetected() );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
ConsoleFunction( getJoystickAxes, const char*, 2, 2, "getJoystickAxes( instance )" )
|
||||
DefineConsoleFunction( getJoystickAxes, const char*, (U32 deviceID), , "getJoystickAxes( instance )")
|
||||
{
|
||||
argc;
|
||||
DInputManager* mgr = dynamic_cast<DInputManager*>( Input::getManager() );
|
||||
if ( mgr )
|
||||
return( mgr->getJoystickAxesString( dAtoi( argv[1] ) ) );
|
||||
return( mgr->getJoystickAxesString( deviceID ) );
|
||||
|
||||
return( "" );
|
||||
}
|
||||
|
|
@ -505,10 +504,9 @@ void Input::log( const char* format, ... )
|
|||
va_end( argptr );
|
||||
}
|
||||
|
||||
ConsoleFunction( inputLog, void, 2, 2, "inputLog( string )" )
|
||||
DefineConsoleFunction( inputLog, void, (const char * log), , "inputLog( string )")
|
||||
{
|
||||
argc;
|
||||
Input::log( "%s\n", (const char*)argv[1] );
|
||||
Input::log( "%s\n", log );
|
||||
}
|
||||
#endif // LOG_INPUT
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue