mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
TSShapeConstruct commands converted
This commit is contained in:
parent
06a7c953f9
commit
1eeec6a1f7
2 changed files with 9 additions and 64 deletions
|
|
@ -1154,7 +1154,7 @@ struct _BaseEngineConsoleCallbackHelper
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/// Matches up to storeArgs.
|
/// Matches up to storeArgs.
|
||||||
static const U32 MAX_ARGUMENTS = 11;
|
static constexpr U32 MAX_ARGUMENTS = 11;
|
||||||
|
|
||||||
SimObject* mThis;
|
SimObject* mThis;
|
||||||
S32 mInitialArgc;
|
S32 mInitialArgc;
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,8 @@ public:
|
||||||
{
|
{
|
||||||
eCommandType type; // Command type
|
eCommandType type; // Command type
|
||||||
StringTableEntry name; // Command name
|
StringTableEntry name; // Command name
|
||||||
String argv[10]; // Command arguments
|
static constexpr U32 MAX_ARGS = 10;
|
||||||
|
String argv[MAX_ARGS]; // Command arguments
|
||||||
S32 argc; // Number of arguments
|
S32 argc; // Number of arguments
|
||||||
Command() : type(CmdInvalid), name(0), argc(0) { }
|
Command() : type(CmdInvalid), name(0), argc(0) { }
|
||||||
Command( const char* _name )
|
Command( const char* _name )
|
||||||
|
|
@ -105,68 +106,12 @@ public:
|
||||||
{
|
{
|
||||||
name = StringTable->insert( _name );
|
name = StringTable->insert( _name );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper functions to fill in the command arguments
|
// Helper functions to fill in the command arguments
|
||||||
inline void addArgs() { }
|
template<typename ...ArgTs> inline void addArgs(ArgTs ...args){
|
||||||
|
using Helper = engineAPI::detail::MarshallHelpers;
|
||||||
template< typename A >
|
Helper::marshallEach(argc, argv, args...);
|
||||||
inline void addArgs( A a )
|
}
|
||||||
{
|
|
||||||
argv[argc++] = EngineMarshallData( a );
|
|
||||||
}
|
|
||||||
template< typename A, typename B > void addArgs( A a, B b )
|
|
||||||
{
|
|
||||||
addArgs( a );
|
|
||||||
addArgs( b );
|
|
||||||
}
|
|
||||||
template< typename A, typename B, typename C >
|
|
||||||
inline void addArgs( A a, B b, C c )
|
|
||||||
{
|
|
||||||
addArgs( a );
|
|
||||||
addArgs( b, c );
|
|
||||||
}
|
|
||||||
template< typename A, typename B, typename C, typename D >
|
|
||||||
inline void addArgs( A a, B b, C c, D d )
|
|
||||||
{
|
|
||||||
addArgs( a );
|
|
||||||
addArgs( b, c, d );
|
|
||||||
}
|
|
||||||
template< typename A, typename B, typename C, typename D, typename E >
|
|
||||||
inline void addArgs( A a, B b, C c, D d, E e )
|
|
||||||
{
|
|
||||||
addArgs( a );
|
|
||||||
addArgs( b, c, d, e );
|
|
||||||
}
|
|
||||||
template< typename A, typename B, typename C, typename D, typename E, typename F >
|
|
||||||
inline void addArgs( A a, B b, C c, D d, E e, F f )
|
|
||||||
{
|
|
||||||
addArgs( a );
|
|
||||||
addArgs( b, c, d, e, f );
|
|
||||||
}
|
|
||||||
template< typename A, typename B, typename C, typename D, typename E, typename F, typename G >
|
|
||||||
inline void addArgs( A a, B b, C c, D d, E e, F f, G g )
|
|
||||||
{
|
|
||||||
addArgs( a );
|
|
||||||
addArgs( b, c, d, e, f, g );
|
|
||||||
}
|
|
||||||
template< typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H >
|
|
||||||
inline void addArgs( A a, B b, C c, D d, E e, F f, G g, H h )
|
|
||||||
{
|
|
||||||
addArgs( a );
|
|
||||||
addArgs( b, c, d, e, f, g, h );
|
|
||||||
}
|
|
||||||
template< typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I >
|
|
||||||
inline void addArgs( A a, B b, C c, D d, E e, F f, G g, H h, I i )
|
|
||||||
{
|
|
||||||
addArgs( a );
|
|
||||||
addArgs( b, c, d, e, f, g, h, i );
|
|
||||||
}
|
|
||||||
template< typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I, typename J >
|
|
||||||
inline void addArgs( A a, B b, C c, D d, E e, F f, G g, H h, I i, J j )
|
|
||||||
{
|
|
||||||
addArgs( a );
|
|
||||||
addArgs( b, c, d, e, f, g, h, i, j );
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Vector<Command> mCommands;
|
Vector<Command> mCommands;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue