y_automasters.inc 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. /*----------------------------------------------------------------------------*\
  2. ===============================
  3. Y Sever Includes - Master Auto
  4. ===============================
  5. Description:
  6. Attempts to figure out from what library the current instance of the master
  7. system was included from.
  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. 06/08/10:
  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. // =============================================================================
  87. // =============================================================================
  88. //
  89. // MAKE SURE THE RECALL CODE IN y_groups HAS THE RIGHT NUMBERS - THATS GIVEN
  90. // ODD ERRORS TWICE NOW!!!
  91. //
  92. // =============================================================================
  93. // =============================================================================
  94. #undef _inc_y_automasters
  95. //#define _YSIM_USED_AUTO
  96. // Commands are set as master number 25
  97. #if defined _inc_y_commands
  98. #if !defined _YCM_z@ // z is letter 25
  99. #define MASTER 25
  100. #endinput
  101. #endif
  102. #endif
  103. // Groups are set as master number 24
  104. #if defined _inc_y_grouponce
  105. #if !defined _YCM_y@ // y is letter 24
  106. #define MASTER 24
  107. #endinput
  108. #endif
  109. #endif
  110. // Reserve this number (only in terms of not using it).
  111. //#define DEFAULT_USER_COMMAND_MASTER 23
  112. // Classes are set as master number 22
  113. #if defined _inc_y_classes
  114. #if !defined _YCM_w@ // w is letter 22
  115. #define MASTER 22
  116. //#if defined _inc_y_classes_do
  117. // // Make sure only the implementation file calls y_master.
  118. // #define YSIM_DISABLE_RECALL
  119. //#endif
  120. #endinput
  121. #endif
  122. #endif
  123. // Languages are set as master number 21. This is the first library I've done
  124. // since largely finishing the y_master system (I hope anyway) and it is now, I
  125. // have to say, VERY smooth adding in a new YSI mastered library! Actually, I
  126. // need to remember to add the "revert" code, but it's only hard with groups.
  127. #if defined _inc_y_languages
  128. #if !defined _YCM_v@ // B is letter 21
  129. #define MASTER 21
  130. #endinput
  131. #endif
  132. #endif
  133. // Players are set as master number 20
  134. #if defined _inc_y_users
  135. #if !defined _YCM_u@ // C is letter 20
  136. #define MASTER 20
  137. #endinput
  138. #endif
  139. #endif
  140. // Dialogs are set as master number 19
  141. #if defined _inc_y_dialog
  142. #if !defined _YCM_t@ // C is letter 20
  143. #define MASTER 19
  144. #endinput
  145. #endif
  146. #endif
  147. // Areas are set as master number 18
  148. #if defined _inc_y_areas
  149. #if !defined _YCM_s@ // x is letter 23
  150. #define MASTER 18
  151. #endinput
  152. #endif
  153. #endif
  154. // PHP is set as master number 17
  155. #if defined _inc_y_php
  156. #if !defined _YCM_r@ // x is letter 23
  157. #define MASTER 17
  158. #endinput
  159. #endif
  160. #endif
  161. // The help system is set as master number 29
  162. /*#if defined _inc_y_help
  163. #if !defined _YCM_u@ // D is letter 29
  164. #define MASTER 20
  165. #endinput
  166. #endif
  167. #endif*/
  168. #if defined _YSI_ALLOW_INTERNAL_TEST
  169. #if defined _inc_y_inttest
  170. #if !defined _YCM_j@
  171. #define MASTER 9
  172. #endinput
  173. #endif
  174. #endif
  175. #if defined _inc_y_inttest2
  176. #if !defined _YCM_i@
  177. #define MASTER 8
  178. #endinput
  179. #endif
  180. #endif
  181. #endif
  182. //#undef _YSIM_USED_AUTO
  183. // We can't have an auto-incrementing master number as there's no way to
  184. // guarantee that two scripts using the same library will have the same master
  185. // number for that library!
  186. /*#if defined _YCM_z@
  187. #error "Max masters exceeded."
  188. #endif
  189. #if defined _YCM_y@
  190. #define MASTER 25
  191. #endif
  192. #if defined _YCM_x@
  193. #define MASTER 24
  194. #endif
  195. #if defined _YCM_w@
  196. #define MASTER 23
  197. #endif
  198. #if defined _YCM_v@
  199. #define MASTER 22
  200. #endif
  201. #if defined _YCM_u@
  202. #define MASTER 21
  203. #endif
  204. #if defined _YCM_t@
  205. #define MASTER 20
  206. #endif
  207. #if defined _YCM_s@
  208. #define MASTER 19
  209. #endif
  210. #if defined _YCM_r@
  211. #define MASTER 18
  212. #endif
  213. #if defined _YCM_q@
  214. #define MASTER 17
  215. #endif
  216. #if defined _YCM_p@
  217. #define MASTER 16
  218. #endif
  219. #if defined _YCM_o@
  220. #define MASTER 15
  221. #endif
  222. #if defined _YCM_n@
  223. #define MASTER 14
  224. #endif
  225. #if defined _YCM_m@
  226. #define MASTER 13
  227. #endif
  228. #if defined _YCM_l@
  229. #define MASTER 12
  230. #endif
  231. #if defined _YCM_k@
  232. #define MASTER 11
  233. #endif
  234. #if defined _YCM_j@
  235. #define MASTER 10
  236. #endif
  237. #if defined _YCM_i@
  238. #define MASTER 9
  239. #endif
  240. #if defined _YCM_h@
  241. #define MASTER 8
  242. #endif
  243. #if defined _YCM_g@
  244. #define MASTER 7
  245. #endif
  246. #if defined _YCM_f@
  247. #define MASTER 6
  248. #endif
  249. #if defined _YCM_e@
  250. #define MASTER 5
  251. #endif
  252. #if defined _YCM_d@
  253. #define MASTER 4
  254. #endif
  255. #if defined _YCM_c@
  256. #define MASTER 3
  257. #endif
  258. #if defined _YCM_b@
  259. #define MASTER 2
  260. #endif
  261. #if defined _YCM_a@
  262. #define MASTER 1
  263. #endif
  264. #define MASTER 0*/