irrlichttypes.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. Minetest
  3. Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU Lesser General Public License as published by
  6. the Free Software Foundation; either version 2.1 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public License along
  13. with this program; if not, write to the Free Software Foundation, Inc.,
  14. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  15. */
  16. #pragma once
  17. /*
  18. * IrrlichtMt already includes stdint.h in irrTypes.h. This works everywhere
  19. * we need it to (including recent MSVC), so should be fine here too.
  20. */
  21. #include <cstdint>
  22. #include <irrTypes.h>
  23. using namespace irr;
  24. namespace irr {
  25. #if (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR >= 9)
  26. namespace core {
  27. template <typename T>
  28. inline T roundingError();
  29. template <>
  30. inline s16 roundingError()
  31. {
  32. return 0;
  33. }
  34. }
  35. #endif
  36. }
  37. #define S8_MIN (-0x7F - 1)
  38. #define S16_MIN (-0x7FFF - 1)
  39. #define S32_MIN (-0x7FFFFFFF - 1)
  40. #define S64_MIN (-0x7FFFFFFFFFFFFFFF - 1)
  41. #define S8_MAX 0x7F
  42. #define S16_MAX 0x7FFF
  43. #define S32_MAX 0x7FFFFFFF
  44. #define S64_MAX 0x7FFFFFFFFFFFFFFF
  45. #define U8_MAX 0xFF
  46. #define U16_MAX 0xFFFF
  47. #define U32_MAX 0xFFFFFFFF
  48. #define U64_MAX 0xFFFFFFFFFFFFFFFF