y_compilerpass.inc 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /**--------------------------------------------------------------------------**\
  2. ================================
  3. Y Sever Includes - Compiler Pass
  4. ================================
  5. Description:
  6. Detect which pass the compiler is on. Used by y_groups to include code that
  7. might be needed before it is known if it is needed (it can be dumped later).
  8. Legal:
  9. Version: MPL 1.1
  10. The contents of this file are subject to the Mozilla Public License Version
  11. 1.1 (the "License"); you may not use this file except in compliance with
  12. the License. You may obtain a copy of the License at
  13. http://www.mozilla.org/MPL/
  14. Software distributed under the License is distributed on an "AS IS" basis,
  15. WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  16. for the specific language governing rights and limitations under the
  17. License.
  18. The Original Code is the YSI master include.
  19. The Initial Developer of the Original Code is Alex "Y_Less" Cole.
  20. Portions created by the Initial Developer are Copyright (C) 2011
  21. the Initial Developer. All Rights Reserved.
  22. Contributors:
  23. ZeeX, koolk, JoeBullet/Google63, g_aSlice/Slice
  24. Thanks:
  25. JoeBullet/Google63 - Handy arbitrary ASM jump code using SCTRL.
  26. ZeeX - Very productive conversations.
  27. koolk - IsPlayerinAreaEx code.
  28. TheAlpha - Danish translation.
  29. breadfish - German translation.
  30. Fireburn - Dutch translation.
  31. yom - French translation.
  32. 50p - Polish translation.
  33. Zamaroht - Spanish translation.
  34. Dracoblue, sintax, mabako, Xtreme, other coders - Producing other modes
  35. for me to strive to better.
  36. Pixels^ - Running XScripters where the idea was born.
  37. Matite - Pestering me to release it and using it.
  38. Very special thanks to:
  39. Thiadmer - PAWN, whose limits continue to amaze me!
  40. Kye/Kalcor - SA:MP.
  41. SA:MP Team past, present and future - SA:MP.
  42. Version:
  43. 0.1
  44. Changelog:
  45. 14/04/13:
  46. First version.
  47. Functions:
  48. Public:
  49. -
  50. Core:
  51. -
  52. Stock:
  53. -
  54. Static:
  55. -
  56. Inline:
  57. -
  58. API:
  59. -
  60. Hooks:
  61. -
  62. Callbacks:
  63. -
  64. Definitions:
  65. -
  66. Enums:
  67. -
  68. Macros:
  69. -
  70. Tags:
  71. -
  72. Variables:
  73. Global:
  74. -.
  75. Static:
  76. -
  77. Commands:
  78. -
  79. Compile options:
  80. -
  81. Operators:
  82. -
  83. Natives:
  84. -
  85. \**--------------------------------------------------------------------------**/
  86. #if defined _INC_y_compilerpass
  87. #endinput
  88. #endif
  89. #define _INC_y_compilerpass
  90. #if defined __COMPILER_SECOND_PASS
  91. #define __COMPILER_PASS (1)
  92. #else
  93. #define __COMPILER_PASS (0)
  94. #endif
  95. #define COMPILER_1ST_PASS (__COMPILER_PASS == (0))
  96. #define COMPILER_2ND_PASS (__COMPILER_PASS == (1))
  97. #define COMPILER_FIRST_PASS COMPILER_1ST_PASS
  98. #define COMPILER_SECOND_PASS COMPILER_2ND_PASS
  99. static stock __COMPILER_SECOND_PASS() {}
  100. #if __Pawn >= 0x0400
  101. #error YSI does not yet support PAWN 4.0
  102. #elseif __Pawn == 0x030A
  103. #define AUTO_INCLUDE_GUARD 0
  104. #elseif __Pawn >= 0x0300
  105. #define AUTO_INCLUDE_GUARD 1
  106. #else
  107. #error YSI does not yet support PAWN 2.0/1.0
  108. #endif