enginePrimitives.cpp 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) 2012 GarageGames, LLC
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to
  6. // deal in the Software without restriction, including without limitation the
  7. // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  8. // sell copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  20. // IN THE SOFTWARE.
  21. //-----------------------------------------------------------------------------
  22. #include "console/enginePrimitives.h"
  23. #include "console/engineTypeInfo.h"
  24. IMPLEMENT_PRIMITIVE( bool, bool,, "Boolean true/false." );
  25. IMPLEMENT_PRIMITIVE( S8, byte,, "8bit signed integer." );
  26. IMPLEMENT_PRIMITIVE( U8, ubyte,, "8bit unsigned integer." );
  27. IMPLEMENT_PRIMITIVE( S16, short,, "16bit signed integer.");
  28. IMPLEMENT_PRIMITIVE( U16, ushort,, "16bit unsigned integer.");
  29. IMPLEMENT_PRIMITIVE( S32, int,, "32bit signed integer." );
  30. IMPLEMENT_PRIMITIVE( U32, uint,, "32bit unsigned integer." );
  31. IMPLEMENT_PRIMITIVE( F32, float,, "32bit single-precision floating-point." );
  32. IMPLEMENT_PRIMITIVE( F64, double,, "64bit double-precision floating-point." );
  33. IMPLEMENT_PRIMITIVE( String, string,, "Null-terminated UTF-16 Unicode string." );
  34. IMPLEMENT_PRIMITIVE( const UTF8*, cstring,, "Null-terminated UTF-8 Unicode string.");
  35. IMPLEMENT_PRIMITIVE( void*, ptr,, "Opaque pointer." );
  36. // Define pointer types for vectors.
  37. IMPLEMENT_PRIMITIVE( bool*, ptr_bool,, "Pointer to a bool." );
  38. IMPLEMENT_PRIMITIVE( U8*, ptr_ubyte,, "Pointer to an unsigned byte." );
  39. IMPLEMENT_PRIMITIVE( U32*, ptr_uint,, "Pointer to an unsigned 32bit int." );
  40. IMPLEMENT_PRIMITIVE( S32*, ptr_int,, "Pointer to a 32bit int." );
  41. IMPLEMENT_PRIMITIVE( F32*, ptr_float,, "Pointer to a 32bit float." );
  42. IMPLEMENT_PRIMITIVE( Point3F*, ptr_Point3F,, "Pointer to a Point3F struct." );
  43. IMPLEMENT_PRIMITIVE( PlaneF*, ptr_PlaneF,, "Pointer to a PlaneF struct." );
  44. IMPLEMENT_PRIMITIVE( PolyhedronData::Edge*, ptr_Edge,, "Pointer to an Edge struct." );
  45. IMPLEMENT_PRIMITIVE( const UTF8**, ptr_string,, "Pointer to an UTF-8 string." );