mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-05 05:20:31 +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 "gfx/bitmap/gBitmap.h"
|
||||
#include "terrain/terrMaterial.h"
|
||||
#include "core/stream/fileStream.h"
|
||||
#include "console/engineAPI.h"
|
||||
|
||||
#ifdef TORQUE_TOOLS
|
||||
|
||||
|
|
@ -136,26 +137,18 @@ bool TerrainBlock::exportLayerMaps( const UTF8 *filePrefix, const String &format
|
|||
return true;
|
||||
}
|
||||
|
||||
ConsoleMethod( TerrainBlock, exportHeightMap, bool, 3, 4, "(string filename, [string format]) - export the terrain block's heightmap to a bitmap file (default: png)" )
|
||||
DefineConsoleMethod( TerrainBlock, exportHeightMap, bool, (const char * fileNameStr, const char * format), ( "png"), "(string filename, [string format]) - export the terrain block's heightmap to a bitmap file (default: png)" )
|
||||
{
|
||||
UTF8 fileName[1024];
|
||||
String format = "png";
|
||||
if( argc > 3 )
|
||||
format = (const char*)argv[ 3 ];
|
||||
|
||||
Con::expandScriptFilename( fileName, sizeof( fileName ), argv[2] );
|
||||
Con::expandScriptFilename( fileName, sizeof( fileName ), fileNameStr );
|
||||
|
||||
return object->exportHeightMap( fileName, format );
|
||||
}
|
||||
|
||||
ConsoleMethod( TerrainBlock, exportLayerMaps, bool, 3, 4, "(string filePrefix, [string format]) - export the terrain block's layer maps to bitmap files (default: png)" )
|
||||
DefineConsoleMethod( TerrainBlock, exportLayerMaps, bool, (const char * filePrefixStr, const char * format), ( "png"), "(string filePrefix, [string format]) - export the terrain block's layer maps to bitmap files (default: png)" )
|
||||
{
|
||||
UTF8 filePrefix[1024];
|
||||
String format = "png";
|
||||
if( argc > 3 )
|
||||
format = (const char*)argv[3];
|
||||
|
||||
Con::expandScriptFilename( filePrefix, sizeof( filePrefix ), argv[2] );
|
||||
Con::expandScriptFilename( filePrefix, sizeof( filePrefix ), filePrefixStr );
|
||||
|
||||
return object->exportLayerMaps( filePrefix, format );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue