y_shortfunc.inc 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*----------------------------------------------------------------------------*-
  2. ====================
  3. YSI - Master Funcs
  4. ====================
  5. Description:
  6. Defines new names for native functions.
  7. Legal:
  8. Version: MPL 1.1
  9. The contents of this file are subject to the Mozilla Public License Version
  10. 1.1 (the "License"); you may not use this file except in compliance with
  11. the License. You may obtain a copy of the License at
  12. http://www.mozilla.org/MPL/
  13. Software distributed under the License is distributed on an "AS IS" basis,
  14. WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  15. for the specific language governing rights and limitations under the
  16. License.
  17. The Original Code is the SA:MP script information include.
  18. The Initial Developer of the Original Code is Alex "Y_Less" Cole.
  19. Portions created by the Initial Developer are Copyright (C) 2008
  20. the Initial Developer. All Rights Reserved.
  21. Contributors:
  22. ZeeX, koolk
  23. Thanks:
  24. Peter, Cam - Support.
  25. ZeeX - Very productive conversations.
  26. koolk - IsPlayerinAreaEx code.
  27. TheAlpha - Danish translation.
  28. breadfish - German translation.
  29. Fireburn - Dutch translation.
  30. yom - French translation.
  31. 50p - Polish translation.
  32. Zamaroht - Spanish translation.
  33. Dracoblue, sintax, mabako, Xtreme, other coders - Producing other modes
  34. for me to strive to better.
  35. Pixels^ - Running XScripters where the idea was born.
  36. Matite - Pestering me to release it and using it.
  37. Very special thanks to:
  38. Thiadmer - PAWN.
  39. Kye/Kalcor - SA:MP.
  40. SA:MP Team past, present and future - SA:MP.
  41. Version:
  42. 0.2
  43. Changelog:
  44. 21/10/10:
  45. Split in to y_shortfunc.
  46. Functions:
  47. Public:
  48. -
  49. Core:
  50. -
  51. Stock:
  52. -
  53. Static:
  54. -
  55. Inline:
  56. -
  57. API:
  58. -
  59. Hooks:
  60. -
  61. Callbacks:
  62. -
  63. Definitions:
  64. -
  65. Enums:
  66. -
  67. Macros:
  68. -
  69. Tags:
  70. -
  71. Variables:
  72. Global:
  73. -
  74. Static:
  75. -
  76. Commands:
  77. -
  78. Compile options:
  79. -
  80. Operators:
  81. -
  82. Natives:
  83. W@ - Renaming of CallRemoteFunction for size reasons.
  84. V@ - Renaming of getproperty for size reasons.
  85. S@ - Renaming of setproperty for size reasons.
  86. P@ - Renaming of CallLocalFunction for size reasons.
  87. -*----------------------------------------------------------------------------*/
  88. native U@(id=0, const name[]="", value=cellmin, const string[]="") = setproperty;
  89. native V@(id=0, const name[]="", value=cellmin, string[]="") = getproperty;
  90. // Define this command with basically every strong tag in existance to avoid
  91. // tag mismatch warnings with remote functions with strong tag parameters.
  92. native W@(const function[], const format[], {Float, File, Bit, PlayerText3D, Text, Text3D, Menu, DB, DBResult, Style, XML, Bintree, Group, _}:...) = CallRemoteFunction;
  93. native P@(const function[], const format[], {Float, File, Bit, PlayerText3D, Text, Text3D, Menu, DB, DBResult, Style, XML, Bintree, Group, _}:...) = CallLocalFunction;
  94. native O@(const function[], time, repeat, const format[], {Float, File, Bit, PlayerText3D, Text, Text3D, Menu, DB, DBResult, Style, XML, Bintree, Group, _}:...) = SetTimerEx;
  95. // Consume trailing spaces. Despite being a common letter, this is unlkely to
  96. // ever be matched due to the unusual series of operators after it. If anyone
  97. // else tries to define "x" however they may have a slight problem (they can't).
  98. //#define x,), x),
  99. // Changed as x,): was also needed (for ?:).
  100. #define x,) x)
  101. // This is for getting excess parameters on non-strings.
  102. #define _:%0,) %0)