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
|
|
@ -1345,7 +1345,7 @@ void SFXSource::_scatterTransform()
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
DefineEngineMethod( SFXSource, play, void, ( F32 fadeInTime ), ( -1.f ),
|
||||
DefineEngineMethod( SFXSource, play, void, ( F32 fadeInTime ), ( -1.0f ),
|
||||
"Start playback of the source.\n"
|
||||
"If the sound data for the source has not yet been fully loaded, there will be a delay after calling "
|
||||
"play and playback will start after the data has become available.\n\n"
|
||||
|
|
@ -1358,7 +1358,7 @@ DefineEngineMethod( SFXSource, play, void, ( F32 fadeInTime ), ( -1.f ),
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
DefineEngineMethod( SFXSource, stop, void, ( F32 fadeOutTime ), ( -1.f ),
|
||||
DefineEngineMethod( SFXSource, stop, void, ( F32 fadeOutTime ), ( -1.0f ),
|
||||
"Stop playback of the source.\n"
|
||||
"@param fadeOutTime Seconds for the sound to fade down to zero volume. If -1, the SFXDescription::fadeOutTime "
|
||||
"set in the source's associated description is used. Pass 0 to disable a fade-out effect that may be "
|
||||
|
|
@ -1371,7 +1371,7 @@ DefineEngineMethod( SFXSource, stop, void, ( F32 fadeOutTime ), ( -1.f ),
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
DefineEngineMethod( SFXSource, pause, void, ( F32 fadeOutTime ), ( -1.f ),
|
||||
DefineEngineMethod( SFXSource, pause, void, ( F32 fadeOutTime ), ( -1.0f ),
|
||||
"Pause playback of the source.\n"
|
||||
"@param fadeOutTime Seconds for the sound to fade down to zero volume. If -1, the SFXDescription::fadeOutTime "
|
||||
"set in the source's associated description is used. Pass 0 to disable a fade-out effect that may be "
|
||||
|
|
@ -1569,21 +1569,24 @@ static ConsoleDocFragment _sSetTransform2(
|
|||
"void setTransform( Point3F position, Point3F direction )"
|
||||
);
|
||||
|
||||
ConsoleMethod( SFXSource, setTransform, void, 3, 4,
|
||||
DefineConsoleMethod( SFXSource, setTransform, void, ( const char * position, const char * direction ), ( "" ),
|
||||
"( vector position [, vector direction ] ) "
|
||||
"Set the position and orientation of a 3D sound source.\n"
|
||||
"@hide" )
|
||||
{
|
||||
MatrixF mat = object->getTransform();
|
||||
|
||||
Point3F pos;
|
||||
dSscanf( argv[2], "%g %g %g", &pos.x, &pos.y, &pos.z );
|
||||
mat.setPosition( pos );
|
||||
if(dStrcmp( position , "")!=0 )
|
||||
{
|
||||
Point3F pos;
|
||||
dSscanf( position, "%g %g %g", &pos.x, &pos.y, &pos.z );
|
||||
mat.setPosition( pos );
|
||||
}
|
||||
|
||||
if( argc > 3 )
|
||||
if(dStrcmp( direction ,"")!=0 )
|
||||
{
|
||||
Point3F dir;
|
||||
dSscanf( argv[ 3 ], "%g %g %g", &dir.x, &dir.y, &dir.z );
|
||||
dSscanf( direction, "%g %g %g", &dir.x, &dir.y, &dir.z );
|
||||
mat.setColumn( 1, dir );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue