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
|
|
@ -30,6 +30,7 @@
|
|||
#include "shaderGen/shaderGen.h"
|
||||
#include "core/module.h"
|
||||
#include "console/consoleTypes.h"
|
||||
#include "console/engineAPI.h"
|
||||
|
||||
|
||||
MODULE_BEGIN( MaterialManager )
|
||||
|
|
@ -450,14 +451,14 @@ bool MaterialManager::_handleGFXEvent( GFXDevice::GFXDeviceEventType event_ )
|
|||
return true;
|
||||
}
|
||||
|
||||
ConsoleFunction( reInitMaterials, void, 1, 1,
|
||||
DefineConsoleFunction( reInitMaterials, void, (),,
|
||||
"@brief Flushes all procedural shaders and re-initializes all active material instances.\n\n"
|
||||
"@ingroup Materials")
|
||||
{
|
||||
MATMGR->flushAndReInitInstances();
|
||||
}
|
||||
|
||||
ConsoleFunction( addMaterialMapping, void, 3, 3, "(string texName, string matName)\n"
|
||||
DefineConsoleFunction( addMaterialMapping, void, (const char * texName, const char * matName), , "(string texName, string matName)\n"
|
||||
"@brief Maps the given texture to the given material.\n\n"
|
||||
"Generates a console warning before overwriting.\n\n"
|
||||
"Material maps are used by terrain and interiors for triggering "
|
||||
|
|
@ -465,27 +466,27 @@ ConsoleFunction( addMaterialMapping, void, 3, 3, "(string texName, string matNam
|
|||
"block or interior surface using the associated texture.\n\n"
|
||||
"@ingroup Materials")
|
||||
{
|
||||
MATMGR->mapMaterial(argv[1], argv[2]);
|
||||
MATMGR->mapMaterial(texName, matName);
|
||||
}
|
||||
|
||||
ConsoleFunction( getMaterialMapping, const char*, 2, 2, "(string texName)\n"
|
||||
DefineConsoleFunction( getMaterialMapping, const char*, (const char * texName), , "(string texName)\n"
|
||||
"@brief Returns the name of the material mapped to this texture.\n\n"
|
||||
"If no materials are found, an empty string is returned.\n\n"
|
||||
"@param texName Name of the texture\n\n"
|
||||
"@ingroup Materials")
|
||||
{
|
||||
return MATMGR->getMapEntry(argv[1]).c_str();
|
||||
return MATMGR->getMapEntry(texName).c_str();
|
||||
}
|
||||
|
||||
ConsoleFunction( dumpMaterialInstances, void, 1, 1,
|
||||
DefineConsoleFunction( dumpMaterialInstances, void, (), ,
|
||||
"@brief Dumps a formatted list of currently allocated material instances to the console.\n\n"
|
||||
"@ingroup Materials")
|
||||
{
|
||||
MATMGR->dumpMaterialInstances();
|
||||
}
|
||||
|
||||
ConsoleFunction( getMapEntry, const char *, 2, 2,
|
||||
DefineConsoleFunction( getMapEntry, const char*, (const char * texName), ,
|
||||
"@hide")
|
||||
{
|
||||
return MATMGR->getMapEntry( argv[1] );
|
||||
return MATMGR->getMapEntry( String(texName) );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue