Merge branch 'consolefuncrefactor' of https://github.com/jamesu/Torque3D into consolefuncrefactor

This commit is contained in:
DavidWyand-GG 2013-01-07 12:09:22 -05:00
commit 59aaaf1892
93 changed files with 1947 additions and 728 deletions

View file

@ -264,7 +264,7 @@ ConsoleMethod( CreatorTree, fileNameMatch, bool, 5, 5, "(string world, string ty
if(dToupper(argv[4][0]) != dToupper(argv[2][0]))
return(false);
return(!dStrnicmp(argv[4]+1, argv[3], typeLen));
return(!dStrnicmp(((const char*)argv[4])+1, argv[3], typeLen));
}
ConsoleMethod( CreatorTree, getSelected, S32, 2, 2, "Return a handle to the currently selected item.")

View file

@ -212,7 +212,7 @@ ConsoleStaticMethod( EditorIconRegistry, findIconBySimObject, const char*, 2, 2,
SimObject *obj = NULL;
if ( !Sim::findObject( argv[1], obj ) )
{
Con::warnf( "EditorIconRegistry::findIcon, parameter %d was not a SimObject!", argv[1] );
Con::warnf( "EditorIconRegistry::findIcon, parameter %d was not a SimObject!", (const char*)argv[1] );
return NULL;
}

View file

@ -792,7 +792,7 @@ ConsoleMethod( GuiDecalEditorCtrl, deleteSelectedDecal, void, 2, 2, "deleteSelec
ConsoleMethod( GuiDecalEditorCtrl, deleteDecalDatablock, void, 3, 3, "deleteSelectedDecalDatablock( String datablock )" )
{
String lookupName( argv[2] );
String lookupName( (const char*)argv[2] );
if( lookupName == String::EmptyString )
return;
@ -801,7 +801,7 @@ ConsoleMethod( GuiDecalEditorCtrl, deleteDecalDatablock, void, 3, 3, "deleteSele
ConsoleMethod( GuiDecalEditorCtrl, setMode, void, 3, 3, "setMode( String mode )()" )
{
String newMode = ( argv[2] );
String newMode = ( (const char*)argv[2] );
object->setMode( newMode );
}
@ -868,7 +868,7 @@ ConsoleMethod( GuiDecalEditorCtrl, editDecalDetails, void, 4, 4, "editDecalDetai
if ( (count != 7) )
{
Con::printf("Failed to parse decal information \"px py pz tx ty tz s\" from '%s'", argv[3]);
Con::printf("Failed to parse decal information \"px py pz tx ty tz s\" from '%s'", (const char*)argv[3]);
return;
}
@ -1253,4 +1253,4 @@ void DBRetargetUndoAction::redo()
if ( mEditor->isMethod( "rebuildInstanceTree" ) )
Con::executef( mEditor, "rebuildInstanceTree" );
}
#endif
#endif

View file

@ -2500,7 +2500,7 @@ ConsoleMethod( TerrainEditor, attachTerrain, void, 2, 3, "(TerrainBlock terrain)
terrains.push_back(terrBlock);
if(terrains.size() == 0)
Con::errorf(ConsoleLogEntry::Script, "TerrainEditor::attach: failed to attach to object '%s'", argv[2]);
Con::errorf(ConsoleLogEntry::Script, "TerrainEditor::attach: failed to attach to object '%s'", (const char*)argv[2]);
}
if (terrains.size() > 0)

View file

@ -2758,7 +2758,7 @@ void WorldEditor::initPersistFields()
//------------------------------------------------------------------------------
// These methods are needed for the console interfaces.
void WorldEditor::ignoreObjClass( U32 argc, const char **argv )
void WorldEditor::ignoreObjClass( U32 argc, ConsoleValueRef *argv )
{
for(S32 i = 2; i < argc; i++)
{
@ -3207,7 +3207,7 @@ ConsoleMethod( WorldEditor, setActiveSelection, void, 3, 3, "( id set ) - Set th
WorldEditorSelection* selection;
if( !Sim::findObject( argv[ 2 ], selection ) )
{
Con::errorf( "WorldEditor::setActiveSelectionSet - no selection set '%s'", argv[ 2 ] );
Con::errorf( "WorldEditor::setActiveSelectionSet - no selection set '%s'", (const char*)argv[ 2 ] );
return;
}
@ -3333,14 +3333,14 @@ ConsoleMethod( WorldEditor, alignByBounds, void, 3, 3, "(int boundsAxis)"
"Align all selected objects against the given bounds axis.")
{
if(!object->alignByBounds(dAtoi(argv[2])))
Con::warnf(ConsoleLogEntry::General, avar("worldEditor.alignByBounds: invalid bounds axis '%s'", argv[2]));
Con::warnf(ConsoleLogEntry::General, avar("worldEditor.alignByBounds: invalid bounds axis '%s'", (const char*)argv[2]));
}
ConsoleMethod( WorldEditor, alignByAxis, void, 3, 3, "(int axis)"
"Align all selected objects along the given axis.")
{
if(!object->alignByAxis(dAtoi(argv[2])))
Con::warnf(ConsoleLogEntry::General, avar("worldEditor.alignByAxis: invalid axis '%s'", argv[2]));
Con::warnf(ConsoleLogEntry::General, avar("worldEditor.alignByAxis: invalid axis '%s'", (const char*)argv[2]));
}
ConsoleMethod( WorldEditor, resetSelectedRotation, void, 2, 2, "")
@ -3545,7 +3545,7 @@ void WorldEditor::colladaExportSelection( const String &path )
ConsoleMethod( WorldEditor, colladaExportSelection, void, 3, 3,
"( String path ) - Export the combined geometry of all selected objects to the specified path in collada format." )
{
object->colladaExportSelection( argv[2] );
object->colladaExportSelection( (const char*)argv[2] );
}
void WorldEditor::makeSelectionPrefab( const char *filename )

View file

@ -76,7 +76,7 @@ class WorldEditor : public EditTSCtrl
Point3F p2;
};
void ignoreObjClass(U32 argc, const char** argv);
void ignoreObjClass(U32 argc, ConsoleValueRef* argv);
void clearIgnoreList();
static bool setObjectsUseBoxCenter( void *object, const char *index, const char *data ) { static_cast<WorldEditor*>(object)->setObjectsUseBoxCenter( dAtob( data ) ); return false; };

View file

@ -682,7 +682,7 @@ ConsoleMethod( WorldEditorSelection, union, void, 3, 3, "( SimSet set ) - Add al
SimSet* selection;
if( !Sim::findObject( argv[ 2 ], selection ) )
{
Con::errorf( "WorldEditorSelection::union - no SimSet '%s'", argv[ 2 ] );
Con::errorf( "WorldEditorSelection::union - no SimSet '%s'", (const char*)argv[ 2 ] );
return;
}
@ -698,7 +698,7 @@ ConsoleMethod( WorldEditorSelection, subtract, void, 3, 3, "( SimSet ) - Remove
SimSet* selection;
if( !Sim::findObject( argv[ 2 ], selection ) )
{
Con::errorf( "WorldEditorSelection::subtract - no SimSet '%s'", argv[ 2 ] );
Con::errorf( "WorldEditorSelection::subtract - no SimSet '%s'", (const char*)argv[ 2 ] );
return;
}