PolyGlobals.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. Copyright (C) 2011 by Ivan Safrin
  3. Permission is hereby granted, free of charge, to any person obtaining a copy
  4. of this software and associated documentation files (the "Software"), to deal
  5. in the Software without restriction, including without limitation the rights
  6. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. copies of the Software, and to permit persons to whom the Software is
  8. furnished to do so, subject to the following conditions:
  9. The above copyright notice and this permission notice shall be included in
  10. all copies or substantial portions of the Software.
  11. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  12. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  13. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  14. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  15. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  16. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  17. THE SOFTWARE.
  18. */
  19. #pragma once
  20. // Polycode CORE LIBRARY CONFIGURATION SECTION
  21. // Compile support for lua bindings.
  22. //#define _COMPILE_LUA
  23. #define COMPILE_GL_RENDERER
  24. #ifdef _WINDOWS
  25. #define WIN32_LEAN_AND_MEAN
  26. #pragma warning(disable:4251)
  27. #pragma warning(disable:4305)
  28. #pragma warning(disable:4244)
  29. #pragma warning(disable:4018)
  30. #pragma warning(disable:4996)
  31. #pragma warning(disable:4309)
  32. #define NULL 0
  33. #endif
  34. #define PI 3.14159265
  35. #define RADIANS 57.2957795
  36. #define TODEGREES 57.2957795
  37. #define TORADIANS 0.0174532925
  38. #ifdef _WINDOWS
  39. #define _PolyExport __declspec(dllexport)
  40. #else
  41. #define _PolyExport
  42. #endif
  43. //#define COMPILE_SDL_CORE 1
  44. #define PLATFORM_WINDOWS 1
  45. #define PLATFORM_MAC 2
  46. #define PLATFORM_UNIX 3
  47. #ifdef _WINDOWS
  48. #define PLATFORM PLATFORM_WINDOWS
  49. #elif defined(__APPLE__) && defined(__MACH__)
  50. #define PLATFORM PLATFORM_MAC
  51. #else
  52. #define PLATFORM PLATFORM_UNIX
  53. #endif
  54. // NETWORK STUFF
  55. #define MAX_PACKET_SIZE 1400
  56. // if set to 1, will create a thread for each network socket
  57. #define USE_THREADED_SOCKETS 0
  58. // Socket poll interval time in msecs
  59. #define SOCKET_POLL_INTERVAL 5
  60. #define PACKET_TYPE_USERDATA 0
  61. #define PACKET_TYPE_SETCLIENT_ID 1
  62. #define PACKET_TYPE_CLIENT_READY 2
  63. #define PACKET_TYPE_DISONNECT 3
  64. #define PACKET_TYPE_CLIENT_DATA 4
  65. typedef double Number;