y_automasters.inc 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  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@ // v 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@ // u 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@ // t is letter 19
  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@ // s is letter 18
  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@ // r is letter 17
  157. #define MASTER 17
  158. #endinput
  159. #endif
  160. #endif
  161. // Incognito's streamer is set as master number 16
  162. #if defined _inc_streamer
  163. #if !defined _YCM_q@ // q is letter 16
  164. #define MASTER 16
  165. #endinput
  166. #endif
  167. #endif
  168. // Incognito's streamer is set as master number 16
  169. #if defined _inc_y_phone
  170. #if !defined _YCM_p@ // q is letter 16
  171. #define MASTER 15
  172. #endinput
  173. #endif
  174. #endif
  175. // The help system is set as master number 29
  176. /*#if defined _inc_y_help
  177. #if !defined _YCM_u@ // D is letter 29
  178. #define MASTER 20
  179. #endinput
  180. #endif
  181. #endif*/
  182. #if defined _YSI_ALLOW_INTERNAL_TEST
  183. #if defined _inc_y_inttest
  184. #if !defined _YCM_j@
  185. #define MASTER 9
  186. #endinput
  187. #endif
  188. #endif
  189. #if defined _inc_y_inttest2
  190. #if !defined _YCM_i@
  191. #define MASTER 8
  192. #endinput
  193. #endif
  194. #endif
  195. #endif
  196. //#undef _YSIM_USED_AUTO
  197. // We can't have an auto-incrementing master number as there's no way to
  198. // guarantee that two scripts using the same library will have the same master
  199. // number for that library!
  200. /*#if defined _YCM_z@
  201. #error "Max masters exceeded."
  202. #endif
  203. #if defined _YCM_y@
  204. #define MASTER 25
  205. #endif
  206. #if defined _YCM_x@
  207. #define MASTER 24
  208. #endif
  209. #if defined _YCM_w@
  210. #define MASTER 23
  211. #endif
  212. #if defined _YCM_v@
  213. #define MASTER 22
  214. #endif
  215. #if defined _YCM_u@
  216. #define MASTER 21
  217. #endif
  218. #if defined _YCM_t@
  219. #define MASTER 20
  220. #endif
  221. #if defined _YCM_s@
  222. #define MASTER 19
  223. #endif
  224. #if defined _YCM_r@
  225. #define MASTER 18
  226. #endif
  227. #if defined _YCM_q@
  228. #define MASTER 17
  229. #endif
  230. #if defined _YCM_p@
  231. #define MASTER 16
  232. #endif
  233. #if defined _YCM_o@
  234. #define MASTER 15
  235. #endif
  236. #if defined _YCM_n@
  237. #define MASTER 14
  238. #endif
  239. #if defined _YCM_m@
  240. #define MASTER 13
  241. #endif
  242. #if defined _YCM_l@
  243. #define MASTER 12
  244. #endif
  245. #if defined _YCM_k@
  246. #define MASTER 11
  247. #endif
  248. #if defined _YCM_j@
  249. #define MASTER 10
  250. #endif
  251. #if defined _YCM_i@
  252. #define MASTER 9
  253. #endif
  254. #if defined _YCM_h@
  255. #define MASTER 8
  256. #endif
  257. #if defined _YCM_g@
  258. #define MASTER 7
  259. #endif
  260. #if defined _YCM_f@
  261. #define MASTER 6
  262. #endif
  263. #if defined _YCM_e@
  264. #define MASTER 5
  265. #endif
  266. #if defined _YCM_d@
  267. #define MASTER 4
  268. #endif
  269. #if defined _YCM_c@
  270. #define MASTER 3
  271. #endif
  272. #if defined _YCM_b@
  273. #define MASTER 2
  274. #endif
  275. #if defined _YCM_a@
  276. #define MASTER 1
  277. #endif
  278. #define MASTER 0*/