Manual.cpp 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. //
  2. // Copyright (c) 2008-2020 the Urho3D project.
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to deal
  6. // in the Software without restriction, including without limitation the rights
  7. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. // copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. // THE SOFTWARE.
  21. //
  22. #include "../Precompiled.h"
  23. #include "../AngelScript/APITemplates.h"
  24. namespace Urho3D
  25. {
  26. void ASRegisterManualFirst_Addons(asIScriptEngine* engine);
  27. void ASRegisterManualLast_Addons(asIScriptEngine* engine);
  28. void ASRegisterManualFirst_Graphics(asIScriptEngine* engine);
  29. void ASRegisterManualLast_Graphics(asIScriptEngine* engine);
  30. void ASRegisterManualFirst_Core(asIScriptEngine* engine);
  31. void ASRegisterManualLast_Core(asIScriptEngine* engine);
  32. void ASRegisterManualFirst_Math(asIScriptEngine* engine);
  33. void ASRegisterManualLast_Math(asIScriptEngine* engine);
  34. void ASRegisterManualFirst_IO(asIScriptEngine* engine);
  35. void ASRegisterManualLast_IO(asIScriptEngine* engine);
  36. void ASRegisterManualFirst_Scene(asIScriptEngine* engine);
  37. void ASRegisterManualLast_Scene(asIScriptEngine* engine);
  38. void ASRegisterManualFirst_UI(asIScriptEngine* engine);
  39. void ASRegisterManualLast_UI(asIScriptEngine* engine);
  40. void ASRegisterManualFirst_Input(asIScriptEngine* engine);
  41. void ASRegisterManualLast_Input(asIScriptEngine* engine);
  42. void ASRegisterManualFirst_Engine(asIScriptEngine* engine);
  43. void ASRegisterManualLast_Engine(asIScriptEngine* engine);
  44. void ASRegisterManualFirst_Audio(asIScriptEngine* engine);
  45. void ASRegisterManualLast_Audio(asIScriptEngine* engine);
  46. void ASRegisterManualFirst_Container(asIScriptEngine* engine);
  47. void ASRegisterManualLast_Container(asIScriptEngine* engine);
  48. void ASRegisterManualFirst_Resource(asIScriptEngine* engine);
  49. void ASRegisterManualLast_Resource(asIScriptEngine* engine);
  50. #ifdef URHO3D_PHYSICS
  51. void ASRegisterManualFirst_Physics(asIScriptEngine* engine);
  52. void ASRegisterManualLast_Physics(asIScriptEngine* engine);
  53. #endif
  54. #ifdef URHO3D_NETWORK
  55. void ASRegisterManualFirst_Network(asIScriptEngine* engine);
  56. void ASRegisterManualLast_Network(asIScriptEngine* engine);
  57. #endif
  58. #ifdef URHO3D_IK
  59. void ASRegisterManualFirst_IK(asIScriptEngine* engine);
  60. void ASRegisterManualLast_IK(asIScriptEngine* engine);
  61. #endif
  62. #ifdef URHO3D_DATABASE
  63. void ASRegisterManualFirst_Database(asIScriptEngine* engine);
  64. void ASRegisterManualLast_Database(asIScriptEngine* engine);
  65. #endif
  66. #ifdef URHO3D_URHO2D
  67. void ASRegisterManualFirst_Urho2D(asIScriptEngine* engine);
  68. void ASRegisterManualLast_Urho2D(asIScriptEngine* engine);
  69. #endif
  70. // This function is called before ASRegisterGenerated()
  71. void ASRegisterManualFirst(asIScriptEngine* engine)
  72. {
  73. if (sizeof(size_t) == 4)
  74. engine->RegisterTypedef("size_t", "uint");
  75. else
  76. engine->RegisterTypedef("size_t", "uint64");
  77. ASRegisterManualFirst_Addons(engine);
  78. ASRegisterManualFirst_Graphics(engine);
  79. ASRegisterManualFirst_Core(engine);
  80. ASRegisterManualFirst_Math(engine);
  81. ASRegisterManualFirst_IO(engine);
  82. ASRegisterManualFirst_Scene(engine);
  83. ASRegisterManualFirst_UI(engine);
  84. ASRegisterManualFirst_Input(engine);
  85. ASRegisterManualFirst_Engine(engine);
  86. ASRegisterManualFirst_Audio(engine);
  87. ASRegisterManualFirst_Container(engine);
  88. ASRegisterManualFirst_Resource(engine);
  89. #ifdef URHO3D_PHYSICS
  90. ASRegisterManualFirst_Physics(engine);
  91. #endif
  92. #ifdef URHO3D_NETWORK
  93. ASRegisterManualFirst_Network(engine);
  94. #endif
  95. #ifdef URHO3D_IK
  96. ASRegisterManualFirst_IK(engine);
  97. #endif
  98. #ifdef URHO3D_DATABASE
  99. ASRegisterManualFirst_Database(engine);
  100. #endif
  101. #ifdef URHO3D_URHO2D
  102. ASRegisterManualFirst_Urho2D(engine);
  103. #endif
  104. }
  105. // This function is called after ASRegisterGenerated()
  106. void ASRegisterManualLast(asIScriptEngine* engine)
  107. {
  108. ASRegisterManualLast_Addons(engine);
  109. ASRegisterManualLast_Graphics(engine);
  110. ASRegisterManualLast_Core(engine);
  111. ASRegisterManualLast_Math(engine);
  112. ASRegisterManualLast_IO(engine);
  113. ASRegisterManualLast_Scene(engine);
  114. ASRegisterManualLast_UI(engine);
  115. ASRegisterManualLast_Input(engine);
  116. ASRegisterManualLast_Engine(engine);
  117. ASRegisterManualLast_Audio(engine);
  118. ASRegisterManualLast_Container(engine);
  119. ASRegisterManualLast_Resource(engine);
  120. #ifdef URHO3D_PHYSICS
  121. ASRegisterManualLast_Physics(engine);
  122. #endif
  123. #ifdef URHO3D_NETWORK
  124. ASRegisterManualLast_Network(engine);
  125. #endif
  126. #ifdef URHO3D_IK
  127. ASRegisterManualLast_IK(engine);
  128. #endif
  129. #ifdef URHO3D_DATABASE
  130. ASRegisterManualLast_Database(engine);
  131. #endif
  132. #ifdef URHO3D_URHO2D
  133. ASRegisterManualLast_Urho2D(engine);
  134. #endif
  135. }
  136. } // namespace Urho3D