mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
Eliminate DefineConsoleFunction
This commit is contained in:
parent
037d089c4d
commit
5bde18143f
55 changed files with 314 additions and 332 deletions
|
|
@ -67,7 +67,7 @@ bool gEditingMission = false;
|
|||
|
||||
ConsoleFunctionGroupBegin( InputManagement, "Functions that let you deal with input from scripts" );
|
||||
|
||||
DefineConsoleFunction( deactivateDirectInput, void, (), ,
|
||||
DefineEngineFunction( deactivateDirectInput, void, (), ,
|
||||
"()"
|
||||
"@brief Disables DirectInput.\n\n"
|
||||
"Also deactivates any connected joysticks.\n\n"
|
||||
|
|
@ -77,7 +77,7 @@ DefineConsoleFunction( deactivateDirectInput, void, (), ,
|
|||
Input::deactivate();
|
||||
}
|
||||
|
||||
DefineConsoleFunction( activateDirectInput, void, (), ,
|
||||
DefineEngineFunction( activateDirectInput, void, (), ,
|
||||
"()"
|
||||
"@brief Activates DirectInput.\n\n"
|
||||
"Also activates any connected joysticks."
|
||||
|
|
@ -91,7 +91,7 @@ ConsoleFunctionGroupEnd( InputManagement );
|
|||
//--------------------------------------------------------------------------
|
||||
|
||||
static const U32 MaxPlayerNameLength = 16;
|
||||
DefineConsoleFunction( strToPlayerName, const char*, (const char* ptr ), , "strToPlayerName(string);" )
|
||||
DefineEngineFunction( strToPlayerName, const char*, (const char* ptr ), , "strToPlayerName(string);" )
|
||||
{
|
||||
|
||||
// Strip leading spaces and underscores:
|
||||
|
|
@ -147,7 +147,7 @@ DefineConsoleFunction( strToPlayerName, const char*, (const char* ptr ), , "strT
|
|||
|
||||
ConsoleFunctionGroupBegin( Platform , "General platform functions.");
|
||||
|
||||
DefineConsoleFunction( lockMouse, void, (bool isLocked ), , "(bool isLocked)"
|
||||
DefineEngineFunction( lockMouse, void, (bool isLocked ), , "(bool isLocked)"
|
||||
"@brief Lock or unlock the mouse to the window.\n\n"
|
||||
"When true, prevents the mouse from leaving the bounds of the game window.\n\n"
|
||||
"@ingroup Input")
|
||||
|
|
@ -156,7 +156,7 @@ DefineConsoleFunction( lockMouse, void, (bool isLocked ), , "(bool isLocked)"
|
|||
}
|
||||
|
||||
|
||||
DefineConsoleFunction( setNetPort, bool, (int port, bool bind), (true), "(int port, bool bind=true)"
|
||||
DefineEngineFunction( setNetPort, bool, (int port, bool bind), (true), "(int port, bool bind=true)"
|
||||
"@brief Set the network port for the game to use.\n\n"
|
||||
|
||||
"@param port The port to use.\n"
|
||||
|
|
@ -171,28 +171,28 @@ DefineConsoleFunction( setNetPort, bool, (int port, bool bind), (true), "(int po
|
|||
return Net::openPort((S32)port, bind);
|
||||
}
|
||||
|
||||
DefineConsoleFunction(isAddressTypeAvailable, bool, (int addressType), , "(protocol id)"
|
||||
DefineEngineFunction(isAddressTypeAvailable, bool, (int addressType), , "(protocol id)"
|
||||
"@brief Determines if a specified address type can be reached.\n\n"
|
||||
"@ingroup Networking")
|
||||
{
|
||||
return Net::isAddressTypeAvailable((NetAddress::Type)addressType);
|
||||
}
|
||||
|
||||
DefineConsoleFunction( closeNetPort, void, (), , "()"
|
||||
DefineEngineFunction( closeNetPort, void, (), , "()"
|
||||
"@brief Closes the current network port\n\n"
|
||||
"@ingroup Networking")
|
||||
{
|
||||
Net::closePort();
|
||||
}
|
||||
|
||||
DefineConsoleFunction( saveJournal, void, (const char * filename), , "(string filename)"
|
||||
DefineEngineFunction( saveJournal, void, (const char * filename), , "(string filename)"
|
||||
"Save the journal to the specified file.\n\n"
|
||||
"@ingroup Platform")
|
||||
{
|
||||
Journal::Record(filename);
|
||||
}
|
||||
|
||||
DefineConsoleFunction( playJournal, void, (const char * filename), , "(string filename)"
|
||||
DefineEngineFunction( playJournal, void, (const char * filename), , "(string filename)"
|
||||
"@brief Begin playback of a journal from a specified field.\n\n"
|
||||
"@param filename Name and path of file journal file\n"
|
||||
"@ingroup Platform")
|
||||
|
|
@ -202,7 +202,7 @@ DefineConsoleFunction( playJournal, void, (const char * filename), , "(string fi
|
|||
Journal::Play(filename);
|
||||
}
|
||||
|
||||
DefineConsoleFunction( getSimTime, S32, (), , "()"
|
||||
DefineEngineFunction( getSimTime, S32, (), , "()"
|
||||
"Return the current sim time in milliseconds.\n\n"
|
||||
"@brief Sim time is time since the game started.\n\n"
|
||||
"@ingroup Platform")
|
||||
|
|
@ -210,7 +210,7 @@ DefineConsoleFunction( getSimTime, S32, (), , "()"
|
|||
return Sim::getCurrentTime();
|
||||
}
|
||||
|
||||
DefineConsoleFunction( getRealTime, S32, (), , "()"
|
||||
DefineEngineFunction( getRealTime, S32, (), , "()"
|
||||
"@brief Return the current real time in milliseconds.\n\n"
|
||||
"Real time is platform defined; typically time since the computer booted.\n\n"
|
||||
"@ingroup Platform")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue