mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-19 19:35:26 +00:00
add typeS16
This commit is contained in:
parent
676a3dd6dc
commit
b36ec14194
5 changed files with 28 additions and 6 deletions
|
|
@ -330,6 +330,27 @@ ConsoleSetType( TypeS8 )
|
|||
Con::printf("(TypeU8) Cannot set multiple args to a single S8.");
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// TypeS16
|
||||
//-----------------------------------------------------------------------------
|
||||
ConsoleType(char, TypeS16, S16, "")
|
||||
ImplementConsoleTypeCasters(TypeS16, S16)
|
||||
|
||||
ConsoleGetType(TypeS16)
|
||||
{
|
||||
static const U32 bufSize = 256;
|
||||
char* returnBuffer = Con::getReturnBuffer(bufSize);
|
||||
dSprintf(returnBuffer, bufSize, "%d", *((S16*)dptr));
|
||||
return returnBuffer;
|
||||
}
|
||||
|
||||
ConsoleSetType(TypeS16)
|
||||
{
|
||||
if (argc == 1)
|
||||
*((S16*)dptr) = dAtoi(argv[0]);
|
||||
else
|
||||
Con::printf("(TypeU8) Cannot set multiple args to a single S8.");
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
// TypeS32
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ class SimPersistID;
|
|||
DefineConsoleType( TypeBool, bool )
|
||||
DefineConsoleType( TypeBoolVector, Vector<bool>)
|
||||
DefineConsoleType( TypeS8, S8 )
|
||||
DefineConsoleType( TypeS16, S16)
|
||||
DefineConsoleType( TypeS32, S32 )
|
||||
DefineConsoleType( TypeS32Vector, Vector<S32> )
|
||||
DefineConsoleType( TypeF64, F64 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue